Simulation scheduling method, apparatus and device, and medium

By constructing a configuration file to determine the starting running time and the runnable time period of the task, the asynchrony problem in the simulation process is solved and the accuracy and reliability of the simulation are achieved.

WO2025213550A1PCT designated stage Publication Date: 2025-10-16BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/097175
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-11
Filing Date
2024-06-04
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

In the existing simulation process, asynchrony and uncertainty lead to distorted simulation results, affecting the performance and stability of the model and its corresponding control system.

Method used

By configuring the scheduling information and task information, a configuration file is constructed, including time slice information, task quantity information and main scheduling cycle information, to ensure that the tasks are executed according to the predetermined scheduling plan in the simulation environment.

Benefits of technology

It improves the accuracy and reliability of simulation, ensures that tasks are executed according to the predetermined scheduling plan, reduces the distortion of simulation results, and improves the performance and stability of the control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024097175_16102025_PF_FP_ABST
    Figure CN2024097175_16102025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application relate to the technical field of simulation. Disclosed are a simulation scheduling method, apparatus and device, and a medium. The method comprises: by means of configuring scheduling information and task information, constructing a configuration file, wherein the scheduling information comprises time slice information, task quantity information and primary scheduling period information, and the task information comprises starting time slice offset information for the operation of a task, time slice quantity information for the operation of the task, and task period information; and by means of reading the configuration file, performing simulation scheduling on all tasks corresponding to the configuration file. Therefore, by means of configuring the scheduling information and the task information, an operation starting time and an allowed operation time period of each task are both determined, which helps to ensure that tasks are executed in a simulation environment according to a preset scheduling plan, thereby ensuring the accuracy and reliability of simulation.
Need to check novelty before this filing date? Find Prior Art

Description

An emulation scheduling method, device, equipment and medium

[0001] The present application claims priority to the Chinese patent application No. 202410437297.1, filed on April 11, 2024, and entitled "An emulation scheduling method, device, equipment and medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of emulation, and in particular to an emulation scheduling method, device, equipment and medium. BACKGROUND

[0003] With the development of computer technology, modeling and simulation play an increasingly important role in the design, testing and optimization of control systems. Engineers usually use professional modeling and simulation software, such as Matlab, Simulink, etc., to create models corresponding to control systems, so as to perform simulation testing in a virtual environment. These models are usually saved in a specific file format, such as mdl and slx, and used in subsequent simulation testing processes.

[0004] In the current simulation process, the operation of the model is performed according to a pre-set fixed step, which determines the frequency of the simulation data generated by the model. These simulation data usually include sensor readings, actuator instructions, etc., which are output to the system under test through the hardware electrical interface (IO) of the model. Subsequently, the system under test generates corresponding control signals based on the simulation data and returns the control signals to the model through the hardware electrical interface to form a closed-loop control loop.

[0005] However, there are usually control tasks of different periods in the actual model, and these control tasks are run asynchronously. Taking the model operation task and the IO operation task as an example, assume that the model operation task is executed every 1 millisecond, and the IO operation task is executed every 5 milliseconds. This means that within the 1 millisecond of IO data update, the model may be performing the operation task or may have completed the operation task. Therefore, within the 1ms of IO data update, the model may use the last period's data that has not been updated for operation, or may use the current period's data that has been updated for operation. This asynchrony and uncertainty may cause distortion of the simulation results, thereby affecting the performance and stability of the model and its corresponding control system.

[0006] SUMMARY

[0007] Based on the above problems, the present application provides an emulation scheduling method, device, equipment and medium, which can enhance the accuracy of simulation.

[0008] The embodiment of the application discloses the following technical solutions:

[0009] In a first aspect, the application discloses a simulation scheduling method, which comprises the following steps:

[0010] A configuration file is constructed by configuring scheduling information and task information, wherein the scheduling information comprises time slice information, task quantity information and main scheduling period information, and the task information comprises time slice offset information of task starting running, task running time slice quantity information and task period information;

[0011] All tasks corresponding to the configuration file are simulated and scheduled by reading the configuration file.

[0012] Optionally, the scheduling information further comprises scheduling mode information, and the method further comprises the following steps:

[0013] If actual running time information of a target task in a simulation scheduling process is greater than the task running time slice quantity information of the target task, the simulation scheduling is stopped, or the time slice offset information of task starting running of an unscheduled task in the all tasks is adjusted.

[0014] Optionally, the scheduling mode information comprises a fixed mode, and the simulation scheduling is stopped, comprising the following steps:

[0015] If the scheduling mode information corresponding to the configuration file is the fixed mode, the simulation scheduling is stopped.

[0016] Optionally, the scheduling mode information comprises an adaptive mode, and the adjustment of the time slice offset information of task starting running of the unscheduled task in the all tasks comprises the following steps:

[0017] If the scheduling mode information corresponding to the configuration file is the adaptive mode, the time slice offset information of task starting running of the unscheduled task in the all tasks is adjusted according to a difference value between the actual running time information and the task running time slice quantity information.

[0018] Optionally, the simulation and scheduling of all tasks corresponding to the configuration file by reading the configuration file comprises the following steps:

[0019] All tasks corresponding to the configuration file are initialized by reading the configuration file;

[0020] If the all tasks have been initialized, the all tasks are simulated and scheduled.

[0021] Optionally, the method further comprises the following steps:

[0022] In a case that simulation scheduling is performed on all tasks corresponding to the first configuration file and all tasks corresponding to the first configuration file have been executed, simulation scheduling is performed on all tasks corresponding to the second configuration file by reading the second configuration file.

[0023] Optionally, the method further comprises:

[0024] In the process of performing simulation scheduling on all tasks corresponding to the configuration file, the start running time and the end running time of the all tasks are recorded.

[0025] According to the start running time and the end running time, the average execution time, the maximum execution time and the minimum execution time of the all tasks are obtained.

[0026] Optionally, the time slice offset information of the task start running is greater than or equal to 0.

[0027] Optionally, the task running time slice quantity information is greater than or equal to 1 and less than or equal to the task period information.

[0028] Optionally, the task period information is less than or equal to the main scheduling period information.

[0029] In a second aspect, the application discloses a simulation scheduling device, which comprises a file construction module and a simulation scheduling module; the file construction module is connected with the simulation scheduling module;

[0030] The file construction module is configured to construct a configuration file by configuring scheduling information and task information; the scheduling information comprises time slice information, task quantity information and main scheduling period information; the task information comprises time slice offset information of task start running, task running time slice quantity information and task period information.

[0031] The simulation scheduling module is configured to perform simulation scheduling on all tasks corresponding to the configuration file by reading the configuration file.

[0032] Optionally, the scheduling information further comprises scheduling mode information, and the device further comprises a stop adjustment module; the stop adjustment module is connected with the simulation scheduling module.

[0033] The stop adjustment module is configured to stop simulation scheduling or adjust the time slice offset information of task start running of an unscheduled task in the all tasks if the actual running time information of a target task in the simulation scheduling process is greater than the task running time slice quantity information of the target task.

[0034] Optionally, the scheduling mode information comprises a fixed mode; and the stopping adjusting module is specifically configured to stop simulation scheduling if the scheduling mode information corresponding to the configuration file is the fixed mode.

[0035] Optionally, the scheduling mode information comprises an adaptive mode; and the stopping adjusting module is specifically configured to adjust time slice offset information of a start of running of an unscheduled task in the all tasks according to a difference between the actual running time information and the task running time slice quantity information if the scheduling mode information corresponding to the configuration file is the adaptive mode.

[0036] Optionally, the simulation scheduling module is specifically configured to initialize all tasks corresponding to the configuration file by reading the configuration file; and perform simulation scheduling on the all tasks if the all tasks have been initialized.

[0037] Optionally, the device further comprises a sequential scheduling module; and the sequential scheduling module is connected with the simulation scheduling module.

[0038] The sequential scheduling module is configured to perform simulation scheduling on all tasks corresponding to a second configuration file by reading the second configuration file if simulation scheduling is performed on all tasks corresponding to a first configuration file and the all tasks corresponding to the first configuration file have been executed.

[0039] Optionally, the device further comprises a time recording module and a time acquisition module; and the simulation scheduling module, the time recording module and the time acquisition module are connected in sequence.

[0040] The time recording module is configured to record start running time and end running time of the all tasks in a process of performing simulation scheduling on the all tasks corresponding to the configuration file.

[0041] The time acquisition module is configured to acquire average execution time, maximum execution time and minimum execution time of the all tasks according to the start running time and the end running time.

[0042] Optionally, the time slice offset information of the start of running of the task is greater than or equal to 0.

[0043] Optionally, the task running time slice quantity information is greater than or equal to 1 and less than or equal to the task period information.

[0044] Optionally, the task period information is less than or equal to the main scheduling period information.

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

[0046] The application provides a simulation scheduling method and device, equipment and a medium. The method comprises the following steps: constructing a configuration file by configuring scheduling information and task information, wherein the scheduling information comprises time slice information, task quantity information and main scheduling period information, and the task information comprises time slice offset information of starting running of a task, task running time slice quantity information and task period information; and performing simulation scheduling on all tasks corresponding to the configuration file by reading the configuration file. Thus, by configuring the scheduling information and the task information, the starting running time and the running time period of each task are determined, which helps to ensure that the tasks are executed according to the predetermined scheduling plan in the simulation environment, thereby ensuring the accuracy and reliability of the simulation. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0048] Fig. 1 is a flowchart of a simulation scheduling method according to an embodiment of the present application;

[0049] Fig. 2 is a schematic diagram of a simulation scheduling according to an embodiment of the present application;

[0050] Fig. 3 is a schematic diagram of a simulation scheduling device according to an embodiment of the present application;

[0051] Fig. 4 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] As described above, in the current simulation process, the operation of the model is performed according to a pre-set fixed step, and the step determines the frequency of the simulation data generated by the model. The simulation data usually includes sensor readings, actuator instructions, etc., which are output to the measured system through the hardware electrical interface (IO) of the model. Then, the measured system generates corresponding control signals based on the simulation data, and returns the control signals to the model through the hardware electrical interface to form a closed-loop control loop.

[0053] However, in actual models, there are usually control tasks of different periods, which are asynchronously run. Taking a model operation task and an IO operation task as examples, it is assumed that the model operation task is executed every 1 millisecond, and the IO operation task is executed every 5 milliseconds. This means that in the 1 millisecond in which the IO updates data, the model may be executing the operation task or may have completed the operation task. Therefore, in the 1 millisecond in which the IO updates data, the model may use the data of the last period that is not updated to perform the operation, or may use the data of the current period that is updated to perform the operation. This asynchrony and uncertainty may cause distortion of the simulation result, thereby affecting the performance and stability of the model and the corresponding control system.

[0054] The inventors have provided a simulation scheduling method, device, equipment and medium, which comprises: constructing a configuration file by configuring scheduling information and task information, the scheduling information comprising timeslice information, task quantity information and main scheduling period information, and the task information comprising timeslice offset information of starting running of a task, task running timeslice quantity information and task period information; and performing simulation scheduling on all tasks corresponding to the configuration file by reading the configuration file. Thus, by configuring the scheduling information and the task information, the starting running time and the runnable time period of each task are determined, which helps to ensure that the tasks are executed according to the predetermined scheduling plan in the simulation environment, thereby ensuring the accuracy and reliability of the simulation.

[0055] In order for those skilled in the art to better understand the technical scheme of the present application, the technical scheme of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0056] Referring to FIG. 1, which is a flowchart of a simulation scheduling method provided by an embodiment of the present application. The method is applied to a scheduler in a model corresponding to a control system, and the method comprises:

[0057] S101: configuring scheduling information.

[0058] The scheduling information comprises timeslice information, task quantity information, main scheduling period information and scheduling mode information.

[0059] The timeslice information refers to a basic unit of executing scheduling, usually in units of microseconds (us). For example, the timeslice information can be 100 us.

[0060] The task quantity information refers to the total number of tasks that need to be executed in the corresponding model of the control system. For example, the tasks can include model operation tasks, IO operation tasks, data processing tasks, etc. Among them, the model operation task refers to the mathematical calculation, algorithm processing and data updating tasks in the model; the IO operation task refers to the task of interacting with the hardware or software interface of the external measured system to perform data exchange; and the data processing task refers to the task of collecting, sorting, analyzing, storing, etc. the simulation data generated by the model to form a report or other visual results. The specific tasks and the number of tasks are not limited in the present application.

[0061] The main scheduling period information is the length of time for the scheduler to execute a complete scheduling period, which is an integer multiple of the time slice. In each main scheduling period, the scheduler will sequentially schedule each task according to the scheduling information. It should be noted that the main scheduling period information needs to be consistent with the step length of the model, for example, the commonly used model step length in the hardware-in-the-loop simulation test system is 1ms, and the main scheduling period also needs to be configured as 1ms, which means that the execution of all tasks needs to be sequentially completed within 1ms.

