Communication method, device and server for Internet of things

A communication method and technology of a communication device, which are applied in the field of communication, can solve the problems of frequent equipment packets, the inability of select and epoll models to meet socket read and write requirements, and the blocking of server service thread processing, and achieve the effect of fast processing speed.

CN104683460AActive Publication Date: 2015-06-03QINGDAO HAIER INTELLIGENT HOME TECH CO LTD
3 Cites 10 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2015-06-03

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a communication method, a device and a server for Internet of things. The method comprises the following steps: setting a plurality of first selectors so as to receive a connection request from a connection queue in a multithreads manner; determining one first selector to receive the connection request which is currently positioned at the utmost front end of the connection queue according to the amount of data received by the first selectors; establishing the connection to the side of equipment according to the connection request. According to the embodiment of the invention, the plurality of selectors are arranged, the selectors can receive the connection request from the connection queue in a multithreads manner, and further multiple connection requests are processed in parallel, so that the processing speed of the server is higher, and the problems that select and epoll models based on a single thread cannot satisfy the socket read and write requirements of the system, and the professional work thread of the server is blocked as packages are frequently transmitted by the equipment in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present invention relates to the communication field, in particular to a communication method, device and server of the Internet of Things. Background technique

[0002] In recent years, with the development of the Internet of Things, more and more terminals have network functions and need to be connected to the server. Users can remotely operate terminal devices through the server. The server needs an efficient and stable communication system to support the connection of devices and Send and receive data.

[0003] Most of the current communication systems have the following disadvantages:

[0004] (1) As the number of connected devices increases, the operating pressure of the communication system will increase. The single-threaded select and epoll models cannot meet the system's socket read and write requirements, and the packets sent by the device are very frequent, which will block the server Processing of business threads; (2) The data packet...

Examples

Embodiment Construction

[0027] In order to solve the problem in the prior art that the single-thread-based select and epoll models cannot meet the reading and writing requirements of the socket of the system, and the packets sent by the device are very frequent, which will block the processing of the server business thread, the present invention provides a The communication method, device and server of the Internet of Things will be further described in detail below in conjunction with the accompanying drawings and embodiments of the present invention. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0028] An embodiment of the present invention provides a communication method for the Internet of Things, the process of which is as follows figure 1 As shown, including steps S102 to S106:

[0029] S102. Set multiple first Selectors to receive connection requests from multiple threads in the connec...