System service scheduling method and device, computer device and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MATTER INNOVATION PTE LTD
- Filing Date
- 2024-01-19
- Publication Date
- 2026-05-29
Smart Images

Figure CN119376872B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically to system service scheduling methods, apparatus, computer equipment, and storage media. Background Technology
[0002] During the execution of instructions by a smart device, scheduling and execution between multiple system services may be involved. However, in existing technologies, after the model sends the task to the device-side interaction engine, when the interaction engine calls the corresponding system services to implement the task, task delay issues may occur due to thread contention 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 chaotic 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 a pre-set model to identify pre-acquired instruction information and determine user intent;
[0006] Identify the task list included in the user's intent. The task list includes task information and system service information corresponding to the task information. The task information corresponds to at least one system service information.
[0007] Generate a system service dependency tree based on task information, at least one system service information, and the relationships between each system service information.
[0008] Based on task information and the system service dependency tree, schedule system services and execute instruction information.
[0009] Beneficial effects include: using a pre-defined model to identify pre-acquired instruction information and determine user intent, thereby improving the efficiency of instruction information recognition; identifying the task list in the user intent, which includes task information and corresponding system service information; generating a system service dependency tree based on the task information, at least one system service, and the relationships between each system service, ensuring the rational allocation and effective utilization of system resources and avoiding resource waste; and scheduling system services and executing instruction information based on task information and the system service dependency tree, thereby improving task execution efficiency.
[0010] In an optional implementation, before scheduling system services and executing instruction information based on task information and the system service dependency tree, the method further includes:
[0011] Clear and / or stop system service processes except for system services in the system service dependency tree;
[0012] Alternatively, the execution priority of system services in the system service dependency tree can be set to the highest priority among all system service processes.
[0013] In one optional implementation, system services are scheduled and instruction information is executed based on task information and the system service dependency tree, specifically including:
[0014] Start all system services in the system service dependency tree based on the system service dependency tree;
[0015] Based on task information and the system service dependency tree, the system service execution instructions are scheduled sequentially.
[0016] In one optional implementation, all system services in the system service dependency tree are started according to the system service dependency tree, specifically including:
[0017] Generate system service instructions based on the execution order of system services in the system service dependency tree;
[0018] Based on the system service system instructions, start all system services corresponding to the system service dependency tree in sequence.
[0019] In one alternative implementation, 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] The intent determination module is used to identify pre-acquired instruction information using a preset model to determine the user's intent;
[0022] The task identification module is used to identify the list of tasks included in the user's intent. The task list includes task information and system service information corresponding to the task information. The task information corresponds to at least one system service information.
[0023] The dependency tree determination module is used to generate a system service dependency tree based on task information, at least one system service information, and the relationships between each system service information.
[0024] The instruction execution module is used to schedule system services and execute instruction information based on task information and the system service dependency tree.
[0025] In an optional implementation, before scheduling system services and executing instruction information based on task information and the system service dependency tree, the apparatus is further configured to:
[0026] Clear and / or stop system service processes except for system services in the system service dependency tree;
[0027] Alternatively, the execution priority of system services in the system service dependency tree can be set to the highest priority among all system service processes.
[0028] Thirdly, the present invention provides a computer device, including: 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 computer instructions to perform the system service scheduling method described in the first aspect or any corresponding embodiment thereof.
[0029] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the system service scheduling method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0030] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0031] Figure 1 This is a flowchart of a system service scheduling method according to an embodiment of the present invention;
[0032] Figure 2 This is a flowchart of another system service scheduling method according to an embodiment of the present invention;
[0033] Figure 3 This is a schematic diagram of a system service scheduling method according to an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of a system service scheduling method according to an embodiment of the present invention;
[0035] Figure 5 This is a structural block diagram of a system service scheduling device according to an embodiment of the present invention;
[0036] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] This embodiment provides a system service scheduling method. Figure 1 This is a flowchart of a system service scheduling method according to an embodiment of the present invention. This method can be applied to mobile phones, computers, and other smart devices. It should be noted that the steps shown in the flowchart can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0039] like Figure 1 As shown, the service scheduling method of this system includes the following steps:
[0040] Step S101: Use a preset model to identify the pre-acquired instruction information and determine the user's intent.
[0041] For example, a preset model can recognize user command information. The preset model is trained using a known dataset of user intents, enabling it to learn and recognize user intents. Specifically, this can be the application of machine learning or deep learning algorithms to improve the accuracy of user intent recognition by training the model.
[0042] After obtaining the raw instruction information, it can be cleaned, filtered, and formatted to facilitate subsequent processing and analysis. This may include removing irrelevant information, correcting erroneous data, and standardizing data formats. Features related to user intent are then extracted 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 way user intent is represented. The purpose of feature extraction is to transform the raw data into feature vectors that can be used for model training and recognition.
[0043] The pre-processed instruction information is input into a trained model for processing. Through the model's analysis and inference, the user's intent is identified. Specifically, this may include technologies such as natural language processing, speech recognition, and image recognition, depending on the specific application scenario and the form of user input. The identified user intent is then output in an appropriate form to facilitate subsequent processing and execution. This may include generating corresponding instructions, recommendations, feedback, and other operations, depending on the specific application requirements.
[0044] Step S102: Identify the task list included in the user intent. The task list includes task information and system service information corresponding to the task information. The task information corresponds to at least one system service information.
[0045] For example, a user intent could be "send a YY image to user XX on WeChat." The corresponding task information would then be sending the image to user XX on WeChat, and the corresponding system service information would be the image system, the image recognition system, and the WeChat system—that is, at least one system service corresponding to one task. Specifically, natural language generation technology can be used to convert the task information into instructions or requests in natural language form. By combining this with natural language processing technology, the system service corresponding to the user intent can be determined.
[0046] Step S103: Generate a system service dependency tree based on task information, at least one system service information, and the relationships between each system service information.
[0047] For example, constructing a system service dependency tree can more accurately and clearly determine the execution relationship between task information and system services, as well as the dependencies between system services.
[0048] Specifically, this can be implemented using a graph model: a graph model is used to represent the dependencies between system services. Nodes in the graph model represent system services, and edges represent the dependencies between services. Based on task information and system service information, an initial graph model is constructed, connecting related system services. Further analysis of the inputs and outputs of each system service determines their dependencies and order. Based on the analysis results, the graph model is optimized and adjusted to determine the final system service dependency tree.
[0049] Step S104: Based on the task information and the system service dependency tree, schedule system services and execute instruction information.
[0050] For example, based on the order of each system service in the system service dependency tree, the corresponding data information can be determined. Based on the instruction information corresponding to each system service, the task information here could be recognizing YY images, opening the image system, and opening WeChat and sending YY images.
[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 service dependencies. A graph algorithm (such as topological sorting) is used to traverse the graph to determine the execution order of the services. Based on the algorithm's result, services are scheduled and instruction information is executed.
[0052] In a preferred embodiment, prior to step S104, system service processes other than those in the system service dependency tree may also be cleared and / or stopped.
[0053] Alternatively, the execution priority of system services in the system service dependency tree can be set to the highest priority among all system service processes.
[0054] This is more conducive to ensuring the timely execution of corresponding system services in the system service dependency tree and avoiding task delays.
[0055] In a preferred embodiment, step S104 specifically includes:
[0056] Step S1041: Start 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 where tasks trigger the execution of other related services. Based on task information and the system service dependency tree, the triggering conditions for the event and the response logic of the related services are determined. When an event is triggered, the related services execute according to predefined logic. This approach can quickly respond to changes and the occurrence of events.
[0058] In a preferred embodiment, such as Figure 2 As shown, step S1041 above includes:
[0059] Step a1: Generate system service system instructions according to the execution order of system services in the system service dependency tree;
[0060] Step a2: According to the system service system instructions, start all system services corresponding to the system service dependency tree in sequence.
[0061] For example, the system service dependency tree is traversed to determine the execution order and dependencies of each service. Based on the execution order and dependencies, corresponding system service instructions are generated. Each instruction should contain information such as the service identifier, startup parameters, and dependencies.
[0062] Start the corresponding system services sequentially according to the system service instructions. Service startup and management can be achieved using the system's service management tools or scripts. 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. During service startup, monitor the service status and performance indicators to ensure service stability and reliability. If errors or exceptions occur during startup, appropriate error handling and logging should be performed for subsequent troubleshooting and resolution.
[0063] Step S1042: Based on the task information and the system service dependency tree, schedule the system service execution instruction information in sequence.
[0064] For example, when an event is triggered, the relevant services will execute according to predefined logic. This approach can quickly respond to changes and events. Here, event triggering refers to the execution of instructions according to the execution order of the system service dependency tree, so as to realize user intent in a timely manner, avoid the problem of disordered execution order, and improve execution efficiency and accuracy.
[0065] The following example further illustrates the above embodiments. Figure 3 The diagram shown illustrates the execution process of a task in the prior art. The instruction process is as follows:
[0066] 1) After the large model identifies the user's intent, it issues a task list;
[0067] 2) The local human-computer interaction engine calls the corresponding system services to complete the task execution;
[0068] 3) During execution, if a system service or a service that the service depends on is not started, start the corresponding service in sequence, and then continue to complete the task.
[0069] like Figure 4 The diagram illustrates the task execution process described in the above embodiments. Before task execution, it is necessary to generate a dependency tree of the system services that the task depends on, i.e., a dependency graph; start the dependent system services in advance (to avoid JIT); increase the priority of the dependent system services to avoid preemption; and clear useless background applications and services to free up computing power and memory.
[0070] For example, 1) User instruction: Send Kevin the photos of the puppy I took yesterday.
[0071] 2) After the large model is parsed, the task is sent to the interaction engine.
[0072] 3) The interaction engine transmits the task to DGM.
[0073] 4) DGM analyzes and generates system services that the task depends on.
[0074] For example, it depends on the Photos app (not started), WeChat (not started), and image recognition service (not started).
[0075] 1) DGM initiates parallel messages to synchronously start the above two applications and one system service and increases their process priority;
[0076] 2) DGM clears invalid background applications such as system settings and TikTok, freeing up computing power and memory;
[0077] 3) DGM calls the corresponding service / application to complete the task of distributing the large model.
[0078] The system service scheduling method provided in this embodiment utilizes a preset model to identify pre-acquired instruction information and determine user intent, thereby improving the efficiency of instruction information identification. It identifies a task list within the user intent, where the task list includes task information and corresponding system service information. Based on the task information, at least one system service, and the relationships between each system service, a system service dependency tree is generated, ensuring the rational allocation and effective utilization of system resources and avoiding resource waste. Based on the task information and the system service dependency tree, system services are scheduled and instruction information is executed, improving task execution efficiency.
[0079] This embodiment also provides a system service scheduling device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0080] This embodiment provides a system service scheduling device, such as Figure 5 The device includes:
[0081] The intent determination module 501 is used to identify pre-acquired instruction information using a preset model to determine the user's intent;
[0082] The task identification module 502 is used to identify the task list included in the user intent. The task list includes task information and system service information corresponding to the task information. The task information corresponds to at least one system service information.
[0083] The dependency tree determination module 503 is used to generate a system service dependency tree based on task information, at least one system service information, and the relationships between each system service information.
[0084] The instruction execution module 504 is used to schedule system services and execute instruction information based on task information and system service dependency tree.
[0085] In some alternative implementations, before scheduling system services and executing instruction information based on task information and the system service dependency tree, the apparatus is further configured to:
[0086] Clear and / or stop system service processes except for system services in the system service dependency tree;
[0087] Alternatively, the execution priority of system services in the system service dependency tree can be set to the highest priority among all system service processes.
[0088] In some optional implementations, the execution instruction module specifically includes:
[0089] The system startup unit is used to start all system services in the system service dependency tree according to the system service dependency tree.
[0090] The scheduling and execution unit is used to schedule the execution instructions of system services in sequence according to the task information and the system service dependency tree.
[0091] In some alternative implementations, activating the system unit specifically includes:
[0092] The generation scheduling instruction subunit is used to generate system service system instructions according to the execution order of system services in the system service dependency tree;
[0093] The startup system subunit is used to sequentially start all system services corresponding to the system service dependency tree according to the system service system instructions.
[0094] In some alternative implementations, instruction information is executed in AOT mode.
[0095] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0096] In this embodiment, the system service scheduling device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0097] This invention also provides a computer device having the above-described features. Figure 5 The system service scheduling device shown.
[0098] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0099] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0100] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0101] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0102] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0103] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0104] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0105] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A system service scheduling method, characterized in that, The method includes: Use a pre-set model to identify pre-acquired instruction information and determine user intent; Identify the task list included in the user intent, 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; Based on the task information, the at least one system service information, and the relationships between each system service information, a system service dependency tree is generated. The system service dependency tree is used to represent the dependency relationships between system services and to increase the process priority of dependent services in the system service dependency tree. Based on the task information and the system service dependency tree, the system service is scheduled and the instruction information is executed in AOT mode. The instruction information includes the service identifier, startup parameters, and dependencies. Before scheduling the system service and executing the instruction information based on the task information and the system service dependency tree, the method further includes: Clear and / or stop system service processes other than those in the system service dependency tree; Alternatively, the execution priority of system services in the system service dependency tree can be set to the highest priority among all system service processes.
2. The method according to claim 1, characterized in that, The step of scheduling the system service and executing the instruction information based on 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; Based on the task information and the system service dependency tree, the system services are sequentially scheduled to execute the instruction information.
3. The method according to claim 2, characterized in that, The step of starting all system services in the system service dependency tree according to the system service dependency tree specifically includes: Based on the execution order of system services in the system service dependency tree, system service system instructions are generated; According to the system service system instructions, all system services corresponding to the system service dependency tree are started sequentially.
4. A system service scheduling device, characterized in that, The device includes: The intent determination module is used to identify pre-acquired instruction information using a preset model to determine the user's intent; The task identification module is used to identify a list of tasks included in the user intent. The task list includes task information and system service information corresponding to the task information. The task information corresponds to at least one system service information. The dependency tree determination module is used to generate a system service dependency tree based on the task information, the at least one system service information, and the interrelationships between each system service information. The system service dependency tree is used to represent the dependency relationships between system services and to prioritize the processes of dependent services in the system service dependency tree. The 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. The instruction information includes the service identifier, startup parameters, and dependency relationships. Before scheduling the system service and executing the instruction information in AOT mode based on the task information and the system service dependency tree, the device is further configured to: Clear and / or stop system service processes other than those in the system service dependency tree; Alternatively, the execution priority of system services in the system service dependency tree can be set to the highest priority among all system service processes.
5. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the system service scheduling method of any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the system service scheduling method according to any one of claims 1 to 3.