An Embedded Software Verification Method Based on Simulation Technology

By establishing a digital twin model through simulation technology, the problems of high resource consumption, long cycle, high cost and simulation difficulty in embedded industrial software verification are solved, realizing efficient and reliable virtual environment testing and improving verification efficiency and reliability.

CN120950413BActive Publication Date: 2026-06-30CHINA ELECTRONICS STANDARDIZATION INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA ELECTRONICS STANDARDIZATION INST
Filing Date
2025-10-11
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing embedded industrial software verification relies on physical devices, resulting in high resource consumption, long cycles, high costs, difficulty in simulating extreme working conditions, and a lack of real-time interaction and verification capabilities with the physical environment.

Method used

By establishing a digital twin model through simulation technology, constructing a digital model of embedded software, integrating simulation tools, generating test case sets, and using a multi-core simulation engine for concurrent execution, combined with the HIL hybrid verification mode, testing and interactive links in a virtual environment are realized.

Benefits of technology

It improves the efficiency of embedded software verification, reduces costs, supports rapid construction of test data, enhances the reliability and coverage of verification, and reduces dependence on physical devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120950413B_ABST
    Figure CN120950413B_ABST
Patent Text Reader

Abstract

This invention relates to the field of software testing technology, specifically to an embedded software verification method based on simulation technology. The method includes model building, knowledge base construction, determining the existence of test case sets, concurrent execution of a multi-core simulation engine and data acquisition, simulation running, interactive linking, and hybrid verification. This invention improves the efficiency of embedded industrial software verification and reduces verification costs. In particular, it allows for testing the working state of embedded software by repeatedly inputting and adjusting data. This invention supports rapid construction of test data, enabling the creation of complex scenario test cases through fuzzy analysis, thereby improving test case generation efficiency. This invention also supports hybrid verification, achieving a WYSIWYG (What You See Is What You Get) result, thus enhancing verification reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, specifically to an embedded software verification method based on simulation technology. Background Technology

[0002] Embedded industrial software is specialized software embedded within industrial equipment (such as machine tools, robots, sensors, and smart meters). Its core function is to control equipment operation, collect and process data, and realize intelligent functions. It is the "brain" of industrial equipment to achieve automation, informatization, and intelligence.

[0003] Current technologies for testing embedded industrial software typically rely on physical devices, which leads to problems such as high hardware resource consumption, long testing cycles, and high costs. Furthermore, physical testing makes it difficult to simulate extreme operating conditions (such as high loads and abnormal interference), making it difficult to expose potential software defects. In order to simulate operating conditions, existing simulation solutions often focus on a single module (such as a microprocessor or peripheral), lacking the ability to interact with and verify the physical environment in real time.

[0004] Based on the above reasons, this invention designs an embedded software verification method based on simulation technology. By establishing a digital twin model through simulation technology, testing is carried out in a virtual environment, thereby realizing rapid data construction and repeated trial and error of data organization units. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide an embedded software verification method based on simulation technology. By establishing a digital twin model through simulation technology and conducting tests in a virtual environment, the rapid construction of data and repeated trial and error of data organization units are realized.

[0006] To achieve the above objectives, the present invention provides an embedded software verification method based on simulation technology, comprising the following steps:

[0007] S1, Model Building: Establishing a digital model of the embedded software;

[0008] S2, Configuration Tools: Integrated simulation tools for building the test environment;

[0009] S3, Building a Knowledge Base: Constructing a set of use cases based on fuzzy analysis and an industrial scenario knowledge base;

[0010] S4: Determine if a use case set exists. If a use case set exists, proceed to S5; otherwise, exit.

[0011] S5, a multi-core simulation engine that executes and collects data concurrently;

[0012] S6, simulation operation, interactive linking, hybrid verification.

[0013] The digital model in S1 is a customized simulation digital model, including a processor model, peripheral model, and interaction interface.

