Operation instruction generation method and device, electronic equipment and server

By receiving and sending operation instructions to generate request information on the AI assistant interface and generating nested operation instructions, the problem of users needing to input complex natural languages is solved, and the operation instructions generation process is simplified.

CN120448015APending Publication Date: 2025-08-08VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510532523.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the prior art, users need to input complex natural language instructions to generate operation instructions of electronic devices, resulting in cumbersome and inconvenient operation instructions generation process.

Method used

By receiving operation instructions in the AI assistant interface to generate request information, and sending a first message to the server, generating nested operation instructions, including conditional operation instructions and new operation instructions, the server generates standardized natural language for nested operation instructions based on the instruction information and request information of the conditional operation instructions.

Benefits of technology

Even if the user does not enter the complete natural language, the server can generate nested operation instructions, simplifying the user input process, and the user can generate operation instructions for complex tasks through short statements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448015A_ABST
    Figure CN120448015A_ABST
Patent Text Reader

Abstract

The invention discloses an operation instruction generation method and device, electronic equipment and a server, and belongs to the technical field of artificial intelligence. The method comprises the following steps: receiving operation instruction generation request information input by a user on an artificial intelligence AI assistant interface, and sending a first message to a server; and displaying the operation instruction generation request information and the standardized natural language nested with the operation instruction on an AI assistant interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a method, device, electronic device and server for generating an operation instruction. Background Art

[0002] At present, semantic understanding technology is widely used in various fields of natural language processing. For example, the voice assistant in the electronic device can obtain the natural language input by the user, and then generate operation instructions corresponding to the natural language input by the user after semantic understanding of the natural language.

[0003] In related technologies, an electronic device can send the natural language input by a user to a server so that the server can perform semantic analysis on the natural language to obtain semantic information of the natural language; then generate an operation instruction that matches the user's intention based on the semantic information; and finally send the operation instruction to the electronic device.

[0004] However, in the above method, if the user has a complex instruction requirement, the user needs to re-enter the natural language corresponding to the complex instruction requirement; only in this way can the operation instruction required by the user be generated. Summary of the Invention

[0005] The purpose of the embodiments of the present application is to provide a method, device, electronic device and server for generating operation instructions, so that when a user requires an electronic device to perform a complex task, the electronic device can conveniently generate the operation instructions required by the user through short sentences.

[0006] In a first aspect, an embodiment of the present application provides an operation instruction generation method, which is executed by an electronic device, and the operation instruction generation method includes: receiving operation instruction generation request information input by a user in an artificial intelligence (AI) assistant interface, and sending a first message to a server; wherein the first message includes operation instruction generation request information, and the operation instruction generation request information is used to indicate the execution of at least one conditional operation instruction and a new operation instruction according to a nested instruction execution condition, and the at least one conditional operation instruction is an already created operation instruction; on the AI assistant interface, the operation instruction generation request information and the standardized natural language of the nested operation instruction are displayed; wherein the nested operation instruction includes at least one conditional operation instruction and a new operation instruction, and the nested operation instruction is generated by the server based on the instruction information of at least one conditional operation instruction and the operation instruction generation request information.

[0007] In the second aspect, an embodiment of the present application provides an operation instruction generation device, which is applied to an electronic device, and the operation instruction generation device includes: a receiving module for receiving operation instruction generation request information input by a user in an artificial intelligence AI assistant interface. A sending module for sending a first message to a server; wherein the first message includes operation instruction generation request information, and the operation instruction generation request information is used to instruct the execution of at least one conditional operation instruction and a newly added operation instruction according to the nested instruction execution condition, and the at least one conditional operation instruction is an already created operation instruction. A display module is used to display the operation instruction generation request information and the standardized natural language of the nested operation instruction on the AI assistant interface; wherein the nested operation instruction includes at least one conditional operation instruction and a newly added operation instruction, and the nested operation instruction is generated by the server based on the instruction information of at least one conditional operation instruction and the operation instruction generation request information.

[0008] In a third aspect, an embodiment of the present application provides an operation instruction generation method, which is executed by a server. The operation instruction generation method includes: receiving a first message sent by an electronic device, the first message including operation instruction generation request information, the operation instruction generation request information indicating execution of at least one conditional operation instruction and a newly added operation instruction according to the nested instruction execution condition, the at least one conditional operation instruction being an already created operation instruction; based on the instruction information and operation instruction generation request information of each conditional operation instruction in at least one conditional operation instruction, generating an instruction protocol corresponding to the nested operation instruction and a standardized natural language for the nested operation instruction; wherein the nested operation instruction includes at least one conditional operation instruction and a newly added operation instruction.

[0009] In a fourth aspect, an embodiment of the present application provides an operation instruction generation device, which is applied to a server, and the operation instruction generation device includes: a receiving module, which is used to receive a first message sent by an electronic device, the first message including operation instruction generation request information, the operation instruction generation request information indicating the execution of at least one conditional operation instruction and a newly added operation instruction according to the nested instruction execution condition, the at least one conditional operation instruction being an already created operation instruction. A generating module, which is used to generate an instruction protocol corresponding to the nested operation instruction and a standardized natural language for the nested operation instruction based on the instruction information and operation instruction generation request information of each conditional operation instruction in the at least one conditional operation instruction; wherein the nested operation instruction includes at least one conditional operation instruction and a newly added operation instruction.

[0010] In a fifth aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0011] In a sixth aspect, an embodiment of the present application provides a server comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the third aspect are implemented.

[0012] In a seventh aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the third aspect are implemented.

[0013] In an eighth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect or the third aspect.

[0014] In a ninth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect or the third aspect.

[0015] In an embodiment of the present application, since the electronic device instructs the server through a first message that it can generate a nested operation instruction using the instruction information of at least one conditional operation instruction and the operation instruction generation request information, even if the user does not enter the complete natural language corresponding to the operation instruction in the electronic device, the server can still generate the nested operation instruction using the instruction information corresponding to the at least one conditional operation instruction and the operation instruction generation request information; thus avoiding the phenomenon of being unable to generate the operation instruction when the user does not enter the complete natural language corresponding to the operation instruction. Furthermore, since the user does not need to enter the complete natural language corresponding to the operation instruction, when the user wants the electronic device to perform a complex task, the user can use a short sentence to cause the electronic device to generate a complex nested operation instruction. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0017] Figure 2 A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0018] Figure 3 A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0019] Figure 4 A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0020] Figure 5A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0021] Figure 6 A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0022] Figure 7 A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0023] Figure 8 A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0024] Figure 9 A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0025] Figure 10 A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0026] Figure 11 A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0027] Figure 12 A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0028] Figure 13A A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0029] Figure 13B A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0030] Figure 13C A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0031] Figure 14 A flowchart of the execution steps of a large language model provided for some embodiments of the present application;

[0032] Figure 15A A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0033] Figure 15B A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0034] Figure 15C A schematic diagram of an AI assistant interaction interface provided for some embodiments of the present application;

[0035] Figure 16A flowchart of a method for generating an operation instruction provided in some embodiments of the present application;

[0036] Figure 17 A schematic diagram of the structure of an operation instruction generating device provided in some embodiments of the present application;

[0037] Figure 18 A schematic diagram of the structure of an operation instruction generating device provided in some embodiments of the present application;

[0038] Figure 19 A schematic diagram of the hardware structure of an electronic device provided in some embodiments of the present application;

[0039] Figure 20 A schematic diagram of the hardware structure of an electronic device provided in some embodiments of the present application;

[0040] Figure 21 A schematic diagram of the hardware structure of a server provided for some embodiments of the present application. DETAILED DESCRIPTION

[0041] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0042] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0043] The terms "at least one" and "at least one of" in the specification and claims of this application refer to any one, any two, or a combination of more than two of the objects included. For example, at least one of a, b, and c can be represented by: "a", "b", "c", "a and b", "a and c", "b and c", and "a, b, and c", where a, b, and c can be single or multiple. Similarly, "at least two" means two or more, and its meaning is similar to "at least one".

[0044] The terms used in the embodiments of this application are only used to explain the specific embodiments of this application and are not intended to limit this application. The following is a detailed explanation of the professional terms involved in the embodiments of this application.

[0045] Operational instructions: Operational instructions are instructions that a computer can receive and understand. The operational instructions referred to in this application are high-level operational instructions. High-level operational instructions can be an abstraction of the program execution process, and their function is to schedule and control program execution. High-level operational instructions are generally expressed in natural language, such as if, else, while, etc. These instructions are interpreted and executed by the operating system's interpreter and then translated into assembly instructions or machine language. High-level operational instructions are easy to read and maintain, but their execution efficiency is relatively low.

[0046] Natural language: Natural language refers to the natural language people use in their daily lives. Natural language does not rely on specific subject knowledge, nor does it have a clear rule structure like computer programming languages. Natural language is a tool used to communicate, express ideas, convey information, and exchange meaning. Its flexibility and ambiguity enable it to be interpreted and understood in different contexts based on the user's intent. Natural language encompasses a variety of languages, such as English, Chinese, French, and Spanish.

[0047] Standardized Natural Language: Standardized Natural Language refers to a series of processing of the natural language input by the user to make it meet certain standards and specifications for subsequent analysis and application. This process usually includes the following aspects:

[0048] Text cleaning: including text normalization, word segmentation, part-of-speech tagging, stop word removal, entity recognition, etc. These steps help remove noise from the text and retain useful information.

[0049] Text normalization: Standardize inconsistencies in the text, such as converting traditional Chinese characters to simplified Chinese, converting full-width characters to half-width characters, and standardizing date formats. This step ensures text consistency and facilitates subsequent processing.

[0050] Text feature extraction: Extract useful features from text, such as word frequency statistics, syntactic analysis, semantic representation, etc.

[0051] Conditional instructions: Conditional instructions are instructions that will only be executed when certain conditions are met. For example, when I arrive at station A, please help me open the boarding code.

[0052] One-click commands: A one-click command is an automated process that triggers a series of complex tasks through a single command or action. It is often used to simplify repetitive operations, for example, setting an alarm for 10 am every day.

[0053] Instruction vertical: An instruction vertical refers to an instruction set or system within a specific vertical field. For example, in the autonomous driving field, the instruction set specifically used to control autonomous vehicles can be considered an "instruction vertical." Similarly, in the smart grid control field, the instruction set used to manage grid operations can also be considered an "instruction vertical."

[0054] Protocol: A protocol is a set of rules or standards in computer networks that define how electronic devices exchange data efficiently and reliably. In computer networks, a protocol is a set of rules and standards that dictate how devices communicate with each other. These rules include the format and sequence of data transmission, as well as error detection and correction methods. Protocols enable different devices to understand and respond to each other's messages, thus enabling data exchange across the network.

[0055] The following, in conjunction with the accompanying drawings, describes in detail the operation instruction generation method, device, electronic device and server provided in the embodiments of the present application through specific embodiments and their application scenarios.

[0056] The operation instruction generation method, device, electronic device and server provided in the embodiments of the present application can be applied in instruction nesting scenarios.

[0057] In a specific application scenario, the operation instruction generation method provided in the embodiment of the present application can be applied to a scenario in which the user enters "When conditional instruction 1 is executed, help me execute one-key instruction 3 and turn on near-field communication (NFC)" in the AI assistant interface, thereby triggering the electronic device to generate nested operation instructions, such as scenario 1.

[0058] In scenario 1, when a user needs to generate a new operation instruction in an electronic device, the electronic device can be triggered to run an AI assistant, so that the electronic device can display an AI assistant interface, which includes a text input box. The user can enter text in the text input box, and the text is "When conditional instruction 1 is executed, help me execute one-key instruction 3 and turn on NFC", so that the electronic device can send the text to the server. After receiving the text, the server can perform semantic analysis on the text to obtain the standardized natural language "After conditional instruction 1 is executed, execute one-key instruction 3, then call the NFC module and start NFC". However, when the server parses the standardized natural language "conditional instruction 1 and one-key instruction 3", since "conditional instruction 1" and "one-key instruction 3" are only instruction names, the server cannot map specific instructions through the instruction names, and finally only generates the instruction to turn on NFC.

[0059] In another specific application scenario, the operation instruction generation method provided in the embodiment of the present application can be applied to a scenario where the user enters "When conditional instruction 1 is executed, execute conditional instruction 2, execute one-key instruction 3" in the AI assistant interface, thereby triggering the electronic device to generate nested operation instructions, such as scenario 2.

[0060] In scenario 2, when a user needs to generate a new operation instruction in an electronic device, the electronic device can be triggered to run an AI assistant, so that the electronic device can display an AI assistant interface, which includes a text input box. The user can enter text in the text input box, and the text is "When conditional instruction 1 is executed, execute conditional instruction 2, and execute one-key instruction 3", so that the electronic device can send the text to the server. After receiving the text, the server can perform semantic analysis on the text to obtain the standardized natural language "When conditional instruction 1 is executed, execute conditional instruction 2, and execute one-key instruction 3". However, when the server parses the standardized natural language, because "conditional instruction 1", "one-key instruction 3" and "conditional instruction 2" are only instruction names, the server cannot map the specific instructions through the instruction names, resulting in the failure of instruction generation.

[0061] In the operation instruction generation method, device, electronic device and server provided in the embodiments of the present application, since the electronic device instructs the server through the first message that it can generate a nested operation instruction through the instruction information of at least one conditional operation instruction and the operation instruction generation request information, even if the user does not enter the complete natural language corresponding to the operation instruction in the electronic device, the server can also generate a nested operation instruction through the instruction information corresponding to at least one conditional operation instruction and the operation instruction generation request information; thereby avoiding the phenomenon that the operation instruction cannot be generated when the user does not enter the complete natural language corresponding to the operation instruction.

[0062] Moreover, since the user does not need to input the natural language corresponding to the complete operation instruction, when the user wants the electronic device to perform a complex task, the user can use a short sentence to make the electronic device generate complex nested operation instructions.

[0063] The execution subject of the operation instruction generation method provided in the embodiment of the present application can be an operation instruction generation device, which can be an electronic device or a functional module in an electronic device. The technical solution provided in the embodiment of the present application is described below using an electronic device as an example.

[0064] The present application provides an operation instruction generation method for an electronic device. Figure 1 FIG. 1 shows a flow chart of a method for generating an operation instruction provided by an embodiment of the present application. Figure 1 As shown, the operation instruction generation method provided in the embodiment of the present application may include the following steps 201 and 202.

[0065] Step 201: The electronic device receives an operation instruction input by the user on the AI assistant interface, generates request information, and sends a first message to the server.

[0066] In an embodiment of the present application, the above-mentioned first message includes operation instruction generation request information, which is used to instruct the execution of at least one conditional operation instruction and a new operation instruction according to the nested instruction execution condition, and the at least one conditional operation instruction is an already created operation instruction.

[0067] In some embodiments of the present application, the above-mentioned operation instruction generation request information includes: the instruction name of each conditional operation instruction in at least one conditional operation instruction, the instruction description information of the newly added operation instruction, and the nested instruction execution condition.

[0068] Exemplarily, the nested instruction execution condition may be the execution order of the nested instructions.

[0069] In some embodiments of the present application, the above-mentioned instruction description information may be the instruction name of the newly added operation instruction or the natural language of the newly added operation instruction.

[0070] For example, in combination with the above scenario 1, the above operation instruction generation request information can be: "When conditional instruction 1 is executed, help me execute one-key instruction 3 and turn on NFC", where "conditional instruction 1" and "one-key instruction 3" are the instruction names of the conditional operation instructions, "turn on NFC" is the instruction description information of the newly added operation instruction, and "when..." is the nested instruction execution condition.

[0071] As another example, in combination with the above-mentioned scenario 2, the above-mentioned operation instruction generation request information can be: "When conditional instruction 1 is executed, execute conditional instruction 2, and execute one-key instruction 3", where "conditional instruction 1" and "one-key instruction 3" are the instruction names of the conditional operation instructions, "one-key instruction 3" is the instruction description information of the newly added operation instruction, and "when..., execute..., execute..." are nested instruction execution conditions.

[0072] In some embodiments of the present application, a user may enter an operation instruction generation request information through a text input box in the AI assistant interface, so that the electronic device can obtain the operation instruction generation request information; or a user may enter an operation instruction generation request voice through a voice input control or input box in the AI assistant interface, so that the electronic device can obtain the operation instruction generation request information. The specific method can be determined based on actual usage needs and is not limited by the embodiments of the present application.

[0073] For example, in combination with the above scenario 1, Figure 2 As shown, taking a mobile phone as an example, the user can output the voice message "Hello, Xiao A" to control the mobile phone to run the AI assistant program in the mobile phone and display the AI assistant interface 10 of the AI assistant program. Then, the user can long-press the voice input control 11 in the AI assistant interface 10 to input and output the voice message "When conditional instruction 1 is executed, help me execute one-key instruction 3 and turn on NFC." At this time, the mobile phone can convert the voice message into text to obtain the operation instruction generation request information, that is, "When conditional instruction 1 is executed, help me execute one-key instruction 3 and turn on NFC", and display the message "When conditional instruction 1 is executed, help me execute one-key instruction 3 and turn on NFC" on the AI assistant interface 10.

[0074] In some embodiments of the present application, the electronic device can record audio output by the user through a microphone.

[0075] For example, the microphone may be any of the following: a dynamic microphone, a condenser microphone, or an electret condenser microphone. Specific examples may be determined based on actual usage requirements and are not limited in this embodiment.

[0076] In some embodiments of the present application, the electronic device can obtain operation instruction generation request information through the text entered by the user in the text input box in the AI assistant interface.

[0077] For example, in combination with the above scenario 1, Figure 3As shown, the user can output the voice "Hello, Xiao A" to trigger the AI assistant in the mobile phone and display the AI assistant interface 10. Then, the user can type in the text input control 12 in the AI assistant interface 10 so that the mobile phone can generate a request information for the operation instruction, that is, "When the conditional instruction 1 is executed, help me execute the one-key instruction 3 and turn on NFC."

[0078] In some embodiments of the present application, the electronic device may send the first message to the server via the Hypertext Transfer Protocol (HTTP); or, the electronic device may send the first message to the server via the Transmission Control Protocol (TCP); or, the electronic device may send the first message to the server via a push notification; or, the electronic device may send the first message to the server via the User Datagram Protocol (UDP). The specific method may be determined based on actual usage requirements and is not limited by the embodiments of the present application.

[0079] In some embodiments of the present application, the above-mentioned first message also includes instruction information of each conditional operation instruction in at least one conditional operation instruction stored in the electronic device.

[0080] In some embodiments of the present application, the above-mentioned instruction information includes at least one of the following: the instruction name of each conditional operation instruction in at least one conditional operation instruction, the standardized natural language of each conditional operation instruction in at least one conditional operation instruction, the instruction type of each conditional operation instruction in at least one conditional operation instruction, and the instruction protocol identifier corresponding to each conditional operation instruction in at least one conditional operation instruction.

[0081] In some embodiments of the present application, the first message may further include instruction information of all conditional operation instructions stored in the electronic device.

[0082] In some embodiments of the present application, the above instruction type may include any of the following: a conditional instruction or an operation instruction.

[0083] In some embodiments of the present application, the above-mentioned instruction protocol identifier may include any of the following: a digital code, a string name, a binary bit mask, a hash value or a universally unique identifier (Universally Unique Identifier, UUID), etc.

[0084] Illustratively, the instruction information of the above-mentioned operation instructions may be stored in the electronic device in the form of a table, as shown in Table 1.

[0085] Table 1

[0086]

[0087] Step 202: The electronic device displays the standardized natural language of the operation instruction generation request information and the nested operation instructions on the AI assistant interface.

