Multi-communication protocol testing method and device, terminal and storage medium

By using a communication protocol testing terminal to parse and generate messages, the problem of excessive resource consumption in multi-communication protocol testing tools is solved, achieving efficient communication protocol testing.

CN118740703BActive Publication Date: 2026-01-23KEHUA DATA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410847074.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2026-01-23
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

In existing technologies, multiple communication protocol testing tools consume a lot of resources when running simultaneously, causing the tools to crash.

Method used

A multi-communication protocol testing method is provided. The method involves selecting the communication protocol of the target device through a communication protocol testing terminal, calling the protocol parsing function to parse the query message, generating a reply message, and sending it to the target device to obtain the data of the protocol test points and determine the test results.

Benefits of technology

It simplifies the user experience, improves the efficiency of communication protocol testing, reduces computer resource consumption and the risk of tool crashes, and lowers maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740703B_ABST
    Figure CN118740703B_ABST
Patent Text Reader

Abstract

The application provides a multi-communication protocol test method, device, terminal and storage medium. The method comprises the following steps: selecting a communication protocol between a target device; calling a protocol analysis function corresponding to the target communication protocol to analyze a query message sent by the target device, and determining a protocol test point carried in the query message; using the protocol analysis function corresponding to the target communication protocol to splice a simulation value corresponding to the protocol test point carried in the query message to obtain a reply message; and sending the reply message to the target device, so that the target device analyzes the reply message and obtains data corresponding to the protocol test point; obtaining the data of the protocol test point returned by the target device, and determining a test result of the protocol test point based on the data corresponding to the protocol test point and the simulation value. The above method can test multiple different communication protocols through a communication protocol test terminal, and can avoid the problem of high resource occupation caused by using different protocol test tools.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and in particular to a multi-communication protocol testing method and device, a terminal and a storage medium. BACKGROUND

[0002] In the field of computers, with the continuous development of computer technology, the demand for communication protocol testing is also increasing. At present, when testing the southbound protocol of a monitoring device, different protocol testing tools need to be opened for protocol testing because the communication protocols between devices are different. At this time, computer resources are occupied more, and if multiple testing tools are opened at the same time, individual tools may also cause flashing out and other phenomena. SUMMARY

[0003] The embodiments of the present application provide a multi-communication protocol testing method, device, terminal and storage medium to solve the problem of too many resources occupied by simultaneously opening multiple communication protocol testing tools in the prior art.

[0004] In a first aspect, the embodiments of the present application provide a multi-communication protocol testing method applied to a communication protocol testing terminal, comprising:

[0005] selecting a communication protocol between a target device;

[0006] calling a protocol analysis function corresponding to the target communication protocol to analyze a query message sent by the target device and determine a protocol test point carried in the query message;

[0007] splicing a reply message by using the protocol analysis function corresponding to the target communication protocol according to a simulation value corresponding to the protocol test point carried in the query message, and sending the reply message to the target device, so that the target device analyzes the reply message and obtains data corresponding to the protocol test point;

[0008] obtaining the data of the protocol test point returned by the target device, and determining a test result of the protocol test point based on the data corresponding to the protocol test point and the simulation value.

[0009] In a second aspect, the embodiments of the present application provide a multi-communication protocol testing device applied to a communication protocol testing terminal, comprising:

[0010] a communication protocol selection module configured to select a communication protocol between a target device;

[0011] a query message analysis module configured to call a protocol analysis function corresponding to the target communication protocol to analyze a query message sent by the target device and determine a protocol test point carried in the query message;

[0012] The reply message generation module is configured to splice the simulation value corresponding to the protocol measurement point carried in the query message by using a protocol analysis function corresponding to the target communication protocol to obtain a reply message, and send the reply message to the target device, so that the target device analyzes the reply message and obtains the data corresponding to the protocol measurement point.

[0013] The test result generation module is configured to obtain the data of the protocol measurement point returned by the target device, and determine the test result of the protocol measurement point based on the data and the simulation value corresponding to the protocol measurement point.

[0014] In a third aspect, an embodiment of the present application provides a terminal, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the multi-communication protocol test method according to any possible implementation manner of the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the steps of the multi-communication protocol test method according to any possible implementation manner of the first aspect.

[0016] The embodiment of the present application provides a multi-communication protocol test method, device, terminal and storage medium. In the method, a communication protocol test terminal selects a communication protocol between the terminal and a target device; a protocol analysis function corresponding to the target communication protocol is called to analyze a query message sent by the target device, and a protocol measurement point carried in the query message is determined; then a simulation value corresponding to the protocol measurement point carried in the query message is spliced by using the protocol analysis function corresponding to the target communication protocol to obtain a reply message; and the reply message is sent to the target device, so that the target device analyzes the reply message and obtains data corresponding to the protocol measurement point; the data of the protocol measurement point returned by the target device is obtained, and the test result of the protocol measurement point is determined based on the data and the simulation value corresponding to the protocol measurement point. The above method can test multiple different communication protocols by using a communication protocol test terminal, can avoid the problem of high resource occupation caused by using different protocol test tools, can simplify the use process of a user, and can improve the test efficiency of the communication protocol. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative labor.

[0018] Figure 1 is the application scenario of the multi-communication protocol test method provided by the embodiment of the application;

[0019] Figure 2 is the implementation flowchart of the multi-communication protocol test method provided by the embodiment of the application;

[0020] Figure 3 is the display interface schematic diagram of the communication protocol test terminal provided by the embodiment of the application;

[0021] Figure 4 is the structural schematic diagram of the multi-communication protocol test device provided by the embodiment of the application;

[0022] Figure 5 is the schematic diagram of the terminal provided by the embodiment of the application. DETAILED DESCRIPTION

[0023] In the following description, specific details are set forth such as particular system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the application. However, persons skilled in the art will understand that the application can be practiced without these specific details. In other instances, well-known structures, devices, circuits, and methods have not been described in detail in order to avoid obscuring the description of the application.

[0024] In order to make the objectives, technical solutions and advantages of the application clearer, the following will be described by specific embodiments in conjunction with the accompanying drawings.

[0025] Reference Figure 1 The embodiment provides a communication connection schematic diagram of a monitoring host commonly used in the prior art, as shown in Figure 1 The monitoring host is in communication connection with a plurality of collection terminals (1, 2... n) in the south direction. Since the communication protocols of different collection terminals and the monitoring host can be different, when the southward communication protocol of the monitoring host is tested, a common technical means is to design a communication protocol test tool for each communication protocol, use the communication protocol test tool to simulate the communication process with the monitoring host, so as to test the communication protocol of the monitoring host and the collection terminal. However, with the continuous strengthening of the function of the monitoring system, the southward protocol of the monitoring host is more and more, and the test tool needed is more and more, and too many test tools are used at the same time, which will cause the problem of flashing due to too much resource occupation.

[0026] Based on the above problems, the embodiment provides a multi-communication protocol test method, as shown in Figure 2Fig. 1 shows a flowchart of the implementation of the method for testing multiple communication protocols according to an embodiment of the present application, which is applied to a communication protocol testing terminal, and is described in detail as follows:

[0027] S101: Select a communication protocol between the target device.

[0028] In this embodiment, the target device can be the monitoring host described above, and the communication protocol testing terminal is used to simulate multiple acquisition terminals and communicate with the monitoring host. The following takes the monitoring host as the target device to explain the method for testing multiple communication protocols provided by the present application. It can be understood that the target device can also be other devices with multiple communication protocols.

[0029] Specifically, when the user needs to test the communication protocol between the monitoring host and a certain acquisition terminal, the communication protocol between the two is first obtained, which includes but is not limited to CAN communication protocol, Modbus communication protocol and 7E communication protocol. Different communication protocols correspond to different protocol analysis functions.

[0030] In one possible implementation, before S102, the method provided by the present embodiment further includes:

[0031] Obtaining the communication mode corresponding to the target communication protocol selected by the user, and establishing a communication connection with the target device through the communication mode.

[0032] In this embodiment, at least one communication mode can be included under various communication protocols, including serial communication, network communication, etc. Some communication protocols can only be connected through network communication, or only through serial communication, and some communication protocols can be connected through multiple communication modes, such as the modbus communication protocol which can be connected through network or serial port. After the communication protocol is determined, the communication protocol testing terminal can display at least one communication mode option corresponding to the selected communication protocol on the display interface for the user to select. After the user selects the communication mode, the communication protocol testing terminal establishes a communication connection with the monitoring host through the selected communication mode.

[0033] S102: Calling the protocol analysis function corresponding to the target communication protocol, analyzing the query packet sent by the target device, and determining the protocol measurement point carried in the query packet.

[0034] In the embodiment, after the communication protocol test terminal establishes a communication connection with the monitoring host, the monitoring host sends a query message of regular data to the communication protocol test terminal. After receiving the query message, the communication protocol test terminal calls a corresponding analysis function of the communication protocol to analyze the query message, and determines the protocol test point carried in the query message through a function code in the query message. The protocol test point information carried in the query message can be a test point ID (identity).

[0035] In one possible implementation, before S103, the method provided in the embodiment further includes:

[0036] Obtaining communication protocol content of the target communication protocol;

[0037] Identifying data names of each data in the communication protocol content, and converting the communication protocol content into a protocol content test table based on the data names of each data, and displaying the protocol content test table;

[0038] The communication protocol content includes a test point identification number, a test point description and simulation values corresponding to each protocol test point.

[0039] In the embodiment, each communication protocol includes corresponding communication protocol content. In order to facilitate a user to view the communication protocol content, the embodiment designs a communication protocol content display box in a display interface of the communication protocol test terminal, and sets an import button. The user clicks the import button, selects a storage address of the communication protocol content, finds a communication protocol content file, imports the communication protocol content file, automatically identifies data names of each data in the communication protocol content, determines protocol content corresponding to different protocol test points, and then inserts the communication protocol content corresponding to each protocol test point into each column title (or row title) in the protocol content test table, with each row (column) in the table corresponding to the communication protocol content of one protocol test point, to obtain the protocol content test table. Finally, the protocol content test table is displayed in the communication protocol content display box, as shown in Figure 3

[0040] In the embodiment, taking the data names as column titles as an example, the zoom ratio of the protocol content test table in the communication protocol content display box can be determined based on the number of column titles. When the number of column titles is small, the zoom ratio is large, and when the number of column titles is large, the zoom ratio is small, so that the communication protocol content display box can display all data names in the communication protocol content.

[0041] Specifically, as shown in Figure 3 The communication protocol content includes a test point identification number (ID), a test point description, a register address, a size end, an amplification coefficient, precision, a register type, a display value and a plurality of simulation values.​

[0042] The communication protocol test terminal can also acquire user operation on a simulation value in the protocol content test table. If double-click operation on a table of a simulation value is monitored, the table enters an editing mode, and the user can edit data in the table. The communication protocol test terminal saves the simulation value edited by the user in real time.

[0043] S103: The simulation value corresponding to the protocol measurement point carried in the query message is spliced into a reply message by using a protocol analysis function corresponding to the target communication protocol, and the reply message is sent to the target device, so that the target device analyzes the reply message and obtains data corresponding to the protocol measurement point.

[0044] In one possible implementation, each protocol measurement point includes at least one simulation value, and the specific implementation process of S103 includes:

[0045] The simulation value column number selected by the user is obtained, and the simulation value column number selected by the user is used as a first column number.

[0046] The simulation value of the first column number corresponding to the target protocol measurement point in the protocol content test table is found as a target simulation value, and the target protocol measurement point is the protocol measurement point carried in the query message.

[0047] The target simulation value is spliced into the reply message by using a protocol analysis function corresponding to the target communication protocol.