[0062] The scheduling mode information includes fixed mode and custom mode. Among them, the fixed mode refers to that the scheduler will execute the scheduling tasks in a fixed time slice order according to the predefined scheduling information. That is, the execution order of the tasks and the number of time slices occupied by each task are determined in the scheduling table configuration stage, and will not change during the simulation running. Therefore, the fixed mode is suitable for simulation scenarios with relatively fixed task execution order and time requirements, which do not need to be adjusted frequently. The custom mode refers to that the scheduler allows users to dynamically adjust the execution order of the tasks and the time slice allocation according to the real-time situation in the simulation process. That is, users can control the execution logic of the tasks through programming or scripting to realize more flexible scheduling strategies. Therefore, the custom mode is suitable for complex simulation scenarios that need to dynamically adjust the task scheduling according to the data and state in the simulation process.

[0063] S102: Configure task information.

[0064] The task information includes time slice offset information of starting running of the task, task running time slice quantity information and task period information.

[0065] Among them, the time slice offset information of starting running of the task refers to which time slice in the main scheduling period each task starts to run. For example, if the time slice offset information of starting running of the task A is 3, then the task A needs to start running in the 3rd time slice in the main scheduling period.

[0066] It should be noted that the time slice offset information of the task starting to run in the actual application needs to be greater than or equal to 0, so as to ensure the order and accuracy of the task scheduling in the model. Moreover, by configuring the time slice offset of the task starting to run, the execution order of the task in the main scheduling period can be controlled, for example, the time slice offset information of the IO input task is configured as 0, the running time slice quantity information is 20, the time slice offset information of the model task is configured as 20, the running time slice quantity information is 60, the time slice offset information of the IO output task is configured as 80, and the running time slice quantity information is 80, which means that the IO input task, the model task, and the IO output task are executed in turn in the main scheduling period.

[0067] The task running time slice quantity information refers to the number of time slices that the task needs to continuously execute. For example, if the task running time slice quantity information of task B is 3 and the time slice offset information of the task starting to run is 2, then task B needs to start running in the second time slice in the main scheduling period and continuously run for 3 time slices.

[0068] It should be noted that the task running time slice quantity information in the actual application needs to be greater than or equal to 1 and less than or equal to the task period. This is because the time slice is the basic unit of task execution. If the task running time slice quantity is 0, the task will not get any execution time, so at least one time slice needs to be allocated to the task to ensure that the task can be executed. Moreover, if the task running time slice quantity exceeds the task period, the task will not be able to complete execution within a period, which will cause problems in task scheduling, for example, the task may be interrupted during execution.

[0069] The task period refers to the number of time slices for a task to execute a complete cycle, which defines the time required for the task to start and end. For example, if the task period of task C is 5, then the start and end of task C is 5 time slices.

[0070] It should be noted that the task period information in the actual application is greater than or equal to the task running time slice quantity information and less than or equal to the main scheduling period information. This is because if the task period exceeds the main scheduling period, it may not be possible to complete a task period of execution within a main scheduling period, which will cause the scheduling efficiency to decrease and increase the complexity of the scheduler. Moreover, limiting the task period within the main scheduling period helps to enhance the predictability of the corresponding model of the control system. If the task period is too long, it may cause the uncertainty of the task execution time to increase, thereby affecting the accuracy of the simulation results.

[0071] It should be noted that the execution order of the above S101 step and S102 step is not limited in the present application.

[0072] S103: Construct a configuration file according to the scheduling information and the task information.

[0073] Referring to FIG. 2, which is a schematic diagram of simulation scheduling provided by an embodiment of the present application, it can be seen from the diagram that the scheduling information includes time slice information of 100us, task quantity information of 4, and main scheduling period of 10. The task information of task A includes time slice offset information of 0 at which the task starts running, task running time slice quantity information of 1, and task period information of 5. The task information of task B includes time slice offset information of 1 at which the task starts running, task running time slice quantity information of 3, and task period information of 5. The task information of task C includes time slice offset information of 4 at which the task starts running, task running time slice quantity information of 1, and task period information of 5. The task information of task D includes time slice offset information of 0 at which the task starts running, task running time slice quantity information of 8, and task period information of 10.

[0074] S104: Obtain the scheduling information and the task information through the configuration file.

[0075] In some specific implementation manners, the INI format configuration file can be read through the configparser module of Python software. In some other specific implementation manners, the.properties format configuration file can be read through the Properties class of JAVA software. In some other specific implementation manners, the App.config or Web.config format configuration file can be read through the System.Configuration.ConfigurationManager class of.NET. It should be noted that the present application does not limit the specific reading method.

[0076] S105: Perform initialization operation on all tasks.

[0077] The initialization operation is an important step before the execution of simulation scheduling, which ensures that the simulation scheduling has a correct initial state and required resources when it is executed. After the initialization operation is completed on all tasks, the scheduler can know that all tasks are ready and are waiting for scheduling.

[0078] In some specific implementation manners, the initialization operation includes starting a model program and starting an IO program. The starting of the model program refers to loading model data, initializing model state, configuring model parameters, etc., and the starting of the IO program refers to connecting with an external system to be tested, configuring IO parameters, initializing IO buffer area, etc.

[0079] S106: If all tasks have been initialized, perform simulation scheduling on all tasks based on the configuration file.

[0080] When all tasks are initialized and in a schedulable state, the scheduler starts to perform scheduling according to the scheduling information and task information in the configuration file. Referring to FIG. 2, when task A, task B, task C and task D are all initialized, scheduling can be performed according to the scheduling information and task information in the configuration file.

[0081] It should be noted that after all tasks in a main scheduling period are completed, the system needs to enter a state of waiting for the next scheduling. Moreover, when scheduling in the second main scheduling period (i.e., in the first time slice of the second main scheduling period, or in the last time slice of the first main scheduling period), the scheduler needs to first check whether all tasks have been executed, and if so, enter the next scheduling.

[0082] In some specific implementations, while performing simulation scheduling on all tasks, it can also be determined whether there is a phenomenon that the actual running time of a task exceeds the task running time slice quantity information. If so, it can be processed according to the scheduling mode information in the scheduling information. In some examples, if the scheduling mode information is a fixed mode, the subsequent simulation scheduling needs to be stopped. In other examples, if the scheduling mode information is an adaptive mode, the time slice offset information of the start of the running of the unscheduled task can be changed.

[0083] It should be noted that when performing simulation scheduling in each main scheduling period, the start running time and the end running time of the task need to be recorded.

[0084] S107: When all tasks are completed, the average execution time, the maximum execution time and the minimum execution time of all tasks are obtained by monitoring the start running time and the end running time of all tasks in each main scheduling period.

[0085] The average execution time can help the relevant technical personnel determine the processing task or request of the measured system corresponding to the model within the target time.

[0086] The maximum execution time represents the longest time required by a single task, which can help the relevant technical personnel determine the maximum delay time or the fastest response time of the measured system, thereby improving the overall performance of the system.

[0087] The minimum execution time represents the shortest time required by a single task, which can help the relevant technical personnel determine the performance of the measured system in the best case, thereby identifying factors that may cause performance degradation.

[0088] In summary, the embodiment of the present application provides a simulation scheduling method, which configures scheduling information and task information, constructs a configuration file, the scheduling information includes time slice information, task quantity information and main scheduling period information, the task information includes time slice offset information of starting running of a task, task running time slice quantity information and task period information, and performs simulation scheduling on all tasks corresponding to the configuration file by reading the configuration file. Thus, by configuring the scheduling information and the task information, the starting running time and the runnable time period of each task are determined, which helps to ensure that the tasks are executed according to the predetermined scheduling plan in the simulation environment, thereby ensuring the accuracy and reliability of the simulation.

[0089] Referring to FIG. 3, which is a schematic diagram of a simulation scheduling device provided by the embodiment of the present application. The simulation scheduling device 300 includes a file construction module 301 and a simulation scheduling module 302; the file construction module 301 is connected with the simulation scheduling module 302;

[0090] The file construction module 301 is configured to configure scheduling information and task information, and construct a configuration file, the scheduling information includes time slice information, task quantity information and main scheduling period information, the task information includes time slice offset information of starting running of a task, task running time slice quantity information and task period information.

[0091] The simulation scheduling module 302 is configured to read the configuration file, and perform simulation scheduling on all tasks corresponding to the configuration file.

[0092] Optionally, the scheduling information further includes scheduling mode information, and the device further includes a stop adjustment module; the stop adjustment module is connected with the simulation scheduling module 302.

[0093] The stop adjustment module is configured to stop the simulation scheduling if the actual running time information of a target task in the simulation scheduling process is greater than the task running time slice quantity information of the target task, or adjust the time slice offset information of starting running of an unscheduled task in all tasks.

[0094] Optionally, the scheduling mode information includes a fixed mode; the stop adjustment module is specifically configured to stop the simulation scheduling if the scheduling mode information corresponding to the configuration file is the fixed mode.

[0095] Optionally, the scheduling mode information includes an adaptive mode; the stop adjustment module is specifically configured to adjust the time slice offset information of starting running of an unscheduled task in all tasks according to a difference between the actual running time information and the task running time slice quantity information if the scheduling mode information corresponding to the configuration file is the adaptive mode.

[0096] Optionally, the simulation scheduling module 302 is specifically configured to initialize all tasks corresponding to the configuration file by reading the configuration file, and perform simulation scheduling on all tasks if all tasks have been initialized.

[0097] Optionally, the device further comprises a sequential scheduling module, and the sequential scheduling module is connected with the simulation scheduling module 302.

[0098] The sequential scheduling module is configured to perform simulation scheduling on all tasks corresponding to the second configuration file by reading the second configuration file if simulation scheduling is performed on all tasks corresponding to the first configuration file and all tasks corresponding to the first configuration file have been executed.

[0099] Optionally, the device further comprises a time recording module and a time obtaining module, and the simulation scheduling module 302, the time recording module and the time obtaining module are connected in sequence.

[0100] The time recording module is configured to record the start running time and the end running time of all tasks in the process of performing simulation scheduling on all tasks corresponding to the configuration file.

[0101] The time obtaining module is configured to obtain the average execution time, the maximum execution time and the minimum execution time of all tasks according to the start running time and the end running time.

[0102] Optionally, the time slice offset information of the start running of the task is greater than or equal to 0.

[0103] Optionally, the number information of the running time slice of the task is greater than or equal to 1 and less than or equal to the task period information.

[0104] Optionally, the task period information is less than or equal to the main scheduling period information.

[0105] In summary, the embodiment of the present application provides a simulation scheduling device, which configures scheduling information and task information, so that the start running time and the running time period of each task are determined, which helps to ensure that the task is executed according to the predetermined scheduling plan in the simulation environment, thereby ensuring the accuracy and reliability of the simulation.

[0106] Further, the embodiment of the present application further discloses an electronic device. Referring to FIG. 4, which is a structural diagram of an electronic device provided by the embodiment of the present application. It should be noted that the contents in the figure cannot be considered as any limitation on the use range of the present application. The electronic device 20 can specifically include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. The memory 22 is used for storing a computer program, the computer program is loaded and executed by the processor 21 to realize the related steps in the method disclosed by any of the preceding embodiments. In addition, the electronic device 20 in the embodiment can be an electronic computer.

[0107] In the embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited here; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited here.

[0108] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0109] The operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. The computer program 222 can further include computer programs for completing other specific work in addition to the computer programs for completing the method executed by the electronic device 20 disclosed by any of the preceding embodiments.

[0110] Further, the present application further discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to realize the method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the preceding embodiments, which will not be repeated here.

[0111] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed by the embodiment, since it corresponds to the method disclosed by the embodiment, the description is relatively simple, and the relevant part can refer to the method part.

[0112] Those skilled in the art will further appreciate that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, various components have been described above generally in terms of their functionality, without referring to the details of their implementation. Whether such functionality is implemented in hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled persons can implement the described functionality in varying ways for each particular application, but such implementation should not be interpreted as a departure from the scope of the present application.

[0113] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0114] Finally, it should be noted that the terms "first", "second", and the like, herein do not denote any order, quantity, combination, or importance, but are used to distinguish one entity or action from another, and do not imply or suggest any such actual relationship or sequence among entities or actions. Moreover, the terms "include", "contain", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article, or device. Without more limitations, an element defined by the phrase "including a" does not exclude the presence of additional identical elements in the process, method, article, or device including the element.

[0115] The above has provided a detailed introduction to the technical solutions of the present application. The principles and implementation manners of the present application are described by using specific examples. The above example descriptions are only used to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed; and in view of the above, the content of the specification should not be understood as limiting the present application.

Claims

1. A simulation scheduling method, characterized in that: The method comprises: A configuration file is constructed by configuring scheduling information and task information, wherein the scheduling information includes time slice information, task quantity information, and main scheduling cycle information; the task information includes time slice offset information for task start execution, task execution time slice quantity information, and task cycle information; By reading the configuration file, simulation scheduling is performed on all tasks corresponding to the configuration file.

2. The method according to claim 1, characterized in that The scheduling information further includes scheduling mode information, and the method further includes: If the actual running time information of the target task during the simulation scheduling process is greater than the task running time slice number information of the target task, the simulation scheduling is stopped, or the time slice offset information of the task start running of the unscheduled tasks among all the tasks is adjusted.

3. The method according to claim 2, characterized in that The scheduling mode information includes a fixed mode; and the stopping simulation scheduling includes: If the scheduling mode information corresponding to the configuration file is the fixed mode, the simulation scheduling is stopped.

4. The method according to claim 2, characterized in that The scheduling mode information includes an adaptive mode; the time slice offset information for adjusting the start of execution of the unscheduled tasks among all the tasks includes: If the scheduling mode information corresponding to the configuration file is the adaptive mode, the time slice offset information for starting the running of the unscheduled tasks among all the tasks is adjusted according to the difference between the actual running time information and the number of task running time slices.

5. The method according to claim 1, wherein The step of reading the configuration file and performing simulation scheduling on all tasks corresponding to the configuration file includes: By reading the configuration file, initializing operations on all tasks corresponding to the configuration file; If all the tasks have been initialized, simulation scheduling is performed on all the tasks.

6. The method according to claim 1, characterized in that The method further comprises: After all tasks corresponding to the first configuration file are simulated and scheduled, and all tasks corresponding to the first configuration file have been completed, the second configuration file is read to simulate and schedule all tasks corresponding to the second configuration file.

7. The method according to claim 1, characterized in that The method further comprises: During the simulation scheduling of all tasks corresponding to the configuration file, all tasks are recorded. The start and end time of the service; The average execution time, the maximum execution time, and the minimum execution time of all the tasks are obtained according to the start execution time and the end execution time.

8. The method according to any one of claims 1 to 7, characterized in that The time slice offset information of the task starting to run is greater than or equal to 0.

9. The method according to any one of claims 1 to 7, characterized in that The task running time slice quantity information is greater than or equal to 1 and less than or equal to the task cycle information.

10. The method according to any one of claims 1 to 7, characterized in that The task cycle information is less than or equal to the main scheduling cycle information.

11. A simulation scheduling device, characterized in that: The device comprises: a file construction module and a simulation scheduling module; the file construction module is connected to the simulation scheduling module; The file construction module is used to construct a configuration file by configuring scheduling information and task information, wherein the scheduling information includes time slice information, task quantity information and main scheduling cycle information, and the task information includes time slice offset information for task start execution, task execution time slice quantity information and task cycle information; The simulation scheduling module is used to perform simulation scheduling on all tasks corresponding to the configuration file by reading the configuration file.

12. The device according to claim 11, characterized in that The scheduling information also includes scheduling mode information, and the device further includes: a stop adjustment module; the stop adjustment module is connected to the simulation scheduling module; The stop adjustment module is used to stop the simulation scheduling if the actual running time information of the target task during the simulation scheduling process is greater than the task running time slice number information of the target task, or to adjust the time slice offset information of the task start running of the unscheduled tasks among all the tasks.

13. The device according to claim 11, characterized in that The device further comprises: a sequential scheduling module; the sequential scheduling module is connected to the simulation scheduling module; The sequential scheduling module is used to simulate and schedule all tasks corresponding to the first configuration file by reading the second configuration file when all tasks corresponding to the first configuration file have been completed.

14. A simulation scheduling device, characterized in that: include: memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement each step of the method according to any one of claims 1 to 9.

15. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Simulation scheduling method and device, equipment and medium

    CN118277033A

  • Task scheduling system and method and brake simulation system and method

    CN107463357A

  • Task scheduling and processing method and device, storage medium and processor

    CN110196766A

  • Task scheduling method and device based on Vxworks platform

    CN112988351A

  • Deterministic task scheduling and arranging method and system based on time triggering mechanism and storage medium

    CN115309519A