Unmanned aerial vehicle testing tools, methods, devices, storage media, and program products
By establishing an interoperability stimulus response tree for UAV communication protocols, generating and sending stimulus data packets, and determining the interoperability level of UAVs, the standardization problem of interoperability testing between UAV formations is solved, and efficient and accurate test results are achieved.
Patent Information
- Application Number
- CN202410794875.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-09-05
AI Technical Summary
The lack of standardized guidelines and mature tools for interoperability testing of UAV communication protocols makes interoperability testing between UAV formations difficult.
This invention provides a drone testing tool and method that establishes an interoperability stimulus-response tree based on a communication protocol, including a stimulus module and a response module, generates and sends stimulus data packets, and determines the interoperability level of the drone.
This achievement standardizes interoperability testing of UAV communication protocols, ensuring accurate test results and improving the efficiency and accuracy of interoperability testing.
Smart Images

Figure CN118850359B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of high-end equipment diagnosis testing, in particular, the present application relates to a kind of unmanned aerial vehicle test tool, method, equipment, storage medium and program product. BACKGROUND
[0002] With the rapid development of unmanned aerial vehicle technology, the formation of unmanned aerial vehicle is larger and larger, more and more unmanned aerial vehicles in formation, the interoperability between each other is more and more complex, in order to let the formation of unmanned aerial vehicle can be correctly interconnected, intercommunication, interoperation, need to carry out comprehensive interoperability test between unmanned aerial vehicles.
[0003] The interoperability between unmanned aerial vehicles is realized by the communication protocol between each other, and the communication protocol is the basis of interconnection, intercommunication and interoperation. The interoperability test of unmanned aerial vehicle is actually the interoperability test of communication protocol, and the interoperability test of communication protocol is based on protocol conformance test, and protocol conformance test is a necessary step to ensure interoperability. Only the communication protocol passing the protocol conformance test can be tested for interoperability. The purpose of communication protocol interoperability test is to verify whether the expected interaction result or response can be obtained when multiple unmanned aerial vehicles communicate through the protocol.
[0004] The interoperability test of unmanned aerial vehicle communication protocol has very strict requirements for the standardization of test data packet. From the timing of communication protocol to the test coverage of data packet, there are strict specifications. At present, there is lack of such guidance method and mature tool conforming to the interoperability test specification of unmanned aerial vehicle communication protocol. SUMMARY
[0005] The present application is aimed at the shortcomings of the prior art, and proposes an unmanned aerial vehicle test tool, method, equipment, storage medium and program product based on unmanned aerial vehicle communication protocol, for testing the interoperability of unmanned aerial vehicle, which can accurately describe the whole process of communication protocol interoperability test, the test result is accurate, and can be used as a standardized method and tool for standardizing the interoperability test of unmanned aerial vehicle communication protocol.
[0006] In a first aspect, an unmanned aerial vehicle test tool is provided, which establishes an interoperability excitation response tree based on the communication protocol of the unmanned aerial vehicle to be tested and tests the interoperability performance of the unmanned aerial vehicle. The communication protocol includes a plurality of parameters. The test tool includes an excitation module and a response module. The interoperability excitation response tree of the communication protocol includes an interoperability excitation tree set in the excitation module and an interoperability response tree set in the response module. The interoperability excitation tree includes a communication protocol excitation tree and a protocol parameter excitation tree. The interoperability response tree includes a communication protocol response tree and a protocol parameter response tree.
[0007] The excitation module is configured to generate excitation timing of each communication protocol based on the communication protocol excitation tree according to the input instruction, determine each parameter value and determine the legal association relationship between the parameter values based on the protocol parameter excitation tree according to the input instruction, the excitation timing includes a plurality of excitation time points, the excitation module is further configured to generate a plurality of excitation data packets in accordance with the legal association relationship based on the parameter values according to the input instruction, and each excitation data packet is assigned an excitation time point, and the excitation timing and the plurality of excitation data packets are sent to the unmanned aerial vehicle to be tested, so that the unmanned aerial vehicle to be tested performs interoperability testing according to the excitation timing and the plurality of excitation data packets to generate a test result, the test result includes a test timing and a plurality of response data packets, the test timing includes a plurality of actual response time points, the response data packet includes a plurality of response values, and each response data packet has an actual response time point;
[0008] The response module is configured to obtain the test result, write the test timing into the communication protocol response tree, determine whether the actual response time point conforms to an expected response time point based on the communication protocol response tree, write the response value into the protocol parameter response tree and determine whether the response value conforms to the expected response value based on the protocol parameter response tree, thereby determining the interoperability level of the unmanned aerial vehicle to be tested, and the expected response time point and the expected response value are determined according to known data of the unmanned aerial vehicle to be tested.
[0009] In a second aspect, the embodiments of the present application provide a method for testing an unmanned aerial vehicle, which establishes an interoperability excitation response tree based on a communication protocol of the unmanned aerial vehicle to be tested and tests the interoperability performance of the unmanned aerial vehicle, the communication protocol includes a plurality of parameters, and the interoperability excitation response tree of the communication protocol includes an interoperability excitation tree and an interoperability response tree, the interoperability excitation tree includes a communication protocol excitation tree and a protocol parameter excitation tree, and the interoperability response tree includes a communication protocol response tree and a protocol parameter response tree; the testing method includes:
[0010] Generating excitation timing of each communication protocol based on the communication protocol excitation tree according to the input instruction;
[0011] Determining each parameter value and determining the legal association relationship between the parameter values based on the protocol parameter excitation tree according to the input instruction, and the excitation timing includes a plurality of excitation time points;
[0012] According to the input instruction, a plurality of excitation data packets conforming to a legal association relationship are generated based on the values of the parameters, and each of the excitation data packets is assigned with an excitation time point, and the excitation time sequence and the plurality of excitation data packets are sent to the unmanned aerial vehicle to be tested, so that the unmanned aerial vehicle to be tested performs interoperability testing according to the excitation time sequence and the plurality of excitation data packets to generate a test result, the test result includes a test time sequence and a plurality of response data packets, the test time sequence includes a plurality of actual response time points, the response data packets include a plurality of response values, and each of the response data packets has an actual response time point;
[0013] The test result is obtained, the test time sequence is written into the communication protocol response tree, and whether the actual response time points conform to expected response time points is determined based on the communication protocol response tree;
[0014] The response values are written into the protocol parameter response tree, and whether the response values conform to expected response values is determined based on the protocol parameter response tree, so as to judge the interoperability level of the unmanned aerial vehicle to be tested, and the expected response time points and the expected response values are determined according to known data of the unmanned aerial vehicle to be tested.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor; the memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, and the computer programs / instructions are executed by the processor to realize the steps of the above method.
[0016] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer programs / instructions, and the computer programs / instructions are executed by the processor to realize the steps of the above method.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed by the processor to realize the steps of the above method.
[0018] The technical scheme provided by the embodiment of the present application has the beneficial technical effects that:
[0019] The unmanned aerial vehicle testing tool, method, device, storage medium and program product provided by the embodiment of the present application, the communication protocol excitation response tree can accurately describe the whole process of the communication protocol interoperability testing, the test result is accurate, and can be used as a standardized method and tool for standardizing the unmanned aerial vehicle communication protocol interoperability testing.
[0020] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS
[0021] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of embodiments, taken in conjunction with the accompanying drawings in which:
[0022] Figure 1 A structural schematic diagram of a UAV test tool provided for an embodiment of the present application;
[0023] Figure 2 A structural schematic diagram of another UAV test tool provided for an embodiment of the present application;
[0024] Figure 3 A structural schematic diagram of still another UAV test tool provided for an embodiment of the present application;
[0025] Figure 4 A structural schematic diagram of an interoperation excitation response tree of a UAV provided for an embodiment of the present application;
[0026] Figure 5 A schematic diagram of a communication protocol excitation tree provided for an embodiment of the present application;
[0027] Figure 6 A schematic diagram of a protocol parameter excitation tree provided for an embodiment of the present application;
[0028] Figure 7 A schematic diagram of a communication protocol response tree provided for an embodiment of the present application;
[0029] Figure 8 A schematic diagram of a protocol parameter response tree provided for an embodiment of the present application;
[0030] Figure 9 A flowchart of a UAV test method provided for an embodiment of the present application.
[0031] Reference Signs:
[0032] 1 - test tool; 11 - excitation module; 111 - first excitation submodule; 112 - second excitation submodule; 113 - first communication interface; 12 - response module; 121 - first response submodule; 122 - second response submodule; 123 - second communication interface
[0033] 2 - UAV to be tested; 21 - test communication interface. DETAILED DESCRIPTION
[0034] The present application is described in detail below, examples of embodiments of the present application are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar components or components having the same or similar functions throughout. In addition, if a detailed description of the known art is unnecessary for the features of the present application shown, it is omitted. The embodiments described below by reference to the accompanying drawings are exemplary, only for explaining the present application, and cannot be interpreted as a limitation of the present application.
[0035] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with meanings in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such.
[0036] Those skilled in the art can understand that, unless otherwise stated, the singular form "a", "an" and "the" used herein also includes the plural form. It should be further understood that the phrase "comprising" used in the specification of the present application means that the features, integers, steps and / or operations exist, but does not exclude the presence or addition of one or more other features, integers, steps, operations and / or their groups.
[0037] The interoperability test of the UAV communication protocol has very strict requirements for the normalization of test data packets. From the timing of the communication protocol to the test coverage of the data packet, there are strict specifications. At present, there is a lack of such guidance methods and mature tools that meet the interoperability test specifications of the UAV communication protocol. Therefore, how to realize the normalization and standardization of the interoperability test of the UAV communication protocol is a technical problem to be solved in the field.
[0038] Based on the above technical problems, the UAV test tool, method, equipment, storage medium and program product provided by the embodiments of the present application are used to test the interoperability of the UAV, which can accurately describe the whole process of the communication protocol interoperability test, the test result is accurate, and can be used as a standardized method and tool for standardizing the UAV communication protocol interoperability test.
[0039] The present embodiment provides a UAV test tool, which establishes an interoperability excitation response tree based on a UAV communication protocol to be tested and tests the interoperability performance of the UAV, and the communication protocol includes a plurality of parameters.
[0040] As Figure 1As shown, the test tool 1 provided by the embodiment includes an excitation module 11 and a response module, and the interoperability excitation-response tree of the communication protocol includes an interoperability excitation tree arranged in the excitation module 11 and an interoperability response tree arranged in the response module. The interoperability excitation tree includes a communication protocol excitation tree and a protocol parameter excitation tree, and the interoperability response tree includes a communication protocol response tree and a protocol parameter response tree.
[0041] The excitation module 11 is configured to generate an excitation time sequence of each communication protocol based on the communication protocol excitation tree according to the input instruction, determine the values of each parameter based on the protocol parameter excitation tree according to the input instruction, and determine the legal association relationship between the values of each parameter. The excitation time sequence includes a plurality of excitation time points. The excitation module 11 is further configured to generate a plurality of excitation data packets in accordance with the legal association relationship based on the values of the parameters according to the input instruction, assign each excitation data packet with an excitation time point, and send the excitation time sequence and the plurality of excitation data packets to the unmanned aerial vehicle 2 to be tested, so that the unmanned aerial vehicle 2 to be tested performs interoperability testing according to the excitation time sequence and the plurality of excitation data packets to generate a test result. The test result includes a test time sequence and a plurality of response data packets. The test time sequence includes a plurality of actual response time points. The response data includes a plurality of response values, and each response data packet has an actual response time point.
[0042] The response module is configured to obtain the test result, write the test time sequence into the communication protocol response tree, determine whether the actual response time point conforms to the expected response time point based on the communication protocol response tree, write the response value into the protocol parameter response tree, and determine whether the response value conforms to the expected response value based on the protocol parameter response tree, so as to judge the interoperability level of the unmanned aerial vehicle 2 to be tested. The expected response time point and the expected response value are determined according to the known data of the unmanned aerial vehicle to be tested.
[0043] Specifically, the known data of the unmanned aerial vehicle to be tested includes the manufacturer, model, material and model of each structure, principle of operation of each structure, etc. of the unmanned aerial vehicle to be tested, and the flight speed, load capacity, navigation, load capacity, etc. of the unmanned aerial vehicle to be tested have clear data range. According to the above known data of the unmanned aerial vehicle, the expected response time point and the expected response value of the unmanned aerial vehicle to be tested can be determined.
[0044] Specifically, the test tool 1 provided by the embodiment can comprehensively test the interoperability performance of the inertial navigation, air machine, GPS, altimeter, rudder and motor, etc. in the unmanned aerial vehicle 2 to be tested.
[0045] The unmanned aerial vehicle 2 to be tested includes a test communication interface 21 for receiving the excitation time sequence and the excitation data packet sent by the excitation module 11, and sending the generated test time sequence and response data packet to the response module 12 after the unmanned aerial vehicle 2 to be tested completes the interoperability testing according to the excitation time sequence and the excitation data packet.
[0046] As Figure 2 shown, the unmanned aerial vehicle test tool 1 provided by the embodiment further includes an analysis module configured to analyze information of the communication protocol in the description file according to the input instruction, the information of the communication protocol including a name of the communication protocol, interface information of the communication protocol, frame header information of the communication protocol, parameter information of the communication protocol, and check information of the communication protocol.
[0047] Specifically, when analyzing the parameter information of the communication protocol, the value type (for example, integer, floating point, enumeration) of the parameter information, the value length (for example, single byte, double byte, four bytes), the value range, the unit, and the resolution are analyzed in sequence. Taking the flight speed parameter as an example, the value type of the flight speed parameter is integer, the value length is double byte, the value range is 0-500, the unit is m / s, and the resolution is 0.1.
[0048] As Figure 3 and Figure 4 shown, in the unmanned aerial vehicle test tool 1 provided by the embodiment, the excitation module 11 includes a communication protocol excitation tree and a first communication interface 113, and the communication protocol excitation tree includes a first excitation submodule 111 and a second excitation submodule 112.
[0049] As Figure 3 and Figure 4 shown, specifically, the first excitation submodule 111 is configured to generate an excitation time table including a plurality of excitation time points on the communication protocol excitation tree according to the input minimum step time and maximum time point, and determine the timing relationship between the communication protocols during the interoperability test as the excitation timing of each communication protocol. For example, Figure 5 As shown in the communication protocol excitation tree, n-1 the generated excitation time table includes at most tn n-1 -t0 / (t1-t0) excitation time points, and the timing relationship between the communication protocols during the interoperability test is set in the excitation time table as the excitation timing, wherein Figure 5 the dot in t j (1≤j≤n) represents the excitation of the current communication protocol data packet.
[0050] As Figure 3 and Figure 4As shown, specifically, the second excitation submodule 112 is configured to determine the values of the parameters on the parameter protocol tree according to the value range of the parameters and the input offset rate, determine the legal association relationship between the values of the parameters according to the input instruction, and generate a plurality of excitation data packets conforming to the legal association relationship based on the values of the parameters by using the association search algorithm according to the input instruction, and assign each excitation data packet with an excitation time.
[0051] As shown in Figure 3 and Figure 4 As shown, specifically, the first communication interface 113 is configured to send the excitation time sequence and the excitation data packets to the unmanned aerial vehicle 2 to be tested. Specifically, the first communication interface 113 includes a fiber interface, an RS485 interface and / or a CAN bus interface, so as to adapt to multiple types of unmanned aerial vehicles using different communication modes.
[0052] As shown in Figure 3 and Figure 4 As shown in one specific embodiment, the parameter information of the communication protocol includes a parameter value range a~b, and the second excitation submodule 112 is specifically configured to determine the values of the parameters according to the parameter value range and the input offset rate. Specifically, the values of the parameters are within the range defined by the initial base value of the parameters. The initial base value is shown in Table 1, and the initial base value includes the standard value and the positive and negative offset value of the upper limit, the standard value and the positive and negative offset value of the median value, and the standard value and the positive and negative offset value of the lower limit.
[0053] Table 1 Initial base value table
[0054]
[0055] Specifically, the second excitation submodule 112 is also specifically configured to select additional values by interval step value method, interval random value method or function generation method while determining the initial base value of the root to determine the values of the parameters, and the values of the parameters are within the range defined by the initial base value of the parameters and the additional values of the parameters.
[0056] The interval step value method is to generate additional values one by one according to the step value by setting the upper and lower limits and the step value of the value interval; the interval random value method is to randomly generate additional values in the interval by setting the upper and lower limits and the number of values of the interval; the function generation method is to generate the values of y as additional values according to the definition domain of x by setting the function relationship y=f(x). The additional values are also included in the value set.
[0057] As shown in Figure 3 and Figure 4As shown, specifically, the second excitation submodule 112 is specifically configured to describe the correlation between the values of each parameter, and verify whether each correlation has compatibility, if yes, it is a legal correlation, otherwise, it is an illegal correlation; if each correlation is verified as an illegal correlation, the correlation between the values of each parameter is described again.
[0058] It should be noted that in some specific embodiments, some parameters do not have a correlation relationship with other parameters, and these parameters are considered as independent parameters, and the independent parameters do not need to establish a correlation relationship with other parameters, nor need to verify whether the correlation relationship has compatibility.
[0059] In one specific embodiment, the description format of the correlation relationship is:
[0060] (a1≤parameter value 1≤b1)and(a2≤parameter value 2≤b2)and…and(aq≤parameter value q≤bq); where q represents that there are q associated parameters, aj and bj represent the upper and lower limits of parameter j in this correlation relationship. If q parameters can take values that satisfy this correlation relationship, the correlation relationship is a legal correlation relationship.
[0061] In one specific embodiment, the communication protocol includes P parameters, and the number of values of each parameter is m1 to m p , and the value range of each parameter is v1 to v p ; the second excitation submodule 112 is also specifically configured to generate an instruction of N excitation data packets according to the input requirement, randomly select a value from the value range of the first parameter as the value of the first parameter to generate the first excitation data packet; traverse the value range of the i-th parameter, select a value that satisfies the legal correlation as the value of the i-th parameter to generate the i-th excitation data packet, i is an integer greater than or equal to 2 and less than or equal to p; determine whether i is equal to N, if yes, complete the generation of the excitation data packet, otherwise randomly select another value from the value range of the first parameter; after completing the excitation data packet, an excitation time is assigned to each excitation data packet according to the instruction.
[0062] The parameter value table is as shown in Figure 6 , which has N rows in total, indicating N excitation data packets, the left side of each row is the serial number, and the dots below each parameter in each row indicate the value of the parameter in the excitation data packet, which is the value directly above the dot. In each row, there is only one dot below each parameter, indicating that the parameter in each excitation data packet can only have one value.
[0063] Specifically, the second excitation submodule 112 is specifically configured to assign a test time to each excitation data packet in the protocol parameter tree, as shown in Figure 4As shown, the right side of each test stimulus package in the figure is marked with the stimulus time of the test stimulus package, which corresponds to one of the n stimulus moments in the communication protocol tree. The N test stimulus packages correspond to one of the stimulus moments.
[0064] The above embodiment describes the stimulus module 11 in the test tool 1 in detail, and the following embodiment describes the response module in the test tool 1 in detail.
[0065] In the test tool 1 provided in the embodiment, the response module includes a response module and a second communication interface 123, and the response module includes a first response submodule 121 and a second response submodule 122.
[0066] As shown in Figure 3 and Figure 4 In the test tool 1 provided in the embodiment, the second communication interface 123 is configured to obtain the test results of the unmanned aerial vehicle 2 to be tested. Specifically, the first communication interface 113 includes a fiber interface, an RS485 interface, and / or a CAN bus interface, so as to adapt to multiple types of unmanned aerial vehicles that use different communication methods.
[0067] As shown in Figure 3 and Figure 4 In the test tool 1 provided in the embodiment, the first response submodule 121 is configured to determine the time difference between the actual response moment and the expected actual response moment of the same communication protocol based on the communication protocol response tree, and determine whether the time difference is within the required range. If yes, the actual response moment meets the expected response moment, otherwise the actual response moment does not meet the expected response moment.
[0068] Specifically, as shown in Figure 7 , Figure 7 The larger diameter circle is used to mark the expected response moment, and the smaller diameter black circle is used to represent that the actual response moment of the communication protocol is consistent with the expected response moment, that is, it passes the test. The smaller diameter circle filled with diagonal lines and the smaller diameter circle filled with grid represent that the actual response moment is not consistent with the expected response moment, wherein the actual response moment exceeding the required range is represented by the smaller diameter circle filled with diagonal lines, and the actual response moment not exceeding the required range is represented by the smaller diameter circle filled with grid. In one specific embodiment, the expected response moment is tp, and the range that meets the requirement of the expected response moment is Δt = [tp x 0.9, tp x 1.1]. If the actual response moment is within this range and not equal to tp, the smaller diameter circle filled with grid is used to represent it, and if it is not within this range, the smaller diameter circle filled with diagonal lines is used to represent it.
[0069] As shown in Figure 3 and Figure 4As shown, the second response submodule 122 in the test tool 1 provided by the embodiment is configured to determine the difference between the response value and the expected response value of the same communication protocol based on the protocol parameter response tree, and determine whether the difference is within the required range. If yes, the response value meets the expected response value; otherwise, the response value does not meet the expected response value.
[0070] Specifically, the interoperability level of the to-be-tested unmanned aerial vehicle 2 is determined based on whether the time difference between the actual response time and the expected response time meets the requirement range and whether the difference between the response value and the expected response value meets the requirement range. Wherein, the smaller the time difference between the actual response time and the expected response time, and the smaller the difference between the response value and the expected response value, the higher the interoperability level of the to-be-tested unmanned aerial vehicle 2.
[0071] Specifically, as shown, Figure 8 Figure 8 The larger diameter circle point is used to represent the expected response value, and the smaller diameter black circle point is used to represent that the actual response value of the data packet is consistent with the expected response value, that is, it passes the test. The smaller diameter circle point filled with diagonal lines and the smaller diameter circle point filled with grid represent that the actual response value is inconsistent with the expected response value, wherein the expected response value is represented by the smaller diameter circle point filled with diagonal lines, the value near the expected response value and not equal to the expected response value is represented by the smaller diameter circle point filled with grid, the smaller diameter circle point filled with grid on the right side of the larger diameter circle point represents that the actual response value is greater than the expected response value, and the smaller diameter circle point filled with grid on the left side of the larger diameter circle point represents that the actual response value is less than the expected response value.
[0072] The unmanned aerial vehicle test tool 1 provided by the embodiment provides a man-machine friendly interface design function for the tester, supports the interoperability test of the general unmanned aerial vehicle communication protocol, can greatly improve the efficiency of the interoperability test, and has important significance for the evaluation and verification of the unmanned aerial vehicle communication protocol interoperability test. In the interoperability test of multiple communication protocols, rapid, efficient and accurate interoperability test can be realized.
[0073] Based on the same inventive concept, the embodiment of the present application further provides an unmanned aerial vehicle test method for establishing an interoperability excitation response tree based on the communication protocol of a to-be-tested unmanned aerial vehicle and testing the interoperability performance of the unmanned aerial vehicle, wherein the communication protocol includes a plurality of parameters; the interoperability excitation response tree of the communication protocol includes an interoperability excitation tree and an interoperability response tree, the interoperability excitation tree includes a communication protocol excitation tree and a protocol parameter excitation tree, and the interoperability response tree includes a communication protocol response tree and a protocol parameter response tree.
[0074] As shown, Figure 9 The test method provided by the embodiment includes:
[0075] S1: generating the stimulus timing of each communication protocol based on the communication protocol stimulus tree according to the input instruction.
[0076] Specifically, step S1 specifically comprises: generating the stimulus schedule including a plurality of stimulus time points on the communication protocol stimulus tree according to the input minimum step time and maximum time point, and determining the time sequence relationship between each communication protocol during the interoperability test as the stimulus timing of each communication protocol. For example, Figure 5 In the illustrated communication protocol stimulus tree, the minimum step time is t1-t0, and the maximum time point is t n-1 The generated stimulus schedule includes at most tn n-1 -t0 / (t1-t0) stimulus time points, and the time sequence relationship between each communication protocol during the interoperability test is set in the stimulus schedule as the stimulus timing, wherein, Figure 5 The dot in t j (1≤j≤n) represents stimulating the current communication protocol data packet.
[0077] S2: determining the parameter value of each parameter and determining the legal association relationship between the parameter values based on the protocol parameter stimulus tree according to the input instruction, and the stimulus timing includes a plurality of stimulus time points.
[0078] Specifically, step S2 comprises: determining the value of each parameter on the parameter protocol tree according to the parameter value range and the input offset rate, and determining the legal association relationship between the values of each parameter according to the input instruction.
[0079] In one specific embodiment, the parameter information of the communication protocol includes a parameter value range a~b, and the second stimulus submodule is specifically configured to determine the initial base value according to the parameter value range and the input offset rate, thereby determining the value of the parameter. Specifically, the value of the parameter is within the range defined by the initial base value of the parameter. The initial base value is shown in Table 1, and the initial base value includes the standard value and the positive and negative offset value of the upper limit, the standard value and the positive and negative offset value of the median, and the standard value and the positive and negative offset value of the lower limit.
[0080] Specifically, step S2 further comprises: while determining the initial base value of the root to determine the value of the parameter, selecting additional values by interval step value method, interval random value method or function generation method, and the value of the parameter is within the range defined by the initial base value of the parameter and the additional value of the parameter.
[0081] Specifically, step S2 further comprises: describing the association relationship between the values of each parameter, and verifying whether each association relationship has compatibility, if yes, it is a legal association relationship, otherwise it is an illegal association relationship; if each association relationship is verified as an illegal association relationship, the association relationship between the values of each parameter is described again.
[0082] It should be noted that in some specific embodiments, there is no correlation between some parameters and other parameters, and these parameters are considered as independent parameters, and the independent parameters do not need to establish a correlation relationship with other parameters, nor need to verify whether the correlation relationship has compatibility.
[0083] In one specific embodiment, the description format of the correlation relationship is:
[0084] (a1≤ parameter value 1 ≤ b1) and (a2≤ parameter value 2 ≤ b2) and … and (aq≤ parameter value q ≤ bq); where q represents that there are q associated parameters, aj and bj represent the upper and lower limits of parameter j in this correlation relationship. If q parameters can take values that satisfy the correlation relationship, the correlation relationship is a legal correlation relationship.
[0085] S3: generating a plurality of incentive data packets in accordance with the input instruction based on the parameter values, and assigning an incentive time to each incentive data packet, and sending the incentive time sequence and the plurality of incentive data packets to the unmanned aerial vehicle to be tested, so that the unmanned aerial vehicle to be tested performs interoperability testing according to the incentive time sequence and the plurality of incentive data packets to generate a test result, the test result including a test time sequence and a plurality of response data packets, the test time sequence including a plurality of actual response times, and each response data packet having an actual response time.
[0086] Specifically, the communication protocol includes P parameters, and the number of values of each parameter is m1 to m p , and the value range of each parameter is v1 to v p . Based on this, step S3 includes:
[0087] S301: according to the input instruction of generating N incentive data packets, randomly selecting a value from the value range of the first parameter as the value of the first parameter to generate the first incentive data packet.
[0088] S302: traversing the value range of the ith parameter, selecting a value that satisfies the legal correlation relationship as the value of the ith parameter to generate the ith incentive data packet, i is an integer greater than or equal to 2 and less than or equal to p.
[0089] S303: determining whether i is equal to N, if yes, completing the generation of the incentive data packet, otherwise randomly selecting another value from the value range of the first parameter.
[0090] S304: after completing the generation of the incentive data packet, assigning an incentive time to each incentive data packet according to the instruction.
[0091] The parameter value table is as follows: Figure 6As shown, the table has N rows in total, indicating N stimulus data packets, the left side of each row is a serial number, and the dot under each parameter in each row indicates the value of the parameter in the stimulus data packet, and the value is the value directly above the dot. In each row, there is and only one dot under each parameter, indicating that the parameter in each stimulus data packet can only have one value.
[0092] S4: Obtain the test result, write the test timing into the communication protocol response tree, and determine whether the actual response time meets the expected response time based on the communication protocol response tree.
[0093] Specifically, step S4 includes determining the time difference between the actual response time and the expected actual response time of the same communication protocol based on the communication protocol response tree, and determining whether the time difference is within the required range. If yes, the actual response time meets the expected response time, otherwise the actual response time does not meet the expected response time.
[0094] As shown in Figure 7 , Figure 7 The larger diameter dot is used to mark the expected response time, and the smaller black dot is used to indicate that the actual response time of the communication protocol is consistent with the expected response time, i.e. passed the test. The smaller diameter dot filled with diagonal lines and the smaller diameter dot filled with grid indicate that the actual response time is inconsistent with the expected response time, wherein the actual response time and the expected response time are out of the required range, and the smaller diameter dot filled with diagonal lines is used to indicate that the actual response time is not within the required range. If it is not within the required range, the smaller diameter dot filled with grid is used to indicate. In a specific embodiment, the expected response time is tp, the range of the expected response time meeting the requirements is Δt = [tp x 0.9, tp x 1.1], and if the actual response time is within this range and not equal to tp, the smaller diameter dot filled with grid is used to indicate, and if it is not within this range, the smaller diameter dot filled with diagonal lines is used to indicate.
[0095] S5: Write the response value into the protocol parameter response tree and determine whether the response value meets the expected response value based on the protocol parameter response tree, so as to determine the interoperability level of the unmanned aerial vehicle to be tested. The expected response time and the expected response value are determined according to the known data of the unmanned aerial vehicle to be tested.
[0096] Specifically, step S5 includes determining the difference between the response value and the expected response value of the same communication protocol based on the protocol parameter response tree, and determining whether the difference is within the required range. If yes, the response value meets the expected response value, otherwise the response value does not meet the expected response value.
[0097] As shown in Figure 8 , Figure 8The larger diameter circle represents the expected response value, and the smaller diameter black circle represents that the actual response value of the data packet is consistent with the expected response value, i.e., the test is passed. The smaller diameter circle filled with diagonal lines and the smaller diameter circle filled with grids represent that the actual response value is inconsistent with the expected response value, wherein the expected response value is represented by the smaller diameter circle filled with diagonal lines, the value near the expected response value and not equal to the expected response value is represented by the smaller diameter circle filled with grids, the smaller diameter circle filled with grids on the right side of the larger diameter circle represents that the actual response value is greater than the expected response value, and the smaller diameter circle filled with grids on the left side of the larger diameter circle represents that the actual response value is less than the expected response value.
[0098] Specifically, the interoperability level of the to-be-tested unmanned aerial vehicle is determined based on whether the time difference between the actual response time and the expected response time meets the requirement range and whether the difference between the response value and the expected response value meets the requirement range. When the time difference between the actual response time and the expected response time is smaller, and the difference between the response value and the expected response value is smaller, the interoperability level of the to-be-tested unmanned aerial vehicle is higher.
[0099] Specifically, the communication protocol further includes a description file. Based on this, the test method provided by the embodiment further includes: parsing the information of the communication protocol in the description file according to the input instruction, and the information of the communication protocol includes the name of the communication protocol, the interface information of the communication protocol, the frame header information of the communication protocol, the parameter information of the communication protocol, and the verification information of the communication protocol.
[0100] Specifically, when the parameter information of the communication protocol is parsed, the value type (for example, integer, floating point, enumeration) of the parameter information, the value length (for example, single byte, double byte, four bytes), the value range, the unit and the resolution are parsed in sequence. Taking the flight speed parameter as an example, the value type of the flight speed parameter is integer, the value length is double byte, the value range is 0-500, the unit is m / s, and the resolution is 0.1.
[0101] The unmanned aerial vehicle test method provided by the embodiment supports the interoperability test of the general unmanned aerial vehicle communication protocol, can greatly improve the efficiency of the interoperability test, has important significance for the evaluation and verification of the unmanned aerial vehicle communication protocol interoperability test, and can realize rapid, efficient and accurate interoperability test in the interoperability test of multiple communication protocols.
[0102] Based on the same inventive concept, the embodiments of the present application further provide an electronic device, which comprises a memory and a processor; the memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which realize the steps of the UAV testing method in the above embodiments when executed by the processor. The electronic device has the beneficial effects of the UAV testing method in the above embodiments, which are not repeated here.
[0103] Based on the same inventive concept, the embodiments of the present application further provide a computer readable storage medium, which stores computer programs / instructions, which realize the steps of the UAV testing method in the above embodiments when executed by the processor. The computer readable storage medium has the beneficial effects of the UAV testing method in the above embodiments, which are not repeated here.
[0104] Based on the same inventive concept, the embodiments of the present application further provide a computer program product, which comprises computer programs / instructions, which realize the steps of the UAV testing method in the above embodiments when executed by the processor. The computer program product has the beneficial effects of the UAV testing method in the above embodiments, which are not repeated here.
[0105] Those skilled in the art can understand that the steps, measures and schemes in various operations, methods and processes discussed in the present application can be alternated, changed, combined or deleted. Further, other steps, measures and schemes in various operations, methods and processes discussed in the present application can also be alternated, changed, rearranged, decomposed, combined or deleted. Further, the steps, measures and schemes in the prior art with the various operations, methods and processes disclosed in the present application can also be alternated, changed, rearranged, decomposed, combined or deleted.
[0106] The terms "first", "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.
[0107] In the description of the present application, specific features, structures or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0108] It should be understood that although the steps in the flowcharts of the drawings are shown in a sequential order following the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated otherwise herein, the execution of the steps is not strictly limited to the order indicated by the arrows, and can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of which is not necessarily sequential, but can be round-robin or alternately executed with at least part of other steps or sub-steps or stages of other steps.
[0109] The above is only some embodiments of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should also be considered as the protection scope of the present application.
Claims
1. A drone testing tool that establishes an interoperability stimulus-response tree based on a communication protocol of a drone to be tested and tests an interoperability performance of the drone to be tested, the communication protocol including a plurality of parameters, characterized in that, The test tool comprises a stimulating module and a responding module, the interoperable stimulating and responding tree of the communication protocol comprises an interoperable stimulating tree arranged in the stimulating module and an interoperable responding tree arranged in the responding module, the interoperable stimulating tree comprises a communication protocol stimulating tree and a protocol parameter stimulating tree, and the interoperable responding tree comprises a communication protocol responding tree and a protocol parameter responding tree; The stimulating module is configured to generate stimulating time sequences of each communication protocol based on the communication protocol stimulating tree according to input instructions, determine values of each parameter and legal association relationships between the values of the parameters based on the protocol parameter stimulating tree according to input instructions, the stimulating time sequences comprise a plurality of stimulating time points, the stimulating module is further configured to generate a plurality of stimulating data packets conforming to the legal association relationships based on the values of the parameters according to input instructions, assign each stimulating data packet with a stimulating time point, and send the stimulating time sequences and the plurality of stimulating data packets to the unmanned aerial vehicle to be tested, so that the unmanned aerial vehicle to be tested performs interoperable testing according to the stimulating time sequences and the plurality of stimulating data packets to generate a test result, the test result comprises a test time sequence and a plurality of responding data packets, the test time sequence comprises a plurality of actual responding time points, the responding data packets comprise a plurality of responding values, and each responding data packet has an actual responding time point; The responding module is configured to acquire the test result, write the test time sequence into the communication protocol responding tree, determine whether the actual responding time points conform to expected responding time points based on the communication protocol responding tree, write the responding values into the protocol parameter responding tree and determine whether the responding values conform to expected responding values based on the protocol parameter responding tree, and thus determine an interoperability level of the unmanned aerial vehicle to be tested, the expected responding time points and the expected responding values are determined according to known data of the unmanned aerial vehicle to be tested.
2. The test tool of claim 1, wherein, The communication protocol further comprises a description file, and the test tool further comprises: a parsing module configured to parse information of the communication protocol in the description file according to input instructions, the information of the communication protocol comprising a name of the communication protocol, interface information of the communication protocol, frame header information of the communication protocol, parameter information of the communication protocol, and check information of the communication protocol.
3. The test tool of claim 2, wherein, The stimulating module comprises a communication protocol stimulating tree and a first communication interface, the communication protocol stimulating tree comprises a first stimulating submodule and a second stimulating submodule, and the parameter information comprises value ranges of the parameters; The first stimulating submodule is arranged to generate a stimulating time table comprising a plurality of stimulating time points on the communication protocol stimulating tree according to input minimum step times and maximum time points, and determine time sequence relationships between each communication protocol during interoperable testing as stimulating time sequences of each communication protocol; The second excitation submodule is configured to determine initial base values of the parameters and thus values of the parameters on the parameter protocol tree according to a value range of the parameters and an input offset rate, determine a legal association relationship between the values of the parameters according to an input instruction, and generate a plurality of the excitation data packets conforming to the legal association relationship based on the values of the parameters by using an association search algorithm according to the input instruction, and assign each of the excitation data packets with an excitation time point; The first communication interface is configured to send the excitation time sequence and the excitation data packets to the unmanned aerial vehicle to be tested.
4. The test tool of claim 3, wherein, The second excitation submodule is specifically configured to select additional values of the parameters by an interval step value method, an interval random value method or a function generation method while determining the initial base values of the parameters and thus the values of the parameters, and the values of the parameters are within a range defined by the initial base values of the parameters and the additional values of the parameters.
5. The test tool of claim 4, wherein, The communication protocol comprises P parameters, and the number of values of each parameter is m1 to m p , respectively p ; The second excitation submodule is further specifically configured to generate the N excitation data packets according to an input instruction, randomly select a value from a first parameter value range as a value of a first parameter to generate a first excitation data packet, traverse a value range of an i-th parameter, select a value satisfying the legal association relationship as a value of the i-th parameter to generate an i-th excitation data packet, i is an integer greater than or equal to 2 and less than or equal to p, judge whether i is equal to N, if yes, the generation of the excitation data packets is completed, otherwise, another value is randomly selected from the value range of the first parameter, and after the generation of the excitation data packets is completed, each of the excitation data packets is assigned with an excitation time point according to an instruction. The response module includes a response module and a second communication interface, the response module includes a first response submodule and a second response submodule; 6. The test tool of any one of claims 1-5, wherein, The second communication interface is configured to obtain a test result of the unmanned aerial vehicle to be tested; The first response submodule is configured to determine a time difference between the actual response time point and the expected actual response time point of the same communication protocol based on the communication protocol response tree, and determine whether the time difference is within a required range, if yes, the actual response time point conforms to the expected response time point, otherwise, the actual response time point does not conform to the expected response time point; The second response submodule is configured to determine a difference between the response value and the expected response value of the same communication protocol based on the protocol parameter response tree, and determine whether the difference is within a required range, if yes, the response value conforms to the expected response value, otherwise, the response value does not conform to the expected response value. The interoperation excitation response tree of the communication protocol includes an interoperation excitation tree and an interoperation response tree, the interoperation excitation tree includes a communication protocol excitation tree and a protocol parameter excitation tree, and the interoperation response tree includes a communication protocol response tree and a protocol parameter response tree; 7. A method of testing a drone, establishing an interoperability stimulus-response tree based on a communication protocol of a drone to be tested and testing an interoperability performance of the drone to be tested, the communication protocol comprising a plurality of parameters, characterized in that, The test method includes: generating excitation time sequences of the communication protocols based on the communication protocol excitation tree according to an input instruction; determining parameter values and determining legal association between parameter values based on the protocol parameter excitation tree according to input instructions, the excitation time sequence including a plurality of excitation time points; generating a plurality of excitation data packets conforming to the legal association based on the parameter values according to input instructions, and assigning each excitation data packet with an excitation time point, and sending the excitation time sequence and a plurality of excitation data packets to the unmanned aerial vehicle to be tested, so that the unmanned aerial vehicle to be tested performs interoperability testing according to the excitation time sequence and a plurality of excitation data packets to generate a test result, the test result including a test time sequence and a plurality of response data packets, the test time sequence including a plurality of actual response time points, the response data packet including a plurality of response values, and each response data packet having an actual response time point; acquiring the test result, writing the test time sequence into the communication protocol response tree, and determining whether the actual response time point conforms to an expected response time point based on the communication protocol response tree; writing the response value into the protocol parameter response tree and determining whether the response value conforms to the expected response value based on the protocol parameter response tree, thereby determining the interoperability level of the unmanned aerial vehicle to be tested, the expected response time point and the expected response value being determined according to known data of the unmanned aerial vehicle to be tested.
8. The test method of claim 7, wherein, The communication protocol further includes a description file, and the test method further includes: parsing the information of the communication protocol in the description file according to input instructions, the information of the communication protocol including the name of the communication protocol, the interface information of the communication protocol, the frame header information of the communication protocol, the parameter information of the communication protocol, and the verification information of the communication protocol.
9. The test method of claim 8, wherein, The parameter information includes the value range of the parameter. Generating the excitation time sequence of each communication protocol based on the communication protocol excitation tree according to input instructions, including: generating an excitation time table including a plurality of excitation time points on the communication protocol excitation tree according to input minimum step time and maximum time point, and determining the time sequence relationship between each communication protocol in the interoperability test as the excitation time sequence of each communication protocol.
10. The test method of claim 9, wherein, determining parameter values and determining legal association between parameter values based on the protocol parameter excitation tree according to input instructions, including: determining the initial base value of each parameter on the parameter protocol tree according to the value range of the parameter and the input offset rate, thereby determining the value of the parameter; describing the association between the values of each parameter, and verifying whether each association has compatibility, if yes, it is the legal association, otherwise it is an illegal association, and if each association is verified as an illegal association, the association between the values of each parameter is described again.
11. The test method of claim 10, wherein, determining the value of the parameter, also includes: The initial base value of each parameter is determined to determine the value of the parameter, and at the same time, the additional value of the parameter is selected by interval step value method, interval random value method or function generation method, and the value of the parameter is within the range defined by the initial base value of the parameter and the additional value of the parameter.
12. The test method of claim 11, wherein, According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter, comprising: According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm.
13. The test method of claim 12, wherein, The communication protocol comprises P parameters, and the number of values of each parameter is m1 to m p , respectively p ; According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm. According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm. According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm. According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm.
14. The test method according to any one of claims 7-13, characterized in that, According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm. According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm.
15. The test method of claim 14, wherein, According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm. According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm. According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm. According to the input instruction, a plurality of incentive data packets conforming to the legal association relationship are generated based on the value of the parameter by using an association search algorithm.
16. An electronic device, comprising: a memory and a processor; 17. A computer readable storage medium storing computer programs / instructions, characterized in that, the memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions; characterized in that, 18. A computer program product comprising computer programs / instructions, characterized in that, the computer programs / instructions are executed by the processor to implement the steps of the method of any one of claims 7-15. the computer programs / instructions are executed by the processor to implement the steps of the method of any one of claims 7-15. the computer programs / instructions are executed by the processor to implement the steps of the method of any one of claims 7-15. the computer programs / instructions are executed by the processor to implement the steps of the method of any one of claims 7-15.
Citation Information
Patent Citations
Protocol interoperability test method and device
CN107294807A
Unmanned aerial vehicle test method, simulation test platform and remote controller
CN116654285A