[0048] In this embodiment, since each protocol measurement point in the protocol content test table corresponds to multiple simulation values, in order to determine the simulation value to be returned, the display interface can be provided with a simulation value selection item, and column titles (for example, simulation value 1, simulation value 2, and simulation value 3) of multiple simulation values are provided in the simulation value selection item. After the user selects a column title of a simulation value, the communication protocol test terminal captures data of the protocol measurement point carried in the query message in the protocol content test table under the column title of the simulation value, and then takes the data as a target simulation value. The target simulation value is spliced into the reply message by using a corresponding protocol analysis function.

[0049] S104: The data of the protocol measurement point returned by the target device is obtained, and a test result of the protocol measurement point is determined based on the data and the simulation value corresponding to the protocol measurement point.

[0050] In this embodiment, after the target device receives the reply message sent by the communication protocol test terminal, it parses the reply message to obtain the data corresponding to the target protocol test point, thereby simulating the process of the monitoring host acquiring data from the acquisition device. To test whether the communication protocol on the target device side is correct, the terminal device can use a crawler program to obtain the data of the target protocol test point parsed by the target device and display it in the protocol content test table. The communication protocol test terminal judges whether the simulated value of the column header corresponding to the target protocol test point is consistent with the corresponding data crawled from the target device. If they are consistent, the communication protocol test result of the acquisition function is determined to be normal; if they are inconsistent, the communication protocol test result of the acquisition function is determined to be abnormal.

[0051] In one possible implementation, after S101, the method provided in this embodiment further includes:

[0052] Displays the functional modules corresponding to the target communication protocol.

[0053] In this embodiment, as Figure 3 As shown, each communication protocol in the communication protocol test terminal includes multiple different functions. For example, data display, alarm toggle, and search functions. After each function is executed, the communication protocol test terminal can synthesize the corresponding function execution result into a message using the corresponding protocol parsing function and send it to the target device. The target device then parses the received message using the corresponding protocol parsing function to obtain the corresponding function execution result.

[0054] In this embodiment, the display interface of the communication protocol testing terminal can be pre-set with the layout of various functions, and after the target communication protocol is determined, the corresponding functional modules will be displayed, while functional modules that are not present in the target communication protocol will be hidden.

[0055] In this embodiment, the application integrates multiple protocol parsing functions into the communication protocol testing terminal. During the function development process, if a new function for a certain communication protocol is added, it is determined whether the function is a general function. If the function is a general function, only one set of logic code needs to be developed, and different protocol parsing functions can be called during subsequent use. If the function is not a general function, the logic code for that function is developed, and the corresponding protocol parsing function is called directly in the future. In this way, function development time can be greatly saved.

[0056] From the above embodiment, the embodiment can shorten the pre-use proficiency time of the tester for different test tools, greatly save the pre-test time, and improve the test efficiency. In addition, the application can realize the test process of opening only one tool to monitor the test and verification of multiple southbound protocols in the host, reduce the computer resource occupation, reduce the tool flashing risk, and reduce the later maintenance cost.

[0057] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the application.

[0058] The following is the device embodiment of the application, and for details not described in detail, reference can be made to the corresponding method embodiments described above.

[0059] Figure 4 The structure diagram of the multi-communication protocol test device provided by the embodiment of the application is shown, only the part related to the embodiment of the application is shown for convenience of description, and the details are as follows:

[0060] As shown in Figure 4 The multi-communication protocol test device 100 comprises:

[0061] The communication protocol selection module 110 is configured to select a communication protocol between the target device;

[0062] The query message analysis module 120 is configured to call a protocol analysis function corresponding to the target communication protocol, analyze the query message sent by the target device, and determine the protocol measurement point carried in the query message;

[0063] The reply message generation module 130 is configured to splice the simulation value corresponding to the protocol measurement point carried in the query message by using the protocol analysis function corresponding to the target communication protocol to obtain a reply message, and send the reply message to the target device, so that the target device analyzes the reply message and obtains the data corresponding to the protocol measurement point;

[0064] The test result generation module 140 is configured to obtain the data of the protocol measurement point returned by the target device, and determine the test result of the protocol measurement point based on the data and the simulation value corresponding to the protocol measurement point.

[0065] In one possible implementation, the multi-communication protocol test device 100 further comprises:

[0066] The communication mode selection module is configured to obtain the communication mode corresponding to the target communication protocol selected by the user, and establish a communication connection with the target device through the communication mode.

[0067] In a possible implementation, the multi-communication protocol test device 100 further includes a protocol content test table display module, configured to:

[0068] obtain a communication protocol content of the target communication protocol;

[0069] identify a data name of each data in the communication protocol content, and convert the communication protocol content into a protocol content test table based on the data name of each data, and display the protocol content test table;

[0070] The communication protocol content includes a measurement point identification number, a measurement point description, and a simulation value corresponding to each protocol measurement point.

[0071] In a possible implementation, the multi-communication protocol test device 100 further includes a function display module, configured to:

[0072] display a function module corresponding to the target communication protocol.

[0073] In a possible implementation, each protocol measurement point includes at least one simulation value; the reply message generation module 130 includes:

[0074] obtain a simulation value column number selected by a user, and take the simulation value column number selected by the user as a first column number;

[0075] find a simulation value of the first column number corresponding to a target protocol measurement point from the protocol content test table as a target simulation value; the target protocol measurement point is a protocol measurement point carried in the query message;

[0076] splice the target simulation value by using a protocol analysis function corresponding to the target communication protocol to obtain the reply message.

[0077] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present application. As shown in Figure 5 the terminal 5 of this embodiment includes a processor 50 and a memory 51. The memory 51 is configured to store a computer program 52, and the processor 50 is configured to invoke and run the computer program 52 stored in the memory 51 to perform steps in each of the above multi-communication protocol test method embodiments, for example, steps S101 to S104 shown in Figure 2 . Alternatively, the processor 50 is configured to invoke and run the computer program 52 stored in the memory 51 to implement the functions of each module / unit in each of the above device embodiments, for example, the functions of the modules 110 to 140 shown in Figure 4 . Alternatively, the processor 50 is configured to invoke and run the computer program 52 stored in the memory 51 to implement the functions of each module / unit in each of the above device embodiments, for example, the functions of the modules 110 to 140 shown in

[0078] By way of example, the computer program 52 can be segmented into one or more modules / units stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more modules / units can be a series of computer program instruction segments capable of accomplishing a specific function, which are used to describe the execution process of the computer program 52 in the terminal 5.

[0079] The terminal 5 can be a desktop computer, a notebook computer, a palm computer, a cloud server and the like computing device. The terminal 5 can include, but is not limited to, the processor 50, the memory 51. Those skilled in the art can understand that, Figure 5 The terminal 5 is only an example and does not constitute a limitation on the terminal 5, and can include more or fewer components than shown, or combine certain components, or different components, for example, the terminal can also include an input / output device, a network access device, a bus and the like.

[0080] The processor 50 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0081] The memory 51 can be an internal storage unit of the terminal 5, such as a hard disk or a memory of the terminal 5. The memory 51 can also be an external storage device of the terminal 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card and the like provided on the terminal 5. Further, the memory 51 can include both the internal storage unit and the external storage device of the terminal 5. The memory 51 is used to store the computer program and other programs and data required by the terminal. The memory 51 can also be used to temporarily store data that has been output or will be output.

[0082] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or software. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0083] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.

[0084] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0085] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / terminal and method can be implemented by other ways. For example, the above-mentioned apparatus / terminal embodiments are only schematic, and the division of the modules or units is only a logical function division, and there can be another division way in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0086] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0087] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0088] The integrated module / unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer-readable storage medium. When the processor executes the computer program, the steps of each multi-communication protocol testing method embodiment can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the contents included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0089] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application, and should be included in the protection scope of the present application.

Claims

