CN114567519A - Method and device for multithread parallel management of instruction messages of multiple intelligent devices - Google Patents
Method and device for multithread parallel management of instruction messages of multiple intelligent devices Download PDFInfo
- Publication number
- CN114567519A CN114567519A CN202210190333.XA CN202210190333A CN114567519A CN 114567519 A CN114567519 A CN 114567519A CN 202210190333 A CN202210190333 A CN 202210190333A CN 114567519 A CN114567519 A CN 114567519A
- Authority
- CN
- China
- Prior art keywords
- instruction
- instruction messages
- processed
- queue
- intelligent equipment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000012545 processing Methods 0.000 claims abstract description 70
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 5
- 238000012795 verification Methods 0.000 claims description 4
- 238000010200 validation analysis Methods 0.000 claims 1
- 230000008569 process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L12/2816—Controlling appliance services of a home automation network by calling their functionalities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Automation & Control Theory (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Debugging And Monitoring (AREA)
- Multi Processors (AREA)
Abstract
The invention discloses a method and a system for multithread parallel management of a plurality of intelligent equipment instruction messages, which are used for receiving the instruction messages sent by different intelligent equipment terminals and adding the instruction messages from the same intelligent equipment to the same first queue to be processed according to the receiving sequence according to the identity of the intelligent equipment in the instruction messages; judging whether the quantity of the instruction messages in the first queues to be processed exceeds a preset value, if not, respectively establishing corresponding sub-processing threads for each first queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence; and if the number exceeds the preset value, adding the instruction messages from the same intelligent equipment channel into the same second queue to be processed according to the receiving sequence according to the identity of the intelligent equipment channel in the instruction messages. The method of the invention improves the processing efficiency of a large amount of instantaneous instruction messages of the intelligent equipment.
Description
Technical Field
The invention belongs to the technical field of intelligent equipment, and particularly relates to a method for multithreading parallel management of instruction messages of multiple intelligent equipment.
Background
The appearance and the universal use of intelligent equipment have brought convenient, comfortable experience for people's life. With the increasing of the application market of the intelligent equipment, the application scenes of the intelligent equipment are increasing, the number of accessible intelligent home equipment or intelligent office equipment is increasing, the system coordination management among the equipment is also increasing, with the increasing of the number of the accessed equipment, the corresponding intelligent system in the cloud host is also upgraded, and as the state change of any equipment needs to be fed back to the intelligent equipment terminal for display in real time, the state change of the equipment from other systems needs to be received at the same time, particularly under the condition that a plurality of clients operate a plurality of intelligent equipment at the same time, the generated data volume is huge.
In practical application, the control instructions of the intelligent device are generally processed and sent by the intelligent system in a single-thread queue manner, so that the out-of-law efficiency is not high, if a large number of commands of the intelligent device terminal are simultaneously issued, the intelligent system may not timely receive and process all instruction messages due to overlarge data processing amount, so that data sent by the intelligent device terminal is lost, or the device is in a busy state, so that data blockage is caused, and the cloud host cannot normally respond to the request of the intelligent device terminal.
Therefore, a corresponding mechanism is needed to ensure that a large amount of instantaneously generated data can be reliably transmitted and timely processed when data interaction is performed between the cloud host and the intelligent device.
Disclosure of Invention
The invention provides a method for managing a plurality of intelligent device instruction messages in parallel in a multithreading mode, aiming at improving the processing efficiency of a large number of instantaneous instruction messages of intelligent devices and solving the problems that the large number of instruction messages of the intelligent devices cannot be processed in time to cause data jam and a cloud host cannot normally respond to requests of the intelligent devices.
To achieve the above object, according to one aspect of the present invention, there is provided a method for multithread parallel management of multiple smart device instruction messages, comprising:
receiving instruction messages sent by different intelligent equipment terminals, wherein the instruction messages carry identification marks corresponding to intelligent equipment and intelligent equipment channels, and adding the instruction messages from the same intelligent equipment to the same first queue to be processed according to the receiving sequence according to the identification marks of the intelligent equipment in the instruction messages;
judging whether the quantity of the instruction messages in the first queues to be processed exceeds a preset value, if not, respectively establishing corresponding sub-processing threads for each first queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence; if the number exceeds the preset value, adding the instruction messages from the same intelligent equipment channel into the same second queues to be processed according to the receiving sequence according to the identification of the intelligent equipment channel in the instruction messages, respectively creating corresponding sub-processing threads for each second queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence.
Preferably, after each instruction message is processed, the sub-processing threads generate a reply message fed back to the intelligent device terminal, and add the instruction messages belonging to the same queue to be processed into the same sending queue, where the reply message carries an identity identifier consistent with the instruction message;
and respectively creating corresponding sub-sending threads for each sending queue, and sending the adding sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminal one by one in parallel by the sub-sending threads.
Preferably, the processing thread determines whether each instruction message newly added to the queue to be processed is repeated with an existing instruction message in the queue to be processed, and if so, the newly added instruction message is cleared.
Preferably, whether the intelligent device terminal receives the reply message within a preset time is monitored in real time, if the reply message is received, the reply message in the sending queue is cleared, and if the reply message is not received, the reply message is sent again.
Preferably, the method further comprises the steps that the main thread carries out validity verification on received instruction messages sent by different intelligent household terminals, and the instruction messages after the verification are added into the queue to be processed.
Preferably, the validity verification includes:
acquiring a key in the instruction message, wherein the key is acquired from the cloud host and stored when the key is activated by the intelligent home terminal for the first time;
judging whether the key is matched with the key of the cloud host where the intelligent system is located,
and if the instruction message is matched with the instruction message, determining the legality of the instruction message.
According to another aspect of the present invention, there is also provided an apparatus for managing smart home instruction messages based on cloud host multithreading, including:
the main thread module is used for receiving instruction messages sent by different intelligent equipment terminals, the instruction messages carry the intelligent equipment and the identity marks corresponding to the intelligent equipment channels, and the instruction messages from the same intelligent equipment are added to the same first queue to be processed according to the receiving sequence of the identity marks of the intelligent equipment in the instruction messages;
the processing thread module is used for judging whether the quantity of the instruction messages in the first queues to be processed exceeds a preset numerical value, if not, corresponding sub-processing threads are respectively established for each first queue to be processed, and the sub-processing threads are used for sequentially processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence; if the number exceeds the preset value, adding the instruction messages from the same intelligent equipment channel into the same second queues to be processed according to the receiving sequence according to the identification of the intelligent equipment channel in the instruction messages, respectively creating corresponding sub-processing threads for each second queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence.
Preferably, the system further comprises a sending thread module, the sub-processing thread generates a reply message fed back to the intelligent device terminal after processing each instruction message, and adds the instruction messages belonging to the same queue to be processed into the same sending queue, and the reply message carries an identity identifier consistent with the instruction message;
and respectively creating corresponding sub-sending threads for each sending queue, and sending the adding sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminal one by one in parallel by the sub-sending threads.
Preferably, the system further comprises a monitoring thread module, which monitors whether the intelligent device terminal receives the reply message within a preset time in real time, if the reply message is received, the reply message in the sending queue is cleared, and if the reply message is not received, the reply message is sent again.
According to another aspect of the present invention, there is also provided a computer readable medium storing a computer program executable by an electronic device, the computer program, when run on the electronic device, causing the electronic device to perform the steps of any of the methods described above.
In general, compared with the prior art, the above technical solution contemplated by the present invention can achieve the following beneficial effects:
(1) the method and the system for multithread parallel management of the instruction messages of the intelligent equipment adopt the mode of multithread parallel management of the instruction messages, realize the receiving, storage and processing of a large number of instruction messages, the sending of reply messages and the monitoring of whether the reply messages are received by the intelligent equipment or not by independently setting the main thread, the processing thread, the sending thread and the monitoring thread, and ensure the processing efficiency and the reliability of the instruction messages by separately and parallelly processing the multiple threads.
(2) The invention provides a method and a system for multithread parallel management of intelligent equipment instruction messages, and the instruction messages from the same intelligent equipment are added into the same first queue to be processed according to the receiving sequence by the identity of the intelligent equipment in the instruction messages; judging whether the quantity of the instruction messages in the first queues to be processed exceeds a preset value, if not, respectively establishing corresponding sub-processing threads for each first queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence; and if the number exceeds the preset value, adding the instruction messages from the same intelligent equipment channel into the same second queues to be processed according to the receiving sequence according to the identity of the intelligent equipment channel in the instruction messages, and respectively creating corresponding sub-processing threads for each second queue to be processed. The distribution mechanism flexibly divides the linear queue, creates the processing threads and the sending threads according to the data volume of the instruction messages, and the processing threads and the sending threads are independently separated and can be processed in parallel.
Drawings
FIG. 1 is a flowchart of a method for multithreading parallel management of instruction messages of an intelligent device according to an embodiment of the present invention;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The method for multithread parallel management of the instruction messages of the intelligent equipment is applied to a cloud host or a cloud end of the intelligent equipment in an actual application scene, is particularly suitable for a complex control scene in which a plurality of intelligent equipment terminals access and control a plurality of intelligent equipment, and is realized through an intelligent equipment system loaded in the cloud host or the cloud end. A plurality of threads which run independently are arranged on a cloud host or a cloud end to manage the instruction messages of the intelligent device, the threads run independently, and are respectively responsible for the operation to be completed by the threads, and the threads do not interfere with each other. The instruction messages are flexibly distributed to the different linear queues according to the data volume of the instruction messages, and different processing threads and sending threads are independently established for each linear queue, so that the processing and sending of the instruction messages are independently separated by the different threads and can be processed in parallel, the processing efficiency of a large number of instantaneous instruction messages is improved on one hand, and the data loss or blockage caused by the fact that a large amount of data cannot be processed in time is avoided on the other hand.
Fig. 1 is a flowchart of a method for multithread parallel management of multiple intelligent device instruction messages according to the present invention, and as shown in fig. 1, the method for multithread parallel management of multiple intelligent device instruction messages includes the following steps:
s1: receiving instruction messages sent by different intelligent equipment terminals, wherein the instruction messages carry identification marks corresponding to intelligent equipment and intelligent equipment channels, and adding the instruction messages from the same intelligent equipment to the same first queue to be processed according to the receiving sequence according to the identification marks of the intelligent equipment in the instruction messages;
in this embodiment, the smart machine terminal, the smart machine all can set up a plurality ofly, realize a plurality of smart machine terminal visits and a plurality of smart machine of control, every smart machine correspondence has different passageways, different passageways correspond the specific function of smart machine, the instruction message that the smart machine sent finally reaches the smart machine passageway and realizes the function execution of specific certain smart machine that corresponds, for example, the passageway of light is including the luminance regulation of light, the colour temperature is adjusted, execution channels such as switch, the air conditioner is including temperature regulation, the wind speed is adjusted, the contextual model conversion, execution channels such as switch.
When a plurality of intelligent device terminals access the intelligent device, the sent instruction messages come from different intelligent devices, in order to ensure that the sent control instructions can be accurately executed to the corresponding intelligent devices and intelligent device channels, each instruction message contains the unique identification of the intelligent device and the intelligent device channel, the main thread identifies which intelligent device and intelligent device channel the instruction message is sent to according to the identification, and the instruction messages from the same intelligent home terminal are distributed to the same queue to be processed according to the receiving sequence of the identification.
In the invention, only one main thread is arranged and is specially responsible for receiving and distributing instruction messages of all intelligent equipment. After receiving and distributing the instruction message to the processing thread, the main thread is in a waiting state until the next instruction message arrives.
S2: judging whether the quantity of the instruction messages in the first queues to be processed exceeds a preset value, if not, respectively establishing corresponding sub-processing threads for each first queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence; if the number exceeds the preset value, adding the instruction messages from the same intelligent equipment channel into the same second queues to be processed according to the receiving sequence according to the identification of the intelligent equipment channel in the instruction messages, respectively creating corresponding sub-processing threads for each second queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence.
Specifically, after the main thread distributes the instruction messages to the plurality of queues to be processed, the processing thread processes the instruction messages, and in order to ensure that a large number of instruction messages can be processed in time, the instruction messages are divided into the plurality of queues to be processed according to the intelligent device source to which the instruction messages belong, the processing thread respectively creates corresponding sub-processing threads for each queue to be processed, the plurality of sub-processing threads are independent, the instruction messages in the queues can be processed simultaneously and parallelly, and the processing efficiency of the instruction messages is greatly improved.
When the number of the instruction messages in the first queue to be processed is still excessive, in order to ensure that the instruction messages in the first queue to be processed cannot be overstocked and can be processed in time, when the number of the instruction messages exceeds a preset value, the processing threads continue to distribute the instruction messages in the first queue to be processed, the instruction messages from the same intelligent equipment channel are added into the same second queue to be processed according to the receiving sequence of the instruction messages by the identification of the intelligent equipment channel in the instruction messages, corresponding sub-processing threads are respectively created for each second queue to be processed, and the sub-processing threads can simultaneously and parallelly process the instruction messages in each first queue to be processed one by one according to the adding sequence. The preset numerical value of the number of the instruction messages is set according to the actual situation, and is not limited specifically.
In a preferred embodiment, the processing thread determines whether each instruction message newly added to the pending queue is duplicated with an existing instruction message in the pending queue, and if so, clears the newly added instruction message. By clearing the repeated messages, the repeated response of the intelligent equipment is avoided when the user continuously performs the same operation, and the processing process of the instruction message is simplified.
In a preferred embodiment, after each instruction message is processed, the sub-processing threads generate a reply message fed back to the intelligent device terminal, and add the instruction messages belonging to the same queue to be processed into the same sending queue, wherein the reply message carries an identity identifier consistent with the instruction message;
and creating corresponding sub-sending threads for each sending queue, and sending the adding sequence of the reply messages in each sending queue to the corresponding intelligent equipment terminal one by one in parallel by the sub-sending threads.
In a preferred embodiment, a monitoring thread is further configured to monitor whether the smart device terminal has received the reply message, the monitoring thread monitors whether the smart device terminal receives the reply message within a preset time in real time, if the reply message is received, the reply message in the sending queue is cleared, and if the reply message is not received, the reply message is sent again.
The setting of the monitoring thread can monitor the sending condition of the sending thread and the receiving condition of the intelligent equipment terminal in real time, ensures that the reply message sent by each instruction message can be received by the intelligent equipment terminal, and if the reply message is not received, the reply message is timely fed back to the sending thread and is sent again, thereby avoiding the condition of missing sending or short sending of the message.
The embodiment of the invention also provides a system for multithread parallel management of a plurality of intelligent equipment instruction messages, which comprises a main thread module, a first queue to be processed and a second queue to be processed, wherein the main thread module is used for receiving the instruction messages sent by different intelligent equipment terminals, the instruction messages carry the identification marks corresponding to the intelligent equipment and the intelligent equipment channels, and the instruction messages from the same intelligent equipment are added into the same first queue to be processed according to the receiving sequence according to the identification marks of the intelligent equipment in the instruction messages;
the processing thread module is used for judging whether the quantity of the instruction messages in the first queues to be processed exceeds a preset value or not, if not, corresponding sub-processing threads are respectively established for each first queue to be processed, and the sub-processing threads are used for sequentially processing the instruction messages in the respective first queues to be processed one by one according to the adding sequence; if the number exceeds the preset value, adding the instruction messages from the same intelligent equipment channel into the same second queues to be processed according to the receiving sequence according to the identification of the intelligent equipment channel in the instruction messages, respectively creating corresponding sub-processing threads for each second queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence.
In a preferred embodiment, the system further comprises a sending thread module, wherein the sub-processing thread generates a reply message fed back to the intelligent device terminal after processing each instruction message, adds the instruction messages belonging to the same queue to be processed into the same sending queue, and the reply message carries an identity identifier consistent with the instruction message;
and respectively creating corresponding sub-sending threads for each sending queue, and sending the adding sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminal one by one in parallel by the sub-sending threads.
In a preferred embodiment, the system further includes a monitoring thread module, which monitors whether the smart device terminal receives the reply message within a preset time in real time, and if the reply message is received, clears the reply message in the sending queue, and if the reply message is not received, resends the reply message.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing terminal, display, etc.), with one or more terminals that enable a user to interact with the electronic device, and/or with any terminals (e.g., network card, modem, etc.) that enable the electronic device to communicate with one or more other computing terminals. Such communication may be through an input/output (I/O) interface. Also, the electronic device may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter.
The present embodiments also provide a computer readable medium storing a computer program executable by an electronic device, the computer program, when run on the electronic device, causing the electronic device to perform the steps of one of the embodiments of a system for multithreaded parallel management of multiple smart device instruction messages. Types of computer readable media include, but are not limited to, storage media such as SD cards, usb disks, fixed hard disks, removable hard disks, and the like.
In the description herein, references to the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like, mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for multithreaded parallel management of instruction messages of a plurality of intelligent devices, comprising:
receiving instruction messages sent by different intelligent equipment terminals, wherein the instruction messages carry identification marks corresponding to intelligent equipment and intelligent equipment channels, and adding the instruction messages from the same intelligent equipment to the same first queue to be processed according to the receiving sequence according to the identification marks of the intelligent equipment in the instruction messages;
judging whether the quantity of the instruction messages in the first queues to be processed exceeds a preset value, if not, respectively establishing corresponding sub-processing threads for each first queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence; if the number exceeds the preset value, adding the instruction messages from the same intelligent equipment channel into the same second queues to be processed according to the receiving sequence according to the identification of the intelligent equipment channel in the instruction messages, respectively creating corresponding sub-processing threads for each second queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence.
2. The method for multithread parallel management of a plurality of instruction messages of intelligent equipment according to claim 1, wherein the sub-processing thread generates a reply message which is fed back to the intelligent equipment terminal after processing each instruction message, and adds the instruction messages belonging to the same queue to be processed into the same sending queue, and the reply message carries an identity which is consistent with the instruction message;
and respectively creating corresponding sub-sending threads for each sending queue, and sending the adding sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminal one by one in parallel by the sub-sending threads.
3. The method of claim 1, wherein the processing thread determines whether each newly added instruction message in the queue to be processed overlaps with an existing instruction message in the queue to be processed, and if so, clears the newly added instruction message.
4. The method according to claim 1, wherein monitoring whether the smart device terminal receives the reply message within a preset time in real time, if the reply message is received, clearing the reply message in the sending queue, and if the reply message is not received, resending the reply message.
5. The method for multithread parallel management of instruction messages of multiple intelligent devices according to claim 1, further comprising the steps of carrying out validity verification on the received instruction messages sent by different intelligent home terminals by the main thread, and adding the verified instruction messages into a queue to be processed.
6. The method of claim 4, wherein the validation of legitimacy comprises:
acquiring a key in the instruction message, wherein the key is acquired from the cloud host and stored when the key is activated by the intelligent home terminal for the first time;
judging whether the key is matched with the key of the cloud host where the intelligent system is located,
and if the instruction message is matched with the instruction message, determining the legality of the instruction message.
7. A system for multithreaded parallel management of instruction messages for a plurality of intelligent devices, comprising:
the main thread module is used for receiving instruction messages sent by different intelligent equipment terminals, the instruction messages carry the intelligent equipment and the identity marks corresponding to the intelligent equipment channels, and the instruction messages from the same intelligent equipment are added to the same first queue to be processed according to the receiving sequence of the identity marks of the intelligent equipment in the instruction messages;
the processing thread module is used for judging whether the quantity of the instruction messages in the first queues to be processed exceeds a preset value or not, if not, corresponding sub-processing threads are respectively established for each first queue to be processed, and the sub-processing threads are used for sequentially processing the instruction messages in the respective first queues to be processed one by one according to the adding sequence; and if the number exceeds the preset value, adding the instruction messages from the same intelligent equipment channel into the same second queues to be processed according to the receiving sequence according to the identification of the intelligent equipment channel in the instruction messages, respectively creating corresponding sub-processing threads for each second queue to be processed, and processing the instruction messages in the respective first queues to be processed one by one in parallel according to the adding sequence.
8. The system for multithread parallel management of multiple instruction messages of an intelligent device according to claim 7, further comprising a sending thread module, wherein the sub-processing thread generates a reply message fed back to the intelligent device terminal after processing each instruction message, and adds the instruction messages belonging to the same queue to be processed to the same sending queue, and the reply message carries an identity identical to the instruction message;
and respectively creating corresponding sub-sending threads for each sending queue, and sending the adding sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminal one by one in parallel by the sub-sending threads.
9. The system of claim 7, further comprising a monitor thread module that monitors whether the smart device terminal receives the reply message in real time within a predetermined time, and if the reply message is received, the monitor thread module clears the reply message in the send queue, and if the reply message is not received, the monitor thread module resends the reply message.
10. A computer-readable medium, in which a computer program is stored which is executable by an electronic device, and which, when run on the electronic device, causes the electronic device to perform the steps of the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210190333.XA CN114567519B (en) | 2022-02-28 | 2022-02-28 | Method and device for managing instruction messages of multiple intelligent devices in multithreading parallel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210190333.XA CN114567519B (en) | 2022-02-28 | 2022-02-28 | Method and device for managing instruction messages of multiple intelligent devices in multithreading parallel |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114567519A true CN114567519A (en) | 2022-05-31 |
CN114567519B CN114567519B (en) | 2024-06-18 |
Family
ID=81715416
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210190333.XA Active CN114567519B (en) | 2022-02-28 | 2022-02-28 | Method and device for managing instruction messages of multiple intelligent devices in multithreading parallel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114567519B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116300503A (en) * | 2023-03-29 | 2023-06-23 | 广州市平可捷信息科技有限公司 | Multithreading intelligent furniture control method and system |
CN116860436A (en) * | 2023-06-15 | 2023-10-10 | 重庆智铸达讯通信有限公司 | Thread data processing method, device, equipment and storage medium |
WO2024125052A1 (en) * | 2022-12-13 | 2024-06-20 | 深圳Tcl新技术有限公司 | Device control method and apparatus, and electronic device and computer storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108459917A (en) * | 2018-03-15 | 2018-08-28 | 欧普照明股份有限公司 | A kind of message distribution member, message handling system and message distribution method |
CN108833237A (en) * | 2018-07-20 | 2018-11-16 | 京东方科技集团股份有限公司 | Intelligent domestic gateway and its management-control method |
US20190163524A1 (en) * | 2017-11-30 | 2019-05-30 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method and apparatus for processing task in smart device |
CN110351270A (en) * | 2019-07-05 | 2019-10-18 | 深圳市浩科电子有限公司 | A kind of method and system improving concurrent data treatment effeciency |
CN112540545A (en) * | 2021-02-22 | 2021-03-23 | 武汉世聪智能科技有限公司 | Intelligent equipment control method and system based on multiple intelligent systems |
-
2022
- 2022-02-28 CN CN202210190333.XA patent/CN114567519B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190163524A1 (en) * | 2017-11-30 | 2019-05-30 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method and apparatus for processing task in smart device |
CN108459917A (en) * | 2018-03-15 | 2018-08-28 | 欧普照明股份有限公司 | A kind of message distribution member, message handling system and message distribution method |
CN108833237A (en) * | 2018-07-20 | 2018-11-16 | 京东方科技集团股份有限公司 | Intelligent domestic gateway and its management-control method |
CN110351270A (en) * | 2019-07-05 | 2019-10-18 | 深圳市浩科电子有限公司 | A kind of method and system improving concurrent data treatment effeciency |
CN112540545A (en) * | 2021-02-22 | 2021-03-23 | 武汉世聪智能科技有限公司 | Intelligent equipment control method and system based on multiple intelligent systems |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024125052A1 (en) * | 2022-12-13 | 2024-06-20 | 深圳Tcl新技术有限公司 | Device control method and apparatus, and electronic device and computer storage medium |
CN116300503A (en) * | 2023-03-29 | 2023-06-23 | 广州市平可捷信息科技有限公司 | Multithreading intelligent furniture control method and system |
CN116300503B (en) * | 2023-03-29 | 2023-08-18 | 广州市平可捷信息科技有限公司 | Multithreading intelligent furniture control method and system |
CN116860436A (en) * | 2023-06-15 | 2023-10-10 | 重庆智铸达讯通信有限公司 | Thread data processing method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114567519B (en) | 2024-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114567519A (en) | Method and device for multithread parallel management of instruction messages of multiple intelligent devices | |
CN109451072A (en) | A kind of message caching system and method based on Kafka | |
CN105577801B (en) | A kind of business accelerating method and device | |
CN101951411A (en) | Cloud scheduling system and method and multistage cloud scheduling system | |
US11838384B2 (en) | Intelligent scheduling apparatus and method | |
CN110166524B (en) | Data center switching method, device, equipment and storage medium | |
CN112882813A (en) | Task scheduling method, device and system and electronic equipment | |
KR101416280B1 (en) | Event handling system and method | |
JP2001084195A (en) | Network managing system with event control means | |
CN104243405A (en) | Request processing method, device and system | |
CN104092756A (en) | Cloud storage system resource dynamic allocation method based on DHT mechanism | |
CN107332814B (en) | Request message transmission method and device | |
CN110296501B (en) | Centralized management and control system and method for air conditioning system | |
US20180242177A1 (en) | Monitoring management method and apparatus | |
TW202131171A (en) | User code operation method of programming platform, electronic equipment and computer-readable storage medium | |
CN113704341A (en) | Data acquisition system and method | |
US20070038699A1 (en) | Method and device arrangement for managing a user application/device management server/client device environment | |
CN113342526A (en) | Dynamic management and control method, system, terminal and medium for cloud computing mobile network resources | |
CN113177179A (en) | Data request connection management method, device, equipment and storage medium | |
CN112910987A (en) | Message pushing method, system, device, equipment and storage medium | |
CN108289041A (en) | A kind of processing method and relevant apparatus of server info | |
CN113472846B (en) | Message processing method, device, equipment and computer readable storage medium | |
CN116346959A (en) | DPU scene elastic network card efficient implementation method and device | |
CN109376509A (en) | A kind of KVM task distributes system and automatic distributing method automatically | |
CN111240867A (en) | Information communication system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |