CN117076138B - System simulation-oriented resource cross-platform integration and scheduling method and device - Google Patents

System simulation-oriented resource cross-platform integration and scheduling method and device Download PDF

Info

Publication number
CN117076138B
CN117076138B CN202311336607.2A CN202311336607A CN117076138B CN 117076138 B CN117076138 B CN 117076138B CN 202311336607 A CN202311336607 A CN 202311336607A CN 117076138 B CN117076138 B CN 117076138B
Authority
CN
China
Prior art keywords
message
target
time slice
client
current time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311336607.2A
Other languages
Chinese (zh)
Other versions
CN117076138A (en
Inventor
何宇
李晓朋
杨海栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Lingkong Electronic Technology Co Ltd
Original Assignee
Xian Lingkong Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Lingkong Electronic Technology Co Ltd filed Critical Xian Lingkong Electronic Technology Co Ltd
Priority to CN202311336607.2A priority Critical patent/CN117076138B/en
Publication of CN117076138A publication Critical patent/CN117076138A/en
Application granted granted Critical
Publication of CN117076138B publication Critical patent/CN117076138B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/805QOS or priority aware
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/826Involving periods of time

Abstract

The application discloses a system simulation-oriented resource cross-platform integration and scheduling method and device, wherein the method comprises the following steps: setting a basic priority for a client and distributing time slices for the client; dividing a message queue, determining the execution priority of the message queue, and executing a first step; the first step comprises: determining a target message queue and target system messages in the target message queue, executing the target system messages in the current time slice, and checking whether the target system messages can be executed in the current time slice; if the current time slice cannot execute the target system message, executing a second step; and if the current time slice can execute the target system message, executing a third step. The method solves the problem that the efficiency evaluation of the existing system simulation system ignores the influence of the sub-module information on the system operation, realizes that the information management is added into the system evaluation index, can enhance the accuracy and the comprehensiveness of the system efficiency evaluation, and gives consideration to the information management in the system simulation system.

Description

System simulation-oriented resource cross-platform integration and scheduling method and device
Technical Field
The application relates to the technical field of information management, in particular to a system simulation-oriented resource cross-platform integration and scheduling method and device.
Background
The system simulation is a method for simulating the process, behavior and effect of an actual system by using a computer model technology. A digital model is typically used to describe the operational laws of the system and is modeled by a computer program. During the simulation, various tests, comparisons, and optimizations may be performed on the system to achieve the desired goals.
At present, in the cross-platform integration and scheduling of resources oriented to system simulation, the advantages and disadvantages of system message management directly influence the instantaneity of communication in the system simulation deduction process, and indirectly influence the overall efficiency evaluation oriented to the system simulation platform.
In addition, in the prior art, performance evaluation of the system simulation system mainly focuses on considering the index facing the system simulation system from the whole point of view, or measuring the performance index facing the whole system simulation platform according to one or more dimensions of the data dimension, the using efficiency of equipment, the rationality of task planning and simulation situation planning of the system simulation system. The information of the system simulation platform is mainly discussed in terms of a mechanism for producing the information, a receiving and transmitting logic sequence of the information, a format of the information, timeliness of information transmission and the like, and the integration and scheduling of the information in each sub-module contained in the system simulation platform and the influence of the information in the sub-module on the operation of the whole system are lacked.
Disclosure of Invention
The embodiment of the application solves the problem that the information of each sub-module is ignored in the efficiency evaluation of the system simulation system in the prior art to influence the operation of the whole system by providing the system simulation-oriented resource cross-platform integration and scheduling method, realizes adding the information management into the system evaluation index, and enhances the accuracy and the comprehensiveness of the system simulation system-oriented efficiency evaluation.
In a first aspect, an embodiment of the present application provides a method for cross-platform integration and scheduling of resources for architecture simulation, including: setting basic priority for a client in a system simulation system, and distributing time slices for the client; acquiring message information and message state of system messages in the system simulation system; dividing a message queue according to the message information, determining the execution priority of the message queue, and executing a first step; the first step includes: determining a target message queue to be executed and a target system message in the target message queue according to the execution priority, executing the target system message in a current time slice corresponding to the target message queue, and checking whether the current time slice can execute the target system message; if the current time slice can not execute the target system message, executing a second step; the second step includes: iteratively acquiring a next time slice of the current time slice and taking the next time slice as the current time slice until the current time slice can execute the target system message; if the current time slice can execute the target system message, executing a third step; the third step includes: updating the message states of the system messages in the message queues, and judging whether the message states all meet the completion state; if the message states do not all meet the completion state, executing the first step until all the message states of the system messages meet the completion state; and if the message states all meet the completion state, a scheduling result of the system simulation system is obtained.
With reference to the first aspect, in a first possible implementation manner, the allocating a time slice for the client includes: ordering the base priorities of the clients; and distributing the time slices to the clients according to the sequencing result, wherein the lengths of the time slices increase with the distribution sequence.
With reference to the first aspect, in a second possible implementation manner, the obtaining message information of a system message in the architecture simulation system includes: defining message format criteria for the system messages in the hierarchy simulation system; the message format standard comprises the address of the client corresponding to the system message, the function of the client, the source, the destination and the message command of the system message; and acquiring the address of the client and the source of the system message in the message format standard corresponding to the system message to obtain the message information.
With reference to the first aspect, in a third possible implementation manner, the message state includes an unread state, an unexecuted state, a revoked state, an executing state, a terminating state, an ending state, and a read state.
With reference to the first aspect, in a fourth possible implementation manner, the dividing a message queue according to the message information and determining an execution priority of the message queue includes: determining the client corresponding to the system message according to the message information; dividing the system messages of the same client into the same message queue; the base priority of the client is taken as the execution priority of the corresponding message queue.
With reference to the first aspect, in a fifth possible implementation manner, the determining, according to the execution priority, a target message queue to be executed and a target system message therein includes: comparing the execution priority of each message queue, and taking the message queue with the highest execution priority as a target message queue; acquiring the generation time of the system message in the target message queue; determining the target system message in the target message queue according to the generation time.
With reference to the third possible implementation manner of the first aspect, in a sixth possible implementation manner, the completion state includes a revocation state, a termination state, and an end state.
With reference to the sixth possible implementation manner of the first aspect, in a seventh possible implementation manner, before the performing the first step until the message states of all the system messages all meet the completion state, the method further includes: and judging the message queue to which the system message which does not meet the completion state belongs.
In a second aspect, an embodiment of the present application provides a resource cross-platform integration and scheduling device oriented to architecture simulation, including: the distribution module is used for setting basic priority for a client in the system simulation system and distributing time slices for the client; the acquisition module is used for acquiring the message information and the message state of the system message in the system simulation system; the first execution module is used for dividing a message queue according to the message information, determining the execution priority of the message queue and executing a first step; the first step includes: determining a target message queue to be executed and a target system message in the target message queue according to the execution priority, executing the target system message in a current time slice corresponding to the target message queue, and checking whether the current time slice can execute the target system message; the second execution module is used for executing a second step if the current time slice cannot execute the target system message; the second step includes: iteratively acquiring a next time slice of the current time slice and taking the next time slice as the current time slice until the current time slice can execute the target system message; a third execution module, configured to execute a third step if the current time slice can execute the target system message; the third step includes: updating the message states of the system messages in the message queues, and judging whether the message states all meet the completion state; if the message states do not all meet the completion state, executing the first step until all the message states of the system messages meet the completion state; and the display module is used for obtaining a scheduling result of the system simulation system if the message states all meet the completion state.
With reference to the second aspect, in a first possible implementation manner, the allocating a time slice for the client includes: ordering the base priorities of the clients; and distributing the time slices to the clients according to the sequencing result, wherein the lengths of the time slices increase with the distribution sequence.
With reference to the second aspect, in a second possible implementation manner, the obtaining message information of a system message in the architecture simulation system includes: defining message format criteria for the system messages in the hierarchy simulation system; the message format standard comprises the address of the client corresponding to the system message, the function of the client, the source, the destination and the message command of the system message; and acquiring the address of the client and the source of the system message in the message format standard corresponding to the system message to obtain the message information.
With reference to the second aspect, in a third possible implementation manner, the message state includes an unread state, an unexecuted state, a revoked state, an executing state, a terminating state, an ending state, and a read state.
With reference to the second aspect, in a fourth possible implementation manner, the dividing a message queue according to the message information and determining an execution priority of the message queue includes: determining the client corresponding to the system message according to the message information; dividing the system messages of the same client into the same message queue; the base priority of the client is taken as the execution priority of the corresponding message queue.
With reference to the second aspect, in a fifth possible implementation manner, the determining, according to the execution priority, a target message queue to be executed and a target system message therein includes: comparing the execution priority of each message queue, and taking the message queue with the highest execution priority as a target message queue; acquiring the generation time of the system message in the target message queue; determining the target system message in the target message queue according to the generation time.
With reference to the third possible implementation manner of the second aspect, in a sixth possible implementation manner, the completion state includes a revocation state, a termination state, and an end state.
With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation manner, before the performing the first step until the message states of all the system messages all meet the completion state, the method further includes: and judging the message queue to which the system message which does not meet the completion state belongs.
In a third aspect, embodiments of the present application provide an apparatus, including: a processor; a memory for storing processor-executable instructions; the processor, when executing the executable instructions, implements a method as described in the first aspect or any one of the possible implementations of the first aspect.
One or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
according to the embodiment of the application, the time slices are distributed to each client, so that the system processing delay can be reduced; acquiring information and information state of the system, and processing the system information according to the authority and the requirement of the user; the system information is prioritized, so that the operation efficiency of the system simulation system can be improved. The problem that the influence of the information of each sub-module on the operation of the whole system is ignored in the efficiency evaluation of the existing system simulation system is effectively solved, and further, the information management is added into the system evaluation index, so that the accuracy and the comprehensiveness of the efficiency evaluation of the system simulation system can be enhanced, the execution sequence of the system information can be controlled by setting the basic priority, and the information management efficiency of the system simulation system can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments of the present application or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a resource cross-platform integration and scheduling method for system simulation provided in an embodiment of the present application;
FIG. 2 is a flowchart of obtaining message information of a system message in a system simulation system according to an embodiment of the present application;
FIG. 3 is a flowchart of determining a target message queue to be executed and a target system message therein according to an execution priority according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a resource cross-platform integration and scheduling device for system simulation provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of a system simulation system according to an embodiment of the present disclosure;
fig. 6 is a diagram of a logical relationship of transitions between message states provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Some of the techniques involved in the embodiments of the present application are described below to aid understanding, and they should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, for the sake of clarity and conciseness, descriptions of well-known functions and constructions are omitted in the following description.
The method is mainly applied to a distributed deployment and centralized management system simulation system, and the system simulation system can provide a highly-extensible, easy-to-maintain and efficient-operation simulation environment for users. In such a system, the message list is managed at the server side, i.e. all messages are stored on the server instead of being distributed among individual clients, as shown in particular in fig. 5. This ensures consistency and security of the data while also reducing the complexity of the system.
Different clients carry different service functions, and each client can customize the functions according to requirements. For example, some clients may only need to perform basic simulation operations, and other clients may need to have complex customizations to the simulation environment. By focusing these functions in one simulation system, a user can flexibly select and combine various functions according to his own needs, thereby improving the work efficiency.
In addition, the application is also applicable to the following scenarios:
cross-department collaboration: on a centralized simulation platform, users of different departments can conveniently share data and resources, so that collaborative work of cross departments is realized. This helps to improve decision making efficiency and execution effort for the enterprise. In addition, because the message list is managed at the server side, a plurality of users can be supported to simultaneously perform simulation operation on line, and real-time communication and cooperation can be realized.
Safe and reliable data storage: storing the message list in the server side can ensure the security and reliability of the data. Even if one client fails or is disconnected, other clients can still normally use the simulation platform.
Fig. 1 is a flowchart of a resource cross-platform integration and scheduling method for architecture-oriented simulation, which is provided in an embodiment of the present application, and includes steps 101 to 110. Wherein fig. 1 is only one execution sequence shown in the embodiment of the present application, and does not represent the only execution sequence of the resource cross-platform integration and scheduling method facing the system simulation, and the steps shown in fig. 1 may be executed in parallel or in reverse under the condition that the final result can be achieved.
Step 101: and setting a basic priority for the client in the system simulation system, and distributing time slices for the client. Specifically, at the beginning of the architecture simulation system setup, it is necessary to distinguish between different clients at the physical layer. The base priority is determined according to the functions performed by the client in the system simulation system. In the embodiment of the application, the clients which are critical to the system operation are allocated higher base priority. Such as critical data processing clients, real-time monitoring clients, etc. For secondary clients, a lower base priority may be assigned. Such as a data analysis client, report generation client, etc. By assigning different base priorities to different clients, it can be ensured that critical clients are not blocked by other low priority clients when acquiring data, resulting in delays.
In addition, the base priorities of the clients are ordered. And distributing time slices to each client according to the sequencing result, wherein the lengths of the time slices increase along with the distribution sequence. In the embodiments of the present application, the following will be describedThe time slice of the first client in the base priority ranking is selected to be 5 microseconds, and the time slices are divided back in turn according to the result of the ranking such that the time on each time slice is 2 times the time on its last time slice. Exemplary are 5 microseconds, 10 microseconds, 20 microseconds, … …,Microsecond. By the time slice setting method, each client only needs to process tasks in one time slice at any time, and the processing delay of the system is reduced. And the time slices are distributed incrementally, the shorter time slices can process tasks with high priority faster, and the longer time slices can process more complex tasks, so that the stability of the system is ensured, and the instantaneity and the response capability of the system are improved.
It should be noted that, in the above embodiment, only one time slice is allocated to each client, and the multiple relationship between the time set on the time slice and the time on the adjacent time slice is only one embodiment of the present application, and those skilled in the art may modify or change the time slice according to actual needs, which still falls within the protection scope of the present application. Also, if a large number of complex tasks need to be handled, the number of time slices may be appropriately increased. Plug-ins may also be used herein to flexibly assign base priorities to different clients based on their roles in the system simulation system.
Step 102: and acquiring the message information and the message state of the system message in the system simulation system. Specifically, in a system simulation system, a large amount of frequently interacted information is included. Such information is a communication message, an instruction message, a task message, a random message, etc. The specific implementation method for obtaining the message information of the system message in the system simulation system is shown in fig. 2, and includes steps 201 to 203, which are specifically as follows.
Step 201: message format criteria are defined for system messages in the hierarchy simulation system. Specifically, different types of messages in the system simulation system have different characteristics and functions. For example, communication messages are used primarily to transfer information, such as request data, response data, or error information, between different components in a system, and typically include content such as sender, receiver, message type, and related data. The instruction message is mainly used for sending control instructions to the simulation system, such as starting a certain task, stopping a certain task or changing system parameters, and the instruction message generally contains the operation type, the target object, related parameters and the like.
In the embodiment of the application, the system messages of different types are defined as unified message format standards, so that the scheduling and management of the subsequent system messages can be facilitated, and the maintainability of the system is improved.
Step 202: the message format criteria include the address of the client and the function of the client to which the system message corresponds, the source, destination, and message command of the system message. In this embodiment of the present application, the address of the client is indicated by a physical address of the corresponding client, so as to distinguish different clients. The functions of the clients are used for summarizing the functions (user management end, test management end and the like) of the corresponding clients in the system simulation system, and the base priority of the corresponding clients can be conveniently distinguished. The source of the system message is typically a string that can account for which client or system the system message was generated and the time the system message was generated. The direction of a system message refers to where the message is sent, indicated by the received address of the system message. The message command refers to the type of system message (communication message, instruction message, task message, random message, etc.).
It should be noted that the four message format standards listed above are only one embodiment of the present application, and those skilled in the art may also add or modify the above-mentioned four message format standards according to practical situations. For example, task profiles may also be added to briefly describe the message content of different system messages; task names used for describing task names in the task message; the operation type is used for describing the operation of the target object in the instruction message and some reserved fields are used for further describing and supplementing the system message.
Step 203: and obtaining the address of the client in the message format standard corresponding to the system message and the source of the system message to obtain the message information. Specifically, by the obtained address of the client, it can be determined which client the system message is generated by, so as to obtain the corresponding basic priority. The source of the system messages can know which client the system message was generated from and its time of generation so that we can process the system messages according to the rights and needs of the user.
Step 103: dividing the message queue according to the message information and determining the execution priority of the message queue. In the embodiment of the application, the client corresponding to the system message is determined according to the message information. Specifically, the client corresponding to the system message is determined according to the address of the client in the message information acquired in step 102. The system messages of the same client are divided into the same message queue. Specifically, system messages with the same address of the client corresponding to the system messages are classified in the same message queue. And taking the basic priority of the client as the execution priority of the corresponding message queue. The system messages in the same message queue have execution priorities corresponding to the base priorities of their clients. I.e. the execution priority of the system messages in the same message queue is the same as the base priority of their corresponding clients.
Step 104: and determining the target message queue to be executed and the target system message in the target message queue according to the execution priority, and executing the target system message in the current time slice corresponding to the target message queue. In this embodiment of the present application, there may be a plurality of message queues including a plurality of system messages, and the system simulation system preferentially operates the message queue with high execution priority. As shown in fig. 3, steps 301 to 303 are included as follows.
Step 301: comparing the execution priority of each message queue, and taking the message queue with the highest execution priority as a target message queue. In the embodiment of the application, the message queues are ordered according to the execution priority, wherein the message queue with the highest execution priority is used as the target message queue and is executed preferentially.
Step 302: the generation time of the system message in the target message queue is obtained. In the embodiment of the application, there may be a message queue containing a plurality of system messages, but a plurality of system messages are hardly generated at the same time in the same message queue, and the generation time of the system messages can be obtained by acquiring the source of the system messages.
Step 303: the target system message in the target message queue is determined based on the generation time. In the embodiment of the application, according to the generation time of the system message, the system message generated earliest in the target message queue is taken as the target system message.
And executing the target system message in the current time slice corresponding to the target message queue, and immediately distributing the target system message to an idle working thread for processing when the target system message enters the system. Only after this worker thread completes processing the target system message can the next system message be processed.
Step 105: checking whether the current time slice can finish executing the target system message. Specifically, whether the target system message can be executed or not at the time of the current time slice is detected, and if the target system message cannot be executed at the current time slice, steps 106, 107 and 105 are iteratively executed until the target system message is executed, which is specifically as follows.
Step 106: and iteratively acquiring the next time slice of the current time slice and taking the next time slice as the current time slice. Specifically, when the target system message is not executed in the current time slice, according to the order of the execution priorities, the time slice corresponding to the execution priority with the nearest execution priority corresponding to the current time slice, namely the next time slice, is obtained, and the next time slice is taken as the current time slice.
In one embodiment of the present application, the target system message that is not executed in the current time slice may be reassigned to the idle thread, and the execution priority and the generation time of the target system message are determined according to step 104, where the target system message that is not executed is re-executed, and the next time slice is taken as the target system message that is not executed in the current time slice.
Step 107: the target system message is executed over the current time slice. Specifically, the remaining portion of the target system message is executed using the current time slice, and it is again determined whether the current time slice can execute the remaining portion of the target system message through step 105. If the current time slice cannot execute the remaining part of the target system message, steps 106 to 107 are continued.
If the current time slice can complete the target system message, steps 108 to 110 are performed, as follows.
Step 108: the message status of the system messages in each message queue is updated. In the embodiment of the application, the message states include an unread state, an unexecuted state, a revoked state, an executing state, a terminating state, an ending state and a read state. The above states are determined by the life cycle of system messages in the system simulation system, and the conversion relationship between the states of the messages is shown in fig. 6.
Specifically, the unread state indicates that the recipient has not opened after the system message is sent. In the unread state, the content of the system message is not visible to both the sender and the receiver. When the receiver opens the system message, the message state of the system message may change.
The inactive state indicates that after the system message has been sent, the recipient has received the system message but has not processed it. In this state, the receiver can process the system message at any time, or can ignore it temporarily.
The executing state indicates that the receiver starts to process the system message, and the receiver takes corresponding operation according to the content of the system message. The message state of the system message may change until the receiver completes processing the system message, terminates executing the system message, or the sender cancels the system message.
The termination state indicates that the message state of the system message is changed to the termination state when the receiver receives and executes the termination command during the process of processing the system message. In this state, the receiver no longer needs to do any operation on the system message.
The end state indicates that all the contents of the system message have been processed, that the system message itself has no longer practical meaning and can be deleted or archived.
The revocation status indicates that a system message has an error in the processing or needs to be revoked. In this state, the receiver may perform a rollback operation on the system message, returning to the pre-processing state. Once the revocation operation is completed, the message state of the system message is changed to the end state.
The read state indicates that the recipient was successfully opened and stopped at the system message interface. In this state, the receiver has knowledge of the content of the system message, which can be processed accordingly. In one embodiment of the present application, the sender receives a notification that the system message has been successfully read while the system message is in the read state.
Step 109: and judging whether the message states all meet the completion state. In the embodiment of the application, the completion state includes a revocation state, a termination state and an end state. If the information states of all the system messages in the target message queue meet the completion state, judging the information states of the system messages in other message queues. If the information states of the system messages in the other message queues do not all satisfy the completion state, then all the message queues containing the system messages that do not satisfy the completion state execute steps 104 to 109 until the message states of the system messages in all the message queues are the completion state, and then execute step 110.
Step 110: and obtaining a scheduling result of the system simulation system. In the embodiment of the present application, the scheduling result including the execution order and the execution time of all the system messages is obtained through steps 101 to 109. In one embodiment of the present application, the scheduling results are presented in a visual manner.
According to the embodiment of the application, the sequence and time for processing the different system messages by the system simulation system are obtained through the method, the sequence and time are used as one of the performance evaluation standards of the system simulation system, the performance of the system simulation system can be evaluated more comprehensively, and the message management efficiency of the system simulation system is improved by setting the execution sequence of the basic priority control system messages.
Although the present application provides method operational steps as described in the examples or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive labor. The order of steps recited in the present embodiment is only one way of performing the steps in a plurality of steps, and does not represent a unique order of execution. When implemented by an actual device or client product, the method of the present embodiment or the accompanying drawings may be performed sequentially or in parallel (e.g., in a parallel processor or a multithreaded environment).
As shown in FIG. 4, the embodiment of the application also provides a resource cross-platform integration and scheduling device 400 oriented to the system simulation. The device comprises: the allocation module 401, the acquisition module 402, the first execution module 403, the second execution module 404, the third execution module 405, and the display module 406 are specifically as follows.
The allocation module 401 is configured to set a base priority for a client in the system simulation system, and allocate a time slice for the client. The allocation module 401 is specifically configured to distinguish between different clients facing each other at the physical layer at the beginning of the architecture simulation system establishment. The base priority is determined according to the functions performed by the client in the system simulation system. In the embodiment of the application, the clients which are critical to the system operation are allocated higher base priority. Such as critical data processing clients, real-time monitoring clients, etc. For secondary clients, a lower base priority may be assigned. Such as a data analysis client, report generation client, etc. By assigning different base priorities to different clients, it can be ensured that critical clients are not blocked by other low priority clients when acquiring data, resulting in delays.
In addition, the base priorities of the clients are ordered. And distributing time slices to each client according to the sequencing result, wherein the lengths of the time slices increase along with the distribution sequence. In the embodiment of the present application, the time slice of the first client in the base priority ranking is selected to be 5 microseconds, and the time slices are sequentially divided backwards according to the ranking result, so that the time on each time slice is 2 times of the time on the last time slice. Illustratively, from the first client The time on the time slice to the nth client is 5 microseconds, 10 microseconds, 20 microseconds, … …,Microsecond. By the time slice setting method, each client only needs to process tasks in one time slice at any time, and the processing delay of the system is reduced. And the time slices are distributed incrementally, the shorter time slices can process tasks with high priority faster, and the longer time slices can process more complex tasks, so that the stability of the system is ensured, and the instantaneity and the response capability of the system are improved.
It should be noted that, in the above embodiment, only one time slice is allocated to each client, and the multiple relationship between the time set on the time slice and the time on the adjacent time slice is only one embodiment of the present application, and those skilled in the art may modify or change the time slice according to actual needs, which still falls within the protection scope of the present application. Also, if a large number of complex tasks need to be handled, the number of time slices may be appropriately increased. Plug-ins may also be used herein to flexibly assign base priorities to different clients based on their roles in the system simulation system.
The acquiring module 402 is configured to acquire message information and message status of a system message in the architecture simulation system. The acquisition module 402 is specifically configured to include a large amount of frequently interacted information in the system simulation system. Such information is a communication message, an instruction message, a task message, a random message, etc. A specific implementation method for obtaining the message information of the system message in the system simulation system is shown in FIG. 2.
Message format criteria are defined for system messages in the hierarchy simulation system. Specifically, different types of messages in the system simulation system have different characteristics and functions. For example, communication messages are used primarily to transfer information, such as request data, response data, or error information, between different components in a system, and typically include content such as sender, receiver, message type, and related data. The instruction message is mainly used for sending control instructions to the simulation system, such as starting a certain task, stopping a certain task or changing system parameters, and the instruction message generally contains the operation type, the target object, related parameters and the like.
In the embodiment of the application, the system messages of different types are defined as unified message format standards, so that the scheduling and management of the subsequent system messages can be facilitated, and the maintainability of the system is improved.
The message format criteria include the address of the client and the function of the client to which the system message corresponds, the source, destination, and message command of the system message. In this embodiment of the present application, the address of the client is indicated by a physical address of the corresponding client, so as to distinguish different clients. The functions of the clients are used for summarizing the functions (user management end, test management end and the like) of the corresponding clients in the system simulation system, and the base priority of the corresponding clients can be conveniently distinguished. The source of the system message is typically a string that can account for which client or system the system message was generated and the time the system message was generated. The direction of a system message refers to where the message is sent, indicated by the received address of the system message. The message command refers to the type of system message (communication message, instruction message, task message, random message, etc.).
It should be noted that the four message format standards listed above are only one embodiment of the present application, and those skilled in the art may also add or modify the above-mentioned four message format standards according to practical situations. For example, task profiles may also be added to briefly describe the message content of different system messages; task names used for describing task names in the task message; the operation type is used for describing the operation of the target object in the instruction message and some reserved fields are used for further describing and supplementing the system message.
And obtaining the address of the client in the message format standard corresponding to the system message and the source of the system message to obtain the message information. Specifically, by the obtained address of the client, it can be determined which client the system message is generated by, so as to obtain the corresponding basic priority. The source of the system messages can know which client the system message was generated from and its time of generation so that we can process the system messages according to the rights and needs of the user.
The first execution module 403 is configured to divide a message queue according to the message information and determine an execution priority of the message queue, and execute the first step. The first step comprises: and determining a target message queue to be executed and target system messages in the target message queue according to the execution priority, executing the target system messages in the current time slice corresponding to the target message queue, and checking whether the current time slice can execute the target system messages. The first execution module 403 is specifically configured to determine, according to the message information, a client corresponding to the system message. Specifically, the client corresponding to the system message is determined according to the address of the client in the acquired message information. The system messages of the same client are divided into the same message queue. Specifically, system messages with the same address of the client corresponding to the system messages are classified in the same message queue. And taking the basic priority of the client as the execution priority of the corresponding message queue. The system messages in the same message queue have execution priorities corresponding to the base priorities of their clients. I.e. the execution priority of the system messages in the same message queue is the same as the base priority of their corresponding clients.
There may be a plurality of message queues each including a plurality of system messages, and the system simulation system preferentially operates the message queue with high execution priority. As particularly shown in fig. 3.
Comparing the execution priority of each message queue, and taking the message queue with the highest execution priority as a target message queue. In the embodiment of the application, the message queues are ordered according to the execution priority, wherein the message queue with the highest execution priority is used as the target message queue and is executed preferentially.
The generation time of the system message in the target message queue is obtained. In the embodiment of the application, there may be a message queue containing a plurality of system messages, but a plurality of system messages are hardly generated at the same time in the same message queue, and the generation time of the system messages can be obtained by acquiring the source of the system messages.
The target system message in the target message queue is determined based on the generation time. In the embodiment of the application, according to the generation time of the system message, the system message generated earliest in the target message queue is taken as the target system message.
And executing the target system message in the current time slice corresponding to the target message queue, and immediately distributing the target system message to an idle working thread for processing when the target system message enters the system. Only after this worker thread completes processing the target system message can the next system message be processed.
Detecting whether the target system message can be executed or not at the time on the current time slice.
The second execution module 404 is configured to execute the second step if the current time slice cannot execute the target system message. The second step comprises: and iteratively acquiring the next time slice of the current time slice and taking the next time slice as the current time slice until the current time slice can execute the target system message. The second execution module 404 is specifically configured to iteratively acquire a next time slice of the current time slice and take the next time slice as the current time slice. Specifically, when the target system message is not executed in the current time slice, according to the order of the execution priorities, the time slice corresponding to the execution priority with the nearest execution priority corresponding to the current time slice, namely the next time slice, is obtained, and the next time slice is taken as the current time slice.
The target system message is executed over the current time slice. Specifically, the remaining target system message is executed by using the current time slice, and whether the remaining part of the target system message can be executed by the current time slice is judged again. If the current time slice cannot execute the remaining portion of the target system message, execution continues with the second execution module 404. If the current time slice can execute the remaining portion of the target system message, then a third execution module 405 is executed.
The third execution module 405 is configured to execute the third step if the current time slice can execute the target system message. The third step comprises: and updating the message state of the system message in each message queue, and judging whether the message state completely meets the completion state. And if the message states do not all meet the completion state, executing the first step until the message states of all the system messages all meet the completion state. The third execution module 405 is specifically configured to update a message status of the system message in each message queue. In the embodiment of the application, the message states include an unread state, an unexecuted state, a revoked state, an executing state, a terminating state, an ending state and a read state. The above states are determined by the life cycle of system messages in the system simulation system, and the conversion relationship between the states of the messages is shown in fig. 6.
And judging whether the message states all meet the completion state. In the embodiment of the application, the completion state includes a revocation state, a termination state and an end state. If the information states of all the system messages in the target message queue meet the completion state, judging the information states of the system messages in other message queues. If the information states of the system messages in the other message queues do not all meet the completion state, executing the first executing module 403 by all the message queues containing the system messages which do not meet the completion state until the message states of the system messages in all the message queues are all the completion state, and executing the displaying module 406.
The display module 406 is configured to obtain a scheduling result of the system simulation system if the message states all satisfy the completion state. The presentation module 406 is specifically configured to obtain a scheduling result including an execution sequence and an execution time of all system messages. In one embodiment of the present application, the scheduling results are presented in a visual manner.
Some of the modules of the apparatus described herein may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The apparatus or module set forth in the embodiments of the application may be implemented in particular by a computer chip or entity, or by a product having a certain function. For convenience of description, the above devices are described as being functionally divided into various modules, respectively. The functions of the modules may be implemented in the same piece or pieces of software and/or hardware when implementing the embodiments of the present application. Of course, a module that implements a certain function may be implemented by a plurality of sub-modules or a combination of sub-units.
The methods, apparatus or modules described herein may be implemented in computer readable program code means and in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (english: application Specific Integrated Circuit; abbreviated: ASIC), programmable logic controllers and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory.
The embodiment of the application also provides equipment, which comprises: a processor; a memory for storing processor-executable instructions; the processor, when executing the executable instructions, implements a method as described in embodiments of the present application.
In addition, each functional module in the embodiments of the present invention may be integrated into one processing module, each module may exist alone, or two or more modules may be integrated into one module.
From the description of the embodiments above, it will be apparent to those skilled in the art that the present application may be implemented in software plus necessary hardware. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, or may be embodied in the implementation of data migration.
In this specification, each embodiment is described in a progressive manner, and the same or similar parts of each embodiment are referred to each other, and each embodiment is mainly described as a difference from other embodiments. All or portions of the present application can be used in a number of general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the present application; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced with equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions.

Claims (9)

1. A system simulation-oriented resource cross-platform integration and scheduling method is characterized by comprising the following steps:
setting basic priority for a client in a system simulation system, and distributing time slices for the client;
acquiring message information and message state of system messages in the system simulation system;
dividing a message queue according to the message information and determining the execution priority of the message queue, wherein the method specifically comprises the following steps: determining the client corresponding to the system message according to the message information; dividing the system messages of the same client into the same message queue; taking the basic priority of the client as the execution priority of the corresponding message queue;
executing the first step;
the first step includes: determining a target message queue to be executed and a target system message in the target message queue according to the execution priority, executing the target system message in a current time slice corresponding to the target message queue, and checking whether the current time slice can execute the target system message;
if the current time slice can not execute the target system message, executing a second step;
The second step includes: iteratively acquiring a next time slice of the current time slice and taking the next time slice as the current time slice until the current time slice can execute the target system message;
if the current time slice can execute the target system message, executing a third step;
the third step includes: updating the message states of the system messages in the message queues, and judging whether the message states all meet the completion state;
if the message states do not all meet the completion state, executing the first step until all the message states of the system messages meet the completion state;
and if the message states all meet the completion state, a scheduling result of the system simulation system is obtained.
2. The method of claim 1, wherein the assigning a time slice to the client comprises:
ordering the base priorities of the clients;
and distributing the time slices to the clients according to the sequencing result, wherein the lengths of the time slices increase with the distribution sequence.
3. The method of claim 1, wherein the obtaining message information for system messages in the hierarchy simulation system comprises:
Defining message format criteria for the system messages in the hierarchy simulation system;
the message format standard comprises the address of the client corresponding to the system message, the function of the client, the source, the destination and the message command of the system message;
and acquiring the address of the client and the source of the system message in the message format standard corresponding to the system message to obtain the message information.
4. The method of claim 1, wherein the message state comprises an unread state, an unexecuted state, a revoked state, an executing state, a terminated state, an end state, and a read state.
5. The method of claim 1, wherein said determining the target message queue to be executed and the target system message therein based on the execution priority comprises:
comparing the execution priority of each message queue, and taking the message queue with the highest execution priority as a target message queue;
acquiring the generation time of the system message in the target message queue;
determining the target system message in the target message queue according to the generation time.
6. The method of claim 4, wherein the completion status comprises a revocation status, a termination status, and an end status.
7. The method of claim 6, wherein said performing said first step until said message status of all said system messages all satisfy said completion status further comprises:
and judging the message queue to which the system message which does not meet the completion state belongs.
8. The system simulation oriented resource cross-platform integration and scheduling device is characterized by comprising:
the distribution module is used for setting basic priority for a client in the system simulation system and distributing time slices for the client;
the acquisition module is used for acquiring the message information and the message state of the system message in the system simulation system;
the first execution module is configured to divide a message queue according to the message information and determine an execution priority of the message queue, and specifically is: determining the client corresponding to the system message according to the message information; dividing the system messages of the same client into the same message queue; taking the basic priority of the client as the execution priority of the corresponding message queue; executing the first step; the first step includes: determining a target message queue to be executed and a target system message in the target message queue according to the execution priority, executing the target system message in a current time slice corresponding to the target message queue, and checking whether the current time slice can execute the target system message;
The second execution module is used for executing a second step if the current time slice cannot execute the target system message; the second step includes: iteratively acquiring a next time slice of the current time slice and taking the next time slice as the current time slice until the current time slice can execute the target system message;
a third execution module, configured to execute a third step if the current time slice can execute the target system message; the third step includes: updating the message states of the system messages in the message queues, and judging whether the message states all meet the completion state; if the message states do not all meet the completion state, executing the first step until all the message states of the system messages meet the completion state;
and the display module is used for obtaining a scheduling result of the system simulation system if the message states all meet the completion state.
9. An apparatus for performing a system emulation oriented resource cross-platform integration and scheduling method, comprising:
a processor;
a memory for storing processor-executable instructions;
The processor, when executing the executable instructions, implements the method of any one of claims 1 to 7.
CN202311336607.2A 2023-10-17 2023-10-17 System simulation-oriented resource cross-platform integration and scheduling method and device Active CN117076138B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311336607.2A CN117076138B (en) 2023-10-17 2023-10-17 System simulation-oriented resource cross-platform integration and scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311336607.2A CN117076138B (en) 2023-10-17 2023-10-17 System simulation-oriented resource cross-platform integration and scheduling method and device

Publications (2)

Publication Number Publication Date
CN117076138A CN117076138A (en) 2023-11-17
CN117076138B true CN117076138B (en) 2024-02-23

Family

ID=88706476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311336607.2A Active CN117076138B (en) 2023-10-17 2023-10-17 System simulation-oriented resource cross-platform integration and scheduling method and device

Country Status (1)

Country Link
CN (1) CN117076138B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739781A (en) * 2012-06-13 2012-10-17 苏州阔地网络科技有限公司 Batch scheduling method and system of messages
CN106095545A (en) * 2016-06-01 2016-11-09 东软集团股份有限公司 Method for scheduling task and device
CN106293918A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of dispatch the method for process, system and computer
CN110297701A (en) * 2019-05-16 2019-10-01 平安科技(深圳)有限公司 Data processing operation dispatching method, device, computer equipment and storage medium
CN110427256A (en) * 2019-07-23 2019-11-08 中南民族大学 Job scheduling optimization method, equipment, storage medium and device priority-based
CN110662085A (en) * 2019-10-16 2020-01-07 北京字节跳动网络技术有限公司 Message sending method, device, readable medium and electronic equipment
CN111897637A (en) * 2020-07-15 2020-11-06 重庆紫光华山智安科技有限公司 Job scheduling method, device, host and storage medium
CN114461365A (en) * 2022-02-08 2022-05-10 中国农业银行股份有限公司 Process scheduling processing method, device, equipment and storage medium
CN115509716A (en) * 2022-10-13 2022-12-23 广东三维家信息科技有限公司 Task scheduling method, system and storage medium
CN116760784A (en) * 2023-07-11 2023-09-15 北京科技大学 OPC UA key message scheduling method based on priority and running time

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8924976B2 (en) * 2011-08-26 2014-12-30 Knu-Industry Cooperation Foundation Task scheduling method and apparatus

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739781A (en) * 2012-06-13 2012-10-17 苏州阔地网络科技有限公司 Batch scheduling method and system of messages
CN106095545A (en) * 2016-06-01 2016-11-09 东软集团股份有限公司 Method for scheduling task and device
CN106293918A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of dispatch the method for process, system and computer
CN110297701A (en) * 2019-05-16 2019-10-01 平安科技(深圳)有限公司 Data processing operation dispatching method, device, computer equipment and storage medium
CN110427256A (en) * 2019-07-23 2019-11-08 中南民族大学 Job scheduling optimization method, equipment, storage medium and device priority-based
CN110662085A (en) * 2019-10-16 2020-01-07 北京字节跳动网络技术有限公司 Message sending method, device, readable medium and electronic equipment
CN111897637A (en) * 2020-07-15 2020-11-06 重庆紫光华山智安科技有限公司 Job scheduling method, device, host and storage medium
CN114461365A (en) * 2022-02-08 2022-05-10 中国农业银行股份有限公司 Process scheduling processing method, device, equipment and storage medium
CN115509716A (en) * 2022-10-13 2022-12-23 广东三维家信息科技有限公司 Task scheduling method, system and storage medium
CN116760784A (en) * 2023-07-11 2023-09-15 北京科技大学 OPC UA key message scheduling method based on priority and running time

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Qiang Wang.An inter-application and inter-client priority-based QoS proxy architecture for heterogeneous networks.《10th IEEE Symposium on Computers and Communications (ISCC'05)》.2005,全文. *
微内核结构嵌入式实时操作系统的研究与设计;邓昀;程小辉;王新政;;微电子学与计算机(10);全文 *

Also Published As

Publication number Publication date
CN117076138A (en) 2023-11-17

Similar Documents

Publication Publication Date Title
US11934868B2 (en) Systems and methods for scheduling tasks
US8185903B2 (en) Managing system resources
CN113535367B (en) Task scheduling method and related device
KR100509794B1 (en) Method of scheduling jobs using database management system for real-time processing
CN110825535B (en) Job scheduling method and system
CN111950988B (en) Distributed workflow scheduling method and device, storage medium and electronic equipment
Hiltunen et al. Real-time dependable channels: Customizing QoS attributes for distributed systems
WO2024021489A1 (en) Task scheduling method and apparatus, and kubernetes scheduler
US20220179711A1 (en) Method For Platform-Based Scheduling Of Job Flow
WO2024016596A1 (en) Container cluster scheduling method and apparatus, device, and storage medium
CN107682389B (en) Method, terminal and computer readable storage medium for executing network request
CN116414534A (en) Task scheduling method, device, integrated circuit, network equipment and storage medium
CN117076138B (en) System simulation-oriented resource cross-platform integration and scheduling method and device
CN113032125A (en) Job scheduling method, device, computer system and computer-readable storage medium
CN115309558A (en) Resource scheduling management system, method, computer equipment and storage medium
CN110912949B (en) Method and device for submitting sites
US20130145004A1 (en) Provisioning using presence detection
CN115168040A (en) Job preemption scheduling method, device, equipment and storage medium
US20220276901A1 (en) Batch processing management
CN114490000A (en) Task processing method, device, equipment and storage medium
CN113703930A (en) Task scheduling method, device and system and computer readable storage medium
Kumar et al. An algorithm for online reconfiguration of resource reservations for hard real-time systems
CN106484536B (en) IO scheduling method, device and equipment
Ran et al. Making sense of runtime architecture for mobile phone software
Li et al. Design and analysis of a new distributed scheduling approach

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant