Simulation method and device

By monitoring the simulation controller and using the subsystem simulation module to execute offline subsystem tasks, the problem of project integration interruption was solved, the efficiency and automation of integration tasks were improved, and integration process adaptation without manual modification was achieved.

CN121349593APending Publication Date: 2026-01-16BEIJING INST OF SPACE LAUNCH TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511539925.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Existing technologies cause task interruptions during project integration testing due to the offline status of some business subsystems, and require frequent manual modification of simulation configurations, which reduces the efficiency and convenience of integration testing tasks.

Method used

The simulation controller is connected to the control host and subsystems in the overall business system. It receives the joint debugging tasks via CAN bus, monitors the status of the subsystems, and uses the subsystem simulation control module to perform simulation tasks on the offline subsystems, generate simulation results and feed them back to the control host to ensure the continuous progress of the joint debugging tasks.

Benefits of technology

This enabled the continuous advancement of project integration and testing tasks, reduced manual workload, improved execution efficiency and automation level, ensured rapid adaptation of offline subsystems, and allowed the overall integration and testing process to proceed without waiting for online integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121349593A_ABST
    Figure CN121349593A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of simulation, and discloses a simulation method and device. According to the simulation method, simulation setting does not need to be manually modified, the problem that the project joint debugging task is interrupted due to the fact that part of service subsystems are offline is effectively solved, continuous advancing of the project joint debugging task is guaranteed, meanwhile, the manual operation workload in the joint debugging process is reduced, and the work efficiency is improved. The execution efficiency, the automation level and the flexibility of the joint debugging task of the business total system project are remarkably improved, it is ensured that the joint debugging link corresponding to the offline business subsystem can be rapidly adapted, and the overall joint debugging process can be promoted without waiting for the business subsystem to be online.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of simulation technology, in particular to a simulation method and device. BACKGROUND

[0002] In project development engineering, the various subsystems of the total system need to be matched in joint debugging, but the development completion times of the various subsystems are different, and in the case that some subsystems do not have joint debugging conditions, the subsystems that have the conditions need to be matched first, and at this time, the subsystems that do not have the joint debugging conditions need to be simulated so that the automatic process test of the total system can be normally performed.

[0003] In the existing project design, the simulation system designed is to simulate the fixed functions in the subsystems, and after a certain subsystem has the joint debugging condition, the simulation system needs to be modified to remove the simulation of the subsystems that have been added to the total system, otherwise the subsystems cannot be timely added to the joint debugging matching of the total system. Moreover, in the process of carrying out the project joint debugging task of the business total system, due to the differences in the development completion times of the multiple business subsystems, the working states of the partial business subsystems will present an offline state (i.e. not having the joint debugging condition), and the existing technology lacks an efficient simulation scheme that can adapt to this scenario. In this way, the existing technology cannot quickly simulate the business tasks of the offline business subsystems, resulting in that the joint debugging link corresponding to the offline business subsystems can be promoted only by manually modifying the simulation related configurations, not only frequently interrupting the continuous execution of the project joint debugging task, but also increasing the workload of the business total system joint debugging due to the additional manual operation, significantly reducing the execution efficiency and convenience of the project joint debugging task. SUMMARY

[0004] The present application provides a simulation method and device, which not only effectively solves the problem of interruption of the project joint debugging task due to the offline of the partial business subsystems, but also guarantees the continuous promotion of the project joint debugging task, reduces the workload of manual operation in the joint debugging process, significantly improves the execution efficiency, automation level and flexibility of the project joint debugging task of the business total system, ensures that the joint debugging link corresponding to the offline business subsystems can be quickly adapted, and the overall joint debugging process can be promoted without waiting for the business subsystems to be online.

[0005] In a first aspect, the present application provides a simulation method, which is applied to a simulation controller in a business total system, the simulation controller is connected with a control host and multiple business subsystems in the business total system respectively; the method comprises:

[0006] receiving a project joint debugging task sent by the control host;

[0007] determining all business subsystems in the project joint debugging task and the working states of the business subsystems;

[0008] If there is a business subsystem whose working state is offline, it is judged whether the simulation controller corresponding to the simulation set includes a subsystem simulation control module corresponding to the business subsystem whose working state is offline.

[0009] If the simulation controller corresponding to the simulation set includes a subsystem simulation control module corresponding to the business subsystem whose working state is offline, for each business subsystem whose working state is offline, the business task corresponding to the business subsystem in the project joint debugging task is executed by using the subsystem simulation control module corresponding to the business subsystem, and the simulation task result corresponding to the business task is obtained; the simulation task result corresponding to the business task is fed back to the control host, so that the control host executes the project joint debugging task by using the simulation task result corresponding to the business task.

[0010] In the simulation set corresponding to the simulation controller, each subsystem simulation control module corresponds to one business subsystem, and the business subsystem corresponding to each subsystem simulation control module is different.

[0011] In a second aspect, the application provides a simulation device, which is applied to a simulation controller in a business total system, and the simulation controller is connected with a control host and a plurality of business subsystems in the business total system respectively; the device comprises:

[0012] A first unit is configured to receive a project joint debugging task sent by the control host.

[0013] A second unit is configured to determine all business subsystems in the project joint debugging task and the working state of each business subsystem.

