Simulation test method, device, computer equipment and computer readable storage medium

By sending and processing verification messages between the simulated router and the media access control layer, the problem that traditional verification methods are difficult to adapt to the latest wireless communication protocols is solved, and a wider range of verification application scenarios are realized.

CN116056126BActive Publication Date: 2025-09-19伟光有限公司(CN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211638613.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2025-09-19
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

Traditional wireless communication protocol verification methods are difficult to apply to the latest wireless communication protocols, resulting in limited usage scenarios.

Method used

By simulating the router and the media access control layer, sending and receiving verification messages, processing and parsing the messages to determine the simulation test results, the function of the media access control layer is verified.

Benefits of technology

The application scenarios of wireless communication protocol verification have been expanded, so that the verification method is not limited by the functions of hardware devices and can be applied to the latest wireless communication protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116056126B_ABST
    Figure CN116056126B_ABST
Patent Text Reader

Abstract

The present application relates to a simulation test method, apparatus, computer equipment, and computer-readable storage medium. The simulation test method is applied to a test system, which includes a simulated router and a simulated media access control layer; the method includes: sending a verification message through the simulated router; the verification message includes first verification information; receiving the verification message through the simulated media access control layer, and processing the received verification message to obtain second verification information; determining a simulation test result based on the first verification information and the second verification information; the simulation test result indicates whether the function of the simulated media access control layer is normal. The use of this method can solve the problem of limited usage scenarios of traditional wireless communication protocol verification methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless communication technology, and in particular to a simulation test method, apparatus, computer equipment, and computer-readable storage medium. Background Art

[0002] With the development of wireless communication technology, terminals using wireless communication technology are becoming more and more widespread. Generally, in order to ensure that the wireless communication protocol matches the hardware configuration of the terminal, it is necessary to verify the hardware configuration of the terminal.

[0003] Traditionally, a common verification method utilizes wireless communication between existing terminals and wireless routers to verify the terminal's hardware configuration. However, due to the constant updating of wireless communication protocols, traditional verification methods are difficult to apply to the latest wireless communication protocols, limiting their use cases. Summary of the Invention

[0004] The embodiments of the present application provide a simulation test method, apparatus, computer device, and computer-readable storage medium, which solve the problem of limited usage scenarios of traditional wireless communication protocol verification methods.

[0005] In a first aspect, an embodiment of the present application provides a simulation test method, which is applied to a test system including a simulated router and a simulated media access control layer. The method includes:

[0006] Sending a verification message through the simulated router; the verification message includes first verification information;

[0007] Receiving a verification message through the simulated media access control layer, and processing the received verification message to obtain second verification information;

[0008] A simulation test result is determined according to the first verification information and the second verification information; the simulation test result indicates whether the function of the simulated media access control layer is normal.

[0009] In a second aspect, an embodiment of the present application provides a simulation test device, which is applied to a test system including a simulated router and a simulated media access control layer; the device includes:

[0010] A sending module, configured to send a verification message through the simulated router; the verification message includes first verification information;

[0011] a processing module, configured to receive a verification message through the simulated media access control layer, and process the received verification message to obtain second verification information;

[0012] The test module is used to determine a simulation test result based on the first verification information and the second verification information; the simulation test result indicates whether the function of the simulated media access control layer is normal.

[0013] In a third aspect, an embodiment of the present application provides a computer device having an integrated test system, the test system including a simulated router and a simulated media access control layer; the computer device includes a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor executes the steps of the simulation test method described in the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processor.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0016] The above-mentioned simulation test method, device, computer equipment and computer-readable storage medium are applied to a test system, which includes a simulated router and a simulated media access control layer. The simulated router can send a verification message including first verification information, and the simulated media access control layer can receive the verification message and process the received verification message to obtain second verification information. Therefore, based on the first verification information and the second verification information, the simulation test result indicating whether the function of the simulated media access control layer is normal can be determined. Compared with the method in traditional technology that requires the use of existing terminals and wireless routers to verify the wireless communication protocol, the function of the simulated media access control layer is verified by the simulated router and the simulated media access control layer, which is not limited by the function of the hardware device and has a wider range of usage scenarios. Different wireless communication protocols can be verified by the simulated router and the simulated media access control layer, and the verification method can be applied to the latest wireless communication protocols, expanding the usage scenarios of wireless communication protocol verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1An application environment diagram of a simulation test method in one embodiment;

[0019] Figure 2 A flowchart of a simulation test method in one embodiment;

[0020] Figure 3 is a flow chart of a simulation test method in another embodiment;

[0021] Figure 4 is a flow chart of a simulation test method in another embodiment;

[0022] Figure 5 is a flow chart of a simulation test method in another embodiment;

[0023] Figure 6 is a structural block diagram of a simulation test device in one embodiment;

[0024] Figure 7 is a structural block diagram of a simulation test device in another embodiment;

[0025] Figure 8 is a structural block diagram of a simulation test device in another embodiment;

[0026] Figure 9 is a structural block diagram of a simulation test device in another embodiment;

[0027] Figure 10 is a structural block diagram of a simulation test device in another embodiment;

[0028] Figure 11 Schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0030] The simulation test method provided in the embodiment of the present application can be applied to Figure 1In the test system shown in FIG. , the test system includes a main control module, a simulated media access control layer, and a simulated router. The main control module is mainly used for configuration management of the simulated router, interface management, and integrated test management. Configuration management of the simulated router mainly manages the configuration information required by the simulated router (e.g., MAC address, IP address, etc.) and the configuration information required for simulation of the simulated media access control layer. The configuration information of the simulated router and the simulated media access control layer can be dynamically modified, and the simulated router and the simulated media access control layer can obtain relevant configuration information in real time. Interface management includes the NS-3 interface management module and the WIFI-DRIVE instruction management interface. The NS-3 interface management module can manage and control the simulation switch of the simulated router through the main control module, and obtain the message information received by the simulated router, the current status of the simulated router, etc. through the customized simulation interface. The WIFI-DRIVE instruction management interface mainly converts the WIFI-DRIVE instructions into instructions that can be recognized by the simulated media access control layer, and sends them to the simulated media access control layer, and receives the messages returned by the simulated media access control layer for analysis and judgment feedback.

[0031] The simulated media access control layer simulates the operation of the media access control layer in the wireless communication protocol. It obtains upper-layer messages or instructions through a simulated PCIE (the latest bus and interface standard) interface, generates corresponding message packets, and sends these messages to the simulated router through the underlying message transceiver module, completing the business process that needs to be verified. This test system simulates the operation of the embedded operating system freeRTOS in the Linux operating system. It also simulates the main thread of the media access control layer of the wireless communication protocol in this operating system (including initialization, initial memory address allocation, register address allocation, interrupt message processing, etc.). The functional code of the entire media access control layer is executed, simulating the operation of the media access control layer in a real chip. Instructions and return messages are received through the Wi-Fi-Drive command management interface, and messages are sent and received through the simulated media access control layer's message forwarding interface. Among them, the simulated media access control layer message forwarding interface simulates the underlying message sending and receiving hardware of the media access control layer. After reading the message that the media access control layer needs to send from the specified memory, it encapsulates it according to the rules and sends it to the message sending and receiving module of the wireless router through SOCKET communication. The received message is parsed and uploaded to the simulated media access control layer to complete the simulation of the underlying message sending and receiving. In addition, the message on the wireless router side can also be received through the SOCKET SERVER port.

[0032] The router simulation uses the discrete event network simulator NS-3. By modifying NS-3's internal interfaces or fields, the system can simulate a specific type of wireless router, automatically sending broadcast messages and receiving related request messages. This test system uses the NS-3 simulation platform within the Linux operating system to simulate a router node based on configuration information in the configuration management system. It automatically generates broadcast messages and analyzes request messages, completing the wireless connection between the terminal and the router.

[0033] In one embodiment, Figure 2 As shown, a simulation test method is provided, which is applied to Figure 1 The test system shown includes an emulated router and an emulated media access control layer. This embodiment uses the method applied to a computer device as an example. In this embodiment, the method includes the following steps:

[0034] S201, sending a verification message through a simulated router; the verification message includes first verification information.

[0035] Among them, the simulated router can be a discrete event network simulator NS-3. The discrete event network simulator NS-3 can simulate a wireless router of a specified type by modifying its internal interface or field, and automatically send broadcast messages to receive related request messages. In this embodiment, a verification message including the first verification information can be sent through the simulated router. It should be noted that the first verification information in this embodiment is information used to verify the function of the simulated media access control layer in the test system. Taking this embodiment as an example of the functional verification of the wireless local area network (Wireless Fidelity, Wi-Fi) media access control layer developed according to the latest protocol standard of the Wi-Fi Alliance, the first verification information can be verification information for verifying whether the simulated media access control layer can be compatible with the latest Wi-Fi protocol. Exemplarily, the first verification information can be the name of the latest Wi-Fi protocol, etc. Optionally, in this embodiment, the verification message can be sent through any channel of the simulated router, or through a channel specified in the configuration information of the simulated router. This is not limited in this embodiment. Optionally, the simulated router can encrypt the above-mentioned verification message before sending it, or it can directly send the above-mentioned verification message.

[0036] S202: Receive a verification message through a simulated media access control layer, and process the received verification message to obtain second verification information.

[0037] In this embodiment, the simulated media access control layer can simulate the operation process of the media access control layer in a real chip. Optionally, in this embodiment, the embedded operating system freeRTOS can be simulated and run in the Linux operating system, and the simulated media access control layer can be simulated and run in the embedded operating system freeRTOS.

[0038] It is understandable that the verification message received by the simulated media access control layer in this embodiment can be the above-mentioned verification message sent by the simulated router, or it can be other verification messages. This embodiment does not limit the verification message received by the simulated media access control layer. Optionally, in this embodiment, after the simulated media access control layer receives the verification message, the simulated media access control layer can parse the received verification message to obtain second verification information, or the simulated media access control layer can parse the received verification message to obtain parsed information corresponding to the verification message, and then send the parsed information to other modules of the test system, which then process the parsed information to obtain second verification information. Optionally, the second verification information in this embodiment can be the same as the above-mentioned first verification information, or it can be different from the above-mentioned first verification information.

[0039] S203 , determining a simulation test result based on the first verification information and the second verification information; the simulation test result indicates whether the function of the simulated media access control layer is normal.

[0040] Among them, the simulation test result can indicate whether the function of the simulated media access control layer is normal, that is, the simulation test result can indicate whether the function of the simulated media access control layer is effective and whether it is compatible with the adopted wireless communication protocol. Optionally, in this embodiment, the first verification information and the second verification information can be compared, and the simulation test result can be determined based on the comparison result. It can be understood that if the determined simulation test result indicates that the function of the simulated media access control layer is normal, it can be said that the function of the simulated media access control layer is effective and compatible with the adopted wireless communication protocol; if the determined simulation test result indicates that the function of the simulated media access control layer is abnormal, it can be said that the function of the simulated media access control layer is invalid and incompatible with the adopted wireless communication protocol.

[0041] In the above-mentioned simulation test method, a verification message including first verification information can be sent through a simulated router, a verification message can be received through a simulated media access control layer, and the received verification message can be processed to obtain second verification information, so that the simulation test result indicating whether the function of the simulated media access control layer is normal can be determined based on the first verification information and the second verification information. Compared with the method in traditional technology that requires the use of existing terminals and wireless routers to verify the wireless communication protocol, the function of the simulated media access control layer is verified by a simulated router and a simulated media access control layer, which is not restricted by the function of the hardware device and has a wider range of usage scenarios. Different wireless communication protocols can be verified by a simulated router and a simulated media access control layer, and the verification method can be applied to the latest wireless communication protocols, expanding the usage scenarios of wireless communication protocol verification.

[0042] This embodiment will describe the detailed process of simulating the medium access control layer to receive the verification message and processing the received verification message to obtain the second verification information. Figure 3 As shown, the above S202 includes:

[0043] S301: Receive a verification message through a message forwarding interface of a simulated media access control layer, and save the received verification message into a preset memory.

[0044] In this embodiment, the emulated media access control layer may include a message forwarding interface, through which the emulated media access control layer may receive a verification message sent by the emulated router. Furthermore, a memory for storing verification messages may be pre-set in the emulated media access control layer. When the message forwarding interface receives a verification message, the received verification message may be stored in the memory pre-set in the emulated media access control layer.

[0045] S302: Read the received verification message from the memory, and process the received verification message to obtain second verification information.

[0046] Optionally, in this embodiment, the simulated media access control layer may read the received verification message from the memory according to a first-in-first-out principle, and then process the read received verification message to obtain the above-mentioned second verification information.

[0047] Optionally, in this embodiment, the second verification information can be obtained by simulating the media access control layer itself to process the received verification message. Alternatively, as an optional implementation, the test system can further include a simulation main control module, which can process the received verification message to obtain the second verification information. These two methods for obtaining the second verification information are described in detail below:

[0048] The first method: the above S302 includes: parsing the received verification message using a preset parsing function to obtain the second verification information.

[0049] Optionally, in this embodiment, after the simulated media access control layer reads the received verification message from the memory, the simulated media access control layer may parse the received verification message using a preset parsing function to obtain the second verification information. For example, assuming that the verification message received by the simulated media access control layer is a beacon message, the simulated media access control layer may parse the received verification message using the beacon message parsing function to obtain the second verification information.

[0050] The second type: the above-mentioned test system further includes a simulation main control module, and the above-mentioned S302 includes:

[0051] Step A: parse the received verification message using a preset parsing function to obtain a parsed message.

[0052] Optionally, in this embodiment, after the simulated media access control layer reads the received verification message from the above-mentioned memory, the simulated media access control layer can parse the received verification message using a preset parsing function to obtain a parsed message. It should be noted that the embodiment of the present application is a test of the function of the simulated media access control layer, and the function of the simulated media access control layer is mainly to parse the received message. In the embodiment of the present application, the function of the simulated media access control layer is tested based on the first verification information included in the sent verification message and the second verification information parsed by the simulated media access control layer. Therefore, in the embodiment of the present application, the simulated media access control layer parses the received verification message, and the parsed message obtained may include the above-mentioned second verification information and attribute information of the wireless communication protocol, etc.

[0053] Step B: Encapsulate the parsed message using a preset message format to obtain a new message.

[0054] In this embodiment, the simulated medium access control layer may encapsulate the parsed message in a preset message format, and encapsulate the parsed message into a new message in a specific format.

[0055] Step C: Send a new message through the simulated media access control layer.

[0056] Optionally, in this embodiment, the obtained new message may be sent to the simulation main control module through the message forwarding interface of the simulation media access control layer.

[0057] Step D: Receive a new message through the simulation main control module, and parse the new message to obtain second verification information.

[0058] Optionally, in this embodiment, after receiving the new message, the simulation main control module may parse the new message according to the format of the new message and obtain the second verification information from the new message.

[0059] In this embodiment, the verification message can be received through the message forwarding interface of the simulated media access control layer, so that the received verification message can be saved in the preset memory of the simulated media access control layer, and the received verification message can be read from the preset memory of the simulated media access control layer, and then the received verification message can be processed. Since the process of processing the received verification message is relatively simple, the second verification information can be obtained relatively quickly, which improves the efficiency of determining the simulation test results based on the first verification information and the second verification information; in addition, compared with testing in hardware equipment, the verification process also reduces the testing cost of the media access control layer function.

[0060] In the above scenario of sending the verification message through the emulated router, the emulated router needs to be started before the verification message can be sent through the emulated router. Figure 4 As shown, the above method also includes:

[0061] S401: Configure configuration information of the simulated router according to first verification information.

