Human-computer interaction method, device, system, equipment and medium
By obtaining function description information on the client device and using a large cloud model to generate operation instructions, the problem that intelligent assistants have difficulty handling complex multi-functional collaborative tasks is solved, and a more efficient user interaction experience and function management are achieved.
Patent Information
- Application Number
- CN202510865262.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-03
AI Technical Summary
Existing smart assistants struggle to handle complex, multi-functional collaborative tasks and are unable to understand and execute instructions such as "take a picture of this receipt, extract the amount on it, and add it to my accounting app."
By obtaining function description information on the client device, assembling it into operation instruction generation requests, and using the cloud-based large model to select appropriate functions and generate operation instructions, complex instruction processing can be achieved on the client device.
It improves the client device's ability to handle complex user commands, and enhances the user interaction experience and dynamic discovery and management of functions.
Smart Images

Figure CN120743393A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as large language models and intelligent assistants, and specifically to a human-computer interaction method for a first client device, a human-computer interaction method for a server, an apparatus, a human-computer interaction system, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.
[0003] Currently, mainstream intelligent assistants on the market are generally implemented using intent recognition-based command execution solutions and API integration solutions. With the development of large language models, some intelligent assistants have begun to introduce large language models to enhance dialogue understanding and generation capabilities, such as OpenAI's ChatGPT Plugin system and Google Assistant's Bard integration.
[0004] The approaches described in this section are not necessarily approaches that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any approach described in this section is prior art simply by virtue of its inclusion in this section. Similarly, unless otherwise indicated, the issues raised in this section should not be considered as having been recognized in any prior art. Summary of the Invention
[0005] The present disclosure provides a human-computer interaction method for a first client device, a human-computer interaction method for a server, an apparatus, a human-computer interaction system, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of the present disclosure, a human-computer interaction method for a first client device is provided, comprising: in response to receiving a user instruction, obtaining an operation instruction generation request based on the user instruction and functional description information of multiple functions, wherein the multiple functions include multiple first functions possessed by the first client device; sending the operation instruction generation request to a server, wherein the operation instruction generation request is used to trigger a server application cloud-based large model to select at least one function from the multiple functions based on the user instruction and the functional description information, and generate an operation instruction for completing the user instruction based on the at least one function; and in response to receiving the operation instruction sent by the server, performing a call operation on each of the at least one function based on the operation instruction to obtain an execution result of the user instruction.
[0007] According to another aspect of the present disclosure, a human-computer interaction method for a server is provided, comprising: in response to receiving an operation instruction generation request sent by a first client device, applying a cloud-based big model, selecting at least one function from a plurality of functions based on a user instruction in the operation instruction generation request and functional description information of a plurality of functions, wherein the plurality of functions include a plurality of first functions possessed by the first client device; applying the cloud-based big model, generating an operation instruction for completing the user instruction based on the at least one function; and sending the operation instruction to the first client device.
[0008] According to another aspect of the present disclosure, a human-computer interaction apparatus for a first client device is provided, comprising: an acquisition unit, configured to, in response to receiving a user instruction, obtain an operation instruction generation request based on the user instruction and functional description information of a plurality of functions, wherein the plurality of functions include a plurality of first functions possessed by the first client device; a sending unit, configured to send the operation instruction generation request to a server, wherein the operation instruction generation request is used to trigger a server application cloud-based large model to select at least one function from the plurality of functions based on the user instruction and the functional description information, and generate an operation instruction for completing the user instruction based on the at least one function; and an execution unit, configured to, in response to receiving the operation instruction sent by the server, perform a call operation on each of the at least one function based on the operation instruction to obtain an execution result of the user instruction.
[0009] According to another aspect of the present disclosure, a human-computer interaction device for a server is provided, including: a selection unit, configured to, in response to receiving an operation instruction generation request sent by a first client device, apply a cloud-based big model, and select at least one function from a plurality of functions based on the user instruction in the operation instruction generation request and functional description information of the plurality of functions, wherein the plurality of functions include a plurality of first functions possessed by the first client device; a generation unit, configured to apply the cloud-based big model, and generate an operation instruction for completing the user instruction based on the at least one function; and a sending unit, configured to send the operation instruction to the first client device.
[0010] According to another aspect of the present disclosure, a human-computer interaction system is provided, including: a first client device configured to execute the human-computer interaction method for the first client device of the present disclosure; and a server configured to execute the human-computer interaction method for the server of the present disclosure.
[0011] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so as to enable the at least one processor to execute the human-computer interaction method for a first client device or the human-computer interaction method for a server of the present disclosure.
[0012] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the human-computer interaction method for a first client device or the human-computer interaction method for a server of the present disclosure.
[0013] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the human-computer interaction method for a first client device or the human-computer interaction method for a server of the present disclosure.
[0014] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.
[0016] Figure 1 A schematic diagram illustrating an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;
[0017] Figure 2 A flowchart of a human-computer interaction method for a first client device according to an embodiment of the present disclosure is shown;
[0018] Figure 3 A flowchart of obtaining function description information according to an embodiment of the present disclosure is shown;
[0019] Figure 4 A flow chart of generating an operation instruction according to an embodiment of the present disclosure is shown;
[0020] Figure 5 A flowchart of a function execution calling operation according to an embodiment of the present disclosure is shown;
[0021] Figure 6 A flowchart illustrating a safety control process according to an exemplary embodiment of the present disclosure is shown;
[0022] Figure 7 shows the execution flow of an operation instruction according to an exemplary embodiment of the present disclosure;
[0023] Figure 8 A schematic diagram of a process of adaptive learning according to an exemplary embodiment of the present disclosure is shown;
[0024] Figure 9 A flowchart of a human-computer interaction method for a first client device according to an embodiment of the present disclosure is shown;
[0025] Figure 10 A schematic diagram of a human-computer interaction system architecture of a first client device according to an exemplary embodiment of the present disclosure is shown;
[0026] Figure 11 A schematic diagram showing a flow chart of a human-computer interaction method according to an exemplary embodiment of the present disclosure is shown;
[0027] Figure 12 A flow chart of a human-computer interaction method for a server according to an embodiment of the present disclosure is shown;
[0028] Figure 13 A structural block diagram of a human-computer interaction apparatus for a first client device according to an embodiment of the present disclosure is shown;
[0029] Figure 14 A structural block diagram of a human-computer interaction device for a server according to an embodiment of the present disclosure is shown;
[0030] Figure 15shows a structural block diagram of a human-computer interaction system according to an embodiment of the present disclosure;
[0031] Figure 16 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0032] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0033] In this disclosure, unless otherwise specified, the use of terms such as "first" and "second" to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, while in some cases, based on the context of the description, they may also refer to different instances.
[0034] The terms used in the descriptions of the various examples described in this disclosure are for the purpose of describing specific examples only and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in this disclosure encompasses any one and all possible combinations of the listed items.
[0035] In the prior art, intelligent assistants can only execute simple, pre-defined commands and struggle to understand and execute complex tasks that require the collaboration of multiple applications. For example, when a user requests, "Take a picture of this receipt, extract the amount on it, and add it to my accounting app," existing assistants are unable to complete this type of multi-functional collaborative command.
[0036] An embodiment of the present disclosure provides a human-computer interaction method for a first client device. After receiving a user instruction, the method obtains functional description information of the functions of the first client device, assembles the functional description information with the user instruction into an operation instruction generation request, and sends the request to a server, so that the server uses a cloud-based large model to select at least one function suitable for the user to process the user instruction based on the user instruction and the functional description information of the first client device, and generates an operation instruction for the first client device to execute, thereby enabling the first client device to have the ability to process complex user instructions.
[0037] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0038] Figure 1 FIG2 is a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.
[0039] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the user-server human-computer interaction method of the present disclosure.
[0040] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0041] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may, in turn, utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0042] The user can use the client device 101, 102, 103, 104, 105 and / or 106 to input user instructions and obtain the results of the execution of the user instructions. The client device can provide an interface that enables the user of the client device to interact with the client device. The client device can also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure can support any number of client devices.
[0043] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing a variety of different applications, such as various internet-related applications, communication applications (such as email applications), and short message service (SMS) applications, and may use various communication protocols.
[0044] The network 110 may be any type of network known to those skilled in the art that can support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0045] Server 120 may include one or more general-purpose computers, specialized server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0046] The computing units in the server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
[0047] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.
[0048] In some embodiments, server 120 may be a distributed system server or a server integrated with blockchain. Server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host equipped with artificial intelligence technology. A cloud server is a host product within the cloud computing service system that addresses the management difficulties and poor scalability of traditional physical hosts and virtual private servers (VPS) services.
[0049] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in a variety of locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0050] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0051] Figure 1The system 100 may be configured and operated in various ways to enable application of the various methods and apparatuses described in accordance with the present disclosure.
[0052] According to the embodiments of the present disclosure, Figure 2 As shown, a human-computer interaction method for a first client device is provided, the method comprising: step S201, in response to receiving a user instruction, obtaining an operation instruction generation request based on the user instruction and functional description information of multiple functions, wherein the multiple functions include multiple first functions possessed by the first client device; step S202, sending the operation instruction generation request to the server, wherein the operation instruction generation request is used to trigger the server to apply a cloud-based large model to select at least one function from the multiple functions based on the user instruction and the functional description information, and generate an operation instruction for completing the user instruction based on the at least one function; and step S203, in response to receiving the operation instruction sent by the server, performing a call operation on each of the at least one function based on the operation instruction to obtain the execution result of the user instruction.
[0053] Therefore, after receiving the user instruction, the functional description information of the functions of the first client device is obtained, and it is assembled with the user instruction into an operation instruction generation request, which is sent to the server, so that the server uses the cloud-based big model to select at least one function suitable for the user to process the user instruction based on the user instruction and the functional description information of the first client device, and generates an operation instruction for the first client device to execute, so that the first client device has the ability to process complex user instructions and enhance the user's interactive experience.
[0054] In some embodiments, the first client device may be any one of the client devices described above, without limitation herein.
[0055] In some embodiments, the function description information may be pre-stored in the first client device, and may include description information of the first function of the first client device. The description information may include, for example, a name, description, parameter mode, return mode, and other information, which is not limited here.
[0056] In some embodiments, a smart assistant application running on the first client device can interact with the user and receive user commands input by the user. In some embodiments, the user commands can also be received and sent to the first client device by another client device in communication with the first client device, which is not limited here.
[0057] In some embodiments, as Figure 3As shown, the acquisition of function description information may include: step S301, in response to the startup of the first client device, identifying the function annotation in the code of the application associated with the first client device based on the annotation processor; step S302, in response to identifying the function annotation, extracting the description information of the function corresponding to the function annotation, the description information including the function identifier, parameter mode and parameter type; step S303, based on the description information, registering the function in the central registry; and step S304, based on the description information of the registered functions in the central registry, obtaining the function description information of multiple functions.
[0058] In the related art, the intelligent assistant on the client device often lacks sufficient perception of the available functions and applications on the client device or on the client device associated with the client device, which makes it difficult to deeply integrate and call specific functions of the device.
[0059] In some embodiments, after the first client device is started, the functions of all applications on the first client device may be registered. When the first client device is in communication with other client devices, the functions of the other client devices may also be registered.
[0060] In some embodiments, the application code may include pre-set function annotations (for example, function annotations are set in the form of annotations at the code corresponding to the function); in response to the first client device being started, the function annotations may be identified based on the annotation processor, and the identifier, parameter mode, parameter type, and other descriptive information of the function corresponding to the function annotation may be saved in a central registry to complete the registration of the function. After all function annotations have been identified and registered, the descriptive information of the registered functions contained in the central registry may be integrated to obtain the above-mentioned function description information.
[0061] In some embodiments, based on the description information of registered functions in the central registry, obtaining the function description information of multiple functions can generate structured (eg, JSON Schema format) function description information that conforms to the big model understanding based on the description information of all registered functions.
[0062] Therefore, by automatically identifying and extracting the description information of each function from the application code through the annotation processor and completing the registration of each function, it is possible to achieve automatic perception of the available functions on the device, realize dynamic discovery and management of functions, and improve the convenience of function updates.
[0063] In some exemplary embodiments, the function annotations in the application code may include tool annotations and operation annotations, such as @Tool and @Operation. After the first client device is started, the annotation processor can first automatically scan and register all classes marked with @Tool in the class loader. Subsequently, the annotation processor extracts the methods with @Operation annotations in the class, analyzes the method parameters and return values through reflection, and constructs a parameter model, thereby registering the description information of the tool and its operation (i.e., function) to the central registry. Therefore, by setting two levels of annotations, capability perception can be performed more efficiently and accurately.
[0064] In some embodiments, a registration center can be deployed on the first client device to complete function registration. It can also provide functions such as registration, deregistration, and search, enabling dynamic registration and deregistration of functions to adapt to the lifecycle of applications. Specifically, upon successful installation of an application, the aforementioned function registration operation can be automatically performed, and the new function can be registered with the registration center. Upon successful uninstallation of an application, the corresponding function of the application can be automatically deregistered from the registration center.
[0065] In some embodiments, obtaining the function description information may also include identifying available functions through application manifest file analysis, service detection, etc., which is not limited here.
[0066] In some embodiments, the description information of a function may include a function identifier (such as a name or ID), parameter type, parameter mode, etc. In some embodiments, description of complex parameter types (such as nested objects, arrays, etc.) may also be supported.
[0067] In some embodiments, in response to the first client device receiving the user instruction, the function description information currently stored in the first client device may be first obtained, and then combined with the user instruction to form an operation instruction generation request and sent to the server.
[0068] In some embodiments, in response to receiving a user instruction, based on the user instruction and functional description information of multiple functions, obtaining an operation instruction generation request may include obtaining a pre-stored prompt text template, and filling the user instruction and functional description information into the corresponding slots in the template respectively, thereby obtaining a prompt text as an operation instruction generation request.
[0069] In some embodiments, the pre-stored prompt text template may include the role positioning information of the large model, the tasks to be performed by the large model, the format of the output information, etc. In some embodiments, the pre-stored prompt text template may also include provisions related to the communication protocol. In some exemplary embodiments, the pre-stored prompt text template may be "You are now a large model with a Model Context Protocol (MCP). The format of the protocol is [Slot 1], the format of the instruction you output is [Slot 2], the user's task is [Slot 3], and the available functions include [Slot 4]. This is the request message I initiated to you. You need to return the result of the request to me in the feedback format just agreed upon."
[0070] In some embodiments, after receiving the operation instruction generation request, the server can call the cloud-based big model and input the above operation instruction generation request into the cloud-based big model so that the big model outputs an operation instruction including a call instruction of at least one function.
[0071] In some embodiments, as Figure 4 As shown, based on user instructions and function description information, selecting at least one function from multiple functions, and generating an operation instruction for completing the user instruction based on the at least one function may include: step S401, identifying user intention based on the user instruction; step S402, generating a user instruction execution plan according to the user intention; step S403, selecting at least one function from multiple functions according to the user instruction execution plan and function description information; and step S404, generating an operation instruction based on the user instruction execution plan and the description information of each function in the at least one function.
[0072] In some embodiments, after receiving the operation instruction generation request, the server can call the cloud-based large model to generate the operation instruction.
[0073] In some embodiments, the server may first parse the operation instruction generation request, and through a pre-set workflow, enable the cloud-based large model to generate the operation instruction in multiple steps as described above.
[0074] In some embodiments, the prompt text template can also be used to set the operations to be performed by the cloud-based large model in sequence. After receiving the operation instruction generation request, the server can directly input the operation instruction generation request into the cloud-based large model, so that the cloud-based large model, under the guidance of the prompt text, can generate the operation instruction in multiple steps as described above.
[0075] As an example, the user instruction may be "take a photo to search the current item and add it to the shopping cart". The cloud-based big model can first identify the user intention as "take a photo", "search" and "add to the shopping cart" based on the above user instructions; then, a user instruction execution plan can be generated according to the user intention, such as "step one: open the camera; step two: take a photo; step three: initiate an image search request and obtain product search results; step four: check product inventory; step five: add the product link to the shopping cart"; on this basis, for each step, a function that can implement the step can be selected from multiple functions according to the function description information; then, based on each function selected to be executed and the description information of each function, an operation instruction for calling each function to complete the user instruction is generated.
[0076] Therefore, by using the cloud-based big model, we first identify the user's intention and then generate a user instruction execution plan. On this basis, we further select at least one function to complete the plan and generate corresponding operation instructions. This allows us to generate operation instructions by guiding the big model step by step, thereby improving the accuracy and reliability of the generation of operation instructions.
[0077] In some embodiments, the operation instructions may be structured instructions generated by the large model according to a predetermined output format, which may include parameters required for each function, path information of the parameters, output parameters, etc.
[0078] In response to receiving the operation instruction sent by the server, the first client device may perform a calling operation on each of the at least one function based on the operation instruction, thereby obtaining an execution result of the user instruction.
[0079] In some embodiments, obtaining an operation instruction generation request based on user instructions and functional description information of multiple functions may include: obtaining an operation instruction generation request based on user instructions, functional description information and context information, wherein the context information includes at least one historical user instruction; and wherein, based on the user instruction, identifying the user intention may include: identifying the user intention based on the user instruction and at least one historical user instruction.
[0080] After receiving a user instruction, context information such as historical user instructions can be obtained first. The preset prompt text template can include slots corresponding to the context information and can include prompt text for guiding the large model to refer to historical user instructions when identifying user intent.
[0081] In some embodiments, the at least one historical user instruction may include historical user instructions within a preset time range (e.g., one day, 12 hours). In some embodiments, the at least one historical user instruction may also include all historical user instructions in the conversation between the user and the intelligent assistant.
[0082] Therefore, by identifying the user intention based on the current user instruction and at least one historical user instruction, the user intention in the previous conversation can be referenced, making the identified user intention more accurate.
[0083] In some embodiments, the context information may also include at least one of user historical operation information and user attribute information, and wherein, generating a user instruction execution plan according to user intention may include: generating a user instruction execution plan according to user intention and context information.
[0084] Therefore, when generating a user instruction execution plan, by referring to the user's historical operation information (such as the user's historical operation habits, the success rate of operations corresponding to historical operation instructions, etc.), an execution plan that is more in line with the user's operation preferences can be generated, thereby improving the user experience.
[0085] In some embodiments, historical user operation information may include user interaction history, such as the user's historical operation paths (e.g., the user's habit of turning off the flash before taking a photo, the user's path of taking a photo and searching, etc.). Historical user operation information may also include the success rate of historical operations, for example, if the user always chooses to exit a certain operation in the generated operation instructions directly without continuing to execute it (i.e., the success rate of the operation is low).
[0086] In some embodiments, the user attribute information may include attribute information such as the user's age and gender.
[0087] In some embodiments, the user's historical operation information may be recorded on the first client device. After receiving the user's instruction, the first client device may obtain the information and send it to the server as part of the context information. The preset prompt text template may include instructions for the large model to refer to at least one of the user's historical operation information and user attribute information when generating a user instruction execution plan.
[0088] In some examples, the context information includes, for example, a historical operation instruction with a low success rate, such as turning on the flash when taking a photo. Under the guidance of the above prompt text, the large model can first analyze the user's operation preferences to obtain the user's tendency to not turn on the flash when taking a photo. On this basis, the large model can further generate a user instruction execution plan according to the user's intention and the user's operation preference under the guidance of the prompt text. For example, after turning on the camera, instead of directly executing the operation of turning on the flash, the user is prompted to confirm whether to turn on the flash.
[0089] The above-mentioned user historical operation information, user attribute information and other information are obtained on the premise that the user is clearly aware of and explicitly authorized, and are in compliance with relevant laws and regulations and do not violate public order and good customs.
[0090] In some embodiments, obtaining an operation instruction generation request based on user instructions and functional description information of multiple functions may include: obtaining an operation instruction generation request based on user instructions, functional description information of multiple functions and a preset prompt text template; and the above-mentioned human-computer interaction method for the first client device may also include: obtaining an updated prompt text template sent by the server, wherein the updated prompt text template is obtained by utilizing a cloud-based big model and adjusting the prompt text template based on at least one of the user's historical operation information and user attribute information.
[0091] Therefore, through the cloud-based big model, user preferences are analyzed based on user historical operation information, user attribute information and other information, and on this basis, the prompt text template is personalized adjusted to make the prompt text template more in line with user preferences, and then the generated operation instructions can be more in line with user preferences, thereby improving user experience.
[0092] In some embodiments, at least one of the collected user historical operation information and user attribute information may be analyzed to obtain the user's operation preferences. Based on this, the prompt text template may be adjusted based on the user's operation preferences to obtain an optimized prompt text template. The analysis of user operation preferences may be implemented based on a local lightweight machine learning model or a large cloud-based model, without limitation.
[0093] In some exemplary embodiments, a user instruction execution plan can be generated based on user intention and context information, and the user operation preferences analyzed by the cloud-based big model can be obtained. On this basis, the cloud-based big model can further adjust and optimize the prompt text template based on the user operation preferences obtained by analysis. For example, a description of the user operation preferences can be added to the prompt text template, and the big model can generate prompt text that is more in line with user preferences.
[0094] In some exemplary embodiments, a prompt word template library can be established locally, and descriptive information about user preferences obtained through analysis by a large cloud-based model or a local lightweight machine learning model can be obtained and stored in the prompt word template library. Furthermore, optimized prompt text templates corresponding to different types of user instructions can also be stored in the prompt word template library. Upon receiving a user instruction, the prompt text template and user preference descriptive information with the highest correlation can be obtained from the prompt word template library based on the user instruction, and the operation instruction generation request can be assembled based on this information.
[0095] In some embodiments, as Figure 5 As shown, the calling operation performed on each function in at least one function may include: step S501, determining whether the various parameters of the function include variable references; step S502, for the first parameter of the function including a variable reference, based on the variable reference of the first parameter, obtaining the actual value of the first parameter from the data sharing area to determine the parameter value of the first parameter; step S503, according to the function identifier of the function, obtaining the description information of the function from the central registry; step S504, executing the function based on the description information of the function and the parameter value of each parameter to obtain the return result of the function; and step S505, according to the variable reference corresponding to the return result, storing the return result in the data sharing area.
[0096] Therefore, through variable reference and data sharing, cross-application and cross-instruction integration of functions is achieved.
[0097] In some embodiments, each function parameter may be parsed and checked to see if it contains a variable reference. For example, a parameter value that begins with a string containing `$` is considered a variable reference. In some exemplary embodiments, a variable reference may be represented as "${variable name.property path}".
[0098] In response to the variable containing a variable reference, the actual value of the variable (i.e., the first variable) can be obtained from the data sharing area based on the variable reference; at the same time, based on the function identifier, the description information of the function is obtained in the central registration, the incoming parameters are mapped to the method parameter array (matched by parameter name), and the method is called through reflection to return the result, and the return result is stored in the data sharing area based on the variable reference corresponding to the return result.
[0099] In some embodiments, during the execution of the method corresponding to a function, the execution status can also be managed. For example, before starting execution, the execution status can be updated to the executing state; after successful execution, the status of the function can be recorded as successful execution; if the execution fails, the status of the function can be recorded as failed execution, and subsequent operations will not be executed.
[0100] In some embodiments, the operation instruction may be verified before execution begins. The operation instruction may be verified to be legitimate, for example, to verify whether the user has actually entered the user instruction. If the verification is successful, the various functions are executed sequentially according to the operation instruction, and the final execution result is returned.
[0101] In some exemplary embodiments, the execution process for an operation instruction may include: upon receiving an instruction set, first verifying the legitimacy of each instruction. This verification includes checking the integrity of the instruction structure, confirming the operation permissions, and verifying whether the function name is registered in the function registry. Subsequently, for each instruction parameter, the parameter value is checked to see if it contains a variable reference. If a variable reference exists, the actual value is extracted from the variable mapping table in the data sharing area; if it is a normal parameter value, it is directly passed. Based on the function name, the instance and method description are retrieved from the function registry. The input parameters are matched to the parameter list of the target method by name, and the corresponding method of the instance is called using reflection. During execution, the status is updated to "Executing". If the execution is successful, the return result is stored in the data sharing area with the storage identifier specified by the instruction. At the same time, the status is updated to "Success" and a timestamp is recorded. If the execution fails, the status is marked as "Failure", and subsequent instruction execution is terminated. During execution, possible exceptions include, but are not limited to, parameter parsing failure, tool execution errors, and security check failure. All exceptions will interrupt the process and retain a snapshot of the scene.
[0102] In some embodiments, in order to solve the standardization problem of function calls between different applications, a unified function access interface can be defined to shield the implementation differences between different applications and support unified calls of native capabilities and third-party application capabilities; by monitoring the status of each function, the availability changes of the function can be automatically detected, and the function can be registered or unregistered in a timely manner.
[0103] In some embodiments, the description information may also include security level information, and the calling operation may also include: performing permission verification on the function based on the security level information of the function; and in response to passing the permission verification, executing the function based on the description information of the function and the parameter value of each parameter.
[0104] Before executing each function, the system first determines whether permission verification is required based on the function's description and determines the specific method of permission verification based on the security level information. For example, for functions with a lower security level (such as turning on the flashlight), a confirmation message can be displayed to the user, and the user can click to confirm. For functions with a higher security level (such as payment), the user can be required to verify the permission through methods such as fingerprint verification or facial recognition.
[0105] Therefore, by verifying the permissions of functions based on security level information, the security of the user instruction execution process can be further improved.
[0106] In some embodiments, the security level information of each of the above functions may be pre-set in the code.
[0107] In some embodiments, the security level information of each of the above functions can be determined based on information such as the operation type, permission requirements, data sensitivity, and environmental information. In some embodiments, a machine learning model for real-time risk control can be integrated to dynamically evaluate and adjust the security level of each function based on information such as the operation type, permission requirements, data sensitivity, environmental information, and preset risk control strategies.
[0108] In some exemplary embodiments, Figure 6 As shown, a security control process is provided, including: step S601, in response to receiving an operation instruction corresponding to a certain function, performing a security level assessment on it; step S602, in response to the security level being determined to be low risk (such as querying information), directly executing the operation, at this time, the operation being executed can be displayed on the interface, and an operation cancellation option can be provided; step S603, in response to the security level being determined to be medium risk (such as sending a message, sharing content), explaining the operation intention by displaying a simple confirmation dialog box, and providing the user with a confirmation button and a rejection button for the user to easily confirm; step S604, In response to the security level being determined to be high risk (such as payment, deletion of important data), the operation details and potential impacts are displayed to the user by displaying a detailed confirmation interface, and the user is requested to make an explicit confirmation (for example, through face verification, fingerprint verification, etc.); step S605, in response to the user confirming that the operation can be executed, further verification is performed on whether the application has the authority to perform the operation; step S606, in response to the permission verification being passed, the operation is executed and the execution result is recorded; step S607, in response to the security level being determined to be prohibited, or in response to the user refusing to execute, the operation is not executed and a corresponding record is made.
[0109] In some exemplary embodiments, for medium-risk operations, the user may be provided with an "always allow this type of operation" option while requesting user confirmation. In response to the user selecting this option, the security level evaluation and risk control strategy may be dynamically adjusted based on the user's selection.
[0110] In some exemplary embodiments, for high-risk operations, a preview of the operation effect may be shown to the user before the operation is performed, and the user may be requested to confirm again.
[0111] Figure 7 The execution flow of an operation instruction is shown exemplarily.
[0112] As an example, the first client device can be the user's mobile phone, and the method disclosed in the present invention can be executed by the smart assistant on the mobile phone. In an example scenario, the user sends "take a photo to search the current item and add it to the shopping cart" to the smart assistant, and the smart assistant can obtain the operation instruction returned by the cloud server through the method described above. The execution process of the operation instruction may include: displaying a prompt message to the user "help me take a photo to search for this product and add it to the shopping cart", and requesting the camera application to open the camera; in response to opening the camera, displaying the camera interface to the user, and displaying the prompt message "please take a photo of the product" to the user; after the user adjusts the angle and confirms taking the photo, the camera application returns the photo result to the smart assistant; after the smart assistant receives the photo result, it initiates an image search request to the search engine based on the photo result; after the search engine performs the image search, it returns the search result to the smart assistant; if the search result contains multiple results, multiple results can be displayed to the user, and the user can be prompted to select one of the results, that is, displaying the prompt message "I Several similar products were found, please select one”; after the user selects a product, the selected product can be returned to the smart assistant, and the smart assistant can request the shopping app to check the inventory status of the product; after the shopping app returns the inventory information to the smart assistant, it can display a prompt message to the user "Do you want to add [product name] to the shopping cart? The price is XX" to request the user to confirm; in response to the user's confirmation, the smart assistant calls the shopping app to add the product to the shopping cart. After the shopping app executes the command successfully, it can feedback the successful addition message to the smart assistant, and the smart assistant can feedback the command execution result to the user, that is, display the execution result information "[product name] has been successfully added to the shopping cart" to the user.
[0113] In some embodiments, the human-computer interaction method for the first client device may further include: updating the security level information of the registered function in the central registry based on user historical operation information related to the registered function.
[0114] The user's historical operation information as described above can be collected to analyze the user's operation preferences, and the security level of the corresponding function can be adjusted based on the user's operation preferences. For example, if the user has always confirmed the permission for a certain function, the security level information of the function can be adjusted to a level that does not require user confirmation.
[0115] In some embodiments, the user's historical operation information can be input together with the other information mentioned above into a machine learning model for real-time risk control, so that the model can dynamically evaluate and adjust the security level of each function.
[0116] Therefore, by collecting the user's historical operation information, the security level information of each function can be dynamically adjusted according to the user's historical operation preferences, so that the permission verification is more in line with the user's preferences and the user experience is improved. Figure 8 A schematic diagram of a process of adaptive learning according to an exemplary embodiment of the present disclosure is shown.
[0117] In some exemplary embodiments, Figure 8 As shown, adaptive learning may include: step S801, obtaining user interaction history; step S802, analyzing user preferences, such as obtaining descriptive information of user preferences obtained by analyzing a large cloud model or a local lightweight machine learning model; step S803, adjusting the prompt text template based on user preferences to obtain a prompt text template that is more in line with user preferences; step S804, constructing an operation instruction generation request based on the adjusted prompt text template, and sending the operation instruction generation request to the server to obtain an operation instruction that is more in line with user preferences; step S805, obtaining the execution success rate of historical operations; step S806, analyzing the execution success rate of each historical operation through a large model; step S807, when generating operation instructions, giving priority to operations with a high historical execution success rate, and avoiding operations with a low historical execution success rate; step S808, during the execution process, dynamically adjusting the security level and risk control strategy according to the user's historical operation information to make the overall execution process more in line with user preferences.
[0118] In some embodiments, the multiple functions may also include at least one second function possessed by at least one second client device interconnected with the first client device, the context information may also include scenario information, and wherein, selecting at least one function from the multiple functions according to the user instruction execution plan and function description information may include: selecting at least one function from the multiple functions according to the user instruction execution plan, function description information and scenario information.
[0119] Therefore, in a scenario where multiple devices are interconnected, by obtaining scenario information (such as the current usage scenario, time, location, etc.), the large model can execute the plan based on the current scenario and user instructions, select more appropriate client device functions to execute user instructions, and further improve the user experience.
[0120] In a scenario where multiple devices are interconnected, obtaining function description information may also include obtaining description information of the functions possessed by each second client device that is communicatively connected to the first client device. The specific acquisition method may be similar to the method described above and will not be repeated here.
[0121] In some embodiments, the large model can identify the client device currently being used by the user based on the input information, and can select the most appropriate client device function for each step in the execution plan based on scenario information and function description information (which can reflect the functions and device characteristics of each client device), thereby being able to select the most appropriate execution method for user instructions based on the current scenario and device characteristics.
[0122] As an example, the user instruction may be "determine the current location of the elderly at home", and then you can choose to call the shooting function of each monitoring device in the home, and then display the real-time images of each monitoring device on the client device currently used by the user, and perform target recognition on each image to feedback specific location information to the user.
[0123] In some embodiments, a state synchronization mechanism can be used to synchronize the operations performed by each device and the current execution status between multiple devices. During the execution of the operation, based on the status and device characteristics of each device, a suitable device for performing the current operation is selected to achieve collaborative completion of tasks by multiple devices.
[0124] In some embodiments, the conversation history and execution status can also be transferred across devices to achieve seamless task migration, such as a task started on a mobile phone can be continued on a tablet.
[0125] In some embodiments, communications between devices can use end-to-end encryption and support personalized privacy settings for devices. Users can fine-tune the types of information shared between devices, thereby improving the security of information transmitted across devices.
[0126] In some embodiments, the context information may further include a currently displayed page of the first client device, and the plurality of functions may be determined based on at least one of the functions included in the currently displayed page and a user instruction.
[0127] Thus, based on the currently displayed page and at least one of the user instructions, the functions are filtered, so that only the function description information of multiple functions related to the current user instructions is sent to the server, reducing the data transmission volume and the data processing volume of large models.
[0128] In some embodiments, functions can be classified according to pages when registering functions; after receiving user instructions, the context function associated with the function in the currently displayed page can be determined based on the currently displayed page in the context information (for example, the page displayed before the currently displayed page can be determined based on the currently displayed page, and its corresponding function can be determined based on the page), and the description information corresponding to the above context function can be extracted and sent to the server as function description information.
[0129] In some embodiments, functions can also be filtered based on user instructions (for example, based on the similarity between user instructions and function description information), and functions that are completely irrelevant to user instructions can be filtered out, thereby further reducing the amount of data transmission and the amount of data processing for large models.
[0130] In some embodiments, during a conversation, if the user navigates to a new page or the intent of the current conversation corresponds to a function that has not yet been uploaded to the server, only the description of the function corresponding to the new page / new intent can be sent to the server, and the prompt text can guide the large model to generate operation instructions based on the previously sent function description information and the updated description information. This can further reduce the amount of data transmission and the data processing workload of the large model.
[0131] In some embodiments, important information can be extracted from the context information to compress the data volume, thereby further reducing the prompt text size, reducing the data transmission volume and the data processing volume of large models.
[0132] In some embodiments, the operation instruction generation request can also be used to trigger the server to apply the cloud-based large model to generate operation intention description information for each of at least one function, and wherein the above-mentioned human-computer interaction method for the first client device may also include: receiving operation intention description information for each of at least one function; and in the process of executing each of at least one function, displaying the operation intention description information corresponding to the function on the display device of the first client device.
[0133] Therefore, when generating an operation instruction, operation intention description information for explaining each function in the operation instruction is also generated and displayed to the user during the execution process, thereby realizing explainable interaction of the instruction execution process and improving the user experience.
[0134] In some embodiments, as Figure 9 As shown, the above-mentioned human-computer interaction method for the first client device may also include: step S901, recording the execution status information and abnormal operation information of each function in at least one function in the operation instruction; step S902, in response to the execution result indicating that the user instruction is not completed, sending the execution status information and abnormal operation information of each function in at least one function to the server, so that the server applies the cloud-based big model to regenerate the operation instruction based on the user instruction, function description information, operation instruction and the execution status information and abnormal operation information of each function in at least one function; and step S903, in response to receiving the regenerated operation instruction sent by the server, re-obtaining the execution result of the user instruction based on the regenerated operation instruction.
[0135] Therefore, by recording the execution status and abnormal operation information of each function, and uploading the above information to the server after execution fails, the cloud-based large model analyzes the above information and regenerates operation instructions that can avoid the above problems, thereby improving the execution success rate of user instructions.
[0136] In some embodiments, a process node diagram can be generated and displayed to the user based on the recorded execution status information and abnormal operation information of each function; before sending the above-mentioned execution status information and abnormal operation information to the server, the user can also select a certain abnormal process node to trace the process back to the node and re-execute the function corresponding to the node to eliminate the abnormality.
[0137] As an example, the execution result indicates that the user instruction "take a photo to search the current item and add it to the shopping cart" was not completed because the user did not authorize the use of the photo function. The user can then return to the photo authorization node through the operation process node diagram and re-authorize; after obtaining authorization, the subsequent functions can be continued to complete the user instruction.
[0138] If the exception cannot be eliminated through user operation, the above solution can be used to send relevant information to the server, so that the cloud-based large model can analyze the above information and regenerate operation instructions that can avoid the above problem.
[0139] In some embodiments, in response to receiving a user instruction, obtaining an operation instruction generation request based on the user instruction and functional description information of multiple functions may include: in response to receiving the user instruction, determining whether the user instruction can be processed locally; and in response to determining that the user instruction cannot be processed locally, obtaining an operation instruction generation request based on the user instruction and the functional description information.
[0140] In response to receiving a user instruction, it can first be determined whether it can be processed locally. In some embodiments, a local preset instruction can be matched based on the user instruction. If a preset instruction is matched, it is determined that it can be processed locally. In some embodiments, a lightweight natural language processing model can also be deployed in the first client device to identify the intent and entity in the user instruction, and obtain the corresponding operation instruction based on the intent and entity to call the corresponding function. If it is determined that local processing is not possible, an operation instruction generation request is sent to the server according to the method described above.
[0141] Therefore, after receiving the user instruction, by first determining whether the user instruction can be processed locally, and only uploading the instructions that cannot be processed locally to the server, the response efficiency of simple instructions can be improved, and excessive consumption of data transmission resources and server resources can be avoided.
[0142] In some embodiments, the above-mentioned human-computer interaction method for the first client device may further include: storing at least one historical user instruction and at least one corresponding historical operation instruction in the first client device; and wherein, determining whether the user instruction can be processed locally may include: based on the user instruction, obtaining a target historical user instruction with a similarity higher than a preset threshold in at least one historical user instruction; and in response to obtaining the target historical user instruction, determining that the user instruction can be processed locally, otherwise, determining that the user instruction cannot be processed locally.
[0143] Therefore, by recording historical user instructions and corresponding historical operation instructions, and reusing the corresponding historical operation instructions when similar historical user instructions are matched, the response efficiency of user instructions can be improved and excessive consumption of data transmission resources and server resources can be avoided.
[0144] In some embodiments, a multi-level caching strategy can be used to cache function description information, historical user instructions and corresponding historical operation instructions, prompt text templates, etc., and an intelligent cache invalidation mechanism can be used to ensure the consistency of cached data. The cache preheating algorithm can also be used to preload frequently used prompt text templates to improve overall computing efficiency.
[0145] In some embodiments, the above-mentioned human-computer interaction method for the first client device may further include: in response to the first client device having completed multiple rounds of dialogue with the user, obtaining a dialogue process based on the multiple rounds of dialogue, wherein each round of dialogue in the multiple rounds of dialogue includes the user's user instructions and corresponding execution results, and the dialogue process includes at least one historical dialogue node; and in response to receiving the user's user instruction for returning to the first dialogue node in at least one historical dialogue node, re-executing the operation instruction corresponding to the first dialogue node.
[0146] Therefore, by obtaining each historical dialogue node in multiple rounds of dialogue (such as the node that generates a dialogue branch), the dialogue process of multiple rounds of dialogue is obtained, so that multiple rounds of dialogue can be managed, the ability to trace back historical dialogue nodes is realized, and a more flexible dialogue mechanism is provided to users, thereby improving user experience.
[0147] In some embodiments, the steps executed during one or more conversations and the user's choices can be recorded and visually displayed as a process node diagram, allowing the user to traverse back to previous branch nodes and reselect to resume subsequent operations based on their selections. For example, at a branch node, the user may need to confirm whether to purchase item A or item B, and actions such as searching and adding items to a shopping cart may be performed based on the user's selections. If the user wishes to change their selection after receiving the results, the user's actions on the process node diagram can be used to traverse back to the branch node, allowing the user to reselect and resume subsequent operations based on their selections.
[0148] Figure 10 A schematic diagram of a human-computer interaction system architecture of a first client device according to an exemplary embodiment of the present disclosure is shown.
[0149] In some exemplary embodiments, Figure 10 As shown, the first client device may include a user interaction layer, a proxy layer, a controller, and a capability abstraction layer.
[0150] Among them, the user interaction layer is used for human-computer interaction with the user, including obtaining user instructions input by the user and sending the user instructions to the proxy layer, and displaying the execution results of the instructions to the user.
[0151] After receiving a user instruction, the proxy layer first determines whether the instruction can be processed directly locally. If not, it obtains the prompt text template, function description information, and various contextual information, assembles them into an operation instruction generation request, and sends it to the server, requesting the server to generate structured operation instructions using a large cloud-based language model, thus achieving a hybrid local and cloud-based processing mechanism. The proxy layer also maintains a historical operation instruction library to improve response speed and reduce network dependence.
[0152] The proxy layer can also manage session state and maintain the context of multiple rounds of user conversations; implement context compression and important information extraction, optimize prompt words to reduce data transmission volume; at the same time, support session branching and backtracking, allowing users to return to key nodes in the conversation history.
[0153] For function description information, the proxy layer can also select the most relevant functions based on the current conversation context (such as the currently displayed page) and only send the function description information of these functions to the server; in multi-round conversation scenarios, the changed function description information is sent each time, thereby reducing the amount of data transmission.
[0154] In some exemplary embodiments, when a user instruction reaches the proxy layer, it can be processed according to the following process. First, it can be determined whether to execute locally: match a predefined command pattern (such as a system instruction); identify simple query requests through an intent classifier; and respond directly if the local processing conditions are met. If it is determined that cloud processing is required, relevant historical information can be injected in combination with the session context to optimize the prompt words; then, based on the optimized prompt words, function description information, and the current session state, the operation instructions are assembled to generate a request. Subsequently, the request is sent to the cloud server. After receiving the raw data transmitted by the cloud server, structured data parsing and function call instruction extraction can be performed. In addition, the proxy layer can maintain the session lifecycle, including: generating a unique session ID when initializing a new session; recording context changes in real time (such as adding new conversation history); and automatically reclaiming resources when the session times out. The proxy layer can also record the execution results. When the execution fails, it can record the error code and diagnostic information, and update the execution status to the session context to support the continuity of subsequent requests. The proxy layer can perform the following exception handling: fall back to cloud processing when local command execution fails, obtain the most suitable operation instruction from the local historical operation instruction library when the cloud service is unavailable, and automatically rebuild the session environment when the session status is abnormal. The controller may include a function registration center and a function scheduler. The function registration center can be used to realize the registration of each function contained in the first client device and the generation of function description information. The function scheduler can be used to execute the received operation instructions, supporting multi-step sequential execution, branch conditions and error handling. Specifically, the operation instructions can be parsed, and unstructured or semi-structured parameters can be accurately mapped to Java method parameters. While calling each function through the capability abstraction layer, data transfer between functions is realized through the variable reference mechanism; in addition, the execution status and execution results of each function can be maintained and managed, and support exception handling and recovery strategies after operation failure.
[0155] The function scheduler may also include a security verifier and an adaptive optimization engine. The security verifier can be used to determine whether to perform security verification operations and the level of security verification operations to perform based on the security level information of each function. The security verifier can also dynamically adjust the security level of a function or the security confirmation strategy of the function based on historical user operation information. The adaptive optimization engine can build a personalized user model based on user operation habits and feedback, and can optimize the prompt text template based on the information obtained from the analysis.
[0156] The capability abstraction layer can shield the differences between different applications through a unified access interface, thereby supporting the unified calling of native capabilities and application capabilities. It can resolve the data format differences between different applications through a two-way conversion framework for parameters and results, support the transfer and reference of complex data types (such as images, audio, and files), and realize automatic conversion and adaptation of common data formats. At the same time, it can monitor the capability status and automatically detect changes in capability availability through application manifest file analysis, service detection, etc. It supports capability priority management to resolve conflicts when multiple applications provide the same capabilities.
[0157] In some exemplary embodiments, when the controller calls a specific capability, the capability abstraction layer performs the following processing: first, the function provider is located based on the function name to determine whether it is a native capability or an application, and the corresponding processor or application component is matched, and whether the current operation is executable; the input parameters are uniformly converted, and the general parameter structure (such as key-value pairs) passed by the controller is converted into the format required by the target function (such as Java objects, JSON structures, etc.); differentiated calls are performed according to the provider (native capability or application) type. If it is a native capability, the pre-registered local method is executed. If it is an application function, a cross-process call (such as the Android Binder mechanism) is initiated; after the execution is completed, the results are standardized and packaged, and the return results of different providers (such as application custom objects, original data streams) are packaged into a unified structure (such as status code, standardized data body), and returned to the controller for subsequent processing. Figure 11 A flowchart of a human-computer interaction method according to an exemplary embodiment of the present disclosure is shown.
[0158] In some exemplary embodiments, Figure 11As shown, the human-computer interaction method may include: the user interaction layer sends the user instruction to the proxy layer; after determining that local processing is impossible, the proxy layer obtains context information and function description information, and sends the generated operation instruction generation request to the server; the server parses the intention and entity in the user instruction by calling the cloud-based large model and generates a user instruction execution plan, and generates an operation instruction based on the execution plan and function description information, and returns it to the proxy layer; the proxy layer forwards the operation instruction to the controller, and the controller verifies the instruction; if the controller determines that user confirmation is required, it sends a request to the user interaction layer and receives the user confirmation result; then, based on the operation instruction, the controller parses the parameters To determine whether the function includes variable references. If there are variable references, after obtaining the actual value of the parameter from the data sharing area, the method corresponding to the function is called to execute the function, and the return result is obtained and stored in the data sharing area; if the operation instruction includes multiple functions, the above steps can be executed multiple times in a loop; after the multiple functions are executed, the controller can send the execution result of the operation instruction to the proxy layer; in response to the proxy layer's judgment that subsequent processing is required based on the execution result, the execution result and other information and the corresponding request are sent to the server, requesting the server to return subsequent instructions or result explanations; the proxy layer can return the execution result to the user interaction layer to display the execution result to the user.
[0159] Therefore, after receiving the user instruction, the functional description information of the functions possessed by the first client device is obtained, and it is assembled with the user instruction into an operation instruction generation request, which is sent to the server, so that the server uses the cloud-based big model to select at least one function suitable for the user to process the user instruction based on the user instruction and the functional description information of the first client device, and generates an operation instruction for the first client device to execute, thereby enabling the first client device to have the ability to process complex user instructions.
[0160] In some embodiments, as Figure 12 As shown, a human-computer interaction method for a server is provided, including: step S1201, in response to receiving an operation instruction generation request sent by a first client device, applying a cloud-based big model, and selecting at least one function from multiple functions based on the user instruction in the operation instruction generation request and functional description information of multiple functions, wherein the multiple functions include multiple first functions possessed by the first client device; step S1202, applying the cloud-based big model, generating an operation instruction for completing the user instruction based on at least one function; and step S1203, sending the operation instruction to the first client device.
[0161] Therefore, by utilizing the cloud-based big model, at least one function suitable for the user to process the user instruction is selected based on the user instruction and the functional description information of the first client device, and an operation instruction is generated for the first client device to execute, so that the first client device has the ability to process complex user instructions and enhance the user's interactive experience.
[0162] It is understandable that the human-computer interaction functions performed by the above-mentioned server are similar to the various operations described above and the technical effects that can be achieved, and will not be elaborated here.
[0163] In some embodiments, based on the user instructions in the operation instruction generation request and the functional description information of multiple functions, selecting at least one function from the multiple functions may include: identifying the user intention based on the user instruction; generating a user instruction execution plan according to the user intention; and selecting at least one function from the multiple functions according to the user instruction execution plan and the functional description information; and wherein, generating the operation instruction for completing the user instruction based on at least one function includes: applying a cloud-based big model to generate the operation instruction based on the user instruction execution plan and the description information of each function in the at least one function.
[0164] In some embodiments, the operation instruction generation request may also include context information, the context information may include at least one historical user instruction, and wherein, based on the user instruction, identifying the user intent may include: based on the user instruction and at least one historical user instruction, identifying the user intent.
[0165] In some embodiments, the context information may further include a currently displayed page of the first client device, and the plurality of functions may be determined based on at least one of the functions included in the currently displayed page and a user instruction.
[0166] In some embodiments, the context information may also include at least one of user historical operation information and user attribute information, and wherein, generating a user instruction execution plan according to user intention may include: generating a user instruction execution plan according to user intention and context information.
[0167] In some embodiments, the multiple functions may also include at least one second function possessed by at least one second client device interconnected with the first client device, the context information may also include scenario information, and wherein, selecting at least one function from the multiple functions according to the user instruction execution plan and function description information may include: selecting at least one function from the multiple functions according to the user instruction execution plan, function description information and scenario information.
[0168] In some embodiments, the above-mentioned human-computer interaction method for the server may also include: applying a cloud-based large model to generate operation intention description information for each function in at least one function; and sending the operation intention description information for each function in at least one function to the first client device.
[0169] In some embodiments, the above-mentioned human-computer interaction method for the server may further include: in response to receiving the execution status information and abnormal operation information of each function in at least one function sent by the first client device, applying the cloud-based big model, regenerating the operation instruction based on the user instruction, function description information, operation instruction and the execution status information and abnormal operation information of each function in at least one function; and sending the regenerated operation instruction to the first client device.
[0170] In some embodiments, an operation instruction generation request can be obtained based on user instructions, functional description information of multiple functions and a preset prompt text template. The above-mentioned human-computer interaction method for the server may also include: using a cloud-based big model to adjust the prompt text template based on at least one of the user's historical operation information and user attribute information sent by the first client device to obtain an updated prompt text template; and sending the updated prompt text template to the first client device.
[0171] It is understandable that the human-computer interaction functions performed by the above-mentioned server are similar to the various operations described above and the technical effects that can be achieved, and will not be elaborated here.
[0172] In some embodiments, as Figure 13 As shown, a human-computer interaction device 1300 for a first client device is provided, and the device 1300 includes: an acquisition unit 1310, configured to obtain an operation instruction generation request in response to receiving a user instruction based on the user instruction and functional description information of multiple functions, wherein the multiple functions include multiple first functions possessed by the first client device; a sending unit 1320, configured to send the operation instruction generation request to the server, wherein the operation instruction generation request is used to trigger the server to apply a cloud-based large model to select at least one function from the multiple functions based on the user instruction and the functional description information, and generate an operation instruction for completing the user instruction based on the at least one function; and an execution unit 1330, configured to perform a call operation on each of the at least one function based on the operation instruction in response to receiving the operation instruction sent by the server to obtain the execution result of the user instruction.
[0173] The operations performed and effects achieved by units 1310 to 1330 in the human-computer interaction apparatus 1300 for the first client device are similar to steps S201 to S203 in the human-computer interaction method for the first client device, and are not described in detail here.
[0174] In some embodiments, selecting at least one function from multiple functions based on user instructions and function description information, and generating an operation instruction for completing the user instruction based on the at least one function may include: identifying user intent based on the user instruction; generating a user instruction execution plan according to the user intent; selecting at least one function from multiple functions according to the user instruction execution plan and function description information; and generating an operation instruction based on the user instruction execution plan and the description information of each function in the at least one function.
[0175] In some embodiments, the acquisition unit can be further configured to: obtain an operation instruction generation request based on user instructions, function description information and context information, wherein the context information includes at least one historical user instruction; and wherein, based on the user instruction, identifying the user intention can include: identifying the user intention based on the user instruction and at least one historical user instruction.
[0176] In some embodiments, the context information may further include a currently displayed page of the first client device, and the plurality of functions may be determined based on at least one of the functions included in the currently displayed page and a user instruction.
[0177] In some embodiments, the context information may also include at least one of user historical operation information and user attribute information, and wherein, generating a user instruction execution plan according to user intention may include: generating a user instruction execution plan according to user intention and context information.
[0178] In some embodiments, the multiple functions may also include at least one second function possessed by at least one second client device interconnected with the first client device, the context information may also include scenario information, and wherein, selecting at least one function from the multiple functions according to the user instruction execution plan and function description information may include: selecting at least one function from the multiple functions according to the user instruction execution plan, function description information and scenario information.
[0179] In some embodiments, obtaining function description information includes: in response to the startup of the first client device, identifying function annotations in the code of each application associated with the first client device based on the annotation processor; in response to identifying the function annotations, extracting description information of the function corresponding to the function annotations, the description information including function identifier, parameter mode and parameter type; based on the description information, registering the function in a central registry; and obtaining function description information of multiple functions based on the description information of registered functions in the central registry.
[0180] In some embodiments, the calling operation performed on each function of at least one function may include: determining whether the various parameters of the function include variable references; for the first parameter of the function including a variable reference, based on the variable reference of the first parameter, obtaining the actual value of the first parameter from the data sharing area to determine the parameter value of the first parameter; according to the function identifier of the function, obtaining the description information of the function from the central registry; executing the function based on the description information of the function and the parameter value of each parameter to obtain the return result of the function; and storing the return result in the data sharing area according to the variable reference corresponding to the return result.
[0181] In some embodiments, the description information may also include security level information, and the calling operation may also include: performing permission verification on the function based on the security level information of the function; and in response to passing the permission verification, executing the function based on the description information of the function and the parameter value of each parameter.
[0182] In some embodiments, the above-mentioned human-computer interaction device for the first client device may further include: an updating unit configured to update the security level information of the registered function in the central registry based on the user historical operation information related to the registered function.
[0183] In some embodiments, the operation instruction generation request can also be used to trigger the server to apply the cloud-based large model to generate operation intention description information for each function of at least one function, and wherein the above-mentioned human-computer interaction device for the first client device may also include: a receiving unit, configured to receive operation intention description information for each function of at least one function; and a display unit, configured to display the operation intention description information corresponding to the function on the display device of the first client device during the execution of each function of at least one function.
[0184] In some embodiments, the human-computer interaction apparatus for the first client device may further include: a recording unit configured to record execution status information and abnormal operation information of each function of at least one function in the operation instruction;
[0185] a first sending unit configured to, in response to the execution result indicating that the user instruction was not completed, send execution status information and abnormal operation information of each of the at least one function to the server, so that the server applies the cloud-based big model and regenerates the operation instruction based on the user instruction, the function description information, the operation instruction, and the execution status information and abnormal operation information of each of the at least one function; and
[0186] The first acquisition unit is configured to, in response to receiving the regenerated operation instruction sent by the server, re-acquire the execution result of the user instruction based on the regenerated operation instruction.
[0187] In some embodiments, the acquisition unit can be further configured to: obtain an operation instruction generation request based on user instructions, functional description information of multiple functions and a preset prompt text template; and the above-mentioned human-computer interaction device for the first client device may also include: a second acquisition unit, configured to obtain an updated prompt text template sent by the server, wherein the updated prompt text template is obtained by utilizing a cloud-based big model and adjusting the prompt text template based on at least one of the user's historical operation information and user attribute information.
[0188] In some embodiments, the acquisition unit can be further configured to: in response to receiving a user instruction, determine whether the user instruction can be processed locally; and in response to determining that the user instruction cannot be processed locally, obtain an operation instruction generation request based on the user instruction and function description information.
[0189] In some embodiments, the above-mentioned human-computer interaction device for the first client device may further include: a storage unit, configured to store at least one historical user instruction and at least one corresponding historical operation instruction in the first client device; and wherein, determining whether the user instruction can be processed locally includes: based on the user instruction, obtaining a target historical user instruction with a similarity higher than a preset threshold in at least one historical user instruction; and in response to obtaining the target historical user instruction, determining that the user instruction can be processed locally, otherwise, determining that the user instruction cannot be processed locally.
[0190] In some embodiments, the above-mentioned human-computer interaction device for the first client device may further include: a third acquisition unit, configured to obtain a dialogue process based on the multiple rounds of dialogue in response to the first client device having completed multiple rounds of dialogue with the user, wherein each round of dialogue in the multiple rounds of dialogue includes the user's user instructions and corresponding execution results, and the dialogue process includes at least one historical dialogue node; and a first execution unit, configured to re-execute the operation instruction corresponding to the first dialogue node in response to receiving the user's user instruction for returning to the first dialogue node in at least one historical dialogue node.
[0191] In some embodiments, as Figure 14 As shown, a human-computer interaction device 1400 for a server includes: a selection unit 1410, configured to apply a cloud-based big model in response to receiving an operation instruction generation request sent by a first client device, and select at least one function from a plurality of functions based on the user instruction in the operation instruction generation request and the functional description information of the plurality of functions, wherein the plurality of functions include a plurality of first functions possessed by the first client device; a generation unit 1420, configured to apply a cloud-based big model, and generate an operation instruction for completing the user instruction based on at least one function; and a sending unit 1430, configured to send the operation instruction to the first client device.
[0192] The operations performed by units 1410 to 1430 in the human-computer interaction device 1400 for a server and the effects that can be achieved are similar to steps S1201 to S1203 in the above-mentioned human-computer interaction method for a server, and are not described in detail here.
[0193] In some embodiments, the selection unit can be further configured to: identify user intent based on user instructions; generate a user instruction execution plan based on the user intent; and select at least one function from multiple functions based on the user instruction execution plan and function description information; and wherein, the generation unit can be further configured to: apply a cloud-based big model to generate operation instructions based on the user instruction execution plan and the description information of each function in at least one function.
[0194] In some embodiments, the operation instruction generation request may also include context information, the context information may include at least one historical user instruction, and wherein, based on the user instruction, identifying the user intent may include: based on the user instruction and at least one historical user instruction, identifying the user intent.
[0195] In some embodiments, the context information may further include a currently displayed page of the first client device, and the plurality of functions may be determined based on at least one of the functions included in the currently displayed page and a user instruction.
[0196] In some embodiments, the context information may also include at least one of user historical operation information and user attribute information, and wherein, generating a user instruction execution plan according to user intention may include: generating a user instruction execution plan according to user intention and context information.
[0197] In some embodiments, the multiple functions may also include at least one second function possessed by at least one second client device interconnected with the first client device, the context information may also include scenario information, and wherein, selecting at least one function from the multiple functions according to the user instruction execution plan and function description information may include: selecting at least one function from the multiple functions according to the user instruction execution plan, function description information and scenario information.
[0198] In some embodiments, the above-mentioned human-computer interaction device for the server may also include: a first generating unit, configured to apply a cloud-based big model to generate operation intention description information for each of at least one function; and a first sending unit, configured to send the operation intention description information for each of at least one function to the first client device.
[0199] In some embodiments, the above-mentioned human-computer interaction device for the server may further include: a second generation unit, configured to apply a cloud-based big model in response to receiving the execution status information and abnormal operation information of each function in at least one function sent by the first client device, and regenerate the operation instruction based on the user instruction, function description information, operation instruction and the execution status information and abnormal operation information of each function in at least one function; and a second sending unit, configured to send the regenerated operation instruction to the first client device.
[0200] In some embodiments, an operation instruction generation request can be obtained based on user instructions, functional description information of multiple functions and a preset prompt text template. The above-mentioned human-computer interaction device for the server may also include: an acquisition unit, configured to use a cloud-based big model to adjust the prompt text template based on at least one of the user's historical operation information and user attribute information sent by the first client device to obtain an updated prompt text template; and a third sending unit, configured to send the updated prompt text template to the first client device.
[0201] In some embodiments, as Figure 15 As shown, a human-computer interaction system 1500 is provided, including: a first client device 1510, configured to execute the above-mentioned human-computer interaction method for the first client device 1510; and a server 1520, configured to execute the above-mentioned human-computer interaction method for the server 1520.
[0202] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0203] According to an embodiment of the present disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.
[0204] refer to Figure 16 , a block diagram of an electronic device 1600 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0205] like Figure 16 As shown, electronic device 1600 includes a computing unit 1601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1602 or a computer program loaded from a storage unit 1608 into a random access memory (RAM) 1603. Various programs and data required for the operation of electronic device 1600 can also be stored in RAM 1603. Computing unit 1601, ROM 1602, and RAM 1603 are connected to each other via a bus 1604. An input / output (I / O) interface 1605 is also connected to bus 1604.
[0206] Multiple components in the electronic device 1600 are connected to the I / O interface 1605, including: an input unit 1606, an output unit 1607, a storage unit 1608, and a communication unit 1609. The input unit 1606 can be any type of device that can input information to the electronic device 1600. The input unit 1606 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and / or a remote control. The output unit 1607 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1608 can include but is not limited to a magnetic disk and an optical disk. The communication unit 1609 allows the electronic device 1600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device and / or the like.
[0207] The computing unit 1601 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 1601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1601 performs the various methods and processes described above, such as the human-computer interaction method for the first client device or the human-computer interaction method for the server. For example, in some embodiments, the human-computer interaction method for the first client device or the human-computer interaction method for the server can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 1608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1600 via the ROM 1602 and / or the communication unit 1609. When the computer program is loaded into the RAM 1603 and executed by the computing unit 1601, one or more steps of the human-computer interaction method for the first client device or the human-computer interaction method for the server can be performed. Alternatively, in other embodiments, the computing unit 1601 may be configured to execute the above-mentioned human-computer interaction method for the first client device or the human-computer interaction method for the server in any other appropriate manner (for example, by means of firmware).
[0208] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0209] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0210] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0211] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0212] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0213] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0214] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0215] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only limited by the claims after authorization and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. In addition, the steps may be performed in an order different from that described in this disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after this disclosure.
Claims
1. A human-computer interaction method for a first client device, the method comprising: In response to receiving a user instruction, obtaining an operation instruction generation request based on the user instruction and functional description information of a plurality of functions, wherein the plurality of functions include a plurality of first functions possessed by the first client device; Sending the operation instruction generation request to a server, wherein the operation instruction generation request is used to trigger the server to apply the cloud-based large model to select at least one function from the multiple functions based on the user instruction and the function description information, and generate an operation instruction for completing the user instruction based on the at least one function; and In response to receiving the operation instruction sent by the server, based on the operation instruction, a calling operation is performed on each function of the at least one function to obtain an execution result of the user instruction.
2. The method according to claim 1, wherein The selecting at least one function from the plurality of functions based on the user instruction and the function description information, and generating an operation instruction for completing the user instruction based on the at least one function includes: Based on the user instruction, identifying the user intention; Generate a user instruction execution plan according to the user intention; selecting the at least one function from the plurality of functions according to the user instruction execution plan and the function description information; and The operation instruction is generated based on the user instruction execution plan and the description information of each function of the at least one function.
3. The method according to claim 2, wherein: The obtaining of an operation instruction generation request based on the user instruction and the functional description information of the plurality of functions includes: Based on the user instruction, the function description information and context information, the operation instruction generation request is obtained, wherein the context information includes at least one historical user instruction; and wherein, The identifying the user intention based on the user instruction includes: Based on the user instruction and the at least one historical user instruction, a user intent is identified.
4. The method according to claim 3, wherein: The context information further includes a currently displayed page of the first client device, and the plurality of functions are determined based on at least one of the functions included in the currently displayed page and the user instruction.
5. The method according to claim 3 or 4, wherein: The context information also includes at least one of user historical operation information and user attribute information, and wherein, Generating a user instruction execution plan according to the user intention includes: The user instruction execution plan is generated according to the user intention and the context information.
6. The method according to any one of claims 3 to 5, wherein The plurality of functions further include at least one second function possessed by at least one second client device interconnected with the first client device, the context information further includes scenario information, and wherein selecting the at least one function from the plurality of functions based on the user instruction execution plan and the function description information includes: The at least one function is selected from the plurality of functions according to the user instruction execution plan, the function description information, and the scenario information.
7. The method according to any one of claims 1 to 6, wherein The acquisition of the function description information includes: In response to the first client device being started, identifying function annotations in code of an application associated with the first client device based on an annotation processor; In response to identifying the function annotation, extracting description information of the function corresponding to the function annotation, the description information including function identifier, parameter mode and parameter type; registering the function in a central registry based on the description information; and The function description information of the plurality of functions is obtained based on the description information of the registered functions in the central registry.
8. The method according to claim 7, wherein: The calling operation performed on each of the at least one function includes: Determine whether the various parameters of the function include variable references; For a first parameter of the function including a variable reference, obtaining an actual value of the first parameter from a data sharing area based on the variable reference of the first parameter to determine a parameter value of the first parameter; Obtaining description information of the function from the central registry according to the function identifier of the function; Execute the function based on the description information of the function and the parameter value of each parameter to obtain a return result of the function; and According to the variable reference corresponding to the returned result, the returned result is stored in the data sharing area.
9. The method according to claim 8, wherein The description information also includes security level information, and the calling operation further includes: Based on the security level information of the function, perform permission verification on the function; and In response to the permission verification being passed, the function is executed based on the description information of the function and the parameter value of each parameter.
10. The method according to claim 9, further comprising: With respect to the security level information of the registered function in the central registration table, the security level information of the registered function is updated based on the user historical operation information related to the registered function.
11. The method according to any one of claims 1 to 10, wherein The operation instruction generation request is further used to trigger the server to apply the cloud-based large model to generate operation intention description information for each of the at least one function, and the method further includes: receiving operation intention description information of each function of the at least one function; and During the execution of each of the at least one function, operation intention description information corresponding to the function is displayed on the display device of the first client device.
12. The method according to any one of claims 1 to 11, further comprising: Recording execution status information and abnormal operation information of each function in the at least one function in the operation instruction; In response to the execution result indicating that the user instruction is not completed, sending the execution status information and abnormal operation information of each function of the at least one function to the server, so that the server applies the cloud-based large model and regenerates the operation instruction based on the user instruction, the function description information, the operation instruction, and the execution status information and abnormal operation information of each function of the at least one function; as well as In response to receiving the regenerated operation instruction sent by the server, the execution result of the user instruction is re-obtained based on the regenerated operation instruction.
13. The method according to any one of claims 1 to 12, wherein The obtaining of an operation instruction generation request based on the user instruction and the functional description information of the plurality of functions includes: Based on the user instruction, the functional description information of the multiple functions and a preset prompt text template, obtaining the operation instruction generation request; and the method further includes: An updated prompt text template sent by the server is obtained, wherein the updated prompt text template is obtained by adjusting the prompt text template based on at least one of user historical operation information and user attribute information using the cloud-based big model.
14. The method according to any one of claims 1 to 13, wherein The step of obtaining an operation instruction generation request in response to receiving a user instruction and based on the user instruction and functional description information of the plurality of functions includes: In response to receiving the user instruction, determining whether the user instruction can be processed locally; and In response to determining that the user instruction cannot be processed locally, the operation instruction generation request is obtained based on the user instruction and the function description information.
15. The method according to claim 14, further comprising: storing at least one historical user instruction and at least one corresponding historical operation instruction in the first client device; And among them, Determining whether the user instruction can be processed locally includes: Based on the user instruction, obtaining a target historical user instruction having a similarity higher than a preset threshold from the at least one historical user instruction; and In response to obtaining the target historical user instruction, it is determined that the user instruction can be processed locally; otherwise, it is determined that the user instruction cannot be processed locally.
16. The method according to claims 1 to 15, further comprising: In response to the first client device having completed multiple rounds of conversations with the user, obtaining a conversation flow based on the multiple rounds of conversations, wherein each round of conversation in the multiple rounds of conversations includes a user instruction of the user and a corresponding execution result, and the conversation flow includes at least one historical conversation node; and In response to receiving a user instruction from the user for returning to a first dialog node in the at least one historical dialog node, an operation instruction corresponding to the first dialog node is re-executed.
17. A human-computer interaction method for a server, the method comprising: In response to receiving an operation instruction generation request sent by a first client device, applying a cloud-based large model, based on a user instruction in the operation instruction generation request and functional description information of multiple functions, select at least one function from the multiple functions, wherein the multiple functions include multiple first functions possessed by the first client device; Applying the cloud-based big model, generating an operation instruction for completing the user instruction based on the at least one function; and The operation instruction is sent to the first client device.
18. The method according to claim 17, wherein The selecting at least one function from the multiple functions based on the user instruction in the operation instruction generation request and the function description information of the multiple functions comprises: Based on the user instruction, identifying the user intention; generating a user instruction execution plan according to the user intention; and selecting the at least one function from the plurality of functions according to the user instruction execution plan and the function description information; and wherein, Generating an operation instruction for completing the user instruction based on the at least one function includes: The cloud-based big model is applied to generate the operation instruction based on the user instruction execution plan and the description information of each function in the at least one function.
19. The method according to claim 18, wherein The operation instruction generation request further includes context information, the context information including at least one historical user instruction, and wherein identifying the user intention based on the user instruction includes: Based on the user instruction and the at least one historical user instruction, a user intent is identified.
20. The method according to claim 19, wherein The context information further includes a currently displayed page of the first client device, and the plurality of functions are determined based on at least one of the functions included in the currently displayed page and the user instruction.
21. The method according to claim 19 or 20, wherein The context information also includes at least one of user historical operation information and user attribute information, and wherein, Generating a user instruction execution plan according to the user intention includes: The user instruction execution plan is generated according to the user intention and the context information.
22. The method according to any one of claims 19 to 21, wherein The plurality of functions further include at least one second function possessed by at least one second client device interconnected with the first client device, the context information further includes scenario information, and wherein selecting the at least one function from the plurality of functions based on the user instruction execution plan and the function description information includes: The at least one function is selected from the plurality of functions according to the user instruction execution plan, the function description information, and the scenario information.
23. The method according to any one of claims 17 to 22, further comprising: Applying the cloud-based big model to generate operation intention description information for each of the at least one function; as well as The operation intention description information of each function of the at least one function is sent to the first client device.
24. The method according to any one of claims 17 to 23, further comprising: In response to receiving the execution status information and abnormal operation information of each of the at least one function sent by the first client device, applying the cloud-based big model to regenerate an operation instruction based on the user instruction, the function description information, the operation instruction, and the execution status information and abnormal operation information of each of the at least one function; as well as The regenerated operation instruction is sent to the first client device.
25. The method according to any one of claims 17 to 24, wherein The operation instruction generation request is obtained based on the user instruction, the functional description information of the multiple functions, and a preset prompt text template, and the method further includes: Using the cloud-based large model, adjusting the prompt text template based on at least one of the user's historical operation information and user attribute information sent by the first client device to obtain an updated prompt text template; and The updated prompt text template is sent to the first client device.
26. A human-computer interaction apparatus for a first client device, the apparatus comprising: an acquiring unit configured to, in response to receiving a user instruction, acquire an operation instruction generation request based on the user instruction and functional description information of a plurality of functions, wherein the plurality of functions include a plurality of first functions possessed by the first client device; a sending unit configured to send the operation instruction generation request to a server, wherein the operation instruction generation request is used to trigger the server to apply the cloud-based large model to select at least one function from the multiple functions based on the user instruction and the function description information, and generate an operation instruction for completing the user instruction based on the at least one function; and The execution unit is configured to, in response to receiving the operation instruction sent by the server, perform a calling operation on each function of the at least one function based on the operation instruction to obtain an execution result of the user instruction.
27. A human-computer interaction device for a server, the device comprising: a selection unit configured to, in response to receiving an operation instruction generation request sent by a first client device, apply a cloud-based large model, and select at least one function from a plurality of functions based on a user instruction in the operation instruction generation request and functional description information of the plurality of functions, wherein the plurality of functions include a plurality of first functions possessed by the first client device; a generating unit configured to apply the cloud-based big model and generate an operation instruction for completing the user instruction based on the at least one function; and The sending unit is configured to send the operation instruction to the first client device.
28. A human-computer interaction system comprising: A first client device, configured to perform the method according to any one of claims 1 to 16; as well as The server is configured to execute the method according to any one of claims 17 to 25.
29. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 25.
30. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause a computer to execute the method according to any one of claims 1-25.
31. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the method according to any one of claims 1 to 25 is implemented.
Citation Information
Cited By
Intelligent earphone interaction method and system based on large language model intelligent assistant Agent
CN121034308A
Cross-device function calling method and device, equipment, storage medium and computer program product
CN121173868A
MCP function calling method and device, equipment, storage medium and computer program product
CN121277648A
MCP calling method and device, equipment, storage medium and computer program product
CN121277649A
