Multi-protocol type data processing method and device

Through the multi-protocol type data processing method, the API call protocol layer is used to process multiple device information, solving the data processing problems of multiple protocol types in large areas, and realizing the scalability and standardization of the system.

CN119172450APending Publication Date: 2024-12-20BEIJING BOE ENERGY TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411241894.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In large areas, multiple IoT devices use a variety of protocol types, resulting in different ways of data acquisition, verification and parsing, making it difficult to effectively integrate and standardize in the system.

Method used

Using a multi-protocol type data processing method, the data to be processed is received by the abstract layer through the abstract layer, and the device information in the API is used to process it, including frame division, verification and analysis, so as to realize the formation and storage of the data set.

Benefits of technology

It realizes the decoupling of data processing and protocol, improves the scalability of the system, simplifies the complexity of software development, and improves the standardization and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172450A_ABST
    Figure CN119172450A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-protocol type data processing method and device. The multi-protocol type data processing method comprises the steps that an abstraction layer receives to-be-processed data sent by a network layer, and the to-be-processed data comprises corresponding device information; the abstraction layer calls a protocol of a type corresponding to the equipment information in a protocol layer through an AP I to process the to-be-processed data, and at least two types of protocols are integrated in the AP I; and according to a protocol of a type corresponding to the equipment information, the abstraction layer analyzes the equipment information to obtain a data set corresponding to the to-be-processed data. According to the technical scheme, the abstraction layer calls each protocol of the protocol layer through the AP I, data processing and protocol decoupling are achieved, and therefore the expandability of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of the Internet of Things, and in particular to a multi-protocol data processing method, device, equipment and storage medium. Background Art

[0002] In large areas such as factories, conference centers, and shopping malls, there are usually a variety of IoT devices. For example, the protocols of various types of air compressors in factories are also different. Other equipment in the factory, such as water meters, electricity meters, temperature and humidity sensors, dehumidifiers, smart switches, etc., also use different protocols. The types of protocols include CJ / T188 and DLT645. Because there are many types of protocols, the data acquisition method, verification method, and analysis method corresponding to each protocol also have their own characteristics. How to better integrate and standardize the use of the above protocols in the system has become an urgent issue to be solved in the industry. Summary of the invention

[0003] The present invention provides a multi-protocol data processing method, device, equipment and storage medium, which are used to achieve decoupling of data processing and equipment protocol types, thereby improving the scalability of the system.

[0004] According to a first aspect of the present invention, a multi-protocol data processing method is provided, the multi-protocol data processing method comprising:

[0005] The abstraction layer receives the data to be processed sent by the network layer, wherein the data to be processed includes corresponding device information;

[0006] The abstract layer processes the data to be processed by calling the protocol corresponding to the type of the device information in the protocol layer through an API, and at least two types of protocols are integrated in the API;

[0007] According to the protocol of the type corresponding to the device information, the abstract layer analyzes the device information to obtain a data set corresponding to the data to be processed.

[0008] In one embodiment, it further includes:

[0009] At least two monitoring programs in the network layer perform feature value query on the collected raw data to obtain device information corresponding to the raw data;

[0010] The device information is added as a parameter to the original data to form the data to be processed.

[0011] In one embodiment, it further includes:

[0012] Analyzing at least two types of protocols of the protocol layer;

[0013] In the same API, write programs that can call at least two types of protocols.

[0014] In one embodiment, the abstract layer processes the data to be processed by calling a protocol of a type corresponding to the device information in the protocol layer through an API, including:

[0015] The abstraction layer calls a protocol corresponding to the type of the device information to perform processing, wherein the processing includes framing, checking and parsing;

[0016] Framing the sticky packets in the data to be processed into multiple independent data packets;

[0017] Verify the correctness of any independent data packet, wherein the verification includes any one or more of a length check, a frame header / frame tail check, a CRC check, and a protocol-defined verification method;

[0018] The verified independent data packets are parsed to form a data set, wherein the data set includes a data linked list composed of a plurality of data units and a device identifier, wherein the data unit includes a data address and a data value.

[0019] In one embodiment, the parsing of the verified independent data packets includes:

[0020] Analyzing the API of the protocol corresponding to the independent data packet;

[0021] Various interfaces of the API are called for parsing, and the API interfaces include any one or more of a framing method interface, a length check interface, a frame header check interface, a frame tail check interface, a CRC check interface, a protocol custom check interface, and a data processing interface.

[0022] In one embodiment, it further includes:

[0023] The data set is stored in a preset database.

[0024] According to a second aspect of the present invention, there is provided a multi-protocol data processing device, comprising:

[0025] A receiving module, used for the abstract layer to receive the data to be processed sent by the network layer, wherein the data to be processed includes corresponding device information;

[0026] A calling module, used for the abstract layer to process the data to be processed by calling the protocol layer through an API corresponding to the type of the device information, wherein at least two types of protocols are integrated in the API;

[0027] The analysis module is used to analyze the device information according to the protocol of the type corresponding to the device information, and obtain a data set corresponding to the data to be processed.

[0028] According to a third aspect of the present invention, there is provided an electronic device, the electronic device comprising: a communication interface, a processor, and a memory;

[0029] The memory is used to store program instructions, and when the program instructions are executed by the processor that is communicatively connected to the memory through the communication interface, any of the above-mentioned multi-protocol data processing methods is implemented.

[0030] In one embodiment, the receiving module, the calling module and the analyzing module are controlled to implement any one of the multi-protocol data processing methods described above.

[0031] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a computer (e.g., a processor in a computer), any of the above-mentioned multi-protocol type data processing methods is implemented.

[0032] In summary, the present invention provides a multi-protocol data processing method and device, the method comprising: the abstract layer receives the data to be processed sent by the network layer, the data to be processed includes the corresponding device information; the abstract layer processes the data to be processed by calling the protocol layer through an API corresponding to the type of the device information, the API integrating at least two types of protocols; according to the protocol corresponding to the type of the device information, the abstract layer analyzes the device information to obtain a data set corresponding to the data to be processed. The abstract layer of the technical solution of the present application realizes the decoupling of data processing and protocol by calling each protocol of the protocol layer through an API, thereby improving the scalability of the system.

[0033] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0034] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 A flowchart of a multi-protocol data processing method provided by an embodiment of the present invention;

[0037] Figure 2 A flowchart of another multi-protocol data processing method provided by an embodiment of the present invention;

[0038] Figure 3 A flowchart of another multi-protocol data processing method provided by an embodiment of the present invention;

[0039] Figure 4 A flowchart of step S12 of a multi-protocol data processing method provided by an embodiment of the present invention;

[0040] Figure 5 A flowchart of step S44 of a multi-protocol data processing method provided by an embodiment of the present invention;

[0041] Figure 6 A flowchart of another multi-protocol data processing method provided by an embodiment of the present invention;

[0042] Figure 7 A structural diagram of a multi-protocol data processing device provided by an embodiment of the present invention;

[0043] Figure 8 A structural diagram of an electronic device provided by an embodiment of the present invention;

[0044] Fig. 9 A schematic diagram of a multi-protocol data processing project framework provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0046] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0047] like Figure 1 As shown, the present invention provides a multi-protocol data processing method, the multi-protocol data processing method comprising:

[0048] In step S11, the abstraction layer receives the data to be processed sent by the network layer, wherein the data to be processed includes corresponding device information;

[0049] In step S12, the abstract layer processes the data to be processed by calling the protocol layer of the type corresponding to the device information through the API, and the API integrates at least two types of protocols;

[0050] In step S13, the abstract layer analyzes the device information according to the protocol of the type corresponding to the device information to obtain a data set corresponding to the data to be processed.

[0051] In one embodiment, there are network layers, abstraction layers, and protocol layers in this embodiment, as shown in the attached Fig. 9As shown. The network layer defines the network from which the data comes, which can be a network of various network protocol types, including TCP, UDP, MQTT, HTTP and other network servers. There are various listening programs in the network layer that receive data from different devices. After receiving the data, the device information will be queried according to the characteristic value. The device information will also be transmitted to the abstract layer as part of the original data. The abstract layer is the core of data processing and the unified abstraction of specific protocols. The abstract layer realizes the abstraction of multiple protocols and is also the next layer of data flow in the network layer. In the process of data processing in the abstract layer, the relevant data is called from the protocol layer through a unified API, and the data of various protocols sent by the protocol layer are processed through a unified API. The abstract layer frames, verifies and parses the data. Among them, framing is used to separate the data of the sticky packet into a single complete data; verification is used to verify the correctness of a single data to prevent the occurrence of erroneous data from affecting subsequent processing. The verification methods include length verification, frame header / frame tail verification, CRC verification and protocol custom verification method; parsing is to parse the data to obtain a useful data set, which contains two parts: device address and data unit. Among them, the device identifier is used to identify the sending device of the data, the data unit is the measurement point reported by the device, each data unit contains two parts: data address and data value, and multiple data units are combined in the form of a linked list. API is a virtual calling interface for data processing by the abstract layer. During the data processing process, the protocol corresponding to each data will be used. The API is constructed according to the protocol characteristics of each protocol, that is, the call of each protocol of the protocol layer can be completed by calling the same API. The data flow of each protocol may be different. In order to improve the speed of data processing, the processing flow of each protocol can be encoded and saved. Before calling API, the process code of the protocol to be processed is first queried to avoid calling unnecessary interfaces. The protocol layer is a specific protocol of the device, such as DLT645, MODBUS, IEC103, IEC104, etc. In the technical solution of this embodiment, the original data is first collected and output through the network layer, and the data is processed through the abstract layer. During the data processing process, the data of the protocol layer will be called through API. After the data processing is completed, the data set is stored in the database through the abstract layer.

[0052] The abstract layer receives the data to be processed from the network layer, and the data to be processed includes device information. The abstract layer processes the data by calling the protocol corresponding to the device information type in the protocol layer through an API. The API integrates at least two types of protocols, and a suitable protocol can be selected for processing according to the device information type. The abstract layer analyzes the device information according to the protocol type corresponding to the device information. Through analysis, the abstract layer obtains a data set corresponding to the data to be processed. After receiving the data to be processed from the network layer, the abstract layer uses an API to call the protocol layer for processing, and finally analyzes the device information to obtain a data set. The abstract layer selects a corresponding protocol for processing according to different device information types through an API that integrates multiple protocols, and finally forms a data set.

[0053] The API in the technical solution of this embodiment integrates multiple device protocols. When developing or adding subsequent protocols, it is only necessary to implement the API of the abstract layer, which provides an extensibility framework, can greatly reduce the complexity of software development, and improve the standardization and extensibility of the system. The abstract layer calls each protocol of the protocol layer through the API, realizes the decoupling of data processing and protocol, thereby improving the extensibility of the system.

[0054] In one embodiment, Figure 2 As shown, the following steps S21-S22 are also included:

[0055] In step S21, at least two monitoring programs in the network layer perform feature value query on the collected original data to obtain device information corresponding to the original data;

[0056] In step S22, the device information is added as a parameter to the original data to form the data to be processed.

[0057] In one embodiment, there are at least two listening programs in the network layer, which are responsible for listening to network activities and collecting data. These listening programs perform feature value queries on the collected raw data. Feature value queries refer to analyzing the raw data to identify certain key information or attributes, which can represent or identify the source or nature of the data. Through feature value queries, the listening program can extract or identify "device information" from the raw data. The "device information" here may include the identifier, model, location, status or other relevant attributes of the device. After obtaining the device information, the device information will be added to the raw data as a parameter, that is, the raw data will be expanded or modified to include additional device information to form data to be processed containing device information. The listening program of the network layer collects the raw data, performs feature value queries on the raw data, obtains the device information from the query results, and adds the device information as a parameter to the raw data to form data to be processed.

[0058] In one embodiment, Figure 3 As shown, the following steps S31-S32 are also included:

[0059] In step S31, analyzing at least two types of protocols of the protocol layer;

[0060] In step S32, a program that can call at least two types of protocols is written in the same API.

[0061] In one embodiment, it is necessary to analyze the protocol layer. The protocol layer generally refers to the level that defines the data exchange format and rules in network communication or data processing. Each protocol may be applicable to a specific device. Programs are written in the same API (application programming interface). The API is an interface for interaction between software systems. It defines a set of rules that enable different software components to communicate with each other. The API can call multiple protocols, allowing developers to choose to use different protocols according to different requirements. The protocol layer is analyzed to identify at least two types of protocols, and programs that can call these protocols are written in the API to ensure the versatility and flexibility of the API. The design of the API needs to take into account the characteristics and requirements of different protocols so that data exchange and communication can be carried out efficiently in practical applications.

[0062] In one embodiment, Figure 4 As shown, step S12 includes the following steps S41-S44:

[0063] In step S41, the abstract layer calls a protocol corresponding to the type of the device information to perform processing, the processing including framing, checking and parsing;

[0064] In step S42, the sticky packet in the data to be processed is framed into a plurality of independent data packets;

[0065] In step S43, the correctness of any independent data packet is checked, and the check includes any one or more of a length check, a frame header / frame tail check, a CRC check, and a protocol-defined check method;

[0066] In step S44, the verified independent data packets are parsed to form a data set, wherein the data set includes a data linked list composed of a plurality of data units and a device identification, wherein the data unit includes a data address and a data value.

[0067] In one embodiment, the abstract layer processes the data to be processed by calling the protocol layer of the type corresponding to the device information through an API, and the processing process includes framing, verification and parsing. Framing is to split the sticky packet in the data to be processed into multiple independent data packets. Sticky packets refer to multiple data packets sticking together. The purpose of framing is to divide them into independent data packets for subsequent processing. Verification is to verify the correctness of each independent data packet. The verification process includes multiple types: length check, frame header / frame tail check, CRC check and protocol custom check method, and one or more of these check methods can be used. Parsing is to parse the independent data packets that pass the check. The result of the parsing is to form a data set, which includes a data linked list and a device identifier composed of multiple data units, and each data unit includes a data address and a data value.

[0068] The abstract layer processes the corresponding protocol in the protocol layer through API calls. The processing steps include framing, verification and parsing. The sticky packets in the data to be processed are divided into multiple independent data packets. The correctness of each independent data packet is checked. The verification methods include length check, frame header / frame tail check, CRC check and protocol custom check method. The independent data packets that pass the check are parsed to form a data link list and device identification containing multiple data units. Each data unit includes a data address and a data value. By calling the appropriate protocol to frame, verify and parse the data to be processed, a useful data set is extracted to ensure the integrity and correctness of the data.

[0069] In one embodiment, Figure 5 As shown, step S44 includes the following steps S51-S52:

[0070] In step S51, analyzing the API of the protocol corresponding to the independent data packet;

[0071] In step S52, various interfaces of the API are called for parsing, and the interfaces of the API include any one or more of a framing method interface, a length check interface, a frame header check interface, a frame tail check interface, a CRC check interface, a protocol custom check interface and a data processing interface.

[0072] In one embodiment, parsing an independent data packet requires processing the independent data packet that has passed the check. The data packet needs to pass the check, and the check includes length check, frame header / frame tail check, CRC check and protocol custom check, etc. Before parsing the independent data packet, it is necessary to analyze the protocol corresponding to the data packet and the corresponding API. The API defines a set of rules and methods to allow interaction between software components. The parsing process involves calling various interfaces in the API. The framing method interface is used to further decompose the data packet into smaller units. The length check interface is used to verify whether the length of the data packet meets the expectations. The frame header check interface is used to verify the beginning of the data packet. The frame tail check interface is used to verify the end of the data packet. The CRC check interface is used to perform a cyclic redundancy check to ensure the integrity of the data. The protocol custom check interface is used to perform a protocol-specific check method. The data processing interface is used to process data, involving operations such as formatting, converting or extracting data. In the parsing process, any one or more of the above interfaces are called as needed, and different interfaces are selected according to the characteristics of the data packet and the requirements of the protocol. The independent data packet is parsed, the protocol API corresponding to the data packet is analyzed, and one or more interfaces in the API are called as needed for parsing. The modularity and flexibility of the parsing process ensures the correctness and availability of data by calling different API interfaces to process data packets. At the same time, the designed API can provide enough interfaces to meet the needs of different protocols and data parsing.

[0073] In one embodiment, Figure 6 As shown, the following step S31 is also included:

[0074] In step S61, the data set is stored in a preset database.

[0075] In one embodiment, a data set refers to a set of data obtained after parsing and verification. The data set includes a data link list and a device identifier composed of multiple data units, and each data unit includes a data address and a data value. The preset database is a database system that has been set up and has defined data models, table structures, indexes, etc. to optimize the efficiency of data storage and retrieval. Transferring the data set from the current processing environment to the database and storing it persistently there can ensure that the data will not be lost due to system failures. The database provides a structured way to organize and classify data for subsequent query, analysis and use.

[0076] The processed data set is transferred to the preset database for persistent storage. Storing in the database ensures the long-term availability and further use of the data. The data storage module can be implemented in the form of an API. When the database of the project changes, you only need to implement the corresponding storage API.

[0077] In one embodiment, Figure 7 FIG. 1 is a block diagram of a multi-protocol data processing device according to an exemplary embodiment. Figure 7 As shown, the multi-protocol data processing device includes a receiving module 71, a calling module 72 and an analyzing module 73.

[0078] The receiving module 71 is used for the abstract layer to receive the data to be processed sent by the network layer, wherein the data to be processed includes corresponding device information;

[0079] The calling module 72 is used for the abstract layer to process the data to be processed by calling the protocol layer through the API corresponding to the type of the device information, wherein the API integrates at least two types of protocols;

[0080] The analysis module 73 is used to analyze the device information according to the protocol of the type corresponding to the device information, and obtain a data set corresponding to the data to be processed.

[0081] The receiving module 71, the calling module 72 and the analyzing module 73 included in the block diagram of the multi-protocol data processing device are controlled to execute the multi-protocol data processing method described in any of the above embodiments.

[0082] like Figure 8 As shown, the present invention provides an electronic device 800, which includes: a communication interface, a processor 801, and a memory 802;

[0083] Among them, the memory 802 is used to store program instructions. When the program instructions are executed by the processor 801 that is communicatively connected to the memory 802 through the communication interface, the abstract layer receives the data to be processed sent by the network layer, and the data to be processed includes corresponding device information; the abstract layer processes the data to be processed by calling the protocol layer of the type corresponding to the device information through the API, and at least two types of protocols are integrated in the API; according to the protocol of the type corresponding to the device information, the abstract layer analyzes the device information to obtain a data set corresponding to the data to be processed.

[0084] The present invention provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, an abstraction layer receives data to be processed sent by a network layer, wherein the data to be processed includes corresponding device information; the abstraction layer processes the data to be processed by calling a protocol of a type corresponding to the device information in a protocol layer through an API, wherein at least two types of protocols are integrated in the API; and according to the protocol of a type corresponding to the device information, the abstraction layer analyzes the device information to obtain a data set corresponding to the data to be processed.

[0085] It should be understood that the specific features, operations and details described hereinabove about the method of the present invention may also be similarly applied to the device and system of the present invention, or, vice versa. In addition, each step of the method of the present invention described above may be performed by the corresponding parts or units of the device or system of the present invention.

[0086] It should be understood that each module / unit of the device of the present invention can be implemented in whole or in part by software, hardware, firmware or a combination thereof. Each module / unit can be embedded in the processor of the computer device in the form of hardware or firmware or independent of the processor, or can be stored in the memory of the computer device in the form of software for the processor to call to perform the operation of each module / unit. Each module / unit can be implemented as an independent component or module, or two or more modules / units can be implemented as a single component or module.

[0087] In one embodiment, a computer device is provided, which includes a memory and a processor, and the memory stores computer instructions executable by the processor, and the computer instructions instruct the processor to execute each step of the method of the embodiment of the present invention when executed by the processor. The computer device can be a server, a terminal, or any other electronic device with necessary computing and / or processing capabilities in a broad sense. In one embodiment, the computer device may include a processor, a memory, a network interface, a communication interface, etc. connected through a system bus. The processor of the computer device can be used to provide necessary computing, processing and / or control capabilities. The memory of the computer device may include a non-volatile storage medium and an internal memory. An operating system, a computer program, etc. may be stored in or on the non-volatile storage medium. The internal memory can provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface and the communication interface of the computer device can be used to connect and communicate with external devices through a network. The steps of the method of the present invention are executed by the processor.

[0088] The present invention may be implemented as a computer-readable storage medium having a computer program stored thereon, which causes the steps of the method of an embodiment of the present invention to be executed when executed by a processor. In one embodiment, the computer program is distributed on a plurality of computer devices or processors coupled to a network so that the computer program is stored, accessed, and executed in a distributed manner by one or more computer devices or processors. A single method step / operation, or two or more method steps / operations, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / operations may be performed by one or more computer devices or processors, and one or more other method steps / operations may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step / operation, or perform two or more method steps / operations.

[0089] It will be appreciated by those skilled in the art that the method steps of the present invention may be performed by instructing related hardware such as a computer device or a processor through a computer program, and the computer program may be stored in a non-temporary computer-readable storage medium, which causes the steps of the present invention to be performed when the computer program is executed. Depending on the circumstances, any reference to memory, storage, database, or other media herein may include non-volatile and / or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc.

[0090] The various technical features described above can be combined arbitrarily. Although all possible combinations of these technical features are not described, any combination of these technical features should be considered to be covered by this specification as long as there is no contradiction in such combination.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-protocol data processing method, characterized in that: include: The abstraction layer receives the data to be processed sent by the network layer, wherein the data to be processed includes corresponding device information; The abstract layer processes the data to be processed by calling the protocol corresponding to the type of the device information in the protocol layer through an API, and at least two types of protocols are integrated in the API; According to the protocol of the type corresponding to the device information, the abstract layer analyzes the device information to obtain a data set corresponding to the data to be processed.

2. The multi-protocol data processing method according to claim 1, characterized in that: Also includes: At least two monitoring programs in the network layer perform feature value query on the collected raw data to obtain device information corresponding to the raw data; The device information is added as a parameter to the original data to form the data to be processed.

3. The multi-protocol data processing method according to claim 1, characterized in that: Also includes: Analyzing at least two types of protocols of the protocol layer; Write programs that call at least two types of protocols in the same API.

4. The multi-protocol data processing method according to claim 1, characterized in that: The abstract layer processes the data to be processed by calling a protocol corresponding to the type of the device information in the protocol layer through an API, including: The abstraction layer calls a protocol corresponding to the type of the device information to perform processing, wherein the processing includes framing, checking and parsing; Framing the sticky packets in the data to be processed into multiple independent data packets; Verify the correctness of any independent data packet, wherein the verification includes any one or more of a length check, a frame header / frame tail check, a CRC check, and a protocol-defined verification method; The verified independent data packets are parsed to form a data set, wherein the data set includes a data linked list composed of a plurality of data units and a device identifier, wherein the data unit includes a data address and a data value.

5. The multi-protocol data processing method according to claim 4, characterized in that: The independent data packets that have passed the analysis verification include: Analyze the API of the protocol corresponding to the independent data packet; The various interfaces of the API are called for parsing, and the interfaces of the API include any one or more of a framing method interface, a length check interface, a frame header check interface, a frame tail check interface, a CRC check interface, a protocol custom check interface and a data processing interface.

6. The multi-protocol data processing method according to claim 1, characterized in that: Also includes: The data set is stored in a preset database.

7. A device for multi-protocol data processing, characterized in that: include: A receiving module, used for the abstract layer to receive the data to be processed sent by the network layer, wherein the data to be processed includes corresponding device information; A calling module, used for the abstract layer to process the data to be processed by calling the protocol layer through an API corresponding to the type of the device information, wherein at least two types of protocols are integrated in the API; The analysis module is used to analyze the device information according to the protocol of the type corresponding to the device information, and obtain a data set corresponding to the data to be processed.

8. The multi-protocol data processing device according to claim 7, characterized in that: The receiving module, the calling module and the analyzing module are controlled to execute the multi-protocol data processing method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: include: Communication interface, processor, memory; Wherein, the memory is used to store program instructions, and when the program instructions are executed by the processor that is communicatively connected to the memory through the communication interface, the electronic device implements the multi-protocol data processing method described in any one of claims 1 to 6.

10. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a computer, the computer implements the multi-protocol data processing method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Data processing method, data processing platform and data processing device

    CN120499302A