[0088] In an embodiment of the present application, the above-mentioned nested operation instruction includes at least one conditional operation instruction and a new operation instruction, and the nested operation instruction is generated by the server based on the instruction information of at least one conditional operation instruction and the operation instruction generation request information.

[0089] In some embodiments of the present application, the electronic device may display operation instruction generation request information in a first display area in the AI assistant interface, and display a standardized natural language of nested operation instructions in a second display area in the AI assistant interface.

[0090] In some embodiments of the present application, the electronic device may display operation instruction generation request information in the first display area in the AI assistant interface, display standardized natural language of nested operation instructions in the second display area in the AI assistant interface, and display instruction generation success prompt words in the third display area in the AI assistant interface.

[0091] For example, in combination with the above scenario 1, Figure 3 ,like Figure 4 As shown, the mobile phone can display the operation instruction generation request information "When conditional instruction 1 is executed, help me execute one-key instruction 3 and turn on NFC" in the first display area 13 of the AI assistant interface 10, and display the instruction generation success prompt "The instruction is created successfully and the instruction name is filled in for you. Enter the instruction name and it can be executed quickly" in the third display area 14 of the AI assistant interface 10; and display the instruction type of the nested operation instruction in the second display area 15 of the AI assistant interface 10: "shortcut instruction" and the instruction name of the nested operation instruction "conditional instruction 4", as well as the standardized natural language of the nested operation instruction "Every day from 8 am to 12 pm, arrive at bus stop B, open bus application A, recognize pictures to find products, broadcast the product name, and turn on NFC".

[0092] For example, in combination with the above-mentioned scenario 2, the mobile phone can display the operation instruction generation request information "When conditional instruction 1 is executed, execute conditional instruction 2, execute one-key instruction 3" in the first display area 13 of the AI assistant interface 10, and display the instruction generation success prompt "The instruction is created successfully, and the instruction name is filled in for you. Enter the instruction name and it can be executed quickly" in the third display area 14 of the AI assistant interface 10; and display the instruction type of the nested operation instruction in the second display area 15 of the AI assistant interface 10: "shortcut instruction" and the instruction name of the nested operation instruction "conditional instruction 5", and display the standardized natural language of the nested operation instruction "Every day from 8 am to 12 pm, arrive at bus stop B, open the A bus application, when I arrive at supermarket A, turn on the image recognition function, recognize the image to find the product, and broadcast the product name."

[0093] In some embodiments of the present application, the user can input the instruction name of the nested operation instruction displayed in the AI assistant interface so that the electronic device can update the instruction name of the nested operation instruction.

[0094] For example, the user can long press and input the instruction name "Conditional Instruction 4" of the nested operation instruction displayed in the AI assistant interface, so that the electronic device can display a text input box in the AI assistant interface, and the user can enter "shopping" in the text input box, so that the electronic device can update the instruction name "Conditional Instruction 4" of the nested operation instruction to "shopping".

[0095] In the operation instruction generation method provided in an embodiment of the present application, an electronic device can receive operation instruction generation request information input by a user on an AI assistant interface and send a first message to a server; wherein the first message includes operation instruction generation request information, the operation instruction generation request information is used to instruct the execution of at least one conditional operation instruction and a newly added operation instruction according to the nested instruction execution condition, and the at least one conditional operation instruction is an already created operation instruction; on the AI assistant interface, the operation instruction generation request information and the standardized natural language of the nested operation instruction are displayed; wherein the nested operation instruction includes at least one conditional operation instruction and a newly added operation instruction, and the nested operation instruction is generated by the server based on the instruction information of the at least one conditional operation instruction and the operation instruction generation request information. In this solution, since the electronic device instructs the server through the first message that it can generate a nested operation instruction based on the instruction information of the at least one conditional operation instruction and the operation instruction generation request information, even if the user does not enter the complete natural language corresponding to the operation instruction in the electronic device, the server can generate the nested operation instruction based on the instruction information corresponding to the at least one conditional operation instruction and the operation instruction generation request information; thus avoiding the phenomenon that the operation instruction cannot be generated when the user does not enter the complete natural language corresponding to the operation instruction.

[0096] Moreover, since the user does not need to input the natural language corresponding to the complete operation instruction, when the user wants the electronic device to perform a complex task, the user can use a short sentence to make the electronic device generate complex nested operation instructions.

[0097] In some embodiments of the present application, Figure 1 ,like Figure 5 As shown, before the above step 202, the operation instruction generation method provided in the embodiment of the present application further includes the following step 301.

[0098] Step 301: The electronic device receives a second message sent by the server.

[0099] In some embodiments of the present application, the above-mentioned second message consists of an instruction protocol corresponding to the nested operation instruction and a standardized natural language of the nested operation instruction; or, the above-mentioned second message consists of an instruction protocol identifier corresponding to at least one conditional operation instruction, an instruction protocol corresponding to the newly added operation instruction, and a standardized natural language of the nested operation instruction.

[0100] In some embodiments of the present application, the electronic device may receive the second message from the server via HTTP; or the electronic device may send the second message from the server via TCP; or the electronic device may send the second message from the server via a push notification; or the electronic device may receive the second message from the server via UDP. The specific method may be determined based on actual usage requirements and is not limited by the embodiments of the present application.

[0101] For example, in combination with the above scenario 1, the instruction protocol corresponding to the nested operation instruction may be:

[0102]

[0103]

[0104] Among them, "8 am to 12 pm every day", "arrive at bus stop B", "open bus application A", "recognize images to find products and announce product names" are the standardized natural languages corresponding to conditional operation instructions; "turn on NFC" is the standardized natural language corresponding to the new operation instructions.

[0105] As another example, in combination with the above scenario 1, the instruction protocol corresponding to the nested operation instruction may be:

[0106]

[0107] Among them, "time_8_12", "location_bus", "system_openapp", and "system_recg" are the instruction protocol identifiers of conditional operation instructions; "Arrive at bus stop B", "Open bus application A", and "Recognize images to find products and announce product names" are the standardized natural languages corresponding to conditional operation instructions; "Open NFC" is the standardized natural language corresponding to the newly added operation instruction.

[0108] In some embodiments of the present application, when the above-mentioned second message includes an instruction protocol identifier corresponding to at least one conditional operation instruction, the electronic device can search for the instruction content corresponding to each conditional operation instruction in at least one conditional operation instruction from Table 2 stored in the electronic device based on the instruction protocol identifier corresponding to each conditional operation instruction in the at least one conditional operation instruction.

[0109] Table 2

[0110]

[0111]

[0112] In this way, by carrying the instruction protocol identifier in the second message, the complete instruction content is not required, which can save network bandwidth, and the electronic device only needs to match the predefined instruction protocol identifier without parsing the instruction content, which can reduce the parsing overhead; in addition, the instruction identifier itself has no instruction semantic content, and it is difficult for attackers to infer system logic through the intercepted instruction identifier, thereby improving the security of the electronic device.

[0113] In some embodiments of the present application, Figure 5 ,like Figure 6 As shown, after the above step 301, the operation instruction generation method provided in the embodiment of the present application further includes the following step 401.

[0114] Step 401: The electronic device associates and stores the instruction name of the nested operation instruction with the standardized natural language of the nested operation instruction.

[0115] In an embodiment of the present application, the standardized natural language of the above-mentioned nested operation instructions is used by the server to generate new nested operation instructions.

[0116] In some embodiments of the present application, the electronic device may establish an association between the instruction name of the nested operation instruction and the standardized natural language of the nested operation instruction, and then store the name of the nested operation instruction and the standardized natural language of the nested operation instruction in an associated manner.

[0117] Illustratively, as shown in Table 3, the electronic device may store the instruction name of the nested operation instruction and the standardized natural language of the nested operation instruction in a table.

[0118] Table 3

[0119]

[0120] Among them, the above-mentioned conditional instruction 4 is the instruction name of the above-mentioned nested operation instruction.

[0121] In some embodiments of the present application, the command name of the nested operation command may be randomly generated by the electronic device or customized by the user. The specific name may be determined according to actual use requirements and is not limited by the embodiments of the present application.

[0122] In some embodiments of the present application, the instruction protocol identifier of the nested operation instruction may be randomly generated by the electronic device or customized by the user. The specific identifier may be determined according to actual use requirements and is not limited by the embodiments of the present application.

[0123] In an embodiment of the present application, the electronic device adds a correspondence between instructions and standardized natural language. When the user needs to perform nested operations of existing conditional instructions and shortcut instructions, the server can generate the operation instructions required by the user by reading the stored standardized natural language of the existing instructions and the nested conditions input by the user.

[0124] The embodiment of the present application provides an operation instruction generation method, which is applied to a server. Figure 7 FIG. 1 shows a flow chart of a method for generating an operation instruction provided by an embodiment of the present application. Figure 7 As shown, the operation instruction generation method provided in the embodiment of the present application may include the following steps 501 and 502.

[0125] Step 501: The server receives a first message sent by an electronic device.

[0126] In an embodiment of the present application, the above-mentioned first message includes operation instruction generation request information, and the above-mentioned operation instruction generation request information indicates to execute at least one conditional operation instruction and a new operation instruction according to the nested instruction execution condition, and the at least one conditional operation instruction is an already created operation instruction.

[0127] In some embodiments of the present application, the above-mentioned first message also includes instruction information of each conditional operation instruction in at least one conditional operation instruction stored in the electronic device.

[0128] In some embodiments of the present application, the above-mentioned instruction information includes at least one of the following: the instruction name of each conditional operation instruction in at least one conditional operation instruction, the standardized natural language of each conditional operation instruction in at least one conditional operation instruction, the instruction type of each conditional operation instruction in at least one conditional operation instruction, and the instruction protocol identifier corresponding to each conditional operation instruction in at least one conditional operation instruction.

[0129] In some embodiments of the present application, the server may store instruction information of each conditional operation instruction in at least one conditional operation instruction sent by the electronic device.