1. A multi-communication protocol testing method, characterized in that, The method, applied to a communication protocol testing terminal, includes: Select the communication protocol with the target device and use the selected communication protocol as the target communication protocol; The protocol parsing function corresponding to the target communication protocol is invoked to parse the query message sent by the target device and determine the protocol measurement points carried in the query message; The simulated values ​​corresponding to the protocol measurement points carried in the query message are concatenated using the protocol parsing function corresponding to the target communication protocol to obtain a reply message; and the reply message is sent to the target device so that the target device can parse the reply message and obtain the data corresponding to the protocol measurement points. The data of the protocol test points returned by the target device are obtained, and the test results of the protocol test points are determined based on the data and simulation values ​​corresponding to the protocol test points. Before concatenating the simulated values ​​corresponding to the protocol measurement points carried in the query message using the protocol parsing function corresponding to the target communication protocol to obtain the reply message, the method further includes: Obtain the communication protocol content of the target communication protocol; Identify the data name of each data in the communication protocol content, and based on the data name of each data, convert the communication protocol content into a protocol content test table, and display the protocol content test table; The communication protocol content includes the measurement point identifier, measurement point description, and simulation value corresponding to each protocol measurement point; Each protocol measurement point includes at least one simulated value; The step of concatenating the simulated values ​​corresponding to the protocol measurement points carried in the query message using the protocol parsing function corresponding to the target communication protocol to obtain the reply message includes: Obtain the simulation value column number selected by the user, and use the user-selected simulation value column number as the first column number; The simulation value corresponding to the first column number of the target protocol test point is found in the protocol content test table and used as the target simulation value; the target protocol test point is the protocol test point carried in the query message; The response message is obtained by concatenating the target simulation values ​​using the protocol parsing function corresponding to the target communication protocol.

2. The multi-communication protocol testing method according to claim 1, characterized in that, Before invoking the protocol parsing function corresponding to the target communication protocol, the method further includes: Obtain the communication method corresponding to the target communication protocol selected by the user, and establish a communication connection with the target device through the communication method.

3. The multi-communication protocol testing method according to claim 1, characterized in that, After selecting the communication protocol with the target device, the method further includes: Displays the functional modules corresponding to the target communication protocol.

4. A multi-communication protocol testing device, characterized in that, The device, used in communication protocol testing terminals, includes: The communication protocol selection module is used to select the communication protocol with the target device and use the selected communication protocol as the target communication protocol. The query message parsing module is used to call the protocol parsing function corresponding to the target communication protocol to parse the query message sent by the target device and determine the protocol measurement points carried in the query message; The response message generation module is used to concatenate the simulation values ​​corresponding to the protocol measurement points carried in the query message using the protocol parsing function corresponding to the target communication protocol to obtain a response message; and send the response message to the target device so that the target device can parse the response message and obtain the data corresponding to the protocol measurement points. The test result generation module is used to obtain the data of the protocol test point returned by the target device, and determine the test result of the protocol test point based on the data and simulation value corresponding to the protocol test point; The device also includes a protocol content test table display module, used for: Obtain the communication protocol content of the target communication protocol; Identify the data name of each data in the communication protocol content, and based on the data name of each data, convert the communication protocol content into a protocol content test table, and display the protocol content test table; The communication protocol content includes the measurement point identifier, measurement point description, and simulation value corresponding to each protocol measurement point; Each protocol measurement point includes at least one simulated value; The response message generation module includes: Obtain the simulation value column number selected by the user, and use the user-selected simulation value column number as the first column number; The simulation value corresponding to the first column number of the target protocol test point is found in the protocol content test table and used as the target simulation value; the target protocol test point is the protocol test point carried in the query message; The response message is obtained by concatenating the target simulation values ​​using the protocol parsing function corresponding to the target communication protocol.

5. The multi-communication protocol testing device according to claim 4, characterized in that, The device further includes: The communication method selection module is used to obtain the communication method corresponding to the target communication protocol selected by the user, and to establish a communication connection with the target device through the communication method.

6. A terminal, characterized in that, It includes a processor and a memory, the memory being used to store computer programs, and the processor being used to call and run the computer programs stored in the memory to perform the multi-communication protocol testing method as described in any one of claims 1 to 3.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the multi-communication protocol testing method as described in any one of claims 1 to 3 above.

Citation Information

Patent Citations

  • Data exchange file analysis method and device

    CN110008266A

  • Message processing method and device, electronic equipment and storage medium

    CN116634046A