Service execution method and device
The acquisition of intentions and business characteristics in the intelligent system through a large language model solves the problem of insufficient operation accuracy of the intelligent system in the business system, and achieves more efficient business execution.
Patent Information
- Application Number
- CN202510394901.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-01
AI Technical Summary
The accuracy of the intelligent system in the business system is insufficient, and it is impossible to accurately match the user's input content and intentions, resulting in incorrect operations.
The large language model is used to obtain the intention corresponding to the expected content input by the user, and extract business characteristics from the expected content based on the intention, and perform operations by calling the interface of the business system to reduce the need for manual configuration.
It improves the operation accuracy of intelligent systems in business systems, reduces the occurrence of wrong operations, and improves the user experience.
Smart Images

Figure CN120234060A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of intelligent systems, and in particular, to a service execution method, a service execution device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Connect the intelligent system with the service system. The user inputs the expected content in the intelligent system, and the intelligent system performs corresponding operations in the service system based on the expected content input by the user. For services with complex operations in the service system, the intelligent system can reduce the operation burden of the user.
[0003] In order to enable the intelligent system to correctly understand the expected content input by the user and thus perform correct operations in the service system, relevant personnel need to configure it in the intelligent system in advance. For example: configure various keywords in the intelligent system and their corresponding services in the service system. In this way, after the user inputs content in the intelligent system, the intelligent system matches the content input by the user with various pre-configured keywords. If the match is successful, the service corresponding to the successfully matched keyword is determined as the service that the user needs to operate in the service system this time, and the intelligent system thus performs the operation of this service in the service system based on the content input by the user.
[0004] However, the configuration in the intelligent system is predefined. Facing the current complex and changeable input content, the intelligent system may match services outside the actual needs of the user based on its preset fixed configuration. In this way, it causes the intelligent system to perform incorrect operations in the service system, reducing the accuracy of the operations of the intelligent system in the service system. Summary of the Invention
[0005] The purpose of the embodiments of this application is to provide a service execution method, a service execution device, an electronic device, a computer-readable storage medium, and a computer program product to improve the accuracy of the operations of the intelligent system in the service system.
[0006] To solve the above technical problems, the embodiments of this application provide the following technical solutions:
[0007] The first aspect of this application provides a service execution method. The method is applied to an intelligent system, and the intelligent system is connected to a service system. The method includes: obtaining the expected content input by the user; obtaining the intention corresponding to the expected content through a large language model (LLM); extracting service features from the expected content based on the intention; among the interfaces corresponding to multiple services in the service system, calling the interface of the target service corresponding to the intention, and transmitting the extracted service features to the interface of the target service, so as to execute the operation corresponding to the expected content in the service system by running the interface of the target service.
[0008] Compared with the prior art, in the business execution method provided by the first aspect of the present application, after the intelligent system obtains the expected content input by the user, it uses a large language model to obtain the intent corresponding to the expected content. Since the large language model can more accurately understand natural language and there is no need for manual configuration of the correspondence between the input content and the intent in the intelligent system, more accurate user intent can be obtained. Then, based on the obtained intent, business features are obtained from the expected content, and the business interface corresponding to the intent is called, and then the business features are transmitted, so that the intelligent system can accurately execute the business corresponding to the user's expected content and improve the accuracy of the operation of the intelligent system in the business system.
[0009] In some modified embodiments of the first aspect of the present application, the number of large language models is multiple. Using the large language models to obtain the intent corresponding to the expected content includes: processing the expected content by multiple large language models in a preset order to obtain the intent corresponding to the expected content.
[0010] Processing the expected content by multiple large language models in sequence can comprehensively utilize the capabilities of each large language model, and then obtain more accurate intent, improving the accuracy of intent acquisition.
[0011] In some modified embodiments of the first aspect of the present application, processing the expected content by multiple large language models in a preset order to obtain the intent corresponding to the expected content includes: inputting the expected content into the first large language model. For every two adjacent large language models, the intent recognition result output by the previous large language model with a higher ranking and the expected content are input into the next large language model with a lower ranking to obtain the intent recognition result output by the last large language model. Based on the intent recognition result output by the last large language model, the intent corresponding to the expected content is obtained.
[0012] By processing the intent recognition result output by the previous large language model and the expected content by the next large language model, on the basis of comprehensively utilizing the advantages of each large language model, the amount of data processed by the subsequent large language models can be reduced, improving the accuracy and efficiency of intent acquisition.
[0013] In some modified implementation manners of the first aspect of the present application, multiple large language models are used to process the expected content in a preset order to obtain the intent corresponding to the expected content, including: inputting the expected content into the large language model ranked first to obtain the intent recognition result output by the large language model ranked first; inputting the intent recognition result output by the large language model ranked first and the expected content into the large language model ranked second to obtain the intent recognition result output by the large language model ranked second; and so on. For every two adjacent large language models, the intent recognition result output by the previous large language model ranked before and the expected content are input into the next large language model ranked after until the last large language model outputs the intent recognition result; determining the intent corresponding to the expected content based on the intent recognition result output by the last large language model.
[0014] Taking the output of each large language model as the input of the next large language model enables the next large language model to comprehensively consider the recognition results of each previous large language model when recognizing the intent of the expected content, and can avoid frequent comparison and interaction between each large language model, thereby improving the accuracy and efficiency of intent recognition.
[0015] In some modified implementation manners of the first aspect of the present application, the intent recognition result includes multiple intents and the confidence level corresponding to each intent among the multiple intents; for every two adjacent large language models, inputting the intent recognition result output by the previous large language model ranked before and the expected content into the next large language model ranked after until the last large language model outputs the intent recognition result includes: for every two adjacent large language models, inputting the multiple intents output by the previous large language model ranked before and the expected content into the next large language model ranked after until the last large language model outputs multiple intents and the confidence level corresponding to each intent among the multiple intents.
[0016] When the next large language model recognizes the intent based on the expected content, it can refer to the multiple intents recognized by the previous large language model based on the expected content, but will not overly refer to the confidence levels of the multiple intents calculated by the previous large language model, avoiding excessive interference when the next large language model recognizes the intent based on the expected content, and ultimately improving the accuracy and efficiency of intent recognition.
[0017] In some modified implementation manners of the first aspect of the present application, extracting business features from the expected content based on the intent includes: obtaining all the feature identifiers corresponding to the intent; if it is determined based on all the feature identifiers that there are missing features in the expected content, outputting the supplementary prompt information corresponding to the missing features, and then extracting the business features from the content fed back based on the supplementary prompt information and the expected content according to all the feature identifiers; if it is determined based on all the feature identifiers that there are no missing features in the expected content, extracting the business features from the expected content according to all the feature identifiers.
[0018] By configuring different intents and their corresponding all feature identifiers, and then determining whether the expected content corresponding to the intent is provided completely through the all feature identifiers of the intent corresponding to the expected content, the rapid detection of the integrity of the expected content is realized, and the acquisition efficiency of the complete expected content is improved.
[0019] In some modified implementation manners of the first aspect of the present application, before transmitting the extracted service feature to the interface of the target service, the method further includes: if the extracted service feature does not conform to the standard feature format of the interface of the target service, converting the extracted service feature into a service feature conforming to the standard feature format; if the extracted service feature conforms to the standard feature format of the interface of the target service, performing the step of transmitting the extracted service feature to the interface of the target service.
[0020] Converting the extracted service feature into the format required by the service interface can ensure the smooth execution of the service and improve the success rate of service operations.
[0021] In some modified implementation manners of the first aspect of the present application, converting the extracted service feature into a service feature conforming to the standard feature format includes: if the standard feature format is related to the changing environment, obtaining the current environment information, and generating a service feature in the standard feature format based on the current environment information and the extracted service feature; if the standard feature format is not related to the changing environment, performing the step of converting the extracted service feature into a service feature conforming to the standard feature format.
[0022] Through the standard feature format, it can be quickly determined whether the extracted service feature needs to be converted, improving the efficiency and accuracy of transmitting the service feature to the interface.
[0023] The second aspect of the present application provides a service execution device. The device is applied to an intelligent system, and the intelligent system is docked with a service system. The device includes: a first acquisition module for acquiring the expected content input by a user; a second acquisition module for acquiring the intent corresponding to the expected content through a large language model; an extraction module for extracting service features from the expected content based on the intent; a call execution module for calling the interface of the target service corresponding to the intent among the interfaces of multiple services in the service system, and transmitting the extracted service features to the interface of the target service, so as to execute the operation corresponding to the expected content in the service system by running the interface of the target service.
[0024] The third aspect of the present application provides an electronic device. The electronic device includes: a processor, a memory and a bus; wherein, the processor and the memory communicate with each other through the bus, and the processor is used to call the program instructions in the memory to execute the method in the first aspect.
[0025] The fourth aspect of this application provides a computer-readable storage medium, which includes: a stored program; wherein, when the program runs, it controls the device where the computer-readable storage medium is located to execute the method in the first aspect.
[0026] The fifth aspect of this application provides a computer program product, which includes: a computer program or instruction; wherein, when the computer program or instruction is executed by the device where it is located, it implements the method in the first aspect.
[0027] The service execution device provided in the second aspect of this application, the electronic device provided in the third aspect, the computer-readable storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect have the same or similar beneficial effects as the service execution method provided in the first aspect. Description of the Drawings
[0028] By referring to the accompanying drawings and reading the detailed description below, the above and other purposes, features, and advantages of the exemplary embodiments of this application will become easy to understand. In the drawings, several embodiments of this application are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, where:
[0029] Figure 1 It is a schematic diagram of the scenario architecture of the service execution method in the embodiment of this application;
[0030] Figure 2 It is a schematic flow chart of the service execution method in the embodiment of this application Figure 1 ;
[0031] Figure 3 It is a schematic flow chart of the service execution method in the embodiment of this application Figure 2 ;
[0032] Figure 4 It is a schematic structural diagram of the service execution device in the embodiment of this application Figure 1 ;
[0033] Figure 5 It is a schematic structural diagram of the service execution device in the embodiment of this application Figure 2 ;
[0034] Figure 6 It is a schematic structural diagram of the electronic device in the embodiment of this application; Detailed Embodiments
[0035] Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be fully communicated to those skilled in the art.
[0036] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in the present application should have the ordinary meaning understood by those skilled in the art to which the present application pertains.
[0037] Currently, if an intelligent system wants to replace a user to perform operations in a business system, it is necessary to manually pre-configure relevant settings in the intelligent system, that is, configure the correspondence between user input content and the business, so that after the intelligent system receives the content input by the user, it can determine the target business corresponding to the received content based on the pre-configured correspondence. Thus, operations are performed under the target business of the business system based on the input content.
[0038] Taking the leave application business as an example, when the user does not use the intelligent system, the user needs to find the location of the leave application business in the business system. After entering the operation page of the leave application business, the user needs to input various necessary leave information in sequence according to the requirements and then submit it to complete the leave application. It is rather cumbersome for the user to search for the leave application business in the business system and input various necessary leave information according to the requirements on the operation page of the leave application business. If the user uses the intelligent system, the user only needs to input the desired content in the intelligent system, for example: I want to take a three-day leave. Based on "I want to take a three-day leave", the intelligent system can replace the user to perform the leave application operation in the business system, thus reducing the operation burden of the user in the business system.
[0039] However, with the complexity and diversification of user input scenarios, the input content is becoming more and more abundant. Obviously, the pre-set content cannot achieve precise matching with various contents input by the user, and the intelligent system may match a business other than the actual needs of the user based on its pre-set fixed configuration.
[0040] For example: when the user inputs "I want to take a three-day leave" in the intelligent system, and the intelligent system is pre-configured with: leave - leave application business and leave approval business. At this time, the intelligent system may match the leave approval business based on the user's input. However, what the user actually needs to do is to perform the leave application operation, that is, to execute the leave application business in the business system.
[0041] In this way, the intelligent system cannot accurately determine the target business corresponding to the user input content, and ultimately reduces the accuracy of the intelligent system's operations in the business system.
[0042] In view of this, the embodiments of the present application provide a service execution method, a service execution device, an electronic device, a computer-readable storage medium, and a computer program product. By leveraging the accurate understanding of natural language by the large language model, the intention corresponding to the user input content can be obtained, and then the corresponding service interface in the service system can be called based on the obtained intention for operation, so as to improve the accuracy of the intelligent system in operating the service system.
[0043] First, the scenario architecture of the service execution method provided by the embodiments of the present application will be described.
[0044] Figure 1 For the schematic diagram of the scenario architecture of the service execution method in the embodiments of the present application, see Figure 1 As shown, the architecture may include: an intelligent system 11 and a service system 12. Among them, the intelligent system 11 and the service system 12 are pre-connected.
[0045] The intelligent system 11 may refer to any system that can perform corresponding operations in the service system 12 based on the expected content input by the user. The specific type of the intelligent system 11 is not limited here.
[0046] In the intelligent system 11, there is no need to perform various complex configurations in advance, and only some simple configurations are required. The simple configurations may include: substituting the expected content input by the user into the large language model to obtain the intention corresponding to the expected content through the large language model, and establishing the corresponding relationship between various intentions and the corresponding interfaces of the service system 12 to perform corresponding operations in the service system 12 through the corresponding interfaces.
[0047] The service system 12 may refer to the system on which the service operation depends. In practical applications, the service system 12 may be an office system, a financial system, a shopping system, a social system, etc. The specific content of the service is not limited here. The specific type of the service system 12 is also not limited here.
[0048] The large language model refers to a deep learning model trained with a large amount of text data, enabling the model to generate natural language text or understand the meaning of language text. The specific type and content of the large language model are not limited here. The large language model may be built into the intelligent system 11 or set independently of the intelligent system 11. The positional relationship between the large language model and the intelligent system 11 is also not limited here.
[0049] When a user needs to perform an operation in the business system 12 through the intelligent system 11, the user inputs the expected content into the intelligent system 11. The intelligent system 11 inputs the expected content into the large language model, and the large language model outputs the intent corresponding to the expected content. After the intelligent system 11 obtains the intent corresponding to the expected content, it can determine what operation the user needs to perform in the business system 12 based on the intent, thereby calling the interface of the operation and performing corresponding operations based on the expected content.
[0050] It should be noted here that the information, data, and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0051] Next, a detailed description will be given to the service execution method provided in the embodiments of this application.
[0052] Figure 2 For the process diagram of the service execution method in the embodiments of this application Figure 1 , see Figure 2 As shown, this method includes at least S21 - S24.
[0053] S21: Obtain the expected content input by the user.
[0054] When a user needs to perform an operation in the business system through the intelligent system, the user can input the expected content into the intelligent system to perform the operation in the business system on behalf of the user through the intelligent system.
[0055] The expected content may refer to the language that the user generates according to their own habits and needs to perform operations in the business system. For example, when the user needs to perform a leave operation in the business system, the expected content input by the user in the intelligent system may be: I want to take three days off.
[0056] S22: Obtain the intent corresponding to the expected content through the large language model.
[0057] After the intelligent system obtains the expected content input by the user, it can input the expected content into the large language model to identify the intent corresponding to the expected content through the large language model.
[0058] In the process of inputting the expected content into the large language model, some descriptive languages can be added to the expected content to enable the large language model to accurately know the intent of identifying the expected content. The descriptive language can be: identify the intent of..., etc. In this way, the accuracy of intent recognition corresponding to the expected content can be improved.
[0059] S23: Extract service features from the expected content based on the intent.
[0060] After the intention is determined, it is possible to determine what kind of business the user wants to conduct in the business system, and then extract the business features corresponding to the business from the expected content.
[0061] The business features here can refer to the data required by the business system to implement the corresponding business. For example: the business features can be variables in the expected content. The variables can specifically be time, place, person, matter, etc. The specific content of the variables is not limited here.
[0062] When specifically extracting, there are various corresponding relationships between intentions and their corresponding business features preset in the intelligent system. For example: the corresponding relationship between leave application and type, duration. The intelligent system searches for the corresponding business features from the corresponding relationship according to the determined intention, and then extracts the corresponding business features from the expected content. Continuing with the above example, assuming the expected content is "I have something to do and want to take a three-day leave", the large language model identifies that the intention corresponding to this expected content is "leave application", and searches for the business features corresponding to leave application from the above corresponding relationship as "type" and "duration", and then extracts the business features "personal leave" and "three days" from "I have something to do and want to take a three-day leave".
[0063] Of course, in the case where the intelligent system does not pre-configure each intention and its corresponding business features, after the intelligent system obtains the intention, it can also input the intention and the expected content into the large language model again, so as to extract the corresponding business features from the expected content based on the intention through the accurate natural language understanding ability of the large language model, thereby realizing the accurate extraction of business features.
[0064] S24: Among the interfaces corresponding to multiple businesses in the business system, call the interface of the target business corresponding to the intention, and transfer the extracted business features to the interface of the target business, so as to execute the operation corresponding to the expected content in the business system by running the interface of the target business.
[0065] In the business system, there are generally multiple businesses. Each business has different interfaces externally. In the intelligent system, the corresponding relationship between different businesses and their corresponding intentions can be pre-configured. In this way, after the intelligent system obtains the intention corresponding to the expected content from the large language model, it can search for the business corresponding to the same intention in the above corresponding relationship, thus finding the interface of the business, and then transfer the business features extracted from the expected content to the business system through this interface. Based on the business features transferred by the business interface, the business system can implement the corresponding operation.
[0066] For the same business, multiple semantically similar intents can be correspondingly configured. For example, for the leave application business, the configured intents can include: leave, vacation, etc. In this way, the intent obtained based on the large language model can find the same intent in the above corresponding relationship, so as to accurately determine the corresponding business and achieve the accurate search of the business interface. In the case where no same intent is found in the above corresponding relationship, the intent with the highest similarity can be searched to achieve the smooth search of the business interface and ensure the smooth operation of the intelligent system in the business system.
[0067] Of course, if the corresponding relationship between the business and the intent is not pre-configured in the intelligent system, after the intelligent system obtains the intent, it can search the names of all business interfaces in the business system and calculate the similarity between the searched names and the obtained intent, so as to select the business interface corresponding to the name with the highest similarity as the target business interface for transmitting business characteristics next, and then transmit the business characteristics extracted from the expected content to the target business interface to implement the execution of the expected content in the business system.
[0068] As can be seen from the above content, in the business execution method provided by the embodiment of the present application, after the intelligent system obtains the expected content input by the user, it uses the large language model to obtain the intent corresponding to the expected content. Since the large language model can more accurately understand natural language and there is no need for manual configuration of the corresponding relationship between the input content and the intent in the intelligent system, more accurate user intents can be obtained. Then, based on the obtained intent, business characteristics are obtained from the expected content, and the business interface corresponding to the intent is called, and then the business characteristics are transmitted, so that the intelligent system can accurately execute the business corresponding to the user's expected content and improve the accuracy of the operation of the intelligent system in the business system.
[0069] Further, as a refinement and extension of the Figure 2 shown method, the embodiment of the present application also provides a business execution method.
[0070] Figure 3 For the flow diagram of the business execution method in the embodiment of the present application Figure 2 See Figure 3 shown, this method at least includes S31 - S310.
[0071] S31: Obtain the expected content input by the user.
[0072] For the specific implementation manners of step S31 and step S21 in the foregoing embodiment, reference may be made to the relevant descriptions in the foregoing embodiment, which will not be elaborated here.
[0073] After the intelligent system obtains the expected content input by the user, it is necessary to substitute the expected content into the large language model to obtain the intention corresponding to the expected content through the large language model. In order to improve the accuracy of obtaining the intention corresponding to the expected content, multiple large language models can be adopted.
[0074] S32: Process the expected content using multiple large language models in a preset order to obtain the intention corresponding to the expected content.
[0075] The multiple large language models here can be the same large language model or different large language models.
[0076] For different multiple large language models, since the texts or model architectures used in the training of the multiple large language models are different, the intentions output by the multiple large language models based on the same expected content will also be different. By synthesizing the intentions output by the multiple large language models, the accuracy of obtaining the intention corresponding to the expected content can be improved.
[0077] The multiple different large language models here have different functions they are good at in the process of natural language understanding. For example: Some large language models are good at determining intentions, and the accuracy of the determined multiple intentions is relatively high. And some large language models are good at calculating the confidence of intentions, and the confidence of each calculated intention is relatively accurate. There are also some large language models that are good at calculating the feature vectors of the expected content and can use more accurate feature vectors to calculate multiple intentions and the confidence of multiple intentions.
[0078] The multiple large language models have different functions they are good at in the process of natural language understanding. On the one hand, it can be understood that the functions each large language model is good at are different from each other. That is, each large language model has a different function from other large language models. In this way, the functions that each large language model is good at can be comprehensively utilized to achieve accurate determination of intentions. On the other hand, it can also be understood that the functions each large language model is good at are not completely different. That is, some large language models have different functions, while some large language models have the same functions. In some examples, even if they are good at the same function, the specific mechanisms or specific parameters used by the multiple large language models for intention recognition may be different. Using multiple large language models that are good at the same function can perform intention recognition more fully and accurately, improving the accuracy of intention recognition.
[0079] In the process of combining multiple large language models to obtain the intent corresponding to the expected content, the expected content can be input into each large language model respectively. Each large language model outputs an intent. The intent with the largest number of identical intents can be selected from multiple intents as the intent corresponding to the expected content. Or multiple intents can be input into a specified large language model again, and the intent obtained by integrating multiple intents through this specified large language model can be used as the intent corresponding to the expected content.
[0080] In the process of combining multiple large language models to obtain the intent corresponding to the expected content, the multiple large language models can also process the expected content in sequence. In this way, during the process of each large language model processing the expected content, the processing advantages of the large language models that have previously processed the expected content can be referred to, improving the accuracy of the final intent acquisition.
[0081] Specifically, multiple large language models can be sorted in a preset order. Here, the preset order can refer to the execution order of the functions they are good at in natural language understanding. For example: large language model a is good at processing the expected content into feature vectors, large language model b is good at calculating multiple intents based on feature vectors, and large language model c is good at calculating the confidence of intents. In the understanding of natural language by large language models, first the expected content will be processed into feature vectors, then multiple intents will be calculated based on the feature vectors, then the confidence of each intent among multiple intents will be calculated, and finally the final intent will be determined from multiple intents according to the confidence of multiple intents. Thus, the execution order of the above three large language models in natural language understanding is: large language model a → large language model b → large language model c. This can accurately process the expected content in sequence according to the processing order of the expected content in intent recognition, thereby obtaining a more accurate intent.
[0082] In the process of multiple large language models processing the expected content in sequence, the content output by the functional unit that the previous large language model is good at can be used as the input content and input into the functional unit that the next large language model is good at. For example: large language model a is good at calculating feature vectors, large language model b is good at determining intents, and large language model c is good at calculating the confidence of intents. At this time, the expected content is input into large language model a, large language model a calculates the feature vector based on the expected content, and then inputs the feature vector calculated by large language model a into the intent determination unit of large language model b. The intent determination unit of large language model b determines multiple intents based on the feature vector, and then inputs the multiple intents determined by large language model b into large language model c. The confidence calculation unit of large language model c calculates the confidence of multiple intents based on multiple intents, and finally large language model c determines the intent of the expected content based on the confidence of multiple intents. This can effectively utilize the functions that each large language model is good at, improving the accuracy and efficiency of intent determination.
[0083] In the process of multiple large language models processing the expected content in sequence, it can also be to combine the intention recognition result output by the previous large language model with the expected content and then input it into the next large language model, and then determine the intention of the expected content through the intention recognition result output by the last large language model.
[0084] Step S32 can specifically include: inputting the expected content into the first large language model. For every two adjacent large language models, input the intention recognition result output by the previous large language model with a higher ranking and the expected content into the next large language model with a lower ranking, obtain the intention recognition result output by the last large language model, and based on the intention recognition result output by the last large language model, obtain the intention corresponding to the expected content.
[0085] Step S32 can further include:
[0086] Step S32a: Input the expected content into the large language model ranked first, and obtain the intention recognition result output by the large language model ranked first.
[0087] The intention recognition result here can be an intention finally output by the large language model, or multiple pending intentions obtained by the large language model in the process of recognizing the intention of the expected content. The specific content of the intention recognition result is not limited here.
[0088] Step S32b: Input the intention recognition result output by the large language model ranked first and the expected content into the large language model ranked second, and obtain the intention recognition result output by the large language model ranked second.
[0089] Step S32c: And so on. For every two adjacent large language models, input the intention recognition result output by the previous large language model with a higher ranking and the expected content into the next large language model with a lower ranking until the last large language model outputs the intention recognition result.
[0090] That is to say, except that the input of the large language model ranked first is the expected content, and the output of the large language model ranked last is the final intention recognition result, for each intermediate large language model, it is necessary to input the intention recognition result output by the large language model ranked one position higher and the expected content into the current large language model, and input the intention recognition result output by the current large language model and the expected content into the large language model ranked one position lower until the intention recognition result output by the last large language model is obtained.
[0091] As can be seen from the above, for each adjacent large language model, the intention recognition result output by the previous large language model with a higher ranking is jointly input into the next large language model with a lower ranking together with the expected content. When the next large language model performs intention recognition based on the expected content, it can refer to the intention recognition result of the previous large language model and combine the strengths of the previous large language model to obtain a more accurate intention recognition result.
[0092] In the process of inputting the intention recognition result and the expected content into the next large language model, some descriptive statements can be added to the intention recognition result and the expected content. For example: recognize the intention of (expected content) in combination with (intention recognition result), or the expected content + intention recognition result can be directly input. The specific content form input into the next large language model can be selected according to actual needs and is not limited here.
[0093] Input the expected content into the first large language model, and the first large language model outputs the first intention recognition result. Then input the first intention recognition result and the expected content into the second large language model, and the second large language model outputs the second intention recognition result. Then input the second intention recognition result and the expected content into the third large language model, and the third large language model outputs the third intention recognition result, and so on. Input the second-to-last intention recognition result and the expected content into the last large language model, and the last large language model outputs the final intention recognition result. The intention in the final intention recognition result is the intention corresponding to the expected content.
[0094] In practical applications, considering the processing efficiency of the large language model and the efficiency of intention recognition, the number of large language models should not be too large. Considering the accuracy of intention recognition, the number of large language models should not be too small. Taking the above into account, in the intention recognition by the large language model, the intention classification and the calculation of intention confidence are relatively important. Therefore, a limited number of large language models are selected to participate in the intention recognition of the expected content. The specific number can be two, three, etc., and is not limited here. The accuracy of intention classification of one type of large language model should be higher than the preset classification accuracy. The accuracy of intention confidence calculation of another type of large language model should be higher than the preset confidence accuracy.
[0095] Specifically, the intention recognition result includes multiple intentions and the confidence corresponding to each intention among the multiple intentions.
[0096] Step S32c can specifically include: for each adjacent pair of large language models, input the multiple intentions output by the previous large language model with a higher ranking and the expected content into the next large language model with a lower ranking until the last large language model outputs multiple intentions and the confidence corresponding to each intention among the multiple intentions.
[0097] Taking the adoption of two large language models as an example, the accuracy of the first large language model for intent classification is higher than the preset classification accuracy, and the accuracy of the second large language model for intent confidence calculation is higher than the preset confidence accuracy. Input the expected content into the first large language model, and utilize the high precision of the first large language model for intent classification to enable the first large language model to output multiple intents. Then input the multiple intents and the expected content into the second large language model, and utilize the high precision of the second large language model for intent confidence calculation to enable the second large language model to output the intent recognition result corresponding to the expected content.
[0098] In some other embodiments, to improve the accuracy of intent recognition, for every two adjacent large language models, the multiple intents input to the next large language model ranked later can be intents higher than the preset type threshold, and the intents of the preset type threshold correspond to the previous large language model. For example, large language model a is good at calculating feature vectors, large language model b is good at determining intents based on classification, and large language model c is good at calculating the confidence of intents. The preset order for the large language models to process the expected content is "large language model a → large language model b → large language model c". Then for the two adjacent large language models "large language model b, large language model c", the previous large language model b outputs intents according to classification. To improve the output accuracy of large language model c, multiple intents with accuracy higher than the preset classification accuracy in the intents output by large language model b can be output to large language model c.
[0099] Step S32d: Determine the intent corresponding to the expected content based on the intent recognition result output by the last large language model.
[0100] In the intent recognition result output by the last large language model, there may be one intent, or multiple intents and their corresponding confidences. When the intent recognition result only includes one intent, take this one intent as the intent corresponding to the expected content. When the intent recognition result includes multiple intents and their corresponding confidences, the intent with the highest confidence can be selected as the intent corresponding to the expected content, or the preset number of intents with the highest confidence and their confidences can be input into a specified large language model, so that the large language model comprehensively processes them into one intent, and finally take the comprehensively processed one intent as the intent corresponding to the expected content.
[0101] S33: Obtain all feature identifiers corresponding to the intent.
[0102] After obtaining the intent corresponding to the expected content, it is possible to know what operation the user wants to perform in the business system, thereby checking whether the expected content input by the user can be completely used for this operation, avoiding operation failures caused by missing information based on incomplete expected content in the business system, and improving the operation efficiency of the intelligent system in the business system.
[0103] In the intelligent system, one or several intents are pre-configured for different services of the service system, and the identifiers of all service characteristics required for this service are also configured. For example: In the intelligent system, the corresponding relationship of service (leave)-intent (leave, vacation)-all characteristic identifiers (type, duration) is configured. In this way, based on the obtained intent, through the above corresponding relationship, the intelligent system can find the corresponding all characteristic identifiers, and then check whether there is missing information in the expected content based on the found all characteristic identifiers.
[0104] S34: Determine whether there are missing characteristics in the expected content based on all characteristic identifiers. If so, execute S35; if not, execute S36.
[0105] When making a specific judgment, the corresponding information can be searched in the expected content based on each service characteristic identifier in all characteristic identifiers. If the corresponding information of each service characteristic identifier is found in the expected content, it means that the information provided in the expected content is complete, and service characteristic extraction and service characteristic transmission can be performed. If there is a service characteristic identifier for which the corresponding information is not found in the expected content, it means that the information provided in the expected content is incomplete and the user needs to supplement it further.
[0106] When searching for the corresponding information in the expected content based on the service characteristic identifier, similar semantics search can be used. For example: The expected content is "I want to take three days off", the intent is "leave", and the all characteristic identifiers corresponding to the intent are "type" and "duration". Based on "duration", the similar semantics "three days" can be obtained from "I want to take three days off". However, based on "type", the similar semantics cannot be obtained from "I want to take three days off", and then it is determined that there is a missing characteristic "type" in "I want to take three days off".
[0107] S35: Output the supplementary prompt information corresponding to the missing characteristic, and then extract the service characteristics from the content fed back based on the supplementary prompt information and the expected content according to all characteristic identifiers.
[0108] When it is determined that there is missing information in the expected content, a prompt is output to the user. The prompt can include the missing service characteristics. After seeing the missing service characteristics, the user can immediately know the information that needs to be supplemented, so as to quickly supplement the missing information and improve the service operation efficiency.
[0109] S36: Extract the service characteristics from the expected content according to all characteristic identifiers.
[0110] When it is determined that there is no missing information in the expected content, it indicates that the information provided by the expected content is complete and the business operation can be executed. At this time, the business features can be extracted from the expected content according to all the feature identifiers. The specific extraction method has been described in detail in step S23 of the foregoing embodiment and step S34 of this embodiment. For relevant descriptions, reference can be made to the corresponding embodiments, and details will not be elaborated here.
[0111] S37: Among the interfaces corresponding to multiple services in the service system, call the interface of the target service corresponding to the intention.
[0112] For the specific implementation methods of step S37 and step S24 in the foregoing embodiment, reference can be made to the relevant descriptions in the foregoing embodiment, and details will not be elaborated here.
[0113] S38: Determine whether the extracted business features conform to the standard feature format of the interface of the target service. If so, execute S39; if not, execute S310.
[0114] For different services in the service system, the data formats required by their interfaces are different. In the intelligent system, the standard feature formats required by the interfaces of different services can be stored in advance. In this way, after the intelligent system extracts the business features from the expected content, it can quickly determine whether the format of the extracted business features is correct through the pre-stored service interfaces and their corresponding standard feature formats, thereby improving the success rate of business execution.
[0115] In practical applications, the standard feature format corresponding to the service interface can be a language type, such as: Python, HTML, etc. The standard feature format corresponding to the service interface can also be a data format, such as: xx / xx / xxxx - xx / xx / xxxx, x days, etc.
[0116] S39: Transmit the extracted business features to the interface of the target service to execute the operation corresponding to the expected content in the service system by running the interface of the target service.
[0117] When it is determined that the extracted business features conform to the standard feature format of the interface of the target service and the extracted business feature information is complete, at this time, the extracted business features can be directly transmitted to the interface of the target service. After the interface of the target service obtains the business features, the corresponding service can be implemented in the service system.
[0118] S310: Convert the extracted business features into business features that conform to the standard feature format.
[0119] When it is determined that the extracted business features do not conform to the standard feature format of the interface of the target business, the extracted business features need to be first converted into the standard feature format of the interface of the target business, and after it is determined that the business features have been converted into the standard feature format of the target business interface, the business features can be passed to the interface of the target business to ensure the smooth execution of the target business in the business system.
[0120] In the format conversion of business features, for some data formats, conversion can be performed. For example: convert xx year xx month xx day to xxxx.xx.xx. For some other data formats, specifically those that require format conversion with reference to the current environment information, the current environment information needs to be obtained first, and then the format conversion is performed based on the obtained current environment information.
[0121] In some embodiments, the data feature information that requires format conversion based on the current environment information can be stored in advance. After it is determined that the business features need to be converted, it can be first determined whether the business features conform to the data feature information. If they conform, it means that the business features need to be format-converted with reference to the current environment information, and then the current environment information is obtained, and the business features are format-converted based on the obtained current environment information. If they do not conform, it means that the business features do not need to be format-converted with reference to the current environment information, and then the business features are format-converted according to the standard feature format.
[0122] In practical applications, the pre-stored data feature information may include, but is not limited to:... days,... months, going out, etc. For example: when the business feature is three days, "three days" matches "... days", and then the current date is obtained, and based on the current date and three days, a new deadline is generated, that is, xx year xx month xx day - xx year xx month xx day. Another example: when the business feature is going out, "going out" of the business feature matches "going out" in the stored data feature information, and then the current location is obtained, and a location is generated based on the current location.
[0123] Specifically, step S310 may further include:
[0124] S310a: Determine whether the standard feature format is related to the changing environment. If so, execute S310b; if not, execute S310c.
[0125] Generally speaking, the number of business feature formats related to the changing environment is limited, and the limited business feature formats related to the changing environment can be pre-stored in the intelligent system. After the intelligent system obtains the standard feature format of the target business interface, it can match the standard business feature format with the pre-stored business feature formats related to the changing environment. If the match is successful, it is determined that the standard feature format of the target business interface is related to the environmental change. If the match fails, it is determined that the standard feature format of the target business interface is not related to the environmental change.
[0126] In practical applications, the business feature formats related to the changing environment may include, but are not limited to: xx year xx month xx day - xx year xx month xx day, location information, and so on.
[0127] S310b: Obtain the current environmental information, and generate the business features in the standard feature format based on the current environmental information and the extracted business features.
[0128] When it is determined that the standard feature format of the target business interface is related to the changing environment, and in the case where the extracted business features do not conform to the standard feature format of the target business interface, it is necessary to first obtain the current environmental information, and then process the extracted business features into business features that conform to the standard feature format of the target business interface based on the obtained current environmental information, so as to transfer the converted business features to the target business interface to implement the target business in the business system.
[0129] Taking the current environmental information as time as an example, assuming the expected content is "I want to take three days off", the recognized intention is "take time off", and the extracted business feature is "three days". For the time-off business, the standard feature format of the time-off business interface is "xx year xx month xx day - xx year xx month xx day". At this time, obtain the current environmental information, for example: March 1, 2025, and then generate the standard feature format of the time-off business interface "March 01, 25 - March 03, 25" based on "three days". Then transfer "March 01, 25 - March 03, 25" as the business feature to the time-off business interface, so as to complete the user's time-off in the business system.
[0130] S310c: Convert the extracted business features into business features that conform to the standard feature format.
[0131] When it is determined that the standard feature format of the target business interface is not related to the changing environment, and in the case where the extracted business features do not conform to the standard feature format of the target business interface, just convert the extracted business features according to the standard feature format of the target business interface, so as to transfer the converted business features to the target business interface to implement the target business in the business system.
[0132] In addition, after the intelligent system receives the expected content and before the business system finishes executing the target business, if an error occurs in the data processing during this period and a feedback message indicating an exception is received, the intelligent system can match the feedback message of the exception with a pre-configured solution, and then use the matched solution to solve the problem. Alternatively, the feedback message of the exception can also be input into the large language model to obtain a solution through the large language model to solve the problem, so that the intelligent system can automatically recover from the exception and improve the robustness of the intelligent system.
[0133] So far, the business execution method provided in the embodiments of this application has been fully described.
[0134] Based on the same inventive concept, as an implementation of the above method, the embodiments of this application also provide a business execution device.
[0135] This business execution device is applied to an intelligent system. The intelligent system is docked with the business system.
[0136] Figure 4 For the structural schematic of the business execution device in the embodiments of this application Figure 1 , see Figure 4 As shown, the device may include:
[0137] A first acquisition module 41, configured to acquire the expected content input by the user.
[0138] A second acquisition module 42, configured to acquire the intent corresponding to the expected content through the large language model.
[0139] An extraction module 43, configured to extract business features from the expected content based on the intent.
[0140] An invocation execution module 44, configured to, among the interfaces corresponding to multiple services in the business system, invoke the interface of the target service corresponding to the intent, and transmit the extracted business features to the interface of the target service, so as to execute the operation corresponding to the expected content in the business system by running the interface of the target service.
[0141] Furthermore, as a refinement and extension of the Figure 4 device shown, the embodiments of this application also provide a business execution device.
[0142] Figure 5 For the structural schematic of the business execution device in the embodiments of this application Figure 2 , see Figure 5 As shown, the device may include:
[0143] A first acquisition module 51, configured to acquire the expected content input by the user.
[0144] In the case where the number of large language models is multiple, the second acquisition module 52 is configured to process the expected content in a preset order using multiple large language models to obtain the intent corresponding to the expected content.
[0145] Specifically, the second acquisition module 52 is configured to input the expected content into the first large language model. For every two adjacent large language models, the intent recognition result output by the previous large language model with a higher sort order and the expected content are input into the next large language model with a lower sort order to obtain the intent recognition result output by the last large language model. Based on the intent recognition result output by the last large language model, the intent corresponding to the expected content is obtained.
[0146] Specifically, the second acquisition module 52 includes: a first processing unit 521, a second processing unit 522, and an intent determination unit 523.
[0147] The first processing unit 521 is configured to input the expected content into the first large language model in terms of sort order to obtain the intent recognition result output by the first large language model in terms of sort order.
[0148] The second processing unit 522 is configured to input the intent recognition result output by the first large language model in terms of sort order and the expected content into the second large language model in terms of sort order to obtain the intent recognition result output by the second large language model in terms of sort order until the intent recognition result output by the last large language model is obtained.
[0149] The second processing unit 522 is further configured to, by analogy, for every two adjacent large language models, input the intent recognition result output by the previous large language model with a higher sort order and the expected content into the next large language model with a lower sort order until the intent recognition result is output by the last large language model.
[0150] In the case where the intent recognition result includes multiple intents and the confidence levels corresponding to each intent among the multiple intents, and the number of large language models is two, the second processing unit 522 is specifically configured to input the multiple intents output by the first large language model in terms of sort order and the expected content into the second large language model in terms of sort order to obtain the multiple intents output by the second large language model in terms of sort order and the confidence levels corresponding to each intent among the multiple intents.
[0151] The intent determination unit 523 is configured to determine the intent corresponding to the expected content based on the intent recognition result output by the last large language model.
[0152] An extraction module 53 is used to obtain all the feature identifiers corresponding to the intent. If it is determined based on all the feature identifiers that there are missing features in the expected content, it outputs supplementary prompt information corresponding to the missing features, and then extracts business features from the content fed back based on the supplementary prompt information and the expected content according to all the feature identifiers. If it is determined based on all the feature identifiers that there are no missing features in the expected content, it extracts business features from the expected content according to all the feature identifiers.
[0153] The call execution module 54 is called, including: a call unit 541, a conversion unit 542, and an execution unit 543.
[0154] The call unit 541 is used to call the interface of the target service corresponding to the intent among the interfaces of multiple services in the service system.
[0155] The conversion unit 542 is used to convert the extracted business features into business features that conform to the standard feature format if the extracted business features do not conform to the standard feature format of the interface of the target service. If the extracted business features conform to the standard feature format of the interface of the target service, it enters the execution unit 543.
[0156] The conversion unit 542 is used to obtain the current environment information if the standard feature format is related to the changing environment, and generate business features in the standard feature format based on the current environment information and the extracted business features. If the standard feature format is not related to the changing environment, it converts the extracted business features into business features that conform to the standard feature format.
[0157] The execution unit 543 is used to transfer the extracted business features to the interface of the target service, so as to execute the operation corresponding to the expected content in the service system by running the interface of the target service.
[0158] It should be noted here that the description of the above device embodiments is similar to the description of the above method embodiments and has similar beneficial effects to the method embodiments. For the technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0159] Based on the same inventive concept, the embodiments of the present application also provide an electronic device.
[0160] Figure 6 For the structural schematic diagram of the electronic device in the embodiments of the present application, see Figure 6 As shown, the electronic device may include: a processor 61, a memory 62, and a bus 63. The processor 61 and the memory 62 communicate with each other through the bus 63. The processor 61 is used to call program instructions in the memory 62 to execute the methods in the above one or more embodiments.
[0161] It should be noted here that the description of the above embodiments of the electronic device is similar to the description of the above method embodiments, and has beneficial effects similar to those of the method embodiments. For the technical details not disclosed in the embodiments of the electronic device of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0162] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, which may include: a stored program that controls the device where the storage medium is located to execute the method in the above one or more embodiments when the program runs.
[0163] It should be noted here that the description of the above embodiments of the computer-readable storage medium is similar to the description of the above method embodiments, and has beneficial effects similar to those of the method embodiments. For the technical details not disclosed in the embodiments of the computer-readable storage medium of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0164] Based on the same inventive concept, an embodiment of the present application further provides a computer program product, which includes a computer program or instruction that, when executed by the device where it is located, implements the method in the above one or more embodiments.
[0165] It should be noted here that the description of the above embodiments of the computer program product is similar to the description of the above method embodiments, and has beneficial effects similar to those of the method embodiments. For the technical details not disclosed in the embodiments of the computer program product of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0166] As described above, the above are only the specific implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A service execution method, characterized in that: The method is applied to an intelligent system, and the intelligent system is connected to a business system. The method includes: Get the expected content entered by the user; Acquire the intent corresponding to the desired content through a large language model; extracting business features from the desired content based on the intent; Among the interfaces corresponding to multiple businesses in the business system, the interface of the target business corresponding to the intention is called, and the extracted business features are passed to the interface of the target business, so as to implement the operation corresponding to the expected content in the business system by running the interface of the target business.
2. The method according to claim 1, characterized in that There are multiple large language models, and obtaining the intent corresponding to the expected content through the large language model includes: The desired content is processed using the multiple large language models in a preset order to obtain the intent corresponding to the desired content.
3. The method according to claim 2, characterized in that The using the multiple large language models to process the expected content in a preset order to obtain the intent corresponding to the expected content includes: Input the expected content into the first large language model. For each two adjacent large language models, input the intention recognition result output by the previous large language model and the expected content into the next large language model, obtain the intention recognition result output by the last large language model, and obtain the intention corresponding to the expected content based on the intention recognition result output by the last large language model.
4. The method according to claim 2 or 3, characterized in that: The using the multiple large language models to process the expected content in a preset order to obtain the intent corresponding to the expected content includes: Inputting the expected content into the first-ranked large language model to obtain an intent recognition result output by the first-ranked large language model; Inputting the intent recognition result output by the first-ranked large language model and the expected content into the second-ranked large language model to obtain the intent recognition result output by the second-ranked large language model; Similarly, for each two adjacent large language models, the intent recognition result output by the previous large language model in the previous order and the expected content are input into the next large language model in the next order, until the last large language model outputs the intent recognition result; The intent corresponding to the expected content is determined based on the intent recognition result output by the last large language model.
5. The method according to claim 4, characterized in that The intention recognition result includes multiple intentions and confidences corresponding to each of the multiple intentions; for each of the two adjacent large language models, the intention recognition result output by the previous large language model in the previous order and the expected content are input into the next large language model in the next order until the last large language model outputs the intention recognition result, including: For every two adjacent large language models, the multiple intents and the expected content output by the previous large language model that is sorted in front are input into the next large language model that is sorted in the back, until the last large language model outputs multiple intents and the confidence corresponding to each of the multiple intents.
6. The method according to any one of claims 1 to 5, characterized in that The extracting a service feature from the desired content based on the intention includes: Obtain all feature identifiers corresponding to the intent; If it is determined based on all the feature identifiers that there are missing features in the expected content, outputting supplementary prompt information corresponding to the missing features, and then extracting business features from the content fed back based on the supplementary prompt information and the expected content according to all the feature identifiers; If it is determined based on all the feature identifiers that there is no missing feature in the expected content, business features are extracted from the expected content according to all the feature identifiers.
7. The method according to any one of claims 1 to 5, characterized in that Before delivering the extracted service features to the interface of the target service, the method further includes: If the extracted service feature does not conform to the standard feature format of the interface of the target service, converting the extracted service feature into a service feature conforming to the standard feature format; If the extracted service features conform to the standard feature format of the interface of the target service, the step of transferring the extracted service features to the interface of the target service is performed.
8. The method according to claim 7, characterized in that The step of converting the extracted service features into service features conforming to the standard feature format comprises: If the standard feature format is related to the changing environment, obtaining current environment information, and generating a service feature in the standard feature format based on the current environment information and the extracted service feature; If the standard feature format is not relevant to the changed environment, the step of converting the extracted service features into service features conforming to the standard feature format is performed.
9. A service execution device, characterized in that: The device is applied to an intelligent system, the intelligent system is connected to a business system, and the device includes: A first acquisition module, used to acquire desired content input by a user; A second acquisition module, used for acquiring the intent corresponding to the desired content through a large language model; An extraction module, configured to extract service features from the desired content based on the intent; A calling execution module is used to call the interface of the target business corresponding to the intention among the interfaces corresponding to multiple businesses in the business system, and pass the extracted business features to the interface of the target business, so as to implement the operation corresponding to the expected content in the business system by running the interface of the target business.
10. An electronic device, characterized in that: The electronic device comprises: a processor, a memory, and a bus; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the method as claimed in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises: a stored program; wherein, when the program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 8.