[0130] In some embodiments of the present application, the server may receive the first message sent by the electronic device via HTTP; or the server may receive the first message sent by the electronic device via TCP; or the server may receive the first message sent by the electronic device via push notification; or the server may receive the first message sent by the electronic device via UDP. The specific method may be determined based on actual usage requirements and is not limited by the embodiments of the present application.

[0131] Step 502: The electronic device generates a command protocol corresponding to a nested operation instruction and a standardized natural language for the nested operation instruction based on the command information of each conditional operation instruction in at least one conditional operation instruction and the operation instruction generation request information.

[0132] In an embodiment of the present application, the above-mentioned nested operation instructions include at least one conditional operation instruction and a new operation instruction.

[0133] It should be noted that the specific process of the above step 502 can be found in the following embodiment, and will not be described again here to avoid repetition.

[0134] In the operation instruction generation method provided in an embodiment of the present application, a server receives a first message sent by an electronic device, the first message including operation instruction generation request information, the operation instruction generation request information instructing to execute at least one conditional operation instruction and a newly added operation instruction according to a nested instruction execution condition, the at least one conditional operation instruction being an already created operation instruction; based on the instruction information of each conditional operation instruction in the at least one conditional operation instruction and the operation instruction generation request information, an instruction protocol corresponding to the nested operation instruction and a standardized natural language for the nested operation instruction are generated. In this solution, if the operation instruction generation request information does not contain a complete natural language corresponding to at least one conditional operation instruction, the server can also generate a nested operation instruction using the instruction information corresponding to the at least one conditional operation instruction; thus, the phenomenon of being unable to generate an operation instruction due to the user not entering the complete natural language corresponding to the conditional operation instruction is avoided.

[0135] In some embodiments of the present application, Figure 7 ,like Figure 8 As shown, the above step 502 can be specifically implemented through the following steps 502a to 502d.

[0136] Step 502a: The server performs intent analysis on the operation instruction generation request information to obtain the instruction name of each conditional operation instruction in at least one conditional operation instruction, instruction description information of the newly added operation instruction, and nested instruction execution conditions.

[0137] In an embodiment of the present application, the electronic device can perform intent analysis on the operation instruction generation request information through the first model to obtain the instruction name of each conditional operation instruction in at least one conditional operation instruction, the instruction description information of the newly added operation instruction, and the nested instruction execution condition.

[0138] In some embodiments of the present application, the first model may be any one of the following: an artificial intelligence (AI) model, a neural network model, or a large language model, etc. The specific model may be determined based on actual usage requirements and is not limited in the embodiments of the present application.

[0139] For example, in combination with the above scenario 1, the server can perform intent analysis on the operation instruction generation request information through a large language model.

[0140] For example, if you're a master of multi-intent segmentation, I'll give you a multi-intent user query and ask you to split it using the example format. You must strictly follow my rules: the label is the category, and the separator is a line break, no blank lines. If there are any of the following shortcut commands, prioritize them: [Conditional Command 1, Conditional Command 2, One-Click Command 3]. If there are no shortcut commands, split them according to their category.

[0141] example:

[0142] Query: When conditional command 1 is executed, execute one-touch command 3 and turn on NFC. Split the query into [{'id':'step1','summary':'When conditional command 1 is executed','label':'Conditional command 1','rely':[]},{'id':'step2','summary':'Execute one-touch command 3','label':'One-touch command 3','rely':['step1']},{'id':'step3','summary':'Turn on NFC','label':'System operation','rely':['step2']}] and input the large language model. The output of the large language model is used as the results of intent recognition and intent decomposition.

[0143] [{'id':'step1','summary':'When conditional instruction 1 is executed','label':'Conditional instruction 1','rely':[]},{'id':'step2','summary':'Execute one-key instruction 3','label':'One-key instruction 3','rely':['step1']},{'id':'step3','summary':'Turn on NFC','label':'System operation','rely':['step2']}]

[0144] The parsing results are as follows, including the instruction name of the conditional operation instruction, the natural language corresponding to the new instruction, and the instruction type:

[0145] Nested operation instructions

[0146] (1) When conditional instruction 1 is executed, condition_conditional instruction

[0147] (2) Execute one-key command 3 Skill_one-key command

[0148] (2) Open NFC Skill_System Operation

[0149] As another example, in combination with the above scenario 2, the server can use a large language model to perform intent analysis on the request information generated by the operation instruction.

[0150] For example, if you're a master of multi-intent segmentation, I'll give you a multi-intent user query and ask you to split it using the example format. You must strictly follow my rules: the label is the category, and the separator is a line break, no blank lines. If there are any of the following shortcut commands, prioritize them: [Conditional Command 1, Conditional Command 2, One-Click Command 3]. If there are no shortcut commands, split them according to their category.

[0151] example:

[0152] Query: When conditional instruction 1 is executed, execute one-key instruction 3. Execute conditional instruction 2 and split it into the following: [{'id':'step1','summary':'When conditional instruction 1 is executed','label':'Conditional instruction 1','rely':[]},{'id':'step2','summary':'Execute one-key instruction 3','label':'One-key instruction 3','rely':['step1']},{'id':'step3','summary':'Conditional instruction 2','label':'Conditional instruction','rely':['step2']}] and input it into the large language model. The output of the large language model is used as the results of intent recognition and intent decomposition.

[0153] [{'id':'step1','summary':'When conditional instruction 1 is executed','label':'Conditional instruction 1','rely':[]},{'id':'step2','summary':'Execute one-key instruction 3','label':'One-key instruction 3','rely':['step1']},{'id':'step3','summary':'Conditional instruction 2','label':'Conditional instruction','rely':['step2']}]

[0154] The parsing result is as follows, which includes the instruction name and instruction type:

[0155] Nested operation instructions

[0156] (1) When conditional instruction 1 is executed, condition_conditional instruction

[0157] (2) Conditional instruction 2 Condition_Conditional instruction

[0158] (2) Execute one-key command 3 Skill_one-key command

[0159] Step 502b: The server determines, from the instruction information of each conditional operation instruction in the at least one conditional operation instruction, a standardized natural language that matches the instruction name of each conditional operation instruction in the at least one conditional operation instruction.

[0160] In an embodiment of the present application, the server can compare the instruction name of at least one conditional operation instruction with the instruction name of each conditional instruction in at least one conditional operation instruction in turn, thereby determining the standardized natural language corresponding to the instruction name that is the same as the instruction name of each conditional operation instruction as the standardized natural language that matches the instruction name of each conditional operation instruction.

[0161] For example, in combination with the above Table 1, the server can compare the instruction name "Conditional Instruction 1" of the conditional operation instruction in the operation instruction generation request information with the instruction names of all operation instructions in Table 1, thereby determining the standardized natural language corresponding to the instruction name in Table 1 that is the same as "Conditional Instruction 1" in the operation instruction generation request information as the standardized natural language corresponding to "Conditional Instruction 1" in the operation instruction generation request information, that is, "From 8 am to 12 pm every day, arrive at Jiuxianqiao Bus Station and open the Beijing Bus Application."

[0162] It should be noted that, since the server cannot parse the user's intention through the instruction name, the server needs to find the standardized natural language corresponding to at least one conditional operation instruction through information matching.

[0163] Step 502c: The server generates a new standardized natural language based on the instruction description information of the new operation instruction.

[0164] For example, the instruction description information of the above-mentioned newly added operation instruction may be “turn on NFC”, and the server may directly determine that the user intention is “turn on NFC” through the first model, and generate the second standardized natural language “turn on NFC application”.

[0165] In some embodiments of the present application, when the server cannot parse the user intention corresponding to the new operation instruction based on the instruction description information of the new operation instruction, the server can determine the standardized natural language that matches the instruction description information of the new operation instruction from the instruction information of all historical operation instructions.

[0166] For example, in combination with the above-mentioned scenario 1, the instruction description information of the above-mentioned newly added operation instruction can be "Execute conditional instruction 2". In combination with the above-mentioned Table 1, the server can compare the instruction name "Conditional instruction 2" of the newly added operation instruction in the operation instruction generation request information with the instruction names of all operation instructions in Table 1, thereby determining the standardized natural language corresponding to the instruction name in Table 1 that is the same as "Conditional instruction 2" in the operation instruction generation request information as the standardized natural language corresponding to the newly added operation instruction in the operation instruction generation request information, that is, "Recognize the image to find the product and broadcast the product name."

[0167] Step 502d: The server generates an instruction protocol corresponding to the nested operation instruction based on the standardized natural language that matches the instruction name of each conditional operation instruction in the at least one conditional operation instruction, the newly added standardized natural language, and the nested instruction execution condition.

[0168] It should be noted that the specific implementation process of the above step 702d can be found in the following embodiment, and will not be described here in detail to avoid repetition.

[0169] In an embodiment of the present application, the server can obtain the standardized natural language corresponding to the conditional operation instruction through the instruction name corresponding to the conditional operation instruction, and then generate nested operation instructions through the standardized natural language corresponding to the conditional operation instruction and the standardized natural language corresponding to the new operation instruction; avoiding the phenomenon that the operation instruction cannot be generated when the user does not enter the complete natural language corresponding to the conditional operation instruction.

[0170] In some embodiments of the present application, Figure 8 ,like Figure 9 As shown, the above step 502d can be specifically implemented through the following steps 601 to 603.

[0171] Step 601: The server performs instruction mapping on the standardized natural language matching the instruction name of each conditional operation instruction in at least one conditional operation instruction to obtain the instruction protocol of each conditional operation instruction in at least one conditional operation instruction.

[0172] In an embodiment of the present application, the server can determine the instruction type of the conditional operation instruction based on the standardized natural language that matches the instruction name of each conditional operation instruction in at least one conditional operation instruction, and then determine the instruction vertical category based on the instruction type, and then perform instruction mapping through the instruction vertical category to obtain the instruction protocol of each conditional operation instruction in at least one conditional operation instruction.

[0173] For example, assuming that the instruction type corresponding to the standardized natural language matching the instruction name of a conditional operation instruction is a conditional instruction type, the server can perform instruction mapping through the conditional vertical category to obtain the conditional operation instruction protocol.

[0174] For example, if you are an expert at analyzing various action instruction APIs under time conditions, please note that you should only perform API analysis on user conversations that execute action instructions and have time conditions. Please do not output APIs that do not fall into this category.

[0175] The tools you can use are as follows: [{\"name\":\"time\",\"description\":\"Time-condition API, to determine the time conditions of user instructions\",\"parameters\":{\"type\":\"object\",\"properties\":{\"times\":{\"type\":\"string\",\"description\":\"Specific time point or time period\"}}}] Please note that you only perform API judgment on user scripts that execute action instructions and whose objects are time conditions. Please do not output the API if it does not fall into this category.

[0176] The conditional operation instruction protocol is as follows:

[0177]

[0178]

[0179] Step 602: The server performs instruction mapping on the newly added standardized natural language to obtain an instruction protocol for the newly added operation instruction.

[0180] In an embodiment of the present application, the server can determine the instruction type of the new operation instruction based on the newly added standardized natural language, and then determine the instruction vertical category based on the instruction type, and then perform instruction mapping through the instruction vertical category to obtain the instruction protocol of the new operation instruction.

[0181] For example, assuming that the instruction type corresponding to the newly added standardized natural language is a skill instruction type, the server can map the instructions through the skill vertical category to obtain the instruction protocol of the newly added operation instruction.

[0182] For example, if you are an expert in various operation instruction APIs, please note that you should only perform API judgment on user dialogues that execute action instructions and have time conditions. Please do not output APIs that do not fall into this category.

[0183] The tools you can use are as follows: [{\"name\":\"time\",\"description\":\"Time-condition API, to determine the time conditions of user instructions\",\"parameters\":{\"type\":\"object\",\"properties\":{\"times\":{\"type\":\"string\",\"description\":\"Specific time point or time period\"}}}] Please note that you only perform API judgment on user scripts that execute action instructions and whose objects are time conditions. Please do not output the API if it does not fall into this category.

[0184] The command protocol for the newly added operation instructions is as follows:

[0185]

[0186] Step 603: The server generates an instruction protocol corresponding to the nested operation instruction based on the nested instruction execution condition, the instruction protocol of at least one conditional operation instruction, and the instruction protocol of the newly added operation instruction.

[0187] In an embodiment of the present application, the server may combine the instruction protocol of at least one conditional operation instruction and the instruction protocol of the newly added operation instruction according to the nested instruction execution condition to generate an instruction protocol corresponding to the nested operation instruction.

[0188] In an embodiment of the present application, the server can generate operation instructions based on the instruction vertical categories corresponding to different types of operation instructions, thereby improving the accuracy of the server in generating operation instructions.

[0189] In some embodiments of the present application, Figure 9 ,like Figure 10 As shown, the above step 603 can be specifically implemented through the following step 603a.

[0190] Step 603a: The server adjusts the storage order of the instruction protocol corresponding to at least one conditional operation instruction and the instruction protocol corresponding to the newly added operation instruction according to the nested instruction execution condition, and obtains the instruction protocol corresponding to the nested operation instruction.

[0191] For example, the nested instruction execution condition is "when conditional instruction 1 is executed, execute conditional instruction 2, and execute one-key instruction 3". If the storage order of the instruction protocols corresponding to the two conditional operation instructions and the instruction protocols corresponding to the newly added operation instructions is conditional instruction 2, conditional instruction 1, and one-key instruction 3, then the server will rearrange the storage order of the instruction protocols corresponding to the two conditional operation instructions and the instruction protocols corresponding to the newly added operation instructions to conditional instruction 1, conditional instruction 2, and one-key instruction 3 according to the above-mentioned nested instruction execution condition.

[0192] In an embodiment of the present application, the server may nest instruction execution conditions and rearrange the storage order of the instruction protocol corresponding to at least one conditional operation instruction and the instruction protocol corresponding to the newly added operation instruction to obtain the instruction protocol corresponding to the nested operation instruction.

[0193] In an embodiment of the present application, the server can adjust the storage order of the instruction protocol corresponding to at least one conditional operation instruction and the instruction protocol corresponding to the newly added operation instruction through nested instruction execution conditions, so that the nested operation instructions are more in line with user needs.

[0194] In some embodiments of the present application, Figure 7 ,like Figure 11 As shown, after the above step 502, the operation instruction generation method provided in the embodiment of the present application further includes the following step 701.

[0195] Step 701: The server sends a second message to the electronic device.

[0196] In some embodiments of the present application, the above-mentioned second message consists of an instruction protocol corresponding to the nested operation instruction and a standardized natural language of the nested operation instruction; or, the above-mentioned second message consists of an instruction protocol identifier corresponding to at least one conditional operation instruction, an instruction protocol corresponding to the newly added operation instruction, and a standardized natural language of the nested operation instruction.

[0197] In some embodiments of the present application, the server may send the second message to the electronic device via HTTP; or the server may send the second message to the electronic device via TCP; or the server may send the second message to the electronic device via a push notification; or the server may send the second message to the electronic device via UDP. The specific method may be determined based on actual usage requirements and is not limited by the embodiments of the present application.

[0198] In an embodiment of the present application, after generating the instruction protocol of the nested operation instruction, the server can send the instruction protocol of the nested operation instruction and the standardized natural language composition of the nested operation instruction to the electronic device through a second message; or the server sends the instruction protocol identifier corresponding to at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction, and the standardized natural language of the nested operation instruction to the electronic device through a second message, thereby improving the flexibility of the server in sending the nested operation instruction protocol.

[0199] The following is a detailed explanation of the generation process of at least one conditional operation instruction involved in this application. Figure 12 As shown, the conditional operation instructions include: 1. From 8:00 AM to 12:00 PM every day, if I arrive at bus stop B, help me turn on bus stop A; 2. From 8:00 AM to 12:00 PM every day, when I arrive at supermarket A, turn on the image recognition function; 3. The image recognition application searches for products and announces the product names. This can be specifically implemented through steps 30 to 37 below.

[0200] Step 30: The electronic device obtains instruction description information.

[0201] For example, for conditional operation instruction 1, such as Figure 13A As shown, the mobile phone can display an AI assistant interface 10, which includes a voice input control 20, a text input box 21 and a message display area 22; the user can long press the voice input control 20 to input, and output the voice "From 8 am to 12 pm every day, when I arrive at bus stop B, help me turn on bus A", so that the mobile phone can convert the voice into text and display the text "From 8 am to 12 pm every day, when I arrive at bus stop B, help me turn on bus A" in the message display area 22.

[0202] For the above conditional operation instruction 2, such as Figure 13B As shown, the mobile phone can display an AI assistant interface 10, which includes a voice input control 20, a text input box 21 and a message display area 22; the user can long press the voice input control 20 to input, and output the voice "From 8 am to 12 pm every day, when I arrive at Supermarket A, turn on the image recognition function", so that the mobile phone can convert the voice into text and display the text 24 "From 8 am to 12 pm every day, when I arrive at Supermarket A, turn on the image recognition function" in the message display area 22.

[0203] For the above conditional operation instruction 3, such as Figure 13CAs shown, the mobile phone can display an AI assistant interface 10, which includes a voice input control 20, a text input box 21 and a message display area 22; the user can long press the voice input control 20 to input, and output the voice "recognize the image to find the product, and announce the product name", so that the mobile phone can convert the voice into text and display the text "recognize the image to find the product, and announce the product name" in the message display area 22.

[0204] Step 31: The electronic device sends instruction description information to the server.

[0205] Step 32: The server receives the instruction description information and performs intent recognition and intent decomposition on the instruction description information.

[0206] In the embodiment of the present application, the server can use a large language model to decompose the instruction description information into its intent.

[0207] For example, the server relies on a large language model to decompose the instruction description information into intent, using the following prompt:

[0208] You are a master of multi-intent splitting. I will give you a user's multi-intent query and help me split it according to the format of the example. You must strictly follow my rules. The label is the category to which it belongs, and the interval is a line break. Do not allow blank lines. Example:

[0209] Query: After 8:00, open text messages and open calendar. Split into: [{'id':'step1','summary':'After 8:00','label':'Time','rely':[]},{'id':'step2','summary':'Open text messages','label':'System operations','rely':['step1']},{'id':'step3','summary':'Open calendar','label':'System operations','rely':['step2']}] Input the large language model. Use the output of the large language model as the decomposition result.

[0210] For example, Figure 14 As shown in the figure, the processing process of the large language model can be: query input, preprocessing and prompt splicing, large language model processing, and output of the split result.

[0211] The result returned by the model for the above conditional operation instruction 1 is:

[0212] [{'id':'step1','summary':From 8am to 12pm every day','label':'Time','rely':[]},{'id':'step2','summary':'If I arrive at bus stop B','label':'Location','rely':['step1']},{'id':'step3','summary':'Please help me open bus app A','label':'System operation','rely':['step2']}]

[0213] The intent resolves to:

[0214] (1) From now on, every day from 8:00 am to 12:00 pm

[0215] (2) If and when I arrive at bus stop B, condition_location

[0216] (3) Please help me open the A bus app skills_system operation

[0217] The results returned by the model 2 for the above conditional operation instructions are:

[0218] [{'id':'step1','summary':x 8am to 12pm every day','label':'Time','rely':[]},{'id':'step2','summary':'When I arrived at Supermarket A','label':'Location','rely':['step1']},{'id':'step3','summary':'Turn on the image recognition function','label':'System operation','rely':['step2']}]

[0219] The intent resolves to:

[0220] (4) Conditions_Time from 8:00 am to 12:00 pm every day

[0221] (5) When I arrive at Supermarket A Condition_Location

[0222] (6) Enable image recognition function skills_system operation

[0223] The intention of the above conditional operation instruction 3 is:

[0224] (7) Conditions after the image recognition application finds the product_System operation

[0225] (8) Product Name Broadcasting Skill_Broadcast

[0226] Step 33: Whether the server can parse the instruction.

[0227] In this embodiment of the present application, the server can perform semantic recognition on the natural language of each of the three conditional operation instructions to obtain the user's intent. If the server can obtain the user's intent, it determines that the instruction can be parsed; if the server cannot obtain the user's intent, it determines that the instruction cannot be parsed.

[0228] In the embodiment of the present application, if the server can parse the instruction, step 34 can be executed; if the server cannot parse the instruction, step 36 can be executed.

[0229] Step 34: The server generates operation instructions and standardized natural language through shortcut instruction vertical categories.

[0230] In an embodiment of the present application, the server obtains the instruction type through the above-mentioned intent analysis, and inputs the natural language of the above-mentioned three conditional operation instructions into the shortcut instruction vertical category corresponding to the instruction type respectively, performs instruction mapping, and obtains three conditional operation instructions.

[0231] Step 35: The server sends the conditional operation instruction and standard natural language to the electronic device.

[0232] In an embodiment of the present application, the server sends the conditional operation instruction and the standard natural language corresponding to the conditional operation instruction to the electronic device through a third message.

[0233] Step 36: The server fails to create and sends a creation failure message to the electronic device.

[0234] In the embodiment of the present application, the server sends a creation failure message to the electronic device through a fourth message.

[0235] Step 37: The electronic device receives the operation instruction and standardized natural language sent by the server.

[0236] In an embodiment of the present application, the electronic device can display the standardized natural language corresponding to the operation instruction in the instruction interaction interface.

[0237] For example, for the above conditional operation instruction 1, combined with Figure 13A ,like Figure 15A As shown, after receiving the operation instructions and standardized natural language sent by the server, the mobile phone can display an instruction generation success message 51 in the message display area of the AI assistant interface 10. The instruction generation success message 51 can be "The instruction has been created successfully, and the instruction name is automatically filled in for you. Enter the instruction name for quick execution"; and display "Shortcut instruction; Conditional instruction 1; Condition: Arrive at bus stop B from 8 am to 12 pm every day" in the message display area 52 of the AI assistant interface 10; Task: Open bus A.

[0238] For the above conditional operation instruction 2, combined with Figure 13B ,like Figure 15B As shown, after receiving the operation instructions and standardized natural language sent by the server, the mobile phone can display the instruction generation success message 51 in the message display area of the AI assistant interface 10. The instruction generation success message 15 can be "The instruction has been created successfully, and the instruction name is automatically filled in for you. Enter the instruction name for quick execution"; and display "Shortcut instruction; Conditional instruction 2; Condition: Arrive at Supermarket A from 8 am to 12 pm every day" in the message display area 52 of the instruction interaction interface 10; Task: Open image recognition.

[0239] For the above conditional operation instruction 3, combined with Figure 13C ,like Figure 15C As shown, after receiving the operation instructions and standardized natural language sent by the server, the mobile phone can display a successful instruction generation message 51 in the message display area of the AI assistant interface 10. The successful instruction generation message 51 can be "The instruction has been created successfully, and the instruction name is automatically filled in for you. Enter the instruction name and you can execute it quickly"; and display "Quick instruction; One-key instruction 3; Task: Recognize the image to find the product and broadcast the product name" in the message display area 52 of the instruction interaction interface 10.

[0240] The following is a detailed explanation of the method for generating the operation instructions provided by this application. Figure 16 As shown, it can be specifically implemented through the following steps 40 to 46.

[0241] Step 40: The electronic device obtains an operation instruction to generate request information.

[0242] Step 41: The electronic device sends an operation instruction generation request message to the server.

[0243] Step 42: The server receives the operation instruction generation request information sent by the electronic device, and performs intent recognition and intent decomposition on the operation instruction generation request information.

[0244] Step 43: Whether the server can parse it into an operation instruction.

[0245] In the embodiment of the present application, if the server can parse the operation instruction, step 44 is executed; if the server cannot parse the operation instruction, step 46 is executed.

[0246] Step 44: The server searches for the standardized natural language through the instruction information of the conditional operation instruction.

[0247] Step 45: The server generates operation instructions and standardized natural language through shortcut instruction vertical categories, and sends the operation instructions and standardized natural language to the electronic device.

[0248] Step 46: Creation failed.

[0249] In an embodiment of the present application, since the electronic device instructs the server through the first message that it can generate a nested operation instruction through the instruction information of at least one conditional operation instruction and the operation instruction generation request information, even if the user does not enter the complete natural language corresponding to the operation instruction in the electronic device, the server can also generate a nested operation instruction through the instruction information corresponding to at least one conditional operation instruction and the operation instruction generation request information; this avoids the phenomenon that the operation instruction cannot be generated when the user does not enter the complete natural language corresponding to the operation instruction.

[0250] Moreover, since the user does not need to input the natural language corresponding to the complete operation instruction, when the user wants the electronic device to perform a complex task, the user can trigger the electronic device to generate complex nested operation instructions through a short statement.

[0251] The above-mentioned method embodiments, or various possible implementation methods in each method embodiment, can be executed separately, or, under the premise that there is no contradiction, can also be executed in combination with each other. The specific implementation can be determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0252] It should be noted that the operating instruction generation method provided in the embodiment of the present application can be executed by an operating instruction generation device. In the embodiment of the present application, the operating instruction generation device executing the operating instruction generation method is taken as an example to illustrate the operating instruction generation device provided in the embodiment of the present application.

[0253] Figure 17 A possible structural diagram of the operation instruction generating device involved in the embodiment of the present application is shown. Figure 17 As shown, the operation instruction generating device 70 may include: a receiving module 71 , a sending module 72 and a display module 73 .

[0254] Among them, the receiving module 71 is used to receive the operation instruction generation request information input by the user in the artificial intelligence AI assistant interface. The sending module 72 is used to send a first message to the server; wherein, the first message includes the operation instruction generation request information, and the operation instruction generation request information is used to instruct the execution of at least one conditional operation instruction and a new operation instruction according to the nested instruction execution condition, and the at least one conditional operation instruction is an already created operation instruction. The display module 73 is used to display the operation instruction generation request information and the standardized natural language of the nested operation instruction on the AI assistant interface; wherein, the nested operation instruction includes at least one conditional operation instruction and a new operation instruction, and the nested operation instruction is generated by the server based on the instruction information of at least one conditional operation instruction and the operation instruction generation request information.

[0255] In one possible implementation, the above-mentioned first message also includes instruction information of each conditional operation instruction in at least one conditional instruction stored in the electronic device; wherein, the instruction information includes at least one of the following: the instruction name of each conditional operation instruction in at least one conditional instruction, the standardized natural language of each conditional operation instruction in at least one conditional instruction, the instruction type of each conditional operation instruction in at least one conditional instruction, and the instruction protocol identifier corresponding to each conditional operation instruction in at least one conditional instruction.

[0256] In one possible implementation, the above-mentioned receiving module 71 is also used to receive a second message sent by the server before the display module 73 displays the operation instruction generation request information and the standardized natural language of the nested operation instruction on the AI assistant interface; wherein the second message is composed of the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; or, the second message is composed of the instruction protocol identifier corresponding to at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction, and the standardized natural language of the nested operation instruction.

[0257] In one possible implementation, the operation instruction generating device 70 provided in the embodiment of the present application also includes: a storage module, which is used to associate and store the instruction name of the nested operation instruction with the standardized natural language of the nested operation instruction after the receiving module 71 receives the second message sent by the server; wherein the standardized natural language of the nested operation instruction is used by the server to generate a new nested operation instruction.

[0258] In a possible implementation, the operation instruction generation request information includes: the instruction name of each conditional operation instruction in at least one conditional instruction, instruction description information of the newly added operation instruction, and nested instruction execution conditions.

[0259] An embodiment of the present application provides an operation instruction generating device. Since the operation instruction generating device indicates to the server through a first message that it can generate a nested operation instruction through the instruction information of at least one conditional operation instruction and the operation instruction generation request information, even if the user does not enter the complete natural language corresponding to the operation instruction in the operation instruction generating device, the server can also generate the nested operation instruction through the instruction information corresponding to the at least one conditional operation instruction and the operation instruction generation request information; thereby avoiding the phenomenon that the operation instruction cannot be generated when the user does not enter the complete natural language corresponding to the operation instruction.

[0260] Moreover, since the user does not need to input the natural language corresponding to the complete operation instruction, when the user wants the operation instruction generation device to perform a complex task, the user can trigger the operation instruction generation device to generate complex nested operation instructions through a short statement.

[0261] Figure 18 FIG. 1 shows another possible structural diagram of the operation instruction generating device involved in the embodiment of the present application. Figure 18 As shown, the operation instruction generating device 80 may include: a receiving module 81 and a generating module 82.

[0262] The receiving module 81 is configured to receive a first message sent by an electronic device, the first message including operation instruction generation request information, the operation instruction generation request information instructing execution of at least one conditional operation instruction and a newly added operation instruction according to the nested instruction execution condition, the at least one conditional operation instruction being an already created operation instruction. The generating module 82 is configured to generate an instruction protocol corresponding to the nested operation instruction and a standardized natural language for the nested operation instruction based on the instruction information and operation instruction generation request information of each conditional operation instruction in the at least one conditional operation instruction; the nested operation instruction includes at least one conditional operation instruction and a newly added operation instruction.

[0263] In one possible implementation, the above-mentioned first message also includes instruction information of each conditional operation instruction in at least one conditional operation instruction stored in the electronic device; wherein the instruction information includes at least one of the following: the instruction name of each conditional operation instruction in at least one conditional operation instruction, the standardized natural language of each conditional operation instruction in at least one conditional operation instruction, the instruction type of each conditional operation instruction in at least one conditional operation instruction, and the instruction protocol identifier corresponding to each conditional operation instruction in at least one conditional operation instruction.

[0264] In one possible implementation, the above-mentioned generation module 82 is specifically used to perform intent analysis on the operation instruction generation request information to obtain the instruction name of each conditional operation instruction in at least one conditional operation instruction, the instruction description information of the newly added operation instruction, and the nested instruction execution condition; from the instruction information of each conditional operation instruction in at least one conditional operation instruction, determine the standardized natural language that matches the instruction name of each conditional operation instruction in at least one conditional operation instruction; based on the instruction description information of the newly added operation instruction, generate a newly added standardized natural language; based on the standardized natural language that matches the instruction name of each conditional operation instruction in at least one conditional operation instruction, the newly added standardized natural language and the nested instruction execution condition, generate an instruction protocol corresponding to the nested operation instruction.

[0265] In one possible implementation, the above-mentioned generation module 82 is specifically used to perform instruction mapping on the standardized natural language that matches the instruction name of each conditional operation instruction in at least one conditional operation instruction, to obtain the instruction protocol of each conditional operation instruction in at least one conditional operation instruction; and perform instruction mapping on the newly added standardized natural language to obtain the instruction protocol of the newly added operation instruction; and generate the instruction protocol corresponding to the nested operation instruction based on the nested instruction execution condition, the instruction protocol of at least one conditional operation instruction and the instruction protocol of the newly added operation instruction.

[0266] In a possible implementation, the generation module 82 is specifically configured to adjust the storage order of the instruction protocol corresponding to at least one conditional operation instruction and the instruction protocol corresponding to the newly added operation instruction according to the nested instruction execution condition, to obtain the instruction protocol corresponding to the nested operation instruction.

[0267] In one possible implementation, the operation instruction generating device 80 provided in the above-mentioned embodiment of the present application also includes: a sending module, which is used to send a second message to the electronic device after the generation module 82 generates the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; wherein the second message is composed of the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; or, the second message is composed of the instruction protocol identifier corresponding to at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction, and the standardized natural language of the nested operation instruction.

[0268] An embodiment of the present application provides an operation instruction generation device. When there is no complete natural language corresponding to at least one conditional operation instruction in the operation instruction generation request information, the operation instruction generation device can also generate a nested operation instruction through the instruction information corresponding to at least one conditional operation instruction; thereby avoiding the phenomenon that the operation instruction cannot be generated when the user does not enter the complete natural language corresponding to the conditional operation instruction.

[0269] The operation instruction generating device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or a device other than a terminal. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.

[0270] The operation instruction generating device in the embodiment of the present application can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0271] The operation instruction generation device provided in the embodiment of the present application can implement each process implemented in the above embodiment. To avoid repetition, it will not be described here.

[0272] Alternatively, as Figure 19 As shown, an embodiment of the present application also provides an electronic device 90, including a processor 91 and a memory 92, wherein the memory 92 stores a program or instruction that can be run on the processor 91. When the program or instruction is executed by the processor 91, the various steps of the above-mentioned operation instruction generation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0273] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0274] Figure 20 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0275] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101 , a network module 102 , an audio output unit 103 , an input unit 104 , a sensor 105 , a display unit 106 , a user input unit 107 , an interface unit 108 , a memory 109 , and a processor 110 .

[0276] Those skilled in the art will understand that the electronic device 100 may also include a power source (such as a battery) to power each component, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 20 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.

[0277] The user input unit 107 is configured to receive operation instruction generation request information input by a user on the artificial intelligence (AI) assistant interface; the radio frequency unit 101 is configured to send a first message to the server; the first message includes operation instruction generation request information, which is used to instruct the execution of at least one conditional operation instruction and a newly added operation instruction according to the nested instruction execution condition, where the at least one conditional operation instruction is an already created operation instruction. The display unit 106 is configured to display the operation instruction generation request information and the standardized natural language of the nested operation instruction on the AI assistant interface; the nested operation instruction includes at least one conditional operation instruction and a newly added operation instruction, and the nested operation instruction is generated by the server based on the instruction information of the at least one conditional operation instruction and the operation instruction generation request information.

[0278] In some embodiments of the present application, the above-mentioned radio frequency unit 101 is also used to receive a second message sent by the server before displaying the operation instruction generation request information and the standardized natural language of the nested operation instruction on the AI assistant interface; wherein the second message is composed of the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; or, the second message is composed of the instruction protocol identifier corresponding to at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction, and the standardized natural language of the nested operation instruction.

[0279] In some embodiments of the present application, the above-mentioned processor 110 is also used to store the instruction name of the nested operation instruction in association with the standardized natural language of the nested operation instruction after receiving the second message sent by the server; wherein the standardized natural language of the nested operation instruction is used by the server to generate a new nested operation instruction.

[0280] An embodiment of the present application provides an electronic device. Since the electronic device indicates to a server through a first message that it can generate a nested operation instruction through the instruction information of at least one conditional operation instruction and the operation instruction generation request information, even if the user does not enter the complete natural language corresponding to the operation instruction in the electronic device, the server can also generate the nested operation instruction through the instruction information corresponding to the at least one conditional operation instruction and the operation instruction generation request information; thereby avoiding the phenomenon that the operation instruction cannot be generated when the user does not enter the complete natural language corresponding to the operation instruction.

[0281] Moreover, since the user does not need to input the natural language corresponding to the complete operation instruction, when the user wants the electronic device to perform a complex task, the user can trigger the electronic device to generate complex nested operation instructions through a short statement.

[0282] The electronic device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0283] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described here.

[0284] It should be understood that in an embodiment of the present application, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.

[0285] The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0286] Processor 110 may include one or more processing units. Optionally, processor 110 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 110.

[0287] The present application also provides a server comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is configured to execute a program or instruction to implement the steps of the above-described embodiment. This server embodiment corresponds to the above-described server method embodiment, and each implementation process and implementation method of the above-described method embodiment is applicable to this server embodiment and can achieve the same technical effects.

[0288] Specifically, the embodiment of the present application also provides a server. Figure 21 As shown, server 1100 includes an antenna 1101, a radio frequency device 1102, a baseband device 1103, a processor 1104, and a memory 1105. Antenna 1101 is connected to radio frequency device 1102. In the uplink direction, radio frequency device 1102 receives information via antenna 1101 and sends the received information to baseband device 1103 for processing. In the downlink direction, baseband device 1103 processes the information to be transmitted and sends it to radio frequency device 1102. Radio frequency device 1102 processes the received information and then sends it through antenna 1101.

[0289] The radio frequency device 1102 is configured to receive a first message sent by an electronic device, the first message including operation instruction generation request information, the operation instruction generation request information instructing execution of at least one conditional operation instruction and a newly added operation instruction according to a nested instruction execution condition, the at least one conditional operation instruction being an already created operation instruction. The processor 1104 is configured to generate, based on the instruction information and operation instruction generation request information of each conditional operation instruction, an instruction protocol corresponding to the nested operation instruction and a standardized natural language for the nested operation instruction; the nested operation instruction includes at least one conditional operation instruction and a newly added operation instruction.

[0290] In some embodiments of the present application, the above-mentioned processor 1104 is specifically used to perform intent analysis on the operation instruction generation request information to obtain the instruction name of each conditional operation instruction in at least one conditional operation instruction, the instruction description information of the newly added operation instruction, and the nested instruction execution condition; determine the standardized natural language that matches the instruction name of each conditional operation instruction in at least one conditional operation instruction from the instruction information of each conditional operation instruction of at least one conditional operation instruction; generate a newly added standardized natural language based on the instruction description information of the newly added operation instruction; generate an instruction protocol corresponding to the nested operation instruction based on the standardized natural language that matches the instruction name of each conditional operation instruction in at least one conditional operation instruction, the newly added standardized natural language, and the nested instruction execution condition.

[0291] In some embodiments of the present application, the above-mentioned processor 1104 is specifically used to perform instruction mapping on the standardized natural language that matches the instruction name of each conditional operation instruction in at least one conditional operation instruction, and obtain the instruction protocol of each conditional operation instruction in at least one conditional operation instruction; perform instruction mapping on the newly added standardized natural language, and obtain the instruction protocol of the newly added operation instruction; based on the nested instruction execution condition, the instruction protocol of at least one conditional operation instruction and the instruction protocol of the newly added operation instruction, generate the instruction protocol corresponding to the nested operation instruction.

[0292] In some embodiments of the present application, the above-mentioned processor 1104 is specifically used to adjust the storage order of the instruction protocol corresponding to at least one conditional operation instruction and the instruction protocol corresponding to the newly added operation instruction according to the nested instruction execution condition, so as to obtain the instruction protocol corresponding to the nested operation instruction.

[0293] In some embodiments of the present application, the above-mentioned radio frequency device 1102 is further used to send a second message to the electronic device after generating the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; wherein the second message is composed of the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; or, the second message is composed of the instruction protocol identifier corresponding to at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction, and the standardized natural language of the nested operation instruction.

[0294] An embodiment of the present application provides a server. When there is no complete natural language corresponding to at least one conditional operation instruction in the operation instruction generation request information, the server can also generate a nested operation instruction through the instruction information corresponding to at least one conditional operation instruction; thereby avoiding the phenomenon that the operation instruction cannot be generated when the user does not enter the complete natural language corresponding to the conditional operation instruction.

[0295] The method executed by the server in the above embodiment may be implemented in the baseband device 1103 , which includes a baseband processor.

[0296] The baseband device 1103 may include, for example, at least one baseband board on which a plurality of chips are arranged, such as Figure 19 As shown, one of the chips is, for example, a baseband processor, which is connected to the memory 1105 via a bus interface to call the program in the memory 1105 to execute the network device operations shown in the above method embodiment.

[0297] The server may further include a network interface 1106 , which may be, for example, a Common Public Radio Interface (CPRI).

[0298] Specifically, the server 11000 of the embodiment of the present invention further includes: instructions or programs stored in the memory 1105 and executable on the processor 1104, and the processor 1104 calls the instructions or programs in the memory 1105 to execute Figure 21 The methods executed by the modules shown achieve the same technical effects, so they will not be described here to avoid repetition.

[0299] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0300] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0301] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0302] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0303] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned operation instruction generation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0304] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0305] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0306] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A method for generating an operation instruction, executed by an electronic device, characterized in that: The method comprises: Receive operation instruction generation request information input by the user on the artificial intelligence (AI) assistant interface, and send a first message to the server; wherein the first message includes the operation instruction generation request information, and the operation instruction generation request information is used to instruct to execute at least one conditional operation instruction and a new operation instruction according to the nested instruction execution condition, and the at least one conditional operation instruction is an already created operation instruction; On the AI assistant interface, the standardized natural language of the operation instruction generation request information and the nested operation instruction is displayed; wherein, the nested operation instruction includes the at least one conditional operation instruction and the newly added operation instruction, and the nested operation instruction is generated by the server based on the instruction information of the at least one conditional operation instruction and the operation instruction generation request information.

