Test method and device, test equipment, computer readable storage medium and dynamic test system

By acquiring the operating cycle and reference message combination under working conditions, equipment simulation data is generated to simulate the state of terminal equipment. This solves the problems of long time consumption, high cost and high risk in the testing of monitoring equipment, realizes a fast and convenient testing method, and improves testing efficiency and accuracy.

CN121334015APending Publication Date: 2026-01-13XIAMEN KECAN INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511253620.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing testing methods for monitoring equipment are time-consuming, costly, and risky, making it difficult to achieve synchronous linkage of measurement points under complex working conditions, resulting in low testing efficiency.

Method used

By acquiring the operating cycle and reference message combination under each operating condition, equipment simulation data is generated to simulate the actual state of the terminal equipment. Monitoring equipment is used to monitor the operating condition response information, determine the test results, and achieve rapid and convenient operating condition switching and comprehensive verification.

Benefits of technology

Shorten testing time, reduce costs, improve the authenticity and credibility of testing, reduce risks, ensure the objectivity and efficiency of test results, and comprehensively verify the functions and performance of monitoring equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121334015A_ABST
    Figure CN121334015A_ABST
Patent Text Reader

Abstract

The invention provides a test method and device, test equipment, a computer readable storage medium and a dynamic test system. The method comprises the following steps: acquiring a corresponding operation cycle and a reference message combination under each working condition, wherein the reference message combination comprises a reference message received by terminal equipment under the corresponding working condition; for each working condition, generating equipment simulation data based on the reference message combination corresponding to the working condition; based on the operation cycle corresponding to each working condition, each piece of equipment simulation data is operated, working condition response information monitored by monitoring equipment is obtained, and the monitoring equipment is used for monitoring the working condition of the terminal equipment; and determining a test result of the monitoring equipment based on the working condition response information and the reference information. According to the invention, the test efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automation technology, and in particular to a testing method, apparatus, testing equipment, computer-readable storage medium, and dynamic testing system. Background Technology

[0002] Testing surveillance equipment is a crucial step in ensuring the system functions properly, performs reliably, and is highly secure. Testing verifies the basic functions of the equipment, ensuring the normal operation of core functions such as video acquisition, storage, playback, and alarms. It also assesses the stability of the equipment during long-term operation, preventing malfunctions from affecting monitoring effectiveness. Furthermore, testing can identify any vulnerabilities in the equipment, preventing unauthorized access or data leaks.

[0003] The relevant testing methods are time-consuming, costly, and risky, resulting in low testing efficiency. Summary of the Invention

[0004] This application provides a testing method, apparatus, testing equipment, computer-readable storage medium, and dynamic testing system, which can improve testing efficiency.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] This application provides a testing method, the method comprising:

[0007] Obtain the corresponding operating cycle and reference message combination for each operating condition, wherein the reference message combination includes the reference message received by the terminal device under the corresponding operating condition;

[0008] For each of the aforementioned operating conditions, equipment simulation data is generated based on the combination of reference messages corresponding to that operating condition;

[0009] Based on the operating cycle corresponding to each operating condition, the simulation data of each device is run, and the operating condition response information monitored by the monitoring device is obtained. The monitoring device is used to monitor the operating condition of the terminal device.

[0010] Based on the operating condition response information and reference information, the test results of the monitoring equipment are determined.

[0011] This application provides a testing apparatus, the apparatus comprising:

[0012] The first acquisition module is used to acquire the corresponding operating cycle and reference message combination under each operating condition. The reference message combination includes the reference message received by the terminal device under the corresponding operating condition.

[0013] A generating device is used to generate device simulation data for each of the aforementioned operating conditions based on a combination of reference messages corresponding to the operating condition.

[0014] The operation module is used to run the simulation data of each device based on the operation cycle corresponding to each operating condition, and to obtain the operating condition response information monitored by the monitoring device, wherein the monitoring device is used to monitor the operating condition of the terminal device.

[0015] The first determining module is used to determine the test results of the monitoring equipment based on the operating condition response information and reference information.

[0016] This application provides a testing device, including:

[0017] Memory is used to store executable instructions for a computer;

[0018] The processor, when executing computer-executable instructions stored in the memory, implements the testing method provided in the embodiments of this application.

[0019] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the testing method provided in this application.

[0020] This application provides a dynamic testing system, including a terminal device, a testing device, and a monitoring device. The terminal device is used to send communication messages under each working condition to the testing device, and the testing device is used to test the monitoring device using the above-described testing method.

[0021] This application provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implements the testing method provided in this application.

[0022] The embodiments of this application have the following beneficial effects:

[0023] In this embodiment, by acquiring the operating cycle and reference message combination corresponding to each operating condition, the actual state of the terminal device under different operating conditions can be simulated, achieving the purpose of reproducing the scene. This eliminates the need for test configuration based on different device protocols, shortening test time and reducing test costs. Furthermore, device simulation data is generated based on the reference message combination corresponding to each operating condition, ensuring that the test results reflect the actual operating environment, thus improving the authenticity and credibility of the test. This eliminates the need for actual testing of the terminal device, reducing test risks. Next, the device simulation data is run based on the operating cycle to achieve the purpose of switching between different operating conditions, enabling rapid and convenient switching. In addition, testing under different operating conditions can comprehensively verify the functions and performance of the monitoring device. The real-time performance, accuracy, and consistency of the monitoring device are verified through the monitoring device's response information to the terminal device's operating conditions. Finally, the reference information is used as a benchmark and compared with the monitoring device's operating condition response information to ensure the objectivity of the test results, thereby improving test efficiency. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of a network architecture of the dynamic testing system 100 provided in this application embodiment;

[0025] Figure 2 This is a schematic diagram of the structure of the terminal 400 provided in the embodiments of this application;

[0026] Figure 3 This is a flowchart illustrating a testing method provided in an embodiment of this application;

[0027] Figure 4 This is a schematic diagram of a message processing flow provided in an embodiment of this application;

[0028] Figure 5 This is a schematic diagram of a framework for a synchronous linkage strategy of measuring points under different working conditions provided in the embodiments of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0031] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0032] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0033] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.

[0034] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0035] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0036] 1) Simulation testing is a testing method that uses virtual models or simulation tools to generate test data and scenarios by simulating actual operating environments and conditions, in order to verify the functionality and evaluate the performance of equipment or systems.

[0037] The characteristics of simulation testing include: a test environment that runs on a software platform or simulation equipment, requiring no real hardware or actual operating environment; flexibility, capable of quickly simulating various operating conditions and boundary conditions; suitable for testing complex or hazardous scenarios (such as extreme temperatures or high loads); low cost, eliminating the need to deploy a complete hardware system and reducing the use of physical equipment; and suitability for the development phase, particularly in the early stages of system development when hardware is not yet complete or when real-world conditions are difficult to achieve.

[0038] Software testing applications include verifying algorithms, testing software functionality, and simulating extreme environments. Verifying algorithms can include control algorithms, data processing algorithms, etc.; testing software functionality can include protocol stacks, logical judgments, etc.; simulating extreme environments can include high-frequency communication, high load, etc.

[0039] 2) Real-world testing is a testing method that comprehensively verifies the functionality, performance, and reliability of a system or device in real equipment and actual operating environments.

[0040] The characteristics of real-world testing include: a testing environment requiring real hardware, actual operating conditions, and related supporting facilities; realism, as test results directly reflect the system's performance in real-world scenarios and can uncover potential hardware and software issues (such as electromagnetic interference and mechanical wear) in real-world environments; high cost, requiring investment in real equipment and resources, resulting in higher testing time and maintenance costs; and suitability for application phases, primarily used in the later stages of system development, production verification, or post-deployment acceptance testing.

[0041] Real-world testing applications include acceptance testing, performance testing, environmental adaptability testing, and integration testing. Acceptance testing ensures the equipment meets design and functional requirements; performance testing verifies the system's stability under actual loads; environmental adaptability testing includes temperature, humidity, and vibration testing; and integration testing assesss the equipment's performance within the overall system.

[0042] To better understand the testing methods provided in the embodiments of this application, the testing methods and existing technical problems in related technologies will be explained first.

[0043] In related technologies, due to the diversity of embedded system products, when testing devices, such as when testing functions such as communication, control and alarm, it is necessary to configure a matching simulation environment for different protocol types. This is not only time-consuming but also prone to configuration errors. When directly combining the device with the actual system for joint testing, it not only increases hardware and labor costs but also poses risks due to operational errors and potential risks to the machine under complex operating conditions.

[0044] Taking a real system including a display screen as an example, the test methods in related technologies are explained. For testing the display screen's communication, control, and alarm functions, two methods are generally used: simulation testing and real system testing.

[0045] The first method involves setting up a simulation environment, which requires configuration according to the device protocol. As the number of device protocols increases, the time cost of configuration also increases. Furthermore, simulation testing has some drawbacks, such as the inability to achieve linkage changes of measurement points and the inability to link alarms.

[0046] The second method is to install the display screen directly on the actual machine for testing. This method can save the time cost of configuring simulation tools, but actual machine testing requires manpower to go to the site, which increases manpower costs. In addition, there are certain risks in testing on the actual machine, such as operational errors, frequent power on and off, and high system load.

[0047] Currently, simulation tools are configured based on factors such as protocol type, protocol content, and message format. As a result, simulation tools configured in this way can only be used for specific protocols and have very poor versatility.

[0048] During normal operation of the actual system, various complex operating conditions exist. When a certain operating condition is triggered, the values ​​of the measuring points will also change accordingly. For example, when the mains power fails, the system automatically switches to battery power. At this time, the measuring point values ​​when the mains power fails, the measuring point values ​​when the battery is powered, and the system voltage value will all change synchronously. This kind of synchronous linkage of measuring points is difficult to achieve in the simulation tools currently used, and it has the following problems:

[0049] First, the values ​​of the linked points can be customized, but these values ​​may not be reasonable.

[0050] Second, when many values ​​are modified, real-time performance cannot be guaranteed, which may lead to asynchronous linkage.

[0051] Third, it is impossible to set a cycle to switch between various operating conditions.

[0052] In conclusion, there is an urgent need for a testing method that can ensure safety, closely reflect actual usage conditions, and save time and effort.

[0053] This application provides a testing method, apparatus, testing equipment, computer-readable storage medium, and dynamic testing system, which can improve testing efficiency. The following describes exemplary applications of the testing equipment provided in this application. The testing equipment provided in this application can be implemented as various types of terminals such as personal computers, embedded devices, automated testing tools, load testing tools, mobile devices, test hosts, hardware debuggers, software emulators, and environment simulators, or it can be implemented as a server. The following will describe exemplary applications when the testing equipment is implemented as a personal computer.

[0054] See Figure 1 , Figure 1 This is a network architecture diagram of the dynamic testing system 100 provided in this application embodiment. In order to support a testing application, the terminal device 200, the testing device 400 and the monitoring device 500 are connected to each other through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0055] Terminal device 200 is used to send communication messages under each operating condition to test device 400; monitoring device 500 is used to monitor the operating condition of terminal device 200 and send the detected operating condition response information to test device 400; test device 400 is used to obtain the corresponding operating cycle and reference message combination under each operating condition, the reference message combination including the reference message received by terminal device under the corresponding operating condition; for each operating condition, device simulation data is generated based on the reference message combination corresponding to the operating condition; based on the operating cycle corresponding to each operating condition, each device simulation data is run and the operating condition response information monitored by monitoring device 500 is obtained; based on the operating condition response information and reference information, the test result of monitoring device 200 is determined.

[0056] In this embodiment, the test device 400, by acquiring the operating cycle and reference message combination corresponding to each operating condition, can simulate the actual state of the terminal device under different operating conditions, achieving the purpose of reproducing the scene. This eliminates the need for test configuration based on different device protocols, shortening test time and reducing test costs. Furthermore, it generates device simulation data based on the reference message combination corresponding to each operating condition, ensuring that the test results reflect the actual operating environment, thus improving the authenticity and credibility of the test. This eliminates the need for actual testing of the terminal device, reducing test risks. Next, based on the operating cycle and the device simulation data, it achieves the purpose of switching between different operating conditions, enabling rapid and convenient switching. In addition, testing under different operating conditions comprehensively verifies the functions and performance of the monitoring device. It also verifies the real-time performance, accuracy, and consistency of the monitoring device through the monitoring device's response information to the terminal device's operating conditions. Finally, the reference information is used as a benchmark and compared with the monitoring device's operating condition response information to ensure the objectivity of the test results, thereby improving test efficiency.

[0057] In some embodiments, terminal devices, testing devices, and monitoring devices can be directly or indirectly connected to each other via wired or wireless communication, and this application embodiment does not impose any restrictions.

[0058] See Figure 2 , Figure 2 This is a schematic diagram of the structure of the test equipment 400 provided in the embodiments of this application. Figure 2 The test device 400 shown includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the service server 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 440.

[0059] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0060] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0061] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0062] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0063] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0064] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0065] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.

[0066] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;

[0067] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0068] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2 A test apparatus 455 stored in memory 450 is shown. This apparatus can be software in the form of programs and plug-ins, and includes the following software modules: a first acquisition module 4551, a generation module 4552, an execution module 4553, and a first determination module 4554. These modules are logically linked and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.

[0069] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the test method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0070] In some embodiments, the testing device can implement the testing method provided in this application by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run, such as test APPs or simulation APPs; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to a browser environment to run. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin.

[0071] The testing methods provided in this application will be described in conjunction with exemplary applications and implementations of the testing equipment provided in the embodiments of this application.

[0072] The testing method provided in the embodiments of this application will be described below. As mentioned above, the testing device for implementing the testing method of the embodiments of this application can be a personal computer. Therefore, the executing entity of each step will not be described again below.

[0073] It should be noted that the test method examples below are illustrated using monitoring equipment as an example. Those skilled in the art, based on their understanding of the following text, can apply the test methods provided in this application to the testing of routers, switches, firewalls, controllers, servers, base station equipment, modems, security devices, and multimedia devices. This application's embodiments can also be applied to various scenarios, including but not limited to communications, industrial automation, security, healthcare, automotive and intelligent transportation, consumer electronics, and energy and power.

[0074] See Figure 3 , Figure 3 This is a flowchart illustrating a testing method provided in an embodiment of this application, which will be combined with... Figure 3 The steps shown illustrate the test method provided in the embodiments of this application. Figure 3 The execution entity is the personal computer.

[0075] In step S101, the corresponding operating cycle and reference message combination for each operating condition are obtained.

[0076] In the embodiments of this application, the reference message combination includes the reference message received by the terminal device under the corresponding operating conditions.

[0077] In some embodiments, operating condition refers to the operational state of a terminal device under specific working conditions. Taking a high-end power supply or data center as an example, operating condition refers to the state of the power supply equipment or the data center as a whole operating under different working conditions. These operating conditions typically include aspects such as load conditions, environmental conditions, power quality, energy efficiency performance, and safe operating status.

[0078] In some embodiments, load conditions refer to the current workload of the power supply or data center, which can be light load, full load, or overload. Environmental conditions include environmental factors such as temperature, humidity, and air quality, which directly affect the heat dissipation of power supply equipment and the operation of servers within the data center. Power quality involves the stability of parameters such as voltage, frequency, and waveform, which is crucial for ensuring the normal operation of electronic equipment and data security within the data center. Energy efficiency performance refers to the energy efficiency of the power supply and data center during operation, including the power supply's conversion efficiency and the overall energy efficiency of the system. Safe operating status refers to whether the security systems of the power supply equipment and data center are operating normally, including fire prevention, anti-theft, and monitoring systems.

[0079] In some embodiments, the operating cycle of a working condition refers to the duration of continuous operation under that working condition. Different working conditions may correspond to different operating cycles, or different working conditions may correspond to the same operating cycle. For example, the operating cycle corresponding to working condition 1 may be 2 minutes, and the operating cycle of working condition 2 may be 3 minutes.

[0080] In some embodiments, the reference message combination for a working condition refers to the reference messages received when the terminal device is running under the corresponding working condition. For example, when the terminal device is running under working condition 1, the received reference messages include message 1-1, message 2-1, and message 3-1. Then, (message 1-1, message 2-1, message 3-1) is determined as the reference message combination corresponding to working condition 1.

[0081] In some embodiments, the operating cycle corresponding to each operating condition can be pre-set and stored in the storage space of the test device; and the reference message combination corresponding to each operating condition can be pre-determined and stored in the storage space of the test device. Based on this, the operating cycle and reference message combination corresponding to each operating condition can be obtained from the storage space based on the storage address.

[0082] In some embodiments, before performing step S101, a reference message combination corresponding to each operating condition can be determined first. Based on this, before performing step S101, the following can also be performed: obtaining the communication messages of the terminal device under each operating condition; parsing each communication message under each operating condition to obtain multiple parsed messages; determining the send / receive identifier of each parsed message; and determining the reference message combination corresponding to the operating condition from the communication messages corresponding to the operating condition based on the send / receive identifier.

[0083] In some embodiments, message acquisition software is deployed on the test equipment, which can control the terminal device to operate under each working condition, and use the message acquisition software to acquire the communication messages of the terminal device under each working condition during operation.

[0084] In some embodiments, the process of parsing communication messages under each working condition can be as follows: Based on the basic characteristics of the communication messages, such as the information in the message header, the communication messages are classified into different protocol types, such as Hypertext Transfer Protocol (HTTP), Modbus, Grand Stream Protocol (GSP), etc. Next, the parsing method corresponding to the protocol type is determined, and the communication message of that protocol type is structurally parsed using the parsing method to identify different parts of the communication message, such as the header, message body, checksum, etc. Finally, key information, such as the source Media Access Control (MAC) address, destination MAC address, transaction identifier, protocol identifier, and unit identifier, is extracted from the communication message according to the protocol specification to obtain the parsed message. This parsed message can be in a structured data format, such as a dictionary, object, or record in a database table, which facilitates further processing and analysis by the program. The parsed message can also be in a human-readable text format, such as Extensible Markup Language (XML), JavaScript Object Notation (JSON), or a simple line of text, which contains the various fields of the message and their corresponding values. The parsed message can also maintain a binary format, but the start and end positions of each field are marked in some way for direct processing.

[0085] In some embodiments, the parsed message header contains the source and destination addresses. For example, at the Internet Protocol Address (IP) layer, the sender / receiver identifier of the parsed message can be determined using the source and destination IP addresses. Furthermore, the sender / receiver identifier of the parsed message can also be determined by analyzing transaction identifiers, examining protocol header information, and other methods.

[0086] In some embodiments, the above-mentioned process of "determining the reference message combination corresponding to the working condition from the communication messages corresponding to the working condition based on the transmit and receive identifiers" can be as follows: determining the transmit message and the receive message corresponding to each transmit message from the communication messages corresponding to the working condition based on the transmit and receive identifiers; determining the number of receive messages corresponding to each transmit message; when the number of messages is greater than a preset value, determining the receive message corresponding to the transmit message as the reference message combination corresponding to the working condition.

[0087] In some embodiments, following the example above, assuming that 100 communication messages are collected for operating condition 1, the sending messages and the corresponding receiving messages are first distinguished based on the sender and receiver identifiers of each communication message (i.e., the sender and receiver identifiers of the corresponding parsed messages). Then, for each sending message, the corresponding receiving message is determined. If multiple receiving messages of a response module are received, the earliest received receiving message or a randomly obtained receiving message is retained, and the remaining receiving messages are deleted to ensure a unique response for the response module. Thus, for multiple response modules, multiple receiving messages corresponding to the sending messages are determined. Finally, the number of receiving messages for the sending message is determined, for example, 3, 5, etc., and when the number of messages is greater than a preset value, the receiving messages corresponding to the sending message are determined as the reference message combination for operating condition 1.

[0088] In some embodiments, the preset value is a value set in advance based on experience; for example, the preset value can be set to 1, 2, etc. This can characterize the reference message combination as a reply message corresponding to a periodic message.

[0089] In step S102, for each operating condition, equipment simulation data is generated based on the combination of reference messages corresponding to the operating condition.

[0090] In some embodiments, for each operating condition, a reference message combination corresponding to that operating condition is used as a reference sample for simulation. Next, key features of the reference message combination are extracted, such as message type, data fields, data content, and time characteristics. Then, the structure of the simulation message is determined, including field order, format, and data type. Based on the characteristics corresponding to the operating condition, data generation rules are formulated. Finally, the key features are converted into equipment simulation data according to the data generation rules. The data generation rules can include fixed value generation, random value generation, dynamic value generation, and time series simulation. Fixed value generation is suitable for unchanging fields; random value generation can generate data that conforms to a certain distribution pattern (such as normal distribution or uniform distribution); dynamic value generation is based on dynamic changes according to time or external conditions (such as sine waves or increasing sequences); time series simulation simulates the time characteristics of the message, including transmission frequency, triggering events, and delays.

[0091] In step S103, based on the operating cycle corresponding to each working condition, the simulation data of each device is run, and the working condition response information monitored by the monitoring device is obtained.

[0092] In this embodiment of the application, the monitoring device is used to monitor the operating status of the terminal device.

[0093] In some embodiments, the device simulation data corresponding to each working condition can be controlled to run for the corresponding operating cycle based on a set working condition sequence. That is, timing starts from the start of the device simulation data running until the running time reaches the corresponding operating cycle, then the running of the device simulation data stops, and the running of the device simulation data corresponding to the next working condition starts according to the working condition sequence until the operating cycle corresponding to the next working condition is reached.

[0094] For example, assuming the operating condition sequence is Operating Condition 1, Operating Condition 2, and Operating Condition 3, and the running cycle corresponding to Operating Condition 1 is 2 minutes, the running cycle corresponding to Operating Condition 2 is 3 minutes, and the running cycle corresponding to Operating Condition 3 is 2 minutes, the equipment simulation data corresponding to Operating Condition 1 is simulation data D1, the equipment simulation data corresponding to Operating Condition 2 is simulation data D2, and the equipment simulation data corresponding to Operating Condition 3 is simulation data D3, then the duration of running simulation data D1 is 2 minutes, then simulation data D2 starts running for 3 minutes, then simulation data D3 starts running for 2 minutes, and finally the cycle of running simulation data D1 is repeated for 2 minutes until the simulation end condition is reached. The simulation end condition can be receiving a simulation stop command, or it can be that the simulation duration reaches a duration threshold. For example, the simulation stop command can be in voice or text form, indicating "Stop Simulation"; the duration threshold can be 30 minutes, 1 hour, etc., meaning that if the simulation duration reaches 30 minutes or 1 hour, the simulation end condition is considered to have been met.

[0095] In some embodiments, operating condition response information refers to the output information of the monitoring device when it detects that the terminal device is in a certain operating condition, such as the display information of the monitoring device's screen, the flashing information of the monitoring device's indicator light, or the playback information of the monitoring device's voice module.

[0096] In step S104, the test results of the monitoring equipment are determined based on the operating condition response information and reference information.

[0097] In some embodiments, each operating condition corresponds to reference information, that is, for each operating condition, the monitoring device has preset output information, that is, reference information.

[0098] In some embodiments, when the operating condition response information is the same as the reference information, the test result of the monitoring device is determined to be normal; when the operating condition response information is different from the reference information, the test result of the monitoring device is determined to be abnormal.

[0099] In some embodiments, when the test result is abnormal, an alarm message can be generated based on the test result and then output to achieve the purpose of prompting.

[0100] Through steps S101 to S104, by acquiring the operating cycle and reference message combination corresponding to each operating condition, the actual state of the terminal device under different operating conditions can be simulated, achieving the purpose of reproducing the scene. This eliminates the need for test configuration based on different device protocols, shortening test time and reducing test costs. Furthermore, device simulation data is generated based on the reference message combination corresponding to each operating condition, ensuring that the test results reflect the actual operating environment, thus improving the authenticity and credibility of the test. This eliminates the need for actual testing of the terminal device, reducing test risks. Next, the device simulation data is run based on the operating cycle to achieve the purpose of switching between different operating conditions, enabling rapid and convenient switching between them. In addition, testing under different operating conditions can comprehensively verify the functions and performance of the monitoring equipment. Furthermore, the real-time performance, accuracy, and consistency of the monitoring equipment are verified through the monitoring equipment's response information to the terminal device's operating conditions. Finally, the reference information is used as a benchmark and compared with the monitoring equipment's operating condition response information to ensure the objectivity of the test results, thereby improving test efficiency.

