Heterogeneous communication protocol expression and analysis method based on extensible markup language
Through the method based on the expandable markup language, the problems of difficulty in expressing heterogeneous communication protocols and inefficient debugging and parsing are solved, and the rapid acquisition and automated analysis of protocol information are achieved, which improves the flexibility and maintainability of the system.
Patent Information
- Application Number
- CN202510344845.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, there are problems such as difficulty in expressing heterogeneous communication protocols, inefficient debugging and parsing, and duplicate code development.
Using an extended markup language (XML)-based method, the initial drone state data protocol is obtained, and preliminary analysis is performed and converted into local configuration files. The node traversal loading interface and attribute escape interface are designed to cache protocol information into the software, supporting rapid retrieval and parsing.
It realizes a unified expression method of heterogeneous communication protocols, improves debugging and parsing efficiency, reduces code modification requirements, improves system flexibility and maintainability, and supports rapid expansion and adjustment of protocols.
Smart Images

Figure CN120378512A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication protocol representation and parsing, and in particular, to a heterogeneous communication protocol representation and parsing method based on Extensible Markup Language (XML). Background Art
[0002] With the improvement and expansion of the functions of the unmanned aerial vehicle (UAV) system, the number of devices involved in the system is increasing day by day, and the interaction of multiple heterogeneous communication protocols is often involved. These protocols usually exist in the form of paper documents or standardized specifications, which are not conducive to automated processing and parsing. In addition, the representation methods of different protocols are not unified, bringing greater maintenance and expansion costs to developers. Especially when it comes to protocol updates or additions, the protocol changes and debugging processes involve frequent code adjustments, and there are risks in this process. The existing solutions mainly rely on manually parsing protocol documents and writing hard-coded logic, and the protocol information is written into software in the form of header files, structures, classes, parsing functions, etc. to obtain protocol information. This method is not only inefficient but also prone to errors. Therefore, a method is needed to uniformly and flexibly represent heterogeneous communication protocols and support automated parsing and processing. Summary of the Invention
[0003] Embodiments of the present invention provide a heterogeneous communication protocol representation and parsing method based on Extensible Markup Language (XML) to at least solve the technical problems of difficult representation of heterogeneous communication protocols, low debugging and parsing efficiency, and duplicate code development in the prior art.
[0004] According to one aspect of the embodiments of the present invention, a method for expressing and parsing heterogeneous communication protocols based on Extensible Markup Language (XML) is provided. The method may include: obtaining an initial drone status data protocol; performing a preliminary parsing on the initial drone status data protocol to obtain target protocol information of the initial drone status data protocol; escaping the target protocol information through Extensible Markup Language to obtain a local configuration file containing the target protocol information, where the local configuration file includes protocol organizational structure features and content information; designing an XML node traversal and loading interface and a node attribute escaping interface based on the protocol organizational structure features and content information of the local configuration file; reading the local configuration file containing the target protocol information from a hardware device into software through the XML node traversal and loading interface and the node attribute escaping interface; designing a Map and List hybrid cache structure according to the protocol organizational structure features and usage requirements of the local configuration file, and caching the target protocol information of the local configuration file read into the software into a software cache; developing customized and hierarchical interfaces according to the parsing process features when parsing according to the drone status data protocol and the cache features of the target protocol information cached in the software cache to achieve fast reading of the target protocol information in the software cache; obtaining the drone status data to be parsed, where the drone status data to be parsed includes a feature code, a frame type, and sync word information of the drone status data to be parsed; performing a quick retrieval on the target protocol information in the software cache based on the feature code, the frame type, and the sync word information of the drone status data to be parsed to obtain protocol information corresponding to the drone status data to be parsed; and parsing the drone status data to be parsed based on the protocol information of the drone status data to be parsed to obtain a parsing result of the drone status data to be parsed.
[0005] Optionally, the parsing process of performing a preliminary parsing on the initial drone status data protocol includes sync word judgment and frame type judgment.
[0006] Optionally, the target protocol information includes at least one of the following: meta information of the protocol, field information, parsing rules, and organizational structure features.
[0007] Optionally, the local configuration file of the target protocol information includes: a meta information node of the target protocol information, a field definition node, and a parsing rule node.
[0008] Optionally, the Map and List hybrid cache structure includes: designing a cache structure for each frame of the target protocol information according to the Map method, using the frame protocol type as the ID identifier for Map storage; storing the information of each element node in the content description of any frame of the target protocol information in List form for the content description of any frame of the target protocol information; and storing the enumerated and BIT data elements of the sub-state elements existing in the target protocol information in Map form.
[0009] Optionally, the developed customized and hierarchical interfaces include at least one of the following: supporting the retrieval of target protocol information nodes according to the name of the target protocol information or the field name condition; retrieving the protocol information List of the specified frame content of the target protocol information by the frame type of the target protocol information; retrieving the specified element parsing information node by the specified element ID of the target protocol information; and retrieving the specified sub-state element node by the specified status judgment value and element ID of the target protocol information.
[0010] Advantages of the present invention: The present invention proposes a method for representing and parsing heterogeneous communication protocols based on Extensible Markup Language (XML). During the protocol information parsing process, the software protocol information processing flow and protocol parsing logic are fixed, while the specific information of the protocol and the compositional structure differences of different protocols are constantly changing. The present invention effectively uses XML for the generalization of heterogeneous communication protocols, provides a unified protocol representation method, decouples protocol information from software through configuration files, realizes the rapid acquisition and automatic parsing of software protocol information, and greatly improves the flexibility and maintainability of software. In this process, the meta-information (name, version, purpose), field information (field name, type, length, verification rule), parsing rule (logical relationship between fields, data processing method), and organizational structure (association relationship between different sub-frames in the protocol) of the protocol are represented by heterogeneous nodes in XML respectively. In addition, considering the extensibility of heterogeneous protocol representation, the protocol configuration file association method and configuration file loading interface are designed to automatically find and load the associated protocol path, support flexible association between protocols, horizontal protocol content expansion, and vertical protocol association expansion. Through customized interfaces, multiple data processing logics are supported, the development process is simplified, and the development workload is reduced. Through the caching mechanism, the efficiency of protocol information acquisition and parsing is improved, and the system load is reduced. The extension of multiple data processing logics is supported, such as verification of protocol fields, conversion and mapping of data, etc. The decoupling of protocol information from software and the design of highly flexible and compatible interfaces enable the system to only update the configuration file without modifying the code when protocol changes occur due to system function expansion and adjustment, achieving rapid response. This efficient protocol information representation and loading ability greatly enhances the extensibility and maintainability of the data communication software of the equipment system, meeting the requirements for rapid iterative upgrading of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 is a flowchart of a method for representing and parsing heterogeneous communication protocols based on Extensible Markup Language according to an embodiment of the present invention; Figure 2 is a protocol parsing flowchart of the initial unmanned aerial vehicle state data protocol according to an embodiment of the present invention; Figure 3 is a schematic diagram of the first XML configuration file according to an embodiment of the present invention; Figure 4 is a schematic diagram of the second XML configuration file according to an embodiment of the present invention; Figure 5 is a schematic diagram of the third XML configuration file according to an embodiment of the present invention; Figure 6 It is a schematic diagram of the fourth XML configuration file according to an embodiment of the present invention; Figure 7 It is a schematic diagram of the fifth XML configuration file according to an embodiment of the present invention; Figure 8 It is a schematic diagram of the sixth XML configuration file according to an embodiment of the present invention; Figure 9 It is a schematic diagram of the seventh XML configuration file according to an embodiment of the present invention. Detailed implementation manners
[0012] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
[0013] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0014] Embodiment 1 According to an embodiment of the present invention, a method for expressing and parsing heterogeneous communication protocols based on extensible markup language is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system including at least one set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from that here.
[0015] Figure 1 It is a flowchart of a method for expressing and parsing heterogeneous communication protocols based on extensible markup language according to an embodiment of the present invention. As Figure 1 shown, the method may include the following steps: Step S101, obtain the initial UAV state data protocol.
[0016] In the technical solution provided in step S101 of the present invention, an initial UAV status data protocol is obtained, where the initial UAV status data protocol includes a paper communication protocol or a standardized protocol document.
[0017] Step S102: Perform a preliminary parsing on the initial UAV status data protocol to obtain the target protocol information of the initial UAV status data protocol.
[0018] In the technical solution provided in step S102 of the present invention, the initial UAV status data protocol is preliminarily parsed to extract the target protocol information of the initial UAV status data protocol, and the main parsing processes for analyzing the target protocol information of the initial UAV status data protocol include: sync word judgment, frame type judgment. At the same time, it is analyzed that there are sub-frame situations in the frame types included in the target protocol information, and there are various parsing modes such as numerical quantization and status judgment in the parsing of specific data elements in the target protocol information, and there is a general need for type conversion.
[0019] Step S103: Escape the target protocol information through Extensible Markup Language to obtain a local configuration file containing the target protocol information, where the local configuration file includes protocol organizational structure features and content information.
[0020] In the technical solution provided in step S103 of the present invention, Figure 2 is a protocol parsing flowchart of the initial UAV status data protocol according to an embodiment of the present invention. As Figure 2 shown, the protocol parsing flowchart includes 3 steps and 4 parts; Extensible Markup Language (XML for short) is used to convert the target protocol information to form a local configuration file containing the target protocol information, and the location and description of each data element are realized by the starting byte position (beginByte), the occupied byte length (byteLen), and the data type (dataType); the local configuration file nodes are designed according to the composition structure of the target protocol information; the comparison value for comparison judgment during the parsing of specific elements is specified through the comparison content (compareValue) to meet special elements with judgment logic, such as data frame headers; at the same time, for the frame type judgment of multi-type protocol frames and expansion requirements, a FrameType node is designed to determine the position of the sub-frame type judgment word and the valid sub-frame type and its configuration file path for the current target protocol, and the FrameType node can exist at any protocol level to realize the association and flexible expansion of different protocol levels. Figure 3 is a schematic diagram of the first XML configuration file according to an embodiment of the present invention. Figure 4It is the schematic diagram of the second XML configuration file according to the embodiments of the present invention. From Figure 3 and Figure 4 it can be seen that the FrameType node can exist at any protocol level.
[0021] The processing type (processType) is used to mark different element processing methods. For example, 0x03 indicates that the element is a numerical element that is quantitatively analyzed through a formula (processExpr); 0x04 indicates that the element is an enumerated element that needs to perform a state judgment within a given range based on the actual value, and sub-nodes are designed to represent the valid state range; 0x01 indicates that the element needs to perform a state judgment according to the specified state and is a BIT-type element that contains multiple sub-element state quantities. Figure 5 It is the schematic diagram of the third XML configuration file according to the embodiments of the present invention. From Figure 5 it can be seen that different processing types are different element processing methods.
[0022] Step S104: Based on the protocol organizational structure characteristics and content information of the local configuration file, design an extensible markup language node traversal and loading interface and a node attribute escape interface.
[0023] In the technical solution provided in step S104 of the present invention, based on the protocol expression configuration file organizational structure characteristics and content, design an XML node traversal and loading interface, a node attribute escape interface, etc., to achieve the complete loading of the protocol information in the configuration file, and add the search and judgment of the FrameType node to the XML loading interface at any level to ensure that the loading interface supports the flexible expansion characteristics of the protocol configuration file.
[0024] Step S105: Through the extensible markup language node traversal and loading interface and the node attribute escape interface, read the local configuration file containing the target protocol information from the hardware device into the software.
[0025] In the technical solution provided in step S105 of the present invention, through the extensible markup language node traversal and loading interface and the node attribute escape interface, read the local configuration file containing the target protocol information from the hardware device into the software.
[0026] Step S106: According to the protocol organizational structure characteristics and usage requirements of the local configuration file, design a Map, List hybrid cache structure, and cache the target protocol information of the local configuration file read into the software into the software cache.
[0027] In the technical solution provided in step S106 of the present invention, based on the structural characteristics of the multi-level and multi-subframe coexistence of the UAV state data, a cache structure for each frame protocol is designed based on the Map method. The protocol frame type is used as the ID identifier for Map storage, and the fast query feature of the Map supports the fast search of protocol information. At the same time, for the specific content description of a certain frame protocol, considering the usage requirements of the protocol during traversal and parsing, the information of each element node in the frame content protocol description is stored in a List. For the enumerated and BIT-type data elements of the sub-state elements, the acquisition method of the sub-state elements during parsing is to query the specified value node. Therefore, the sub-state elements are stored in a Map, and the state corresponding judgment value is used as the Map identification ID.
[0028] Step S107: According to the parsing process characteristics when parsing the UAV state data protocol and the cache characteristics of the target protocol information cached in the software cache, develop customized and hierarchical interfaces to achieve fast reading of the target protocol information in the software cache.
[0029] In the technical solution provided in step S107 of the present invention, based on the protocol parsing process characteristics and cache characteristics, develop customized and hierarchical interfaces, including supporting the retrieval of protocol information nodes according to conditions such as protocol name or field name; retrieving the List of the protocol information of the specified frame content by frame type; retrieving the specified element parsing information node by the specified element ID; retrieving the specified sub-state element node by the specified state judgment value and element ID, etc.
[0030] Step S108: Obtain the UAV state data to be parsed, where the UAV state data to be parsed includes the feature code, frame type, and sync word information of the UAV state data to be parsed.
[0031] In the technical solution provided in step S108 of the present invention, obtain the UAV state data to be parsed.
[0032] Step S109: Based on the feature code, frame type, and sync word information of the UAV state data to be parsed, quickly retrieve the target protocol information in the software cache to obtain the protocol information corresponding to the UAV state data to be parsed.
[0033] In the technical solution provided in step S109 of the present invention, parse the UAV state data to be parsed to obtain the feature code, frame type, and sync word information of the UAV state data to be parsed, and quickly retrieve the target protocol information in the software cache according to the feature code, frame type, and sync word information of the UAV state data to be parsed to obtain the protocol information corresponding to the UAV state data to be parsed.
[0034] Step S110: Parse the to-be-parsed UAV status data based on the protocol information of the to-be-parsed UAV status data to obtain the parsing result of the to-be-parsed UAV status data.
[0035] In the technical solution provided in step S110 of the present invention, the to-be-parsed UAV status data is parsed based on the protocol information of the to-be-parsed UAV status data to obtain the parsing result of the to-be-parsed UAV status data.
[0036] The above method of this embodiment will be further introduced below.
[0037] As an optional embodiment, in step S102, the parsing process for initially parsing the initial UAV status data protocol includes sync word judgment and frame type judgment.
[0038] In this embodiment, the parsing process for initially parsing the initial UAV status data protocol includes sync word judgment and frame type judgment.
[0039] As an optional embodiment, in step S103, the local configuration file of the target protocol information includes: a meta-information node of the target protocol information, a field definition node, and a parsing rule node.
[0040] In this embodiment, the meta-information of the protocol (name, version, purpose), field information (field name, type, length, check rule), parsing rule (logical relationship between fields, data processing method), and organizational structure feature (association relationship between different sub-frames in the protocol).
[0041] As an optional embodiment, in step S103, the local configuration file of the target protocol information includes: a meta-information node of the target protocol information, a field definition node, and a parsing rule node.
[0042] In this embodiment, the meta-information node is used to describe the basic attributes of the protocol, such as <meta> including name, version number, etc.; the field definition node is used to describe the name, type, length, and check rule of the protocol fields one by one, such as <fields>multiple under <field>Node; The parsing rule node is used to describe the relationships and logics between defined fields, such as the dependency order or mapping rules.
[0043] As an optional embodiment, in step S106, the Map and List hybrid cache structure includes: designing the cache structure for each frame of the target protocol information according to the Map method, using the frame protocol type as the ID identifier for Map storage; for the content description of any one frame of the target protocol information in the target protocol information, storing the information of each element node in the content description of any one frame of the target protocol information in List mode; for the enumerated and BIT data elements of the sub-state elements existing in the target protocol information, storing them in Map mode.
[0044] In this embodiment, based on the structural characteristics of the multi-level and multi-sub-frame coexistence of the UAV state data, the cache structure of each frame protocol is designed according to the Map method, using the protocol frame type as the ID identifier for Map storage. The fast query feature of Map supports the fast search of protocol information. At the same time, for the specific content description of any one frame of the protocol, considering the usage scenarios and requirements during parsing of the protocol, the information of each element node in the frame content protocol description is stored in List mode. For the enumerated and BIT data elements of the existing sub-state elements, the acquisition method of the sub-state elements during parsing is specified value node query. Therefore, the sub-state elements are stored in Map mode, using the state corresponding judgment value as the Map identification ID.
[0045] As an optional embodiment, in step S107, the developed customized and hierarchical interfaces include at least one of the following: supporting the retrieval of target protocol information nodes according to the name or field name conditions of the target protocol information; retrieving the specified frame content protocol information List of the target protocol information by the frame type of the target protocol information; retrieving the specified element parsing information node by the specified element ID of the target protocol information; retrieving the specified sub-state element node by the specified state judgment value and element ID of the target protocol information.
[0046] In this embodiment, it supports retrieving the target protocol information nodes according to the name or field name conditions of the target protocol information; retrieving the specified frame content protocol information List of the target protocol information by the frame type of the target protocol information; retrieving the specified element parsing information node by the specified element ID of the target protocol information; retrieving the specified sub-state element node by the specified state judgment value and element ID of the target protocol information.
[0047] Experimental part: Based on the above description and parsing of the initial UAV state data protocol, this embodiment expands the frame type of the protocol to demonstrate the improvement of scalability and flexibility brought by the method proposed in the present invention to the system. Figure 6 It is a schematic diagram of the fourth XML configuration file according to an embodiment of the present invention. As Figure 6 shown, frames 9, 10, and 11 are added. The addition process is evaluated through step S102 to check if there is any newly emerged parsing logic or requirement in the newly added frames. If not, only the configuration file needs to be implemented through step S103. If so, an extended upgrade is performed for the newly added requirements in steps S103 to S107.
[0048] Figure 7 It is a schematic diagram of the fifth XML configuration file according to an embodiment of the present invention. Figure 7 Taking Figure 6 frame 11 shown in it as an example, there is no newly added parsing logic and requirement. Therefore, only the configuration file needs to be implemented through step S103, and then the configuration file is reloaded through software re-initialization to achieve compatibility and parsing of new devices and new data. This example verification demonstrates the high flexibility and scalability advantages brought by the method proposed in the present invention in the rapid iterative upgrade of the system.
[0049] Figure 8 It is a schematic diagram of the sixth XML configuration file according to an embodiment of the present invention. Figure 9 It is a schematic diagram of the seventh XML configuration file according to an embodiment of the present invention. Figure 8 Figure 9 It shows data of the Beidou data communication protocol heterogeneous to steps S101 to S107 to demonstrate the compatibility of the method proposed in the present invention with heterogeneous communication protocols in the system. Among them, the implemented steps are the same as those of S101 to S107.
[0050] In an embodiment of the present invention, an initial UAV state data protocol is obtained; the initial UAV state data protocol is preliminarily parsed to obtain target protocol information of the initial UAV state data protocol; the target protocol information is escaped through Extensible Markup Language (XML) to obtain a local configuration file containing the target protocol information, where the local configuration file includes protocol organizational structure features and content information; based on the protocol organizational structure features and content information of the local configuration file, a node traversal loading interface and a node attribute escape interface of XML are designed; through the node traversal loading interface and the node attribute escape interface of XML, the local configuration file containing the target protocol information is read from a hardware device into software; according to the protocol organizational structure features and usage requirements of the local configuration file, a Map and List hybrid cache structure is designed, and the target protocol information of the local configuration file read into the software is cached in a software cache; according to the parsing process features when parsing according to the UAV state data protocol and the cache features of the target protocol information cached in the software cache, a customized and hierarchical interface is developed to achieve fast reading of the target protocol information in the software cache; the UAV state data to be parsed is obtained; based on the signature, frame type, and synchronization word information of the UAV state data to be parsed, the target protocol information in the software cache is quickly retrieved to obtain the protocol information corresponding to the UAV state data to be parsed; the UAV state data to be parsed is parsed based on the protocol information of the UAV state data to be parsed to obtain a parsing result of the UAV state data to be parsed, solving the technical problems of difficult expression of heterogeneous communication protocols, low debugging and parsing efficiency, and duplicate code development in the prior art, and achieving the technical effect of enabling simple expression of heterogeneous communication protocols, improving debugging and parsing efficiency, and not requiring redevelopment of code through a heterogeneous communication protocol expression and parsing method based on XML.
[0051] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0052] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0053] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of units can be a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of units or modules can be in an electrical or other form.
[0054] The unit described as a separating component may or may not be physically separated, and the component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed over multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0055] In addition, each functional unit in various embodiments of the present invention may be integrated in a first processing unit, may also exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0056] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.< / field> < / fields>
Claims
1. A heterogeneous communication protocol representation and parsing method based on Extensible Markup Language, characterized in that, including: Obtain the initial drone status data protocol; Perform a preliminary parsing on the initial drone status data protocol to obtain the target protocol information of the initial drone status data protocol; Escape the target protocol information through Extensible Markup Language (XML) to obtain a local configuration file containing the target protocol information, where the local configuration file includes protocol organizational structure features and content information; Design a node traversal loading interface and a node attribute escape interface for XML based on the protocol organizational structure features and content information of the local configuration file; Read the local configuration file containing the target protocol information from the hardware device into the software through the node traversal loading interface and the node attribute escape interface of XML; Design a Map and List hybrid cache structure according to the protocol organizational structure features and usage requirements of the local configuration file, and cache the target protocol information of the local configuration file read into the software into the software cache; Develop customized and hierarchical interfaces according to the parsing process features when parsing according to the drone status data protocol and the cache features of the target protocol information cached in the software cache to achieve fast reading of the target protocol information in the software cache; Obtain the drone status data to be parsed, where the drone status data to be parsed includes the feature code, frame type, and synchronization word information of the drone status data to be parsed; Based on the feature code, frame type, and synchronization word information of the drone status data to be parsed, quickly retrieve the target protocol information in the software cache to obtain the protocol information corresponding to the drone status data to be parsed; Parse the drone status data to be parsed based on the protocol information of the drone status data to be parsed to obtain the parsing result of the drone status data to be parsed.
2. The heterogeneous communication protocol representation and parsing method based on Extensible Markup Language according to claim 1, characterized in that The parsing process of the preliminary parsing of the initial drone status data protocol includes synchronization word judgment and frame type judgment.
3. A method for representing and parsing a heterogeneous communication protocol based on Extensible Markup Language according to claim 1, characterized in that The target protocol information includes at least one of the following: meta information of the protocol, field information, parsing rules, and organizational structure features.
4. The heterogeneous communication protocol expression and parsing method based on extensible markup language according to claim 3, characterized in that The local configuration file of the target protocol information includes: a meta information node of the target protocol information, a field definition node, and a parsing rule node.
5. A method for expressing and parsing a heterogeneous communication protocol based on Extensible Markup Language according to claim 4, characterized in that, The Map and List hybrid cache structure includes: Design a cache structure for each frame of the target protocol information in Map mode, using the frame protocol type as the ID identifier for Map storage; For the content description of any one frame of the target protocol information in the target protocol information, store the information of each element node in the content description of any one frame of the target protocol information in List mode; For the enumerated type and BIT type data elements of the sub-status elements existing in the target protocol information, store them in Map mode.
6. A heterogeneous communication protocol representation and parsing method based on Extensible Markup Language according to claim 1, characterized in that, The development of customized and hierarchical interfaces includes at least one of the following: support for retrieving target protocol information nodes by the name of the target protocol information or field name conditions; retrieving the protocol information List of the specified frame content of the target protocol information by the frame type of the target protocol information; Retrieving the specified element parsing information node by the specified element ID of the target protocol information; Retrieving the specified sub-status element node by the specified status judgment value and element ID of the target protocol information.
7. A computer system, characterized in that including: One or more processors, a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method of claim 1.
8. A computer-readable storage medium, characterized in that Stores computer-executable instructions that, when executed, are used to implement the method of claim 1.
9. A computer program product, characterized in that Includes computer-executable instructions that, when executed, are used to implement the method of claim 1.