[0014] S2 specifically involves: integrating existing simulation tools to assist in building the required testing environment, customizing a visual editor, mapping the signal lines of the virtual interface to the memory mapping area of ​​the industrial software under test, and defining protocol fields and building data structures.

[0015] S3 specifically involves: based on fuzzy analysis and an industrial scenario knowledge base, identifying, collecting, and classifying industrial scenario data knowledge, performing knowledge structure modeling and data association, and automatically generating use cases according to predetermined rules based on fuzzy mapping and comprehensive evaluation, building a complete use case set, and importing the use case set data into the simulation environment.

[0016] Specifically, S5 is a multi-core simulation engine that uses NUMA technology, performs concurrent scheduling based on dynamic task allocation and load balancing migration scheduling to optimize resource utilization; uses context switching caching and partition lock mechanisms to improve efficiency; introduces a fault-tolerant mechanism for redundant scheduling to prevent erroneous tasks from failing; and collects runtime information and feedback information to the tuning mechanism through an instruction simulation concurrent execution evaluation mechanism for performance iteration and optimization.

[0017] S6 specifically refers to:

[0018] S6-1, based on the HIL hybrid verification mode, uses a communication protocol and ADC analog signals, and employs timestamp alignment technology to solve the delay differences between heterogeneous systems;

[0019] S6-2 runs the key modules in the simulation environment, and the dynamic test triggers the boundary condition check of the formal model;

[0020] S6-3 connects to actual sensors via an interactive interface, monitors the hardware output and compares it with the expected model, performs virtual-real connection conversion to achieve hybrid verification and records model parameters and index results.

[0021] After the test cases are generated using traditional methods, they are imported into the test case set.

[0022] The simulation engine creates multiple independent simulation environments to execute test cases simultaneously, without the need for a multi-core simulation engine to execute concurrently.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] This invention improves the efficiency of embedded industrial software verification and reduces verification costs. In particular, it can test the working status of embedded software by repeatedly inputting and adjusting the input data. This invention supports the rapid construction of test data and can create complex scenario test cases through fuzzy analysis requirements, thereby improving the efficiency of test case generation. This invention also supports hybrid verification to achieve WYSIWYG, thereby enhancing the reliability of verification. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the general verification process of the present invention.

[0026] Figure 2 This is a schematic diagram of the PLC data verification process of the present invention. Detailed Implementation

[0027] The present invention will now be further described with reference to the accompanying drawings.

[0028] See Figures 1-2 This invention provides an embedded software verification method based on simulation technology:

[0029] Example 1: The verification process for its general scenarios includes the following steps:

[0030] Step 1. Establish a digital model of the embedded system, including customized simulation models of the microprocessor, peripherals, and interaction interfaces;

[0031] Step 2. Integrate existing simulation tools to assist in building the test environment, customize the visual editor, and map the signal lines of the virtual interface to the memory mapping area of ​​the software under test;

[0032] Step 3. Identify, collect, and classify industrial scenario data knowledge. Automatically generate use cases through fuzzy mapping and comprehensive evaluation, construct a complete use case set, and import the use case set data into the simulation environment. Alternatively, the use cases can be generated in the traditional way and then imported into the use case set before entering the simulation environment.

[0033] Step 4. Employ a multi-core simulation engine, using dynamic task allocation and load balancing for concurrent scheduling, to simulate instructions. After execution, view monitoring information and collect data. Alternatively, instead of using a multi-core simulation engine, multiple independent simulation engines can be used to create multiple independent simulation environments to execute multiple test cases.

[0034] Step 5. The key modules run in the simulation environment and connect to the actual sensors through the interactive interface to achieve hybrid verification by converting between virtual and real connections.

[0035] Example 2: The verification process for embedded industrial software PLC data includes the following steps:

[0036] Step 1. Build the PLC simulation environment, including hardware driver model, software model and industrial scene model.

[0037] Step 2. Configure and run the PLC control program in the HIL simulation environment using simulation tools to simulate the PLC's operating state in the actual hardware environment, configure the CAN protocol, and configure parameter data.

[0038] Step 3. Simulate the application scenario of signal switching. Based on the use case generation rules, create a DOU data organization unit, identify and collect the running data in the simulation environment. The data includes PLC input and output signals (light on, light off), control logic (bus disconnection), industrial scenario parameters (signal series, parallel), etc. After automatic compilation by the script, the data operation list of the simulation tool is automatically loaded.

[0039] Step 4. Execute the simulation of the embedded industrial software running in the simulation environment through the multi-core simulation engine, and automatically collect running data, including control logic status data, signal input and output data, etc.

[0040] Step 5. Connect the actual sensor via the interactive interface to perform virtual-to-physical connection conversion. During simulation, simultaneously monitor and record the status of the hardware devices. After the simulation ends, analyze the running data to verify that the PLC control program's functions are available, the concurrent performance meets expected values, and the reliability of concurrent operation meets expected requirements, without any anomalies or response delays.

[0041] The above are merely preferred embodiments of the present invention, intended only to aid in understanding the method and core ideas of this application. The scope of protection of the present invention is not limited to the above embodiments; all technical solutions falling within the scope of the present invention's concept are within its protection. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

[0042] This invention comprehensively addresses the shortcomings of existing technologies in embedded industrial software verification, such as low efficiency, insufficient scenario coverage, and difficulty in combining virtual and physical methods. By establishing a digital twin model through simulation technology and conducting testing in a virtual environment, it improves verification efficiency, shortens the verification cycle, and reduces reliance on physical devices by simulating real-time physical interaction, thereby reducing the risk of hardware damage.

Claims

1. An embedded software verification method based on simulation technology, characterized in that, Includes the following steps: S1, Establish the digital model of the embedded software; S2 integrates simulation tools to build a test environment; S3 builds a set of use cases based on fuzzy analysis and an industrial scenario knowledge base; S4: Determine if a use case set exists. If a use case set exists, proceed to S5; otherwise, exit. S5, a multi-core simulation engine that executes and collects data concurrently; S6, simulation execution, interactive linking, hybrid verification; The digital model in S1 is a customized simulation digital model, including a processor model, peripheral model, and interaction interface; Specifically, S2 involves: integrating existing simulation tools to assist in building the testing environment, customizing a visual editor, mapping the signal lines of the virtual interface to the memory mapping area of ​​the industrial software under test, and defining protocol fields and building data structures. Specifically, S3 involves: identifying, collecting, and classifying industrial scenario data knowledge based on fuzzy analysis and an industrial scenario knowledge base; performing knowledge structure modeling and data association; automatically generating use cases according to predetermined rules based on fuzzy mapping and comprehensive evaluation using structural design and use case templates; constructing a use case set with complete coverage; and importing the use case set data into the simulation environment. Specifically, S5 is: a multi-core simulation engine using NUMA technology, which performs concurrent scheduling based on dynamic task allocation and load balancing migration scheduling to optimize resource utilization; it uses context switching caching and partition lock mechanisms to improve efficiency; it introduces a fault-tolerant mechanism for redundant scheduling to prevent task errors and failures; and it collects runtime information and feedback information to the tuning mechanism through an instruction simulation concurrent execution evaluation mechanism for performance iteration and optimization. Specifically, S6 is: S6-1, based on the HIL hybrid verification mode, uses a communication protocol and ADC analog signals, and employs timestamp alignment technology to solve the delay differences between heterogeneous systems; S6-2 runs the key modules in the simulation environment, and the dynamic test triggers the boundary condition check of the formal model; S6-3 connects to actual sensors via an interactive interface, monitors hardware output and compares it with the output of the expected model, performs virtual-real connection conversion to achieve hybrid verification and record model parameters and index results.

2. The embedded software verification method based on simulation technology according to claim 1, characterized in that, The use cases are generated using traditional methods and then imported into the use case set.

3. The embedded software verification method based on simulation technology according to claim 2, characterized in that, The simulation engine creates multiple independent simulation environments for executing test cases simultaneously.