CN112153048B - Information analysis method, information analysis device, information analysis system, storage medium, and electronic device - Google Patents

Information analysis method, information analysis device, information analysis system, storage medium, and electronic device Download PDF

Info

Publication number
CN112153048B
CN112153048B CN202011017374.6A CN202011017374A CN112153048B CN 112153048 B CN112153048 B CN 112153048B CN 202011017374 A CN202011017374 A CN 202011017374A CN 112153048 B CN112153048 B CN 112153048B
Authority
CN
China
Prior art keywords
target
protocol frame
linked list
protocol
resolver
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
CN202011017374.6A
Other languages
Chinese (zh)
Other versions
CN112153048A (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202011017374.6A priority Critical patent/CN112153048B/en
Publication of CN112153048A publication Critical patent/CN112153048A/en
Application granted granted Critical
Publication of CN112153048B publication Critical patent/CN112153048B/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/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • 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/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides an information analysis method, an information analysis device, an information analysis system, a storage medium and an electronic device, wherein the method comprises the following steps: receiving a protocol frame from a target device, wherein the protocol frame carries tag information, and the tag information is used for identifying a parser protocol of the protocol frame; searching a target analyzer matched with the protocol frame in a preset linked list according to the label information; and if the target resolver is found in the preset linked list, resolving the protocol frame based on the target resolver. The invention solves the technical problem that the monitoring system in the related technology can not be compatible with various analyzer protocols, realizes the uniform access and analysis of various protocol frames, and realizes the dynamic incremental update of the analyzers, thereby saving the software development cost and improving the software development efficiency.

Description

Information analysis method, information analysis device, information analysis system, storage medium, and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method, an apparatus, a system, a storage medium, and an electronic apparatus for analyzing information.
Background
In the related technology, along with the continuous development of economy, the product iteration speed is faster and faster, more and more internet of things devices enter the view of the public, taking heating and ventilation devices as an example, and multiple communication protocols are applied to the control and management of the heating and ventilation devices.
In the related art, the device monitoring system has defects in expansibility and compatibility, and at least has the following problems: if the existing monitoring system is simultaneously accessed to an old gateway and a new gateway of the same protocol, the existing monitoring system cannot operate because of different protocol versions; if a new resolvable protocol type is required to be added to the monitoring system, the resolver needs to be rewritten once, and the development and test cost is overlarge.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides an information analysis method, an information analysis device, an information analysis system, a storage medium and an electronic device, and aims to solve the technical problem that a monitoring system in the related art cannot be compatible with multiple analyzer protocols.
According to an embodiment of the present invention, there is provided a method for parsing information, including: receiving a protocol frame from a target device, wherein the protocol frame carries tag information, and the tag information is used for identifying a parser protocol of the protocol frame; searching a target analyzer matched with the protocol frame in a preset linked list according to the label information; and if the target resolver is found in the preset linked list, resolving the protocol frame based on the target resolver.
Optionally, before searching for a target parser matched with the protocol frame in a preset linked list according to the tag information, the method further includes: extracting a data entity of the protocol frame; the label information is obtained from a header of the data entity.
Optionally, after searching a target parser matched with the protocol frame in a preset linked list according to the tag information, the method further includes: and if the target resolver is not found in the preset linked list, discarding the protocol frame in a frame queue.
Optionally, searching a target parser matched with the protocol frame in a preset linked list according to the tag information includes: and searching a target resolver matched with the protocol frame in the preset linked list according to the arrangement sequence of the resolvers by taking the label information as a key word until the target resolver is adapted to the target resolver or the preset linked list is traversed, wherein the preset linked list is composed of a plurality of resolvers.
Optionally, before searching for a target parser matched with the protocol frame in a preset linked list according to the tag information, the method further includes: before the target equipment communicates with a monitoring system for the first time, acquiring a message analysis program of the target equipment; packaging the message analysis program into a message analyzer; and when the monitoring system is started, loading the message analyzer serving as a target analyzer of the target equipment to the preset linked list.
Optionally, parsing the protocol frame based on the target parser includes: analyzing task data in the protocol frame based on the target analyzer; distributing the task data to a task processor corresponding to the target resolver; generating a processing result of the protocol frame based on the task processor.
According to another embodiment of the present invention, there is provided an information parsing apparatus including: a receiving module, configured to receive a protocol frame from a target device, where the protocol frame carries tag information, and the tag information is used to identify a parser protocol of the protocol frame; the searching module is used for searching a target analyzer matched with the protocol frame in a preset linked list according to the label information; and the analysis module is used for analyzing the protocol frame based on the target analyzer if the target analyzer is found in the preset linked list.
Optionally, the apparatus further comprises: the extracting module is used for extracting the data entity of the protocol frame before the searching module searches a target analyzer matched with the protocol frame in a preset linked list according to the label information; an obtaining module, configured to obtain the tag information from a header of the data entity.
Optionally, the apparatus further comprises: and the discarding module is used for discarding the protocol frame in a frame queue if the target resolver is not found in the preset linked list after the target resolver matched with the protocol frame is found in the preset linked list by the searching module according to the tag information.
Optionally, the searching module includes: and the searching unit is used for searching a target resolver matched with the protocol frame in the preset linked list according to the arrangement sequence of the resolvers by taking the label information as a key word until the target resolver is adapted to the target resolver or the preset linked list is traversed, wherein the preset linked list is composed of a plurality of resolvers.
Optionally, the apparatus further comprises: the acquisition module is used for acquiring a message analysis program of the target equipment before the target equipment is communicated with the monitoring system for the first time before the searching module searches a target analyzer matched with the protocol frame in a preset linked list according to the label information; the packaging module is used for packaging the message analysis program into a message analyzer; and the loading module is used for loading the message analyzer serving as a target analyzer of the target equipment to the preset linked list when the monitoring system is started.
Optionally, the parsing module includes: the analysis unit is used for analyzing the task data in the protocol frame based on the target analyzer; the distribution unit is used for distributing the task data to a task processor corresponding to the target resolver; a generating unit configured to generate a processing result of the protocol frame based on the task processor.
According to another embodiment of the present invention, there is provided a system for parsing information, including: the monitoring system is connected with the target equipment and comprises the device described in the embodiment; and the target equipment is used for sending the protocol frame to the monitoring system.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps in any of the apparatus embodiments described above when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the protocol frame from the target equipment is received, then the target resolver matched with the protocol frame is searched in the preset linked list according to the label information, if the target resolver is searched in the preset linked list, the protocol frame is resolved based on the target resolver, the protocol frame carries the identification information identifying the resolver protocol, and the matched target resolver is searched in the preset linked list, so that the technical problem that a monitoring system in the related technology cannot be compatible with various resolver protocols is solved, the uniform access and resolution of various protocol frames are realized, the dynamic increment updating of the resolver is realized, the software development cost is further saved, and the software development efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a parsing server for information according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for parsing information according to an embodiment of the present invention;
FIG. 3 is a flow chart of an embodiment of the present invention for parsing tag information;
FIG. 4 is a flow diagram of a chained task distributor of an embodiment of the present invention;
FIG. 5 is a data flow diagram of an embodiment of the present invention;
fig. 6 is a block diagram of an information analysis device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the embodiment one of the present application can be executed in a server, a computer or a similar electronic device. Taking the example of operating on a server, fig. 1 is a block diagram of a structure of an information parsing server according to an embodiment of the present invention. As shown in fig. 1, the server may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally, may further include, a transmission device (not shown in fig. 1), and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and is not intended to limit the structure of the server. For example, the server 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a server program, for example, a software program and a module of application software, such as a server program corresponding to an information parsing control method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the server program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to server 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 10. In one example, the transmission device includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, an information parsing method is provided, and fig. 2 is a flowchart of an information parsing method according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, receiving a protocol frame from a target device, wherein the protocol frame carries tag information, and the tag information is used for identifying a resolver protocol of the protocol frame;
in this embodiment, the protocol frame is a predetermined communication protocol, and the types of the parser include different versions of the same protocol (e.g., new and old versions at different release times, versions in different regions, etc.), and different types of protocols, such as a communication protocol, an encapsulation protocol, an encryption protocol, etc.
Optionally, the target device is an internet of things device or a heating and ventilation device, a gateway device, a fire fighting device, an air conditioning device, a photovoltaic device, and the like of the internet of things device that can be accessed.
Step S204, searching a target resolver matched with the protocol frame in a preset linked list according to the label information;
the preset linked list of this embodiment is used for storing a plurality of resolvers through the linked list, each resolver uniquely corresponds to one tag information, wherein the linked list is a non-continuous and non-sequential storage structure on a physical storage unit, and the logical order of data elements is realized through the pointer link order in the linked list. The linked list is composed of a series of nodes (each element in the linked list is called a node, and in this embodiment, is referred to as a parser), the nodes can be dynamically generated at runtime, and each node includes two parts: one is a data field that stores the data element and the other is a pointer field that stores the address of the next node.
In step S206, if the target parser is found in the preset linked list, the protocol frame is parsed based on the target parser.
Through the steps, the protocol frame from the target equipment is received, then the target resolver matched with the protocol frame is searched in the preset linked list according to the label information, if the target resolver is searched in the preset linked list, the protocol frame is resolved based on the target resolver, the protocol frame carries the identification information identifying the resolver protocol, and the matched target resolver is searched in the preset linked list, so that the technical problem that a monitoring system in the related technology cannot be compatible with multiple resolver protocols is solved, the uniform access and resolution of multiple protocol frames are realized, the dynamic increment updating of the resolver is realized, the software development cost is saved, and the software development efficiency is improved.
In an embodiment of this embodiment, before searching for a target parser matched with a protocol frame in a preset linked list according to tag information, acquiring carried tag information from a specific location or a specific field of the protocol frame, further includes: extracting a data entity of the protocol frame; the label information is obtained from the header of the data entity.
In another aspect of this embodiment, after searching the target parser matched with the protocol frame in the preset linked list according to the tag information, the method further includes: and if the target resolver is not found in the preset linked list, discarding the protocol frame in the frame queue.
Optionally, the protocol frames that are not matched with the parser may be directly deleted, so as to reduce redundant data in the system and improve the processing efficiency of the data.
Fig. 3 is a flowchart of analyzing tag information according to an embodiment of the present invention, where the heating and ventilation device sends a protocol frame to the monitoring system through the gateway, and the flowchart includes:
s31, resolving a protocol;
s32, judging whether the Tag exists or not; if not, directly discarding the frame entity;
s33, if existing, analyzing the frame entity;
s34, the flow is continued based on the frame entity.
The monitoring system receives the frame uploaded by the gateway and extracts the data entity of the frame, acquires tag (label information) from the entity, such as an analyzer protocol controlled by a single unit, distributes the frame entity to a corresponding processing program according to the content of the tag, delivers the frame entity to the program for subsequent processing, and controls one unit according to the data entity; if the processing program of the tag does not exist, such as a multi-unit control resolver protocol, the gateway is a new version gateway or heating and ventilation equipment, the version processing program is incompatible, only single-unit control is supported, and the frame monitoring system is directly discarded without processing.
In an implementation manner of this embodiment, searching for a target parser matching a protocol frame in a preset linked list according to tag information includes: and searching a target resolver matched with the protocol frame in a preset linked list according to the arrangement sequence of the resolvers by taking the label information as a key word until the target resolver is adapted to or the preset linked list is traversed, wherein the preset linked list is composed of a plurality of resolvers.
Optionally, the pointer field of each parser is obtained through the pointer of the linked list, and then the data field pointed by the pointer is searched according to the address of the pointer field.
FIG. 4 is a flow chart of a chained task distributor of an embodiment of the invention, the flow including:
s41, acquiring message header of protocol frame;
s42, entering a chained task distributor;
s43, determining whether the frame header is parsed by the parser;
s44, if not, entering the next resolver until the traversal is completed;
s45, the task processor carries out the operation;
s46, the task is processed by the task processing.
When a target device (such as a gateway or a heating and ventilation device) sends a protocol frame to a monitoring system, extracting the header of the frame, sequentially comparing the header with parsers in a linked list, and distributing the frame to a corresponding task processor after finding a self-adaptive parser by the frame, and if the corresponding parser is not found in the linked list, proving that the frame is not a protocol which can be processed by the system, and directly discarding the frame. For example, the monitoring system supports protocol analysis of the new fan and the hot water machine equipment, the corresponding analysis program is pressed into a chain, when the hot water machine equipment reports data, the data is compared with the analysis program of the new fan firstly, if the data is not matched with the analysis program of the new fan, the data is pushed to the next processing program, and if the next processing program is just the new fan, the data is handed to the new fan for processing. If there is no process available in the entire chain that can be matched, it is proven that the monitoring software does not support the device, and this data frame is discarded.
Fig. 5 is a data flow chart of an embodiment of the present invention, where a protocol frame passes through a chained task distributor (including a preset parsing chained table and a task processor) and feeds back a processing result. When a monitoring system is developed, different protocols of various heating and ventilation equipment or gateways need to be processed to form the same frame, and at the moment, a chained task distributor needs to be established. As shown in fig. 5, the chained task distributor is composed of an analysis chained list and a task processor, and may store different protocol analyzers into the chained list when the monitoring system is started by using the function loading principle.
In this embodiment, before searching for a target parser matched with a protocol frame in a preset linked list according to tag information, the method further includes: before the target equipment communicates with the monitoring system for the first time, acquiring a message analysis program of the target equipment, wherein the target equipment is a gateway or heating and ventilation equipment; packaging the message analysis program into a message analyzer; and when the monitoring system is started, loading the message analyzer serving as a target analyzer of the target equipment to a preset linked list.
When the protocol frame needs to be issued, the issued frame is coded into a frame which can be identified by the heating and ventilation equipment or the gateway according to the protocol through the coder of the analyzer, and the issued equipment can analyze and perform corresponding operation. When a brand-new heating and ventilation device or gateway product is developed and the protocol of a new product is different from the protocol corresponding to any resolver stored in the system, only the new resolver needs to be developed and stored in a linked list when a program runs, the former program cannot be changed, and both the development cost and the test cost are reduced. Because the linked list of the embodiment can be dynamically generated during operation, when a node is added in the existing linked list, a pointer field can be added in a node which is added recently, and the data field of the resolver is stored in the storage position pointed by the pointer field, so that the dynamic addition is realized, and the retransmission development of the whole linked list and the resolution algorithm of the monitoring system is avoided.
In this embodiment, parsing the protocol frame based on the target parser includes: analyzing task data in the protocol frame based on the target analyzer; distributing the task data to a task processor corresponding to the target resolver; the task processor generates a processing result of the protocol frame.
In a usage scenario of this embodiment, in a gateway development stage, different frames of the same protocol are to be processed, a frame entity is unified into a JSON format, different tags are defined for each function, the tags are marked in the frame entity for analysis, and correspondingly, each tag has its own corresponding processing program. The user purchases a heating ventilation air-conditioning equipment monitoring system which comprises an upper computer program and a gateway. After a period of time, the gateway of the user is damaged or new gateway equipment needs to be added, but the gateway equipment purchased by the user at the moment is stopped and has no inventory, and only the new gateway equipment can be accessed. Tag is used to distinguish different functional frames. The upper computer does not analyze the tag added in the new version, and the gateway of the new version and the gateway of the old version can be operated simultaneously under the condition that the upper computer is not replaced. The newly developed gateway or heating and ventilation product adopts different protocols, and the upper computer adopts a chain type task distributor to distribute different types of protocols and different versions of protocols to different processing programs, so that decoupling between functions is realized under the condition of not changing original codes, and incremental updating is realized on the basis of the decoupling.
By the scheme of the embodiment, the problem that the heating, ventilating and air conditioning monitoring gateways of various versions are compatible between new and old can be solved; the protocol of multiple gateways or heating and ventilation equipment is accessed to the same set of system. The gateway version is updated iteratively, and an upper computer does not need to be replaced, so that the user cost is saved; the newly developed heating and ventilation product or gateway can be updated incrementally, so that the testing cost and the operation and maintenance cost are saved.
Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, an information analysis apparatus and system are further provided for implementing the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
An embodiment provides an apparatus for parsing information, and fig. 6 is a block diagram of an apparatus for parsing information according to an embodiment of the present invention, where the apparatus includes: a receiving module 60, a lookup module 62, a parsing module 64, wherein,
a receiving module 60, configured to receive a protocol frame from a target device, where the protocol frame carries tag information, and the tag information is used to identify a parser protocol of the protocol frame;
a searching module 62, configured to search, according to the tag information, a target parser matched with the protocol frame in a preset linked list;
and an analyzing module 64, configured to analyze the protocol frame based on the target parser if the target parser is found in the preset linked list.
Optionally, the apparatus further comprises: the extracting module is used for extracting the data entity of the protocol frame before the searching module searches a target analyzer matched with the protocol frame in a preset linked list according to the label information; an obtaining module, configured to obtain the tag information from a header of the data entity.
Optionally, the apparatus further comprises: and the discarding module is used for discarding the protocol frame in a frame queue if the target resolver is not found in the preset linked list after the target resolver matched with the protocol frame is found in the preset linked list by the searching module according to the tag information.
Optionally, the searching module includes: and the searching unit is used for searching a target resolver matched with the protocol frame in the preset linked list according to the arrangement sequence of the resolvers by taking the label information as a key word until the target resolver is adapted to the target resolver or the preset linked list is traversed, wherein the preset linked list is composed of a plurality of resolvers.
Optionally, the apparatus further comprises: the acquisition module is used for acquiring a message analysis program of the target equipment before the target equipment is communicated with the monitoring system for the first time before the searching module searches a target analyzer matched with the protocol frame in a preset linked list according to the label information; the packaging module is used for packaging the message analysis program into a message analyzer; and the loading module is used for loading the message analyzer serving as a target analyzer of the target equipment to the preset linked list when the monitoring system is started.
Optionally, the parsing module includes: the analysis unit is used for analyzing the task data in the protocol frame based on the target analyzer; the distribution unit is used for distributing the task data to a task processor corresponding to the target resolver; a generating unit configured to generate a processing result of the protocol frame based on the task processor.
The present embodiment further provides an information parsing system, including: the monitoring system is connected with the target equipment and comprises the device described in the embodiment; and the target equipment is used for sending the protocol frame to the monitoring system.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in an aspect of the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving a protocol frame from a target device, wherein the protocol frame carries label information, and the label information is used for identifying a parser protocol of the protocol frame;
s2, searching a target resolver matched with the protocol frame in a preset linked list according to the label information;
and S3, if the target resolver is found in the preset linked list, resolving the protocol frame based on the target resolver.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in an aspect of this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a protocol frame from a target device, wherein the protocol frame carries label information, and the label information is used for identifying a parser protocol of the protocol frame;
s2, searching a target resolver matched with the protocol frame in a preset linked list according to the label information;
and S3, if the target resolver is found in the preset linked list, resolving the protocol frame based on the target resolver.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method for parsing information, comprising:
receiving a protocol frame from a target device, wherein the protocol frame carries tag information, and the tag information is used for identifying a parser protocol of the protocol frame;
searching a target analyzer matched with the protocol frame in a preset linked list according to the label information;
if the target resolver is found in the preset linked list, resolving the protocol frame based on the target resolver;
searching a target resolver matched with the protocol frame in a preset linked list according to the label information comprises the following steps:
and searching a target resolver matched with the protocol frame in the preset linked list according to the arrangement sequence of the resolvers by taking the label information as a key word until the target resolver is adapted to the target resolver or the preset linked list is traversed, wherein the preset linked list is composed of a plurality of resolvers.
2. The method of claim 1, wherein before searching a target parser matching the protocol frame in a preset linked list according to the tag information, the method further comprises:
extracting a data entity of the protocol frame;
the label information is obtained from a header of the data entity.
3. The method of claim 1, wherein after searching a target parser matching the protocol frame in a preset linked list according to the tag information, the method further comprises:
and if the target resolver is not found in the preset linked list, discarding the protocol frame in a frame queue.
4. The method of claim 1, wherein before searching a target parser matching the protocol frame in a preset linked list according to the tag information, the method further comprises:
before the target equipment communicates with a monitoring system for the first time, acquiring a message analysis program of the target equipment;
packaging the message analysis program into a message analyzer;
and when the monitoring system is started, loading the message analyzer serving as a target analyzer of the target equipment to the preset linked list.
5. The method of claim 1, wherein parsing the protocol frame based on the target parser comprises:
analyzing task data in the protocol frame based on the target analyzer;
distributing the task data to a task processor corresponding to the target resolver;
generating a processing result of the protocol frame based on the task processor.
6. An apparatus for analyzing information, comprising:
a receiving module, configured to receive a protocol frame from a target device, where the protocol frame carries tag information, and the tag information is used to identify a parser protocol of the protocol frame;
the searching module is used for searching a target analyzer matched with the protocol frame in a preset linked list according to the label information;
the analysis module is used for analyzing the protocol frame based on the target analyzer if the target analyzer is found in the preset linked list;
the searching module comprises: and the searching unit is used for searching a target resolver matched with the protocol frame in the preset linked list according to the arrangement sequence of the resolvers by taking the label information as a key word until the target resolver is adapted to the target resolver or the preset linked list is traversed, wherein the preset linked list is composed of a plurality of resolvers.
7. A system for parsing information, comprising: a target device, a monitoring system, wherein,
the monitoring system, connected with the target device, comprising the apparatus of claim 6;
and the target equipment is used for sending the protocol frame to the monitoring system.
8. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 5 when executed.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 5.
CN202011017374.6A 2020-09-24 2020-09-24 Information analysis method, information analysis device, information analysis system, storage medium, and electronic device Active CN112153048B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011017374.6A CN112153048B (en) 2020-09-24 2020-09-24 Information analysis method, information analysis device, information analysis system, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011017374.6A CN112153048B (en) 2020-09-24 2020-09-24 Information analysis method, information analysis device, information analysis system, storage medium, and electronic device

Publications (2)

Publication Number Publication Date
CN112153048A CN112153048A (en) 2020-12-29
CN112153048B true CN112153048B (en) 2021-11-30

Family

ID=73896660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011017374.6A Active CN112153048B (en) 2020-09-24 2020-09-24 Information analysis method, information analysis device, information analysis system, storage medium, and electronic device

Country Status (1)

Country Link
CN (1) CN112153048B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112929464B (en) * 2021-02-22 2022-06-24 中国电子信息产业集团有限公司第六研究所 Identification analysis method, device, system, dynamic adapter and readable storage medium
CN115208826B (en) * 2021-04-12 2023-12-01 中移(上海)信息通信科技有限公司 Data processing method, device and system
CN113296745B (en) * 2021-05-21 2024-04-09 中国邮政储蓄银行股份有限公司 Data processing method and device, computer readable storage medium and processor
CN113177015B (en) * 2021-05-24 2023-04-11 石家庄通合电子科技股份有限公司 Frame header-based serial port communication method and serial port chip
CN113835709A (en) * 2021-08-25 2021-12-24 中消云(北京)物联网科技研究院有限公司 Information analysis method, information analysis device, storage medium and processor
CN113923272A (en) * 2021-09-16 2022-01-11 珠海格力电器股份有限公司 Data analysis method and device and server equipment
CN117349483B (en) * 2023-12-05 2024-04-09 杭州行芯科技有限公司 Parasitic parameter searching method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106169947A (en) * 2016-07-11 2016-11-30 美的集团股份有限公司 Data transmission method, the first equipment and the second equipment
WO2018045949A1 (en) * 2016-09-08 2018-03-15 华为技术有限公司 Message transmission method, device and network system
CN110324199A (en) * 2019-03-03 2019-10-11 北京立思辰安科技术有限公司 A kind of implementation method and device of general protocol analysis frame
CN110417766A (en) * 2019-07-22 2019-11-05 深圳市酷达通讯有限公司 A kind of method and apparatus of protocol analysis

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257352A (en) * 2018-09-25 2019-01-22 广州虎牙信息科技有限公司 Resolve packet method, apparatus, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106169947A (en) * 2016-07-11 2016-11-30 美的集团股份有限公司 Data transmission method, the first equipment and the second equipment
WO2018045949A1 (en) * 2016-09-08 2018-03-15 华为技术有限公司 Message transmission method, device and network system
CN110324199A (en) * 2019-03-03 2019-10-11 北京立思辰安科技术有限公司 A kind of implementation method and device of general protocol analysis frame
CN110417766A (en) * 2019-07-22 2019-11-05 深圳市酷达通讯有限公司 A kind of method and apparatus of protocol analysis

Also Published As

Publication number Publication date
CN112153048A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN112153048B (en) Information analysis method, information analysis device, information analysis system, storage medium, and electronic device
CN108769165B (en) Data processing method in Internet of things and Internet of things access system
CN101563908B (en) Apparatus and method for analysing a network flow
CN109194617B (en) Automatic parsing and packaging method and device for XML (extensive markup language) message
CN109388417B (en) Communication protocol updating method, system and terminal equipment
CN112995133B (en) Analysis method, device and system based on modbus protocol
CN111338814A (en) Message processing method and device, storage medium and electronic device
CN110933095A (en) Message parsing method and device
CN110912782B (en) Data acquisition method, device and storage medium
CN111683066A (en) Heterogeneous system integration method and device, computer equipment and storage medium
CN103248512A (en) Method and system for generating topological structure of application layer in communication network
CN113010378B (en) Log processing method and device of microservice module, storage medium and electronic device
CN115134236A (en) Intelligent network card management method, device, equipment and readable medium
CN110932918A (en) Log data acquisition method and device and storage medium
CN114328566A (en) Relationship graph updating method, device, medium, equipment and generating method
CN111813622A (en) Equipment monitoring method and device
CN113014626B (en) Data service management method and device, storage medium and electronic device
CN107948005B (en) Internet of things protocol updating method and device
US8789012B1 (en) System and method for automatically generating computer code to obtain data from devices optionally using a web services interface
CN1937461B (en) Terminal test device based on terminal management business
CN117240943A (en) Interface data analysis method and device
US9182961B1 (en) System and method for providing computer code to obtain data from devices optionally using a web services interface
CN113342738B (en) Method, apparatus, computer program product and medium for modifying controller algorithm
CN113992739B (en) Local area network OTA firmware upgrading device, method and system
CN112702441B (en) Container-based access data processing method, device, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant