A protocol analysis test method, device, equipment and storage medium

Through automated testing procedures, the Internet of Vehicles is tested, generating and comparing simulation data, solving the problem of low efficiency and accuracy of artificial testing in existing technologies, and achieved efficient and accurate protocol analysis testing.

CN118509355BActive Publication Date: 2025-01-28LINGONG GROUP (JINAN) HEAVY MACHINERY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410955060.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2025-01-28
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

When the existing technology adds or changes the Internet of Vehicles protocol, it relies on manual testing, which is inefficient and prone to errors, and is difficult to repeat, which is not conducive to problem investigation and resolution.

Method used

Provide a protocol analysis test method. Through the automation testing program, obtain the networking agreement to be tested, generate standard simulation data, including testing data and expectation data. Data comparison, generate test report.

Benefits of technology

Reduced the assembly and analytical test work of the heavy agreement, reduced the workload of manual work, improved the efficiency of protocol analysis and testing, and ensured the accuracy and repetitiveness of the test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118509355B_ABST
    Figure CN118509355B_ABST
Patent Text Reader

Abstract

The present invention discloses a protocol analysis test method, device, equipment and storage medium. It includes: obtaining the Internet of Vehicles protocol to be tested, generating standard simulation data according to the Internet of Vehicles protocol to be tested; testing based on the test data and generating result data through the Internet of Vehicles platform; generating a test report of the Internet of Vehicles protocol to be tested according to the result data and expected data. The Internet of Vehicles protocol to be tested is obtained by judging the protocol status, and the protocol information is intelligently loaded by starting the automated test program to generate standard simulation data, which includes test data and expected data. The test data is sent to the Internet of Vehicles platform for protocol analysis, warehousing and other links, and then the automated test end extracts the result data and compares it with the expected data. A test report is generated according to the data comparison result, which reduces the heavy test work such as protocol assembly and analysis, reduces the manual workload, and improves the efficiency of protocol analysis testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a protocol parsing test method, device, equipment and storage medium. Background Art

[0002] In the construction machinery vehicle networking system, the data sent back by the terminal TBOX needs to be parsed and processed by the vehicle networking system before being stored and used in subsequent business logic. With the development of the Internet of Things industry technology, existing technologies have been able to achieve protocol parsing of protocol field mapping.

[0003] However, when a new protocol is added or a protocol change occurs, such as adding or modifying a protocol field, the traditional manual testing method is still used for testing the new / changed protocol. This method requires manual data splicing, and then sending it to the Internet of Vehicles platform through a CAN data simulation tool. After the Internet of Vehicles platform protocol is parsed, the stored data is queried and then manually compared to determine the correctness of the function.

[0004] However, the existing technology requires a lot of time and manpower to perform manual testing, which is inefficient and prone to errors. The results of manual testing are easily affected by human factors, resulting in inaccurate test results. The manual testing process is difficult to repeat, which is not conducive to the troubleshooting and resolution of problems. Summary of the invention

[0005] The present invention provides a protocol parsing test method, device, equipment and storage medium to perform automated testing on Internet of Vehicles protocols, thereby simplifying the testing process and improving testing efficiency.

[0006] According to one aspect of the present invention, a protocol parsing test method is provided, the method comprising:

[0007] Obtaining a vehicle networking protocol to be tested, and generating standard simulation data according to the vehicle networking protocol to be tested, wherein the standard simulation data includes test data and expected data;

[0008] Conduct tests based on test data through the Internet of Vehicles platform and generate result data;

[0009] Generate a test report for the Internet of Vehicles protocol to be tested based on the result data and expected data.

[0010] Optionally, obtaining the Internet of Vehicles protocol to be tested includes: determining the protocol status corresponding to each Internet of Vehicles protocol, wherein the protocol status includes a test status and a normal status; when the protocol status is a test status, using the Internet of Vehicles protocol as the Internet of Vehicles protocol to be tested.

[0011] Optionally, standard simulation data is generated according to the Internet of Vehicles protocol to be tested, including: parsing the Internet of Vehicles protocol to be tested according to preset parsing rules through an automated testing program to generate a parsed Internet of Vehicles protocol to be tested; performing field splitting on the parsed Internet of Vehicles protocol to be tested to generate various configuration fields, and performing data simulation based on the configuration fields to generate test data, wherein the configuration fields include relevant thresholds, carry and borrow bits, and a valid value range; determining expected data corresponding to each test data, and using each test data and the corresponding expected data as standard simulation data.

[0012] Optionally, the Internet of Vehicles platform is used to perform tests based on the test data and generate result data, including: connecting the simulation data with the specified address of the Internet of Vehicles platform to send the simulation data to the working condition data queue; performing data parsing and processing on the data in the working condition data queue through the Internet of Vehicles platform to generate processed data, and storing the processed data in a database to generate result data.

[0013] Optionally, a test report for the Internet of Vehicles protocol to be tested is generated based on the result data and the expected data, including: comparing the result data with the expected data to generate a data comparison result, wherein the data comparison result includes data consistency and data inconsistency; dividing the result data into normal data and difference data according to the data comparison result, and generating a test report based on the normal data and the difference data.

[0014] Optionally, the result data and expected data are compared to generate a data comparison result, including: extracting the result data from the database as target data in sequence according to a preset data mapping relationship; judging whether the target data is consistent with the corresponding expected data, and if so, determining that the data comparison result is data consistency; otherwise, determining that the data comparison result is data inconsistency.

[0015] Optionally, before obtaining the Internet of Vehicles protocol to be tested, the method further includes: when it is detected that the protocol version corresponding to the Internet of Vehicles protocol has changed, changing the protocol state of the Internet of Vehicles protocol from a normal state to a test state.

[0016] According to another aspect of the present invention, a protocol parsing test device is provided, the device comprising:

[0017] A standard simulation data generation module is used to obtain the Internet of Vehicles protocol to be tested and generate standard simulation data according to the Internet of Vehicles protocol to be tested, wherein the standard simulation data includes test data and expected data;

[0018] A result data generation module, used to perform testing based on the test data through the Internet of Vehicles platform and generate result data;

[0019] The test report generation module is used to generate a test report of the Internet of Vehicles protocol to be tested based on the result data and expected data.

[0020] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0021] at least one processor; and

[0022] a memory communicatively connected to the at least one processor; wherein,

[0023] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a protocol parsing test method described in any embodiment of the present invention.

[0024] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a protocol parsing test method described in any embodiment of the present invention when executed.

[0025] The technical solution of the embodiment of the present invention obtains the Internet of Vehicles protocol to be tested by judging the protocol status, and intelligently loads the protocol information by starting the automated test program to generate standard simulation data, which includes test data and expected data. The test data is then sent to the Internet of Vehicles platform for protocol parsing, warehousing, and other links. The automated test end then extracts the result data and compares it with the expected data, and generates a test report based on the data comparison results, thereby reducing heavy testing work such as protocol assembly and parsing, reducing manual workload, and improving the efficiency of protocol parsing testing.

[0026] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0028] Figure 1 is a flowchart of a protocol parsing test method provided according to Embodiment 1 of the present invention;

[0029] Figure 2 is a flowchart of another protocol parsing test method provided according to Embodiment 2 of the present invention;

[0030] Figure 3is a schematic diagram of the structure of a protocol parsing test device provided according to Embodiment 3 of the present invention;

[0031] Figure 4 The present invention is a schematic diagram of the structure of an electronic device for implementing a protocol analysis test method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Embodiment 1

[0035] Figure 1 A flowchart of a protocol analysis test method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where a protocol analysis test is performed on the TBOX end of a construction machinery vehicle networking system. The method can be performed by a protocol analysis test device, which can be implemented in the form of hardware and / or software. Figure 1 As shown, the method includes:

[0036] S110: Obtain the Internet of Vehicles protocol to be tested, and generate standard simulation data according to the Internet of Vehicles protocol to be tested, wherein the standard simulation data includes test data and expected data.

[0037] Among them, the Internet of Vehicles protocol refers to the rules and conventions used to regulate the communication between vehicles and terminal devices in the Internet of Vehicles, including data format, transmission method, interaction process, etc. The Internet of Vehicles protocol to be tested refers to the specific Internet of Vehicles protocol that needs to be tested and evaluated. Standard simulation data refers to data generated for simulation testing in accordance with the business standard format in the protocol. Test data refers to data used to input into the test process to verify the system's response to various situations. Expected data refers to the ideal result data that should be obtained for specific test data according to the protocol.

[0038] Specifically, the automated test program will obtain the Internet of Vehicles protocol to be tested, and generate standard simulation data based on the acquired Internet of Vehicles protocol to be tested. Standard simulation data includes test data and expected data. Test data is specially designed to be input into the test system to simulate various communication and interaction situations that may occur in actual scenarios. The expected data corresponds to the test data and is the ideal result expected according to the protocol regulations. The automated test program can determine the characteristics and requirements of the protocol based on the content of the protocol and generate various test cases, i.e. test data. The test data will cover the key functions, boundary conditions, and possible abnormal conditions of the Internet of Vehicles protocol to be tested to ensure comprehensive and in-depth testing of the Internet of Vehicles protocol. The automated test program runs on the automated test end and is a program that can automatically execute test cases and test the Internet of Vehicles protocol.

[0039] Optionally, obtaining the Internet of Vehicles protocol to be tested includes: determining the protocol status corresponding to each Internet of Vehicles protocol, wherein the protocol status includes a test status and a normal status; when the protocol status is a test status, using the Internet of Vehicles protocol as the Internet of Vehicles protocol to be tested.

[0040] Specifically, the automated test program will monitor each Internet of Vehicles protocol to determine the protocol status corresponding to the Internet of Vehicles protocol. The protocol status includes the test status and the normal status. The test status means that the Internet of Vehicles protocol is in the stage where it needs to be tested, while the normal status means that the protocol is running normally and does not need to be tested. Furthermore, when it is detected that the protocol status of a certain Internet of Vehicles protocol is the test status, the automated test program will treat it as the Internet of Vehicles protocol to be tested and start the test program.

[0041] Optionally, before obtaining the Internet of Vehicles protocol to be tested, the method further includes: when it is detected that the protocol version corresponding to the Internet of Vehicles protocol has changed, changing the protocol state of the Internet of Vehicles protocol from a normal state to a test state.

[0042] Specifically, when it is detected that the protocol version corresponding to the Internet of Vehicles protocol has changed, that is, it is different from the previous protocol version, such as the protocol is added or modified. At this time, the Internet of Vehicles protocol will be adjusted from the normal state to the test state.

[0043] It should be noted that the original Internet of Vehicles protocol may have been in normal operation and use. However, once a change in the protocol version is detected, in order to ensure that the new protocol version can run correctly and effectively, as well as its compatibility and adaptability with other related parts, the protocol status needs to be switched to the test status. In the test status, the automated test program will conduct a comprehensive protocol parsing test to determine whether the updated protocol version meets various requirements and whether it can run stably and reliably in actual application scenarios, so as to promptly discover and resolve possible problems and ensure the normal and efficient operation of the entire Internet of Vehicles system.

[0044] In addition, users can also set the test cycle according to test requirements, and the protocol status will change with the test cycle. For example, the test cycle can be 30 days. After every 30 days, the corresponding Internet of Vehicles protocol will be adjusted from the normal state to the test state even if there is no version change, to ensure that the Internet of Vehicles protocol can run stably and reliably.

[0045] Optionally, standard simulation data is generated according to the Internet of Vehicles protocol to be tested, including: parsing the Internet of Vehicles protocol to be tested according to preset parsing rules through an automated testing program to generate a parsed Internet of Vehicles protocol to be tested; performing field splitting on the parsed Internet of Vehicles protocol to be tested to generate various configuration fields, and performing data simulation based on the configuration fields to generate test data, wherein the configuration fields include relevant thresholds, carry and borrow bits, and a valid value range; determining expected data corresponding to each test data, and using each test data and the corresponding expected data as standard simulation data.

[0046] Specifically, the automated test program can parse the Internet of Vehicles protocol to be tested according to the set parsing rules, and split the parsed Internet of Vehicles protocol to be tested into fields to obtain various configuration fields. The configuration fields include: relevant thresholds, such as the upper or lower limit of a parameter; advance and retreat bits, that is, the forward or backward changes of data under specific conditions; and valid value ranges, that is, the valid value range of data. According to the conditions and ranges specified by the configuration fields, the automated test program can simulate simulation data for testing. The configuration fields can guide the automated test program to ensure that the generated data meets the requirements and characteristics of the protocol.

[0047] In addition, the automated test end will also determine the expected data corresponding to each test data. The expected data can be pre-set according to the protocol provisions and the test objectives and requirements. The expected data represents the results that should be obtained for specific test data under ideal conditions. Finally, by integrating each test data and the corresponding expected data together, standard simulation data can be formed.

[0048] S120. Perform a test based on the test data through the Internet of Vehicles platform and generate result data.

[0049] Optionally, the Internet of Vehicles platform is used to perform tests based on the test data and generate result data, including: connecting the simulation data with the specified address of the Internet of Vehicles platform to send the simulation data to the working condition data queue; performing data parsing and processing on the data in the working condition data queue through the Internet of Vehicles platform to generate processed data, and storing the processed data in a database to generate result data.

[0050] Specifically, the automated test end will connect and dock the simulation data with the designated address of the Internet of Vehicles platform, and send the simulation data to the working condition data queue. The Internet of Vehicles platform will parse and process the received data, and can use various algorithms and rules to analyze and interpret the data in detail to extract valuable information and features to generate processed data, and store the processed data in the database to form result data.

[0051] S130: Generate a test report for the Internet of Vehicles protocol to be tested according to the result data and the expected data.

[0052] The result data refers to the data actually generated after the test is performed based on the test data. The test report is a summary of the test process and results, and includes the test results of the Internet of Vehicles protocol to be tested.

[0053] Specifically, by comparing and analyzing the generated result data with the expected data set previously, a final test report can be generated. The test report reflects the performance of the Internet of Vehicles protocol under test in the actual test, and can include information such as whether the test results meet expectations, what problems or deviations exist, etc. Generating a test report can provide an important basis for further evaluation and improvement of the Internet of Vehicles protocol.

[0054] The technical solution of the embodiment of the present invention obtains the Internet of Vehicles protocol to be tested by judging the protocol status, and intelligently loads the protocol information by starting the automated test program to generate standard simulation data, which includes test data and expected data. The test data is then sent to the Internet of Vehicles platform for protocol parsing, warehousing, and other links. The automated test end then extracts the result data and compares it with the expected data, and generates a test report based on the data comparison results, thereby reducing heavy testing work such as protocol assembly and parsing, reducing manual workload, and improving the efficiency of protocol parsing testing.

[0055] Embodiment 2

[0056] Figure 2This is a flowchart of a protocol parsing test method provided in the second embodiment of the present invention. This embodiment adds a specific process of generating a test report of the Internet of Vehicles protocol to be tested based on the result data and the expected data on the basis of the first embodiment. Among them, the specific contents of steps S210-S220 are roughly the same as steps S110-S120 in the first embodiment, so they will not be repeated in this embodiment. Figure 2 As shown, the method includes:

[0057] S210: Obtain the Internet of Vehicles protocol to be tested, and generate standard simulation data according to the Internet of Vehicles protocol to be tested, wherein the standard simulation data includes test data and expected data.

[0058] Optionally, obtaining the Internet of Vehicles protocol to be tested includes: determining the protocol status corresponding to each Internet of Vehicles protocol, wherein the protocol status includes a test status and a normal status; when the protocol status is a test status, using the Internet of Vehicles protocol as the Internet of Vehicles protocol to be tested.

[0059] Optionally, before obtaining the Internet of Vehicles protocol to be tested, the method further includes: when it is detected that the protocol version corresponding to the Internet of Vehicles protocol has changed, changing the protocol state of the Internet of Vehicles protocol from a normal state to a test state.

[0060] Optionally, standard simulation data is generated according to the Internet of Vehicles protocol to be tested, including: parsing the Internet of Vehicles protocol to be tested according to preset parsing rules through an automated testing program to generate a parsed Internet of Vehicles protocol to be tested; performing field splitting on the parsed Internet of Vehicles protocol to be tested to generate various configuration fields, and performing data simulation based on the configuration fields to generate test data, wherein the configuration fields include relevant thresholds, carry and borrow bits, and a valid value range; determining expected data corresponding to each test data, and using each test data and the corresponding expected data as standard simulation data.

[0061] S220: Perform a test based on the test data through the Internet of Vehicles platform and generate result data.

[0062] Optionally, the Internet of Vehicles platform is used to perform tests based on the test data and generate result data, including: connecting the simulation data with the specified address of the Internet of Vehicles platform to send the simulation data to the working condition data queue; performing data parsing and processing on the data in the working condition data queue through the Internet of Vehicles platform to generate processed data, and storing the processed data in a database to generate result data.

[0063] S230, extracting result data from the database in sequence as target data according to a preset data mapping relationship.

[0064] S240, determine whether the target data is consistent with the corresponding expected data, if so, execute S250, otherwise, execute S260.

[0065] Specifically, the automated testing program will obtain the result data and expected data, and then conduct a comprehensive and detailed comparative analysis of the two sets of data, thereby generating corresponding data comparison results through this data comparison operation.

[0066] S250: Determine that the data comparison result is that the data are consistent.

[0067] S260: Determine that the data comparison result is that the data do not match.

[0068] Specifically, the automated test end can extract the result data from the database of the Internet of Vehicles platform in sequence according to the pre-set data mapping relationship and use it as the target data. Then, it is further determined whether the target data is consistent with the corresponding expected data. If the target data and the corresponding expected data are consistent and there is no difference, it can be determined that the data comparison result is data consistency. If it is found that the target data and the corresponding expected data are inconsistent and there is a difference, then the data comparison result can be determined as data inconsistency.

[0069] S270 , dividing the result data into normal data and difference data according to the data comparison result, and generating a test report based on the normal data and the difference data.

[0070] Specifically, the automated test end can classify the result data according to the obtained data comparison results. That is, if the data is consistent with the expected data, it will be classified as normal data, and if the data is inconsistent with the expected data, it will be classified as difference data. Finally, a test report on the Internet of Vehicles protocol to be tested is generated based on the normal data and difference data. The test report can more clearly present the relationship between the actual result data and the expected data, including which parts are normal and which parts are different, thereby providing important basis and guidance for further analysis and improvement of the Internet of Vehicles protocol.

[0071] The technical solution of the embodiment of the present invention obtains the Internet of Vehicles protocol to be tested by judging the protocol status, and intelligently loads the protocol information by starting the automated test program to generate standard simulation data, which includes test data and expected data. The test data is then sent to the Internet of Vehicles platform for protocol parsing, warehousing, and other links. The automated test end then extracts the result data and compares it with the expected data, and generates a test report based on the data comparison results, thereby reducing heavy testing work such as protocol assembly and parsing, reducing manual workload, and improving the efficiency of protocol parsing testing.

[0072] Embodiment 3

[0073] Figure 3 This is a schematic diagram of the structure of a protocol analysis test device provided by Embodiment 3 of the present invention. Figure 3As shown, the device includes: a standard simulation data generation module 310, which is used to obtain the Internet of Vehicles protocol to be tested, and generate standard simulation data according to the Internet of Vehicles protocol to be tested, wherein the standard simulation data includes test data and expected data;

[0074] A result data generation module 320, for performing a test based on the test data through the Internet of Vehicles platform and generating result data;

[0075] The test report generation module 330 is used to generate a test report of the Internet of Vehicles protocol to be tested according to the result data and the expected data.

[0076] Optionally, the standard simulation data generation module 310 specifically includes: a vehicle networking protocol acquisition unit to be tested, used to: determine the protocol status corresponding to each vehicle networking protocol, wherein the protocol status includes a test status and a normal status; when the protocol status is a test status, the vehicle networking protocol is used as the vehicle networking protocol to be tested.

[0077] Optionally, the standard simulation data generation module 310 specifically includes: a standard simulation data generation unit, which is used to: parse the Internet of Vehicles protocol to be tested according to preset parsing rules through an automated testing program to generate a parsed Internet of Vehicles protocol to be tested; perform field splitting on the parsed Internet of Vehicles protocol to be tested to generate various configuration fields, and perform data simulation based on the configuration fields to generate test data, wherein the configuration fields include relevant thresholds, carry and borrow bits, and a valid value range; determine the expected data corresponding to each test data, and use each test data and the corresponding expected data as standard simulation data.

[0078] Optionally, the result data generation module 320 is specifically used to: connect the simulation data with the designated address of the Internet of Vehicles platform to send the simulation data to the working condition data queue; perform data analysis and processing on the data in the working condition data queue through the Internet of Vehicles platform to generate processed data, and store the processed data in the database to generate result data.

[0079] Optionally, the test report generation module 330 specifically includes: a data comparison result generation unit, used to: compare the result data with the expected data to generate a data comparison result, wherein the data comparison result includes data consistency and data inconsistency; a test report generation unit, used to: divide the result data into normal data and difference data according to the data comparison result, and generate a test report based on the normal data and the difference data.

[0080] Optionally, the test report generation unit is specifically used to: extract result data from the database as target data in sequence according to a preset data mapping relationship; determine whether the target data is consistent with the corresponding expected data, and if so, determine that the data comparison result is that the data is consistent; otherwise, determine that the data comparison result is that the data is inconsistent.

[0081] Optionally, the device also includes: a protocol state changing module, which is used to change the protocol state of the Internet of Vehicles protocol from a normal state to a test state when it is detected that the protocol version corresponding to the Internet of Vehicles protocol has changed.

[0082] The technical solution of the embodiment of the present invention obtains the Internet of Vehicles protocol to be tested by judging the protocol status, and intelligently loads the protocol information by starting the automated test program to generate standard simulation data, which includes test data and expected data. The test data is then sent to the Internet of Vehicles platform for protocol parsing, warehousing, and other links. The automated test end then extracts the result data and compares it with the expected data, and generates a test report based on the data comparison results, thereby reducing heavy testing work such as protocol assembly and parsing, reducing manual workload, and improving the efficiency of protocol parsing testing.

[0083] A protocol parsing test device provided in an embodiment of the present invention can execute a protocol parsing test method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0084] Embodiment 4

[0085] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0086] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0087] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0088] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a protocol parsing test method.

[0089] In some embodiments, a protocol parsing test method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of a protocol parsing test method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a protocol parsing test method in any other appropriate manner (e.g., by means of firmware).

[0090] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0091] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0092] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0093] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0094] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0095] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0096] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0097] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A protocol analysis test method, characterized in that: include: Acquire the Internet of Vehicles protocol to be tested, and generate standard simulation data according to the Internet of Vehicles protocol to be tested, wherein the standard simulation data includes test data and expected data, and the test data covers key functions, boundary conditions, and abnormal conditions of the Internet of Vehicles protocol to be tested; Performing a test based on the test data and generating result data through the Internet of Vehicles platform; Generate a test report of the Internet of Vehicles protocol to be tested according to the result data and the expected data; The step of generating standard simulation data according to the Internet of Vehicles protocol to be tested includes: Parsing the Internet of Vehicles protocol to be tested according to preset parsing rules through an automated testing program to generate a parsed Internet of Vehicles protocol to be tested; The analyzed vehicle networking protocol to be tested is split into fields to generate various configuration fields, and data simulation is performed based on the configuration fields to generate test data, wherein the configuration fields include relevant thresholds, advance and retreat bits, and valid value ranges, the relevant thresholds refer to the upper or lower limits of parameters, the advance and retreat bits refer to the forward or backward changes of data under specific conditions, and the valid value range refers to the valid value interval of data, wherein data simulation based on the configuration fields to generate test data refers to simulating simulation data for testing according to the conditions and ranges specified by the configuration fields through an automated test program; Determine the expected data corresponding to each of the test data, and use each of the test data and the corresponding expected data as the standard simulation data; The step of performing a test based on the test data and generating result data through the Internet of Vehicles platform includes: Connecting the simulation data to a designated address of the Internet of Vehicles platform, and sending the simulation data to a working condition data queue; The data in the operating condition data queue is parsed and processed through the Internet of Vehicles platform to generate processed data, and the processed data is stored in a database to generate the result data.

2. The method according to claim 1, characterized in that The obtaining of the Internet of Vehicles protocol to be tested includes: Determine the protocol status corresponding to each vehicle networking protocol, wherein the protocol status includes a test status and a normal status; When the protocol state is a test state, the Internet of Vehicles protocol is used as the Internet of Vehicles protocol to be tested.

3. The method according to claim 1, characterized in that The generating a test report of the Internet of Vehicles protocol to be tested according to the result data and the expected data includes: Comparing the result data with the expected data to generate a data comparison result, wherein the data comparison result includes data consistency and data inconsistency; The result data is divided into normal data and difference data according to the data comparison result, and the test report is generated according to the normal data and the difference data.

4. The method according to claim 3, characterized in that The step of comparing the result data with the expected data to generate a data comparison result includes: Extracting the result data from the database in sequence as target data according to a preset data mapping relationship; Determine whether the target data is consistent with the corresponding expected data, and if so, determine that the data comparison result is that the data is consistent; Otherwise, the data comparison result is determined to be data inconsistency.

5. The method according to claim 2, characterized in that: Before obtaining the Internet of Vehicles protocol to be tested, the method further includes: When it is detected that the protocol version corresponding to the Internet of Vehicles protocol has changed, the protocol state of the Internet of Vehicles protocol is changed from a normal state to a test state.

6. A protocol analysis test device, applied to the method according to any one of claims 1 to 5, characterized in that: include: A standard simulation data generation module, used to obtain the Internet of Vehicles protocol to be tested, and generate standard simulation data according to the Internet of Vehicles protocol to be tested, wherein the standard simulation data includes test data and expected data, and the test data covers key functions, boundary conditions, and abnormal conditions of the Internet of Vehicles protocol to be tested; A result data generation module, used to perform a test based on the test data through the Internet of Vehicles platform and generate result data; A test report generating module, used for generating a test report of the Internet of Vehicles protocol to be tested according to the result data and the expected data; The standard simulation data generation module specifically includes: a standard simulation data generation unit, which is used to: parse the Internet of Vehicles protocol to be tested according to preset parsing rules through an automated test program to generate a parsed Internet of Vehicles protocol to be tested; The analyzed vehicle networking protocol to be tested is split into fields to generate various configuration fields, and data simulation is performed based on the configuration fields to generate test data, wherein the configuration fields include relevant thresholds, carry-in and carry-out bits, and valid value ranges, wherein data simulation is performed based on the configuration fields to generate test data refers to simulating simulation data for testing according to conditions and ranges specified by the configuration fields through an automated test program; Determine the expected data corresponding to each of the test data, and use each of the test data and the corresponding expected data as the standard simulation data; The result data generation module is specifically used to: connect the simulation data with the designated address of the Internet of Vehicles platform, so as to send the simulation data to the working condition data queue; The data in the operating condition data queue is parsed and processed through the Internet of Vehicles platform to generate processed data, and the processed data is stored in a database to generate the result data.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 5.

8. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Vehicle-mounted Ethernet test method, device and equipment and storage medium

    CN117240738A

  • Protocol interface automatic test method and device, storage medium and electronic equipment

    CN118210696A