Operation system control method and system based on large model

By employing a large-model-based operating system control method and utilizing natural language instruction processing and API matching technology, the technical hurdle of operating system control has been overcome, enabling intelligent operating system calls and improving user experience and system security.

CN122064508APending Publication Date: 2026-05-19SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Filing Date
2026-02-03
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing operating system control technologies have high operational barriers. Traditional command-line operating systems require memorizing a large number of instruction syntaxes, while graphical interface operating systems require explicitly setting the entry point, making it impossible to achieve intelligent operating system calls.

Method used

The system adopts a large model-based operating system control method. By receiving natural language commands, it uses the large model to extract entities and recognize intents, generates structured parameters, matches APIs from a preset API information dictionary, and constructs API call code to execute user commands.

Benefits of technology

It enables intelligent invocation of operating system functions, lowers the operational threshold, improves user experience and system security, and ensures accurate execution of instructions and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064508A_ABST
    Figure CN122064508A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an operating system control method and system based on a large model. According to the method, firstly, a current natural language instruction is received, whether the instruction is an executable instruction or not is determined by using a large model, and a reliable data foundation is laid for subsequent data processing and analysis; secondly, performing entity extraction and intention recognition operation on the instruction which is confirmed to be executable by using a large model, and generating a structured parameter, so as to accurately extract key entity information in the current natural language instruction and clarify a user intention; matching a plurality of possible original APIs for the current natural language instruction from a preset API information dictionary based on the generated structured parameters, and selecting a required API to call the API to perform instruction processing analysis; and finally, on the basis of the original API information, using a large model to construct API calling parameters, generating corresponding API calling codes to execute user instructions and output corresponding natural language execution results, and realizing intelligent calling of operation system functions through interaction of natural languages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and system for controlling an operating system based on a large model. Background Technology

[0002] With the rapid development of computer and information technology, the operating system, as the core carrier of software and hardware resource scheduling, has become a core requirement for improving user experience and ensuring efficient business operation through its efficient control and convenient interaction.

[0003] However, existing operating system control technologies have certain operational barriers. For example, the traditional command-line operating system Linux requires users to memorize a large number of command syntaxes, while the graphical interface operating system Windows requires users to know the location of a certain setting entry point, modify a large number of registry keys, and handle configuration issues, thus making it impossible to achieve intelligent operation of the operating system. Summary of the Invention

[0004] The embodiments of the present invention provide an operating system control method and system based on a large model, which can realize intelligent operation of the operating system.

[0005] In a first aspect, embodiments of the present invention provide an operating system control method based on a large model, the method comprising: Receive the current natural language instruction input by the current user and use a large model to determine whether the current natural language instruction is an executable instruction; When the current natural language instruction is determined to be the executable instruction, entity extraction and intent recognition are performed on the current natural language instruction, and structured parameters are generated. Based on the structured parameters, at least one original API is matched for the current natural language instruction from a preset API information dictionary; API call parameters are constructed based on the at least one original API and corresponding API call code is generated. The API call code is then executed to output natural language execution results.

[0006] Preferably, The step of receiving the current natural language instruction input by the current user and using a large model to determine whether the current natural language instruction is an executable instruction includes: Receive the current natural language instruction input by the current user, and classify the current natural language instruction using the large model and preset classification rules; When the current natural language instruction is classified as a general instruction, the current natural language instruction is marked as the executable instruction; When the current natural language instruction is classified as a system-level instruction, an intent confirmation instruction is sent to the current user, and the current natural language instruction is marked based on the feedback result of the intent confirmation instruction; When the current natural language instruction is classified as a dangerous instruction, the current natural language instruction is intercepted and marked as an unexecutable instruction based on blacklist keywords in a preset dangerous instruction library.

[0007] Preferably, When the current natural language instruction is determined to be the executable instruction, the step of performing entity extraction and intent recognition on the current natural language instruction and generating structured parameters includes: When the current natural language instruction is determined to be the executable instruction, the entity information in the current natural language instruction is extracted using the large model, wherein the entity information includes at least: time, location, and setting type; Simultaneously, intent recognition is performed on the current natural language command to obtain the user intent, wherein the user intent includes at least: time query, webpage search, and system settings; Based on a preset data format standard, the entity information and the user intent are respectively converted into standard entity information data and standard user intent data; The structured parameters corresponding to the current natural language instruction are generated based on the standard entity information data and the standard user intent data.

