Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for long connection communication of embedded terminal

An embedded terminal and long-term connection technology, which is applied in digital transmission systems, data exchange networks, electrical components, etc., can solve the problems of high multi-threading overhead and complex data synchronization, achieve simple and clear processes, reduce the occupation of memory resources, Avoid the effects of cumbersome interactions

Active Publication Date: 2021-09-21
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The technical problem to be solved by the present invention is to provide a method for embedded terminal long-connection communication to solve the problems of high cost of establishing multi-threading and complicated data synchronization

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for long connection communication of embedded terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0025] In order to make the purpose of the present invention, technical solutions and advantages clearer, the present invention is described in further detail below in conjunction with embodiment:

[0026] The embodiment provides a method for implementing long-connection communication of an embedded terminal with a single thread, and its specific application example can be applied to an intelligent gateway in a smart home scene. The smart gateway establishes a persistent connection with the cloud server; sends task instructions to the smart gateway through the persistent connection, so that the smart gateway can perform corresponding tasks according to the task instructions; after the smart gateway completes the task, it reports the corresponding status data and control reply. It can be integrated to provide development and use for SDK.

[0027] In step S01, for terminals with different operating systems, for example, the home smart gateway generally uses FreeRTOS or Linux, an...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the field of embedded technology, and discloses a method for long-connection communication of an embedded terminal, which is used to solve the problems of high cost of establishing multithreading and complicated data synchronization. The present invention only creates a separate communication thread; when the long connection between the embedded terminal and the server is disconnected abnormally, the communication thread invokes the initialization interface of the embedded terminal to realize automatic reconnection; when the embedded terminal needs to send a message, The communication thread calls the message sending interface of the embedded terminal to send the message; when the embedded terminal needs to receive the message, the communication thread calls the message receiving interface of the embedded terminal to receive the message; The incoming message queue is processed one by one; in the process of processing one by one, if the current message processing fails, the message will be cached and wait for the next sending cycle. The present invention is suitable for embedded terminal long connection communication.

Description

technical field [0001] The invention relates to the field of embedded technology, in particular to a method for long-connection communication of an embedded terminal. Background technique [0002] The traditional multi-thread implementation of long-term connection data transmission scheme is generally: open a thread for receiving data, and open a thread for sending messages. Although the response speed is improved to a certain extent, threads are also programs, so threads need to occupy memory, and for embedded terminals with tight resources, memory overhead is an essential point that needs to be considered; multithreading needs to be coordinated and managed. Resource access will affect each other, and the problem of competing for shared resources must be solved; and complex control, the development difficulty is higher than that of single-threaded, and some bugs may be introduced. Compared with the traditional multi-threaded implementation of long connection data transmiss...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/08H04L12/26H04L29/06
CPCH04L43/10H04L67/141H04L69/162
Inventor 袁中庆李世绍刘潇骁黄欣欣蒋启平李晨心
Owner SICHUAN CHANGHONG ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products