Vehicle scheduling scene determination method and device, storage medium and electronic device
By generating and simulating the input of multiple initial parameter scheduling sets, analyzing the scheduling simulation results, and determining the target parameter scheduling set, solving the problem of difficult and low efficiency in vehicle scheduling design, and achieving more efficient and accurate scheduling scenario determination.
Patent Information
- Application Number
- CN202411447551.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-11
AI Technical Summary
When dealing with vehicle scheduling design, the existing technology has problems of difficulty and low efficiency, and cannot cover all scheduling scenarios in the test phase, resulting in possible scheduling design problems being ignored.
By obtaining predefined scheduling elements, determine their corresponding multiple initial parameter scheduling sets, and generate corresponding scheduling simulation inputs. These inputs are simulated through the simulation model, the scheduling simulation results are obtained, and the target parameter scheduling set is determined by analyzing these results, and finally the vehicle scheduling scenario is determined based on this set.
This method can take into account various possible situations more comprehensively, cover all vehicle scheduling scenarios, improve the efficiency and accuracy of scheduling design, reduce the need for testing and verification, and save manpower and material resources.
Smart Images

Figure CN119415231A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and more specifically, to a method and device for determining a vehicle scheduling scenario, a storage medium, and an electronic device. Background Art
[0002] Embedded operating systems (such as CP AUTOSAR OS (real-time operating system)) are widely used in the automotive field and generally have hard real-time time requirements, that is, users expect that a certain function or task must be executed within a specified time, otherwise serious consequences will occur.
[0003] In the related art, for CP AUTOSAR OS, users often rely on experience when designing scheduling. After the executable file is generated, they can perform testing and verification to discover possible scheduling design problems and make modifications.
[0004] However, automotive electronic controllers widely use multi-core MCUs (Microcontroller Units), which makes scheduling design more difficult for users. During the testing phase, a large number of scheduling design adjustments may be required to meet functional requirements. Due to the complexity of scheduling scenarios, it is often not possible to cover all scheduling scenarios during the testing phase, thus ignoring possible scheduling design issues.
[0005] Regarding the related technologies, there are problems such as great difficulty and low efficiency in dealing with scheduling design issues, and no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present application provide a method and device for determining a vehicle scheduling scenario, a storage medium, and an electronic device to at least solve the problems of great difficulty and low efficiency in processing scheduling design problems.
[0007] According to one aspect of an embodiment of the present application, a method for determining a vehicle scheduling scenario is provided, comprising: obtaining predefined scheduling elements, and determining a plurality of initial parameter scheduling sets corresponding to the scheduling elements; for the plurality of initial parameter scheduling sets, generating scheduling simulation inputs corresponding to the plurality of initial parameter scheduling sets; determining a scheduling simulation result corresponding to each of the scheduling simulation inputs; analyzing each of the scheduling simulation results, determining a target parameter scheduling set according to the analysis results, and determining a vehicle scheduling scenario based on the target parameter scheduling set.
[0008] In an exemplary embodiment, the scheduling elements include tasks and interrupts; the determining of multiple initial parameter scheduling sets corresponding to the scheduling elements includes: setting scheduling parameters of the tasks and the interrupts based on attribute information of the tasks and the interrupts, and obtaining multiple initial parameter scheduling sets corresponding to the tasks and the interrupts, wherein different initial parameter scheduling sets correspond to different scheduling parameters of the tasks and the interrupts.
[0009] In an exemplary embodiment, for the multiple initial parameter scheduling sets, generating scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets includes: for any initial parameter scheduling set, the following steps are used to generate the scheduling simulation input corresponding to the initial parameter scheduling set: obtaining the time parameters of the scheduling element corresponding to the initial parameter scheduling set; the time parameters include the optimal execution time, the worst execution time and the activation time deviation; respectively determining the probability distribution of the optimal execution time, the worst execution time and the activation time deviation, and obtaining the activation time and net execution time of the scheduling element based on the probability distribution; determining the activation time and net execution time of the scheduling element as the scheduling simulation input corresponding to the initial parameter scheduling set.
[0010] In an exemplary embodiment, the scheduling simulation input includes the activation time and net execution time of the scheduling elements; the determining of the scheduling simulation results corresponding to each of the scheduling simulation inputs includes: performing event conversion based on the activation time and net execution time of each of the scheduling elements to obtain activation events and termination events respectively associated with each of the scheduling elements; wherein the activation event refers to an event generated when the scheduling element is activated; the termination event refers to an event generated when the scheduling element is executed; based on the activation event minimum heap corresponding to the activation event and the termination event minimum heap corresponding to the termination event, selecting a target event from the activation event and the termination event and inputting it into a state machine; the state machine processes the target event to obtain a processing result, updates the activation event minimum heap and the termination event minimum heap according to the processing result, and returns to the step of selecting a target event from the activation event and the termination event and inputting it into the state machine based on the activation event minimum heap and the termination event minimum heap, and continues to execute until the simulation end condition is met, and the scheduling simulation results corresponding to each of the scheduling simulation inputs are determined.
[0011] In an exemplary embodiment, the step of establishing the activation event minimum heap includes: for each of the scheduling elements, establishing a corresponding activation event queue according to the activation time and activation times of the scheduling element; from the activation event queue corresponding to each of the scheduling elements, selecting a time element that meets the time condition as a heap building element to construct the activation event minimum heap. In an exemplary embodiment, the step of establishing the termination event minimum heap includes: constructing the termination event minimum heap based on the completion time of the activation event as a heap building element.
[0012] In an exemplary embodiment, based on the activation event minimum heap and the termination event minimum heap, the target event is selected from the activation event and the termination event and input into the state machine, including: extracting the first time information of the root node of the activation event minimum heap, extracting the second time information of the root node of the termination event minimum heap; comparing the first time information with the second time information, and selecting the target event from the activation event and the termination event based on the comparison result and inputting it into the state machine.
[0013] In an exemplary embodiment, the state machine processes the target event to obtain a processing result, including: determining whether a state transition occurs in the state machine based on the target event; if a state transition does not occur in the state machine, determining an event thread associated with the target event, and running the event thread state machine of the event thread to obtain a processing result until a simulation end condition is met, and determining a scheduling simulation result corresponding to each scheduling simulation input based on the processing result.
[0014] In an exemplary embodiment, the method also includes: when a state transition occurs in the state machine, determining a ready thread whose priority satisfies a priority condition, and running the ready thread state machine corresponding to the ready thread to obtain processing results until the simulation end condition is met, and determining the scheduling simulation results corresponding to each scheduling simulation input based on the processing results.
[0015] In an exemplary embodiment, the analyzing each of the scheduling simulation results and determining the target parameter scheduling set according to the analysis results include: analyzing each of the scheduling simulation results to determine the evaluation results corresponding to each of the scheduling simulation results; determining the initial parameter scheduling set associated with the evaluation results that meet the preset indicator conditions as the intermediate parameter scheduling set; updating the intermediate parameter scheduling set, generating a new scheduling simulation input based on the updated intermediate parameter scheduling set, and returning to the step of determining the scheduling simulation results corresponding to each of the scheduling simulation inputs based on the new scheduling simulation input, and continuing to execute until the iteration end condition is met and the target parameter scheduling set is determined.
[0016] In an exemplary embodiment, the analysis of each of the scheduling simulation results to determine the evaluation results corresponding to each of the scheduling simulation results includes: the analysis steps for any scheduling simulation result are as follows: determining the actual processor load and the actual task response time of the scheduling simulation result during the simulation process; obtaining a load score based on the target processor load and the actual processor load; obtaining a time score based on the target task response time and the actual task response time; and weighting according to the set weight value, the load score and the time score to determine the evaluation result corresponding to the scheduling simulation result.
[0017] According to another aspect of an embodiment of the present application, a device for determining a vehicle scheduling scenario is also provided, including: an acquisition module, used to acquire predefined scheduling elements and determine multiple initial parameter scheduling sets corresponding to the scheduling elements; a processing module, used to generate scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets for the multiple initial parameter scheduling sets; a simulation module, used to determine scheduling simulation results corresponding to each of the scheduling simulation inputs; a determination module, used to analyze each of the scheduling simulation results, determine a target parameter scheduling set according to the analysis results, and determine a vehicle scheduling scenario based on the target parameter scheduling set.
[0018] According to another aspect of the embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for determining the vehicle scheduling scenario when running.
[0019] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for determining the vehicle scheduling scenario through the computer program.
[0020] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0021] In an embodiment of the present application, a predefined scheduling element is obtained, and a plurality of initial parameter scheduling sets corresponding to the scheduling element are determined, so that for each initial parameter scheduling set, a scheduling simulation input is generated respectively, and then the scheduling simulation result of each scheduling simulation input is determined, and the scheduling simulation result is analyzed, and the target parameter scheduling set is determined according to the analysis result, and the vehicle scheduling scenario is determined based on the target parameter scheduling set. In the process of determining the vehicle scheduling scenario, by analyzing the predefined scheduling elements and generating the corresponding plurality of initial parameter schedulings, various possible situations can be considered more comprehensively to cover all vehicle scheduling scenarios as much as possible, and the scheduling simulation results corresponding to each scheduling simulation input are determined by simulation, so that the actual situation can be better simulated in the scheduling design stage, and a more accurate reference is provided for the subsequent determination of the final vehicle scheduling scenario, without the need for test verification, saving manpower and material resources, and improving the efficiency of determining the vehicle scheduling scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 is a hardware environment schematic diagram of an optional method for determining a vehicle scheduling scenario according to an embodiment of the present application;
[0025] Figure 2 is a flowchart of an optional method for determining a vehicle dispatching scenario according to an embodiment of the present application;
[0026] Figure 3 is a flowchart of an optional method for determining a vehicle scheduling scenario according to an embodiment of the present application;
[0027] Figure 4 is an optional scheduling input schematic diagram according to an embodiment of the present application;
[0028] Figure 5 is a schematic diagram of an optional event conversion according to an embodiment of the present application;
[0029] Figure 6 is a flowchart of an optional event processing according to an embodiment of the present application;
[0030] Figure 7is a schematic diagram of an optional event processing result according to an embodiment of the present application;
[0031] Figure 8 is a flowchart of an optional method for determining a vehicle scheduling scenario according to an embodiment of the present application;
[0032] Fig. 9 is a schematic diagram of a process for determining a target event according to an embodiment of the present application;
[0033] Fig.10 is a schematic diagram of a process of updating a minimum heap according to an embodiment of the present application;
[0034] Fig.11 is a schematic diagram of a process for determining a target event according to another embodiment of the present application;
[0035] Fig.12 is a schematic diagram of event changes according to an embodiment of the present application;
[0036] Fig.13 is a schematic diagram of the structure of a state machine according to an embodiment of the present application;
[0037] Fig.14 is a flowchart of an optional method for determining a vehicle scheduling scenario according to an embodiment of the present application;
[0038] Fig.15 is an optional scheduling process diagram according to an embodiment of the present application;
[0039] Fig.16 is a schematic diagram of an optional initial parameter scheduling set according to an embodiment of the present application;
[0040] Fig.17 It is a structural block diagram of an optional device for determining a vehicle scheduling scenario according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal for determining a vehicle dispatching scenario according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a microprocessor (Microprocessor Unit, referred to as MPU) or a programmable logic device (Programmable logic device, referred to as PLD)) and a memory 104 for storing data. In an exemplary embodiment, the computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.
[0044] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the vehicle scheduling scenario in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0045] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0046] In this embodiment, a method for determining a vehicle dispatching scenario is provided, which is applied to the above-mentioned computer terminal. Figure 2 : is a flowchart of an optional method for determining a vehicle scheduling scenario according to an embodiment of the present application, the process includes the following steps S202-S208:
[0047] Step S202: obtaining predefined scheduling elements, and determining a plurality of initial parameter scheduling sets corresponding to the scheduling elements.
[0048] Among them, scheduling elements refer to the basic elements in the scheduling design process, such as tasks, interrupts, and the triggering mechanism of tasks and interrupts (such as triggering at initialization, triggering at a certain period), etc. The initial parameter scheduling set is the initial set generated for scheduling design of tasks, interrupts, etc., which can specifically include setting the priority, preemption attributes, and cores of interrupts and tasks.
[0049] In some embodiments, the scheduling elements may be generated by a user based on a user terminal. For example, the user may import the scheduling elements into a computer terminal through a GUI (Graphical User Interface) based on the user terminal, and the computer terminal may determine a plurality of initial parameter scheduling sets corresponding to the scheduling elements.
[0050] In an exemplary embodiment, the scheduling elements include tasks and interrupts; the determining of multiple initial parameter scheduling sets corresponding to the scheduling elements includes: setting scheduling parameters of the tasks and the interrupts based on attribute information of the tasks and the interrupts, and obtaining multiple initial parameter scheduling sets corresponding to the tasks and the interrupts, wherein different initial parameter scheduling sets correspond to different scheduling parameters of the tasks and the interrupts.
[0051] Among them, attribute information refers to data or information used to define the characteristics, properties or features of tasks and interrupts. Scheduling parameters may include the priority, preemption attributes and cores of tasks and interrupts. For each initial parameter scheduling set, each task and interrupt is set with its own scheduling parameters. For two different initial parameter scheduling sets, the scheduling parameters of the same task and interrupt may be different. Of course, the difference here may be completely different or partially different. For example, for task A, its core in initial parameter scheduling set 1 is core 1, and its priority is greater than that of task B; in initial parameter scheduling set 2, for task A, its core in initial parameter scheduling set 2 is core 2, and its priority is less than that of task B. For another example, for task C, its core in initial parameter scheduling set 1 is core 1; in initial parameter scheduling set 2, for task C, its core in initial parameter scheduling set 2 is still core 1, but the preemption attributes and priority are different from those in the initial parameter scheduling set.
[0052] Optionally, when generating the initial parameter scheduling set, the computer terminal can directly generate a certain number of initial scheduling parameter sets (such as 10) according to some commonly used scheduling algorithms and random configurations, including priority, preemption attribute, core, etc. For example, according to EDF (Earliest Deadline First, a scheduling algorithm), the priority of the task is set according to the period of the task, and the shorter the period, the higher the priority.
[0053] Optionally, the computer terminal may also set the same priority for the tasks according to a round robin scheduling algorithm.
[0054] In this embodiment, by determining a plurality of initial scheduling parameter sets corresponding to the scheduling elements, a variety of possible vehicle initial scheduling scenarios can be covered, and then the final required vehicle scheduling scenario can be determined from the vehicle initial scheduling scenario.
[0055] Step S204: for the multiple initial parameter scheduling sets, generate scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets.
[0056] Among them, the scheduling simulation input refers to the input of the simulation model. The scheduling simulation input can be determined by the tasks and interrupts involved in the scheduling design, such as determined according to the time information of the tasks and interrupts. The time information can specifically refer to the optimal execution time BCET and the worst execution time WCET of the tasks and interrupts, and the time deviation Jitter (cycle * percentage) of the activation of the tasks and interrupts. BCET refers to the shortest time required to complete a task or interrupt; WCET refers to the longest time required to complete a task or interrupt; Jitter refers to the fluctuation range of the activation time of the tasks and interrupts during the execution process. Taking the task as an example, in a real-time system, the activation time of the task refers to the time point when the task starts to execute, the net execution time of the task refers to the actual time required to complete a task, and Jitter indicates the uncertainty or volatility of the activation time of the task. Through the combination of the probability distribution of BCET and WCET, such as the normal distribution and the probability distribution of the activation time deviation Jitter, the activation time and net execution time of the tasks and interrupts can be generated. These activation times and net execution times constitute the input of the scheduling scenario, that is, the scheduling simulation input. Through the probability distribution, the arrival and execution of tasks and interrupts in the actual system are simulated. Probability distribution can provide randomness for the time required for task and interrupt arrival and execution, making subsequent simulation more realistic and reliable.
[0057] In some embodiments, the determination of the activation time and net execution time of a task is taken as an example for explanation. According to the probability distribution of the BCET and WCET of the task, the value range of these two parameters is simulated using a normal distribution, for example. Assume that the BCET and WCET of the task obey the normal distribution N(μ1, σ1) and N(μ2, σ2), respectively, where μ1 and μ2 are the means of BCET and WCET, respectively, and σ1 and σ2 are standard deviations. According to the probability distribution of the activation time deviation Jitter, another probability distribution can be used to simulate the value range of this parameter. Assume that the activation time deviation Jitter obeys a known probability distribution P(x), where x is the value of Jitter. Combining the probability distribution of the BCET and WCET of the task and the activation time deviation Jitter, the activation time and net execution time of the task can be generated. The specific steps are as follows: First, randomly extract a value from the normal distribution of BCET and WCET to obtain the execution time of the task. Then randomly extract a value from the probability distribution of Jitter to obtain the activation time deviation. Finally, based on the execution time and activation time deviation of the task, the activation time and net execution time of the task are obtained. Repeating the above steps can generate multiple sets of task activation time and net execution time, thereby simulating the activation time and net execution time distribution of the entire task set.
[0058] It is understandable that when determining the activation time and net execution time of an interrupt, the same method as determining the activation time and net execution time of a task can be adopted, and this application will not elaborate on this.
[0059] It is understandable that for each initial parameter scheduling set, simulation will be carried out to obtain the simulation results corresponding to each initial parameter scheduling set. Through the simulation results, the required target parameter scheduling set can be selected to determine the vehicle scheduling scenario.
[0060] In an exemplary embodiment, for the multiple initial parameter scheduling sets, generating scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets includes: for any initial parameter scheduling set, the following steps are used to generate the scheduling simulation input corresponding to the initial parameter scheduling set: obtaining the time parameters of the scheduling element corresponding to the initial parameter scheduling set; the time parameters include the optimal execution time, the worst execution time and the activation time deviation; respectively determining the probability distribution of the optimal execution time, the worst execution time and the activation time deviation, and according to the probability distribution, obtaining the activation time and net execution time of the scheduling element; determining the activation time and net execution time of the scheduling element as the scheduling simulation input corresponding to the initial parameter scheduling set.
[0061] It should be noted that for any initial parameter scheduling set, the corresponding scheduling simulation input is generated. The time parameters of the scheduling elements are the optimal execution time, the worst execution time and the activation time deviation of the task and interrupt. The activation time and net execution time of the task and interrupt can be generated through the combination of the optimal execution time, the worst execution time and the activation time deviation probability distribution.
[0062] Step S206: Determine the scheduling simulation results corresponding to each of the scheduling simulation inputs.
[0063] The scheduling simulation result is the result obtained by the simulation model based on the scheduling simulation input. The simulation model can be a finite state machine model. The generated scheduling simulation is input into the finite machine state model, and the finite machine state model simulates the scheduling simulation input, and then records the simulation results. The simulation results may include the actual processing of tasks and interrupts. The initial parameter scheduling set is optimized by comparing the actual processing of tasks and interrupts with the expected processing.
[0064] Step S208: Analyze each of the scheduling simulation results, determine a target parameter scheduling set according to the analysis results, and determine a vehicle scheduling scenario based on the target parameter scheduling set.
[0065] It can be understood that analyzing each scheduling simulation result can specifically be a process of analyzing and processing the data obtained from the simulation, and then determining the index information such as system resource utilization and task completion time. Through the determined index information, the target parameter scheduling set that meets the scheduling design requirements is obtained, and based on the target parameter scheduling set, the vehicle scheduling scenario is determined.
[0066] In an exemplary embodiment, the analyzing each of the scheduling simulation results and determining the target parameter scheduling set according to the analysis results include: analyzing each of the scheduling simulation results to determine the evaluation results corresponding to each of the scheduling simulation results; determining the initial parameter scheduling set associated with the evaluation results that meet the preset indicator conditions as the intermediate parameter scheduling set; updating the intermediate parameter scheduling set, generating a new scheduling simulation input based on the updated intermediate parameter scheduling set, and returning to the step of determining the scheduling simulation results corresponding to each of the scheduling simulation inputs based on the new scheduling simulation input, and continuing to execute until the iteration end condition is met and the target parameter scheduling set is determined.
[0067] The evaluation result is obtained by analyzing the evaluation indicators of the scheduling simulation result. The evaluation indicators may include CPU (Central Processing Unit) load, task response time, etc.
[0068] The preset indicator condition is set to determine whether the calculated evaluation result meets the set indicator condition. When the evaluation result meets the preset indicator condition, the scheduling simulation result corresponding to the evaluation result that meets the preset indicator condition is determined. The initial parameter scheduling set corresponding to the scheduling simulation result meets the scheduling design requirements. The initial parameter scheduling set can be determined as the intermediate parameter scheduling set, and then iterative processing is performed based on the intermediate parameter scheduling set to determine the target parameter scheduling set. According to the tasks in the target parameter scheduling set, the priority of the interrupt, the core to which it belongs, the preemption attribute, etc., a vehicle scheduling scenario is generated.
[0069] The iteration end condition is a condition set to determine whether to end the step of determining the scheduling simulation results corresponding to each scheduling simulation input based on the new scheduling simulation input and continue to execute. The iteration end condition can be set according to the iteration number threshold. When the iteration number reaches the iteration number threshold, it is determined that the iteration end condition is met; the iteration end condition can also be determined according to the scheduling simulation result. When the evaluation result of the scheduling simulation result meets the user's requirements or user selection, it stops.
[0070] In some embodiments, the evaluation result may specifically be a score of an evaluation index of a scheduling simulation result. When determining an evaluation result that satisfies a preset index condition, the evaluation result with the highest score may be determined as an evaluation result that satisfies a preset index condition. Optionally, the evaluation result with the highest score or a certain proportion of the scores, such as the evaluation result with the highest score, may be determined as an evaluation result that satisfies a preset index condition, and the embodiment of the present application is not limited thereto.
[0071] In some embodiments, when multiple intermediate parameter scheduling sets are determined, when multiple intermediate parameter scheduling sets are updated, a certain proportion of parameters in the multiple intermediate parameter scheduling sets can be cross-linked and mutated to generate a new parameter set. For example, for cross-linking processing, 20% of the parameters of two intermediate parameter scheduling sets can be exchanged at a ratio of 20% to generate an updated intermediate parameter scheduling set. For another example, for mutation processing, 5% of the parameter values in the intermediate parameter scheduling set or the new intermediate parameter scheduling set generated by cross-linking can be randomly modified at a ratio of 5% to generate a new intermediate parameter scheduling set. Repeat the cross-linking and mutation of multiple intermediate parameter scheduling sets until the new intermediate parameter scheduling set obtained reaches the scale of the next round of simulation, such as 10, and generate a new scheduling simulation input based on the updated intermediate parameter scheduling set. By updating the intermediate parameter scheduling set to obtain the updated intermediate parameter scheduling set, the diversity of the parameter scheduling set can be increased, and the intermediate parameter scheduling set can be further optimized through cross-linking and mutation, so that subsequent simulations are more effective and efficient. Avoid falling into a local optimal solution and improve the global search capability of the algorithm.
[0072] Optionally, the number of target parameter scheduling sets that meet the scheduling design requirements finally determined by the computer terminal can be multiple. Based on the generated multiple target parameter scheduling sets, vehicle scheduling scenarios corresponding to the multiple target parameter scheduling sets can be generated to ensure the reliability of the scheduling design.
[0073] In the above embodiment, the computer terminal analyzes the scheduling simulation results to determine the evaluation results corresponding to the scheduling simulation results, further determines the intermediate parameter scheduling set, and carries out iterative processing according to the intermediate parameter scheduling set until the target parameter scheduling set is determined, so that a large number of vehicle scheduling scenarios can be generated through the target parameter scheduling set to ensure the reliability of the scheduling design.
[0074] In an exemplary embodiment, each of the scheduling simulation results is analyzed to determine an evaluation result corresponding to each of the scheduling simulation results, including: the analysis steps for any scheduling simulation result are as follows: determine the actual processor load and the actual task response time of the scheduling simulation result during the simulation process; obtain a load score based on the target processor load and the actual processor load; obtain a time score based on the target task response time and the actual task response time; and weight them according to a set weight value, the load score and the time score to determine the evaluation result corresponding to the scheduling simulation result.
[0075] It should be noted that the actual processor load is the CPU load determined based on the scheduling simulation results, and the actual task response time is the response time determined based on the scheduling simulation results. Among them, the processor load and task response time can intuitively reflect the processing performance of the processor. Therefore, by using the processor load and task response time to calculate the evaluation results, the processing capacity of the processor under the set initial parameter scheduling set can be clarified, and the initial parameter scheduling set can be optimized. Refer to Table 1, which is the scheduling simulation result obtained by simulating the scheduling simulation input:
[0076] Table 1
[0077]
[0078] Among them, time refers to the activation time of the task, ET refers to the net execution time of the task, event thread refers to the thread used to respond to input events, and running thread refers to the thread used to execute task logic. Among them, event thread = running thread, which means that a thread starts running and the previous thread is interrupted; running thread = Idle (referring to idle) or has a lower priority than event thread, which means that the event thread ends running and the interrupted thread (including Idle) continues running.
[0079] Specifically, the computer terminal can calculate data such as actual processor load and task response time based on the scheduling simulation results. For the actual processor load, the computer terminal can perform subtraction operations on all two moments that were Idle at the previous moment and non-Idle at the next moment within the analysis interval length based on the scheduling simulation results, and add up all the subtraction operation results as the accumulated Idle time, that is, Sum_Idle; actual processor load = 1-(Sum_Idle / analysis interval length). For the task response time, the computer terminal can traverse and search for the trigger event of Task 1 (ET>0) based on the scheduling simulation results, and record the time as t1; the computer terminal can find the time greater than or equal to the trigger event time, and the next running thread is the time t2 of Task 1, and calculate t2-t1 to represent the response time from the activation of Task 1 to the running.
[0080] In some embodiments, the computer terminal can determine the load difference between the target processor load and the actual processor load based on the target processor load and the actual processor load, and determine the load score according to the load difference. When calculating the load difference, the actual processor load can be subtracted from the target processor load. When the load difference is positive, it means that the target processor load is higher than the actual processor load, and when the load difference is negative, it means that the target processor load is lower than the actual processor load, wherein the load score when the load difference is positive is higher than the load score when the load difference is negative, and the larger the load difference is numerically, the higher the load score. That is to say, when the actual processor load is relatively less than the target processor load, it means that when the initial parameter scheduling set corresponding to the actual processor load is simulated, the processor resources are relatively abundant, and the vehicle scheduling scene corresponding to the actual processor load is subsequently applied in the embedded system of the vehicle, which helps to improve the stability and reliability of the system. When the actual processor load is relatively greater than the target processor load, it means that when the initial parameter scheduling set corresponding to the actual processor load is simulated, the processor resources are relatively tight and in a state of being heavily occupied. The vehicle scheduling scene corresponding to the actual processor load is subsequently applied in the embedded system of the vehicle, which will increase the risk of system collapse or instability.
[0081] In other embodiments, the computer terminal can determine the time difference between the target task response time and the actual task response time based on the target task response time and the actual task response time, and determine the time score according to the time difference. When calculating the time difference, the actual task response time can be subtracted from the target task response time. When the time difference is positive, it means that the target task response time is higher than the actual task response time. When the time difference is negative, it means that the target task response time is lower than the actual task response time. The time score when the time difference is positive is higher than the time score when the time difference is negative, and the larger the time difference is numerically, the higher the time score. In other words, when the actual task response time is relatively less than the target task response time, it means that when the initial parameter scheduling set corresponding to the actual task response time is simulated, the task response speed is relatively fast. The vehicle scheduling scenario corresponding to the actual task response time is subsequently applied to the embedded system of the vehicle, which helps to improve the processing performance of the system. When the actual task response time is relatively greater than the target task response time, it means that the processor response time is long when simulating the initial parameter scheduling set corresponding to the actual task response time. The subsequent application of the vehicle scheduling scenario corresponding to the actual processor load in the vehicle's embedded system will increase the risk of system crash or instability.
[0082] In some embodiments, the weight value may include a load weight of the actual processor load and a response time weight of the actual task response time. The load weight and the response time weight may be the same or different. Specifically, the weight may be adaptively set based on the importance of the processor load, the task response time to the vehicle dispatching scenario, or the evaluation index preferred by the user, and the embodiments of the present application are not limited thereto.
[0083] In a specific application, the computer terminal can determine the evaluation result corresponding to the scheduling simulation result based on the product of the load weight and the load score, and the sum of the product of the response time weight and the time score. Specifically, by weighting the set weight value, load score and time score, the total score of the scheduling simulation result can be obtained. The higher the total score, the more the initial parameter scheduling set corresponding to the scheduling simulation result meets the scheduling design requirements; the lower the total score, the larger the gap between the initial parameter scheduling set corresponding to the scheduling simulation result and the scheduling design requirements; when selecting the intermediate parameter scheduling set later, the initial parameter scheduling set with a high total score can be selected as the intermediate parameter scheduling set based on the total score.
[0084] In the above embodiment, by determining the evaluation index and determining the evaluation result corresponding to the scheduling simulation result based on the evaluation index, it is possible to accurately judge whether the scheduling simulation result meets the scheduling design requirements, thereby improving the reliability of the vehicle scheduling scenario design.
[0085] In the above steps, predefined scheduling elements are obtained, and multiple initial parameter scheduling sets corresponding to the scheduling elements are determined, so that scheduling simulation inputs are generated for each initial parameter scheduling set, and then the scheduling simulation results of each scheduling simulation input are determined, and the scheduling simulation results are analyzed, and the target parameter scheduling set is determined according to the analysis results, and the vehicle scheduling scenario is determined based on the target parameter scheduling set. In the process of determining the vehicle scheduling scenario, by analyzing the predefined scheduling elements and generating the corresponding multiple initial parameter scheduling, various possible situations can be considered more comprehensively to cover all vehicle scheduling scenarios as much as possible, and the scheduling simulation results corresponding to each scheduling simulation input are determined by simulation, so that the actual situation can be better simulated in the scheduling design stage, and a more accurate reference is provided for the subsequent determination of the final vehicle scheduling scenario, without the need for test verification, saving manpower and material resources, and improving the efficiency of determining the vehicle scheduling scenario. .
[0086] In an exemplary embodiment, the scheduling simulation input includes the activation time and net execution time of the scheduling elements; the determining of the scheduling simulation results corresponding to each of the scheduling simulation inputs includes: performing event conversion based on the activation time and net execution time of each of the scheduling elements to obtain activation events and termination events respectively associated with each of the scheduling elements; wherein the activation event refers to an event generated when the scheduling element is activated; the termination event refers to an event generated when the scheduling element is executed; based on the activation event minimum heap corresponding to the activation event and the termination event minimum heap corresponding to the termination event, selecting a target event from the activation event and the termination event and inputting it into a state machine; the state machine processes the target event to obtain a processing result, updates the activation event minimum heap and the termination event minimum heap according to the processing result, and returns to the step of selecting a target event from the activation event and the termination event and inputting it into the state machine based on the activation event minimum heap and the termination event minimum heap, and continues to execute until the simulation end condition is met, and the scheduling simulation results corresponding to each of the scheduling simulation inputs are determined.
[0087] It should be noted that scheduling elements include tasks and interrupts. Event conversion refers to converting the activation time and net execution time of tasks and interrupts into events, that is, converting them into activation events and termination events. Then, the activation events and termination events can be input into the state machine model for combination, and the state machine model can be used for simulation to obtain the scheduling simulation results.
[0088] The computer terminal can convert the activation time and net execution time of a task or interrupt into two events by performing event conversion on the activation time and net execution time. One is the activation event, which is generated at the activation time of a task or interrupt, indicating the activation of a task or an interrupt. The other is the termination event, which is generated when the activation time of a task or interrupt is added to the net execution time, indicating the completion of a task or an interrupt. The time of this event can be postponed due to preemption or interruption, etc. Whether it is postponed depends on its priority relationship with the running task or interrupt prompted by the state machine.
[0089] In some embodiments, the computer terminal can establish two minimum heaps according to the time, the activation event minimum heap and the termination event minimum heap. It is understandable that the minimum heap is a complete binary tree structure. In this complete binary tree structure, the value of its root node is the minimum value in the entire heap. When building a heap, the computer terminal can be established according to the characteristics that the root node of the minimum heap is always earlier than the leaf node time on the left and right sides, that is, the time of the root node is more forward (such as the time of the root node is 0.1s, and the leaf node time on the left and right sides must be later than 0.1s). In the present embodiment, in the process of establishing the activation event minimum heap, the activation time of the task and the interruption is used as the heap element to expand and establish, that is, the value in each node in the activation event minimum heap is the activation time. And when establishing the termination event minimum heap, the completion time of the task and the interruption is used as the heap element to expand and establish, that is, the value in each node in the termination event minimum heap is the completion time. Because the heap is built before the simulation, the task or interruption is not executed, and thus the element in the termination event minimum heap is empty at the beginning. When selecting the target event later, the value of the root node in the activation event minimum heap can be compared with the value of the root node in the termination event minimum heap, and the target event can be determined based on the smaller value between the two. For example, if the smaller value between the two is the time in the activation event minimum heap, then the determined target event is the activation event, and the activation event is an event composed of the activation time in the selected activation event minimum heap and the tasks associated with the activation time.
[0090] In some embodiments, after the target event is input into the state machine, the state machine can process the target event. During processing, the type of the target event can be determined, for example, whether the target event is a termination event or an activation event. If it is a termination event, the input termination event can be deleted, that is, the root node of the termination event stack can be deleted, and the two leaf nodes can be compared to determine the time of the two leaf nodes, and the one with the smaller time can be selected as the new root node.
[0091] In other embodiments, if the target event input to the state machine is an activation event, then the priority of the activation event can be judged, such as the task or interrupt corresponding to the activation event because of lower priority, not executed, in the state of waiting for execution, once executed, then a new termination event of this task or interrupt is generated to replace the original termination event, and then the new termination event is inserted into the termination event minimum heap. In the termination event minimum heap, this new termination event needs to be based on the net execution time, and the time difference of the next termination event of the current running event is added additionally. Simultaneously, the activation event minimum heap also can be updated, specifically the first element of the activation event queue is moved backward, and the first element specifically can refer to the time element selected as the root node in the activation event minimum heap, in the activation event queue, the first element is moved backward and refers to the first element being moved to the tail of the activation event queue, and the new activation event is inserted into the activation event minimum heap (comparing two leaf nodes, selecting the smaller one as the root node). Specifically, a new time element can be selected from the activation event queue, such as a new activation event is generated based on the previous time element of the tail of the activation event queue, wherein, the tail here is the tail of the activation event queue. After a new activation event is generated, it is necessary to compare the termination time of the root node with the activation time of the corresponding termination event. If the termination time > activation time, it means that the number of activations is too many. The net execution time of the activation event should be set to -1 to indicate an error. The termination time is obtained by accumulating the time of multiple activations.
[0092] In other embodiments, if the event currently input is an activation event, the corresponding task or interrupt is executed because of a higher priority, and a new termination event of the task or interrupt is generated to replace the original termination event in the termination event minimum heap, wherein the new termination event refers to the termination event generated after the task or interrupt corresponding to the activation event is input to the state machine. The new termination event is then inserted into the termination event minimum heap (replaced to the minimum heap root, then the root node is compared with the two leaf nodes, if the root node is the smallest, no position change is required, otherwise the position is exchanged with the smaller leaf node, and it continues until no position change is required), sinking to the correct position. At the same time, the input activation event queue head element is moved backward, and the new activation event is inserted into the activation event minimum heap (comparing the two leaf nodes, selecting the smaller one as the root node). Then a new activation event is generated based on the previous element of the tail. The new activation event generation also needs to compare the termination time of the root node at this time with the activation time of the corresponding termination event. If the termination time>activation time, it means that the number of activations is too many, and the net execution time of the activation event should be set to -1 to indicate that an error has occurred.
[0093] In an exemplary embodiment, the step of establishing the minimum heap of activation events includes: for each of the scheduling elements, establishing a corresponding activation event queue according to the activation time and activation times of the scheduling element; from the activation event queue corresponding to each of the scheduling elements, selecting the time element that meets the time condition as the heap building element to construct the minimum heap of activation events.
[0094] It should be noted that the time element that meets the time condition is the first element in the activation event queue. The elements in the activation event queue can be sorted by time. The earlier the activation time, the earlier the position of the element in the activation event queue. When the computer terminal establishes the activation event minimum heap, it can extract the first element from the activation event queue corresponding to each scheduling element. The method of building the heap is to continuously insert new elements from an empty minimum heap (insert into the root of the minimum heap, and then compare the root node with the two leaf nodes. If the root node is the smallest, there is no need to change the position. Otherwise, it exchanges the position with the smaller leaf node, and continues until there is no need to change the position).
[0095] In some embodiments, the initial activation event queue can be filled for each task and interrupt, and each task and interrupt also has an initial termination time that is temporarily empty. The size of the activation event queue can be the minimum queue size of the activation feature that can be accommodated + 1. Taking CP AUTOSAR OS as an example, if the maximum number of activations that a task can be placed in the queue waiting for execution is 2, then the size of the queue should be 3. The three elements of the queue represent the time of three activations respectively, and the purpose of the last element (tail element) is to serve as a time basis to generate the third activation time, and to serve as a sentinel to detect whether the number of activations exceeds the limit of 2.
[0096] In an exemplary embodiment, the step of establishing the minimum heap of termination events includes: constructing the minimum heap of termination events based on the completion time of the activation event as a heap building element.
[0097] It should be noted that each node of the termination event minimum heap is the completion time of the activation event of the activation time queue. The computer device can determine the completion time of each activation event and update the elements in the termination event minimum heap according to the completion time of the activation event. When no activation event is executed to completion, the elements in the termination event minimum heap are empty.
[0098] In an exemplary embodiment, based on the activation event minimum heap and the termination event minimum heap, the target event is selected from the activation event and the termination event and input into the state machine, including: extracting the first time information of the root node of the activation event minimum heap, extracting the second time information of the root node of the termination event minimum heap; comparing the first time information with the second time information, and selecting the target event from the activation event and the termination event based on the comparison result and inputting it into the state machine.
[0099] It should be noted that when the computer terminal selects the target event to input into the finite state machine, the first time information is the information of the time when the root node of the activation event minimum heap and the termination event minimum heap are compared. The second time information is the information of the time when the root node of the termination event minimum heap is recorded. The smaller time between the two is determined, and the event corresponding to the smaller time is used as the target event, and the target event is input into the state machine. By using the event corresponding to the smaller time as the target event, that is, selecting the target event in sequence according to the activation time of the task and interrupt and inputting it into the state machine, it is ensured that the tasks and interrupts can be processed in sequence, thereby improving the reliability of the simulation process.
[0100] In an exemplary embodiment, the state machine processes the target event to obtain a processing result, including: determining whether a state transition occurs in the state machine based on the target event; if a state transition does not occur in the state machine, determining an event thread associated with the target event, and running the event thread state machine of the event thread to obtain a processing result until a simulation end condition is met, and determining a scheduling simulation result corresponding to each scheduling simulation input based on the processing result.
[0101] It should be noted that during the operation of the state machine model, the current thread state machine is first run according to the input target event. The running result may or may not result in state transfer. If state transfer does not occur, the state machine of the thread associated with the input target event should be run. After each state machine is completed, the running thread and the ready thread should be updated according to the state transfer. After the update is completed, the current running thread is added to the input event and recorded. The above steps are executed repeatedly until the simulation end condition is met, such as an error, or the simulation is terminated.
[0102] In an exemplary embodiment, when the state machine undergoes a state transition, a ready thread whose priority satisfies a priority condition is determined, and the ready thread state machine corresponding to the ready thread is run to obtain a processing result until a simulation end condition is met, and a scheduling simulation result corresponding to each scheduling simulation input is determined based on the processing result.
[0103] It should be noted that if a state transfer occurs, the highest priority thread among the ready threads should be selected and its state machine should be run; after the run is completed, the running thread and the ready thread should be updated according to the state transfer. After the update is completed, the current running thread is added to the input event and recorded. The above steps are executed repeatedly until the simulation end condition is met, such as an error occurs, or the simulation is terminated.
[0104] Obviously, the above-described embodiments are only embodiments of a part of the present invention, rather than all embodiments. In order to better understand the above method, the above process is described below in conjunction with embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention, specifically:
[0105] This application is mainly used in scheduling simulation and optimization in the field of automotive embedded operating systems, such as scheduling simulation and optimization of automotive embedded operating systems CP AUTOSAR OS.
[0106] Embedded operating systems are widely used in the automotive field and generally have hard real-time requirements, that is, users expect to complete the execution of a certain function or task within a specified time, otherwise serious consequences will occur. For example, CPAUTOSAR OS is an operating system with static configuration scheduling design. When designing scheduling, users often rely on experience to design. Only after the executable file is generated can they perform testing and verification to find possible scheduling design problems and make modifications. At present, multi-core MCUs are widely used in automotive electronic controllers, which makes users' scheduling design more difficult. During the testing phase, a large number of scheduling design adjustments may be required to meet functional requirements. In addition, due to the complexity of scheduling scenarios, it is often impossible to cover all scheduling scenarios during the testing phase, thus ignoring possible scheduling design problems.
[0107] This application aims to solve the problem of how to complete the scheduling design through scheduling simulation and automatic optimization in the design stage for embedded operating systems in the automotive field, reduce the design difficulty, save design costs, and ensure the reliability of scheduling design through a large number of randomly generated scheduling scenarios. Figure 3 As shown, it is a flowchart of the method for determining the vehicle dispatching scenario provided by the present application: the technical solution of the present application mainly includes three major parts, the GUI layer, the GUI layer includes multiple components, such as the design import construction component, the demand definition component and the result output component, etc.; the GUI layer can obtain the input of user information, the definition of user dispatching requirements and the output of simulation optimization results; the simulation model construction layer: according to the input of user information, the simulation model and the simulation scenario input are constructed; the simulation tuning layer: based on some parameter tuning algorithms such as the population evolution algorithm, the parameters are automatically optimized. The following is a detailed description of the steps for each layer:
[0108] 1. The user imports the basic elements of the scheduling design through the GUI, including which tasks or interrupts are included, and the triggering mechanism of the task (such as triggering at initialization, triggering at a certain period, etc.);
[0109] 2. User-defined time requirements, including CPU load rate, task response time, task execution deadline, special scheduling priority requirements, etc.
[0110] 3. The user supplements the scheduling information, such as the optimal execution time BCET and the worst execution time WCET of the task, and the time deviation Jitter of the task activation (cycle * percentage); through the combination of the probability distribution of BCET and WCET, such as the normal distribution and the probability distribution of the activation time deviation Jitter, the activation time and net execution time of the task and interrupt can be generated (different from the execution time that may be affected by preemption and interruption). These activation times and net execution times constitute the input of the scheduling scenario.
[0111] For example, the 1msTask cycle is 1ms, BCET = 0.095s, WCRT = 0.105s, and Jitter is 10%. Interrupt is triggered 3 times every 10ms (with an interval of 0.1ms). The possible scheduling inputs are as follows: Figure 4 As shown, the activation time here is time and the net execution time is ET.
[0112] 4. Compress and accelerate the input of the scheduling scenario consisting of the activation time and net execution time of the generated tasks and interrupts to improve the efficiency of the simulation. Considering that the activation time and net execution time of all tasks and interrupts generated in the simulation time occupy a lot of space, a dynamic generation method is adopted, and the activation time and net execution time are combined with the state machine model to convert the activation time and net execution time of a task or interrupt into an event-based scheduling input, and use the minimum heap to sort and update the events.
[0113] The meaning of event-based scheduling input here is to convert the activation time and net execution time of a task or interrupt into two events. One is the activation event, which is generated at the activation time of the task or interrupt to activate a task or interrupt. The other is the termination event, which is generated by adding the net execution time of the task to the activation time, indicating that a task or interrupt has been completed. The time of this event can be postponed due to preemption or interruption. Whether it is postponed depends on its priority relationship with the running task or interrupt prompted by the state machine. Reference Figure 5 As shown, a combination of activation time and net execution time is converted into two combinations of three elements.
[0114] refer to Figure 6As shown, the specific process of compression and acceleration is as follows:
[0115] 4.1 First, fill the initial event queue for each task and interrupt. At the same time, each task and interrupt also has an initial termination time that is temporarily empty. The size of this queue should be the minimum queue size that can accommodate the activation feature + 1. For example, taking CP AUTOSAR OS as an example, if the maximum number of activations that a task can be placed in the queue waiting for execution is 2, then the size of the queue should be 3. The three elements of the queue represent the time of three activations respectively. The purpose of the last element (tail element) is to serve as a time basis to generate the third activation time, and to serve as a sentinel to detect whether the number of activations exceeds the limit of 2.
[0116] 4.2 Establish two minimum heaps according to time, the activation event minimum heap and the termination event minimum heap. The root node of the minimum heap is always earlier than the leaf nodes on the left and right. In this way, the first element of the minimum heap is the earliest activation event or termination event at the next moment. Each node of the activation event minimum heap is the first element of the task or interrupt queue. The method of building the heap is to continuously insert new elements from an empty minimum heap (insert it to the root of the minimum heap, and then compare the root node with the two leaf nodes. If the root node is the smallest, there is no need to change the position, otherwise it will exchange the position with the smaller leaf node, and continue until there is no need to change the position), sinking to the correct position). Each node of the termination event minimum heap is the completion time of the activation event of the activation time queue. Reference Figure 7 As shown, there are schematic diagrams of generating activation event queues for 1ms tasks and interrupts, and a schematic diagram of obtaining termination events.
[0117] 4.3 Reference Figure 8 As shown, select the target event input Figure 6 In the finite state machine, the event input comes from the smaller of the two root nodes of the activation event minimum heap and the termination event minimum heap.
[0118] 4.4 According to the current running event returned by the state machine, determine the content of the new node to be generated and update the event queue and the minimum heap. If the current input event is an activation event, the corresponding task or interrupt is executed because of its higher priority, and a termination event of the task or interrupt is generated to replace the original termination event. The time of this termination event is the activation time + net execution time. All elements in the termination event minimum heap should be added with the net execution time of the input task (execution is postponed). Then insert the new termination event into the termination event minimum heap (replace it to the root of the minimum heap, and then compare the root node with the two leaf nodes. If the root node is the smallest, there is no need to change the position. Otherwise, it will exchange positions with the smaller leaf node, and continue until there is no need to change positions), and sink to the correct position. At the same time, the head element of the input activation event queue is moved back, and the new activation event is inserted into the activation event minimum heap (compare the two leaf nodes and select the smaller one as the root node). The tail should generate a new activation event based on the previous element of the tail. When a new activation event is generated at the tail, the termination time of the root node needs to be compared with the activation time of the corresponding termination event. If the termination time is greater than the activation time, it means that the number of activations is too many. The net execution time of the activation event should be set to -1 to indicate an error.
[0119] refer to Fig. 9 FIG. 1 is a flow chart of determining a target event in an embodiment, that is, selecting 0 from the activation event minimum heap and selecting empty from the termination event minimum heap, comparing the two, and determining an activation event with an activation time of 0; Fig.10 The figure shows a schematic diagram of the minimum heap of update events. After the activation event at time 0.9 is executed, its position in the activation event queue will move backward and the tail element will be updated. On the other hand, a new termination event will be generated to update the minimum heap of termination events.
[0120] refer to Fig.11 As shown, it is a flowchart of determining the target event in another embodiment, that is, 0.9 is selected from the minimum heap of activation events, and 0.1 is selected from the minimum heap of termination events, and the two are compared to determine that the termination event with activation time 0.1 is the target event.
[0121] If the currently input event is an activation event, but the corresponding task or interrupt is not executed because of its low priority, a termination event for the task or interrupt is generated to replace the original termination event, and then the new termination event is inserted into the termination event minimum heap. The time of the termination event needs to be added to the net execution time (the time difference between the current time and the next termination event of the current running event). At the same time, the first element of the input activation event queue is moved back, and the new activation event is inserted into the activation event minimum heap (compare the two leaf nodes and select the smaller one as the root node). The tail should generate a new activation event based on the previous element of the tail. The generation of the new activation event at the tail also requires an additional comparison of the termination time of the root node at this time with the activation time of the corresponding termination event. If the termination time > activation time, it means that the number of activations is too many, and the net execution time of the activation event should be set to -1 to indicate an error. If the currently input time is a termination event, the input termination event should be deleted, that is, the root node of the termination event heap should be deleted (compare the two leaf nodes and select the smaller one as the root node). Reference Fig.12 As shown, it is a schematic diagram of event changes in an embodiment. After the event execution is completed, the termination event is updated, and the termination event minimum heap is updated. When the root node is empty, it indicates that there is no error of too many activation times.
[0122] 5. Based on the input activation events and termination events, a finite state machine is constructed according to the scheduling state switching logic of tasks and interrupts to represent the scheduling switching process.
[0123] For example, the state machine constructed using CP AUTOSAR OS is as follows Fig.13As shown, ET is the remaining execution time of a task or interrupt. RT represents the task or interrupt being run. The ready thread manages all tasks or interrupts waiting to be scheduled. In actual operation, each task or interrupt has a state machine, but RT and ready threads are managed in a unified manner. The state machine state transition logic is as follows: The initial default state is Terminate; Running->Terminate: The input is a termination event (execution time is 0), and the associated object is the task or interrupt being executed, and the basic task or interrupt is being executed. Terminate–>Running: The input is a trigger event (execution time > 0, and there is no task or interrupt being executed, or the priority of the associated object of the trigger event is higher than the currently running task or interrupt, and the currently running task or interrupt can be preempted. Terminate–>Ready (prepare) or Waiting (wait)->Running: The input is a trigger event (execution time > 0), and there is a task or interrupt being executed and the priority of the associated object of the trigger event is lower than the currently running task or interrupt, or the currently running task or interrupt cannot be preempted. Ready->Running: The input is a termination event (execution time is 0), and the associated object is the task or interrupt being executed. At this time, the highest priority task in the ready thread is switched to Running from the Ready and removed from the ready thread. Running–>Waiting: The input is a termination event (execution time is 0), and the associated object is the task being executed, and the extended task is being executed.
[0124] Running->Ready: The input is a trigger event (execution time>0), and the priority of the currently running task or interrupt is lower than the priority of the object associated with the trigger time, and the currently running task or interrupt can be preempted. Running->Error (error) or Ready–>Error: The input is an error event (execution time = -1);
[0125] 6. According to the input event, select the state machine to be run from each task or interrupt state machine for orderly state machine operation. The logic of selection and execution order is as follows Fig.14As shown: 1) First, the current thread state machine is run according to the input event. The running result may or may not result in state transfer; 2) If state transfer occurs, the highest priority thread among the ready threads should be selected and its state machine should be run; if state transfer does not occur, the state machine of the thread associated with the input event should be run; 3) After each state machine is completed, the running thread and the ready thread should be updated according to the state transfer situation. 4) After the update is completed, the current running thread is added to the input event and recorded. 5) The above steps are executed repeatedly until an error occurs or the simulation is terminated.
[0126] 7. Analysis of simulation data:
[0127] According to the data recorded during the simulation process, it can be converted into a scheduling process diagram with time as the axis, refer to Fig.15 As shown in the figure, it is a simulation scheduling analysis chart. Based on the simulation scheduling analysis chart, the CPU load result can be obtained: Sum_Idle = (0.9–0.1) + (2.1-0.995) = 1.905; CPU load = 1-(1.905 / 2.201) = 0.134 = 13.4%; the task response time can also be calculated: since no preemption occurs, the trigger event is associated with the 1ms task at time 0 (t1 = 0), and the running thread is equal to the time of the 1ms task (t2 = 0). The response time of the first activation of the 1ms task is t2-t1 = 0.
[0128] 8. Generation of initial scheduling parameters: Reference Fig.16 As shown, a certain number of initial parameter scheduling sets (such as 10) can be generated for 1ms Task, 10msTask and Interrupt based on scheduling algorithms, such as some common configuration algorithms and random configuration algorithms, including priority, preemption attribute, core, etc. For example, according to the EDF scheduling algorithm, the priority of the task is set according to the period of the task, and the shorter the period, the higher the priority. Or according to the round robin scheduling algorithm, the same priority is set for the tasks.
[0129] 9. Parameter Optimization
[0130] 1) Use different parameter sets to perform simulations and obtain various simulation results;
[0131] 2) Define the evaluation indicators of scheduling according to user needs, such as CPU Load (processor load), the maximum response time of tasks, the maximum response time of interrupts, their respective evaluation functions, and the corresponding weight coefficients in the final evaluation results. The parameters of the evaluation function are the target value and actual value of the evaluation indicator, as well as the full score: Score (CPU Load) = f (target CPU Load, actual CPU Load, full score); Score (Task1 response time) = f (target Task1 response time, Task1 response time, full score); Score (Task2 response time) = f (target Task2 response time, Task2 response time, full score); Score (interrupt 1 response time) = f (target interrupt 1 response time, interrupt 1 response time, full score). Among them, the full score is the case where the target CPU Load is exactly the same as the actual CPU Load.
[0132] Evaluation result = coefficient 1*Score(CPU Load)+coefficient 2*Score(Task1 response time)+…+coefficient X*Score(interrupt 1 response time)+…+coefficient Y*error deduction. The importance of each evaluation indicator can be adjusted by using coefficients, and deductions should be made when the simulation enters an error state. Among them, the error deduction is the score set when the simulation enters an error state, and the error deduction here is negative. In the process of simulating any initial parameter scheduling set, a misalignment deduction will be set for the case where the simulation enters an error state. The specific value of the error deduction can be adaptively set according to the actual vehicle scheduling scenario, experience value, and accuracy requirements of the vehicle scheduling scenario.
[0133] Evaluation function example: For the case where the actual processor load and the target processor load are different, such as Score (CPU Load) = k (Target CPU Load-CPU Load) + b; when the CPU load is higher than the target CPU Load, the score is low, and when the CPU Load is lower than the target CPU Load, the score is high. It should be noted that when the CPU load (i.e., the actual processor load) is higher than the target CPU Load (i.e., the target processor load), it means that when the initial parameter scheduling set corresponding to the actual processor load is simulated, the processor resources are relatively tight and in a state of being heavily occupied. The subsequent application of the vehicle scheduling scenario corresponding to the actual processor load in the vehicle's embedded system will increase the risk of system crash or instability, and thus a lower score is given. When the CPU Load is lower than the target CPU Load, it means that when the initial parameter scheduling set corresponding to the actual processor load is simulated, the processor resources are relatively abundant. The subsequent application of the vehicle scheduling scenario corresponding to the actual processor load in the vehicle's embedded system will help improve the stability and reliability of the system. 3) Calculate the evaluation results of each simulation result according to the evaluation function and the evaluation result formula, and sort the scheduling parameter sets corresponding to the evaluation results. Evaluation result (parameter set 1) > evaluation result (parameter set 2) > evaluation result (parameter set 3)…;
[0134] 4) Use a suitable evolutionary algorithm to generate a new parameter set.
[0135] 5) Repeat the simulation, evaluation, and evolution process until the evaluation results meet the user's requirements or the user chooses to stop.
[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0137] In this embodiment, a device for determining a vehicle scheduling scenario is also provided, and the device for determining a vehicle scheduling scenario is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0138] Fig.17 is a structural block diagram of an optional vehicle scheduling scenario determination device according to an embodiment of the present application; Fig.17 As shown, the vehicle scheduling scenario determination device includes:
[0139] An acquisition module 1702 is used to acquire predefined scheduling elements and determine a plurality of initial parameter scheduling sets corresponding to the scheduling elements;
[0140] The processing module 1704 is used to generate scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets for the multiple initial parameter scheduling sets;
[0141] A simulation module 1706, used to determine a scheduling simulation result corresponding to each of the scheduling simulation inputs;
[0142] The determination module 1708 is used to analyze each of the scheduling simulation results, determine the target parameter scheduling set according to the analysis results, and determine the vehicle scheduling scenario based on the target parameter scheduling set. The above device obtains the predefined scheduling elements and determines the multiple initial parameter scheduling sets corresponding to the scheduling elements, thereby generating scheduling simulation inputs for each initial parameter scheduling set, and then determining the scheduling simulation results of each scheduling simulation input, analyzing the scheduling simulation results, determining the target parameter scheduling set according to the analysis results, and determining the vehicle scheduling scenario based on the target parameter scheduling set. Since in the process of determining the vehicle scheduling scenario, by analyzing the predefined scheduling elements and generating the corresponding multiple initial parameter schedulings, various possible situations can be considered more comprehensively to cover all vehicle scheduling scenarios as much as possible, and the scheduling simulation results corresponding to each scheduling simulation input are determined by simulation, so that the actual situation can be better simulated in the scheduling design stage, and a more accurate reference is provided for the subsequent determination of the final vehicle scheduling scenario, without the need for test verification, saving manpower and material resources, and improving the efficiency of determining the vehicle scheduling scenario.
[0143] In an exemplary embodiment, the scheduling elements include tasks and interrupts; the acquisition module 1702 is used to set the scheduling parameters of the tasks and the interrupts based on the attribute information of the tasks and the interrupts, and obtain multiple initial parameter scheduling sets corresponding to the tasks and the interrupts, wherein different initial parameter scheduling sets correspond to different scheduling parameters of the tasks and the interrupts.
[0144] In an exemplary embodiment, the processing module 1704 is further used to generate the scheduling simulation input corresponding to any initial parameter scheduling set by adopting the following steps: obtaining the time parameters of the scheduling element corresponding to the initial parameter scheduling set; the time parameters include the optimal execution time, the worst execution time and the activation time deviation; respectively determining the probability distribution of the optimal execution time, the worst execution time and the activation time deviation, and obtaining the activation time and net execution time of the scheduling element according to the probability distribution; determining the activation time and net execution time of the scheduling element as the scheduling simulation input corresponding to the initial parameter scheduling set. .
[0145] In an exemplary embodiment, the scheduling simulation input includes the activation time and net execution time of the scheduling elements; the simulation module 1706 is also used to perform event conversion based on the activation time and net execution time of each scheduling element to obtain activation events and termination events respectively associated with each scheduling element; wherein the activation event refers to an event generated when the scheduling element is activated; the termination event refers to an event generated when the scheduling element is executed; based on the activation event minimum heap corresponding to the activation event and the termination event minimum heap corresponding to the termination event, a target event is selected from the activation event and the termination event and input to the state machine; the state machine processes the target event to obtain a processing result, updates the activation event minimum heap and the termination event minimum heap according to the processing result, and returns to the step of selecting a target event from the activation event and the termination event and inputting it to the state machine based on the activation event minimum heap and the termination event minimum heap, and continues to execute until the simulation end condition is met, and the scheduling simulation result corresponding to each scheduling simulation input is determined.
[0146] In an exemplary embodiment, the simulation module 1706 is also used to establish a corresponding activation event queue for each of the scheduling elements according to the activation time and activation times of the scheduling element; from the activation event queue corresponding to each of the scheduling elements, a time element that meets the time condition is selected as a heap building element to construct the activation event minimum heap.
[0147] In an exemplary embodiment, the simulation module 1706 is further configured to construct the termination event minimum heap based on the completion time of the activation event as a heap construction element.
[0148] In an exemplary embodiment, the simulation module 1706 is also used to extract the first time information of the root node of the activation event minimum heap and the second time information of the root node of the termination event minimum heap; compare the first time information with the second time information, and select the target event from the activation event and the termination event based on the comparison result and input it into the state machine.
[0149] In an exemplary embodiment, the simulation module 1706 is also used to determine whether a state transition occurs in the state machine based on the target event; if a state transition does not occur in the state machine, determine the event thread associated with the target event, and run the event thread state machine of the event thread to obtain processing results until the simulation end condition is met, and determine the scheduling simulation results corresponding to each scheduling simulation input based on the processing results.
[0150] In an exemplary embodiment, the simulation module 1706 is also used to determine a ready thread whose priority satisfies a priority condition when a state transition occurs in the state machine, and run the ready thread state machine corresponding to the ready thread to obtain a processing result until the simulation end condition is met, and determine the scheduling simulation result corresponding to each scheduling simulation input based on the processing result.
[0151] In an exemplary embodiment, the determination module 1708 is also used to analyze each of the scheduling simulation results to determine the evaluation results corresponding to each of the scheduling simulation results; determine the initial parameter scheduling set associated with the evaluation results that meet the preset indicator conditions as the intermediate parameter scheduling set; update the intermediate parameter scheduling set, generate a new scheduling simulation input based on the updated intermediate parameter scheduling set, and based on the new scheduling simulation input, return to the step of determining the scheduling simulation results corresponding to each of the scheduling simulation inputs and continue to execute until the iteration end condition is met and the target parameter scheduling set is determined.
[0152] In an exemplary embodiment, the determination module 1708 is also used to perform the following analysis steps for any scheduling simulation result: determine the actual processor load and actual task response time of the scheduling simulation result during the simulation process; obtain a load score based on the target processor load and the actual processor load; obtain a time score based on the target task response time and the actual task response time; and determine an evaluation result corresponding to the scheduling simulation result by weighting according to the set weight value, the load score and the time score.
[0153] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0154] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0155] S1, obtaining predefined scheduling elements and determining a plurality of initial parameter scheduling sets corresponding to the scheduling elements;
[0156] S2, for the multiple initial parameter scheduling sets, generating scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets;
[0157] S3, determining the scheduling simulation results corresponding to each of the scheduling simulation inputs;
[0158] S4 is used to analyze each of the scheduling simulation results, determine a target parameter scheduling set according to the analysis results, and determine a vehicle scheduling scenario based on the target parameter scheduling set.
[0159] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0160] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0161] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0162] S1, obtaining predefined scheduling elements and determining a plurality of initial parameter scheduling sets corresponding to the scheduling elements;
[0163] S2, for the multiple initial parameter scheduling sets, generating scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets;
[0164] S3, determining the scheduling simulation results corresponding to each of the scheduling simulation inputs;
[0165] S4 is used to analyze each of the scheduling simulation results, determine the target parameter scheduling set according to the analysis results, and determine the vehicle scheduling scenario based on the target parameter scheduling set. Optionally, in this embodiment, the above storage medium may include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0166] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0167] Optionally, in this embodiment, the above computer program may be configured to implement the following steps when executed by a processor:
[0168] S1, obtaining predefined scheduling elements and determining a plurality of initial parameter scheduling sets corresponding to the scheduling elements;
[0169] S2, for the multiple initial parameter scheduling sets, generating scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets;
[0170] S3, determining the scheduling simulation results corresponding to each of the scheduling simulation inputs;
[0171] S4 is used to analyze each of the scheduling simulation results, determine a target parameter scheduling set according to the analysis results, and determine a vehicle scheduling scenario based on the target parameter scheduling set.
[0172] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0173] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0174] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining a vehicle dispatching scenario, characterized in that: include: Obtain predefined scheduling elements, and determine multiple initial parameter scheduling sets corresponding to the scheduling elements; and generate scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets for the multiple initial parameter scheduling sets: Determine the scheduling simulation result corresponding to each of the scheduling simulation inputs; Analyze each of the scheduling simulation results, determine a target parameter scheduling set according to the analysis results, and determine a vehicle scheduling scenario based on the target parameter scheduling set.
2. The method according to claim 1, characterized in that The scheduling elements include tasks and interrupts; and the determining of a plurality of initial parameter scheduling sets corresponding to the scheduling elements includes: Based on the attribute information of the task and the interrupt, the scheduling parameters of the task and the interrupt are set to obtain a plurality of initial parameter scheduling sets corresponding to the task and the interrupt, wherein different initial parameter scheduling sets correspond to different scheduling parameters of the task and the interrupt.
3. The method according to claim 1, characterized in that The step of generating scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets for the multiple initial parameter scheduling sets includes: For any initial parameter scheduling set, the following steps are used to generate the scheduling simulation input corresponding to the initial parameter scheduling set: Obtaining time parameters of the scheduling elements corresponding to the initial parameter scheduling set; the time parameters include optimal execution time, worst execution time and activation time deviation; Determine the probability distribution of the optimal execution time, the worst execution time and the activation time deviation respectively, and obtain the activation time and net execution time of the scheduling element according to the probability distribution; determine the activation time and net execution time of the scheduling element as the scheduling simulation input corresponding to the initial parameter scheduling set.
4. The method according to claim 1, characterized in that The scheduling simulation input includes the activation time and the net execution time of the scheduling element; and the determining of the scheduling simulation result corresponding to each of the scheduling simulation inputs includes: Performing event conversion based on the activation time and net execution time of each scheduling element to obtain activation events and termination events associated with each scheduling element; wherein the activation event refers to an event generated when the scheduling element is activated; and the termination event refers to an event generated when the scheduling element is executed; Based on the activation event minimum heap corresponding to the activation event and the termination event minimum heap corresponding to the termination event, selecting a target event from the activation event and the termination event and inputting it into a state machine; The state machine processes the target event to obtain a processing result, updates the activation event minimum heap and the termination event minimum heap according to the processing result, and returns to the step of selecting the target event from the activation event and the termination event based on the activation event minimum heap and the termination event minimum heap to input into the state machine, and continues to execute until the simulation end condition is met, and determines the scheduling simulation result corresponding to each scheduling simulation input.
5. The method according to claim 4, characterized in that The steps of establishing the activation event minimum heap include: For each of the scheduling elements, a corresponding activation event queue is established according to the activation time and activation times of the scheduling element; From the activation event queue corresponding to each scheduling element, a time element that meets the time condition is selected as a heap building element to construct the activation event minimum heap.
6. The method according to claim 4, characterized in that The step of establishing the termination event minimum heap comprises: The termination event minimum heap is constructed based on the completion time of the activation event as a heap construction element.
7. The method according to claim 4, characterized in that The step of selecting a target event from the activation event and the termination event based on the activation event minimum heap and the termination event minimum heap and inputting the target event into the state machine includes: Extracting first time information of the root node of the activation event minimum heap, and extracting second time information of the root node of the termination event minimum heap; The first time information is compared with the second time information, and based on the comparison result, a target event is selected from the activation event and the termination event and input into a state machine.
8. The method according to claim 4, characterized in that The state machine processes the target event to obtain a processing result, including: Based on the target event, determining whether the state machine undergoes a state transition; When no state transfer occurs in the state machine, the event thread associated with the target event is determined, and the event thread state machine of the event thread is run to obtain the processing result until the simulation end condition is met, and the scheduling simulation result corresponding to each scheduling simulation input is determined based on the processing result.
9. The method according to claim 8, characterized in that The method further comprises: When the state machine undergoes a state transition, a ready thread whose priority satisfies the priority condition is determined, and the ready thread state machine corresponding to the ready thread is run to obtain a processing result until the simulation end condition is met, and the scheduling simulation result corresponding to each scheduling simulation input is determined based on the processing result.
10. The method according to claim 1, characterized in that The step of analyzing each of the scheduling simulation results and determining a target parameter scheduling set according to the analysis results includes: Analyze each of the scheduling simulation results to determine an evaluation result corresponding to each of the scheduling simulation results; Determine an initial parameter scheduling set associated with the evaluation results that meet the preset indicator conditions as an intermediate parameter scheduling set; Update the intermediate parameter scheduling set, generate a new scheduling simulation input based on the updated intermediate parameter scheduling set, and based on the new scheduling simulation input, return to the step of determining the scheduling simulation results corresponding to each scheduling simulation input and continue to execute until the iteration end condition is met and the target parameter scheduling set is determined.
11. The method according to claim 8, characterized in that The analyzing each of the scheduling simulation results to determine the evaluation result corresponding to each of the scheduling simulation results includes: The analysis steps for any scheduling simulation result are as follows: Determine the actual processor load and the actual task response time of the scheduling simulation results during the simulation process; Obtaining a load score based on the target processor load and the actual processor load; Based on the target task response time and the actual task response time, a time score is obtained; The evaluation result corresponding to the scheduling simulation result is determined by weighting according to the set weight value, the load score and the time score.
12. A device for determining a vehicle dispatching scenario, characterized in that: include: An acquisition module, used to acquire predefined scheduling elements and determine a plurality of initial parameter scheduling sets corresponding to the scheduling elements; A processing module, configured to generate scheduling simulation inputs corresponding to the multiple initial parameter scheduling sets for the multiple initial parameter scheduling sets; A simulation module, used to determine the scheduling simulation results corresponding to each of the scheduling simulation inputs; The determination module is used to analyze each of the scheduling simulation results, determine a target parameter scheduling set according to the analysis results, and determine a vehicle scheduling scenario based on the target parameter scheduling set.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 11 when executed by a processor.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.