[0062] Optionally, in this embodiment, the configuration information of the simulated router may include information such as the address of the media access control layer of the simulated router, the communication channel information of the simulated router, the encryption type of the simulated router, and the wireless communication protocols supported by the simulated router. For example, in this embodiment, assuming that the first verification information is the network name of the wireless communication protocol, the configuration information of the configured simulated router may include information such as the network name of the wireless communication protocol, the address of the media access control layer of the simulated router, the communication channel information of the simulated router, the encryption type of the simulated router, and the wireless communication protocols supported by the simulated router. It is understandable that after the configuration information of the simulated router is configured according to the above-mentioned first verification information, the simulated router obtained is the simulated router with the configured information.

[0063] S402: Call the simulation control interface to start the simulation router.

[0064] Optionally, in this embodiment, the simulated router includes a simulated control interface, and the configured simulated router can be started by calling the simulated control interface to put the simulated router into operation. When the simulated router is started, the above-mentioned verification message is sent using the started simulated router.

[0065] In this embodiment, the process of configuring the configuration information of the simulated router according to the first verification information is relatively simple, and the configuration information of the simulated router can be quickly configured, so that the simulation control interface of the simulated router can be quickly called to start the simulated router, and the started simulated router can be used to send the verification message.

[0066] In the scenario where the verification message is sent through the simulated router, the verification message can be sent through the simulated channel corresponding to the communication channel information in the configuration information of the simulated router. In one embodiment, the configuration information includes the communication channel information, and S201 includes: sending the verification message through the simulated channel corresponding to the communication channel information.

[0067] The emulated channel refers to the transmission medium through which the verification message travels from the emulated router to the emulated media access control layer. Optionally, in this embodiment, the emulated channel corresponding to the communication channel information in the emulated router's configuration information can be determined, and the verification message can then be sent through the emulated channel corresponding to the communication channel information, thereby ensuring accurate delivery of the verification message.

[0068] In this embodiment, since the configuration information of the simulated router includes communication channel information, the verification message can be sent through the simulated channel corresponding to the communication channel information in the configuration information of the simulated router, ensuring the accurate sending of the verification message by the simulated router and improving the accuracy of the verification message sent by the simulated router.

[0069] This embodiment will describe the detailed process of determining the simulation test result of the function of the simulated media access control layer based on the first verification information and the second verification information. Figure 5 As shown, the above S203 includes:

[0070] S501: If the first verification information is consistent with the second verification information, determine that the simulation test result shows that the function of the simulated media access control layer is normal.

[0071] It is understood that in this embodiment, the first verification information and the second verification information are consistent, and each character in the first verification information and each character in the second verification information are identical. In this embodiment, if the first verification information is consistent with the second verification information parsed by the simulated media access control layer, it indicates that the simulated media access control layer is able to parse the received verification message, the simulated media access control layer is compatible with the adopted wireless communication protocol, and the test result of the simulated media access control layer can be determined to be normal function of the simulated media access control layer.

[0072] S502: If the first verification information is inconsistent with the second verification information, determine that the simulation test result is that the function of the simulated media access control layer is abnormal.

[0073] It is understood that in this embodiment, the inconsistency between the first verification information and the second verification information may be due to any character in the first verification information being different from any character in the second verification information. In this embodiment, if the first verification information is inconsistent with the second verification information parsed by the simulated media access control layer, it indicates that the simulated media access control layer is unable to parse the received verification message, the simulated media access control layer is not compatible with the adopted wireless communication protocol, and the test result of the simulated media access control layer can be determined to be a functional abnormality of the simulated media access control layer.

[0074] In this embodiment, the process of determining the simulation test result of the simulated media access control layer by comparing the first verification information and the second verification information to see if they are consistent is relatively simple and requires less computation. Therefore, the simulation test result of the simulated media access control layer can be quickly determined based on the first verification information and the second verification information, thereby improving the efficiency of determining the simulated media access control layer.

[0075] To facilitate understanding by those skilled in the art, the following describes in detail the simulation test method provided by the present disclosure. The method is applied to a test system including a simulated router, a simulated media access control layer, and a simulated main control module. The method may include:

[0076] S1. Configure configuration information of the simulated router according to the first verification information.

[0077] S2, calling the simulation control interface to start the simulation router.

[0078] S3. Send a verification message through the simulation channel corresponding to the communication channel information in the configuration information; the verification message includes first verification information.

[0079] S4, receiving the verification message through the message forwarding interface of the simulated media access control layer, and parsing the received verification message using a preset parsing function to obtain a parsed message.

[0080] S5, encapsulate the parsed message using a preset message format to obtain a new message.

[0081] S6, sends a new message through the simulated media access control layer.

[0082] S7, receiving a new message through the simulation main control module, and parsing the new message to obtain second verification information.

[0083] S8. If the first verification information is consistent with the second verification information, it is determined that the simulation test result shows that the function of the simulated media access control layer is normal.

[0084] S9: If the first verification information is inconsistent with the second verification information, it is determined that the simulation test result is that the function of the simulated media access control layer is abnormal.

[0085] It should be noted that for the description of the above steps, reference can be made to the relevant description in the above embodiment, and the effects are similar, so this embodiment will not be repeated here.

[0086] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0087] Based on the same inventive concept, the present application also provides a simulation test device for implementing the aforementioned simulation test method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in the following one or more simulation test device embodiments can be found in the above-mentioned limitations on the simulation test method, and will not be repeated here.

[0088] In one embodiment, Figure 6 As shown, a simulation test device is provided, which is applied to a test system. The test system includes a simulated router and a simulated media access control layer. The simulation test device includes: a sending module 10, a processing module 11 and a testing module 12, wherein:

[0089] The sending module 10 is configured to send a verification message through a simulated router; the verification message includes first verification information.

[0090] The processing module 11 is configured to receive a verification message through a simulated media access control layer, and process the received verification message to obtain second verification information.

[0091] The testing module 12 is configured to determine a simulation test result based on the first verification information and the second verification information; the simulation test result indicates whether the function of the simulated media access control layer is normal.

[0092] The simulation test device provided in this embodiment can execute the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0093] Based on the above embodiments, Figure 7 As shown, optionally, the processing module 11 includes: a storage unit 111 and a processing unit 112, wherein:

[0094] The storing unit 111 is configured to receive a verification message through a message forwarding interface of the simulated media access control layer, and store the received verification message in a preset memory.

[0095] The processing unit 112 is configured to read the received verification message from the memory and process the received verification message to obtain second verification information.

[0096] The simulation test device provided in this embodiment can execute the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0097] Based on the above embodiment, optionally, the processing unit 112 is configured to parse the received verification message using a preset parsing function to obtain second verification information.

[0098] The simulation test device provided in this embodiment can execute the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0099] On the basis of the above embodiment, optionally, the above test system also includes a simulation main control module, and the above processing unit 112 is used to parse the received verification message using a preset parsing function to obtain a parsed message; encapsulate the parsed message using a preset message format to obtain a new message; send the new message through the simulation media access control layer; receive the new message through the simulation main control module, and parse the new message to obtain second verification information.

[0100] The simulation test device provided in this embodiment can execute the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0101] Based on the above embodiment, optionally, Figure 8 As shown, the above device further includes: a configuration module 13 and a startup module 14, wherein:

[0102] The configuration module 13 is configured to configure configuration information of the simulated router according to the first verification information.

[0103] The starting module 14 is used to call the simulation control interface to start the simulation router.

[0104] The simulation test device provided in this embodiment can execute the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0105] Based on the above embodiment, optionally, Figure 9 As shown, the configuration information includes communication channel information, and the sending module 10 includes: a sending unit 101, wherein:

[0106] The sending unit 101 is configured to send a verification message through a simulation channel corresponding to the communication channel information.

[0107] The simulation test device provided in this embodiment can execute the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0108] Based on the above embodiment, optionally, Figure 10 As shown, the above-mentioned test module 12 includes: a first determination unit 121 and a second determination unit 122, wherein:

[0109] The first determining unit 121 is configured to determine, if the first verification information is consistent with the second verification information, that the simulation test result indicates that the function of the simulated media access control layer is normal.

[0110] The second determining unit 122 is configured to determine that the simulation test result is a functional abnormality of the simulated media access control layer if the first verification information is inconsistent with the second verification information.

[0111] The simulation test device provided in this embodiment can execute the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0112] Each module in the above-mentioned simulation test device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0113] In one embodiment, a computer device is provided, which is integrated with a test system. The test system includes an emulated router and an emulated media access control layer. The computer device can be a server, and its internal structure can be as shown in FIG. Figure 11 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store verification messages. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a simulation test method is implemented.

[0114] Those skilled in the art will understand that Figure 11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0115] The present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, cause the processors to perform the steps of the simulation test method.

[0116] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute a simulation test method.

[0117] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0118] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A simulation test method, characterized in that: The simulation test method is applied to a test system, the test system including a simulation router and a simulation media access control layer; the simulation router is a discrete event network simulator NS-3; the method includes: Sending a verification message through the simulated router; the verification message includes first verification information; the first verification information is information for verifying the function of the simulated media access control layer in the test system; Receiving a verification message through the simulated media access control layer, and processing the received verification message to obtain second verification information; A simulation test result is determined based on the first verification information and the second verification information; the simulation test result indicates whether the function of the simulated media access control layer is normal; whether the function of the simulated media access control layer is normal is used to characterize whether the simulated media access control layer is compatible with the adopted wireless communication protocol.

2. The method according to claim 1, characterized in that The receiving the verification message through the simulated media access control layer and processing the received verification message to obtain second verification information includes: Receiving a verification message through the message forwarding interface of the simulated media access control layer, and saving the received verification message into a preset memory; The received verification message is read from the memory, and the received verification message is processed to obtain the second verification information.

3. The method according to claim 2, characterized in that The processing of the received verification message to obtain the second verification information includes: The received verification message is parsed using a preset parsing function to obtain the second verification information.

4. The method according to claim 2, characterized in that The test system further includes a simulation main control module, and the processing of the received verification message to obtain the second verification information includes: Parsing the received verification message using a preset parsing function to obtain a parsed message; Encapsulating the parsed message in a preset message format to obtain a new message; Sending the new message through the simulated media access control layer; The new message is received through the simulation main control module, and the new message is parsed to obtain the second verification information.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Configuring configuration information of the simulated router according to the first verification information; The simulation control interface is called to start the simulation router.

6. The method according to claim 5, characterized in that The configuration information includes communication channel information, and the sending of the verification message through the simulated router includes: The verification message is sent through the simulation channel corresponding to the communication channel information.

7. The method according to claim 1, characterized in that The determining of the simulation test result according to the first verification information and the second verification information includes: If the first verification information is consistent with the second verification information, determining that the simulation test result indicates that the function of the simulated media access control layer is normal; If the first verification information is inconsistent with the second verification information, it is determined that the simulation test result is that the function of the simulated media access control layer is abnormal.

8. A simulation test device, characterized in that: The simulation test device is applied to a test system, the test system including a simulation router and a simulation media access control layer; the simulation router is a discrete event network simulator NS-3; the device includes: A sending module, configured to send a verification message through the simulated router; the verification message includes first verification information; the first verification information is information for verifying the function of the simulated media access control layer in the test system; a processing module, configured to receive a verification message through the simulated media access control layer, and process the received verification message to obtain second verification information; A test module is used to determine a simulation test result based on the first verification information and the second verification information; the simulation test result indicates whether the function of the simulated media access control layer is normal; whether the function of the simulated media access control layer is normal is used to characterize whether the simulated media access control layer is compatible with the adopted wireless communication protocol.

9. A computer device having a test system integrated therein, the test system comprising an emulated router and an emulated media access control layer; the computer device comprising a memory and a processor, the memory storing a computer program, characterized in that: When the computer program is executed by the processor, the processor is caused to perform the steps of the simulation test method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • SIP protocol security test method

    CN101478458A

  • Testing method and device

    CN112469068A