Multi-node mesh network-oriented twin test simulation method, system and medium

By obtaining test data templates for the target device model, creating device simulation instances, and performing byte comparisons, the problems of high cost and low efficiency in Mesh IoT device testing are solved, achieving efficient and realistic multi-node Mesh network simulation verification.

CN122205484APending Publication Date: 2026-06-12XIAMEN INTRETECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN INTRETECH
Filing Date
2026-02-26
Publication Date
2026-06-12

Smart Images

  • Figure CN122205484A_ABST
    Figure CN122205484A_ABST
Patent Text Reader

Abstract

A multi-node Mesh network facing twin test simulation method, system and medium, based on a target device model, corresponding test data templates are obtained; according to the test data templates, a device simulation instance is created, the device simulation instance has a corresponding device address, and is associated with at least one communication data pair composed of a sending data sequence and a response data sequence; the sending data sequence is associated with fuzzy matching position information, and the communication data pair is associated with a communication delay interval parameter; a test request of a target device is received, and is compared with the sending data sequence in the device simulation instance; when the test request is successfully compared with a certain sending data sequence, a simulated response is generated and output based on the response data sequence corresponding to the sending data sequence according to the communication delay interval parameter. The present application only needs to call a digital template to carry out testing, thereby reducing the testing cost; in addition, digital simulation of the Mesh device is realized, thereby improving the testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of equipment testing technology, and in particular to a twin testing simulation method, system, and medium for multi-node Mesh networks. Background Technology

[0002] In the research and development and testing of Mesh IoT products, it is necessary to comprehensively verify the communication compatibility and functional stability between core devices such as Mesh gateways and controllers and various terminal nodes (such as sensors, switches, actuators, etc.). Current conventional testing methods mainly rely on test environments built with real physical devices, that is, they need to be equipped with complete Mesh network terminal physical devices and simulate actual application scenarios to complete networking, configuration and interaction operations.

[0003] However, this testing method, which relies on physical equipment, has significant drawbacks. First, testing costs are high: purchasing and maintaining a wide variety of Mesh devices (involving different protocols, manufacturers, and models) imposes a heavy economic and warehousing burden. Second, testing efficiency is low: each test requires repeated, tedious physical network setup and environment construction, and physical device failures can easily lead to test interruptions; for devices under test of different brands, models, or different Mesh protocols (such as Zigbee, Z-Wave, Bluetooth Mesh, etc.), corresponding physical equipment must be purchased and deployed again, making it difficult to quickly respond to changing testing needs. In addition, the scale effect of multi-node Mesh networks makes it difficult for a fully physical testing environment to cover scenarios with hundreds or even thousands of nodes, limiting the feasibility of large-scale network stability testing.

[0004] In summary, existing technologies suffer from high testing costs, low testing efficiency, and difficulty in supporting large-scale multi-node Mesh network simulation verification. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a twin testing and simulation method for multi-node Mesh networks, comprising the following steps:

[0006] Based on the target device model, obtain the corresponding test data template; Based on the obtained test data template, a device simulation instance is created. This device simulation instance has a corresponding device address and is associated with at least one communication data pair consisting of a sent data sequence and a response data sequence. The sent data sequence is associated with fuzzy matching location information, and the communication data pair is associated with a communication delay interval parameter. The system receives test requests from the target device and performs byte-by-byte comparison with the transmitted data sequence in the device simulation instance. When a test request is successfully matched with a transmitted data sequence, a simulated response is generated and output based on the response data sequence corresponding to that transmitted data sequence and according to the communication delay interval parameter.

[0007] Optionally, the test data template is generated through the following steps: Collect bidirectional communication data generated during the interaction between physical Mesh devices and the gateway; The bidirectional communication data is parsed to obtain the device address and at least one communication data pair consisting of a sent data sequence and a response data sequence. Acquire and record the corresponding communication delay interval parameters for communication data pairs; For each communication data pair, set and record the fuzzy matching position information in its transmitted data sequence; The device address, corresponding device model, communication data pairs, fuzzy matching location information, and communication delay interval parameters are associated and stored to generate a test data template.

[0008] Optionally, the device address and its corresponding device model, communication data pairs, fuzzy matching location information, and communication delay interval parameters are associated and stored, including: Establish a device test data storage table indexed by device address; In the device test data storage table, each device address is associated with the corresponding device model and at least one test scenario record; wherein, each test scenario record includes at least one communication data pair, and each communication data pair is associated with the corresponding fuzzy matching location information and communication delay interval parameter.

[0009] Optionally, receive a test request from the target device and compare it byte-by-byte with the transmitted data sequence in the device simulation instance, including: Receive and parse the test request from the target device to obtain the target device address; Obtain the corresponding device simulation instance based on the target device address; Traverse each transmitted data sequence in the device simulation instance. For the currently traversed transmitted data sequence, compare the test request with the transmitted data sequence byte by byte based on its associated fuzzy matching position information.

[0010] Optionally, when performing byte comparison, for fuzzy matching positions, it is not necessary to determine whether the test request and the corresponding sent data sequence are consistent; the comparison is directly determined to be successful. For non-fuzzy matching positions, it is determined whether the test request and the corresponding sent data sequence are consistent. If they are consistent, the comparison is successful. If the comparison results between the test request and the corresponding sent data sequence at both fuzzy matching positions and non-fuzzy matching positions are both successful, then the comparison between the test request and the corresponding sent data sequence is considered successful.

[0011] Optional, also includes: When the test request fails to match all sent data sequences in the device simulation instance, a default response is generated and output according to the preset default response rules; the default response rules include returning an exception message packet or ignoring the test request.

[0012] Optional, also includes: Receive byte comparison parameter configuration instructions; According to this configuration instruction, the fuzzy matching location information or matching accuracy is updated.

[0013] Optionally, based on the response data sequence corresponding to the transmitted data sequence, a simulated response is generated and output according to the communication delay interval parameter, including: Based on the transmitted data sequence, obtain the corresponding response data sequence and communication delay interval parameters; A simulated response is generated by copying the corresponding response data sequence, and the simulated response is output according to the corresponding communication delay interval parameter.

[0014] Corresponding to the aforementioned twin testing and simulation method for multi-node mesh networks, this invention provides a twin testing and simulation system for multi-node mesh networks, comprising: The test data template acquisition module is used to acquire the corresponding test data template based on the target device model; The device simulation instance creation module is used to create a device simulation instance based on the acquired test data template. The device simulation instance has a corresponding device address and is associated with at least one communication data pair consisting of a sent data sequence and a response data sequence. The sent data sequence is associated with fuzzy matching location information, and the communication data pair is associated with a communication delay interval parameter. The communication matching module is used to receive the test request from the target device and compare it byte by byte with the data sequence sent in the device simulation instance; and when the comparison is successful, the comparison result is sent to the simulation response module. The simulated response module is used to generate and output a simulated response based on the response data sequence corresponding to the sent data sequence and the communication delay interval parameter when the test request is successfully matched with a certain sent data sequence.

[0015] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a twin test simulation program for multi-node Mesh networks, wherein when the multi-node Mesh network twin test simulation program is executed by a processor, it implements the steps of the multi-node Mesh network twin test simulation method described above.

[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) By obtaining test data templates based on the target device model, testers do not need to purchase and deploy physical Mesh devices. They only need to call the corresponding digital template according to the model of the device under test to carry out the test, which significantly reduces the test cost and alleviates the economic and storage burden. By creating device simulation instances, the digital simulation of Mesh devices is realized, which greatly improves the test efficiency and avoids the repetitive and tedious physical environment construction work. By sending data sequences and associating them with fuzzy matching location information, the test request matching has fault tolerance and can adapt to the dynamic changing fields (such as serial numbers, timestamps, etc.) in actual communication, thereby improving the robustness and compatibility of the simulation test and reducing the matching failure caused by minor differences. By associating communication delay interval parameters with communication data, the simulation response can truly restore the response timing characteristics of the physical device, thereby ensuring the authenticity and reliability of the simulation test and effectively verifying the stability of the device under test in timing-sensitive scenarios.

[0017] (2) By collecting bidirectional communication data between physical Mesh devices and gateways, the test data templates are ensured to originate from real communication scenarios, thereby guaranteeing the authenticity and effectiveness of the simulation test; by parsing and obtaining device addresses and communication data, and acquiring and recording communication delay interval parameters, the digital recording of real communication behavior is realized, thus providing an accurate data foundation for subsequent simulation tests; by setting fuzzy matching location information, the templates can adapt to dynamic fields in the communication protocol, thereby improving the universality and reusability of the templates and reducing the workload of repeatedly collecting data for different scenarios; by generating test data templates through associated storage, standardized management of test data is realized, which facilitates the accumulation, sharing and rapid deployment of test data templates, further improving the test response speed.

[0018] (3) By establishing a device test data storage table indexed by device address, the test data is structured and organized, thereby improving data retrieval efficiency and supporting the rapid location of target device simulation data; by associating each device address with the device model and test scenario record, the centralized management of test data for multiple scenarios of the same device is realized, thereby supporting the simulation test of complex application scenarios and improving test coverage; the test scenario record includes communication data pairs and their associated fuzzy matching location information and communication delay interval parameters, realizing the complete encapsulation of scenario-level test data, thereby ensuring the precision and scenario reproduction of the simulation test.

[0019] (4) By receiving and parsing the test request to obtain the target device address, the initial routing of the test request is realized, thereby quickly determining the simulated device instance to be matched and improving the matching efficiency; by traversing the sent data sequence and comparing bytes according to the fuzzy matching position information, flexible and accurate request matching is realized, thereby ensuring the accuracy of matching while adapting to the dynamic changes of protocol fields and improving the matching success rate.

[0020] (5) For fuzzy matching positions, there is no need to determine byte consistency and the matching is passed directly, so that dynamically changing fields will not cause matching failure, thereby improving the simulator's compatibility and fault tolerance for protocol variants; for non-fuzzy matching positions, strict byte consistency is determined to ensure accurate matching of key protocol fields, thereby ensuring the correctness and security of the simulated response; by comprehensively judging the comparison results of fuzzy matching positions and non-fuzzy matching positions, a balance between flexibility and accuracy is achieved, thereby maximizing the matching success rate and reducing test interruptions while ensuring protocol compliance.

[0021] (6) When all sent data sequences fail to match, a default response is triggered, which avoids the test device from timeout or abnormality caused by no response to the test request, thereby improving the robustness and fault tolerance of the simulation test system; by returning an exception prompt packet or ignoring the default response rule of the test request, a configurable exception handling strategy is provided, thereby supporting the simulation of abnormal behavior in different test scenarios and enhancing the flexibility and coverage of the test.

[0022] (7) By receiving byte comparison parameter configuration instructions, the matching rules can be dynamically adjusted, thereby supporting testers to flexibly customize matching behavior according to specific test requirements; by updating fuzzy matching position information, the simulator can adapt to protocol version updates or private protocol extensions, thereby extending the life cycle of test data templates and reducing the workload of re-collecting data; by updating matching accuracy, it can support different test stage requirements from relaxed debugging to strict compliance verification, improving the adaptability and maintainability of the test system.

[0023] (8) By obtaining the corresponding response data sequence and communication delay interval parameters based on the sent data sequence, the correct correspondence between the response content and the request is ensured, thereby guaranteeing the accuracy and consistency of the simulated response; by generating the simulated response by copying the response data sequence, the rapid construction of response data is realized, thereby improving the response generation efficiency and reducing system overhead; by outputting the simulated response according to the communication delay interval parameters, the response timing behavior of the physical device is realistically restored, thereby effectively verifying the processing logic of the device under test in timing-sensitive scenarios and improving the authenticity and reliability of the test. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a simplified flowchart of an embodiment of the twin testing and simulation method for multi-node Mesh networks according to the present invention; Figure 2 This is a framework diagram of an embodiment of the twin testing and simulation system for multi-node Mesh networks according to the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] It should be noted that the method described in this invention is not limited to the Zigbee protocol, but is also applicable to mesh network devices such as Z-Wave, Bluetooth Mesh, and Thread. For ease of understanding, the following detailed explanation uses a Zigbee device as an example.

[0027] like Figure 1 As shown, the present invention provides a twin testing and simulation method for multi-node mesh networks, which includes the following steps: Based on the target device model, obtain the corresponding test data template; Based on the obtained test data template, a device simulation instance is created. This device simulation instance has a corresponding device address and is associated with at least one communication data pair consisting of a sent data sequence and a response data sequence. The sent data sequence is associated with fuzzy matching location information, and the communication data pair is associated with a communication delay interval parameter. The system receives test requests from the target device and performs byte-by-byte comparison with the transmitted data sequence in the device simulation instance. When a test request is successfully matched with a transmitted data sequence, a simulated response is generated and output based on the response data sequence corresponding to that transmitted data sequence and according to the communication delay interval parameter.

[0028] Preferably, the device address corresponding to the device simulation instance can be randomly generated, or a UI interface can be provided to specify it through user input.

[0029] In this embodiment, the number of target devices is one or more (such as simultaneously simulating three Zigbee devices: a smart switch, a temperature and humidity sensor, and a smart curtain).

[0030] This invention obtains test data templates based on the target device model, eliminating the need for testers to purchase and deploy physical mesh devices. Testers can simply use the corresponding digital template based on the device under test model to conduct tests, significantly reducing testing costs and alleviating economic and storage burdens. By creating device simulation instances, it achieves digital simulation of mesh devices, greatly improving testing efficiency and avoiding repetitive and tedious physical environment setup. By sending data sequences and associating them with fuzzy matching location information, it enables fault-tolerant test request matching, adapting to dynamically changing fields (such as serial numbers and timestamps) in actual communication, thereby improving the robustness and compatibility of the simulation test and reducing matching failures due to minor differences. By associating communication data with communication delay interval parameters, the simulated response can realistically reproduce the response timing characteristics of the physical device, ensuring the authenticity and reliability of the simulation test and effectively verifying the stability of the device under test in time-sensitive scenarios.

[0031] In this embodiment, the test data template is generated through the following steps: Collect bidirectional communication data generated during the interaction between physical Mesh devices and the gateway; The bidirectional communication data is parsed to obtain the device address and at least one communication data pair consisting of a sent data sequence and a response data sequence. Acquire and record the corresponding communication delay interval parameters for communication data pairs; For each communication data pair, set and record the fuzzy matching position information in its transmitted data sequence; The device address, corresponding device model, communication data pairs, fuzzy matching location information, and communication delay interval parameters are associated and stored to generate a test data template.

[0032] Specifically, the process of collecting bidirectional communication data generated during the interaction between the physical Mesh device and the gateway includes: establishing a communication link between the test device, the gateway, and the coordinator; controlling the physical device to conduct full-scenario communication interactions with the test target, covering normal command interactions, abnormal command responses, and status feedback; and capturing bidirectional communication data between the gateway and the coordinator through a server-side program deployed on the gateway.

[0033] In this embodiment, the communication link between the gateway and the coordinator can be established via, but is not limited to, serial port / Socket. The coordinator connects to the test device via a wireless network. Starting the server program in the gateway allows the acquisition of bidirectional communication data between the gateway and the coordinator. A new simulated device configuration is added to the simulator, and the model of the device to be collected is set.

[0034] Preferably, the bidirectional communication data follows a specific communication protocol format, including fields such as packet header, packet number, device address, data, and checksum.

[0035] To facilitate understanding of this invention, an example of network access test simulation is provided: First, the test device is added to the smart home system according to the smart home network access method. Then, the server program on the gateway captures the bidirectional communication data between the device and the gateway during network access and sends it to the corresponding data acquisition module on the simulator's client. The simulator client parses the data according to the protocol to obtain the device's address and at least one communication data pair consisting of a sent data sequence and a response data sequence. The communication delay interval parameter corresponding to the communication data pair is acquired and recorded; simultaneously, the bidirectional communication data is recorded and saved. For each communication data pair, when saving, it is possible to set whether any position in the sent data sequence is a fuzzy match, and this is recorded. In addition, the corresponding test name and test type (network access / network access test) are recorded, and the device address, corresponding device model, communication data pair, fuzzy match position information, and communication delay interval parameter are associated and stored to generate a test data template.

[0036] To further understand this invention, another example of device scenario testing is provided: A gateway performs full-scenario testing on the test device, such as switch control, brightness control, and color control. Simultaneously, it captures bidirectional communication data between the gateway and the coordinator. Each test operation record (the recording process and content can be referenced in the network access test simulation) is appended to the previously configured device test data storage table. Afterward, all test operations on the test device are performed and stored.

[0037] This invention ensures that the test data templates originate from real communication scenarios by collecting bidirectional communication data between physical Mesh devices and gateways, thereby guaranteeing the authenticity and effectiveness of the simulation tests. By parsing and obtaining device addresses and communication data, and acquiring and recording communication delay interval parameters, it achieves digital recording of real communication behavior, thus providing an accurate data foundation for subsequent simulation tests. By setting fuzzy matching location information, the templates can adapt to dynamic fields in communication protocols, thereby improving the templates' versatility and reusability, and reducing the workload of repeatedly collecting data for different scenarios. By generating test data templates through associated storage, it achieves standardized management of test data, facilitating the accumulation, sharing, and rapid deployment of test data templates, further improving test response speed.

[0038] In this embodiment, the device address and its corresponding device model, communication data pairs, fuzzy matching location information, and communication delay interval parameters are associated and stored, including: Establish a device test data storage table indexed by device address; In the device test data storage table, each device address is associated with the corresponding device model and at least one test scenario record; wherein, each test scenario record includes at least one communication data pair, and each communication data pair is associated with the corresponding fuzzy matching location information and communication delay interval parameter.

[0039] In this embodiment, the specific data format for generating test data templates using structured storage can be JSON or similar formats.

[0040] This invention establishes a device test data storage table indexed by device address, thereby achieving structured organization of test data, which improves data retrieval efficiency and supports rapid location of simulated data for target devices. By associating each device address with the device model and test scenario record, it achieves centralized management of test data for multiple scenarios on the same device, thus supporting simulated testing of complex application scenarios and improving test coverage. The test scenario record includes communication data pairs and their associated fuzzy matching location information and communication delay interval parameters, achieving complete encapsulation of scenario-level test data, thereby ensuring the precision and scenario fidelity of the simulated test.

[0041] In this embodiment, receiving a test request from the target device and comparing it byte-by-byte with the transmitted data sequence in the device simulation instance includes: Receive and parse the test request from the target device to obtain the target device address; Obtain the corresponding device simulation instance based on the target device address; Traverse each transmitted data sequence in the device simulation instance. For the currently traversed transmitted data sequence, compare the test request with the transmitted data sequence byte by byte based on its associated fuzzy matching position information.

[0042] This invention achieves preliminary routing of test requests by receiving and parsing test requests to obtain the target device address, thereby quickly determining the simulated device instance to be matched and improving matching efficiency. By traversing the sent data sequence and comparing bytes according to fuzzy matching position information, flexible and accurate request matching is achieved, thereby ensuring matching accuracy while adapting to dynamic changes in protocol fields and improving the matching success rate.

[0043] In this embodiment, when performing byte comparison, for fuzzy matching positions, it is not necessary to determine whether the test request and the corresponding sent data sequence are consistent; the comparison is directly determined to be successful. For non-fuzzy matching positions, it is determined whether the test request and the corresponding sent data sequence are consistent. If they are consistent, the comparison is successful. If the comparison results between the test request and the corresponding sent data sequence at both fuzzy matching positions and non-fuzzy matching positions are both successful, then the comparison between the test request and the corresponding sent data sequence is considered successful.

[0044] This invention allows fuzzy matching positions to pass directly without checking byte consistency, preventing matching failures due to dynamically changing fields and thus improving the simulator's compatibility and fault tolerance for protocol variations. For non-fuzzy matching positions, it strictly checks byte consistency to ensure accurate matching of key protocol fields, thereby guaranteeing the correctness and security of the simulated response. By comprehensively judging the comparison results of fuzzy and non-fuzzy matching positions, it achieves a balance between flexibility and accuracy, maximizing the matching success rate and reducing test interruptions while ensuring protocol compliance.

[0045] In this embodiment, when the test request fails to match all transmitted data sequences in the device simulation instance, a default response is generated and output according to the preset default response rules; the default response rules include returning an error message packet or ignoring the test request.

[0046] Furthermore, the default response rule can also be: trigger the re-collection of bidirectional communication data between physical devices in this scenario.

[0047] A default response is triggered when all sent data sequences fail to match, avoiding timeouts or anomalies in the device under test caused by unresponsive test requests, thereby improving the robustness and fault tolerance of the simulation test system. By returning an exception message packet or ignoring the default response rule for test requests, a configurable exception handling strategy is provided, thereby supporting the simulation of abnormal behaviors in different test scenarios and enhancing the flexibility and coverage of testing.

[0048] In this embodiment, the method further includes: Receive byte comparison parameter configuration instructions; Update the fuzzy matching location information or matching accuracy according to the configuration instructions.

[0049] Furthermore, to improve the adaptability and ease of use of the method described in this invention, the method further includes: Receive and respond to user configuration instructions. Preferably, user configuration instructions include instructions to adjust communication delay interval parameters, instructions to add data to the device test data storage table, instructions to edit the device test data storage table, and instructions to export bidirectional communication data. When the user configuration command is a communication delay interval parameter adjustment command, respond to the command and adjust the communication delay interval parameter accordingly; When the user configures the instruction to add a new data storage table to the device test data storage table, the system responds to the instruction and performs the corresponding add operation on the communication device test data storage table. When the user configuration command is an instruction to edit the device test data storage table, the system responds to the command and performs the corresponding editing operation on the communication device test data storage table. When the user-configured command is a two-way communication data export command, the system responds to the command and exports the corresponding two-way communication data.

[0050] This invention enables dynamic adjustment of matching rules by receiving byte comparison parameter configuration instructions, thereby supporting testers to flexibly customize matching behavior according to specific testing needs; by updating fuzzy matching position information, the simulator can adapt to protocol version updates or private protocol extensions, thereby extending the life cycle of test data templates and reducing the workload of re-collecting data; by updating matching accuracy, it can support different testing stages from relaxed debugging to strict compliance verification, improving the adaptability and maintainability of the testing system.

[0051] In this embodiment, based on the response data sequence corresponding to the transmitted data sequence, a simulated response is generated and output according to the communication delay interval parameter, including: Based on the transmitted data sequence, obtain the corresponding response data sequence and communication delay interval parameters; A simulated response is generated by copying the corresponding response data sequence, and the simulated response is output according to the corresponding communication delay interval parameter (e.g., 50ms).

[0052] This invention ensures the correct correspondence between the response content and the request by obtaining the corresponding response data sequence and communication delay interval parameters based on the sent data sequence, thereby guaranteeing the accuracy and consistency of the simulated response. By generating a simulated response by copying the response data sequence, it achieves rapid construction of response data, thus improving response generation efficiency and reducing system overhead. By outputting a simulated response based on the communication delay interval parameters, it realistically reproduces the response timing behavior of the physical device, effectively verifying the processing logic of the device under test in timing-sensitive scenarios and improving the realism and reliability of the test.

[0053] like Figure 2 As shown, the present invention also provides a twin test simulation system for multi-node mesh networks, which includes: The test data template acquisition module 10 is used to acquire the corresponding test data template based on the target device model; The device simulation instance creation module 20 is used to create a device simulation instance based on the acquired test data template. The device simulation instance has a corresponding device address and is associated with at least one communication data pair consisting of a sent data sequence and a response data sequence. The sent data sequence is associated with fuzzy matching location information, and the communication data pair is associated with a communication delay interval parameter. The communication matching module 30 is used to receive the test request from the target device and compare it with the data sequence sent in the device simulation instance. When the comparison is successful, the comparison result is sent to the simulation response module 40. The simulated response module 40 is used to generate and output a simulated response based on the response data sequence corresponding to the sent data sequence and according to the communication delay interval parameter when the test request is successfully compared with a certain sent data sequence.

[0054] Preferably, the simulation response module 40 is further configured to generate and output a default response according to a preset default response rule when the test request fails to match all transmitted data sequences in the device simulation instance; preferably, the default response rule includes returning an error message packet or ignoring the test request.

[0055] Furthermore, the system of the present invention may also include a configuration module for receiving byte comparison parameter configuration instructions; updating fuzzy matching position information or matching accuracy according to the configuration instructions; and receiving and responding to user configuration instructions. Preferably, the user configuration instructions include communication delay interval parameter adjustment instructions, device test data storage table addition instructions, device test data storage table editing instructions, and bidirectional communication data export instructions.

[0056] In this embodiment, when the user configuration command is a communication delay interval parameter adjustment command, the system responds to the command and adjusts the communication delay interval parameter accordingly; when the user configuration command is a device test data storage table addition command, the system responds to the command and adds the corresponding data to the communication device test data storage table; when the user configuration command is a device test data storage table editing command, the system responds to the command and edits the corresponding data to the communication device test data storage table; and when the user configuration command is a bidirectional communication data export command, the system responds to the command and exports the corresponding bidirectional communication data.

[0057] This invention also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the memory described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement... Figure 1 The method shown is a twin test simulation method for multi-node mesh networks. The computer-readable storage medium can be a read-only memory, a hard disk, or an optical disk, etc.

[0058] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments and storage medium embodiments, since they are basically similar to method embodiments, the descriptions are relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0059] Furthermore, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0060] The foregoing description illustrates and describes preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept by means of the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A twin testing and simulation method for multi-node mesh networks, characterized in that, Includes the following steps: Based on the target device model, obtain the corresponding test data template; Based on the obtained test data template, a device simulation instance is created. This device simulation instance has a corresponding device address and is associated with at least one communication data pair consisting of a sent data sequence and a response data sequence. The sent data sequence is associated with fuzzy matching location information, and the communication data pair is associated with a communication delay interval parameter. The system receives test requests from the target device and performs byte-by-byte comparison with the transmitted data sequence in the device simulation instance. When a test request is successfully matched with a transmitted data sequence, a simulated response is generated and output based on the response data sequence corresponding to that transmitted data sequence and according to the communication delay interval parameter.