2. The method according to claim 1, characterized in that The first message also includes instruction information of each conditional operation instruction stored in the electronic device; The instruction information includes at least one of the following: an instruction name of each conditional operation instruction, a standardized natural language of each conditional operation instruction, an instruction type of each conditional operation instruction, and an instruction protocol identifier corresponding to each conditional operation instruction.

3. The method according to claim 1, characterized in that Before displaying the standardized natural language of the operation instruction generation request information and the nested operation instruction on the AI assistant interface, the method further includes: receiving a second message sent by the server; In which, the second message consists of the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; or, the second message consists of the instruction protocol identifier corresponding to the at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction and the standardized natural language of the nested operation instruction.

4. The method according to claim 3, characterized in that After receiving the second message sent by the server, the method further includes: storing the instruction name of the nested operation instruction in association with the standardized natural language of the nested operation instruction; The standardized natural language of the nested operation instruction is used by the server to generate a new nested operation instruction.

5. The method according to claim 1, wherein The operation instruction generation request information includes: the instruction name of each conditional operation instruction, instruction description information of the newly added operation instruction, and nested instruction execution conditions.

6. A method for generating an operation instruction, executed by a server, characterized in that: The method comprises: Receiving a first message sent by an electronic device, the first message including operation instruction generation request information, the operation instruction generation request information instructing to execute at least one conditional operation instruction and a newly added operation instruction according to the nested instruction execution condition, the at least one conditional operation instruction being an already created operation instruction; Based on the instruction information of each conditional operation instruction and the operation instruction generation request information, generate an instruction protocol corresponding to the nested operation instruction and a standardized natural language of the nested operation instruction; The nested operation instruction includes the at least one conditional operation instruction and the newly added operation instruction.

