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, electrical components, transmission systems, etc., can solve problems such as complex data synchronization and high multi-threading overhead, reduce the occupation of memory resources, make the process simple and clear, and avoid The effect of cumbersome interactions

Active Publication Date: 2019-12-13
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF9 Cites 1 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 for solving the problems of high expenditurefor establishing multiple threads and complex data synchronization. According to the method, only one independent communication thread is created; when the long connection between the embedded terminal and the server is abnormally disconnected, the communication thread calls an initialization interface of the embedded terminal to realize automatic reconnection; when the embedded terminal needs tosend a message, the communication thread calls a message sending interface of the embedded terminal to send the message; when the embedded terminal needs to receive the message, the communication thread calls a message receiving interface of the embedded terminal to receive the message; when the communication thread processes the messages, the messages needing to be processed are put into a message queue to be processed one by one; and in the one-by-one processing process, if the current message fails to be processed, caching the message, and waiting for cyclic next sending. The method 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 Applications(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