CN111447227B - Protocol analysis method and device of Internet of things equipment - Google Patents

Protocol analysis method and device of Internet of things equipment Download PDF

Info

Publication number
CN111447227B
CN111447227B CN202010230586.6A CN202010230586A CN111447227B CN 111447227 B CN111447227 B CN 111447227B CN 202010230586 A CN202010230586 A CN 202010230586A CN 111447227 B CN111447227 B CN 111447227B
Authority
CN
China
Prior art keywords
script file
target
internet
equipment
things 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
Application number
CN202010230586.6A
Other languages
Chinese (zh)
Other versions
CN111447227A (en
Inventor
邓宏
陈峰峰
袁伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Hongmei Intelligent Technology Co Ltd
Original Assignee
Sichuan Hongmei Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sichuan Hongmei Intelligent Technology Co Ltd filed Critical Sichuan Hongmei Intelligent Technology Co Ltd
Priority to CN202010230586.6A priority Critical patent/CN111447227B/en
Publication of CN111447227A publication Critical patent/CN111447227A/en
Application granted granted Critical
Publication of CN111447227B publication Critical patent/CN111447227B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

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 provides a protocol analysis method and a device of Internet of things equipment, wherein the method comprises the following steps: a script file library is constructed in advance, the script file library comprises a plurality of script files, and each script file correspondingly analyzes a protocol format; after the reported data sent by the target Internet of things equipment terminal is received, searching a target script file corresponding to the protocol format used by the target Internet of things equipment terminal in a script file library; analyzing the reported data into a general format by using a target script file; and sending the reported data analyzed into the general format to a control end. According to the scheme, the script file is used for analyzing the reported data sent by the equipment end of the Internet of things, and even if new equipment of the Internet of things is added, only the corresponding script file needs to be added into the script file library, and the script file is an independent file, so that the script file is deleted, other script files cannot be influenced, and the analysis efficiency can be improved.

Description

Protocol analysis method and device of Internet of things equipment
Technical Field
The invention relates to the technical field of Internet of things, in particular to a protocol analysis method and device for Internet of things equipment.
Background
With the rapid development of the internet of things technology, the types of the internet of things equipment are more and more, including refrigerators, air conditioners, air purifiers, washing machines and the like, and when data interaction is performed between an equipment control end and an internet of things equipment end, a cloud platform is required to be used as an intermediate platform for data forwarding service. When different types of internet of things equipment report data to the cloud platform, the used protocol formats are different, the cloud platform needs to analyze the reported data into a general format according to the corresponding protocol format, and then sends the reported data in the general format to the equipment control terminal.
At present, when new equipment is added, a cloud platform needs to modify analysis codes to adapt to the added new equipment, and the cloud platform needs to be redeployed and tested after the analysis codes are modified, so that the process is not only inefficient, but also may affect the analysis process of old equipment.
Disclosure of Invention
The embodiment of the invention provides a protocol analysis method and device for Internet of things equipment, and aims to solve the problem that when new equipment is added, a cloud platform needs to modify analysis codes, so that the influence is caused.
In a first aspect, the present invention provides a protocol analysis method for an internet of things device, which is applied to a cloud platform and includes:
a script file library is constructed in advance, wherein the script file library comprises a plurality of script files, and each script file correspondingly analyzes a protocol format;
after the reported data sent by the target Internet of things equipment terminal is received, searching a target script file corresponding to the protocol format used by the target Internet of things equipment terminal in the script file library;
analyzing the reported data into a general format by using the target script file;
and sending the reported data analyzed into the general format to a control end.
Preferably, the building of the script file library includes:
determining first internet of things equipment terminals needing to be served by the cloud platform, determining the equipment class and the corresponding equipment model of each first internet of things equipment terminal, and determining whether a protocol used by each first internet of things equipment terminal belongs to a universal format or not according to the equipment class and the corresponding equipment model of each first internet of things equipment terminal;
aiming at each second networking equipment terminal which does not belong to the universal format, a visual interface configuration module is adopted to respectively describe the information of the protocol document corresponding to the equipment class to which each second networking equipment terminal belongs by using a JavaScript language;
further determining whether the equipment model corresponding to the second Internet of things equipment terminal is a special equipment model, and adopting a visual interface configuration module to respectively describe the information of the protocol document corresponding to the equipment model corresponding to each third Internet of things equipment terminal by using a JavaScript language aiming at the third Internet of things equipment terminal corresponding to the special equipment model;
and respectively saving the information of the protocol documents described above as corresponding script files in a script file library.
Preferably, the searching for the target script file corresponding to the protocol format used by the target internet of things device side in the script file library includes:
determining the target equipment category of the target Internet of things equipment terminal and the corresponding target equipment model; searching whether a script file corresponding to the target equipment model exists in the script file library, and if so, determining the script file corresponding to the target equipment model as the target script file; if not, searching whether the script file corresponding to the target equipment class exists in the script file library, and if so, determining the script file corresponding to the target equipment class as the target script file.
Preferably, further comprising: and when the target script file corresponding to the protocol format used by the target Internet of things equipment end is not found in the script file library, directly sending the reported data sent by the target Internet of things equipment end to the control end.
Preferably, before searching the target script file corresponding to the protocol format used by the target internet of things device side in the script file library, the method further includes: searching whether a target analysis object corresponding to a protocol format used by the target Internet of things equipment end is stored, if so, analyzing the reported data into a general format by using the target analysis object, executing the reported data analyzed into the general format and sending the reported data to a control end, and if not, executing the target script file corresponding to the protocol format used by the target Internet of things equipment end to be searched in the script file library;
the analyzing the reported data into a general format by using the target script file comprises the following steps: compiling the target script file into an analysis object, and analyzing the reported data into a general format by using the compiled analysis object;
after the analyzing the reported data into a general format by using the target script file, the method further includes: and storing the corresponding relation between the analysis object compiled by the target script file and the target Internet of things equipment terminal.
In a second aspect, the present invention further provides a protocol analysis device for an internet of things device, which is located in a cloud platform, and includes:
the script file constructing unit is used for constructing a script file library in advance, the script file library comprises a plurality of script files, and each script file correspondingly analyzes a protocol format;
the searching unit is used for searching a target script file corresponding to a protocol format used by a target Internet of things equipment end in the script file library after receiving reported data sent by the target Internet of things equipment end;
the analysis unit is used for analyzing the reported data into a general format by using the target script file;
and the sending unit is used for sending the reported data analyzed into the general format to the control end.
Preferably, the script file constructing unit is specifically configured to perform the following operations:
determining first internet of things equipment terminals needing to be served by the cloud platform, determining the equipment category and the corresponding equipment model of each first internet of things equipment terminal, and determining whether a protocol used by each first internet of things equipment terminal belongs to a universal format or not according to the equipment category and the corresponding equipment model of each first internet of things equipment terminal;
aiming at each second networking equipment terminal which does not belong to the universal format, a visual interface configuration module is adopted to respectively describe the information of the protocol document corresponding to the equipment class to which each second networking equipment terminal belongs by using a JavaScript language;
further determining whether the equipment model corresponding to the second Internet of things equipment terminal is a special equipment model, and adopting a visual interface configuration module to respectively describe the information of the protocol document corresponding to the equipment model corresponding to each third Internet of things equipment terminal by using a JavaScript language aiming at the third Internet of things equipment terminal corresponding to the special equipment model;
and respectively saving the information of the protocol documents described above as corresponding script files in a script file library.
Preferably, the search unit is specifically configured to perform the following operations: determining the target equipment category of the target Internet of things equipment terminal and the corresponding target equipment model; searching whether a script file corresponding to the target equipment model exists in the script file library, and if so, determining the script file corresponding to the target equipment model as the target script file; if not, searching whether the script file corresponding to the target equipment category exists in the script file library, and if so, determining the script file corresponding to the target equipment category as the target script file.
Preferably, the searching unit is further configured to directly trigger the sending unit to send the report data sent by the target internet of things device end to the control end when a target script file corresponding to a protocol format used by the target internet of things device end is not found in the script file library.
Preferably, the searching unit is further configured to: before searching a target script file corresponding to a protocol format used by the target Internet of things equipment end in the script file library, searching whether a target analysis object corresponding to the protocol format used by the target Internet of things equipment end is stored, if so, triggering the analysis unit to analyze the reported data into a general format by using the target analysis object, triggering the sending unit to execute the report data analyzed into the general format and send the report data to the control end, and if not, executing the target script file corresponding to the protocol format used by the target Internet of things equipment end in the script file library;
the analysis unit is specifically configured to compile the target script file into an analysis object, and analyze the reported data into a general format by using the compiled analysis object;
further comprising: a storage unit; and after the target script file is used for analyzing the reported data into a general format, the analysis unit stores the corresponding relation between the analysis object compiled by the target script file and the target internet of things equipment end into the storage unit.
The embodiment of the invention provides a protocol analysis method and device for Internet of things equipment.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a protocol analysis method for an internet of things device according to an embodiment of the present invention;
fig. 2 is a flowchart of a protocol parsing method for another internet of things device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a protocol analysis device of an internet of things device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a protocol analysis device of another internet of things device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a protocol analysis method for an internet of things device, which is applied to a cloud platform, and includes:
step 101: a script file library is constructed in advance, wherein the script file library comprises a plurality of script files, and each script file correspondingly analyzes a protocol format;
step 102: after the reported data sent by the target Internet of things equipment terminal is received, searching a target script file corresponding to the protocol format used by the target Internet of things equipment terminal in the script file library;
step 103: analyzing the reported data into a general format by using the target script file;
step 104: and sending the reported data analyzed into the general format to a control end.
In the embodiment of the invention, the script file library is constructed in advance, each script file correspondingly analyzes a protocol format, and the script files are used for analyzing the reported data sent by the equipment end of the internet of things, so that even if new equipment of the internet of things is added, only corresponding script files are required to be added into the script file library, and the script files are independent files, so that the script files are deleted, other script files are not influenced, and the analysis efficiency is improved.
In order to build a script file library on a cloud platform, in an embodiment of the present invention, the script file library can be implemented at least in one of the following ways: determining first internet of things equipment terminals needing to be served by the cloud platform, determining the equipment class and the corresponding equipment model of each first internet of things equipment terminal, and determining whether a protocol used by each first internet of things equipment terminal belongs to a universal format or not according to the equipment class and the corresponding equipment model of each first internet of things equipment terminal;
aiming at each second networking equipment terminal which does not belong to the universal format, a visual interface configuration module is adopted to respectively describe the information of the protocol document corresponding to the equipment class to which each second networking equipment terminal belongs by using a JavaScript language;
further determining whether the equipment model corresponding to the second Internet of things equipment terminal is a special equipment model, and adopting a visual interface configuration module to respectively describe the information of the protocol document corresponding to the equipment model corresponding to each third Internet of things equipment terminal by using a JavaScript language aiming at the third Internet of things equipment terminal corresponding to the special equipment model;
and respectively saving the information of the protocol documents described above as corresponding script files in a script file library.
The cloud platform can provide services for internet of things equipment ends of various different types, and each additional internet of things equipment end needs to be registered on the cloud platform so that the cloud platform can provide services for the equipment, so that the cloud platform can determine the major class of equipment to which each internet of things equipment end belongs and the corresponding equipment model, for example, an air conditioner with the model of KFR-35GW/(35595) FNhAA-A1 is newly added, the major class of equipment to which the equipment belongs is an air conditioner, and the corresponding equipment model of the air conditioner is KFR-35GW/(35595) FNhAA-A1.
Generally, the protocol formats adopted by the internet of things equipment terminals under the same equipment category are the same, and the protocol formats possibly adopted by the internet of things equipment terminals of special models are slightly different, so that one script file can be set for the equipment category to which the equipment belongs, and the corresponding script file is set for the internet of things equipment terminals of special models. The construction of the script file can be configured by a visual interface configuration module (UI).
The language used by the script file may be ASP, PHP, CGI, JSP, or the like, and in order to ensure the familiarity of the user with the language used and facilitate writing of the script file, in this embodiment, a JavaScript language may be used to describe information of a protocol document corresponding to a device model corresponding to a device class to which the device side of the internet of things belongs.
Specifically, when a target script file corresponding to a protocol format used by the target internet of things device end is searched in a script file library, the target device class and the corresponding target device model of the target internet of things device end may be determined first; searching whether a script file corresponding to the target equipment model exists in the script file library, and if so, determining the script file corresponding to the target equipment model as the target script file; if not, searching whether the script file corresponding to the target equipment category exists in the script file library, and if so, determining the script file corresponding to the target equipment category as the target script file.
Whether a script file corresponding to a target device signal exists or not is firstly searched, and then whether a script file corresponding to a target device model exists or not is searched, so that the accuracy of analysis of reported data of the target Internet of things device side can be guaranteed.
In an embodiment of the present invention, when a target script file corresponding to a protocol format used by the target internet of things device is not found in the script file library, it indicates that the protocol format used by the target internet of things device is a general format, and the report data sent by the target internet of things device is directly sent to the control end.
When the script file is used to analyze the reported data, the script file needs to be started, the protocol document information in the script file needs to be compiled, and the compiled analysis object is used to analyze the reported data, and the script file needs to be compiled into the analysis object each time, so in an embodiment of the present invention, before searching for the target script file corresponding to the protocol format used by the target internet of things device side in the script file library, the method further includes: searching whether a target analysis object corresponding to a protocol format used by the target Internet of things equipment end is stored, if so, analyzing the reported data into a general format by using the target analysis object, executing the reported data analyzed into the general format and sending the reported data to a control end, and if not, executing the target script file corresponding to the protocol format used by the target Internet of things equipment end to be searched in the script file library;
the analyzing the reported data into a general format by using the target script file comprises the following steps: compiling the target script file into an analysis object, and analyzing the reported data into a general format by using the compiled analysis object;
after the analyzing the reported data into a general format by using the target script file, the method further includes: and storing the corresponding relation between the analysis object compiled by the target script file and the target Internet of things equipment terminal. When the target internet of things equipment sends the reported data again, the corresponding analysis object can be directly used for analysis, the script file does not need to be compiled once when the reported data is received every time, and therefore the analysis efficiency is improved.
Referring to fig. 2, an embodiment of the present invention provides a preferred protocol parsing method for an internet of things device, where the method includes the following steps:
step 201: determining first internet of things equipment ends needing to be served by the cloud platform, determining the equipment category and the corresponding equipment model of each first internet of things equipment end, and determining whether a protocol used by each first internet of things equipment end belongs to a universal format or not according to the equipment category and the corresponding equipment model of each first internet of things equipment end.
The Internet of things equipment terminal can register with the cloud platform when joining the Internet of things, connection is established, and the cloud platform is guaranteed to provide services for the Internet of things equipment terminal. For example, a first internet of things device side needing to be served by a cloud platform includes: the device 1, the device 2, and the … … are devices n, n is an integer not less than 1, each device has a device category, i.e., a corresponding device model, for example, the device 1 and the device 2 belong to the same device category refrigerator, and the device 3 belongs to an air conditioner … ….
The protocol format used by each internet of things equipment end can be a general format or a special protocol format, and the applicable protocol format can be put on record to the cloud platform.
Step 202: aiming at each second networking equipment terminal which does not belong to the universal format, a visual interface configuration module is adopted to respectively describe the information of the protocol document corresponding to the equipment class to which each second networking equipment terminal belongs by using JavaScript language.
In step 201, it is determined that the second networking device side that does not belong to the common format can use a visual interface configuration module (UI) to configure the script file.
Step 203: and determining whether the equipment model corresponding to the second Internet of things equipment terminal is a special equipment model, and adopting a visual interface configuration module to respectively describe the information of the protocol document corresponding to the equipment model corresponding to each third Internet of things equipment terminal by using a JavaScript language aiming at the third Internet of things equipment terminal corresponding to the special equipment model.
Similarly, for the equipment end of the internet of things with a special equipment model, the information of the corresponding protocol document is configured for the equipment end of the internet of things with the special equipment model.
Step 204: and respectively saving the information of the protocol document described above as corresponding script files in a script file library.
The script file library stores the corresponding relation between the device categories and the script files and the corresponding relation between the corresponding device models and the script files.
It should be noted that, in order to store the script file efficiently and facilitate searching, the constructed script file library may be stored in the Hashmap database.
Step 205: after reported data sent by a target Internet of things equipment terminal are received, the type of the target equipment and the corresponding model of the target equipment, to which the target Internet of things equipment terminal belongs, are determined.
For example, the target equipment of the target Internet of things equipment side is an air conditioner, and the model of the target equipment is KFR-35GW/(35595) FNhAA-A1.
Step 206: searching whether a target analysis object corresponding to a protocol format used by a target Internet of things equipment end is stored, if so, analyzing the reported data into a general format by using the target analysis object, and executing a step 210, otherwise, executing a step 207;
in this embodiment, if the target analysis object is found in the memory, it indicates that the cloud platform does not receive and receive the report data sent by the target internet of things device for the first time, and the report data sent by the target internet of things device is already analyzed by using the script file in the script literal; if the target analysis object is not found in the memory, the cloud platform is indicated to receive the reported data sent by the target Internet of things equipment for the first time.
Step 207: and searching whether a script file corresponding to the target equipment model exists in the script file library, if so, determining the script file corresponding to the target equipment model as the target script file, and if not, executing the step 208.
Step 208: and searching whether a script file corresponding to the target equipment category exists in the script file library, if so, determining the script file corresponding to the target equipment category as the target script file, and executing step 209, otherwise, determining the protocol format used by the target internet of things equipment end as a general format, and executing step 210.
Step 209: compiling the corresponding target analysis object of the target script file, analyzing the reported data into a general format by using the target analysis object, storing the corresponding relation between the target analysis object and the target internet of things equipment end in a memory, and executing step 210.
Step 210: and sending the reported data in the general format to a control end.
Referring to fig. 3, a protocol analysis device for an internet of things device according to an embodiment of the present invention is located in a cloud platform, and includes:
a script file constructing unit 301, configured to construct a script file library in advance, where the script file library includes a plurality of script files, and each script file correspondingly analyzes a protocol format;
a searching unit 302, configured to search, after receiving the report data sent by the target internet of things device, a target script file corresponding to a protocol format used by the target internet of things device in the script file library;
an analyzing unit 303, configured to analyze the reported data into a general format by using the target script file;
a sending unit 304, configured to send the report data parsed into the common format to a control end.
In an embodiment of the present invention, the script file constructing unit is specifically configured to perform the following operations:
determining first internet of things equipment terminals needing to be served by the cloud platform, determining the equipment category and the corresponding equipment model of each first internet of things equipment terminal, and determining whether a protocol used by each first internet of things equipment terminal belongs to a universal format or not according to the equipment category and the corresponding equipment model of each first internet of things equipment terminal;
aiming at each second networking equipment terminal which does not belong to the universal format, a visual interface configuration module is adopted to respectively describe the information of the protocol document corresponding to the equipment class to which each second networking equipment terminal belongs by using a JavaScript language;
further determining whether the equipment model corresponding to the second Internet of things equipment terminal is a special equipment model, and adopting a visual interface configuration module to respectively describe the information of the protocol document corresponding to the equipment model corresponding to each third Internet of things equipment terminal by using a JavaScript language aiming at the third Internet of things equipment terminal corresponding to the special equipment model;
and respectively saving the information of the protocol documents described above as corresponding script files in a script file library.
In an embodiment of the present invention, the search unit is specifically configured to perform the following operations: determining the target equipment category of the target Internet of things equipment terminal and the corresponding target equipment model; searching whether a script file corresponding to the target equipment model exists in the script file library, and if so, determining the script file corresponding to the target equipment model as the target script file; if not, searching whether the script file corresponding to the target equipment category exists in the script file library, and if so, determining the script file corresponding to the target equipment category as the target script file.
In an embodiment of the present invention, the searching unit is further configured to directly trigger the sending unit to send the report data sent by the target internet of things device to the control terminal when a target script file corresponding to a protocol format used by the target internet of things device is not found in the script file library.
In an embodiment of the present invention, the search unit is further configured to: before searching a target script file corresponding to a protocol format used by the target Internet of things equipment end in the script file library, searching whether a target analysis object corresponding to the protocol format used by the target Internet of things equipment end is stored, if so, triggering the analysis unit to analyze the reported data into a general format by using the target analysis object, triggering the sending unit to execute the report data analyzed into the general format and send the report data to the control end, and if not, executing the target script file corresponding to the protocol format used by the target Internet of things equipment end in the script file library;
the analysis unit is specifically configured to compile the target script file into an analysis object, and analyze the reported data into a general format by using the compiled analysis object;
referring to fig. 4, the protocol parsing apparatus of the internet of things device may further include: a storage unit 401; and after the target script file is used for analyzing the reported data into a general format, the analysis unit stores the corresponding relation between the analysis object compiled by the target script file and the target internet of things equipment end into the storage unit.
In summary, the embodiments of the present invention can at least achieve the following advantages:
1. in the embodiment of the invention, the script file library is constructed in advance, each script file correspondingly analyzes a protocol format, and the script files are used for analyzing the reported data sent by the equipment end of the Internet of things, so that even if new equipment of the Internet of things is added, only corresponding script files are required to be added into the script file library, and the script files are independent files, so that the script files are deleted, other script files are not influenced, and the analysis efficiency is improved.
2. In the embodiment of the invention, the analysis object compiled by the target script file is stored, so that when the report data sent by the equipment end of the Internet of things is received next time, the format analysis can be directly carried out by using the analysis object, and the compiling process of the script file is not required to be started every time of analysis, thereby further improving the analysis efficiency.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps of implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer-readable storage medium, and when executed, executes the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (4)

1. A protocol analysis method of Internet of things equipment is applied to a cloud platform and is characterized by comprising the following steps:
a script file library is constructed in advance, wherein the script file library comprises a plurality of script files, and each script file correspondingly analyzes a protocol format;
after the reported data sent by the target Internet of things equipment terminal is received, searching a target script file corresponding to the protocol format used by the target Internet of things equipment terminal in the script file library;
analyzing the reported data into a general format by using the target script file;
sending the reported data analyzed into a general format to a control end;
wherein, the constructing of the script file library comprises:
determining first internet of things equipment terminals needing to be served by the cloud platform, determining the equipment category and the corresponding equipment model of each first internet of things equipment terminal, and determining whether a protocol used by each first internet of things equipment terminal belongs to a universal format or not according to the equipment category and the corresponding equipment model of each first internet of things equipment terminal;
aiming at each second networking equipment terminal which does not belong to the universal format, a visual interface configuration module is adopted to respectively describe the information of the protocol document corresponding to the equipment class to which each second networking equipment terminal belongs by using JavaScript language;
further determining whether the equipment model corresponding to the second Internet of things equipment terminal is a special equipment model, and adopting a visual interface configuration module to respectively describe the information of the protocol document corresponding to the equipment model corresponding to each third Internet of things equipment terminal by using a JavaScript language aiming at the third Internet of things equipment terminal corresponding to the special equipment model;
in the script file library, the information of the described protocol document is respectively saved as corresponding script files;
wherein, the searching for the target script file corresponding to the protocol format used by the target internet of things device end in the script file library includes: determining the target equipment category of the target Internet of things equipment terminal and the corresponding target equipment model; searching whether a script file corresponding to the target equipment model exists in the script file library, and if so, determining the script file corresponding to the target equipment model as the target script file; if not, searching whether a script file corresponding to the target equipment class exists in the script file library, and if so, determining the script file corresponding to the target equipment class as the target script file;
before searching for a target script file corresponding to a protocol format used by the target internet of things device side in the script file library, the method further includes: searching whether a target analysis object corresponding to a protocol format used by the target Internet of things equipment end is stored, if so, analyzing the reported data into a general format by using the target analysis object, executing the reported data analyzed into the general format and sending the reported data to a control end, and if not, executing the target script file corresponding to the protocol format used by the target Internet of things equipment end to be searched in the script file library;
the analyzing the reported data into a general format by using the target script file comprises the following steps: compiling the target script file into an analysis object, and analyzing the reported data into a general format by using the compiled analysis object;
after the analyzing the reported data into a general format by using the target script file, the method further includes: and storing the corresponding relation between the analysis object compiled by the target script file and the target Internet of things equipment terminal.
2. The protocol parsing method for the internet of things equipment according to claim 1, further comprising: and when the target script file corresponding to the protocol format used by the target Internet of things equipment end is not found in the script file library, directly sending the reported data sent by the target Internet of things equipment end to the control end.
3. The utility model provides a protocol analysis device of thing networking device, is arranged in the cloud platform, its characterized in that includes:
the script file constructing unit is used for constructing a script file library in advance, the script file library comprises a plurality of script files, and each script file correspondingly analyzes a protocol format;
the searching unit is used for searching a target script file corresponding to a protocol format used by a target Internet of things equipment end in the script file library after receiving reported data sent by the target Internet of things equipment end;
the analysis unit is used for analyzing the reported data into a general format by using the target script file;
a sending unit, configured to send the report data parsed into the common format to a control end;
the script file constructing unit is specifically configured to perform the following operations:
determining first internet of things equipment terminals needing to be served by the cloud platform, determining the equipment category and the corresponding equipment model of each first internet of things equipment terminal, and determining whether a protocol used by each first internet of things equipment terminal belongs to a universal format or not according to the equipment category and the corresponding equipment model of each first internet of things equipment terminal;
aiming at each second networking equipment terminal which does not belong to the universal format, a visual interface configuration module is adopted to respectively describe the information of the protocol document corresponding to the equipment class to which each second networking equipment terminal belongs by using a JavaScript language;
further determining whether the equipment model corresponding to the second Internet of things equipment terminal is a special equipment model, and adopting a visual interface configuration module to respectively describe the information of the protocol document corresponding to the equipment model corresponding to each third Internet of things equipment terminal by using a JavaScript language aiming at the third Internet of things equipment terminal corresponding to the special equipment model;
in the script file library, the information of the described protocol document is respectively saved as corresponding script files;
the search unit is specifically configured to perform the following operations: determining the target equipment category of the target Internet of things equipment terminal and the corresponding target equipment model; searching whether a script file corresponding to the target equipment model exists in the script file library, and if so, determining the script file corresponding to the target equipment model as the target script file; if not, searching whether a script file corresponding to the target equipment class exists in the script file library, and if so, determining the script file corresponding to the target equipment class as the target script file;
wherein the search unit is further configured to: before searching a target script file corresponding to a protocol format used by the target Internet of things equipment end in the script file library, searching whether a target analysis object corresponding to the protocol format used by the target Internet of things equipment end is stored, if so, triggering the analysis unit to analyze the reported data into a general format by using the target analysis object, triggering the sending unit to execute the report data analyzed into the general format and send the report data to the control end, and if not, executing the target script file corresponding to the protocol format used by the target Internet of things equipment end in the script file library;
the analysis unit is specifically configured to compile the target script file into an analysis object, and analyze the reported data into a general format by using the compiled analysis object;
further comprising: a storage unit; and after the target script file is used for analyzing the reported data into a general format, the analysis unit stores the corresponding relation between the analysis object compiled by the target script file and the target internet of things equipment end into the storage unit.
4. The protocol analysis device of the internet of things equipment according to claim 3, wherein the search unit is further configured to directly trigger the sending unit to send the report data sent by the target internet of things equipment to the control terminal when a target script file corresponding to a protocol format used by the target internet of things equipment is not found in the script file library.
CN202010230586.6A 2020-03-27 2020-03-27 Protocol analysis method and device of Internet of things equipment Active CN111447227B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010230586.6A CN111447227B (en) 2020-03-27 2020-03-27 Protocol analysis method and device of Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010230586.6A CN111447227B (en) 2020-03-27 2020-03-27 Protocol analysis method and device of Internet of things equipment

Publications (2)

Publication Number Publication Date
CN111447227A CN111447227A (en) 2020-07-24
CN111447227B true CN111447227B (en) 2022-06-21

Family

ID=71649094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010230586.6A Active CN111447227B (en) 2020-03-27 2020-03-27 Protocol analysis method and device of Internet of things equipment

Country Status (1)

Country Link
CN (1) CN111447227B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112087426B (en) * 2020-07-31 2022-07-12 华瑞新智科技(北京)有限公司 Dynamic control protocol analysis method based on Internet of things and IOT (Internet of things) equipment
CN112087468A (en) * 2020-09-18 2020-12-15 国网浙江省电力有限公司 Message processing method, related equipment and readable storage medium
CN112527308A (en) * 2020-11-27 2021-03-19 福建网能科技开发有限责任公司 Interplatform universal protocol parsing method, device and medium based on interpreted language
CN114666417B (en) * 2020-12-04 2024-07-05 北京嗨动视觉科技有限公司 Processing method, device, storage medium and processor for equipment protocol
CN112565443A (en) * 2020-12-08 2021-03-26 中煤航测遥感集团有限公司 Internet of things data analysis method, device, equipment and storage medium
CN113179269B (en) * 2021-04-27 2023-04-28 深圳市麦斯杰网络有限公司 Protocol data analysis method, system and medium based on Internet of things
CN113805867B (en) * 2021-08-24 2024-03-19 中通服咨询设计研究院有限公司 Internet of things platform based on visual static script engine
CN114172974B (en) * 2021-12-07 2024-02-09 北京自如信息科技有限公司 Protocol conversion method, device and system
CN114666426A (en) * 2022-02-11 2022-06-24 深圳市震有智联科技有限公司 Data analysis method, device and storage medium
CN115086443B (en) * 2022-05-27 2024-03-22 广东省离散智造科技创新有限公司 Communication protocol conversion method and system
CN115550436A (en) * 2022-09-06 2022-12-30 深圳前海环融联易信息科技服务有限公司 Data packet format conversion method and device, storage medium and electronic equipment
CN116414438A (en) * 2022-11-03 2023-07-11 重庆旱獭信息技术有限公司 Online protocol data analysis method and system based on Internet of things

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101282333B (en) * 2008-05-22 2012-09-05 上海交通大学 Method for switching information of distributed multiprotocol proxy and center system
CN101989294B (en) * 2009-08-07 2013-02-13 阿里巴巴集团控股有限公司 Distributed file resolving method and resolving system
CN101695032B (en) * 2009-11-02 2011-08-10 中国电信股份有限公司 Unified web client, service configuration method and system thereof
CN101820418B (en) * 2010-03-19 2012-10-24 博康智能网络科技股份有限公司 Universal security equipment control method for extensible protocol and system
CN103825811A (en) * 2013-10-11 2014-05-28 江苏飞尚安全监测咨询有限公司 Implementation scheme for accessing sensor protocol self-identification IOT (internet of things) gateway
CN105491038B (en) * 2015-12-07 2019-01-08 高新兴科技集团股份有限公司 A kind of intelligent equipment protocol analytic method
CN108040040A (en) * 2017-11-30 2018-05-15 北京锐安科技有限公司 A kind of automation analysis method and device of application protocol message
CN110569250B (en) * 2019-08-12 2022-04-01 青岛聚好联科技有限公司 Management method and device for analysis library of Internet of things network element
CN110661820B (en) * 2019-12-02 2020-04-28 武汉慧联无限科技有限公司 Internet of things data processing method and device, equipment and storage medium

Also Published As

Publication number Publication date
CN111447227A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN111447227B (en) Protocol analysis method and device of Internet of things equipment
CN108491331B (en) Software testing method, device, equipment and computer storage medium
CN107453960B (en) Method, device and system for processing test data in service test
US8869111B2 (en) Method and system for generating test cases for a software application
CN110597651A (en) Method, device and equipment for troubleshooting business anomaly and computer readable storage medium
CN107968841B (en) Dynamic routing method, device, storage medium and client of network page
CN102012857B (en) Device and method for automatically testing web page
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN110933095A (en) Message parsing method and device
CN113271237B (en) Industrial control protocol analysis method and device, storage medium and processor
CN115065623B (en) Active and passive combined reverse analysis method for private industrial control protocol
CN110798445A (en) Public gateway interface testing method and device, computer equipment and storage medium
CN104899134A (en) Automatic domain name registration server testing system and method
CN107908525B (en) Alarm processing method, equipment and readable storage medium
CN116088846A (en) Processing method, related device and equipment for continuous integrated code format
CN113934617A (en) Data processing method, device, equipment and storage medium
CN116069324A (en) Dynamic form construction method and device based on Vue
CN116016270A (en) Switch test management method and device, electronic equipment and storage medium
CN115098362A (en) Page testing method and device, electronic equipment and storage medium
CN113672512A (en) Code inspection rule generating method, code inspection method, device and medium
CN113760761A (en) Automatic testing method and device based on software and hardware stock market system
CN112184493A (en) Data processing method, system and storage medium based on big data and assembly type building platform
CN115687162B (en) Software testing device and method and electronic device
CN112559000A (en) Vehicle software updating method and device

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