System service scheduling method and device, computer equipment and storage medium
By generating system services to rely on trees and scheduling system services, the problem delay of task delay caused by the confusion of system service scheduling in existing technology, and improved instruction recognition efficiency and task execution efficiency.
Patent Information
- Application Number
- CN202410081753.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-01-19
AI Technical Summary
In the prior art, the system service scheduling is chaotic, resulting in the problem of task delay.
By using the preset model to identify the pre -obtained instruction information, determine the user's intent, and generate system services to dependence on trees based on the relationship between task information, system service information, and system services, and then schedule system services and execute instruction information.
Improve the identification efficiency of instruction information, ensure the reasonable allocation and effective use of system resources, avoid waste of resources, and improve the implementation efficiency of tasks.
Smart Images

Figure CN119376872A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a system service scheduling method, device, computer equipment and storage medium. Background Art
[0002] The instruction execution process of smart devices may involve scheduling and executing between multiple system services. However, in the prior art, after the model sends the task to the device-side interaction engine, the interaction engine will call the corresponding system service to implement the task. Task delays may occur due to thread preemption between different system services. Summary of the invention
[0003] In view of this, the present invention provides a system service scheduling method, apparatus, computer equipment and storage medium to solve the problem of task delay caused by confusion in system service scheduling when executing instructions.
[0004] In a first aspect, the present invention provides a system service scheduling method, the method comprising:
[0005] Use the preset model to identify the pre-acquired instruction information and determine the user's intention;
[0006] Identify a task list included in the user intention, the task list includes task information and system service information corresponding to the task information, and the task information corresponds to at least one system service information;
[0007] Generate a system service dependency tree according to the task information, at least one system service information and the relationship between each system service information;
[0008] Schedule system services and execute instruction information based on task information and system service dependency tree.
[0009] Beneficial effects: using a preset model to identify pre-acquired instruction information, determining user intent, and improving instruction information recognition efficiency; identifying a task list in user intent, wherein the task list includes task information and system service information corresponding to the task information, and generating a system service dependency tree based on the task information, at least one system service information, and the relationship between each system service information, thereby ensuring reasonable allocation and effective utilization of system resources and avoiding waste of resources; scheduling system services and executing instruction information based on the task information and the system service dependency tree, thereby improving task execution efficiency.
[0010] In an optional implementation, before scheduling the system service and executing the instruction information according to the task information and the system service dependency tree, the method further includes:
[0011] Clear and / or stop system service processes except those in the system service dependency tree;
[0012] Alternatively, the priority of the execution order of the system service in the system service dependency tree is set to be the priority execution among all system service processes.
[0013] In an optional implementation, scheduling system services and executing instruction information according to task information and a system service dependency tree specifically includes:
[0014] Start all system services in the system service dependency tree according to the system service dependency tree;
[0015] According to the task information and the system service dependency tree, the system service execution instruction information is scheduled in sequence.
[0016] In an optional implementation, starting all system services in the system service dependency tree according to the system service dependency tree specifically includes:
[0017] Generate system service system instructions according to the execution order between system services in the system service dependency tree;
[0018] According to the system service system instructions, all system services corresponding to the system service dependency tree are started in sequence.
[0019] In an optional implementation, the instruction information is executed in AOT mode.
[0020] In a second aspect, the present invention provides a system service scheduling device, the device comprising:
[0021] An intention determination module is used to identify pre-acquired instruction information using a preset model and determine the user's intention;
[0022] A task identification module, used to identify a task list included in the user's intention, the task list includes task information and system service information corresponding to the task information, and the task information corresponds to at least one system service information;
[0023] A dependency tree determination module is used to generate a system service dependency tree according to the task information, at least one system service information and the relationship between each system service information;
[0024] The execution instruction module is used to schedule system services and execute instruction information according to task information and system service dependency tree.
[0025] In an optional implementation, before scheduling the system service and executing the instruction information according to the task information and the system service dependency tree, the device is further configured to:
[0026] Clear and / or stop system service processes except those in the system service dependency tree;
[0027] Alternatively, the priority of the execution order of the system service in the system service dependency tree is set to be the priority execution among all system service processes.
[0028] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the system service scheduling method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0029] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the system service scheduling method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 is a flow chart of a system service scheduling method according to an embodiment of the present invention;
[0032] Figure 2 is a flow chart of another system service scheduling method according to an embodiment of the present invention;
[0033] Figure 3 is a schematic diagram of a system service scheduling method according to an embodiment of the present invention;
[0034] Figure 4 is a schematic diagram of a system service scheduling method according to an embodiment of the present invention;
[0035] Figure 5 is a structural block diagram of a system service scheduling device according to an embodiment of the present invention;
[0036] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0038] In this embodiment, a system service scheduling method is provided. Figure 1 is a flowchart of a system service scheduling method according to an embodiment of the present invention. The method can be applied to mobile phones, computers and other smart devices. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0039] like Figure 1 As shown, the process of the system service scheduling method includes the following steps:
[0040] Step S101, using a preset model to identify pre-acquired instruction information and determine the user's intention.
[0041] Exemplarily, the preset model can recognize the user's instruction information. The preset model is trained by using a known user intent data set to enable it to learn and recognize user intent. Specifically, it can be the application of machine learning or deep learning algorithms to improve its recognition accuracy of user intent by training the model.
[0042] After obtaining the original instruction information, the original instruction information can be cleaned, filtered and formatted as necessary to facilitate subsequent processing and analysis. This may include removing irrelevant information, correcting erroneous data, unifying data formats, and other operations. Extract features related to user intent from the preprocessed instruction information. These features can be in the form of text, sound, images, etc., depending on the specific instruction information and the representation of user intent. The purpose of feature extraction is to convert raw data into feature vectors that can be used for model training and recognition.
[0043] The pre-processed instruction information is input into the trained model for processing, and the user intention is identified through analysis and inference of the model. Specifically, it can include natural language processing, speech recognition, image recognition and other technologies, depending on the specific application scenario and user input form. The identified user intention is output in an appropriate form for subsequent processing and execution. This may include generating corresponding instructions, recommendations, feedback and other operations, depending on the specific application requirements.
[0044] Step S102, identifying a task list included in the user intention, the task list including task information and system service information corresponding to the task information, the task information corresponding to at least one system service information.
[0045] For example, the user intention may be "send YY picture to XX user of WeChat", so the corresponding task information is to send the picture to XX user of WeChat, and the corresponding system service information is the picture system, image recognition system and WeChat system, that is, at least one system service information corresponding to one task information. Specifically, natural language generation technology can be used to convert task information into instructions or requests in natural language form. By combining with natural language processing technology, the system service corresponding to the user intention will be determined.
[0046] Step S103: Generate a system service dependency tree according to the task information, at least one system service information and the relationship between each piece of system service information.
[0047] Exemplarily, constructing a system service dependency tree can more accurately and clearly determine the execution relationship between task information and system services and the dependency relationship between system services.
[0048] Specifically, the implementation method based on the graph model can be: use the graph model to represent the dependency relationship between system services. The nodes in the graph model represent system services, and the edges in the graph model represent the dependency relationship between services. According to the task information and system service information, an initial graph model is constructed to connect related system services. The input and output of each system service are further analyzed to determine the dependency relationship and sequence between them. According to the analysis results, the graph model is optimized and adjusted to determine the final system service dependency tree.
[0049] Step S104, scheduling system services and executing instruction information according to the task information and the system service dependency tree.
[0050] Exemplarily, the corresponding data information can be determined according to the order of each system service in the system service dependency tree. According to the instruction information corresponding to each system service, the task information here can be identifying YY pictures, opening the picture system, opening WeChat and sending YY pictures.
[0051] Specifically, the system service dependency tree is converted into a directed graph, where each node represents a service and the edges in the graph model represent the dependency relationships of the services. A graph algorithm (such as topological sorting) is used to traverse the graph and determine the execution order of the services. Based on the results of the algorithm, the services are scheduled and the instruction information is executed.
[0052] In a preferred embodiment, before step S104, system service processes other than the system services in the system service dependency tree may also be cleared and / or stopped;
[0053] Alternatively, the priority of the execution order of the system service in the system service dependency tree is set to be the priority execution among all system service processes.
[0054] This is more conducive to ensuring the execution timeliness of the corresponding system services in the system service dependency tree and avoiding task delays.
[0055] In a preferred embodiment, the above step S104 specifically includes:
[0056] Step S1041, starting all system services in the system service dependency tree according to the system service dependency tree;
[0057] For example, an event-driven architecture can be established, in which tasks are used as events to trigger the execution of other related services. According to the task information and the system service dependency tree, the triggering conditions of the event and the response logic of the related services are determined. When the event is triggered, the related services will be executed according to the predefined logic. This method can quickly respond to changes and events.
[0058] In a preferred embodiment, Figure 2 As shown, the above step S1041 includes:
[0059] Step a1, generating system service system instructions according to the execution order between system services in the system service dependency tree;
[0060] Step a2: according to the system service system instruction, start all system services corresponding to the system service dependency tree in sequence.
[0061] Exemplarily, the system service dependency tree is traversed to determine the execution order and dependency relationship of each service. According to the execution order and dependency relationship, the corresponding system service system instruction is generated. Each instruction should contain information such as the service identification, startup parameters, and dependency relationship.
[0062] Start the corresponding system services in sequence according to the order of system service system instructions. You can use the system's service management tools or scripts to start and manage services. For each service, configure and initialize it according to its startup parameters and dependencies. Ensure the normal operation of the service and its collaboration with other services. In the process of starting the service, monitor the status and performance indicators of the service to ensure the stability and reliability of the service. If errors or exceptions occur during the startup process, corresponding error handling and logging should be performed to facilitate subsequent problem investigation and resolution.
[0063] Step S1042, scheduling the system service execution instruction information in sequence according to the task information and the system service dependency tree.
[0064] For example, when an event is triggered, the related services will be executed according to the predefined logic. This method can quickly respond to changes and events. The event trigger here is to execute the instruction information according to the execution order of the system service dependency tree, so as to realize the user's intention in time, avoid the problem of confusion in execution order, and improve execution efficiency and accuracy.
[0065] The above embodiment is further explained below with a specific example. Figure 3 The figure shows a schematic diagram of the execution process of a task in the prior art, and the instruction process is:
[0066] 1) After the big model recognizes the user's intention, it sends the task list;
[0067] 2) The local human-computer interaction engine calls the corresponding system service to complete the task execution;
[0068] 3) During the execution process, if the system service is not started, or the service that the service depends on is not started, start the corresponding services in sequence, and then continue to complete the execution of the task.
[0069] like Figure 4 The figure shows a schematic diagram of the task execution process introduced in the above embodiment. Before the task is executed, it is necessary to generate the system service dependency tree that the task depends on, that is, the dependency graph; start the dependent system services in advance (avoid JIT); increase the priority of the dependent system services to avoid preemption; clear useless background applications and services to free up computing power and memory.
[0070] For example, 1) User instruction: Please send the photo of the puppy I took yesterday to Kevin.
[0071] 2) After the large model is parsed, the task is sent to the interactive engine
[0072] 3) The interaction engine passes the task to the DGM
[0073] 4) DGM analyzes the system services that the task depends on.
[0074] For example, it depends on the photo application (not started), depends on WeChat (not started), and depends on the image recognition service (not started)
[0075] 1) DGM initiates parallel messages to synchronously start the above two applications and one system service and increase their process priorities;
[0076] 2) DGM clears invalid background applications such as system settings, TikTok, etc., to free up computing power and memory;
[0077] 3) DGM calls the corresponding services / applications to complete the tasks issued by the large model.
[0078] The system service scheduling method provided in this embodiment uses a preset model to identify pre-acquired instruction information and determine the user's intention, thereby improving the efficiency of identifying instruction information; identifying a task list in the user's intention, wherein the task list includes task information and system service information corresponding to the task information, and generating a system service dependency tree based on the task information, at least one system service information, and the relationship between each system service information, thereby ensuring the reasonable allocation and effective utilization of system resources and avoiding waste of resources; scheduling system services and executing instruction information based on the task information and the system service dependency tree, thereby improving the execution efficiency of tasks.
[0079] In the present embodiment, a system service scheduling device is also provided, which 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.
[0080] This embodiment provides a system service scheduling device, such as Figure 5 The device comprises:
[0081] The intention determination module 501 is used to identify the pre-acquired instruction information using a preset model to determine the user's intention;
[0082] The task identification module 502 is used to identify a task list included in the user's intention, where the task list includes task information and system service information corresponding to the task information, where the task information corresponds to at least one system service information;
[0083] Determine dependency tree module 503, used to generate a system service dependency tree according to the task information, at least one system service information and the relationship between each system service information;
[0084] The instruction execution module 504 is used to schedule system services and execute instruction information according to the task information and the system service dependency tree.
[0085] In some optional implementations, before scheduling the system service and executing the instruction information according to the task information and the system service dependency tree, the apparatus is further configured to:
[0086] Clear and / or stop system service processes except those in the system service dependency tree;
[0087] Alternatively, the priority of the execution order of the system service in the system service dependency tree is set to be the priority execution among all system service processes.
[0088] In some optional implementations, the execution instruction module specifically includes:
[0089] Start the system unit, which is used to start all system services in the system service dependency tree according to the system service dependency tree;
[0090] The scheduling execution unit is used to schedule the system service execution instruction information in sequence according to the task information and the system service dependency tree.
[0091] In some optional implementations, starting the system unit specifically includes:
[0092] A generation scheduling instruction subunit is used to generate a system service system instruction according to the execution order between system services in the system service dependency tree;
[0093] The startup system subunit is used to start all system services corresponding to the system service dependency tree in sequence according to the system service system instructions.
[0094] In some optional implementations, the instruction information is executed in AOT mode.
[0095] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0096] The system service scheduling device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0097] The embodiment of the present invention also provides a computer device having the above Figure 5 The system service scheduling device shown.
[0098] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0099] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0100] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0101] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device 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.
[0102] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0103] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0104] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0105] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A system service scheduling method, characterized in that: The method comprises: Use the preset model to identify the pre-acquired instruction information and determine the user's intention; identifying a task list included in the user intention, the task list including task information and system service information corresponding to the task information, the task information corresponding to at least one system service information; generating a system service dependency tree according to the task information, the at least one system service information and the relationship between each piece of system service information; According to the task information and the system service dependency tree, the system service is scheduled and the instruction information is executed.
2. The method according to claim 1, characterized in that: Before scheduling the system service and executing the instruction information according to the task information and the system service dependency tree, the method further includes: Clear and / or stop system service processes other than the system services in the system service dependency tree; Alternatively, the priority of the execution order of the system services in the system service dependency tree is set as the priority execution among all system service processes.
3. The method according to claim 1 or 2, characterized in that: The step of scheduling the system service and executing the instruction information according to the task information and the system service dependency tree specifically includes: Start all system services in the system service dependency tree according to the system service dependency tree; According to the task information and the system service dependency tree, the system services are scheduled in sequence to execute the instruction information.
4. The method according to claim 3, characterized in that The starting all system services in the system service dependency tree according to the system service dependency tree specifically includes: Generate system service system instructions according to the execution order between system services in the system service dependency tree; According to the system service system instruction, all system services corresponding to the system service dependency tree are started in sequence.
5. The method according to claim 4, characterized in that The instruction information is executed in AOT mode.
6. A system service scheduling device, characterized in that: The device comprises: An intention determination module is used to identify pre-acquired instruction information using a preset model and determine the user's intention; A task identification module, used to identify a task list included in the user intention, wherein the task list includes task information and system service information corresponding to the task information, wherein the task information corresponds to at least one system service information; A dependency tree determination module is used to generate a system service dependency tree according to the task information, the at least one system service information and the relationship between each system service information; An execution instruction module is used to schedule the system service and execute the instruction information according to the task information and the system service dependency tree.
7. The device according to claim 6, characterized in that Before scheduling the system service and executing the instruction information according to the task information and the system service dependency tree, the device is further used to: Clear and / or stop system service processes other than the system services in the system service dependency tree; Alternatively, the priority of the execution order of the system services in the system service dependency tree is set as the priority execution among all system service processes.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the system service scheduling method according to any one of claims 1 to 5 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the system service scheduling method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Service scheduling method and device and robot service system
CN106777135A
Application program starting method and device, storage medium and electronic equipment
CN110442396A
Service orchestration method, service orchestration system, storage medium and electronic equipment
CN116938931A
Information processing method, information processing device, computer equipment and storage medium
CN117273017A
Computer system process scheduler determining and executing processes based upon changeable priorities
US6108683A