7. The method according to claim 6, characterized in that The first message also includes instruction information of each conditional operation instruction stored in the electronic device; The instruction information includes at least one of the following: an instruction name of each conditional operation instruction, a standardized natural language of each conditional operation instruction, an instruction type of each conditional operation instruction, and an instruction protocol identifier corresponding to each conditional operation instruction.

8. The method according to claim 6 or 7, characterized in that The step of generating a command protocol corresponding to a nested operation instruction based on the command information of each conditional operation instruction and the operation instruction generation request information includes: Performing intent analysis on the operation instruction generation request information to obtain the instruction name of each conditional operation instruction, instruction description information of the newly added operation instruction, and nested instruction execution conditions; determining, from the instruction information of each conditional operation instruction, a standardized natural language that matches the instruction name of each conditional operation instruction; Generate a new standardized natural language based on the instruction description information of the new operation instruction; Based on the standardized natural language that matches the instruction name of each conditional operation instruction, the newly added standardized natural language and the nested instruction execution condition, an instruction protocol corresponding to the nested operation instruction is generated.

9. The method according to claim 8, characterized in that The generating, based on the standardized natural language matching the instruction name of each conditional operation instruction, the newly added standardized natural language, and the nested instruction execution condition, of an instruction protocol corresponding to the nested operation instruction includes: Perform instruction mapping on the standardized natural language matching the instruction name of each conditional operation instruction to obtain the instruction protocol of each conditional operation instruction; Performing instruction mapping on the newly added standardized natural language to obtain an instruction protocol for the newly added operation instruction; Based on the nested instruction execution condition, the instruction protocol of the at least one conditional operation instruction and the instruction protocol of the newly added operation instruction, an instruction protocol corresponding to the nested operation instruction is generated.

