CN116320092A - Protocol transmission method, device, electronic equipment and storage medium - Google Patents
Protocol transmission method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116320092A CN116320092A CN202310275513.2A CN202310275513A CN116320092A CN 116320092 A CN116320092 A CN 116320092A CN 202310275513 A CN202310275513 A CN 202310275513A CN 116320092 A CN116320092 A CN 116320092A
- Authority
- CN
- China
- Prior art keywords
- information
- internet
- equipment
- protocol
- things
- 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.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 121
- 238000000034 method Methods 0.000 title claims abstract description 57
- 238000004590 computer program Methods 0.000 claims description 17
- 230000001960 triggered effect Effects 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 claims description 3
- 230000000875 corresponding effect Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- 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
-
- 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
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a protocol transmission method, a protocol transmission device, electronic equipment and a storage medium. The method comprises the following steps: receiving a protocol sent by an Internet of things device, and analyzing the protocol sent by the Internet of things device to obtain protocol information and device information of the Internet of things device; pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result; and transmitting the updated protocol information in the transmission queue to the target equipment. According to the technical scheme, the equipment information of the Internet of things equipment is compared with the historical equipment information in the sending queue, and then the equipment information in the sending queue is updated based on the comparison result, so that the problems of protocol information retransmission and multiple times can be avoided, protocol anti-shake is realized, and system stability is improved.
Description
Technical Field
The present invention relates to the field of internet of things, and in particular, to a protocol transmission method, a device, an electronic apparatus, and a storage medium.
Background
Along with the development and perfection of the internet of things technology, more and more internet of things devices get rid of the traditional single-machine operation mode and are connected with other devices and servers through a network.
The internet of things equipment can inform the server of the state of the internet of things equipment through an uploading protocol, and the server actively controls and monitors the state of the internet of things equipment through a sending protocol. The device state information stored by the server can be displayed at the front end, and when the device state changes, the content displayed at the front end can also be changed in time. The interconnection and intercommunication of people, machines and objects at any time and any place are realized, and all the devices which can be independently addressed form an interconnection and intercommunication network.
In the process of implementing the present invention, the inventor finds that at least the following technical problems exist in the prior art: in the prior art, when the Internet of things equipment fails, the server needs to repeatedly analyze the protocol and make corresponding actions, so that the stable state of the server is destroyed, and the system stability is reduced.
Disclosure of Invention
The invention provides a protocol transmission method, a protocol transmission device, electronic equipment and a storage medium, so as to improve system stability.
According to an aspect of the present invention, there is provided a protocol transmission method, applied to a server, including:
receiving a protocol sent by an Internet of things device, and analyzing the protocol sent by the Internet of things device to obtain protocol information and device information of the Internet of things device;
pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result;
and transmitting the updated protocol information in the transmission queue to the target equipment.
According to another aspect of the present invention, there is provided a protocol transmission apparatus applied to a server, including:
the protocol analysis module is used for receiving a protocol sent by the Internet of things equipment, and analyzing the protocol sent by the Internet of things equipment to obtain protocol information and equipment information of the Internet of things equipment;
the queue updating module is used for pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result;
and the information sending module is used for sending the updated protocol information in the sending queue to the target equipment.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the protocol transmission method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a protocol transmission method according to any embodiment of the present invention.
According to the technical scheme, the protocol sent by the Internet of things equipment is received and analyzed to obtain the equipment information of the Internet of things equipment, the equipment information of the Internet of things equipment is pushed to the sending queue, the equipment information of the Internet of things equipment is compared with the historical equipment information in the sending queue, the equipment information in the sending queue is updated based on the comparison result, the problems of protocol information retransmission and multiple times can be avoided, protocol anti-shake is achieved, and therefore system stability is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a protocol transmission method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a protocol transmission method according to a second embodiment of the present invention;
fig. 3 is a flow chart of a protocol parsing according to a second embodiment of the invention;
fig. 4 is a flowchart of a protocol transmission method according to a third embodiment of the present invention;
fig. 5 is a schematic flow chart of a protocol anti-jitter method according to a third embodiment of the present invention;
FIG. 6 is a flow chart of a fault notification provided according to a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of a protocol transmission device according to a fourth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device implementing a protocol transmission method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a protocol transmission method provided in an embodiment of the present invention, where the method may be applied to a case where a device prevents protocol jitter in the case of a failure of an internet of things device, and the method may be performed by a protocol transmission device, where the protocol transmission device may be implemented in a form of hardware and/or software, and the protocol transmission device may be configured in a server, and operations of the server may include, but are not limited to, windows, linux, and the like. As shown in fig. 1, the method includes:
s110, receiving a protocol sent by the Internet of things equipment, and analyzing the protocol sent by the Internet of things equipment to obtain protocol information and equipment information of the Internet of things equipment.
In this embodiment, the internet of things device refers to a programmable internet of things device with a data receiving and transmitting function, and may include, but is not limited to, a sensor, a camera, a sound device, and the like.
The server and the internet of things device can communicate through a user datagram protocol (UDP, user Datagram Protocol), the server can receive a protocol sent by the internet of things device, and analyze the protocol sent by the internet of things device through a protocol processing module, so that protocol information and device information of the internet of things device are obtained, wherein the protocol information can be protocol content or trigger information and the like; the device information may include, but is not limited to, a device identification, a protocol number, transmission waiting number information, etc., and the protocol information has an association relationship with the device information.
And S120, pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result.
In this embodiment, the historical device information may include device information of one or more devices of the internet of things.
After the protocol information and the equipment information of the internet of things equipment are obtained, the protocol information and the equipment information of the internet of things equipment can be pushed to a transmission queue together, the equipment information of the internet of things equipment is compared with the historical equipment information in the transmission queue, whether the internet of things equipment transmits the protocol information or not can be determined based on a comparison result, the transmitted protocol information is not repeatedly transmitted, only the counter value is updated, and therefore the problems of protocol retransmission and multiple occurrence can be avoided, protocol anti-shake is achieved, and system stability is improved.
The server analyzes the 000a protocol after receiving the 000a protocol sent by the internet of things device to obtain protocol information and device information of the internet of things device, and pushes the device information of the internet of things device to the sending queue for comparison, so that the device information in the sending queue is updated according to a comparison result.
And S130, transmitting the updated protocol information in the transmission queue to the target equipment.
In this embodiment, the target device refers to an electronic device capable of receiving protocol information, and the target device may be, for example, other internet of things devices or clients.
The server may send the protocol information in the updated sending queue to other target devices such as the internet of things device or the client, and may display or control the other internet of things devices through the front end interface.
In some optional embodiments, receiving a protocol sent by an internet of things device includes: receiving a protocol sent by the Internet of things equipment under the condition that the Internet of things equipment is triggered; and/or receiving a protocol sent by the internet of things device under the condition that a physical key of the internet of things device is pressed; and/or receiving the protocol sent by the internet of things equipment under the condition that the internet of things equipment receives the protocol issued by the server.
The internet of things device may be a device in a station fire automatic alarm system, specifically, in a case that a device in the station fire automatic alarm system is triggered, a physical key is pressed, or a protocol issued by a server is received, the triggering device may generate a fire alarm triggering protocol, and send the fire alarm triggering protocol to the server through a UDP protocol, so that the server receives the protocol sent by the internet of things.
In some embodiments, the server may actively issue a protocol to the internet of things device according to the configuration and operation of the client or the protocol uploaded by other electronic devices, so as to control the state of the internet of things device.
According to the technical scheme, the protocol sent by the Internet of things equipment is received and analyzed to obtain the protocol information and the equipment information of the Internet of things equipment, the protocol information and the equipment information of the Internet of things equipment are pushed to the sending queue, the equipment information of the Internet of things equipment is compared with the historical equipment information in the sending queue, and the protocol information in the sending queue is updated based on the comparison result, so that the problems of protocol information retransmission and multiple times can be avoided, protocol anti-shake is realized, and the system stability is improved.
Example two
Fig. 2 is a flowchart of a protocol transmission method according to a second embodiment of the present invention, where the method according to the present embodiment may be combined with each of the alternatives in the protocol transmission method provided in the foregoing embodiment. The protocol transmission method provided by the embodiment is further optimized. Optionally, the device information of the internet of things device includes one or more of internet of things device identification, protocol number and transmission waiting times information.
As shown in fig. 2, the method includes:
s210, receiving a protocol sent by the Internet of things equipment, and analyzing the protocol sent by the Internet of things equipment to obtain protocol information and equipment information of the Internet of things equipment, wherein the equipment information of the Internet of things equipment comprises one or more of an Internet of things equipment identifier, a protocol number and sending waiting times information.
The internet of things device identifier refers to information capable of distinguishing internet of things devices, and has uniqueness, for example, the internet of things device identifier can be 0001, 0002 and the like. The protocol number refers to a number of a transmission protocol, for example, the protocol number may be 000a, 000b, or the like. The transmission wait number information is a count value of the transmission wait number of the device information, in other words, the transmission wait number information is a counter value, for example, the transmission wait number information may be 5 or the like.
S220, pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result.
Based on the above embodiments, optionally, comparing the device information of the internet of things device with the historical device information in the transmission queue, and updating the device information in the transmission queue based on the comparison result includes: if the equipment information of the internet of things equipment is the same as the internet of things equipment identification and/or the protocol number in the historical equipment information in the transmission queue, the transmission waiting times information in the historical equipment information in the transmission queue is updated into the transmission waiting times information in the equipment information of the internet of things equipment.
For example, the identifier of the internet of things device corresponding to the internet of things device may be 0001, the protocol number may be 000a, the information of the transmission waiting times may be 5, the protocol content may be that the control device number 0003 device outputs music, if the identifier of the internet of things device exists in the transmission queue and is 0001, the information of the transmission waiting times is 2, the protocol content is that the historical device information of the control device number 0003 device outputs music, it indicates that the internet of things device has previously transmitted the protocol, and the information of the transmission waiting times is updated without repeated transmission, and other information is unchanged, thereby avoiding the situation of repeated transmission of the protocol and reducing protocol jitter.
Based on the above embodiments, optionally, comparing the device information of the internet of things device with the historical device information in the transmission queue, and updating the device information in the transmission queue based on the comparison result includes: and if the equipment information of the Internet of things equipment is different from the Internet of things equipment identification and/or the protocol number in the historical equipment information in the transmission queue, adding the equipment information of the Internet of things equipment in the transmission queue into the transmission queue.
For example, the identifier of the internet of things device corresponding to the internet of things device may be 0001, the protocol number may be 000a, the information of the number of transmission waiting times may be 5, the protocol content may be that the control device number 0003 device outputs music, and if the identifier of the internet of things device is 0001 and the historical device information of the protocol number 000a does not exist in the transmission queue, the device information of the internet of things device is added into the transmission queue.
And S230, transmitting the updated protocol information in the transmission queue to the target equipment.
Fig. 3 is a schematic flow chart of protocol parsing according to the present embodiment. Under the conditions that the Internet of things equipment is offline, fails or receives a front-end instruction, the server obtains a corresponding offline protocol, hardware protocol or server protocol, and further analyzes the offline protocol, the hardware protocol or the server protocol in a protocol processing module to obtain protocol information and equipment information of the Internet of things equipment. Further, judging whether the counter value in the equipment information is equal to 0, and if the counter value in the equipment information is equal to 0, transmitting the protocol information to other Internet of things equipment or the front end through a protocol transmitting module; if the counter value in the equipment information is not equal to 0, comparing the Internet of things equipment identification and the protocol number in the equipment information of the Internet of things equipment with the historical equipment information in the transmission queue; if the equipment information of the Internet of things equipment is the same as the Internet of things equipment identification and the protocol number in the historical equipment information in the transmission queue, the counter value is updated, and if the equipment information of the Internet of things equipment is different from the Internet of things equipment identification and the protocol number in the historical equipment information in the transmission queue, the equipment information of the Internet of things equipment is stored in the transmission queue.
In some alternative embodiments, the protocol does not require an anti-jitter function, and the counter value may be set to 0. In other words, when the counter is 0, the server may directly push the protocol information to the protocol transmission module after the parsing is completed.
According to the technical scheme, the equipment identification and/or the protocol number in the equipment information of the Internet of things are compared with the historical equipment information in the transmission queue, if the equipment information of the Internet of things is identical with the equipment identification and/or the protocol number in the historical equipment information in the transmission queue, the transmission waiting time information in the historical equipment information in the transmission queue is updated to the transmission waiting time information in the equipment information of the Internet of things, repeated transmission is not needed, and the transmission waiting time information is updated, so that the situation of repeated transmission of a protocol is avoided, protocol jitter is reduced, and system stability is improved.
Example III
Fig. 4 is a flowchart of a protocol transmission method according to a third embodiment of the present invention, where the method according to the present embodiment may be combined with each of the alternatives in the protocol transmission method provided in the foregoing embodiment. The protocol transmission method provided by the embodiment is further optimized. Optionally, the sending the updated protocol information in the sending queue to the target device includes: traversing the equipment information in the updated transmission queue, wherein the equipment information in the updated transmission queue comprises the equipment information of at least one piece of internet of things equipment, and transmitting the protocol information of the internet of things equipment to the target equipment under the condition that the timer value corresponding to the equipment information of the internet of things equipment is zero.
As shown in fig. 4, the method includes:
s310, receiving a protocol sent by the Internet of things equipment, and analyzing the protocol sent by the Internet of things equipment to obtain protocol information and equipment information of the Internet of things equipment.
S320, pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result.
S330, traversing the device information in the updated transmission queue, wherein the device information in the updated transmission queue comprises the device information of at least one Internet of things device.
And S340, transmitting the protocol information of the Internet of things equipment to the target equipment under the condition that the timer value corresponding to the equipment information of the Internet of things equipment is zero.
Fig. 5 is a schematic flow chart of protocol anti-jitter according to the present embodiment. The server is internally provided with a timer which can be used for traversing the updated device information in the transmission queue at regular time. When traversing the updated device information in the transmission queue, firstly, performing a decrementing operation on the counter, if the counter is larger than zero, operating the device information of the next internet of things device in the updated device information in the transmission queue, and if the counter is zero, removing the device information of the current internet of things device from the transmission queue and transmitting the protocol information corresponding to the current internet of things device to the target device.
In some alternative embodiments, the protocol information further includes a fault hint identification; correspondingly, after pushing the device information of the internet of things device to the sending queue, the method further comprises the following steps: and under the condition that the fault prompt identifier is detected, generating a fault report of the Internet of things equipment, and sending the fault report of the Internet of things equipment to the target equipment.
Fig. 6 is a schematic flow chart of a fault notification provided in this embodiment. The protocol information carrying the fault prompt identifier can generate a fault report of the Internet of things equipment after entering the transmission queue, the fault report can be transmitted to the front end or other target equipment such as the Internet of things equipment, and the fault report is not regenerated when the subsequent transmission queue is updated, so that the effect that the fault report and the protocol jitter prevention are simultaneously met can be achieved.
According to the technical scheme, the updated device information in the transmission queue is traversed, and then the protocol information of the Internet of things device is transmitted to the target device under the condition that the timer value corresponding to the device information of the Internet of things device is zero, so that the problems of retransmission and multiple transmission of the protocol information can be avoided, protocol anti-shake is achieved, and therefore system stability is improved.
Example IV
Fig. 7 is a schematic structural diagram of a protocol transmission device according to a fourth embodiment of the present invention. As shown in fig. 7, the apparatus includes:
the protocol analysis module 410 is configured to receive a protocol sent by an internet of things device, and analyze the protocol sent by the internet of things device to obtain protocol information and device information of the internet of things device;
the queue updating module 420 is configured to push the protocol information and the device information of the internet of things device to a sending queue, compare the device information of the internet of things device with the historical device information in the sending queue, and update the device information in the sending queue based on a comparison result;
and the information sending module 430 is configured to send the updated protocol information in the sending queue to the target device.
According to the technical scheme, the protocol sent by the Internet of things equipment is received, and is analyzed to obtain protocol information and equipment information of the Internet of things equipment; pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result; the updated protocol information in the transmission queue is transmitted to the target equipment, so that the problems of retransmission and multiple transmission of the protocol information can be avoided, protocol anti-jitter is realized, and the system stability is improved.
In some alternative embodiments, the protocol parsing module 410 is further configured to:
receiving a protocol sent by the Internet of things equipment under the condition that the Internet of things equipment is triggered;
and/or receiving a protocol sent by the internet of things device under the condition that the physical key of the internet of things device is pressed;
and/or receiving the protocol sent by the internet of things equipment under the condition that the internet of things equipment receives the protocol issued by the server.
In some optional embodiments, the device information of the internet of things device includes one or more of an internet of things device identifier, a protocol number, and transmission waiting times information.
In some alternative embodiments, the queue update module 420 is further configured to:
and if the equipment information of the Internet of things equipment is the same as the Internet of things equipment identification and/or the protocol number in the historical equipment information in the transmission queue, updating the transmission waiting times information in the historical equipment information in the transmission queue into the transmission waiting times information in the equipment information of the Internet of things equipment.
In some alternative embodiments, the queue update module 420 is further configured to:
and if the equipment information of the Internet of things equipment is different from the Internet of things equipment identification and/or the protocol number in the historical equipment information in the transmission queue, adding the equipment information of the Internet of things equipment in the transmission queue into the transmission queue.
In some alternative embodiments, the information sending module 430 is further configured to:
traversing the equipment information in the updated transmission queue, wherein the equipment information in the updated transmission queue comprises the equipment information of at least one Internet of things equipment;
and under the condition that the timer value corresponding to the equipment information of the Internet of things equipment is zero, transmitting the protocol information of the Internet of things equipment to target equipment.
In some optional embodiments, the protocol information further includes a fault hint identification; the protocol transmission apparatus further includes:
and the fault report sending module is used for generating a fault report of the Internet of things equipment and sending the fault report of the Internet of things equipment to target equipment under the condition that the fault prompt identifier is detected.
The protocol transmission device provided by the embodiment of the invention can execute the protocol transmission method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 8 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (e.g., helmets, eyeglasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 8, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An I/O interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a protocol transmission method, which includes:
receiving a protocol sent by an Internet of things device, and analyzing the protocol sent by the Internet of things device to obtain protocol information and device information of the Internet of things device;
pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result;
and transmitting the updated protocol information in the transmission queue to the target equipment.
In some embodiments, the protocol transmission method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the protocol transmission method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the protocol transmission method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. A protocol transmission method, applied to a server, comprising:
receiving a protocol sent by an Internet of things device, and analyzing the protocol sent by the Internet of things device to obtain protocol information and device information of the Internet of things device;
pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result;
and transmitting the updated protocol information in the transmission queue to the target equipment.
2. The method of claim 1, wherein the receiving the protocol sent by the internet of things device comprises:
receiving a protocol sent by the Internet of things equipment under the condition that the Internet of things equipment is triggered;
and/or receiving a protocol sent by the internet of things device under the condition that the physical key of the internet of things device is pressed;
and/or receiving the protocol sent by the internet of things equipment under the condition that the internet of things equipment receives the protocol issued by the server.
3. The method of claim 1, wherein the device information of the internet of things device includes one or more of internet of things device identification, protocol number, and transmission wait number information.
4. The method of claim 3, wherein comparing the device information of the internet of things device with the historical device information in the transmit queue, and updating the device information in the transmit queue based on the comparison result, comprises:
and if the equipment information of the Internet of things equipment is the same as the Internet of things equipment identification and/or the protocol number in the historical equipment information in the transmission queue, updating the transmission waiting times information in the historical equipment information in the transmission queue into the transmission waiting times information in the equipment information of the Internet of things equipment.
5. The method of claim 3, wherein comparing the device information of the internet of things device with the historical device information in the transmit queue, and updating the device information in the transmit queue based on the comparison result, comprises:
and if the equipment information of the Internet of things equipment is different from the Internet of things equipment identification and/or the protocol number in the historical equipment information in the transmission queue, adding the equipment information of the Internet of things equipment in the transmission queue into the transmission queue.
6. The method of claim 1, wherein the transmitting the updated protocol information in the transmit queue to the target device comprises:
traversing the equipment information in the updated transmission queue, wherein the equipment information in the updated transmission queue comprises the equipment information of at least one Internet of things equipment;
and under the condition that the timer value corresponding to the equipment information of the Internet of things equipment is zero, transmitting the protocol information of the Internet of things equipment to target equipment.
7. The method of claim 1, wherein the protocol information further comprises a fault hint identification;
correspondingly, after pushing the protocol information and the device information of the internet of things device to a transmission queue, the method further comprises:
and under the condition that the fault prompt identifier is detected, generating a fault report of the Internet of things equipment, and sending the fault report of the Internet of things equipment to target equipment.
8. A protocol transmission apparatus, applied to a server, comprising:
the protocol analysis module is used for receiving a protocol sent by the Internet of things equipment, and analyzing the protocol sent by the Internet of things equipment to obtain protocol information and equipment information of the Internet of things equipment;
the queue updating module is used for pushing the protocol information and the equipment information of the Internet of things equipment to a sending queue, comparing the equipment information of the Internet of things equipment with the historical equipment information in the sending queue, and updating the equipment information in the sending queue based on a comparison result;
and the information sending module is used for sending the updated protocol information in the sending queue to the target equipment.
9. An electronic device, the electronic device comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the protocol transmission method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the protocol transmission method of any one of claims 1-7 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310275513.2A CN116320092A (en) | 2023-03-20 | 2023-03-20 | Protocol transmission method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310275513.2A CN116320092A (en) | 2023-03-20 | 2023-03-20 | Protocol transmission method, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116320092A true CN116320092A (en) | 2023-06-23 |
Family
ID=86784750
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310275513.2A Pending CN116320092A (en) | 2023-03-20 | 2023-03-20 | Protocol transmission method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116320092A (en) |
-
2023
- 2023-03-20 CN CN202310275513.2A patent/CN116320092A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114697391A (en) | Data processing method, device, equipment and storage medium | |
CN112838980A (en) | Message processing method, system, device, electronic equipment and storage medium | |
CN114554110B (en) | Video generation method, device, electronic equipment and storage medium | |
CN116320092A (en) | Protocol transmission method, device, electronic equipment and storage medium | |
CN113986135B (en) | Method, device, equipment and storage medium for processing request | |
WO2022142716A1 (en) | Information processing method and apparatus regarding wireless hotspot | |
CN112752323B (en) | Method and device for changing hot spot access state | |
CN115391158A (en) | Time delay determination method, system and device and electronic equipment | |
CN114915516A (en) | Communication method and device | |
CN113676746B (en) | Method, apparatus, device and medium for detecting live broadcast jitter | |
CN114500438B (en) | File sharing method and device, electronic equipment and storage medium | |
CN114422638B (en) | Cloud mobile phone control method, device, equipment, medium and program product | |
CN116225941A (en) | Page detection method and device, electronic equipment and storage medium | |
CN117749614A (en) | Protocol rule determining method and device, electronic equipment and storage medium | |
CN117389594A (en) | Firmware upgrading method and device, electronic equipment and storage medium | |
CN117156095A (en) | External device control method, device, equipment and medium of video conference terminal | |
CN117651078A (en) | Data transmission method and device, electronic equipment and storage medium | |
CN117319379A (en) | Unidirectional file transmission method, unidirectional file transmission device, unidirectional file transmission equipment and unidirectional file transmission medium | |
CN115658341A (en) | Method, device, equipment and medium for reading and writing data by Freeswitch | |
CN116339745A (en) | Method, device, equipment and storage medium for analyzing communication data between equipment | |
CN114416040A (en) | Page construction method, device, equipment and storage medium | |
CN117193825A (en) | Method and device for calling update function, electronic equipment and storage medium | |
CN116633881A (en) | Bandwidth control method, device, equipment and medium | |
CN118118386A (en) | Link delay detection method, device, equipment and storage medium | |
CN116582387A (en) | Message sending method, device and equipment |
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 |