General data analysis method for unmanned aerial vehicle ground command and control system
Patent Information
- Application Number
- CN201818008426.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-02
- Publication Date
- 2023-05-12
- Estimated Expiration
- 2038-11-02
AI Technical Summary
本发明主要运用C++编程语言来实现通用数据参数解析方法
[0045] (1) For the development of a new type of UAV ground command and control system, there is no need to rewrite the parameter parsing method. Only the parameter table needs to be written according to the protocol, which maximizes the reusability of the code, greatly shortens the development cycle, and reduces the software development cost.
Smart Images

Figure CN122664138B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a general data parsing method for UAV ground command and control systems, and is particularly suitable for building various monitoring software in large-scale UAV ground command and control systems. Background Technology
[0002] The monitoring software of the UAV ground command and control system needs to receive various parameters and operational status information of airborne and ground equipment transmitted from the UAV in real time. This information is stored in hexadecimal code and transmitted in the telemetry and control data link. After receiving this information, the UAV ground command and control system needs to call an appropriate parameter parsing method to convert it into a readable string format for display, so that the operator can understand the flight status of the UAV, the onboard equipment, and the operational status of the ground equipment in a timely manner. The various parameters and operational status information of airborne and ground equipment transmitted by the UAV are encoded and transmitted in the telemetry and control data link according to the protocol specified in the project. The received transmission data frames need to be parsed according to the protocol to obtain the parameters that can be used for display. The traditional solution is to write a corresponding processing method for each type of UAV for each parameter, apply this method to centrally parse all parameters at the data access end, and then distribute the parsed results to the various software that needs to display the parameters. However, large UAV systems consist of numerous components and diverse parameter types. Even parameters with the same name may be parsed differently in different protocols. This means that the results of previous projects cannot be reused in subsequent projects during the development of ground command and control systems for each type of UAV, requiring significant effort to rewrite parameter parsing methods. Furthermore, traditional parameter parsing methods can only provide simple parsing results for single parameters. Some protocols have complex parameter definitions, where parsing a single parameter may require meeting multiple preconditions, or the result of a parameter may be the result of comparison or calculation with other parameter results. In such cases, processing these parameters using traditional parsing methods becomes extremely difficult. In addition, centralizing parameter parsing at the data access end reduces data access capacity to some extent, and the distribution of parsed parameter results is a significant waste of transmission bandwidth. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of traditional parameter parsing methods for UAV ground command and control systems, and to propose a general data parsing method for UAV ground command and control systems, thereby improving the professionalism and versatility of data transmission parsing in UAV ground command and control systems. Based on a comprehensive analysis and abstraction of the basic data communication protocols of various domestic UAV ground command and control systems, this invention creatively proposes and implements a general data parsing method for UAV ground command and control systems. This invention primarily utilizes the C++ programming language to implement the general data parameter parsing method. This invention compiles all parameters contained in the communication protocols of current mainstream UAV ground command and control systems, classifies the parameters according to their encoding methods, extracts the characteristic attributes of each type of parameter, and proposes a "general parameter table writing method." For each type of parameter, a general data processing method is written in C++. For newly developed UAV ground command and control systems, the characteristic attribute information of all parameters is first entered into the parameter table according to the "general parameter table writing method." Then, the text-based parameter table is converted into a vector space of the characteristic attributes of all parameters. Finally, the general telemetry data parsing method for UAV ground command and control systems proposed in this invention is used to analyze the data, ultimately obtaining parameter parsing results that can be displayed.
[0004] The technical solution adopted in this invention is as follows:
[0005] (1) Organize all the parameters contained in the communication protocols of current mainstream UAV models, and classify and improve the parameters according to their encoding methods;
[0006] (2) Extract the characteristic attributes of various parameters and formulate a "general parameter table writing method";
[0007] (3) Develop a general data processing method for each type of parameter in step (1);
[0008] (4) For the newly developed UAV ground command and control system, firstly, according to its communication protocol, the parameter table is written according to the “general parameter table writing method” in step (2) to form the feature attribute vector space of all parameters.
[0009] (5) In the monitoring software of the UAV ground command and control system, the original data code is directly received. Combined with the feature attribute vector space of all parameters generated in step (4), the general data parsing method proposed in step (3) is called to parse the parameters of the original data code and the parsing result is returned to the monitoring software for display.
[0010] The parameter types sorted in step (1) include the following 11 types:
[0011] (1.1) Unsigned consecutive complete byte numeric parameter (abbreviation: NUM). This type is applicable to parameters that occupy several consecutive complete bytes in the transmitted data frame and are represented as unsigned integers.
[0012] (1.2) Two's complement consecutive complete byte numeric parameter (abbreviation: CNUM). This type is applicable to parameters that occupy several consecutive complete bytes in the transmitted data frame and are represented in two's complement form.
[0013] (1.3) Compressed BCD code consecutive complete byte numeric parameter (abbreviation: BCDNUM). This type is applicable to parameters that occupy several consecutive complete bytes in the transmitted data frame and are represented in compressed BCD code (using 4 binary numbers to represent the 10 digits 0 to 9 in 1 decimal number).
[0014] (1.4) Unsigned consecutive bit digital parameter (abbreviation: BITNUM). This type is applicable to parameters that occupy several consecutive bits in the transmitted data frame and are represented as unsigned integers.
[0015] (1.5) Signed consecutive bit digital parameter (abbreviation: SBITNUM). This type is suitable for parameters in which several consecutive bits are selected as sign bits (the definition of the sign bit is given in advance) from several consecutive bytes, and several consecutive bits in the remaining range are selected as data area (the data area is transmitted in unsigned integer mode). The sign of the final parameter result is determined by the sign bit, and the absolute value is determined by the data area.
[0016] (1.6) Two's complement consecutive bit digital parameter (abbreviation: CBITNUM). This type is applicable to parameters that occupy several consecutive bits in the transmitted data frame and are transmitted in two's complement mode.
[0017] (1.7) Continuous complete byte character parameter (abbreviation: CHAR). This type is suitable for parameters that occupy several consecutive complete bytes in the transmitted data frame, and whose meaning is determined by the unsigned integer value they represent.
[0018] (1.8) Consecutive Bit Character Parameter (abbreviation: BITCHAR). This type is suitable for parameters that occupy several consecutive bits in the transmitted data frame, and whose meaning is determined by the unsigned integer value they represent.
[0019] (1.9) ASCII character parameter (abbreviation: ASCII). This type is suitable for parameters that occupy several consecutive complete bytes in the transmitted data frame and whose meaning is represented in ASCII mode.
[0020] (1.10) Comparison Parameter (abbreviation: COMP). This type is applicable to the result of comparing two numeric parameters. If the values are equal, it returns "same"; if the values are not equal, it returns "different".
[0021] (1.11) Operational parameter (abbreviation: CALC). This type is applicable to the result of a certain operation on two numeric parameters, which is used as the parameter of the parameter result.
[0022] The "general parameter table writing method" in step (2) is as follows:
[0023] For each parameter, when entering the parameter table, it is necessary to fill in the characteristic attributes required to parse the parameter. Before explaining the "General Parameter Table Writing Method", these characteristic attribute types will be introduced first. For details, please refer to Table 1.
[0024] Table 1. Description of Feature Attribute Types in the Parameter Table
[0025]
[0026]
[0027]
[0028] For the 11 types of parameters, the types of feature attributes that need to be filled in the parameter table are also different. The correspondence between each type of parameter and the feature attribute information that needs to be entered is shown in Table 2.
[0029] Table 2 shows the types of information that need to be entered into the parameter table for 11 different parameter types.
[0030]
[0031]
[0032] The general processing method for each type of data in step (3) is as follows:
[0033] (3.1) For NUM type parameters, all bytes of the parameter in the data frame are directly copied into a 64-bit unsigned long integer variable t (represented as unsigned long long in C++). The value of variable t is the value of the parameter.
[0034] (3.2) For CNUM type parameters, all bytes of the parameter in the data frame are directly copied into a 64-bit signed long integer variable t (represented as long long in C++). The value of variable t is the value of the parameter.
[0035] (3.3) For BITNUM type parameters, all bytes involved in the parameter in the data frame are directly copied to memory into a 64-bit unsigned long integer variable t. If its starting bit number is x and the bit length is y, where 63≥x≥0, 64≥y≥1, and x+1≤y, shift t left by (63-x) bits and then right by (64-y) bits. The value of variable t is the value of the parameter.
[0036] (3.4) For CBITNUM type parameters, all bytes of the parameter in the data frame are directly copied from memory to a 64-bit signed long integer variable t. If its starting bit number is x and the bit length is y, where 63≥x≥0, 64≥y≥1, and x+1≤y, first obtain the bit value of bit number x, assuming it is xVal. Shift t left by 63-(x-1) bits and then right by 64-(y-1) bits to obtain the absolute value of parameter t, abs(t). Set all the high 63-x bits of abs(t) to xVal. The resulting value is the value of the parameter.
[0037] (3.5) For SBITNUM type parameters, first refer to (3.3) to process the sign bit part, and obtain the parameter sign by combining the sign bit definition. Then refer to (3.3) to process the numerical part to obtain the absolute value of the parameter. Combining the sign and the absolute value is the parameter value.
[0038] (3.6) For BCDNUM type parameters, assuming the parameter occupies n bytes, label them from 1 to n from the low byte to the high byte. For the byte labeled x (n≥x≥1), take the decimal value represented by the lower four bits and multiply it by 10. x-1 Take the highest four decimal digits and multiply by 10. x The sum of the two results is used as the value represented by the byte. Then, the values represented by all bytes are summed to obtain the final result as the value of the parameter.
[0039] (3.7) For CHAR type parameters, all bytes of the parameter in the data frame are directly copied from memory to a 64-bit signed long integer variable t. All sub-parameter values of the parameter are compared with the value of t. If the value of sub-parameter x is the same as t, the name of sub-parameter x is returned as the parsing result of the parameter. If no sub-parameter value is the same as t, the parsing result of the parameter is invalid.
[0040] (3.8) For ASCII type parameters, if the ASCII code represents a string, then all bytes of the parameter in the data frame are directly copied to a character array through memory, and the string represented by the array is the value of the parameter; if the ASCII code represents a number, then the atof() function in the C++ standard library is called to convert it into a number and return it.
[0041] (3.9) For BITCHAR type parameters, obtain the current parameter value t according to (3.3), compare all the sub-parameter values of the parameter with the current parameter value t. If the value of the sub-parameter x is the same as t, the name of the sub-parameter x is returned as the parsing result of the parameter. If no sub-parameter value is the same as t, the parsing result of the parameter is invalid.
[0042] (3.10) For COMP type parameters, obtain the values of the two parameters to be compared and compare them. If they are equal, the parameter value returns "same"; if they are not equal, the parameter value returns "different".
[0043] (3.11) For CALC type parameters, obtain the values of the two parameters to be calculated, substitute them into the analytical formula, and the result obtained is the value of the parameter.
[0044] Compared with the prior art, the present invention has the following advantages:
[0045] (1) For the development of a new type of UAV ground command and control system, there is no need to rewrite the parameter parsing method. Only the parameter table needs to be written according to the protocol, which maximizes the reusability of the code, greatly shortens the development cycle, and reduces the software development cost.
[0046] (2) This method is a general analytical method that is compatible with the parameter analysis of all current mainstream UAV command and control systems. It has the characteristics of high processing efficiency and wide applicability.
[0047] (3) When the protocol content changes, only the corresponding feature attribute values in the parameter table need to be modified. There is no need to change the program code for parameter parsing and display, which has a very strong flexibility.
[0048] (4) Localizing parameter parsing allows for customization of parameters to be parsed as needed. Compared to the original centralized parameter distribution mechanism, this reduces the waste of transmission bandwidth resources during parameter distribution and greatly improves the overall system. Attached Figure Description
[0049] Figure 1 This is a flowchart of the processing of the present invention; Detailed Implementation
[0050] The present invention will be further described below with reference to the examples and actual embodiments in the accompanying drawings. Figure 1 The diagram shows the processing flowchart of this invention. Table 3 shows an example protocol to be processed, which describes the encoding rules of parameters in the transmitted data. For this protocol, the general parsing method proposed in this invention is used, mainly including the following steps.
[0051] Table 3 Example protocols to be processed by this invention
[0052]
[0053] (1) Compile the parameter table according to the "General Parameter Table Writing Method" in accordance with the agreement;
[0054] First, the types of parameters in the protocol must be identified. In the last column of Table 3, we list the parameter types corresponding to the general parsing method of this invention for each parameter. Then, following the "General Parameter Table Writing Method," we fill in the feature attributes for each parameter to generate the parameter table. The following content is the parameter table written according to the protocol in Table 3.
[0055]
[0056] (2) The parameter table obtained in step (1) is used as the input of the general parsing method program, and the program converts it from text into a parameter feature attribute vector space that can be recognized by the computer.
[0057] (3) Check if there is data at the program's data input terminal. If there is data, receive the data and process it by calling the general processing method for each type of parameter. If there is no data, proceed to step (5).
[0058] (4) Pass the parameter parsing result obtained in step (3) to the parameter display software. The following shows the result of parsing a sample input data frame of length 24 bytes according to the protocol in Table 3, combined with the parameter table generated in step (1) using the general parsing method.
[0059]
[0060] (5) Determine whether to end the process. If to continue the process, proceed to step (3).
[0061] (6) Processing completed.
[0062] Through the steps above, we can quickly convert the example protocol of the UAV ground command and control system given in the example into a parameter parsing program, enabling its application in parameter parsing functions. For every newly developed UAV ground command and control system in the future, this method can quickly implement parameter parsing functions, maximizing code reusability, significantly shortening the development cycle, and reducing software development costs. Because this method can be easily integrated into the caller's local software, it effectively reduces bandwidth waste and improves the professionalism and ease of use of the monitoring software's parameter parsing function.
Claims
1. A general data parsing method for UAV ground command and control systems, characterized in that... Includes the following steps: (1) Organize all the parameters contained in the communication protocols of the current mainstream UAV models and classify the parameters according to their encoding methods; (2) Extract the characteristic attributes of various parameters and formulate a "general parameter table writing method"; (3) Develop a general data processing method for each type of parameter in step (1); (4) For the newly developed UAV ground command and control system, firstly, according to its communication protocol, the parameter table is written according to the "general parameter table writing method" in step (2) to form the feature attribute vector space of all parameters; (5) In the monitoring software of the UAV ground command and control system, the original data code is directly received. Combined with the feature attribute vector space of all parameters generated in step (4), the general data processing method proposed in step (3) is called to parse the parameters of the original data code and the parsing result is returned to the monitoring software for display. Specifically, step (3) is as follows: (3.1) For NUM type parameters, all bytes of the parameter in the data frame are directly copied into memory to a 64-bit unsigned long integer variable t, and the value of variable t is the value of the parameter; (3.2) For CNUM type parameters, all bytes of the parameter in the data frame are directly copied into memory to a 64-bit signed long integer variable t, and the value of variable t is the value of the parameter; (3.3) For BITNUM type parameters, all bytes involved in the parameter in the data frame are directly copied to memory into a 64-bit unsigned long integer variable t. If its starting bit number is x and the bit length is y, where 63≥x≥0, 64≥y≥1, and x+1≤y, shift t left by (63-x) bits and then right by (64-y) bits. The value of variable t is the value of the parameter. (3.4) For CBITNUM type parameters, all bytes of the parameter in the data frame are directly copied from memory to a 64-bit signed long integer variable t. If its starting bit number is x and the bit length is y, where 63≥x≥0, 64≥y≥1, and x+1≤y, first obtain the bit value of bit number x, assuming it is xVal. Shift t left by 63-(x-1) bits and then right by 64-(y-1) bits to obtain the absolute value of parameter t, abs(t). Set all the high 63-x bits of abs(t) to xVal. The resulting value is the value of the parameter. (3.5) For SBITNUM type parameters, first refer to (3.3) to process the sign part, and obtain the parameter sign by combining the sign bit definition. Then refer to (3.3) to process the numerical part to obtain the absolute value of the parameter. Combining the sign and the absolute value is the parameter value. (3.6) For BCDNUM type parameters, assuming the parameter occupies n bytes, label them from 1 to n from the low byte to the high byte. For the byte labeled x (n≥x≥1), take the decimal value represented by the lower four bits and multiply it by 10. x-1 Take the highest four decimal digits and multiply by 10. x The sum of the two results is used as the value represented by that byte. Then, the sum of the values represented by all bytes is used to obtain the final result as the value of the parameter. (3.7) For CHAR type parameters, all bytes of the parameter in the data frame are directly copied from memory to a 64-bit signed long integer variable t. All sub-parameter values of the parameter are compared with the value of t. If the value of sub-parameter x is the same as t, the name of sub-parameter x is returned as the parsing result of the parameter. If no sub-parameter value is the same as t, the parsing result of the parameter is invalid. (3.8) For ASCII type parameters, if the ASCII code represents a string, then all bytes of the parameter in the data frame are directly copied from memory to a character array, and the string represented by the array is the value of the parameter; if the ASCII code represents a number, then the atof() function in the C++ standard library is called to convert it into a number and return it. (3.9) For BITCHAR type parameters, obtain the current parameter value t according to (3.3), compare all the sub-parameter values of the parameter with the current parameter value t. If the value of the sub-parameter x is the same as t, the name of the sub-parameter x is returned as the parsing result of the parameter. If no sub-parameter value is the same as t, the parsing result of the parameter is invalid. (3.10) For COMP type parameters, obtain the values of the two parameters to be compared and compare them. If they are equal, the parameter value returns "same"; if they are not equal, the parameter value returns "different". (3.11) For CALC type parameters, obtain the values of the two parameters to be calculated, substitute them into the analytical formula, and the result obtained is the value of the parameter.
2. The general data parsing method for UAV ground command and control systems according to claim 1, characterized in that: Step (1) specifically summarized and categorized the following 11 types: (1.1) Unsigned consecutive complete byte numeric parameter, abbreviation: NUM. This type is suitable for parameters that occupy several consecutive complete bytes in the transmitted data frame and are represented in the form of unsigned integers. (1.2) Two's complement continuous complete byte numeric parameter, abbreviation: CNUM. This type is suitable for parameters that occupy several consecutive complete bytes in the transmitted data frame and are represented in two's complement mode. (1.3) Compressed BCD code continuous complete byte numeric parameter, abbreviation: BCDNUM. This type is suitable for parameters that occupy several consecutive complete bytes in the transmitted data frame and are represented by 4 binary numbers to represent the 10 digits 0 to 9 in 1 decimal number in the compressed BCD code. (1.4) Unsigned consecutive bit digital parameter, abbreviation: BITNUM. This type is suitable for parameters that occupy several consecutive bits in the transmitted data frame and are represented in the form of unsigned integers. (1.5) Signed consecutive bit digital parameter, abbreviation: SBITNUM. This type is suitable for selecting several consecutive bits as sign bits in several consecutive bytes. The definition of the sign bit is given in advance. Several consecutive bits in the remaining range are selected as data area. The data area is transmitted in the form of unsigned integers. The sign of the final parameter result is determined by the sign bit, and the absolute value is determined by the data area. (1.6) Two's complement consecutive bit digital parameter, abbreviation: CBITNUM. This type is suitable for parameters that occupy several consecutive bits in the transmitted data frame and are transmitted in two's complement mode. (1.7) Continuous complete byte character parameter, abbreviation: CHAR. This type is suitable for parameters that occupy several consecutive complete bytes in the transmitted data frame, and their meaning is determined by the unsigned integer value they represent. (1.8) Consecutive bit character type parameter, abbreviation: BITCHAR. This type is suitable for parameters that occupy several consecutive bits in the transmitted data frame, and their meaning is determined by the unsigned integer value they represent. (1.9) ASCII character type parameter, abbreviation: ASCII. This type is suitable for parameters that occupy several consecutive complete bytes in the transmitted data frame and whose meaning is represented in ASCII mode. (1.10) Comparison parameter, abbreviation: COMP. This type is applicable to the result of comparing the results of two numeric parameters. If the values are equal, it returns "same"; if the values are not equal, it returns "different". (1.11) Operational parameter, abbreviation: CALC. This type is applicable to the result of a certain operation on two numeric parameters, which is used as the parameter of the parameter result.
3. The general data parsing method for UAV ground command and control systems according to claim 1, characterized in that: Step (2) specifically includes the following steps: (2.1) Each parameter contains the following characteristic attributes: parameter number, number of parameter conditions, parameter condition, parameter name, parameter type, parameter unit, parameter starting byte sequence number, number of bytes occupied by the parameter, parameter value range, formula number, formula parameter, number of bits retained in the parameter result, parameter starting bit sequence number, percentage of the parameter, percentage of the sign bit, positive and negative definition of the sign bit, number of sub-parameters, sub-parameter name, sub-parameter value, parameter sequence number to be processed, and ASCII code parameter type; among them, the parameter condition represents the condition that the current parameter must meet to be valid, and the condition is represented as "(n, x)", where n represents the condition parameter sequence number, x represents the condition parameter value, and n must be less than the sequence number of the current parameter, that is, the parameter with condition parameter sequence number n is valid when the value is x, and the parameter condition number is 0 and is not filled in; the parameter type is one of the 11 types of parameters described in (1.1)-(1.11), and its abbreviation is the parameter type; (2.2) For the 11 types of parameters, the correspondence between each type of parameter and the feature attribute information to be entered is as follows: CHAR type requires the following feature attributes: parameter number, number of parameter conditions, parameter condition, parameter name, parameter type, parameter unit, number of sub-parameters, sub-parameter name, and sub-parameter value; ASCII type requires the following feature attributes: parameter number, number of parameter conditions, parameter condition, parameter name, parameter type, parameter unit, and ASCII code parameter type; BITCHAR type requires the following feature attributes: parameter number, number of parameter conditions, parameter condition, parameter name, parameter type, parameter unit, number of sub-parameters, parameter starting bit sequence, parameter percentage, sub-parameter name, and sub-parameter value; NUM, CNUM, and BCDNUM types require the following feature attributes: parameter number, number of parameter conditions, parameter condition, parameter name, parameter type, parameter unit, parameter range, formula number, formula parameter, and number of digits retained in the parameter result; BITN The UM and CBITNUM types require the following characteristic attributes: parameter number, number of parameter conditions, parameter conditions, parameter name, parameter type, parameter unit, parameter start bit sequence number, percentage of the parameter, parameter range, formula number, formula parameter, and number of bits to retain in the parameter result; the SBITNUM type requires the following characteristic attributes: parameter number, number of parameter conditions, parameter conditions, parameter name, parameter type, parameter unit, start bit sequence number of the sign bit, percentage of the sign bit, positive / negative definition of the sign bit, parameter start bit sequence number, percentage of the parameter, parameter range, formula number, formula parameter, and number of bits to retain in the parameter result; the COMP type requires the following characteristic attributes: parameter number, number of parameter conditions, parameter conditions, parameter name, parameter type, parameter unit, and parameter number to be processed; the CALC type requires the following characteristic attributes: parameter number, number of parameter conditions, parameter conditions, parameter name, parameter type, parameter unit, parameter number to be processed, formula parameter, and number of bits to retain in the parameter result.