[0101] In some embodiments, after step S104 above, the following may also be performed: in response to a received message modification instruction, determining a message to be modified from a plurality of reference message combinations; obtaining modification information and determining a first target operating condition corresponding to the message to be modified; modifying the message to be modified based on the modification information to obtain a modified message; updating the reference message combination corresponding to the first target operating condition based on the modified message to obtain an updated reference message combination corresponding to the first target operating condition.

[0102] In some embodiments, a message modification instruction is used to modify a message existing in multiple reference message combinations. This message modification instruction can be triggered by voice, touch, or other operations. For example, the message editing interface can be entered first, which displays multiple reference message combinations. Then, in response to a message selection instruction, the selected message is determined as the message to be modified, and the first target operating condition corresponding to the message to be modified is also determined, and a modification editing interface is presented. Then, modification information is obtained in the modification editing interface, and the message to be modified is modified using the modification information to obtain the modified message. For example, if the message to be modified is "voltage value is 3 volts" and the modification information is "modify the voltage value to 5 volts", then the modified message is "voltage value is 5 volts". Finally, the modified message replaces the message to be modified in the reference message combination corresponding to the first target operating condition, thereby obtaining the updated reference message combination corresponding to the first target operating condition.

[0103] In some embodiments, after updating the aforementioned reference message combination, updated device simulation data is generated based on the updated reference message combination. When running the device simulation data corresponding to the first target operating condition, the updated device simulation data corresponding to the first target operating condition is run. This enables real-time modification of messages, improving the diversity and flexibility of testing.

[0104] In some embodiments, after step S104 above, the following may also be performed: in response to a new instruction for the reference message combination, a second target operating condition is determined from multiple operating conditions, and a message to be added is obtained; the message to be added is added to the reference message combination corresponding to the second target operating condition, to obtain the updated message combination corresponding to the second target operating condition.

[0105] In some embodiments, the add instruction for a reference message combination refers to adding a new message to an existing reference message combination. Similar to the modification instruction described above, the add instruction can be triggered by voice, touch, or other operations. For example, the message editing interface can be entered first, which displays multiple reference message combinations and their corresponding operating conditions. Then, in response to the selection instruction for the operating condition, the selected operating condition is determined as the second target operating condition, and the add editing interface is presented. Then, the message to be added is obtained in the add editing interface. For example, if the message to be added is "voltage value is 5 volts", then the message to be added is added to the reference message combination corresponding to the second target operating condition. Finally, the updated reference message combination corresponding to the second target operating condition is obtained.

[0106] In some embodiments, after updating the aforementioned reference message combination, updated device simulation data is generated based on the updated reference message combination. When running the device simulation data corresponding to the second target operating condition, the updated device simulation data corresponding to the second target operating condition is used. This enables real-time addition of messages, improving the convenience and efficiency of testing.

[0107] In some embodiments, after step S104 above, the following may also be performed: in response to a selection instruction for a working condition, determining the third target working condition selected by the selection instruction from multiple working conditions; in response to a cycle adjustment instruction for the third target working condition, obtaining adjustment information; adjusting the operating cycle of the third target working condition based on the adjustment information to obtain the adjusted operating cycle, and updating the operating cycle of the third target working condition using the adjusted operating cycle.

[0108] In some embodiments, the operation condition selection instruction refers to selecting a third target operation condition from all operation conditions. The cycle adjustment instruction is used to adjust the operating cycle corresponding to the operation condition. Similar to the modification instruction described above, this cycle adjustment instruction can be triggered by voice, touch, or other operations. For example, one can first enter the cycle editing interface for the third target operation condition, which displays the operating cycle corresponding to the third target operation condition. Then, adjustment information is obtained from the cycle editing interface. For instance, if the operating cycle corresponding to the third target operation condition is 2 minutes, and the adjustment information is "adjust the operating cycle to 1 minute," then the adjusted operating cycle corresponding to the third target operation condition is 1 minute. Finally, when running the equipment simulation data corresponding to the third target operation condition, the runtime is 1 minute. This allows for the adjustment of the operating cycle of any operation condition, improving the diversity of testing and enhancing the accuracy of testing.

[0109] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0110] Considering the diversity of protocols, including Modbus, Controller Area Network (CAN), and Frame Start and End Delimiter Protocol (7E), this application provides a testing method with generalized and convenient configuration to improve the versatility and ease of configuration of simulation tools.

[0111] First, connect the display screen to the actual system. Starting from the moment the display screen is powered on, capture communication messages using a debugging tool. These messages include synchronization messages from the terminal device, periodic query messages, active reporting messages, and control messages for various control commands. Here, the display screen and the actual system correspond to the terminal device in other embodiments, and the debugging tool corresponds to the test device in other embodiments, or the debugging tool is installed within the aforementioned test device.

[0112] Secondly, the test platform distinguishes between sent and received messages based on their characteristics (CAN protocol uses CANID for distinction, Modbus and 7E protocols use protocol specifications for distinction), and further differentiates various message types based on their characteristics. These message characteristics include: setting messages are characterized by one-time transmission and one-time response with fixed response rules; proactive reporting messages are characterized by periodic reporting without a response (CAN protocol); synchronization messages are characterized by normal power-on synchronization once, with one type of transmission corresponding to one type of response; and periodic query messages are characterized by one type of transmission corresponding to multiple types of responses. The test platform corresponds to the test equipment in other embodiments.

[0113] In this embodiment, for periodic query messages involving multiple responses, the periodic query messages are optimized. The optimization process includes: organizing all periodic query messages and their corresponding response messages; comparing each message packet according to the device protocol of this version of the display screen; and distinguishing the specific meaning of each group of messages. Figure 4 This is a schematic diagram of a message processing flow provided in an embodiment of this application. See also: Figure 4 The message processing flow includes determining whether to send or receive messages, organizing message groups, and marking messages. Then, each group of marked messages is imported into the message pool for synchronized configuration.

[0114] In some embodiments, the testing method of this application can realize the simulation of synchronous linkage of measurement points, according to Figure 4 The marked messages are arranged to correspond to the sent and received messages, generating a sequence like this: Figure 5 The various operating conditions shown are illustrated. This application embodiment can also set a period to switch between various operating conditions, thereby achieving synchronous linkage of measuring points. See also... Figure 5 The response messages for operating condition 1 are recv1-1, recv2-1, and recv3-1, and the response messages for operating condition 2 are recv1-2, recv2-2, and recv3-1.

[0115] The testing method provided in this application can solve the problems of time-consuming configuration and simulation in current simulation tools, the inability to simulate operating scenarios that closely resemble actual devices (terminal devices), and the inability of actual devices to automatically switch states. Based on this, the testing method provided in this application can achieve the following functions:

[0116] Function 1: Directly import packet capture data to generate device simulation;

[0117] Function 2 allows users to add new messages that are not available on the device.

[0118] Function 3 allows you to mark the function of each message and combine them into a certain operating condition;

[0119] Function 4 allows configuration of the switching cycle for each operating condition;

[0120] Function 5 can determine the actively reported message based on packet capture data and report it according to the packet capture cycle (CAN protocol);

[0121] Function 6 can match the message sent by the host with the current operating condition to reply to the message;

[0122] Function 7 allows for manual switching of operating conditions;

[0123] Function 8, adaptable to various mainstream protocols, such as CAN protocol, Modbus protocol, 7E protocol, etc.

[0124] Through functions 1 to 8, equipment simulations can be generated quickly, and the simulation data is more closely related to the actual equipment. This eliminates the need to rebuild job positions and consume resources, and allows for free switching between various working conditions, thus solving the problem of overheating and failure of actual machine components caused by frequent switching.

[0125] The testing method provided in this application can be applied to at least one of the following scenarios:

[0126] Scenario 1: On-site packet capture is sent back to generate a simulation to reproduce market problems;

[0127] Scenario 2: Development of non-standard orders, adding new message testing functionality;

[0128] Scenario 3: Aging monitoring equipment; switching operating conditions to verify the stability of the monitoring equipment.

[0129] Scenario 4: Simulation verification when there is a shortage of terminal equipment personnel.

[0130] It is understood that the embodiments of this application involve data related to operating cycles, reference message combinations, communication messages, modification information, messages to be added, and adjustment information. The collection, use, and processing of such data must comply with relevant laws, regulations, and standards.

[0131] The following description continues to illustrate the exemplary structure of the test apparatus 455 provided in the embodiments of this application as a software module. In some embodiments, such as... Figure 2 As shown, the software modules stored in the test device 455 in the memory 450 may include:

[0132] The first acquisition module 4551 is used to acquire the corresponding operating cycle and reference message combination under each operating condition, wherein the reference message combination includes the reference message received by the terminal device under the corresponding operating condition; the generation device 4552 is used to generate device simulation data based on the reference message combination corresponding to each operating condition; the running module 4553 is used to run each device simulation data based on the operating cycle corresponding to each operating condition, and acquire the operating condition response information monitored by the monitoring device, wherein the monitoring device is used to monitor the operating condition of the terminal device; the first determination module 4554 is used to determine the test result of the monitoring device based on the operating condition response information and the reference information.

[0133] In some embodiments, the software module stored in the test apparatus 455 of the memory 450 further includes:

[0134] The second acquisition module is used to acquire the communication packets of the terminal device under each of the operating conditions; the parsing module is used to parse each of the communication packets under each operating condition to obtain multiple parsed packets; and determine the send / receive identifier of each parsed packet; the second determination module is used to determine the reference packet combination corresponding to the operating condition from the communication packets corresponding to the operating condition based on the send / receive identifier.

[0135] In some embodiments, the second determining module is further configured to: determine a sending message and a receiving message corresponding to each sending message from the communication messages corresponding to the operating condition based on the sending and receiving identifier; determine the number of receiving messages corresponding to each sending message; and when the number of messages is greater than a preset value, determine that the receiving message corresponding to the sending message is a reference message combination corresponding to the operating condition.

[0136] In some embodiments, the software module stored in the test apparatus 455 of the memory 450 further includes:

[0137] A first response module is used to respond to a received message modification instruction and determine the message to be modified from a plurality of reference message combinations; a third determination module is used to obtain modification information and determine a first target operating condition corresponding to the message to be modified; a modification module is used to modify the message to be modified based on the modification information to obtain a modified message; and a first update module is used to update the reference message combination corresponding to the first target operating condition based on the modified message to obtain an updated reference message combination corresponding to the first target operating condition.

[0138] In some embodiments, the software module stored in the test apparatus 455 of the memory 450 further includes:

[0139] The second response module is used to respond to the new instruction for the reference message combination, determine the second target operating condition from the multiple operating conditions, and obtain the message to be added; the second update module is used to add the message to be added to the reference message combination corresponding to the second target operating condition, so as to obtain the updated message combination corresponding to the second target operating condition.

[0140] In some embodiments, the software module stored in the test apparatus 455 of the memory 450 further includes:

[0141] The third response module is used to respond to the selection command for the working condition and determine the third target working condition selected by the selection command from a plurality of working conditions; the fourth response module is used to respond to the cycle adjustment command for the third target working condition and obtain adjustment information; the third update module is used to adjust the running cycle of the third target working condition based on the adjustment information to obtain the adjusted running cycle, and update the running cycle of the third target working condition using the adjusted running cycle.

[0142] This application provides a computer program product or computer program that includes computer-executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the computer device to perform the test method described in this application.

[0143] This application provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they cause the processor to execute the test method provided in this application. For example, ... Figure 3 The test method is shown.

[0144] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0145] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0146] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0147] As an example, computer-executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0148] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A testing method, characterized in that, The method includes: Obtain the corresponding operating cycle and reference message combination for each operating condition, wherein the reference message combination includes the reference message received by the terminal device under the corresponding operating condition; For each of the aforementioned operating conditions, equipment simulation data is generated based on the combination of reference messages corresponding to that operating condition; Based on the operating cycle corresponding to each operating condition, the simulation data of each device is run, and the operating condition response information monitored by the monitoring device is obtained. The monitoring device is used to monitor the operating condition of the terminal device. Based on the operating condition response information and reference information, the test results of the monitoring equipment are determined.

2. The method according to claim 1, characterized in that, The method further includes: Acquire the communication messages of the terminal device under each of the aforementioned operating conditions; For each of the aforementioned operating conditions, each of the aforementioned communication messages under the aforementioned operating condition is parsed to obtain multiple parsed messages; the send / receive identifiers of each of the aforementioned parsed messages are determined; Based on the transmit / receive identifier, the reference message combination corresponding to the operating condition is determined from the communication messages corresponding to the operating condition.

3. The method according to claim 2, characterized in that, The step of determining the reference message combination corresponding to the operating condition from the communication messages corresponding to the operating condition based on the transmit / receive identifier includes: Based on the transmit / receive identifier, determine the transmit message and the receive message corresponding to each transmit message from the communication messages corresponding to the operating condition; Determine the number of received messages corresponding to each of the sent messages; When the number of messages exceeds a preset value, the received message corresponding to the sent message is determined to be the reference message combination corresponding to the operating condition.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to a received message modification instruction, the message to be modified is determined from a plurality of the reference message combinations; Obtain the modification information and determine the first target operating condition corresponding to the message to be modified; Based on the modification information, the message to be modified is modified to obtain the modified message; Based on the modified message, update the reference message combination corresponding to the first target operating condition to obtain the updated reference message combination corresponding to the first target operating condition.

5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to a new instruction for a reference message combination, a second target operating condition is determined from the multiple operating conditions, and the message to be added is obtained; The new message to be added is added to the reference message combination corresponding to the second target operating condition to obtain the updated message combination corresponding to the second target operating condition.

6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to a selection command for a working condition, a third target working condition selected by the selection command is determined from a plurality of said working conditions; In response to the periodic adjustment command for the third target operating condition, adjustment information is obtained; The operating cycle of the third target operating condition is adjusted based on the adjustment information to obtain the adjusted operating cycle, and the operating cycle of the third target operating condition is updated using the adjusted operating cycle.

7. A testing apparatus, characterized in that, The device includes: The first acquisition module is used to acquire the corresponding operating cycle and reference message combination under each operating condition. The reference message combination includes the reference message received by the terminal device under the corresponding operating condition. A generating device is used to generate device simulation data for each of the aforementioned operating conditions based on a combination of reference messages corresponding to the operating condition. The operation module is used to run the simulation data of each device based on the operation cycle corresponding to each operating condition, and to obtain the operating condition response information monitored by the monitoring device, wherein the monitoring device is used to monitor the operating condition of the terminal device. The first determining module is used to determine the test results of the monitoring equipment based on the operating condition response information and reference information.

8. A testing device, characterized in that, The testing equipment includes: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the test method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they implement the test method according to any one of claims 1 to 6.

10. A dynamic testing system, comprising terminal equipment, testing equipment, and monitoring equipment, characterized in that, The terminal device is used to send communication messages under each working condition to the test device, and the test device is used to test the monitoring device using the test method according to any one of claims 1 to 6.