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

Through the implementation of multi-communication protocol testing methods, the problem of multi-protocol testing tools occupying too many resources is solved, efficient testing of multiple communication protocols is achieved, the process is simplified and risks and costs are reduced.

CN118740703AActive Publication Date: 2024-10-01KEHUA DATA CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, when multiple communication protocol testing tools are opened at the same time, they occupy a lot of resources, causing problems such as tool crashes.

Method used

Provides a multi-communication protocol testing method. By selecting the communication protocol with the target device, calling the protocol parsing function to parse the query message and splicing the reply message, obtain the protocol test point data to determine the test results, and realize the testing of multiple Testing of communication protocols.

Benefits of technology

It avoids the problem of excessive resource usage caused by different protocol testing tools, simplifies the user process, improves communication protocol testing efficiency, and reduces the risk of tool crashes and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740703A_ABST
    Figure CN118740703A_ABST
Patent Text Reader

Abstract

The invention provides a multi-communication protocol test method and device, a terminal and a storage medium. The method comprises the following steps: selecting a communication protocol with target equipment; calling a protocol analysis function corresponding to the target communication protocol, analyzing a query message sent by the target equipment, and determining a protocol measurement point carried in the query message; splicing the simulation values corresponding to the protocol measurement points carried in the query message by adopting a protocol analysis function corresponding to the target communication protocol to obtain a reply message; sending a reply message to the target equipment, so that the target equipment analyzes the reply message and obtains data corresponding to the protocol measuring point; and acquiring data of the protocol measurement point returned by the target device, and determining a test result of the protocol measurement point based on the data and the simulation value corresponding to the protocol measurement point. According to the method, multiple different communication protocols can be tested through the communication protocol test terminal, and the problem that more resources are occupied due to the fact that different protocol test tools are adopted is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a multi-communication protocol testing method, device, terminal and storage medium. Background Art

[0002] In the computer field, with the continuous development of computer technology, the demand for communication protocol testing is increasing. At present, when testing the southbound protocol of monitoring equipment, since the communication protocols between devices are different, different protocol testing tools need to be opened for protocol testing. At this time, more computer resources are occupied. If multiple testing tools are opened at the same time, some tools may crash. Summary of the invention

[0003] The embodiments of the present invention provide a multi-communication protocol testing method, device, terminal and storage medium to solve the problem in the prior art that multiple communication protocol testing tools are simultaneously opened and occupy a large number of resources.

[0004] In a first aspect, an embodiment of the present invention provides a method for testing multiple communication protocols, which is applied to a communication protocol test terminal, comprising:

[0005] Select the communication protocol with the target device;

[0006] Calling a protocol parsing function corresponding to the target communication protocol, parsing the query message sent by the target device, and determining the protocol measurement point carried in the query message;

[0007] The simulation 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 parses the reply message and obtains the data corresponding to the protocol measurement points;

[0008] 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 corresponding to the protocol measurement point and the simulation value.

[0009] In a second aspect, an embodiment of the present invention provides a multi-communication protocol test device, which is applied to a communication protocol test terminal, including:

[0010] A communication protocol selection module, used to select a communication protocol with a target device;

[0011] A query message parsing module, used to call the protocol parsing function corresponding to the target communication protocol, parse the query message sent by the target device, and determine the protocol measurement point carried in the query message;

[0012] A reply message generation module, used to obtain a reply message by splicing the simulation value corresponding to the protocol measurement point carried in the query message using the protocol parsing function corresponding to the target communication protocol; and sending the reply message to the target device so that the target device parses the reply message and obtains the data corresponding to the protocol measurement point;

[0013] The test result generating 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.

[0014] In a third aspect, an embodiment of the present invention provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the multi-communication protocol testing method as described in any possible implementation of the first aspect above are implemented.

[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the multi-communication protocol testing method described in any possible implementation of the first aspect above are implemented.

[0016] The embodiment of the present invention provides a multi-communication protocol testing method, device, terminal and storage medium. In the method, the communication protocol testing terminal selects the communication protocol between the target device and the communication protocol; calls the protocol parsing function corresponding to the target communication protocol, parses the query message sent by the target device, and determines the protocol measurement point carried in the query message; then uses the protocol parsing function corresponding to the target communication protocol to splice the simulation value corresponding to the protocol measurement point carried in the query message to obtain a reply message; and sends the reply message to the target device so that the target device parses the reply message and obtains the data corresponding to the protocol measurement point; obtains the data of the protocol measurement point returned by the target device, and determines the test result of the protocol measurement point based on the data and simulation value corresponding to the protocol measurement point. The above method can test a variety of different communication protocols through the communication protocol testing terminal, which can not only avoid the problem of more resource occupation caused by using different protocol testing tools, but also simplify the user's use process and improve the testing efficiency of the communication protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art 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 paying creative labor.

[0018] Figure 1 It is an application scenario diagram of the multi-communication protocol testing method provided by an embodiment of the present invention;

[0019] Figure 2 It is a flow chart of the implementation of the multi-communication protocol testing method provided by an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a display interface of a communication protocol test terminal provided in an embodiment of the present invention;

[0021] Figure 4 It is a structural schematic diagram of a multi-communication protocol testing device provided by an embodiment of the present invention;

[0022] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0024] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0025] refer to Figure 1 This embodiment provides a communication connection diagram of a common monitoring host in the prior art, such as Figure 1 As shown, the monitoring host is connected to multiple acquisition terminals (1, 2...n) in the southbound communication. Since the communication protocols between different acquisition terminals and the monitoring host may be different, when testing the southbound communication protocol of the monitoring host, a common technical means is to design a communication protocol test tool for each communication protocol, and use the communication protocol test tool to simulate the corresponding acquisition terminal, simulate the communication process with the monitoring host, and thus test the communication protocol between the monitoring host and the acquisition terminal. However, as the monitoring system becomes increasingly powerful, the number of southbound protocols of the monitoring host increases, and more and more test tools are needed. When too many test tools are enabled at the same time, the problem of flash back will occur due to excessive resource usage.

[0026] Based on the above problems, this embodiment provides a test method for multiple communication protocols. Figure 2, which shows an implementation flow chart of a multi-communication protocol testing method provided by an embodiment of the present invention, applied to a communication protocol testing terminal, and is described in detail as follows:

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

[0028] In this embodiment, the target device may be the above-mentioned monitoring host, and the communication protocol test 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 multi-communication protocol test method provided by the present application. It is understandable that the target device may 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, and the communication protocol includes but is not limited to the CAN communication protocol, the Modbus communication protocol and the 7E communication protocol. Different communication protocols correspond to different protocol parsing functions.

[0030] In a possible implementation manner, before S102, the method provided in this embodiment further includes:

[0031] Acquire a 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.

[0032] In this embodiment, various communication protocols may include at least one communication mode, 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 using multiple communication modes, such as the modbus communication protocol can be connected through the network or through the serial port. After determining the communication protocol, the communication protocol test 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 test terminal establishes a communication connection with the monitoring host through the selected communication mode.

[0033] S102: calling a protocol parsing function corresponding to the target communication protocol, parsing the query message sent by the target device, and determining the protocol measurement point carried in the query message.

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

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

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

[0037] 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;

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

[0039] In this embodiment, each communication protocol includes corresponding communication protocol content. In order to facilitate users to view the communication protocol content, this embodiment designs a communication protocol content display box in the display interface of the communication protocol test terminal, and sets an import button. The user clicks the import button, and searches for the communication protocol content file by selecting the storage address of the communication protocol content. The communication protocol content file can be an execl file, and the communication protocol content file is imported. The data name of each data in the communication protocol content is automatically identified to determine the protocol content corresponding to different protocol measurement points. The data name is then used as the column title (or row title) in the protocol content test table, and the communication protocol content corresponding to each protocol measurement point is inserted under each column title (row title), and each row (column) in the table corresponds to the communication protocol content of a protocol measurement point, so as to obtain a protocol content test table. Finally, the protocol content test table is displayed in the communication protocol content display box, as shown in FIG. Figure 3 shown.

[0040] In this embodiment, taking the data name as the column title 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 there are fewer column titles, the zoom ratio is large, and when there are more column titles, the zoom ratio is small, ensuring that the communication protocol content display box can display all the data names in the communication protocol content.

[0041] Specifically, Figure 3 As shown, the communication protocol content includes a measuring point identification number (ID), a measuring point description, a register address, a big endian and a small endian, amplification factor, precision, register type, display value, and multiple simulation values.

[0042] The communication protocol test terminal can also obtain the user's operation on a simulation value in the protocol content test table. If it detects that the user double-clicks a table of a simulation value, the table enters the editing mode, and the user can edit the data in the table. The communication protocol test terminal saves the user's edited simulation value in real time.

[0043] S103: 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 reply message; and send the reply message to the target device so that the target device parses the reply message and obtains the data corresponding to the protocol measurement points.

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

[0045] Get the simulation value column number selected by the user, and use the simulation value column number selected by the user as the first column number;

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

[0047] The target simulation value is concatenated using a protocol parsing function corresponding to the target communication protocol to obtain the reply message.

[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 that needs to be returned, the display interface can set a simulation value selection item, and provide multiple simulation value column headers (for example: simulation value 1, simulation value 2, simulation value 3) in the simulation value selection item. After the user selects the simulation value column header, the communication protocol test terminal captures the data of the protocol measurement point carried by the query message in the protocol content test table under the simulation value column header, and then uses the data as the target simulation value, and splices the target simulation value using the corresponding protocol parsing function to obtain the reply message.

[0049] S104: Acquire 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 corresponding to the protocol measurement point and the simulation value.

[0050] In this embodiment, after the target device obtains 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 realizing the simulation process of the monitoring host obtaining the data of the acquisition device. In order to test whether the communication protocol on the target device side is correct, the terminal device can obtain the data of the target protocol test point parsed by the target device through a crawler program, and display it in the protocol content test table. The communication protocol test terminal determines whether the simulation value of the corresponding column header of the target protocol test point is consistent with the corresponding data captured 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 a possible implementation manner, after S101, the method provided in this embodiment further includes:

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

[0053] In this embodiment, if Figure 3 As shown, each communication protocol in the communication protocol test terminal includes a variety of different functions. For example, data display function, alarm flip function, search function, etc. After each function is executed, the communication protocol test terminal can synthesize the corresponding function execution result into a corresponding message through the corresponding protocol parsing function and send it to the target device, so that the target device can parse the received message through the corresponding protocol parsing function to obtain the corresponding function execution result.

[0054] In this embodiment, the display interface of the communication protocol test terminal can pre-set the layout of various functions, and after determining the target communication protocol, display the corresponding functional modules and hide the functional modules that the target communication protocol does not have.

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

[0056] As can be seen from the above embodiments, since the communication protocol test terminal integrates the test functions of multiple communication protocols, this embodiment can shorten the time for testers to become familiar with the use of different test tools, greatly save the time in the early stage of testing, and improve the test efficiency. In addition, this application can realize the test verification of multiple southbound protocols in the monitoring host by opening only one tool during the test process, reducing the computer resource usage, reducing the risk of tool crash, and reducing the subsequent maintenance costs.

[0057] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0058] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0059] Figure 4 The structure diagram of the multi-communication protocol test device provided by the embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0060] like Figure 4 As shown, the multi-communication protocol testing device 100 includes:

[0061] A communication protocol selection module 110, used to select a communication protocol with a target device;

[0062] The query message parsing module 120 is used to call the protocol parsing function corresponding to the target communication protocol, parse 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 used to obtain a reply message by splicing the simulation value corresponding to the protocol measurement point carried in the query message using the protocol parsing function corresponding to the target communication protocol; and send the reply message to the target device so that the target device parses the reply message and obtains the data corresponding to the protocol measurement point;

[0064] The test result generating module 140 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.

[0065] In a possible implementation, the multi-communication protocol testing device 100 further includes:

[0066] The communication mode selection module is used 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 testing device 100 further includes a protocol content test table display module, which is used to:

[0068] Acquire the communication protocol content of the target communication protocol;

[0069] 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;

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

[0071] In a possible implementation, the multi-communication protocol testing device 100 further includes a function display module, which is used to:

[0072] Display the functional modules 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] Get the simulation value column number selected by the user, and use the simulation value column number selected by the user as the first column number;

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

[0076] The target simulation value is concatenated using a protocol parsing 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 invention. Figure 5 As shown, the terminal 5 of this embodiment includes: a processor 50 and a memory 51. The memory 51 is used to store a computer program 52, and the processor 50 is used to call and run the computer program 52 stored in the memory 51 to perform the steps in the above-mentioned various multi-communication protocol test method embodiments, such as Figure 2 Alternatively, the processor 50 is used to call and run the computer program 52 stored in the memory 51 to implement the functions of each module / unit in the above-mentioned device embodiments, for example Figure 4 The functions of the modules 110 to 140 are shown.

[0078] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 52 in the terminal 5.

[0079] The terminal 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of terminal 5 and does not constitute a limitation on terminal 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0080] The processor 50 may be a central processing unit (CPU), or 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. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0081] The memory 51 may be an internal storage unit of the terminal 5, such as a hard disk or memory of the terminal 5. The memory 51 may 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, etc. equipped on the terminal 5. Further, the memory 51 may also include both an internal storage unit of the terminal 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0082] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0083] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0084] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0085] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0087] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0088] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned multi-communication protocol test method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained 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, computer-readable media do not include electric carrier signals and telecommunication signals.

[0089] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for testing multiple communication protocols, characterized in that: Applied to a communication protocol test terminal, the method comprises: Selecting a communication protocol with a target device and using the selected communication protocol as a target communication protocol; Calling a protocol parsing function corresponding to the target communication protocol, parsing the query message sent by the target device, and determining the protocol measurement point carried in the query message; The simulation 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 parses the reply message and obtains the data corresponding to the protocol measurement points; 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 corresponding to the protocol measurement point and the simulation value.

2. The multi-communication protocol testing method according to claim 1, characterized in that: Before calling the protocol parsing function corresponding to the target communication protocol, the method further includes: Acquire a 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: Before the simulation 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, the method further includes: Acquire 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 a measuring point identification number, a measuring point description and a simulation value corresponding to each protocol measuring point.

4. 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: Display the functional modules corresponding to the target communication protocol.

5. The multi-communication protocol testing method according to claim 3, characterized in that: Each protocol measurement point includes at least one simulation value; The step of splicing 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 the reply message includes: Get the simulation value column number selected by the user, and use the simulation value column number selected by the user as the first column number; Searching the simulation value of the first column number corresponding to the target protocol measurement point from the protocol content test table as the target simulation value; the target protocol measurement point is the protocol measurement point carried in the query message; The target simulation value is concatenated using a protocol parsing function corresponding to the target communication protocol to obtain the reply message.

6. A multi-communication protocol testing device, characterized in that: Applied to a communication protocol test terminal, the device comprises: A communication protocol selection module, used to select a communication protocol with a target device; A query message parsing module, used to call the protocol parsing function corresponding to the target communication protocol, parse the query message sent by the target device, and determine the protocol measurement point carried in the query message; A reply message generation module, used to obtain a reply message by splicing the simulation value corresponding to the protocol measurement point carried in the query message using the protocol parsing function corresponding to the target communication protocol; and sending the reply message to the target device so that the target device parses the reply message and obtains the data corresponding to the protocol measurement point; The test result generating 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.

7. The multi-communication protocol testing device according to claim 6, characterized in that: The device also includes: The communication mode selection module is used 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.

8. The multi-communication protocol testing method according to claim 1, characterized in that: The device also includes a protocol content test table display module, which is used to: Acquire 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 a measuring point identification number, a measuring point description and a simulation value corresponding to each protocol measuring point.

9. A terminal, characterized in that: It comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the multi-communication protocol testing method as described in any one of claims 1 to 5.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the multi-communication protocol testing method as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Data exchange file analysis method and device

    CN110008266A

  • Client simulator compatible with multiple protocols and method for constructing multi-protocol charging server

    CN115766904A

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

    CN116634046A

  • GUI implementations on central controller computer system for supporting protocol independent device testing

    US20140237292A1

  • Packet processing method, programmable network card device, physical server, and storage medium

    WO2024067336A1

Cited By

  • Data processing method and device for multi-type communication co-simulation

    CN120123283A