[0014] A third unit is configured to, if there is a business subsystem whose working state is offline, judge whether the simulation controller corresponding to the simulation set includes a subsystem simulation control module corresponding to the business subsystem whose working state is offline.

[0015] A fourth unit is configured to, if the simulation controller corresponding to the simulation set includes a subsystem simulation control module corresponding to the business subsystem whose working state is offline, for each business subsystem whose working state is offline, execute the business task corresponding to the business subsystem in the project joint debugging task by using the subsystem simulation control module corresponding to the business subsystem, and obtain the simulation task result corresponding to the business task; the simulation task result corresponding to the business task is fed back to the control host, so that the control host executes the project joint debugging task by using the simulation task result corresponding to the business task.

[0016] The simulation controller corresponds to a simulation set, each subsystem simulation control module in the simulation set corresponds to one business subsystem, and each subsystem simulation control module corresponds to a different business subsystem.

[0017] Compared with the prior art, the application has the following beneficial effects:

[0018] The simulation method designs the simulation set to include the subsystem simulation control modules corresponding to the business subsystems one by one (each module corresponds to a unique business subsystem), so that after receiving the project joint debugging task, the simulation controller applied to the business system can first determine the working states of all the business subsystems, and then for the business subsystems in the offline state, the simulation set is judged whether it includes the corresponding subsystem simulation control module, the module is quickly called to execute the business task corresponding to the offline business subsystem and generate the simulation task result, and then the result is fed back to the control host to support it to continuously execute the project joint debugging task. The whole process does not need to manually modify the simulation settings, which not only effectively solves the problem of interruption of the project joint debugging task caused by the offline of part of the business subsystems, but also guarantees the continuous progress of the project joint debugging task, reduces the manual operation workload in the joint debugging process, significantly improves the execution efficiency, automation level and flexibility of the project joint debugging task of the business system, and ensures that the joint debugging link corresponding to the offline business subsystem can be quickly adapted without waiting for the business subsystem to be online.

[0019] The further effects of the above-mentioned non-conventional preferred mode will be described in the following combined with the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the application or the prior art, the drawings needed in the embodiment or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the application, and those skilled in the art can obtain other drawings according to these drawings without creating labor.

[0021] Figure 1 A flowchart of a simulation method provided by the application;

[0022] Figure 2 A module diagram of a simulation controller provided by the application;

[0023] Figure 3 A structure diagram of a simulation device provided by the application;

[0024] Figure 4 A structure diagram of an electronic device provided by the application. DETAILED DESCRIPTION

[0025] For the purpose, technical solutions and advantages of the present application to be clearer, the technical solutions of the present application will be described clearly and completely below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0026] The various non-limiting embodiments of the present application will be described in detail below in conjunction with the drawings.

[0027] Referring to Figure 1 , a simulation method in an embodiment of the present application is shown, which is applied to a simulation controller in a business total system, and the simulation controller is connected with a control host and a plurality of business subsystems in the business total system respectively. In the embodiment, the simulation controller can be connected with the control host and the plurality of business subsystems in the business total system respectively through a CAN bus; the plurality of business subsystems run in a parallel execution mode between corresponding subsystem simulation control modules respectively, and start or stop or parameter adjustment of any subsystem simulation control module does not affect the running of other subsystem simulation control modules.

[0028] It should be noted that the business total system refers to a total control system that needs to achieve overall functions through cooperative work of a plurality of business subsystems and needs to carry out a "project joint debugging task" to verify the adaptability of each subsystem, and the core components thereof include a control host, a plurality of business subsystems and a simulation controller. The simulation controller refers to a hardware or a combination of hardware and software control unit running the simulation method and used for simulating the "offline state" business subsystem, and data connection (realizing data transmission and reception) is established with the control host and the plurality of business subsystems in the business total system through a CAN bus. The business subsystem refers to an independent unit (such as a signal acquisition subsystem, an execution control subsystem, etc.) in the business total system that undertakes a specific function and needs to participate in the project joint debugging task to verify the adaptability with the total system and other subsystems.

[0029] In the embodiment, the method may, for example, include the following steps:

[0030] S101: receiving a project joint debugging task sent by a control host.

[0031] In the embodiment, the project joint debugging task can be understood as a test task initiated by the business total system for verifying the cooperative work capability of the plurality of business subsystems, containing a list of all business subsystems that need to participate in joint debugging and "business tasks" (i.e. specific functions that need to be executed by the subsystem in joint debugging) to be completed by each subsystem.

[0032] As an example, the simulation controller can receive a "project integration task" sent by the control host via the CAN bus. This task may contain the following information:

[0033] 1. A list of all business subsystems that need to participate in this joint debugging (e.g., business subsystems A, B, C, and D are involved in this joint debugging);

[0034] 2. The "business tasks" that each business subsystem needs to complete (e.g., the business task of business subsystem A is "to receive control commands and provide feedback on the execution status", and the business task of business subsystem B is "to periodically send collected data").

[0035] In other words, when the overall business system needs to verify the collaborative working capabilities of various business subsystems, the control host initiates a "project integration task" to the simulation controller. The simulation controller then executes the simulation method according to the following steps, without any manual intervention throughout the process:

[0036] Receive project integration and testing tasks sent by the control host;

[0037] The simulation controller receives the "project integration task" sent by the control host via the CAN bus. This task explicitly includes the following information:

[0038] List of all business subsystems that need to participate in this joint debugging (e.g., business subsystems A, B, C, and D are involved in this joint debugging);

[0039] Each business subsystem needs to complete a "business task" (e.g., the business task of business subsystem A is "to receive control commands and provide feedback on the execution status", and the business task of business subsystem B is "to periodically send collected data").

[0040] S102: Determine the working status of all business subsystems in the project's joint debugging task.

[0041] After identifying all business subsystems in the project's joint debugging task, the operational status of each business subsystem can be determined. In this embodiment, the operational status of each business subsystem can be obtained in advance.

[0042] Specifically, in this embodiment, before the step of determining all business subsystems and the working status of each business subsystem in the project integration task, the method further includes:

[0043] Receive heartbeat data or status data from each business subsystem in the overall business system;

[0044] For each business subsystem, the working status of the business subsystem is determined based on the heartbeat data or status data of the business subsystem; wherein the working status is online or offline.

[0045] Among them, heartbeat data refers to the signal data that the business subsystem periodically (e.g., once every second) sends to the simulation controller in the overall business system to indicate that it is operating normally. It is one of the bases for the simulation controller to determine whether the subsystem is online. Status data refers to the information data that the business subsystem sends to the simulation controller in the overall business system to report its current working status (e.g., "running", "standby", "fault"). It is also one of the bases for the simulation controller to determine the working status of the subsystem.

[0046] Specifically, the working status of the business subsystem can be determined based on its heartbeat data or status data as follows:

[0047] If no heartbeat data or status data is received from the subsystem within a preset time period, the working status of the business subsystem is determined to be offline.

[0048] If at least one heartbeat or status data from the subsystem is received within a preset time period, the working state of the business subsystem is determined to be working.

[0049] In this embodiment, the preset duration can refer to the time threshold for the simulation controller to determine whether the business subsystem is offline. For example, in this embodiment, the preset duration is uniformly set to 10 seconds (that is, if no data is received from the subsystem for 10 consecutive seconds, it is determined to be offline).

[0050] As an example, after receiving the project integration and debugging task, the simulation controller needs to first determine the "working status" (working status is divided into "online status" and "offline status") of each business subsystem participating in the integration and debugging. The determination is based on the "heartbeat data" or "status data" of the business subsystem. The specific process is as follows:

[0051] The simulation controller continuously receives "heartbeat data" or "status data" sent by each business subsystem via the CAN bus;

[0052] For each business subsystem, determine its data reception status according to a "preset duration (e.g., 10 seconds)":

[0053] If at least one heartbeat or status data is received from the subsystem within a preset time (e.g., 10 seconds), the working status of the business subsystem is determined to be "online" (i.e., the subsystem has met the conditions for joint testing and can directly participate in joint debugging).

[0054] If no heartbeat data or status data is received from the subsystem for a preset duration (e.g., 10 seconds), the working status of the business subsystem is determined to be "offline" (i.e., the subsystem does not meet the conditions for joint testing and needs to be replaced by a simulation module).

[0055] For example, regarding the four subsystems A, B, C, and D involved in this joint commissioning:

[0056] Subsystems A and C sent heartbeat data within 10 seconds, indicating they were "online";

[0057] Subsystems B and D did not send any data for 10 consecutive seconds and were therefore determined to be in an "offline state".

[0058] S103: If a business subsystem is in an offline state, determine whether the simulation set corresponding to the simulation controller includes the subsystem simulation control module corresponding to the business subsystem in an offline state.

[0059] In this embodiment, the simulation set refers to the collection stored in the simulation controller used to manage "subsystem simulation control modules." Each subsystem simulation control module corresponds to only one business subsystem, and different modules correspond to different business subsystems. A subsystem simulation control module is a functional module used to simulate the "business tasks" of a single business subsystem. It only simulates the "execution logic" of the business subsystem (i.e., feedback after receiving control commands and process execution status feedback), and does not simulate the physical execution mechanism actions of the business subsystem. Furthermore, multiple subsystem simulation control modules operate in a "parallel execution mode" (starting, stopping, or adjusting the parameters of any module does not affect other modules). Figure 2 As shown, the simulation set corresponding to the simulation controller can include multiple subsystem simulation control modules, and each subsystem simulation control module corresponds to a different business subsystem.

[0060] It is important to emphasize that before commencing project integration testing, the basic configuration of the simulation controller must be completed. The core of this is to build a "simulation set" and create a "subsystem simulation control module" to ensure that the simulation function can be quickly invoked during subsequent integration testing. The specific steps are as follows:

[0061] First, identify all business subsystems in the overall business system that need to participate in the joint debugging (e.g., assuming the overall business system includes four business subsystems: A, B, C, and D). Then, based on the preset CAN bus communication protocol, determine the "CAN bus communication protocol configuration data conditions" for each business subsystem (including the data length to be sent, the data length to be received, the data transmission period, and the data type of each subsystem). For example, the data length to be sent by business subsystem A is 8 bytes, the data length to be received is 4 bytes, the data transmission period is 2 seconds, and the data type is integer. This configuration must be consistent with the communication requirements of the control host and the business subsystems.

[0062] Create subsystem simulation control modules and build simulation sets. For each business subsystem, create the corresponding "subsystem simulation control module" in the simulation controller (e.g., create "subsystem A simulation control module" for business subsystem A, "subsystem B simulation control module" for B, and so on), and store all created modules in the "simulation set".

[0063] It should be noted that each subsystem simulation control module corresponds to only one business subsystem (e.g., the simulation control module for subsystem A corresponds only to business subsystem A), and different modules are unrelated. All subsystem simulation control modules are set to "parallel execution mode"—for example, when the simulation control module for subsystem A starts or adjusts its parameters, the simulation control modules for subsystems B, C, and D can still operate normally without interfering with each other.

[0064] For new project simulation set adaptation (general handling), if the overall business system needs to conduct joint debugging tasks for a new project (the new project includes a newly added business subsystem, such as business subsystem E), first check if the "Subsystem E Simulation Control Module" exists in the existing simulation set. If it exists, directly call this module to participate in the new project joint debugging; if it does not exist, create a corresponding "Subsystem E Simulation Control Module" for business subsystem E (configure its CAN bus communication protocol parameters), and add this module to the simulation set. There is no need to modify other existing modules in the simulation set—this design can significantly improve the development efficiency of the new project simulation system and meet the flexible adaptation requirements of the overall business system.

[0065] S104: If the simulation set corresponding to the simulation controller includes a subsystem simulation control module corresponding to a business subsystem whose working state is offline, for each business subsystem whose working state is offline, the subsystem simulation control module corresponding to the business subsystem is used to execute the business task corresponding to the business subsystem in the project joint debugging task to obtain the simulation task result corresponding to the business task; the simulation task result corresponding to the business task is fed back to the control host so that the control host can use the simulation task result corresponding to the business task to execute the project joint debugging task;

[0066] In the simulation set corresponding to the simulation controller, each subsystem simulation control module corresponds to a business subsystem, and the business subsystems corresponding to each subsystem simulation control module are different.

[0067] It should be noted that, in one implementation, the method of using the subsystem simulation control module corresponding to the business subsystem to execute the business task corresponding to the business subsystem in the project integration task, and obtaining the simulation task result corresponding to the business task, can be as follows:

[0068] Using the subsystem simulation control module corresponding to the business subsystem, simulation data of the business subsystem is generated according to the preset configuration data conditions of the CAN bus communication protocol, and the simulation data of the business subsystem is used as the simulation task result.

[0069] The configuration data conditions of the preset CAN bus communication protocol include at least one of the following: the length of the data to be sent, the length of the data to be received, the data sending period, and the data type corresponding to the service subsystem.

[0070] It should be noted that the configuration data conditions of the CAN bus communication protocol refer to the parameters used to regulate the data interaction between the business subsystem and the simulation controller. These include the "send data length" (number of bytes sent each time), "receive data length" (number of bytes received each time), "data transmission period" (time interval for sending simulation data), and "data type" (such as integer or character data) corresponding to the business subsystem. These conditions need to be agreed upon and configured in advance before the simulation.

[0071] It should be noted that, in one implementation, another way to obtain the simulation task result corresponding to the business task in the project integration task by using the subsystem simulation control module corresponding to the business subsystem to execute the business task corresponding to the business subsystem is as follows:

[0072] In response to the control command sent by the control host for the business subsystem, the execution logic and execution flow of the business subsystem are simulated using the subsystem simulation control module corresponding to the business subsystem, and the simulation task result corresponding to the control command is generated; wherein, the simulation task result corresponding to the control command includes simulation data, control command feedback, and command execution status.

[0073] Understandably, in response to control commands sent by the control host for the business subsystem, the execution logic and flow of the business subsystem can be simulated using the subsystem simulation control module corresponding to the business subsystem to obtain simulation data. Then, an instruction response is generated based on the control command, and the execution status is determined by the progress of the simulation of the business subsystem's execution logic and flow by the subsystem simulation control module. Finally, the simulation data, control command response, and instruction execution status can be used as the simulation task result corresponding to the control command.

[0074] In one implementation of this embodiment, after the step of determining whether the simulation set corresponding to the simulation controller includes the subsystem simulation control module corresponding to the business subsystem whose working state is offline if there is a business subsystem in an offline state, the method further includes the following steps:

[0075] If there is no subsystem simulation control module for a business subsystem in an offline state in the simulation set corresponding to the simulation controller, then a subsystem simulation control module is created for the business subsystem in the offline state, and the subsystem simulation control module is stored in the simulation set corresponding to the simulation controller. Then, the step of using the subsystem simulation control module to execute the business task corresponding to the business subsystem in the project integration task to obtain the simulation task result corresponding to the business task is continued.

[0076] In other words, if the main business system needs to carry out joint debugging tasks for a new project (the new project includes a new business subsystem, such as business subsystem E), it first checks whether the "subsystem E simulation control module" exists in the existing simulation set:

[0077] If it exists, then directly call that module to participate in the joint debugging of the new project;

[0078] If it does not exist, follow the steps above to create a corresponding "Subsystem E Simulation Control Module" for business subsystem E (configure its CAN bus communication protocol parameters) and add the module to the simulation set. There is no need to modify other existing modules in the simulation set. This design can greatly improve the development efficiency of the simulation system for new projects and meet the flexible adaptation requirements of the overall business system.

[0079] In one implementation of this embodiment, after the step of determining all business subsystems and their working status in the project integration task, the method further includes the following steps:

[0080] If a business subsystem is in an online state, the corresponding subsystem simulation control module will not perform simulation operations, send simulation data for the business subsystem, or respond to control commands for the business subsystem.

[0081] It is understood that in this embodiment, the simulation controller can control the corresponding subsystem simulation control module to perform different operations based on the working status (online / offline) of each business subsystem, specifically divided into two scenarios: "online status processing" and "offline status processing".

[0082] Scenario 1: Processing of business subsystems that are in an online working state.

[0083] If a business subsystem is in an "online" state (such as subsystems A and C mentioned above), then the corresponding "subsystem simulation control module" (subsystem A simulation control module and subsystem C simulation control module) will not perform any simulation operations. Specifically, this means:

[0084] Do not send simulation data for this business subsystem;

[0085] It does not respond to control commands sent by the control host for this subsystem;

[0086] Only real business subsystems (subsystems A and C) participate in the project integration and debugging tasks to avoid data conflicts between the simulation module and the real subsystems and ensure the accuracy of the integration and debugging data.

[0087] Scenario 2: Processing of business subsystems that are offline.

[0088] If a business subsystem is in an "offline state" (such as subsystems B and D mentioned above), it is necessary to first determine whether the "subsystem simulation control module" corresponding to that subsystem exists in the simulation set, and then perform the simulation operation according to the following cases:

[0089] Scenario 1: The corresponding subsystem simulation control module already exists in the simulation set;

[0090] If the simulation set already stores the simulation control module corresponding to the offline subsystem (e.g., the simulation set already has "Subsystem B Simulation Control Module" and "Subsystem D Simulation Control Module"), then for each offline subsystem, the corresponding module is used to execute the "business task" and generate the "simulation task result". The specific process is as follows:

[0091] Periodic transmission of simulation data: The subsystem simulation control module periodically transmits the subsystem's "simulation data" (such as the data collected by the simulation subsystem B) to the control host according to the subsystem's preset "CAN bus communication protocol configuration data conditions" (such as the transmission period of subsystem B being 2 seconds and the data length being 8 bytes).

[0092] Responding to control commands from the control host: If the control host sends a control command (such as "start data acquisition function") to the offline subsystem, the subsystem simulation control module will respond immediately:

[0093] Send a "control command reply" (e.g., "command received");

[0094] Simulate the "execution logic" and "execution flow" of this subsystem (such as simulating the process of "starting acquisition → data processing → status feedback");

[0095] Generate "command execution status" (e.g., "acquisition function has been started and is running normally");

[0096] Generating and feeding back simulation task results: The above-mentioned "simulation data", "control command feedback", and "command execution status" together constitute the "simulation task results" corresponding to the "business task" of this offline subsystem. The subsystem simulation control module feeds back the results to the control host through the CAN bus.

[0097] The control host continuously executes the joint debugging task: After receiving the simulation task results, the control host regards them as the real feedback data of the offline subsystem and continues to advance the subsequent steps of the project joint debugging task (such as controlling subsystem A to perform the next operation based on the simulation data of subsystem B), ensuring that the joint debugging process is not interrupted.

[0098] Scenario 2: The simulation control module for the corresponding subsystem does not exist in the simulation set;

[0099] If the simulation control module corresponding to the offline subsystem is not stored in the simulation set (e.g., the simulation control module for subsystem E added in a new project is not present in the simulation set), then the following process should be followed to supplement the configuration and execute the simulation:

[0100] For the offline subsystem (such as subsystem E), immediately create the corresponding "subsystem simulation control module" (i.e. "subsystem E simulation control module"), and configure the module's parameters such as "transmit data length", "receive data length", "data transmission period" and "data type" according to the preset CAN bus communication protocol;

[0101] Add the newly created subsystem simulation control module to the simulation set;

[0102] The subsequent process is the same as in "Scenario 1": use the new module to execute the business tasks of subsystem E, generate simulation task results and feed them back to the control host to ensure the continuous progress of the project integration task.

[0103] To further clarify the execution process of this simulation method, we will take the example of "the overall business system comprising four business subsystems A, B, C, and D, and conducting the first project integration test," and explain it in detail as follows:

[0104] Preliminary configuration: Subsystem simulation control modules (executed in parallel) corresponding to A, B, C, and D have been created in the simulation controller. Each module is configured with CAN bus parameters (e.g., A's transmission cycle is 2 seconds, and B's transmission length is 8 bytes). All modules are stored in the simulation set.

[0105] Receiving the joint debugging task: The control host sends the project joint debugging task to the simulation controller, specifying that A, B, C, and D need to participate in the joint debugging, and A needs to "receive the instruction feedback status" and B needs to "send the collected data".

[0106] Status determination: After receiving data, the simulation controller determines: A and C are online (heartbeat received within 10 seconds), B and D are offline (no data within 10 seconds);

[0107] Online subsystem processing: The simulation modules corresponding to A and C do not operate; the real A and C participate in the joint debugging.

[0108] Offline subsystem processing:

[0109] Simulation modules B and D already exist. Module B sends 8 bytes of simulation acquisition data every 2 seconds, while module D waits for control commands.

[0110] The control host sends a "start execution" command to module D, and module D replies "command received". The process of "start → execution → status feedback" is simulated, and status data of "execution is normal" is sent.

[0111] Feedback and Joint Debugging: The simulation results of B and D (acquired data, command feedback, execution status) are fed back to the control host. The control host combines the real data of A and C to complete the entire joint debugging process without interruption and without the need for manual modification of simulation configuration.

[0112] Through the above specific implementation methods, this simulation method can achieve full automation of the business system project integration testing: it can adapt to the "temporary online" or "temporary offline" status of subsystems without manual modification of simulation configuration, solving the problems of integration testing interruption and frequent simulation modification. At the same time, the "simulation set + parallel module" design improves the adaptation flexibility and development efficiency, fully meeting the functional and efficiency requirements of the business system integration testing.

[0113] Understandably, the intelligent simulation system runs within a simulation controller. The simulation controller and each subsystem are connected to the main system via a CAN bus. According to the agreed-upon CAN bus protocol, the data each subsystem needs to receive and send is clearly defined. The intelligent simulation system judges the received CAN bus data. If it receives heartbeat or status data from a subsystem, it considers that subsystem online and does not perform simulation on that subsystem. If no data is received from that subsystem within 10 seconds, it considers that subsystem offline and performs simulation on that subsystem.

[0114] When the intelligent simulation system (i.e., the simulation controller) simulates a subsystem, it periodically sends the data required by that subsystem according to the CAN bus protocol. Upon receiving control commands from the control host, it sends feedback and executes the simulation process according to the control commands, providing real-time feedback on the execution status. Based on the status data fed back by the intelligent simulation system, the control host continues to execute subsequent automatic control processes.

[0115] Because the overall system contains multiple subsystems, the intelligent simulation system needs to simulate these subsystems. To ensure the independence of each subsystem, the simulation of each subsystem is designed separately, without interference. Assuming there are four subsystems A, B, C, and D, the intelligent simulation system designs the simulations of these four subsystems independently. If subsystems A and B are online, they are not simulated; if subsystems C and D are offline, they are simulated. If subsystem C is added to the overall system during integration testing, the intelligent simulation system does not simulate subsystem C. If subsystem A fails and is removed from integration testing, the intelligent simulation system detects subsystem A's offline status and begins simulating subsystem A without requiring any changes.

[0116] As can be seen, this simulation method, by designing the simulation set to include subsystem simulation control modules that correspond one-to-one with each business subsystem (each module corresponds to a unique business subsystem), enables the simulation controller applied to the overall business system to first determine the working status of all business subsystems after receiving the project integration and debugging task. Then, for business subsystems that are offline, it quickly calls the corresponding subsystem simulation control module by determining whether the simulation set contains it, executes the business task corresponding to the offline business subsystem, generates simulation task results, and feeds the results back to the control host to support its continuous execution of the project integration and debugging task. The entire process does not require manual modification of simulation settings, which effectively solves the problem of project integration and debugging task interruption caused by the offline status of some business subsystems, ensures the continuous progress of project integration and debugging tasks, reduces the workload of manual operation during integration and debugging, significantly improves the execution efficiency, automation level and flexibility of the project integration and debugging task of the overall business system, and ensures that the integration and debugging links corresponding to offline business subsystems can be quickly adapted, and the overall integration and debugging process can be advanced without waiting for the business subsystems to be online.

[0117] This simulation method monitors the status of individual subsystems to determine whether they are online or offline. If an subsystem is online, it is not simulated; if it is offline, it is simulated, and its execution status is sent to the main system so that the main system can correctly perform the integration and testing. Later, if the subsystem meets the conditions for integration testing, it can be connected to the main system for integration testing at any time without requiring additional modifications to the simulation system or waiting for a specific time to join the main system for testing, thus improving the flexibility and convenience of integration testing.

[0118] like Figure 3The image shows a specific embodiment of a simulation device provided in this application. The device described in this embodiment is a physical device used to execute the method described in the above embodiments. Its technical solution is essentially the same as that of the above embodiments, and the corresponding descriptions in the above embodiments are also applicable to this embodiment. The device is applied to a simulation controller in a business system, and the simulation controller is connected to the control host and multiple business subsystems in the business system respectively; the device includes:

[0119] Unit 301 is used to receive project commissioning tasks sent by the control host.

[0120] The second unit 302 is used to determine all business subsystems and the working status of each business subsystem in the project joint debugging task.

[0121] The third unit 303 is used to determine whether the simulation set corresponding to the simulation controller includes the subsystem simulation control module corresponding to the business subsystem whose working state is offline if there is a business subsystem whose working state is offline.

[0122] The fourth unit 304 is configured to, if the simulation set corresponding to the simulation controller includes a subsystem simulation control module corresponding to a business subsystem whose working state is offline, execute the business task corresponding to the business subsystem in the project integration task using the subsystem simulation control module corresponding to the business subsystem for each business subsystem whose working state is offline, and obtain the simulation task result corresponding to the business task; and feed back the simulation task result corresponding to the business task to the control host so that the control host can execute the project integration task using the simulation task result corresponding to the business task.

[0123] In the simulation set corresponding to the simulation controller, each subsystem simulation control module corresponds to a business subsystem, and the business subsystems corresponding to each subsystem simulation control module are different.

[0124] Optionally, the device further includes a fifth unit, configured to receive heartbeat data or status data of each business subsystem in the overall business system before the step of determining all business subsystems and their working status in the project commissioning task; and to determine the working status of each business subsystem based on its heartbeat data or status data; wherein the working status is either online or offline.

[0125] Optionally, determining the operating status of the business subsystem based on its heartbeat data or status data includes:

[0126] If no heartbeat data or status data is received from the subsystem within a preset time period, the working status of the business subsystem is determined to be offline.

[0127] If at least one heartbeat or status data from the subsystem is received within a preset time period, the working state of the business subsystem is determined to be working.

[0128] Optionally, the step of using the subsystem simulation control module corresponding to the business subsystem to execute the business task corresponding to the business subsystem in the project integration task, and obtaining the simulation task result corresponding to the business task, includes:

[0129] Using the subsystem simulation control module corresponding to the business subsystem, simulation data of the business subsystem is generated according to the preset configuration data conditions of the CAN bus communication protocol, and the simulation data of the business subsystem is used as the simulation task result.

[0130] The configuration data conditions of the preset CAN bus communication protocol include at least one of the following: the length of the data to be sent, the length of the data to be received, the data sending period, and the data type corresponding to the service subsystem.

[0131] Optionally, the step of using the subsystem simulation control module corresponding to the business subsystem to execute the business task corresponding to the business subsystem in the project integration task, and obtaining the simulation task result corresponding to the business task, includes:

[0132] In response to the control command sent by the control host for the business subsystem, the execution logic and execution flow of the business subsystem are simulated using the subsystem simulation control module corresponding to the business subsystem, and the simulation task result corresponding to the control command is generated; wherein, the simulation task result corresponding to the control command includes simulation data, control command feedback, and command execution status.

[0133] Optionally, the device further includes a sixth unit, configured to, after the step of determining whether the simulation set corresponding to the business subsystem in the offline state includes a subsystem simulation control module for the business subsystem in the offline state in the simulation set corresponding to the simulation controller, if there is no subsystem simulation control module for the business subsystem in the offline state in the simulation set corresponding to the simulation controller, create a subsystem simulation control module for the business subsystem in the offline state, store the subsystem simulation control module for the business subsystem in the simulation set corresponding to the simulation controller, and continue to execute the step of using the subsystem simulation control module for the business subsystem in the project joint debugging task to execute the business task corresponding to the business subsystem and obtain the simulation task result corresponding to the business task.

[0134] Optionally, the device further includes a seventh unit, which, after the step of determining all business subsystems and their working status in the project commissioning task, if a business subsystem is in an online state, then the subsystem simulation control module corresponding to the online business subsystem will not perform simulation operations, will not send simulation data of the business subsystem, and will not respond to control commands for the business subsystem.

[0135] Optionally, the simulation controller is connected to the control host and multiple business subsystems in the overall business system via a CAN bus. The simulation control modules of each of the multiple business subsystems operate in parallel, and the start, stop or parameter adjustment of any one subsystem simulation control module does not affect the operation of other subsystem simulation control modules.

[0136] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include main memory, such as high-speed random-access memory (RAM), or it may include non-volatile memory, such as at least one disk storage device. Of course, the electronic device may also include other hardware required for other services.

[0137] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0138] Memory is used to store instructions for execution. Specifically, instructions for execution are computer programs that can be executed. Memory can include main memory and non-volatile memory, and it provides the processor with execution instructions and data.

[0139] In one possible implementation, the processor reads the corresponding execution instructions from non-volatile memory into main memory and then executes them. Alternatively, it may obtain the corresponding execution instructions from other devices to form a simulation device at the logical level. The processor executes the execution instructions stored in the memory to implement the simulation method provided in any embodiment of this application through the executed instructions.

[0140] The above is as stated in this application. Figure 1 The methods executed by the simulation device provided in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0141] The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0142] This application also proposes a readable medium that stores execution instructions. When the stored execution instructions are executed by the processor of an electronic device, the electronic device can execute the simulation method provided in any embodiment of this application and specifically perform the above-mentioned evaluation method.

[0143] The electronic devices described in the foregoing embodiments may be computers.

[0144] Those skilled in the art will understand that the embodiments of this application can be provided as methods or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or a combination of software and hardware.

[0145] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0146] It should also be noted that 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.

[0147] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A simulation method, characterized by, The method is applied to a simulation controller in a business total system, the simulation controller is connected with a control host and a plurality of business subsystems in the business total system respectively; the method comprises: receiving a project joint debugging task sent by the control host; determining all business subsystems in the project joint debugging task and working states of the business subsystems; if there is a business subsystem with an offline working state, judging whether a simulation set corresponding to the simulation controller includes a subsystem simulation control module corresponding to the business subsystem with the offline working state; if the simulation set corresponding to the simulation controller includes the subsystem simulation control module corresponding to the business subsystem with the offline working state, for each business subsystem with the offline working state, executing a business task corresponding to the business subsystem in the project joint debugging task by using the subsystem simulation control module corresponding to the business subsystem, obtaining a simulation task result corresponding to the business task; and feeding back the simulation task result corresponding to the business task to the control host, so that the control host executes the project joint debugging task by using the simulation task result corresponding to the business task; wherein each subsystem simulation control module in the simulation set corresponding to the simulation controller corresponds to one business subsystem, and the business subsystems corresponding to each subsystem simulation control module are different.

2. The method of claim 1, wherein, Before the step of determining all business subsystems in the project joint debugging task and working states of the business subsystems, the method further comprises: receiving heartbeat data or state data of each business subsystem in the business total system; for each business subsystem, determining a working state of the business subsystem according to the heartbeat data or state data of the business subsystem; wherein the working state is an online state or an offline state.

3. The method of claim 1, wherein, The step of determining the working state of the business subsystem according to the heartbeat data or state data of the business subsystem comprises: if no heartbeat data or state data of the subsystem is received within a preset time length, determining that the working state of the business subsystem is an offline state; if at least once heartbeat data or state data of the subsystem is received within a preset time length, determining that the working state of the business subsystem is an online state.

4. The method of claim 1, wherein, The step of executing the business task corresponding to the business subsystem in the project joint debugging task by using the subsystem simulation control module corresponding to the business subsystem to obtain a simulation task result corresponding to the business task comprises: generating simulation data of the business subsystem according to preset configuration data conditions of a CAN bus communication protocol by using the subsystem simulation control module corresponding to the business subsystem, and taking the simulation data of the business subsystem as a simulation task result; wherein the preset configuration data conditions of the CAN bus communication protocol comprise at least one of the following: a sending data length, a receiving data length, a data sending period and a data type corresponding to the business subsystem.

5. The method of claim 1, wherein, The method further comprises: In response to the control host sending a control instruction for the business subsystem, the business subsystem corresponding subsystem simulation control module simulates the execution logic and execution flow of the business subsystem to generate a simulation task result corresponding to the control instruction; wherein the simulation task result corresponding to the control instruction comprises simulation data, control instruction response, and instruction execution status.

6. The method of claim 1, wherein, After the step of determining whether the simulation controller corresponding simulation set includes the business subsystem corresponding subsystem simulation control module with the working state of offline, the method further comprises: If the simulation controller corresponding simulation set does not include the business subsystem corresponding subsystem simulation control module with the working state of offline, the business subsystem corresponding subsystem simulation control module is created for the business subsystem with the working state of offline, and the business subsystem corresponding subsystem simulation control module is stored in the simulation controller corresponding simulation set, and the step of executing the business subsystem corresponding business task in the project joint debugging task by using the business subsystem corresponding subsystem simulation control module to obtain the simulation task result corresponding to the business task is continued.

7. The method of claim 1, wherein, After the step of determining all business subsystems in the project joint debugging task and the working state of each business subsystem, the method further comprises: If the working state of the business subsystem is online, the business subsystem corresponding subsystem simulation control module with the working state of online does not perform simulation operation, does not send simulation data of the business subsystem, and does not respond to the control instruction for the business subsystem.

8. The method according to any one of claims 1 to 7, characterized in that, The simulation controller is connected with the control host and the plurality of business subsystems in the business total system through CAN bus respectively; the plurality of business subsystems correspond to the subsystem simulation control modules respectively, and the subsystem simulation control modules run in parallel; starting, stopping or parameter adjustment of any subsystem simulation control module does not affect the running of other subsystem simulation control modules.

9. An emulation apparatus, characterized by, The device is applied to a simulation controller in a business total system, and the simulation controller is connected with a control host and a plurality of business subsystems in the business total system respectively; the device comprises: A first unit is configured to receive a project joint debugging task sent by a control host; A second unit is configured to determine all business subsystems in the project joint debugging task and the working state of each business subsystem; A third unit is configured to determine whether the simulation controller corresponding simulation set includes the business subsystem corresponding subsystem simulation control module with the working state of offline if there is a business subsystem with the working state of offline. A fourth unit is configured to create the business subsystem corresponding subsystem simulation control module for the business subsystem with the working state of offline if the simulation controller corresponding simulation set does not include the business subsystem corresponding subsystem simulation control module with the working state of offline, and store the business subsystem corresponding subsystem simulation control module in the simulation controller corresponding simulation set. A fourth unit is configured to, if the simulation controller corresponds to a simulation set including a subsystem simulation control module corresponding to a business subsystem in an offline state, for each business subsystem in an offline state, execute a business task corresponding to the business subsystem in the project joint debugging task by using the subsystem simulation control module corresponding to the business subsystem, to obtain a simulation task result corresponding to the business task; and feed back the simulation task result corresponding to the business task to the control host, so that the control host executes the project joint debugging task by using the simulation task result corresponding to the business task. Each subsystem simulation control module in the simulation set corresponding to the simulation controller corresponds to a business subsystem, and the business subsystems corresponding to each subsystem simulation control module are different.

10. An electronic device, comprising: The electronic device includes a processor and a memory storing execution instructions, and when the processor executes the execution instructions stored in the memory, the processor executes the method of any one of claims 1-7.