[0008] Preferably, The step of matching at least one original API from a preset API information dictionary for the current natural language instruction based on the structured parameters includes: Extract the standard user intent data and the standard entity information data from the structured parameters, fuse the standard user intent data and the standard entity information data, and convert the fused data into a fusion vector; Simultaneously extract each API data from the preset API information dictionary, and convert each API data into an API vector; Based on the fusion vector and each of the API vectors, the semantic similarity between the fusion vector and each of the API vectors is calculated using the first formula; The first formula is: ; Among them, the The semantic similarity is defined as follows: A is the fusion vector, and B is each of the API vectors. Based on the semantic similarity and the preset similarity threshold, at least one original API is matched for the current natural language instruction from the preset API information dictionary.

[0009] Preferably, After matching at least one original API from a preset API information dictionary for the current natural language instruction based on the structured parameters, and before constructing API call parameters and generating corresponding API call code based on the at least one original API, and executing the API call code to output a natural language execution result, the process further includes: D1: Based on the preset parameter information of the at least one original API, determine whether there are missing API parameters. If so, proceed to step D3; otherwise, proceed to step D4. D2: Send a parameter completion request to the current user using a multi-turn dialogue; D3: Receive the parameter completion information returned by the current user in response to the parameter completion request, and integrate the parameter completion information into the structured parameters to generate the at least one target API; D4: Use the at least one original API as the at least one target API; The step of constructing API call parameters based on the at least one original API and generating corresponding API call code, and executing the API call code to output natural language execution results includes: Based on the at least one target API, construct API call parameters and generate corresponding API call code, and execute the API call code to output natural language execution results.

[0010] Secondly, the embodiments of the present invention are based on a large-scale operating system control system, which includes: Instruction processing module: used to receive the current natural language instruction input by the current user and use the large model to determine whether the current natural language instruction is an executable instruction; Parameter acquisition module: When the current natural language instruction is determined to be the executable instruction, it performs entity extraction and intent recognition on the current natural language instruction and generates structured parameters. Matching module: used to match at least one original API for the current natural language instruction from a preset API information dictionary based on the structured parameters; Instruction execution module: used to construct API call parameters based on the at least one original API and generate corresponding API call code, and execute the API call code to output natural language execution results.

[0011] Preferably, The instruction processing module is also used to execute: Receive the current natural language instruction input by the current user, and classify the current natural language instruction using the large model and preset classification rules; When the current natural language instruction is classified as a general instruction, the current natural language instruction is marked as the executable instruction; When the current natural language instruction is classified as a system-level instruction, an intent confirmation instruction is sent to the current user, and the current natural language instruction is marked based on the feedback result of the intent confirmation instruction; When the current natural language instruction is classified as a dangerous instruction, the current natural language instruction is intercepted and marked as an unexecutable instruction based on blacklist keywords in a preset dangerous instruction library.

[0012] Preferably, The parameter acquisition module is also used to perform: When the current natural language instruction is determined to be the executable instruction, the entity information in the current natural language instruction is extracted using the large model, wherein the entity information includes at least: time, location, and setting type; Simultaneously, intent recognition is performed on the current natural language command to obtain the user intent, wherein the user intent includes at least: time query, webpage search, and system settings; Based on a preset data format standard, the entity information and the user intent are respectively converted into standard entity information data and standard user intent data; The structured parameters corresponding to the current natural language instruction are generated based on the standard entity information data and the standard user intent data.

[0013] Preferably, The matching module is also used to perform: Extract the standard user intent data and the standard entity information data from the structured parameters, fuse the standard user intent data and the standard entity information data, and convert the fused data into a fusion vector; Simultaneously extract each API data from the preset API information dictionary, and convert each API data into an API vector; Based on the fusion vector and each of the API vectors, the semantic similarity between the fusion vector and each of the API vectors is calculated using the first formula; The first formula is: ; Among them, the The semantic similarity is defined as follows: A is the fusion vector, and B is each of the API vectors. Based on the semantic similarity and the preset similarity threshold, at least one original API is matched for the current natural language instruction from the preset API information dictionary.

[0014] Preferably, Following the matching module and preceding the instruction execution module, the system further includes: a parameter completion module; The parameter completion module is used to perform: D1: Based on the preset parameter information of the at least one original API, determine whether there are missing API parameters. If so, proceed to step D3; otherwise, proceed to step D4. D2: Send a parameter completion request to the current user using a multi-turn dialogue; D3: Receive the parameter completion information returned by the current user in response to the parameter completion request, and integrate the parameter completion information into the structured parameters to generate the at least one target API; D4: Use the at least one original API as the at least one target API; The instruction execution module is also used to execute: Based on the at least one target API, construct API call parameters and generate corresponding API call code, and execute the API call code to output natural language execution results.

[0015] This invention provides an operating system control method and system based on a large model. The method first acquires the current natural language command input by the user and uses a large model to determine if it is an executable command. Only commands determined to be executable can proceed with subsequent processing steps, laying a reliable data foundation for subsequent data processing and analysis. Then, for the confirmed executable commands, the large model performs entity extraction and intent recognition operations to generate structured parameters (e.g., JSON format) to accurately extract key entity information (e.g., time, location, setting type, etc.) from the current natural language command and clarify the user's intent (e.g., time query, webpage search, system settings, etc.), avoiding the problem that traditional interaction methods cannot adequately understand complex user commands and in-depth system function calls. Furthermore, the pre-defined API information dictionary stores information such as API-related function names, interface protocols, and remarks. This dictionary can constrain and guide the model in generating function calls and ensuring the accuracy of the information. Therefore, based on the generated structured parameters, multiple possible original APIs can be matched from the pre-defined API information dictionary for the current natural language instruction (i.e., a list of APIs is matched using certain rules or semantic similarity). This list is then processed by the large model, which selects the necessary API to call and analyze the instruction. Finally, based on the original API information, the large model constructs the API call parameters and generates the corresponding API call code to execute the user instruction and output the corresponding natural language execution result. This process solves the technical hurdle of controlling the operating system in existing technologies, achieving intelligent invocation of operating system functions through natural language interaction. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the 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 based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of an operating system control method based on a large model provided in an embodiment of the present invention; Figure 2 This is a flowchart of another operating system control method based on a large model provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an operating system control system based on a large model provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of another operating system control system based on a large model provided in an embodiment of the present invention. Detailed Implementation

[0018] 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 some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0019] like Figure 1 As shown, this embodiment of the invention provides an operating system control method based on a large model, which includes the following steps: Step 101: Receive the current natural language instruction input by the current user and use the large model to determine whether the current natural language instruction is an executable instruction; Step 102: When the current natural language instruction is determined to be an executable instruction, entity extraction and intent recognition are performed on the current natural language instruction, and structured parameters are generated; Step 103: Based on the structured parameters, match at least one original API for the current natural language instruction from the preset API information dictionary; Step 104: Construct API call parameters based on at least one original API and generate corresponding API call code, then execute the API call code to output natural language execution results.

[0020] In this embodiment of the invention, an operating system control method based on a large model is provided. The method first acquires the current natural language command input by the user and uses a large model to determine whether it is an executable command. Only commands determined to be executable can proceed with subsequent processing steps, laying a reliable data foundation for subsequent data processing and analysis. Then, for the confirmed executable commands, the large model is used to perform entity extraction and intent recognition operations to generate structured parameters (e.g., JSON format) to accurately extract key entity information (e.g., time, location, setting type, etc.) from the current natural language command and clarify the user's intent (e.g., time query, webpage search, system settings, etc.), avoiding the problem that traditional interaction methods cannot adequately understand complex user commands and in-depth system function calls. Furthermore, the pre-defined API information dictionary stores information such as API-related function names, interface protocols, and remarks. This dictionary can constrain and guide the model in generating function calls and ensuring the accuracy of the information. Therefore, based on the generated structured parameters, multiple possible original APIs can be matched from the pre-defined API information dictionary for the current natural language instruction (i.e., a list of APIs is matched using certain rules or semantic similarity). This list is then processed by the large model, which selects the necessary API to call and analyze the instruction. Finally, based on the original API information, the large model constructs the API call parameters and generates the corresponding API call code to execute the user instruction and output the corresponding natural language execution result. This process solves the technical hurdle of controlling the operating system in existing technologies, achieving intelligent invocation of operating system functions through natural language interaction.

[0021] Specifically, by combining large model fine-tuning with Prompt engineering, the precision of intent recognition and entity extraction operations can be improved, thereby further enhancing the accuracy of data analysis and laying a reliable data foundation for subsequent data analysis.

[0022] For example, the output format of the large model after entity extraction and intent recognition can be: {"text": "What's the weather like in Beijing tomorrow?", "intent": "query_weather", "entities": {"location": "Beijing", "date": "tomorrow"}} Assuming the current user's natural language command is to query the remaining disk space, the output could be: c: 95G / 100G. Summary output: The disk is 95% full. It is recommended to defragment or delete some files to free up disk space. The large model is used to semantically summarize and generate suggestions for the API return results, enhancing user experience and usability.

[0023] To enhance system security, in one embodiment of the present invention, step 101 in the above embodiment includes: Receive the current natural language instruction input by the current user, and classify the current natural language instruction using the large model and preset classification rules; When the current natural language instruction is classified as a general instruction, the current natural language instruction is marked as the executable instruction; When the current natural language instruction is classified as a system-level instruction, an intent confirmation instruction is sent to the current user, and the current natural language instruction is marked based on the feedback result of the intent confirmation instruction; When the current natural language instruction is classified as a dangerous instruction, the current natural language instruction is intercepted and marked as an unexecutable instruction based on blacklist keywords in a preset dangerous instruction library.

[0024] In this embodiment of the invention, during the processing of natural language commands, the capabilities of a large model are first used to classify the current user's natural language commands into three categories using preset classification rules: general commands, system-level commands, and dangerous commands. General commands refer to common commands such as querying the weather, calendar, opening a program, or opening a browser to search for information. System-level commands refer to commands such as changing sensitive system settings, publicly exposing ports, or sending / sharing files. Dangerous instructions refer to those that could have a significant impact on or endanger the system (e.g., formatting a disk, distributing / executing scripts containing malicious attacks). The security mechanisms built into the natural language processing module can then filter these instructions: general instructions can be allowed and marked as executable; system-level instructions require secondary intent confirmation from the user, and are marked accordingly based on the confirmation result (e.g., if the confirmation result is "execute," the system-level instruction is marked as executable; if the confirmation result is "prohibit execution," it is marked as executable); and dangerous instructions are intercepted and marked as non-executable. Only instructions confirmed as executable can proceed with subsequent entity extraction and intent recognition operations. Through this three-tiered instruction classification and dynamic filtering, combined with multi-layered security mechanisms such as secondary user confirmation, permission firewalls, and blacklist blocking, accidental operations or malicious instruction execution can be effectively prevented, significantly improving system security.

[0025] Specifically, the firewall can be configured with various permission settings according to user needs (e.g., Windows administrator privileges, Linux sudo privileges, etc.), and a command blacklist can be used to block user-specified commands, enhancing user experience and usability. The large model dynamically generates executable API call code snippets and runs them in a sandbox environment, balancing functional flexibility with execution security and avoiding direct exposure of underlying system interfaces.

[0026] To improve system stability, in one embodiment of the present invention, step 102 in the above embodiment includes: When the current natural language instruction is determined to be the executable instruction, the entity information in the current natural language instruction is extracted using the large model, wherein the entity information includes at least: time, location, and setting type; Simultaneously, intent recognition is performed on the current natural language command to obtain the user intent, wherein the user intent includes at least: time query, webpage search, and system settings; Based on a preset data format standard, the entity information and the user intent are respectively converted into standard entity information data and standard user intent data; The structured parameters corresponding to the current natural language instruction are generated based on the standard entity information data and the standard user intent data.

[0027] In this embodiment of the invention, when the current natural language instruction is determined to be an executable instruction, in order to understand the user's complex instructions and in-depth system function calls, a finely tuned and optimized large model can be used to perform in-depth parsing of the current natural language instruction, accurately extracting entity information such as key data including time, location, and setting type, and also recognizing the user's intent to clarify the user's core needs. Then, according to a preset data format standard (e.g., standard JSON format), the extracted entity information is converted into standardized entity information data, and the recognized user intent is converted into standardized user intent data. Finally, the above-mentioned standardized entity information data and standard user intent data are integrated to generate the structured parameters corresponding to the current natural language instruction, laying a reliable data foundation for subsequent API matching and calls, thereby further improving the stability of the system.

[0028] To match the API, in one embodiment of the present invention, step 103 in the above embodiment includes: Extract the standard user intent data and the standard entity information data from the structured parameters, fuse the standard user intent data and the standard entity information data, and convert the fused data into a fusion vector; Simultaneously extract each API data from the preset API information dictionary, and convert each API data into an API vector; Based on the fusion vector and each of the API vectors, the semantic similarity between the fusion vector and each of the API vectors is calculated using the first formula; The first formula is: ; Among them, the The semantic similarity is defined as follows: A is the fusion vector, and B is each of the API vectors. Based on the semantic similarity and the preset similarity threshold, at least one original API is matched for the current natural language instruction from the preset API information dictionary.

[0029] In this embodiment of the invention, to achieve the matching operation of the original API of the current natural language instruction, standard user intent data and standard entity information data are first extracted from the structured parameters, and then fused into a fusion vector. Simultaneously, API-related data (e.g., function name, interface protocol, remarks, etc.) stored in a preset API information dictionary are extracted and converted into corresponding API vectors. Next, based on the fusion vector and each API vector, the semantic similarity between them is calculated using a first formula. The calculated semantic similarity is compared with a preset similarity threshold to filter out multiple original APIs whose similarity meets the threshold requirement as candidate original APIs. If multiple matching APIs are found, an API list is formed, and finally, the matching is processed by a large model. This semantic similarity-based original API matching operation ensures the accuracy and completeness of the original API matching.

[0030] To enable the invocation of the matched API, in one embodiment of the present invention, after step 103 and before step 104, the above embodiment further includes: D1: Based on the preset parameter information of the at least one original API, determine whether there are missing API parameters. If so, proceed to step D3; otherwise, proceed to step D4. D2: Send a parameter completion request to the current user using a multi-turn dialogue; D3: Receive the parameter completion information returned by the current user in response to the parameter completion request, and integrate the parameter completion information into the structured parameters to generate the at least one target API; D4: Use the at least one original API as the at least one target API; Step 104 includes: Based on the at least one target API, construct API call parameters and generate corresponding API call code, and execute the API call code to output natural language execution results.

[0031] In this embodiment of the invention, in order to call the matched API, the system first checks whether the current user has any missing instructions based on the preset parameter information and known information of the original API. If missing instructions are found, a multi-round dialogue request can be initiated to the current user to complete the missing parameter information, reducing the complexity of user input and improving the success rate of instruction execution (for example, this can be achieved through a prompt project). Then, the parameter supplement information returned by the current user in response to the parameter completion request is integrated into the already obtained structured parameters to match a suitable target API and subsequently call it. The corresponding executable API call code is generated by constructing API call parameters through the target API to output the natural language execution result. In this process, if the current user does not have any missing instructions, the original API can be directly matched as the target API of the current natural language instruction and subsequent processing operations can be performed on it.

[0032] Additionally, for queries that do not match or do not have a pre-made template, the prompt project can be used to allow the large model to directly generate code to implement its function call.

[0033] For example, API call parameters can be constructed using the following reference prompt: Based on the user's original question {original user question}, the parsed JSON ({entity list}), and the callable APIs ([{API1}, {API2}...]), generate the parameter information required to implement the user's question.

[0034] like Figure 2 As shown, to more clearly illustrate the technical solution and advantages of the present invention, the following provides a detailed description of an operating system control method based on a large model, which may specifically include the following steps: Step 201: Receive the current natural language instruction input by the current user, and classify the current natural language instruction using the large model and preset classification rules; Step 202: When the current natural language instruction is classified as a general instruction, mark the current natural language instruction as an executable instruction; Step 203: When the current natural language instruction is classified as a system-level instruction, send an intent confirmation instruction to the current user and mark the current natural language instruction based on the feedback result of the intent confirmation instruction; Step 204: When the current natural language instruction is classified as a dangerous instruction, based on the blacklist keywords in the preset dangerous instruction library, the current natural language instruction is intercepted and marked as an unexecutable instruction; Step 205: When the current natural language instruction is determined to be an executable instruction, the entity information in the current natural language instruction is extracted using the large model. The entity information includes at least: time, location, and setting type. Step 206: Simultaneously perform intent recognition on the current natural language command to obtain the user intent, wherein the user intent includes at least: time query, webpage search, system settings; Step 207: Based on the preset data format standard, convert entity information and user intent into standard entity information data and standard user intent data respectively; Step 208: Generate structured parameters corresponding to the current natural language instruction based on standard entity information data and standard user intent data; Step 209: Extract standard user intent data and standard entity information data from the structured parameters, fuse the standard user intent data and standard entity information data, and convert the fused data into a fusion vector; Step 210: Synchronously extract each API data from the preset API information dictionary and convert each API data into an API vector; Step 211: Based on the fused vector and each API vector, calculate the semantic similarity between the fused vector and each API vector using the first formula; Specifically, the first formula is: ,in, For semantic similarity, A is the fusion vector, and B is the vector for each API. Step 212: Based on semantic similarity and a preset similarity threshold, match at least one original API from the preset API information dictionary for the current natural language instruction; Step 213: Based on the preset parameter information of at least one original API, determine whether there are any missing API parameters. If so, proceed to step 214; otherwise, proceed to step 216. Step 214: Use a multi-turn dialogue to send a parameter completion request to the current user; Step 215: Receive the parameter completion information returned by the current user in response to the parameter completion request, integrate the parameter completion information into the structured parameters, and generate at least one target API; Step 216: Use at least one original API as at least one target API; Step 217: Construct API call parameters based on at least one target API and generate corresponding API call code, then execute the API call code to output natural language execution results.

[0035] like Figure 3 As shown, this embodiment of the invention provides an operating system control system based on a large model, the system comprising: Instruction processing module 301: used to receive the current natural language instruction input by the current user and use the large model to determine whether the current natural language instruction is an executable instruction; Parameter acquisition module 302: When the current natural language instruction is determined to be the executable instruction, it performs entity extraction and intent recognition on the current natural language instruction and generates structured parameters; Matching module 303: used to match at least one original API for the current natural language instruction from a preset API information dictionary based on the structured parameters; Instruction execution module 304: used to construct API call parameters based on the at least one original API and generate corresponding API call code, and execute the API call code to output natural language execution results.

[0036] like Figure 3 As shown, the instruction processing module 301 is also used to execute: Receive the current natural language instruction input by the current user, and classify the current natural language instruction using the large model and preset classification rules; When the current natural language instruction is classified as a general instruction, the current natural language instruction is marked as the executable instruction; When the current natural language instruction is classified as a system-level instruction, an intent confirmation instruction is sent to the current user, and the current natural language instruction is marked based on the feedback result of the intent confirmation instruction; When the current natural language instruction is classified as a dangerous instruction, the current natural language instruction is intercepted and marked as an unexecutable instruction based on blacklist keywords in a preset dangerous instruction library.

[0037] like Figure 3 As shown, the parameter acquisition module 302 is also used to perform: When the current natural language instruction is determined to be the executable instruction, the entity information in the current natural language instruction is extracted using the large model, wherein the entity information includes at least: time, location, and setting type; Simultaneously, intent recognition is performed on the current natural language command to obtain the user intent, wherein the user intent includes at least: time query, webpage search, and system settings; Based on a preset data format standard, the entity information and the user intent are respectively converted into standard entity information data and standard user intent data; The structured parameters corresponding to the current natural language instruction are generated based on the standard entity information data and the standard user intent data.

[0038] like Figure 3 As shown, the matching module 303 is also used to perform: Extract the standard user intent data and the standard entity information data from the structured parameters, fuse the standard user intent data and the standard entity information data, and convert the fused data into a fusion vector; Simultaneously extract each API data from the preset API information dictionary, and convert each API data into an API vector; Based on the fusion vector and each of the API vectors, the semantic similarity between the fusion vector and each of the API vectors is calculated using the first formula; The first formula is: ; Among them, the The semantic similarity is defined as follows: A is the fusion vector, and B is each of the API vectors. Based on the semantic similarity and the preset similarity threshold, at least one original API is matched for the current natural language instruction from the preset API information dictionary.

[0039] based on Figure 3 The example shown is an operating system control system based on a large model, such as... Figure 4 As shown, after the matching module 303 and before the instruction execution module 304, it further includes: a parameter completion module 305; The parameter completion module 305 is used to perform: D1: Based on the preset parameter information of the at least one original API, determine whether there are missing API parameters. If so, proceed to step D3; otherwise, proceed to step D4. D2: Send a parameter completion request to the current user using a multi-turn dialogue; D3: Receive the parameter completion information returned by the current user in response to the parameter completion request, and integrate the parameter completion information into the structured parameters to generate the at least one target API; D4: Use the at least one original API as the at least one target API; The instruction execution module 304 is also used to execute: Based on the at least one target API, construct API call parameters and generate corresponding API call code, and execute the API call code to output natural language execution results.

[0040] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on a large-model-based operating system control system. In other embodiments of the present invention, a large-model-based operating system control system may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0041] The information interaction and execution process between the various units in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description of the method embodiment of the present invention, and will not be repeated here.

[0042] This invention also provides an operating system control system based on a large model, comprising: at least one memory and at least one processor; At least one memory for storing machine-readable programs; At least one processor is configured to invoke a machine-readable program to execute an operating system control method based on a large model, according to any embodiment of the present invention.

[0043] This invention also provides a computer-readable medium storing computer instructions, which, when executed by a processor, cause the processor to perform an operating system control method based on a large model according to any embodiment of this invention.

[0044] Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.

[0045] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.

[0046] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.

[0047] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.

[0048] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.

[0049] The various embodiments of the present invention have at least the following beneficial effects: 1. In this embodiment of the invention, an operating system control method and system based on a large model are provided. The method first receives the current natural language instruction and uses a large model to determine whether it is an executable instruction, laying a reliable data foundation for subsequent data processing and analysis. Then, for the confirmed executable instructions, the large model is used to perform entity extraction and intent recognition operations to generate structured parameters, accurately extracting key entity information from the current natural language instruction and clarifying the user's intent. Next, based on the generated structured parameters, multiple possible original APIs are matched for the current natural language instruction from a preset API information dictionary, and the required API is selected to call the API for instruction processing and analysis. Finally, based on the original API information, the large model is used to construct API call parameters and generate corresponding API call code to execute the user instruction and output the corresponding natural language execution result. Intelligent invocation of operating system functions is achieved through natural language interaction. 2. In this embodiment of the invention, during the processing of natural language commands, the current user's natural language commands are first categorized into three types using preset classification rules: general commands, system-level commands, and dangerous commands. General commands refer to common commands such as querying the weather, calendar, opening a program, or searching for information in a browser. System-level commands refer to commands that change sensitive system settings, publicly expose ports, or send / share files. Dangerous commands refer to commands that could have a potentially significant impact on the system or pose a danger. Then, the security devices built into the natural language processing module can be used to filter these commands: general commands can be allowed and marked as executable; system-level commands require secondary intent confirmation from the user and are marked accordingly based on the confirmation result; and dangerous commands are intercepted and marked as non-executable. Only commands confirmed as executable can proceed with subsequent entity extraction and intent recognition operations. Through this three-level command classification and dynamic filtering, combined with multi-layered security protection mechanisms such as secondary user confirmation, permission firewalls, and blacklist interception, accidental operations or malicious command execution can be effectively prevented, thereby significantly improving system security. 3. In this embodiment of the invention, when the current natural language instruction is determined to be an executable instruction, in order to understand the user's complex instructions and in-depth system function calls, a finely tuned and optimized large model can be used to perform in-depth analysis of the current natural language instruction, accurately extracting entity information such as key data including time, location, and setting type. User intent recognition can also be performed on the instruction to clarify the user's core needs. Then, according to a preset data format standard, the extracted entity information is converted into standardized entity information data, and the identified user intent is converted into standardized user intent data. Finally, the above-mentioned standardized entity information data and standardized user intent data are integrated to generate structured parameters corresponding to the current natural language instruction, laying a reliable data foundation for subsequent API matching and calls, thereby further improving the stability of the system.

[0050] In the above embodiments, the hardware units can be implemented mechanically or electrically. For example, a hardware unit may include permanent dedicated circuitry or logic (such as a dedicated processor, FPGA, or ASIC) to perform the corresponding operation. The hardware unit may also include programmable logic or circuitry (such as a general-purpose processor or other programmable processor), which can be temporarily configured by software to perform the corresponding operation. The specific implementation method (mechanical, dedicated permanent circuitry, or temporarily configured circuitry) can be determined based on cost and time considerations.

[0051] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An operating system control method based on a large model, characterized in that, The method includes: Receive the current natural language instruction input by the current user and use a large model to determine whether the current natural language instruction is an executable instruction; When the current natural language instruction is determined to be the executable instruction, entity extraction and intent recognition are performed on the current natural language instruction, and structured parameters are generated. Based on the structured parameters, at least one original API is matched for the current natural language instruction from a preset API information dictionary; API call parameters are constructed based on the at least one original API and corresponding API call code is generated. The API call code is then executed to output natural language execution results.

2. The method according to claim 1, characterized in that, The step of receiving the current natural language instruction input by the current user and using a large model to determine whether the current natural language instruction is an executable instruction includes: Receive the current natural language instruction input by the current user, and classify the current natural language instruction using the large model and preset classification rules; When the current natural language instruction is classified as a general instruction, the current natural language instruction is marked as the executable instruction; When the current natural language instruction is classified as a system-level instruction, an intent confirmation instruction is sent to the current user, and the current natural language instruction is marked based on the feedback result of the intent confirmation instruction; When the current natural language instruction is classified as a dangerous instruction, the current natural language instruction is intercepted and marked as an unexecutable instruction based on blacklist keywords in a preset dangerous instruction library.

3. The method according to claim 2, characterized in that, When the current natural language instruction is determined to be the executable instruction, the step of performing entity extraction and intent recognition on the current natural language instruction and generating structured parameters includes: When the current natural language instruction is determined to be the executable instruction, the entity information in the current natural language instruction is extracted using the large model, wherein the entity information includes at least: time, location, and setting type; Simultaneously, intent recognition is performed on the current natural language command to obtain the user intent, wherein the user intent includes at least: time query, webpage search, and system settings; Based on a preset data format standard, the entity information and the user intent are respectively converted into standard entity information data and standard user intent data; The structured parameters corresponding to the current natural language instruction are generated based on the standard entity information data and the standard user intent data.

4. The method according to claim 3, characterized in that, The step of matching at least one original API from a preset API information dictionary for the current natural language instruction based on the structured parameters includes: Extract the standard user intent data and the standard entity information data from the structured parameters, fuse the standard user intent data and the standard entity information data, and convert the fused data into a fusion vector; Simultaneously extract each API data from the preset API information dictionary, and convert each API data into an API vector; Based on the fusion vector and each of the API vectors, the semantic similarity between the fusion vector and each of the API vectors is calculated using the first formula; The first formula is: ; Among them, the The semantic similarity is defined as follows: A is the fusion vector, and B is each of the API vectors. Based on the semantic similarity and the preset similarity threshold, at least one original API is matched for the current natural language instruction from the preset API information dictionary.

5. The method according to claim 4, characterized in that, After matching at least one original API from a preset API information dictionary for the current natural language instruction based on the structured parameters, and before constructing API call parameters and generating corresponding API call code based on the at least one original API, and executing the API call code to output a natural language execution result, the process further includes: D1: Based on the preset parameter information of the at least one original API, determine whether there are missing API parameters. If so, proceed to step D3; otherwise, proceed to step D4. D2: Send a parameter completion request to the current user using a multi-turn dialogue; D3: Receive the parameter completion information returned by the current user in response to the parameter completion request, and integrate the parameter completion information into the structured parameters to generate the at least one target API; D4: Use the at least one original API as the at least one target API; The step of constructing API call parameters based on the at least one original API and generating corresponding API call code, and executing the API call code to output natural language execution results includes: Based on the at least one target API, construct API call parameters and generate corresponding API call code, and execute the API call code to output natural language execution results.

6. An operating system control system based on a large model, characterized in that, The system includes: Instruction processing module: used to receive the current natural language instruction input by the current user and use the large model to determine whether the current natural language instruction is an executable instruction; Parameter acquisition module: When the current natural language instruction is determined to be the executable instruction, it performs entity extraction and intent recognition on the current natural language instruction and generates structured parameters; Matching module: used to match at least one original API for the current natural language instruction from a preset API information dictionary based on the structured parameters; Instruction execution module: used to construct API call parameters based on the at least one original API and generate corresponding API call code, and execute the API call code to output natural language execution results.

7. The system according to claim 6, characterized in that, The instruction processing module is also used to execute: Receive the current natural language instruction input by the current user, and classify the current natural language instruction using the large model and preset classification rules; When the current natural language instruction is classified as a general instruction, the current natural language instruction is marked as the executable instruction; When the current natural language instruction is classified as a system-level instruction, an intent confirmation instruction is sent to the current user, and the current natural language instruction is marked based on the feedback result of the intent confirmation instruction; When the current natural language instruction is classified as a dangerous instruction, the current natural language instruction is intercepted and marked as an unexecutable instruction based on blacklist keywords in a preset dangerous instruction library.

8. The system according to claim 7, characterized in that, The parameter acquisition module is also used to perform: When the current natural language instruction is determined to be the executable instruction, the entity information in the current natural language instruction is extracted using the large model, wherein the entity information includes at least: time, location, and setting type; Simultaneously, intent recognition is performed on the current natural language command to obtain the user intent, wherein the user intent includes at least: time query, webpage search, and system settings; Based on a preset data format standard, the entity information and the user intent are respectively converted into standard entity information data and standard user intent data; The structured parameters corresponding to the current natural language instruction are generated based on the standard entity information data and the standard user intent data.

9. The system according to claim 8, characterized in that, The matching module is also used to perform: Extract the standard user intent data and the standard entity information data from the structured parameters, fuse the standard user intent data and the standard entity information data, and convert the fused data into a fusion vector; Simultaneously extract each API data from the preset API information dictionary, and convert each API data into an API vector; Based on the fusion vector and each of the API vectors, the semantic similarity between the fusion vector and each of the API vectors is calculated using the first formula; The first formula is: ; Among them, the The semantic similarity is defined as follows: A is the fusion vector, and B is each of the API vectors. Based on the semantic similarity and the preset similarity threshold, at least one original API is matched for the current natural language instruction from the preset API information dictionary.

10. The system according to claim 9, characterized in that, Following the matching module and preceding the instruction execution module, the system further includes: a parameter completion module; The parameter completion module is used to perform: D1: Based on the preset parameter information of the at least one original API, determine whether there are missing API parameters. If so, proceed to step D3; otherwise, proceed to step D4. D2: Send a parameter completion request to the current user using a multi-turn dialogue; D3: Receive the parameter completion information returned by the current user in response to the parameter completion request, and integrate the parameter completion information into the structured parameters to generate the at least one target API; D4: Use the at least one original API as the at least one target API; The instruction execution module is also used to execute: Based on the at least one target API, construct API call parameters and generate corresponding API call code, and execute the API call code to output natural language execution results.