Method and apparatus for providing artificial intelligence services

CN117938941BActive Publication Date: 2026-11-03DINGTALK (CHINA) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410082478.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-19
Publication Date
2026-11-03
Estimated Expiration
2044-01-19

AI Technical Summary

Technical Problem

How to improve the intelligence level of application services and use AI technology to provide more intelligent services.

Method used

The application server receives service requests from the user, calls the execution chain of the intelligent server to execute task instructions, and returns the results to the user. By combining machine learning models and natural language parsing, it provides intelligent AI services.

Benefits of technology

It improves the intelligence level of application services, allowing users to conveniently and quickly obtain AI services by triggering components or natural language commands. The operation cost is low, the path is short, and more relevant application service functions are provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117938941B_ABST
    Figure CN117938941B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a method and device for providing artificial intelligence service. The main technical scheme comprises: an application server receives a second service request from a user terminal, wherein the second service request comprises a task instruction; a third service request comprising the task instruction is sent to an intelligent server corresponding to a target intelligent agent; the intelligent server determines an execution chain corresponding to the task instruction and calls the execution chain to execute the task instruction, wherein the execution chain comprises at least one function function; the application server obtains an execution result of the execution chain from the intelligent server and returns the execution result to the user terminal. In this way, the application server provides artificial intelligence service to the user terminal by using the function of the intelligent server, thereby improving the intelligent degree of providing application service to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and apparatus for providing artificial intelligence services. Background Technology

[0002] With the continuous development of internet technology, various application services have sprung up like mushrooms after rain, providing services for users' production and life in many aspects. For example, instant messaging applications facilitate communication between users anytime, anywhere; video playback applications facilitate users to watch various videos; e-commerce applications facilitate users to shop anytime, anywhere, and so on. With the rapid development of AI (Artificial Intelligence) technology, AI technology is playing an increasingly important role in many industries and fields. How to utilize AI technology to improve the intelligence level of application services has become an urgent problem to be solved. Summary of the Invention

[0003] In view of this, this application provides a method and apparatus for providing artificial intelligence services, so as to improve the intelligence level of application services.

[0004] This application provides the following solution:

[0005] Firstly, a method for providing AI services is provided, applied to an application server, the method comprising:

[0006] Receive a second service request from the user, the second service request including a task instruction;

[0007] A third service request containing the task instruction is sent to the intelligent server corresponding to the target intelligent agent, so that the intelligent server can determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function.

[0008] The execution result of the execution chain is obtained from the intelligent server, and the execution result is returned to the user terminal.

[0009] According to one implementable method in the embodiments of this application, the method further includes:

[0010] In response to a first service request from the user terminal, an AI dialog box is returned to the user terminal. The first service request is sent by triggering a component of the application service interface displayed on the user terminal. The AI ​​dialog box is used to trigger the sending of a second service request and / or the display of the execution result.

[0011] According to one implementable method in the embodiments of this application, the method further includes:

[0012] Send information about at least one intelligent agent to the user terminal;

[0013] The second user request also includes information about the target agent selected by the user from the information of the at least one agent.

[0014] Secondly, a method for providing AI services is provided, applied to an intelligent server, the method comprising:

[0015] Receive a third service request containing a task instruction from the application server. The third service request is sent by the application server after receiving a second service request from the user terminal, and the second service request contains the task instruction.

[0016] Determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction, wherein the execution chain includes at least one function;

[0017] The execution result of the execution chain is returned to the application server.

[0018] According to one implementable method in an embodiment of this application, the second service request and the third service request further include field information;

[0019] Before determining the execution chain corresponding to the task instruction, the method further includes: determining whether the intelligent server matches the field information; if they match, continuing to execute the step of determining the execution chain corresponding to the task instruction; otherwise, returning information indicating a field error and / or guiding the selection of the correct field to the application server.

[0020] According to one achievable method in an embodiment of this application, the second service request and the third service request further include: field information and / or session information;

[0021] In response to a context acquisition request during the execution of the task instruction by the execution chain, context information corresponding to the field information and / or session information is sent to the execution chain so that the execution chain can execute the task instruction based on the context information.

[0022] According to one achievable method in an embodiment of this application, the second service request and the third service request further include identity information;

[0023] Determining the execution chain corresponding to the task instruction includes: identifying the execution chain in the execution chain corresponding to the task instruction that matches the identity information; if no matching execution chain exists, then returning information indicating that no usage permission is allowed to the application server.

[0024] According to one implementable method in an embodiment of this application, determining the execution chain corresponding to the task instruction includes:

[0025] If the task instruction carries a task identifier, then the execution chain corresponding to the task identifier is determined; otherwise, the task instruction is parsed using natural language to obtain the task type corresponding to the task instruction, and the execution chain corresponding to the task type is determined.

[0026] According to one implementable method in an embodiment of this application, the at least one functional function executes the task instruction using a machine learning model; the method further includes:

[0027] The knowledge base information of the application server is provided to the machine learning model for learning.

[0028] Thirdly, a method for providing AI services is provided, applied to an instant messaging application server, the method comprising:

[0029] Receive a second service request from an instant messaging client, the second service request including a task instruction;

[0030] A third service request containing the task instruction is sent to the intelligent server corresponding to the target intelligent agent, so that the intelligent server can determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function.

[0031] The execution result of the execution chain is obtained from the intelligent server, and the execution result is returned to the instant messaging client.

[0032] Fourthly, an apparatus for providing AI services is provided, disposed on an application server, the apparatus comprising:

[0033] The first interaction unit is configured to receive a second service request from a user terminal, the second service request including a task instruction;

[0034] The second interaction unit is configured to send a third service request containing the task instruction to the intelligent server corresponding to the target intelligent agent, so that the intelligent server can determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction, wherein the execution chain includes at least one function; and obtain the execution result of the execution chain from the intelligent server.

[0035] The first interaction unit is also configured to return the execution result to the user terminal.

[0036] Fifthly, an apparatus for providing AI services is provided, disposed on an intelligent server, the apparatus comprising:

[0037] The third interaction unit is configured to receive a third service request containing a task instruction from the application server. The third service request is sent by the application server after receiving a second service request from the user terminal, and the second service request contains the task instruction.

[0038] An execution invocation unit is configured to determine the execution chain corresponding to the task instruction and invoke the execution chain to execute the task instruction, wherein the execution chain includes at least one function.

[0039] The third interaction unit is also configured to return the execution result of the execution chain to the application server.

[0040] According to a sixth aspect, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any one of the first to third aspects.

[0041] According to the seventh aspect, an electronic device is provided, comprising:

[0042] One or more processors; and

[0043] A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in any one of the first to third aspects.

[0044] According to the specific embodiments provided in this application, the following technical effects are disclosed:

[0045] 1) This application provides a novel mechanism in which an application server can send task instructions to a corresponding intelligent server based on a second service request from a user. This allows the intelligent server to invoke the execution chain corresponding to the task instructions, execute the task instructions, and return the execution result to the user. This approach enables the application server to leverage the functionality of the intelligent server to provide artificial intelligence services to the user, thereby improving the intelligence level of application services provided to users.

[0046] 2) The method provided in this application enables the integration of AI technology from intelligent servers into application services, thereby helping users to handle various AI tasks conveniently and quickly.

[0047] 3) In this application, the user can send a first service request by triggering a component of the application service interface. The application server responds to the first service request and returns an AI dialog box to the user, so that the user can send task instructions and display the execution results through the AI ​​dialog box.

[0048] 4) In this application, the second service request and the third service request may carry field information and / or session information, so that the execution chain can obtain and use the context corresponding to the field information and / or session information to execute task instructions during task execution, thereby providing better AI services to users.

[0049] 5) This application can send task instructions not only by triggering task components, but also by sending task instructions in the form of natural language instructions. Users can conveniently and quickly obtain AI services in the application services by entering natural language in the AI ​​dialog box like chatting, with lower operating costs and shorter operating paths.

[0050] 6) This application can provide the knowledge base information of the application server to the machine learning model on the intelligent server side for learning, so that when the execution chain uses the machine learning model to execute task instructions, it can deeply understand the knowledge of the application service, thereby providing users with AI service functions that are more in line with the application service itself.

[0051] Of course, any product implementing this application does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a system architecture diagram applicable to the embodiments of this application;

[0054] Figure 2 A flowchart illustrating a method for providing AI services executed by an application server as provided in this application embodiment;

[0055] Figure 3a A schematic diagram of the first application service interface provided in an embodiment of this application;

[0056] Figure 3b A schematic diagram of the second application service interface provided in an embodiment of this application;

[0057] Figure 3c A schematic diagram of the third application service interface provided in this application embodiment;

[0058] Figure 3d A schematic diagram of the fourth application service interface provided in the embodiments of this application;

[0059] Figure 3eA schematic diagram of the fifth application service interface provided in the embodiments of this application;

[0060] Figure 3f A schematic diagram of the sixth application service interface provided in the embodiments of this application;

[0061] Figure 4 A flowchart illustrating a method for providing AI services executed by an intelligent server, provided as an embodiment of this application;

[0062] Figure 5 The execution interaction flowchart provided for the embodiments of this application;

[0063] Figure 6 A schematic block diagram of an apparatus for providing an AI service, provided as an embodiment of this application;

[0064] Figure 7 A schematic block diagram of an apparatus for providing another AI service, provided for embodiments of this application;

[0065] Figure 8 A schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0066] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0067] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0068] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0069] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0070] To facilitate understanding of this application, the system architecture on which this application is based will be described first. Figure 1 An exemplary system architecture that can be applied to embodiments of this application is shown, such as Figure 1 As shown, the system architecture may include: the application service client, the user server, and the intelligent server.

[0071] The user end of an application service refers to an application running on a user's device that can use the application service. This can be an application service client, a mini-program, or a browser that opens the application service interface, etc.

[0072] The aforementioned user devices may include, but are not limited to, smart mobile terminals, smart home devices, wearable devices, and PCs (Personal Computers). Smart mobile devices may include devices such as mobile phones, tablets, laptops, PDAs (Personal Digital Assistants), and connected cars. Smart home devices may include devices such as smart TVs. Wearable devices may include devices such as smartwatches, smart glasses, smart bracelets, VR (Virtual Reality) devices, AR (Augmented Reality) devices, and mixed reality devices (i.e., devices that support both virtual and augmented reality), etc.

[0073] Application servers are primarily used to provide application services, such as instant messaging, social media, e-commerce, map, and payment services. In this embodiment, the application server can interact with the intelligent server using the methods provided in this embodiment to further provide AI services to users.

[0074] An intelligent server is a server housing intelligent agents capable of providing artificial intelligence services such as large-scale data analysis, machine learning, natural language understanding, and natural language-based task processing. An intelligent agent (AI agent) is an AI program on the server side that can simulate and execute intelligent human behavior. It can perceive its environment, receive instructions, and make decisions and take actions using its knowledge. Intelligent agents can learn and adapt to their environment, improving their performance through interaction with it.

[0075] The aforementioned user servers and intelligent servers can be configured as independent servers, or as separate servers within a server cluster, or as independent cloud servers. Cloud servers, also known as cloud computing servers or cloud hosts, are a host product within the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Servers (VPS) services, such as high management difficulty and weak service scalability.

[0076] The application service's client, user server, and intelligent server can interact via a network. This network can include various types of wired or wireless networks.

[0077] It should be understood that Figure 1 The number of client-side applications, user servers, and intelligent servers shown in the diagram is merely illustrative. Depending on implementation needs, there can be any number of client-side applications, user servers, and intelligent servers.

[0078] Figure 2 A flowchart illustrating the method for providing AI services executed by the application server in this application embodiment is shown below. Figure 2 As shown, the method may include the following steps:

[0079] Step 201: Receive a second service request from the user terminal, the second service request including task instructions.

[0080] Step 203: Send a third service request containing the task instruction to the intelligent server corresponding to the target intelligent agent, so that the intelligent server can determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function.

[0081] Step 205: Obtain the execution result of the execution chain from the intelligent server and return the execution result to the user end of the application service.

[0082] As can be seen from the above process, this application provides a novel mechanism whereby the application server can send task instructions to the corresponding intelligent server based on the user's second service request. This allows the intelligent server to invoke the execution chain corresponding to the task instruction, execute the instruction, and return the execution result to the user. This approach enables the application server to leverage the functionality of the intelligent server to provide artificial intelligence services to the user, thereby improving the intelligence level of application services provided to users.

[0083] The following describes in detail each step of the above process and the effects that can be further produced, with reference to the embodiments. It should be noted that the terms "first," "second," etc., used in this disclosure do not have limitations in terms of size, order, or quantity, but are only used to distinguish them by name. For example, "first service request," "second service request," "third service request," etc., are used to distinguish each service request by name.

[0084] First, the above step 201, namely "receiving a second service request from the user terminal", will be described in detail with reference to the embodiments.

[0085] In this embodiment, the second service request can be understood as a user's request to obtain a specific AI service. This second service request can be sent by the user triggering a specific component, or it can be sent by the user inputting a natural language command.

[0086] One possible approach is that, while using the application service interface, a user can trigger a specific component on the interface. Upon triggering this component, the user's client sends an initial service request to the application server. For example... Figure 3a As shown, taking an instant messaging application as an example, the client of such an application may include a specific component (labeled "AI" in the diagram, but other icons or text can also be used). When the user clicks on this component, it triggers the client to send a first service request to the instant messaging application server. The application server responds to this first service request by returning an AI dialog box to the user. This dialog box can be embedded in the client, independent of the client, or cover a portion of the client, etc. Figure 3b As shown, an AI dialog box appears on the client, covering a portion of the client's interface. The user can use this AI dialog box to trigger a second service request.

[0087] As one possible approach, users can trigger a second service request through a specific component in the AI ​​dialog box. For example... Figure 3b As shown, the AI ​​dialog box includes two components: "Help me create a to-do list for drinking water in an hour" and "What important things did I have yesterday?". When a user triggers one of these components, they can send a third-party service request containing specific task instructions.

[0088] Since the task corresponding to a specific component is specific, the agent used to execute the task is specific, and correspondingly, the intelligent server where the agent resides is also specific, the second service request can carry the task identifier corresponding to the component, as well as the target agent information corresponding to the component.

[0089] As another possible approach, users can trigger a second service request by entering natural language commands in an AI dialog box. Figure 3c As shown, the text "I have something important to do tomorrow" is entered into the AI ​​dialog box. In this case, the user may need to select information about the target agent, for example, through a dropdown list or options. Figure 3c Users can click on the Agent component to view information about various intelligent agents for selection. This provides the user with information about the target intelligent agent. The target agent's information often corresponds to the task, such as document AI, question-answering AI, personnel AI, scheduling AI, etc. After entering "What important things do I have tomorrow?", users can further select a question-answering AI to perform the relevant question-answering task.

[0090] It should be noted that if there is only one intelligent server, the third server request may or may not carry the default intelligent agent information.

[0091] In addition to carrying task instructions and target agent information, the second service request may also carry at least one of the following: field information, session information, and identity information. The relevant uses will be detailed in subsequent embodiments.

[0092] The following describes step 203, namely "sending a third service request containing task instructions to the intelligent server corresponding to the target intelligent agent," in detail with reference to the embodiments.

[0093] If the second service request does not contain information about the target agent, the application server can send the third service request to the preset intelligent server. Alternatively, it can perform preliminary parsing of the task instruction and determine the intelligent server corresponding to the target agent based on the parsing results. For example, if a user inputs a question, preliminary parsing reveals that it is a question and determines that it may be a question-answering task, with the target agent being a question-answering AI.

[0094] If the second service request contains target agent information, this information can be the target agent's identifier (AgentID), the target agent's name, information about the intelligent server where the target agent resides, etc. Based on this target agent information, the application server can determine the corresponding intelligent server and send the third service request, containing the task instructions, to that server.

[0095] The aforementioned third service request can be a forwarded second service request, or it can be a request obtained by re-encapsulating part or all of the content contained in the second service request.

[0096] Accordingly, in addition to carrying task instructions, third-party service requests may also carry at least one of the following: field information, session information, and identity information.

[0097] The processing of intelligent servers will be discussed in [the following text is incomplete and likely refers to a separate topic:] Figure 4 The embodiments shown are described in detail.

[0098] The following describes step 205, namely "obtaining the execution result of the execution chain from the intelligent server and returning the execution result to the user terminal," in detail with reference to the embodiments.

[0099] The execution results obtained by the intelligent server can be displayed in different forms depending on the type of task executed in the execution chain. For example, if the task is text generation or text query, and the returned result is text, this text can be included in the execution result and displayed on the user's application service interface, such as in the form of a card component in the AI ​​dialog box on the application service interface. Figure 3d As shown in the figure, assuming the user inputs the task command "Please summarize the current group messages", the execution result is a summary of the current group messages.

[0100] The CardView component is an important component for achieving a card-style layout effect. The CardView component is actually a view container where specific elements can be laid out and displayed.

[0101] For example, if the task being performed is image generation or image query, and the returned result is an image, then the image can be included in the result and displayed on the application service interface on the user's end, such as in the form of a card component in the AI ​​dialog box on the application service interface.

[0102] For example, if the task involves querying tabular data, the returned result might be tabular data. This tabular data can then be included in the result and displayed on the user's application service interface. For instance, it could be displayed as a chart or structured data embedded in a card component within an AI dialog box on the application service interface. Figure 3e As shown in the figure, assuming the user inputs the task command "Have I missed any cards recently?", the execution result is the data obtained after querying the attendance table, which is displayed in the card table in the form of structured data.

[0103] For example, if the task being performed is something like creating a new schedule or a group, which executes a function within an application service, the returned result can be the application service interface after the task is completed, or a link to the application service interface after the task is completed can be displayed in an AI dialog box on the user's end. Figure 3f As shown in the diagram, assuming a user enters the task command "Help me request leave tomorrow morning", the execution result is a generated leave application. The user can edit and submit the leave application by clicking the "Edit and Submit" component.

[0104] Furthermore, after step 201 of this process, it can also include: disabling input in the AI ​​dialog box. That is, after a user enters a task instruction in the AI ​​dialog box, to prevent interference with the agent's task execution, the user can be prevented from entering other task instructions. Input is only allowed in the AI ​​dialog box after the application server obtains the execution result from the agent and returns it to the user's end for display. The handling of disabling and allowing input in the AI ​​dialog box can be implemented by calling the corresponding interface to set the input state of the dialog box.

[0105] Figure 4 A flowchart illustrating a method for providing AI services executed by an intelligent server, as provided in this application embodiment, is shown below. Figure 4 As shown, the method may include the following steps:

[0106] Step 401: Receive a third service request containing task instructions from the application server. The third service request is sent by the application server after receiving the second service request from the user. The second service request contains task instructions.

[0107] For relevant information in this step, please refer to the documentation for [specific details needed]. Figure 2 The relevant descriptions in the illustrated embodiments.

[0108] Step 403: Determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function.

[0109] In this step, if the task instruction carries a task identifier—for example, if the user sends the task instruction by triggering a corresponding component—then the task instruction typically carries a specific task identifier. The execution chain corresponding to a specific task is usually also specific; therefore, the execution chains corresponding to each task identifier can be pre-stored in the intelligent server. After receiving a third-party service request, the intelligent server can determine the corresponding execution chain based on the task identifier carried in the task instruction.

[0110] If the task instruction carries natural language instructions, such as when the user sends the task instruction by entering natural language instructions in an AI dialog box, then the task instruction is parsed to obtain the corresponding task type. The execution chain corresponding to each task type is pre-stored on the intelligent server. After receiving a third-party service request, the intelligent server can determine the corresponding execution chain based on the parsed task type.

[0111] When determining the task type corresponding to a task instruction through natural language parsing, one feasible approach is keyword matching. For example, a keyword list can be pre-configured for each task type, and the natural language instruction's words can be matched against this list to determine the corresponding task type. Another feasible approach is to use a pre-trained text classification model. This involves training a text classification model using natural language instruction samples and their corresponding task types. The trained model can then determine the task type corresponding to the input natural language instruction. Other implementation methods are also possible, but will not be listed here.

[0112] For AI tasks, it is usually necessary for one or more functions to be executed together to complete the task. Therefore, the execution chain may include one or more functions. If it includes multiple functions, the execution chain also restricts the execution order of the functions. Once the execution order is determined, it means that the input-output relationship between the sequentially executed functions is determined.

[0113] The task types involved in the embodiments of this application may include, but are not limited to: question-and-answer tasks, query tasks, image generation tasks, schedule creation tasks, text processing tasks, attendance processing tasks, etc.

[0114] In this embodiment, different types of intelligent agents are typically used to complete specific types of tasks, and these task types are usually related to a specific context. That is, the type of intelligent agent is usually context-dependent. Both the second and third service requests may include context information. This context information can be entered by the user in a dialog box by switching or selecting the corresponding component and carried in the second service request, or it can be automatically carried in the second service request based on the user's context. The context information may include context type information or context instance information.

[0115] The term "context" refers to the application service scenario in which a user is using the application service. Taking instant messaging application services as an example, they can be divided into contexts such as messaging, calendar, documents, workspace, meetings, and images. For example, taking messaging as an example, its context information can be a context code indicating the context of the message type, or it can be an ID indicating a specific group chat or one-on-one chat.

[0116] As one possible approach, before determining the execution chain corresponding to the task instruction, the intelligent agent can first determine whether the intelligent server matches the field information. If they match, the agent continues to execute the steps of determining the execution chain corresponding to the task instruction; otherwise, it can return information indicating that the field is incorrect and / or information guiding the selection of the correct field to the application server.

[0117] For example, suppose the user's current domain is a document. Through an AI dialog box, the user selects the target AI as an image AI and inputs the task instruction "Generate a picture about aliens." The second service request sent by the user carries the domain information, task instruction, and target AI information. The application server, based on the target AI information (i.e., the image AI), sends a third service request carrying the domain information and task instruction to the corresponding AI server. The AI ​​server corresponding to the image AI, based on the domain information (i.e., the document domain), determines that there is a domain mismatch; that is, the AI ​​server does not handle tasks in the document domain. Therefore, it can either return a message indicating a domain error or return a message guiding the selection of the correct domain. For example, it might return "Field error, you can select the image domain."

[0118] As another possible approach, the execution chain may utilize context information during the execution of task instructions. It can obtain context information from the domain information to execute task instructions. For the intelligent server, in response to the context retrieval request during the execution chain's task instruction execution, it sends the context information corresponding to the domain information to the execution chain, enabling the execution chain to execute task instructions based on the context information.

[0119] For example, suppose the task instruction is "Please summarize the current group messages". During the execution of this task instruction, the execution chain may have a function whose input parameter includes the content of the current group messages. Therefore, the execution chain can request the intelligent server to obtain the current group messages. The intelligent server can use the field instance ID (i.e., group ID) carried in the third service request to obtain the message content corresponding to the field instance ID from the application server as context information (here, context refers to the context of the user in a specific field in the application service) and provide it to the execution chain.

[0120] Furthermore, both the second and third service requests mentioned above may include session information. The purpose of session information is primarily for context isolation. In response to a context retrieval request during the execution of a task instruction by the execution chain, the intelligent server sends the context information corresponding to the session information to the execution chain, enabling the execution chain to execute the task instruction based on the context information.

[0121] When a user inputs task instructions, they may enter multiple instructions within a single session, and these instructions may be related to each other. This necessitates the use of contextual information (here, context refers to the context of the AI ​​service). Therefore, the intelligent server can use the session ID as a context isolation point, providing the current session's contextual information to the execution chain. In this way, the execution chain can execute the task instructions in conjunction with this contextual information.

[0122] Furthermore, both the second and third service requests mentioned above can include identity information, which can be the user's identity, the identity of the organization to which the user belongs, etc. Identity information is primarily used for access control or information isolation.

[0123] The access control mechanism is primarily manifested in the following way: when determining the execution chain corresponding to a task instruction, the intelligent server can identify the execution chain that matches the user's identity information; if no matching execution chain exists, it returns a message to the application server indicating that the user has no access permission. In other words, different execution chain access permissions can be set for users with different identities.

[0124] Information isolation is primarily manifested in the following way: In some application services, logged-in users can switch between different identities, such as switching between different companies. To ensure information isolation between different companies, when users obtain AI services using different identities, they can switch between different dialog boxes to provide AI services for each identity. For example, a user obtains AI services using identity A in dialog box 1 and using identity B in dialog box 2. When using identity A, the user cannot view the content in dialog box 2, and when using identity B, the user cannot view the content in dialog box 1.