10. The method according to claim 9, characterized in that The generating, based on the nested instruction execution condition, the instruction protocol of the at least one conditional operation instruction, and the instruction protocol of the newly added operation instruction, the instruction protocol corresponding to the nested operation instruction includes: According to the nested instruction execution condition, the storage order of the instruction protocol corresponding to the at least one conditional operation instruction and the instruction protocol corresponding to the newly added operation instruction is adjusted to obtain the instruction protocol corresponding to the nested operation instruction.

11. The method according to claim 6, characterized in that After generating the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction, the method further includes: sending a second message to the electronic device; In which, the second message consists of the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; or, the second message consists of the instruction protocol identifier corresponding to the at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction and the standardized natural language of the nested operation instruction.

12. An operation instruction generating device, characterized in that: include: A receiving module is used to receive operation instructions input by the user on the AI assistant interface and generate request information; a sending module, configured to send a first message to a server; wherein the first message includes the operation instruction generation request information, the operation instruction generation request information is used to instruct execution of at least one conditional operation instruction and a newly added operation instruction according to the nested instruction execution condition, the at least one conditional operation instruction being an already created operation instruction; A display module is used to display the standardized natural language of the operation instruction generation request information and the nested operation instruction on the AI assistant interface; wherein the nested operation instruction includes the at least one conditional operation instruction and the newly added operation instruction, and the nested operation instruction is generated by the server based on the instruction information of the at least one conditional operation instruction and the operation instruction generation request information.

13. The device according to claim 12, characterized in that The first message also includes instruction information of each conditional operation instruction stored in the electronic device; The instruction information includes at least one of the following: an instruction name of each conditional operation instruction, a standardized natural language of each conditional operation instruction, an instruction type of each conditional operation instruction, and an instruction protocol identifier corresponding to each conditional operation instruction.

14. The device according to claim 12, characterized in that The receiving module is further configured to receive a second message sent by the server before the display module displays the operation instruction generation request information and the standardized natural language of the nested operation instruction on the AI assistant interface; In which, the second message consists of the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; or, the second message consists of the instruction protocol identifier corresponding to the at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction and the standardized natural language of the nested operation instruction.

15. The device according to claim 14, characterized in that The operation instruction generating device also includes: A storage module is used to associate and store the instruction name of the nested operation instruction with the standardized natural language of the nested operation instruction after the receiving module receives the second message sent by the server; wherein the standardized natural language of the nested operation instruction is used by the server to generate a new nested operation instruction.

16. The device according to claim 12, characterized in that The operation instruction generation request information includes: the instruction name of each conditional operation instruction, instruction description information of the newly added operation instruction, and nested instruction execution conditions.

17. An operation instruction generating device, characterized in that: include: a receiving module, configured to receive a first message sent by an electronic device, the first message including operation instruction generation request information, the operation instruction generation request information instructing to execute at least one conditional operation instruction and a newly added operation instruction according to a nested instruction execution condition, the at least one conditional operation instruction being an already created operation instruction; A generating module, configured to generate, based on the instruction information of each conditional operation instruction and the operation instruction generation request information, an instruction protocol corresponding to the nested operation instruction and a standardized natural language for the nested operation instruction; The nested operation instruction includes the at least one conditional operation instruction and the newly added operation instruction.

18. The device according to claim 17, characterized in that The first message also includes instruction information of each conditional operation instruction stored in the electronic device; The instruction information includes at least one of the following: an instruction name of each conditional operation instruction, a standardized natural language of each conditional operation instruction, an instruction type of each conditional operation instruction, and an instruction protocol identifier corresponding to each conditional operation instruction.

19. The device according to claim 17 or 18, characterized in that The generating module is specifically configured to perform intent analysis on the operation instruction generation request information to obtain the instruction name of each conditional operation instruction, the instruction description information of the newly added operation instruction, and the nested instruction execution condition; determining, from the instruction information of each conditional operation instruction, a standardized natural language that matches the instruction name of each conditional operation instruction; Generate a new standardized natural language based on the instruction description information of the new operation instruction; Based on the standardized natural language that matches the instruction name of each conditional operation instruction, the newly added standardized natural language and the nested instruction execution condition, an instruction protocol corresponding to the nested operation instruction is generated.

20. The device according to claim 19, characterized in that The generating module is specifically used to perform instruction mapping on the standardized natural language matching the instruction name of each conditional operation instruction to obtain the instruction protocol of each conditional operation instruction; and performing instruction mapping on the newly added standardized natural language to obtain an instruction protocol for the newly added operation instruction; And based on the nested instruction execution condition, the instruction protocol of the at least one conditional operation instruction and the instruction protocol of the newly added operation instruction, an instruction protocol corresponding to the nested operation instruction is generated.

21. The device according to claim 20, characterized in that The generation module is specifically used to adjust the storage order of the instruction protocol corresponding to the at least one conditional operation instruction and the instruction protocol corresponding to the newly added operation instruction according to the nested instruction execution condition, so as to obtain the instruction protocol corresponding to the nested operation instruction.

22. The device according to claim 17, characterized in that The operation instruction generating device also includes: a sending module, configured to send a second message to the electronic device after the generating module generates an instruction protocol corresponding to the nested operation instruction and a standardized natural language of the nested operation instruction; In which, the second message consists of the instruction protocol corresponding to the nested operation instruction and the standardized natural language of the nested operation instruction; or, the second message consists of the instruction protocol identifier corresponding to the at least one conditional operation instruction, the instruction protocol corresponding to the newly added operation instruction and the standardized natural language of the nested operation instruction.

23. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the operation instruction generating method according to any one of claims 1 to 5.

24. A server, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the operation instruction generation method according to any one of claims 6 to 11.