2. The twin testing and simulation method for multi-node Mesh networks according to claim 1, characterized in that, The test data template is generated through the following steps: Collect bidirectional communication data generated during the interaction between physical Mesh devices and the gateway; The bidirectional communication data is parsed to obtain the device address and at least one communication data pair consisting of a sent data sequence and a response data sequence. Acquire and record the corresponding communication delay interval parameters for communication data pairs; For each communication data pair, set and record the fuzzy matching position information in its transmitted data sequence; The device address, corresponding device model, communication data pairs, fuzzy matching location information, and communication delay interval parameters are associated and stored to generate a test data template.

3. The twin testing and simulation method for multi-node Mesh networks according to claim 2, characterized in that, The device address and its corresponding device model, communication data pairs, fuzzy matching location information, and communication delay interval parameters are associated and stored, including: Establish a device test data storage table indexed by device address; In the device test data storage table, each device address is associated with the corresponding device model and at least one test scenario record; wherein, each test scenario record includes at least one communication data pair, and each communication data pair is associated with the corresponding fuzzy matching location information and communication delay interval parameter.

4. The twin testing and simulation method for multi-node mesh networks according to claim 1, characterized in that, Receive the test request from the target device and compare it byte-by-byte with the data sequence sent in the device simulation instance, including: Receive and parse the test request from the target device to obtain the target device address; Obtain the corresponding device simulation instance based on the target device address; Traverse each transmitted data sequence in the device simulation instance. For the currently traversed transmitted data sequence, compare the test request with the transmitted data sequence byte by byte based on its associated fuzzy matching position information.

5. The twin testing and simulation method for multi-node Mesh networks according to claim 4, characterized in that, When performing byte comparison, for fuzzy matching positions, it is not necessary to determine whether the test request and the corresponding sent data sequence are consistent; the comparison is directly determined to be successful. For non-fuzzy matching positions, it is determined whether the test request and the corresponding sent data sequence are consistent. If they are consistent, the comparison is successful. If the comparison results between the test request and the corresponding sent data sequence at both fuzzy matching positions and non-fuzzy matching positions are both successful, then the comparison between the test request and the corresponding sent data sequence is considered successful.

6. The twin testing and simulation method for multi-node mesh networks according to claim 1, characterized in that, Also includes: When the test request fails to match all sent data sequences in the device simulation instance, a default response is generated and output according to the preset default response rules. The default response rules include returning an exception message or ignoring the test request.

7. The twin testing and simulation method for multi-node mesh networks according to claim 1, characterized in that, Also includes: Receive byte comparison parameter configuration instructions; Update the fuzzy matching location information or matching accuracy according to the configuration instructions.

8. The twin testing and simulation method for multi-node mesh networks according to claim 1, characterized in that, Based on the response data sequence corresponding to the transmitted data sequence, a simulated response is generated and output according to the communication delay interval parameter, including: Based on the transmitted data sequence, obtain the corresponding response data sequence and communication delay interval parameters; A simulated response is generated by copying the corresponding response data sequence, and the simulated response is output according to the corresponding communication delay interval parameter.

9. A twin testing and simulation system for multi-node mesh networks, characterized in that, include: The test data template acquisition module is used to acquire the corresponding test data template based on the target device model; The device simulation instance creation module is used to create a device simulation instance based on the acquired test data template. The device simulation instance has a corresponding device address and is associated with at least one communication data pair consisting of a sent data sequence and a response data sequence. The sent data sequence is associated with fuzzy matching location information, and the communication data pair is associated with a communication delay interval parameter. The communication matching module is used to receive the test request from the target device and compare it byte by byte with the data sequence sent in the device simulation instance; and when the comparison is successful, the comparison result is sent to the simulation response module. The simulated response module is used to generate and output a simulated response based on the response data sequence corresponding to the sent data sequence and the communication delay interval parameter when the test request is successfully matched with a certain sent data sequence.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a twin test simulation program for multi-node Mesh networks, which, when executed by a processor, implements the steps of the twin test simulation method for multi-node Mesh networks as described in any one of claims 1 to 8.