[0125] Furthermore, since the application server accumulates a wealth of knowledge during user interaction with application services, to enable the intelligent server to better understand these services and provide higher-quality AI services, the application server's knowledge base information can be provided to the machine learning model for learning. This allows at least one function in the execution chain to utilize the machine learning model to execute task instructions. When the execution chain uses the machine learning model to execute task instructions, it gains a deep understanding of the application service's knowledge, thereby providing users with AI service functions that are more closely aligned with the application service itself.

[0126] The machine learning models mentioned above can be ordinary pre-trained language models or LLMs (Large Language Models). LLMs, also known as large language models, refer to deep learning models trained on massive amounts of text data that can generate natural language text or understand the meaning of language text. Their characteristics include massive scale and a huge number of parameters (usually reaching tens of billions or more), typically based on deep learning architectures such as the Transformer architecture. The difference between LLMs and ordinary pre-trained language models lies in the scale of their parameters. When the parameter scale exceeds a certain level, the model achieves significant performance improvements and exhibits capabilities that smaller models lack, such as in-context learning capabilities. It can learn complex patterns in language and perform a wide range of tasks, including text summarization, translation, sentiment analysis, multi-turn dialogue, and so on. Therefore, to distinguish them from traditional pre-trained language models, models with a parameter scale exceeding a certain level are called LLMs. In general, language models with a parameter scale exceeding tens of billions implemented based on deep learning architectures can be considered large language models. Common LLMs include: GTP-3 (Generative Pre-trained Transformer 3), T5 (Text-to-Text Transfer Transformer), GTP-4, PaLM (a large language model proposed by Google), LLaMA (Large Language Model MetaAI), and so on. Currently, LLMs possess rich knowledge acquired during pre-training, thus exhibiting very powerful language understanding and reasoning capabilities, enabling them to complete the prediction task specified by the given prompts.

[0127] For example, an instant messaging client provides its own knowledge base to an LLM for learning. When a user enters a task command to inquire about how to use the relevant functions in the instant messaging client, the execution chain can use the LLM to generate an answer and return it to the intelligence server. The intelligence server then returns the answer to the application server, and the application server finally sends it to the user.

[0128] Step 405: Return the execution result of the execution chain to the application server.

[0129] After the execution chain is completed, the intelligent server retrieves the execution result and returns it to the application server, which then returns it to the user client. For related content, please refer to [link to relevant documentation]. Figure 2 The details of step 205 in the illustrated embodiment will not be repeated here.

[0130] Taking instant messaging applications as an example, Figure 5A diagram illustrating an interactive execution flow, such as... Figure 5 As shown, the interaction process may include the following steps:

[0131] Step 501: The user inputs task instructions and target agent information through the AI ​​dialog box on the instant messaging client.

[0132] Step 502: The instant messaging client sends a second service request containing task instructions, target agent information, field information, identity information, and session information to the instant messaging application server.

[0133] Step 503: The instant messaging application server sends a third service request containing task instructions, field information, identity information, and session information to the intelligent server corresponding to the target intelligent agent information.

[0134] Step 504: If the intelligent server determines that it matches the field information, it determines the execution chain corresponding to the task instruction.

[0135] When determining the execution chain corresponding to a task instruction, the intelligent server can identify the execution chain that matches the identity information. If no matching execution chain exists, it returns a message indicating that the user does not have permission to use the service to the instant messaging application server. This part is not shown in the diagram.

[0136] Step 505: The intelligent server routes the third service request to the corresponding execution chain for execution.

[0137] Step 506: The intelligent server obtains the execution results of the execution chain.

[0138] Step 507: The intelligent server returns the execution result to the instant messaging application server.

[0139] Step 508: The instant messaging application server embeds the execution result into the card component and returns it to the instant messaging client.

[0140] Step 509: The instant messaging client displays the card component in the AI ​​dialog box, thus showing it to the user.

[0141] The specific execution details are not described in the process provided in this embodiment. Please refer to [link / reference]. Figure 2 and Figure 4 The relevant descriptions in the illustrated embodiments.

[0142] It should also be noted that the user terminals involved in this application embodiment can be clients, mini-programs, browsers, etc. Besides using the above method to obtain AI services on a client, cross-platform use is possible on other user terminals such as browsers and mini-programs. For example, assuming a user opens a relevant page of an instant messaging service through a browser, a link to obtain AI services can be embedded in a specific component of that page. When the user clicks the link, an AI dialog box can be displayed on the page. The user can then input task commands through this AI dialog box to obtain the AI ​​service. The relevant process can be found in [reference needed]. Figure 2 and Figure 4 The description in the illustrated embodiment.

[0143] Besides instant messaging applications, it can also be applied to social media applications, e-commerce applications, map applications, payment applications, and so on.

[0144] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0145] According to one embodiment, an apparatus for providing AI services is provided. Figure 6 This is a schematic block diagram of an apparatus for providing AI services provided in an embodiment of this application. The apparatus is disposed in... Figure 1 The application server in the architecture shown. For example... Figure 6 As shown, the device 600 includes: a first interaction unit 601 and a second interaction unit 602. The main functions of each component are as follows:

[0146] The first interaction unit 601 is configured to receive a second service request from a user terminal, the second service request including task instructions.

[0147] The second interaction unit 602 is configured to send a third service request containing a task instruction to the intelligent server corresponding to the target intelligent agent, so that the intelligent server can determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function; and obtain the execution result of the execution chain from the intelligent server.

[0148] The first interaction unit 601 is also configured to return the execution result to the user.

[0149] Furthermore, the first interaction unit 601 can also be configured to respond to a first service request from the user terminal by returning an AI dialog box to the user terminal. The first service request is sent by triggering a component of the application service interface displayed on the user terminal. The AI ​​dialog box is used to trigger the sending of a second service request and / or the display of the execution result.

[0150] Furthermore, the first interaction unit 601 can also be configured to: after receiving a second service request from the user, disable input in the AI ​​dialog box until the execution result is returned, and then enable input in the AI ​​dialog box.

[0151] Furthermore, the first interaction unit 601 can also send information about at least one intelligent agent to the user terminal for the user to select.

[0152] The aforementioned second user request may also include information about the target intelligent agent selected by the user from the information of at least one intelligent agent. The second interaction unit obtains the information about the target intelligent agent from the second user request and sends the third service request to the intelligent server corresponding to the target intelligent agent.

[0153] Figure 7 This is a schematic block diagram of an apparatus for providing another AI service, provided as an embodiment of this application. The apparatus is disposed in... Figure 1 The intelligent server in the illustrated architecture. (For example...) Figure 7 As shown, the device 700 may include a third interaction unit 701 and an execution invocation unit 702. The main functions of each component are as follows:

[0154] The third interaction unit 701 is configured to receive a third service request containing task instructions from the application server. The third service request is sent by the application server after receiving a second service request from the user terminal, and the second service request contains task instructions.

[0155] The execution call unit 702 is configured to determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function.

[0156] The third interaction unit 701 is also configured to return the execution result of the execution chain to the application server.

[0157] Furthermore, the aforementioned second and third service requests may also include site information.

[0158] Before determining the execution chain corresponding to the task instruction, the execution invocation unit 702 can also be configured to: determine whether the intelligent server matches the field information; if it matches, continue to execute the step of determining the execution chain corresponding to the task instruction; otherwise, return information indicating a field error and / or guiding the selection of the correct field to the application server through the third interaction unit 701.

[0159] Furthermore, the aforementioned second and third service requests also include: site information and / or session information.

[0160] The execution invocation unit 702 can also be configured to: in response to a context acquisition request during the execution of a task instruction by the execution chain, send context information corresponding to the field information and / or session information to the execution chain, so that the execution chain can execute the task instruction based on the context information.

[0161] Furthermore, the aforementioned second and third service requests also include identity information.

[0162] When determining the execution chain corresponding to the task instruction, the execution invocation unit 702 is specifically configured to: determine the execution chain in the execution chain corresponding to the task instruction that matches the identity information; if there is no matching execution chain, then return information indicating no usage permission to the application server through the third interaction unit 701.

[0163] As one possible implementation method, the execution invocation unit 702 can be specifically configured to: if the task instruction carries a task identifier, determine the execution chain corresponding to the task identifier; otherwise, perform natural language parsing on the task instruction to obtain the task type corresponding to the task instruction, and determine the execution chain corresponding to the task type.

[0164] As one possible implementation, at least one of the aforementioned functionalities utilizes a machine learning model to execute task instructions. The execution call unit 702 can be further configured to provide knowledge base information from the application server to the machine learning model for learning.

[0165] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the description of the method embodiments. The system or device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0167] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in any of the foregoing method embodiments.

[0168] And an electronic device, comprising:

[0169] One or more processors; and

[0170] A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in any of the foregoing method embodiments.

[0171] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the foregoing method embodiments.

[0172] in, Figure 8An exemplary architecture of an electronic device is shown, which may include a processor 810, a video display adapter 811, a disk drive 812, an input / output interface 813, a network interface 814, and a memory 820. The processor 810, video display adapter 811, disk drive 812, input / output interface 813, network interface 814, and memory 820 can communicate with each other via a communication bus 830.

[0173] The processor 810 can be implemented using a general-purpose CPU, microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs and implement the technical solution provided in this application.

[0174] The memory 820 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 820 can store the operating system 821 for controlling the operation of the electronic device 800, and the basic input / output system (BIOS) 822 for controlling the low-level operations of the electronic device 800. Additionally, it can store a web browser 823, a data storage management system 824, and a device 825 for providing AI services, etc. The aforementioned device 825 for providing AI services can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when the technical solution provided in this application is implemented through software or firmware, the relevant program code is stored in the memory 820 and executed by the processor 810.

[0175] The input / output interface 813 is used to connect input / output modules to enable information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0176] Network interface 814 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0177] Bus 830 includes a pathway for transmitting information between various components of the device, such as processor 810, video display adapter 811, disk drive 812, input / output interface 813, network interface 814, and memory 820.

[0178] It should be noted that although the above-described device only shows the processor 810, video display adapter 811, disk drive 812, input / output interface 813, network interface 814, memory 820, bus 830, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.

[0179] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer program product. This computer program product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0180] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for providing artificial intelligence (AI) services, applied to an application server, characterized in that, The method includes: Receive a second service request from the user, the second service request including a task instruction; A third service request containing the task instruction is sent to the intelligent server corresponding to the target intelligent agent, so that the intelligent server can determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function. The third service request is a forwarded second service request, or a request obtained by re-encapsulating part or all of the content contained in the second service request. The execution result of the execution chain is obtained from the intelligent server, and the execution result is returned to the user terminal.

2. The method according to claim 1, characterized in that, The method further includes: In response to a first service request from the user terminal, an AI dialog box is returned to the user terminal. The first service request is sent by triggering a component of the application service interface displayed on the user terminal. The AI ​​dialog box is used to trigger the sending of a second service request and / or the display of the execution result.

3. The method according to claim 1 or 2, characterized in that, The method further includes: Send information about at least one intelligent agent to the user terminal; The second service request also includes information about the target agent selected by the user from the information of the at least one agent.

4. A method for providing AI services, applied to an intelligent server, characterized in that, The method includes: Receive a third service request containing a task instruction from the application server. The third service request is sent by the application server after receiving a second service request from the user. The second service request contains the task instruction. The third service request is either a forwarded version of the second service request or a request obtained by re-encapsulating part or all of the content contained in the second service request. Determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction, wherein the execution chain includes at least one function; The execution result of the execution chain is returned to the application server.

5. The method according to claim 4, characterized in that, The second service request and the third service request also include field information; Before determining the execution chain corresponding to the task instruction, the method further includes: determining whether the intelligent server matches the field information; if they match, then continuing to execute the step of determining the execution chain corresponding to the task instruction. Otherwise, return information indicating a field error and / or guiding the selection of the correct field to the application server.

6. The method according to claim 4, characterized in that, The second service request and the third service request also include: field information and / or session information; In response to a context acquisition request during the execution of the task instruction by the execution chain, context information corresponding to the field information and / or session information is sent to the execution chain so that the execution chain can execute the task instruction based on the context information.

7. The method according to claim 4, characterized in that, The second service request and the third service request also include identity information; Determining the execution chain corresponding to the task instruction includes: identifying the execution chain in the execution chain corresponding to the task instruction that matches the identity information; if no matching execution chain exists, then returning information indicating that no usage permission is allowed to the application server.

8. The method according to any one of claims 4 to 7, characterized in that, Determining the execution chain corresponding to the task instruction includes: If the task instruction carries a task identifier, then the execution chain corresponding to the task identifier is determined; otherwise, the task instruction is parsed using natural language to obtain the task type corresponding to the task instruction, and the execution chain corresponding to the task type is determined.

9. The method according to any one of claims 4 to 7, characterized in that, The at least one function executes the task instructions using a machine learning model; the method further includes: The knowledge base information of the application server is provided to the machine learning model for learning.

10. A method for providing AI services, applied to an instant messaging application server, characterized in that, The method includes: Receive a second service request from an instant messaging client, the second service request including a task instruction; A third service request containing the task instruction is sent to the intelligent server corresponding to the target intelligent agent, so that the intelligent server can determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function. The third service request is a forwarded second service request, or a request obtained by re-encapsulating part or all of the content contained in the second service request. The execution result of the execution chain is obtained from the intelligent server, and the execution result is returned to the instant messaging client.

11. An apparatus for providing AI services, disposed on an application server, characterized in that, The device includes: The first interaction unit is configured to receive a second service request from a user terminal, the second service request including a task instruction; The second interaction unit is configured to send a third service request containing the task instruction to the intelligent server corresponding to the target intelligent agent, so that the intelligent server can determine the execution chain corresponding to the task instruction and call the execution chain to execute the task instruction. The execution chain includes at least one function. The third service request is a forwarded second service request, or a request obtained by re-encapsulating part or all of the content contained in the second service request. The unit also obtains the execution result of the execution chain from the intelligent server. The first interaction unit is also configured to return the execution result to the user terminal.

12. An apparatus for providing AI services, installed on an intelligent server, characterized in that, The device includes: The third interaction unit is configured to receive a third service request containing a task instruction from the application server. The third service request is sent by the application server after receiving a second service request from the user. The second service request contains the task instruction. The third service request is either a forwarded version of the second service request or a request obtained by re-encapsulating part or all of the content contained in the second service request. An execution invocation unit is configured to determine the execution chain corresponding to the task instruction and invoke the execution chain to execute the task instruction, wherein the execution chain includes at least one function. The third interaction unit is also configured to return the execution result of the execution chain to the application server.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 10.

14. An electronic device, characterized in that, include: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method and device for determining AI behaviors and AI server

    CN104133666A

  • Intelligent service system and method, electronic equipment and storage medium

    CN117319494A