CN114567519B - Method and device for managing instruction messages of multiple intelligent devices in multithreading parallel - Google Patents
Method and device for managing instruction messages of multiple intelligent devices in multithreading parallel Download PDFInfo
- Publication number
- CN114567519B CN114567519B CN202210190333.XA CN202210190333A CN114567519B CN 114567519 B CN114567519 B CN 114567519B CN 202210190333 A CN202210190333 A CN 202210190333A CN 114567519 B CN114567519 B CN 114567519B
- Authority
- CN
- China
- Prior art keywords
- instruction messages
- processed
- instruction
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000012545 processing Methods 0.000 claims abstract description 74
- 238000012544 monitoring process Methods 0.000 claims description 12
- 238000012795 verification Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 4
- 238000010200 validation analysis Methods 0.000 claims 1
- 230000008569 process Effects 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 3
- 230000006872 improvement 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
- 230000007547 defect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
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)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Automation & Control Theory (AREA)
- Multi Processors (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and a system for managing instruction messages of a plurality of intelligent devices in parallel, which are used for receiving instruction messages sent by different intelligent device terminals, and adding the instruction messages from the same intelligent device into the same first queue to be processed according to the receiving sequence according to the identity of the intelligent device in the instruction messages; judging whether the number of the instruction messages in the first queues to be processed exceeds a preset value, if the number of the instruction messages does not exceed the preset value, respectively creating corresponding sub-processing threads for each first queue to be processed, and sequentially carrying out piece-by-piece processing on the instruction messages in the first queues to be processed by the sub-processing threads in parallel according to the joining sequence; if the number exceeds the preset number, the instruction messages from the same intelligent device channel are added to the same second queue to be processed according to the receiving sequence according to the identity of the intelligent device channel in the instruction messages. The method improves the processing efficiency of a large number 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 managing instruction messages of a plurality of intelligent equipment in a multithreading parallel manner.
Background
The appearance and the general use of intelligent device have brought convenient, comfortable experience for people's life. As the application market of intelligent devices is larger and larger, the application scenes of the intelligent devices are more and more, the intelligent home devices or intelligent office devices which can be accessed are more and more, the collaborative management of the systems among the devices is more and more complex, the corresponding intelligent systems in the cloud host are updated as the accessed devices are more, and the state changes of any device need to be fed back to the intelligent device terminal in real time for display, and meanwhile, the state changes of devices from other systems are also received, particularly, the condition that a plurality of clients operate a plurality of intelligent devices at the same time, so that the generated data volume is huge.
In practical application, the intelligent system usually processes and transmits a control instruction of the intelligent device by queuing a single thread, so that the output efficiency is not high, if a large number of commands of the intelligent device terminal are issued at the same time, the intelligent system may not timely receive and process all instruction messages due to overlarge data processing capacity, so that data transmitted by the intelligent device terminal is lost, or the device is in a busy state, so that data is blocked, and a cloud host cannot normally respond to a request of the intelligent device terminal.
Therefore, a corresponding mechanism is needed to ensure that a large amount of data generated instantaneously can be reliably transmitted and timely processed when the cloud host and the intelligent device are subjected to data interaction.
Disclosure of Invention
Aiming at least one defect or improvement demand of the prior art, the invention provides a method for managing instruction messages of a plurality of intelligent devices in parallel by multithreading, which aims to improve the processing efficiency of a transient large number of instruction messages of the intelligent devices and solve the problems that the data is blocked and a cloud host cannot normally respond to the requests of the intelligent devices due to the fact that the large number of instruction messages of the intelligent devices cannot be processed in time.
To achieve the above object, according to one aspect of the present invention, there is provided a method for managing a plurality of smart device instruction messages in parallel by multithreading, including:
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 into the same first queue to be processed according to the identification marks of the intelligent equipment in the instruction messages;
Judging whether the number of the instruction messages in the first queues to be processed exceeds a preset value, if the number of the instruction messages does not exceed the preset value, respectively creating corresponding sub-processing threads for each first queue to be processed, and sequentially carrying out piece-by-piece processing on the instruction messages in the respective first queues to be processed by the sub-processing threads according to the joining sequence; if the number exceeds the preset number, adding the instruction messages from the same intelligent device channel into the same second to-be-processed queues according to the receiving sequence according to the identity of the intelligent device channel in the instruction messages, respectively creating corresponding sub-processing threads for each second to-be-processed queue, and sequentially processing the instruction messages in the respective first to-be-processed queues one by one according to the adding sequence in parallel by the sub-processing threads.
Preferably, the sub-processing thread generates a reply message 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, wherein the reply message carries an identity identifier consistent with the instruction message;
and respectively creating corresponding sub-sending threads for each sending queue, and sequentially sending the joining sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminals one by the sub-sending threads in parallel.
Preferably, the processing thread judges whether each newly added instruction message in the queue to be processed is repeated with the existing instruction message in the queue to be processed, and if so, the newly added instruction message is cleared.
Preferably, the method includes monitoring in real time whether the intelligent device terminal receives the reply message within a preset time, if the reply message is received, clearing the reply message in the sending queue, and if the reply message is not received, retransmitting the reply message.
Preferably, the method further comprises the step that the main thread performs validity verification on the received instruction messages sent by different intelligent home terminals, and the instruction messages after verification pass are added into a queue to be processed.
Preferably, the validity verification includes:
acquiring a key in the instruction message, wherein the key is acquired from a cloud host and stored when the intelligent home terminal is activated 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 messages are matched, determining the validity of the instruction messages.
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 receives instruction messages sent by different intelligent equipment terminals, wherein the instruction messages carry identification marks corresponding to intelligent equipment and 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 identification marks of the intelligent equipment in the instruction messages;
The processing thread module is used for judging whether the number of the instruction messages in the first queues to be processed exceeds a preset value, if the number of the instruction messages does not exceed the preset value, respectively creating corresponding sub-processing threads for each first queue to be processed, and sequentially processing the instruction messages in the respective first queues to be processed one by one in parallel according to the sequence of adding the instruction messages; if the number exceeds the preset number, adding the instruction messages from the same intelligent device channel into the same second to-be-processed queues according to the receiving sequence according to the identity of the intelligent device channel in the instruction messages, respectively creating corresponding sub-processing threads for each second to-be-processed queue, and sequentially processing the instruction messages in the respective first to-be-processed queues one by one according to the adding sequence in parallel by the sub-processing threads.
Preferably, the system further comprises a sending thread module, wherein the sub-processing thread generates a reply message fed back to the intelligent equipment terminal after processing each instruction message, the instruction messages belonging to the same queue to be processed are added 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 sequentially sending the joining sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminals one by the sub-sending threads in parallel.
Preferably, the intelligent device further comprises a monitoring thread module for monitoring whether the intelligent device terminal receives the reply message in real time within a preset time, if the reply message is received, clearing the reply message in the sending queue, and if the reply message is not received, retransmitting the reply message.
According to another aspect of the 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 one of the methods described above.
In general, the above technical solutions conceived by the present invention, compared with the prior art, enable the following beneficial effects to be obtained:
(1) The method and the system for managing the instruction messages of the intelligent equipment in the multithreading parallel mode adopt the multithreading parallel mode to manage the instruction messages, and realize the receiving, storage, processing, sending and monitoring of a large number of instruction messages 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 separating and parallel processing of the multiple threads.
(2) The invention provides a method and a system for managing instruction information of intelligent equipment in a multithreading parallel manner, and an identity of the intelligent equipment in the instruction information is added into the same first queue to be processed according to the receiving sequence from the instruction information of the same intelligent equipment; judging whether the number of the instruction messages in the first queues to be processed exceeds a preset value, if the number of the instruction messages does not exceed the preset value, respectively creating corresponding sub-processing threads for each first queue to be processed, and sequentially carrying out piece-by-piece processing on the instruction messages in the respective first queues to be processed by the sub-processing threads according to the joining sequence; if the number exceeds the preset number, adding the instruction message from the same intelligent device channel into the same second to-be-processed queues according to the receiving sequence according to the identity of the intelligent device channel in the instruction message, and respectively creating corresponding sub-processing threads for each second to-be-processed queue. The allocation mechanism is used for flexibly dividing queues, creating processing threads and sending threads according to the data volume of the instruction messages, and independently separating the processing threads from the sending threads and processing the processing threads in parallel, so that on one hand, the allocation mechanism ensures that a large amount of instant instruction messages can be processed in time, and on the other hand, redundancy caused by excessive thread allocation volume when the data volume of the instant instruction messages is in a processable range is avoided.
Drawings
FIG. 1 is a flow chart of a method for multithreading parallel management of smart device instruction messages provided by an embodiment of the present invention;
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
The method for managing the instruction messages of the intelligent devices in the multithreading parallel mode is applied to a cloud host or a cloud end of the intelligent devices in an actual application scene, is particularly suitable for a plurality of intelligent device terminals to access and control complex control scenes of the intelligent devices, and achieves the method for managing the instruction messages of the intelligent devices in the multithreading parallel mode through the intelligent device systems loaded in the cloud host or the cloud end. And a plurality of independently operated threads are arranged on the cloud host or the cloud to manage the instruction message of the intelligent device, and each thread operates independently and is responsible for the operation to be completed by the thread, and the threads are not mutually interfered. By flexibly distributing the instruction message to a plurality of different linear queues according to the data quantity of the instruction message and independently creating different processing threads and sending threads for each linear queue, the processing and sending of the instruction message are independently separated by different threads and can be processed in parallel, so that the processing efficiency of a large number of instant instruction messages is improved, and the data loss or blockage caused by the fact that a large amount of data cannot be processed in time is avoided.
Fig. 1 is a flowchart of a method for managing multiple intelligent device instruction messages in parallel in a multithreading manner, as shown in fig. 1, provided by the invention, wherein the method for managing multiple intelligent device instruction messages in parallel in a multithreading manner comprises 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 into the same first queue to be processed according to the identification marks of the intelligent equipment in the instruction messages;
In this embodiment, the intelligent device terminal and the intelligent device may all be provided with a plurality of, to realize that a plurality of intelligent device terminals access and control a plurality of intelligent devices, each intelligent device corresponds to a different channel, the different channels correspond to specific functions of the intelligent device, the instruction message sent by the intelligent device finally reaches the channel of the intelligent device to realize the function execution of a specific corresponding certain intelligent device, for example, the channel of the light includes the execution channels of brightness adjustment, color temperature adjustment, switch, etc. of the light, and the air conditioner includes the execution channels of temperature adjustment, wind speed adjustment, scene mode conversion, switch, etc.
When a plurality of intelligent equipment terminals access the intelligent equipment, the sent instruction messages come from different intelligent equipment, in order to ensure that the sent control instructions can be accurately executed to the corresponding intelligent equipment and intelligent equipment channels, each instruction message contains unique identification marks of the intelligent equipment and the intelligent equipment channels, the main thread identifies which intelligent equipment and intelligent equipment channels the instruction messages need to be sent to according to the identification marks, and the instruction messages from the same intelligent home terminal are distributed to the same waiting queue according to the receiving sequence according to the identification marks.
In the invention, only one main thread is set and is specially responsible for receiving and distributing all intelligent device instruction messages. After the instruction message is received and distributed to the processing thread, the main thread is in a waiting state until the next instruction message arrives.
S2: judging whether the number of the instruction messages in the first queues to be processed exceeds a preset value, if the number of the instruction messages does not exceed the preset value, respectively creating corresponding sub-processing threads for each first queue to be processed, and sequentially carrying out piece-by-piece processing on the instruction messages in the respective first queues to be processed by the sub-processing threads according to the joining sequence; if the number exceeds the preset number, adding the instruction messages from the same intelligent device channel into the same second to-be-processed queues according to the receiving sequence according to the identity of the intelligent device channel in the instruction messages, respectively creating corresponding sub-processing threads for each second to-be-processed queue, and sequentially processing the instruction messages in the respective first to-be-processed queues one by one according to the adding sequence in parallel by the sub-processing threads.
Specifically, after the main thread distributes the instruction information to a plurality of queues to be processed, the processing thread processes the instruction information, so as to ensure that a large number of instruction information can be processed in time.
When the number of the instruction messages in the first to-be-processed queue is still excessive, in order to ensure that the instruction messages in the first to-be-processed queue can be timely processed without backlog, when the number of the instruction messages exceeds a preset numerical value, the processing thread can continue to distribute the instruction messages in the first to-be-processed queue, the instruction messages from the same intelligent device channel are added to the same second to-be-processed queue according to the identity of the intelligent device channel in the instruction messages in a receiving sequence, corresponding sub-processing threads are respectively created for each second to-be-processed queue, and the sub-processing threads can simultaneously process the instruction messages in the respective first to-be-processed queue in sequence one by one in parallel according to the adding sequence. The preset numerical value of the number of the instruction messages is set according to actual conditions, and the numerical value is not particularly limited.
In a preferred embodiment, the processing thread determines whether each newly added instruction message in the pending queue is repeated with an existing instruction message in the pending queue, and if so, clears the newly added instruction message. By clearing the repeated message, the repeated response of the intelligent device when the user continuously performs the same operation is avoided, and the processing process of the instruction message is simplified.
In a preferred embodiment, after each instruction message is processed, the sub-processing thread generates a reply message fed back to the intelligent equipment terminal, the instruction messages belonging to the same queue to be processed are added 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 sequentially sending the joining sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminals one by the sub-sending threads in parallel.
In a preferred embodiment, a monitoring thread is further configured to monitor whether the intelligent device terminal has received the reply message, and the monitoring thread monitors in real time whether the intelligent device terminal has received the reply message within a preset time, 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 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, so that the reply message sent by each instruction message can be received by the intelligent equipment terminal, if the condition of unreceived information occurs, the reply message is timely fed back to the sending thread, and the reply message is resent, thereby avoiding the condition of missed sending or less sending of the message.
The embodiment of the invention also provides a system for managing the instruction messages of the plurality of intelligent devices in a multithreading parallel manner, which comprises a main thread module, wherein the main thread module is used for receiving the instruction messages sent by different intelligent device terminals, the instruction messages carry the identification marks corresponding to the intelligent devices and the intelligent device channels, and the instruction messages from the same intelligent device are added to the same first queue to be processed according to the receiving sequence according to the identification marks of the intelligent devices in the instruction messages;
The processing thread module is used for judging whether the number of the instruction messages in the first queues to be processed exceeds a preset value, if the number of the instruction messages does not exceed the preset value, respectively creating corresponding sub-processing threads for each first queue to be processed, and sequentially processing the instruction messages in the respective first queues to be processed one by one in parallel according to the sequence of adding the instruction messages; if the number exceeds the preset number, adding the instruction messages from the same intelligent device channel into the same second to-be-processed queues according to the receiving sequence according to the identity of the intelligent device channel in the instruction messages, respectively creating corresponding sub-processing threads for each second to-be-processed queue, and sequentially processing the instruction messages in the respective first to-be-processed queues one by one according to the adding sequence in parallel by the sub-processing threads.
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 equipment terminal after each instruction message is processed, the instruction messages belonging to the same queue to be processed are added 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 sequentially sending the joining sequence of the reply messages in the respective sending queues to the corresponding intelligent equipment terminals one by the sub-sending threads in parallel.
In a preferred embodiment, the system further includes a monitoring thread module for monitoring in real time whether the intelligent device terminal receives the reply message within a preset time, if the reply message is received, clearing the reply message in the sending queue, and if the reply message is not received, retransmitting 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 terminal (e.g., network card, modem, etc.) that enables the electronic device to communicate with one or more other computing terminals. Such communication may be through an input/output (I/O) interface. And, the electronic device may also communicate with one or more networks such as a local area network (Local Area Network, LAN), a wide area network (Wide Area Network, WAN), and/or a public network such as the internet via a network adapter.
The present embodiment also provides a computer readable medium storing a computer program executable by an electronic device, which when run on the electronic device causes the electronic device to perform the steps of a system for multithreading parallel management of a plurality of smart device instruction messages of the embodiment. Types of computer readable media include, but are not limited to, SD cards, U disk drives, fixed hard drives, removable hard drives, and the like.
In the description of the present specification, the descriptions of the terms "one embodiment," "some embodiments," "examples," "particular examples," or "some examples" and 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 present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. 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 readily appreciated by those skilled in the art that the foregoing description is merely a preferred embodiment of the invention and is not intended to limit the invention, but any modifications, equivalents, improvements or alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.
Claims (6)
1. A method for multithreading parallel management of a plurality of 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 into the same first queue to be processed according to the identification marks of the intelligent equipment in the instruction messages;
Judging whether the number of the instruction messages in the first queues to be processed exceeds a preset value, if the number of the instruction messages does not exceed the preset value, respectively creating corresponding sub-processing threads for each first queue to be processed, and sequentially carrying out piece-by-piece processing on the instruction messages in the respective first queues to be processed by the sub-processing threads according to the joining sequence; if the number exceeds the preset number, adding instruction messages from the same intelligent equipment channel into the same second to-be-processed queues according to the identification of the intelligent equipment channel in the instruction messages, respectively creating corresponding sub-processing threads for each second to-be-processed queue, and sequentially processing the instruction messages in the first to-be-processed queues and the second to-be-processed queues one by one according to the adding sequence in parallel by the sub-processing threads; after each instruction message is processed, the sub-processing thread generates a reply message which is fed back to the intelligent equipment terminal, the reply message belonging to the same queue to be processed is added into the same sending queue, and the reply message carries an identity identification consistent with the instruction message;
Creating corresponding sub-sending threads for each sending queue respectively, and sending reply messages in the respective sending queues to corresponding intelligent equipment terminals one by one in sequence according to the joining sequence by the sub-sending threads in parallel; and monitoring whether the intelligent equipment terminal receives the reply message in real time within a preset time, if so, clearing the reply message in the sending queue, and if not, retransmitting the reply message.
2. The method of claim 1, wherein the sub-processing thread determines whether each newly added instruction message in the pending queue is repeated with an existing instruction message in the pending queue, and if so, clears the newly added instruction message.
3. The method for managing instruction messages of multiple intelligent devices in parallel according to claim 1, further comprising the steps that the main thread performs validity verification on the received instruction messages sent by different intelligent device terminals, and adds the instruction messages which pass verification into a queue to be processed.
4. The method of multithreading for concurrently managing multiple smart device instruction messages of claim 3, wherein the validation comprises:
Acquiring a key in the instruction message, wherein the key is acquired from a cloud host and stored when the intelligent equipment terminal is activated 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 messages are matched, determining the validity of the instruction messages.
5. A system for multithreading parallel management of a plurality of smart device instruction messages, comprising:
The main thread module receives instruction messages sent by different intelligent equipment terminals, wherein the instruction messages carry identification marks corresponding to intelligent equipment and 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 identification marks of the intelligent equipment in the instruction messages;
The processing thread module is used for judging whether the number of the instruction messages in the first queues to be processed exceeds a preset value, if the number of the instruction messages does not exceed the preset value, respectively creating corresponding sub-processing threads for each first queue to be processed, and sequentially processing the instruction messages in the respective first queues to be processed one by one in parallel according to the sequence of adding the instruction messages; if the number exceeds the preset number, adding instruction messages from the same intelligent equipment channel into the same second to-be-processed queues according to the identification of the intelligent equipment channel in the instruction messages, respectively creating corresponding sub-processing threads for each second to-be-processed queue, and sequentially processing the instruction messages in the first to-be-processed queues and the second to-be-processed queues one by one according to the adding sequence in parallel by the sub-processing threads; after each instruction message is processed, the sub-processing thread generates a reply message which is fed back to the intelligent equipment terminal, the reply message belonging to the same queue to be processed is added into the same sending queue, and the reply message carries an identity identification consistent with the instruction message;
A sending thread module, which respectively creates corresponding sub-sending threads for each sending queue, and the sub-sending threads send reply messages in the respective sending queues to the corresponding intelligent equipment terminals one by one in sequence according to the joining sequence in parallel;
and the monitoring thread module monitors whether the intelligent equipment terminal receives the reply message in real time within a preset time, clears the reply message in the sending queue if the reply message is received, and resends the reply message if the reply message is not received.
6. A computer readable medium, characterized in that it stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the method according to any one of claims 1-4.
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 CN114567519A (en) | 2022-05-31 |
CN114567519B true 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) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117135192A (en) * | 2022-12-13 | 2023-11-28 | 深圳Tcl新技术有限公司 | Equipment control method, device, electronic equipment and computer storage medium |
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 |
Citations (1)
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 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107885590A (en) * | 2017-11-30 | 2018-04-06 | 百度在线网络技术(北京)有限公司 | Task processing method and device for smart machine |
CN108833237B (en) * | 2018-07-20 | 2021-01-26 | 京东方科技集团股份有限公司 | Intelligent home gateway and control method thereof |
CN110351270A (en) * | 2019-07-05 | 2019-10-18 | 深圳市浩科电子有限公司 | A kind of method and system improving concurrent data treatment effeciency |
CN112540545B (en) * | 2021-02-22 | 2021-04-30 | 武汉世聪智能科技有限公司 | 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 (1)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN114567519A (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114567519B (en) | Method and device for managing instruction messages of multiple intelligent devices in multithreading parallel | |
CN108848039B (en) | Server, message distribution method and storage medium | |
CN112882813B (en) | Task scheduling method, device and system and electronic equipment | |
CN105577801B (en) | A kind of business accelerating method and device | |
CN101951411A (en) | Cloud scheduling system and method and multistage cloud scheduling system | |
CN102301664B (en) | Method and device for dispatching streams of multicore processor | |
JP2001084195A (en) | Network managing system with event control means | |
CN112965839B (en) | Message transmission method, device, equipment and storage medium | |
KR101416280B1 (en) | Event handling system and method | |
CN113590437B (en) | Alarm information processing method, device, equipment and medium | |
CN110908806A (en) | Mixed flow task management method, device, equipment and storage medium | |
EP1744557A1 (en) | Method and device for shaping the service flow transmitted in network | |
US20060200828A1 (en) | Network element management system and method | |
CN113177179B (en) | Data request connection management method, device, equipment and storage medium | |
CN103428260A (en) | System and method for allocating server to terminal and efficiently delivering messages to the terminal | |
CN108551571B (en) | Monitoring video distribution method, device and system and distribution server | |
US8667205B2 (en) | Deadlock resolution in end-to-end credit protocol | |
CN112910987A (en) | Message pushing method, system, device, equipment and 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 | |
CN113472846B (en) | Message processing method, device, equipment and computer readable storage medium | |
CN114598662A (en) | Message queue cluster federal management system and method | |
CN110134547B (en) | Middleware-based repeated data deleting method and related device | |
CN113190347A (en) | Edge cloud system and task management method | |
CN113810264A (en) | Information transmission method and device, electronic equipment and storage medium |
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 |