Method, device and equipment for carrying out business operation by utilizing large language model and medium

Through the large language model, business object management is realized in the business support system, the problem of business object management in complex BSS is solved, operation difficulty and cost is reduced, automation and intelligence is improved, and user experience and efficiency are improved.

CN118939346APending Publication Date: 2024-11-12ASIAINFO TECH CHINA INC
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410914944.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the prior art, the lack of complete business object management methods in complex business support systems (BSSs), resulting in high technical thresholds, complex operation, low degree of automation, insufficient intelligent support and high delivery costs.

Method used

Use the large language model (LLM) to perform business operations, receive business operation requests, generate call prompt words, and use the background general API to call the client API of the database or business platform to realize the full process automation from background API design to data display. It reduces the operation difficulty of non-technical personnel and improves efficiency and accuracy.

Benefits of technology

It realizes business object management with low technical threshold, simple operation process, high interactiveness, full process automation and low delivery costs, improves the intelligence and user experience of the system, and reduces the consumption of manpower and time resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939346A_ABST
    Figure CN118939346A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for performing business operation by using a large language model and a storage medium, and relates to the field of artificial intelligence and the field of software development. The method comprises the following steps: a large language model LLM receives a service operation request, wherein the service operation request is used for triggering a service operation on an object; the LLM generates a calling prompt word according to the service operation request and a predefined service prompt word, and the service prompt word is used for guiding the LLM to generate a feedback result; calling a corresponding background universal application program interface (API) by utilizing the calling prompt word, and configuring parameters of the background universal API; and calling a client API of a corresponding database and / or a client API of a corresponding service platform through the background universal API so as to complete the service operation. According to the scheme, complete business object management is achieved through the LLM, and the scheme has the advantages of being intelligent, high in automation degree, low in use cost and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, electronic device and storage medium for performing business operations using a large language model. Background Art

[0002] A large language model (LLM) is a language model consisting of an artificial neural network with many parameters (up to billions of weights or more) trained on a large amount of unlabeled text using self-supervised learning or semi-supervised learning. LLM is able to understand and generate human language by processing large amounts of text data, thereby performing a variety of natural language processing tasks.

[0003] Business object management includes business operations on business objects. Business object management is the core of the industry business support system (BSS). In the prior art, LLM is generally used to assist in the generation of BSS-related codes, but there is no implementation method for complete business object management through business operations in a complex BSS. Summary of the invention

[0004] In order to solve the above-mentioned technical problems existing in the prior art, the present application provides a method, device, electronic device and storage medium for performing business operations using a large language model, which completes business operations using LLM and thereby realizes business object management. The solution also has the characteristics of intelligence, high degree of automation and low cost of use.

[0005] In a first aspect, the present application provides a method for performing business operations using a large language model, the method comprising: the large language model LLM receives a business operation request, the business operation request is used to trigger a business operation on an object; the LLM generates a call prompt word based on the business operation request and a predefined business prompt word, wherein the business prompt word is used to guide the LLM to generate feedback results; the call prompt word is used to call the corresponding background general application program interface API and configure the parameters of the background general API; the client API of the corresponding database and / or the client API of the corresponding business platform are called through the background general API to complete the business operation.

[0006] In the solution provided by this application, the whole process automation from background API design, business prompt word design to database operation and data display is realized. The background general API calls the client API provided by the database (or other persistent format), or the general API provided by the business platform. Therefore, the background general API is decoupled from the actual business implementation, and there is no need to design and implement the background general API for each business separately, which can save a lot of manpower and time resources, and also avoid a lot of maintenance work caused by subsequent business changes. This solution uses LLM to understand natural language and convert it into the ability of background general API calls, which greatly reduces the difficulty for non-technical personnel to perform complex business operations, simplifies the operation process of non-technical personnel, and reduces the technical background requirements for users. At the same time, it improves the efficiency and accuracy of the operation; further, the solution can dynamically generate call prompt words based on predefined business prompt words, context and user intentions to accurately call the background general API, which improves the intelligence of the system and user experience.

[0007] In a possible implementation, the LLM generates a call prompt word according to the business operation request and a predefined business prompt word, specifically including: the LLM calls a first background general API at the beginning of a session, and the first background general API is used to query a database schema; the LLM parses the content in the business operation request; the LLM generates the call prompt word according to the parsing result, the business prompt word and the schema.

[0008] In a possible implementation, a call prompt word is used to call a corresponding background general application program interface API and configure the parameters of the background general API, specifically including: LLM uses the Open API specification of the background general API to identify the background general API corresponding to the call prompt word; LLM uses the Open API specification of the background general API and the parameters carried in the business operation request to configure the parameters of the background general API.

[0009] In one possible implementation, after completing the business operation by calling the client API of the corresponding database and / or the client API of the corresponding business platform through the background general API, the method also includes: the background general API obtains indication information fed back by the client API of the database and / or the client API of the corresponding business platform, and the indication information is used to indicate the processing result of the business operation; LLM feeds back the processing result of the business operation to the user according to the indication information obtained by the background general API.

[0010] In a possible implementation, before the large language model LLM receives a business operation request, the method further includes: designing an Open API specification for a background general API, wherein the Open API specification for the background general API includes a host uniform resource locator URL, a path, input and output parameters, and also includes a Schema definition including one or more contents such as an API endpoint, operation, parameter, response, and security.

[0011] In a possible implementation, before the large language model LLM receives a business operation request, the method further includes: designing business prompt words of the LLM, the business prompt words including prompt words corresponding to business parameters and prompt words corresponding to business operations, wherein the business parameters include one or more of the following: field names, operators and conditional values, and the business operations include one or more of the following: generating data, inserting data, modifying data, deleting data, table design, graph design, and querying data.

[0012] In a possible implementation, the background general API includes at least one of the following: a first type of API and a second type of API, wherein the first type of API includes a data definition language DDL type API, and the second type of API includes a data manipulation language DML type API and a data query language DQL type API.

[0013] In the second aspect, the present application also provides a device for performing business operations using a large language model, the device comprising a receiving unit, a generating unit, a configuring unit and a calling unit. The receiving unit is used for the large language model LLM to receive a business operation request, the business operation request is used to trigger a business operation on an object; the generating unit is used for the LLM to generate a calling prompt word according to the business operation request and a predefined business prompt word, wherein the business prompt word is used to guide the LLM to generate a feedback result; the configuring unit is used to use the calling prompt word to call the corresponding background general application program interface API and configure the parameters of the background general API; the calling unit is used to call the client API of the corresponding database and / or the client API of the corresponding business platform through the background general API to complete the business operation.

[0014] In a third aspect, the present application also provides an electronic device, which is used to run a program, and when the program is running, it executes the above first aspect, as well as the method for performing business operations using a large language model provided by any implementation of the first aspect.

[0015] In a fourth aspect, the present application also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the above first aspect, as well as the method for performing business operations using a large language model provided by any implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a method for performing business operations using a large language model provided in an embodiment of the present application;

[0017] Figure 2 A schematic diagram of a business system provided in an embodiment of the present application;

[0018] Figure 3 A flowchart of another method for performing business operations using a large language model provided in an embodiment of the present application;

[0019] Figure 4 A flowchart of another method for performing business operations using a large language model provided in an embodiment of the present application;

[0020] Figure 5 A schematic diagram of the relationship between prices and discounts corresponding to different product pricing IDs provided in the embodiment of the present application;

[0021] Figure 6 A schematic diagram of a device for performing business operations using a large language model provided in an embodiment of the present application;

[0022] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to more clearly understand the present application scheme, the application scenario of the present application technical scheme is first described below.

[0024] In the embodiment of the present application, the business object managed by LLM can be an item, such as a communication industry product, or a person, such as an employee, a student, a patient, etc., which is not specifically limited in the embodiment of the present application. For the convenience of explanation, the following embodiment is described by taking the communication industry product as an example.

[0025] Product management in the communications industry is the core of the business support system (BSS) of the communications industry. From product sales to product billing and charging, everything depends on product configuration data. Through product management, configuration data can be added, deleted, modified, and searched. Product management in the communications industry can achieve the following functions: product information configuration, product tariff configuration, product discount configuration, product release, product change, product delisting, etc.

[0026] Currently, product management in the communications industry mainly relies on manual operations, such as adding, deleting, modifying, and checking product data through the product management page. Since the product structure includes a series of complex contents such as product composition, product tariffs, preferential information, and sales conditions, the traditional implementation method needs to rely on technical personnel who are very familiar with product models, product tariffs, etc. to manually complete the product configuration work, which means that there are at least the following difficulties in the current product management solution:

[0027] The technical threshold is high. Existing solutions often require users to have a certain technical background, such as being familiar with specific databases and programming languages, which is a significant obstacle for non-technical users.

[0028] The operation is complex. When traditional solutions are used to manage business objects, the business operation process involves multiple steps, which often require manual writing and execution of code or queries. The operation is cumbersome and prone to errors.

[0029] Poor interactivity. Most existing solutions lack effective interaction mechanisms and cannot dynamically adjust operation instructions based on real-time user input, resulting in poor user experience.

[0030] Low level of automation. Although some solutions provide automation tools, they are usually limited to specific links, such as data query, and do not support full process automation from database design to data presentation.

[0031] Insufficient intelligent support. Existing technologies still lack sufficient intelligent support in terms of understanding natural language instructions, dynamically generating operation prompts, and adaptive optimization.

[0032] The delivery cost is high, requiring a large number of designers and developers to manually design and code, and frequent maintenance is required when business changes frequently, resulting in high system delivery costs.

[0033] Therefore, how to use artificial intelligence (AI) to achieve or assist in achieving efficient, highly operable, and low-cost object management is a problem that needs to be solved urgently.

[0034] In order to solve the above problems, the present application provides a method, device, electronic device and storage medium for business operations using a large language model. The solution utilizes the natural language processing capabilities of LLM, and through the support of the background general application programming interface (API), it can quickly complete the design and establishment of the business database, and interact with the business database or other background APIs in natural language to realize the configuration of business object data. The solution has the characteristics of low technical threshold, simple operation process, high interactivity, full process automation and low delivery cost.

[0035] In order to enable persons skilled in the art to more clearly understand the solution of the present application, the technical solution in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0036] The terms "first", "second", etc. in the description of this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0037] The embodiment of the present application provides a method for performing business operations using a large language model, which is described in detail below with reference to the accompanying drawings.

[0038] See also Figure 1 , which is a flow chart of a method for performing business operations using a large language model provided in an embodiment of the present application.

[0039] The method comprises the following steps:

[0040] S11: LLM receives a service operation request.

[0041] See also Figure 2 , which is a schematic diagram of the business system provided in an embodiment of the present application.

[0042] The embodiments of the present application do not limit the specific category and model architecture of LLM. For example, LLM may be a generative pre-trained transformers (GPT) based on transformers.

[0043] The business operation request is used to trigger the business operation on the object. The embodiment of the present application does not specifically limit the type of business operation, for example, it can be an operation of querying, modifying, deleting data, or requesting the generation of graphs / charts / related texts, etc. The business operation request in the embodiment of the present application can be regarded as a prompt provided by the user to the LLM, and the business operation request can be a question, a description, a task description, or a part of the history record of the conversation.

[0044] S12: LLM generates a call prompt word according to the business operation request and a predefined business prompt word.

[0045] Business prompt words are defined in advance for the LLM design, and the business prompt words are used to guide the LLM to generate feedback results.

[0046] The service prompt word is combined with the service operation request input by the user to generate a call prompt word for the user to call the API.

[0047] In a possible implementation manner, the predefined service prompt words may include prompt words corresponding to service parameters and prompt words corresponding to service operations.

[0048] The business parameters include one or more of the following: field name, operator, and conditional value, etc.

[0049] Business operations include one or more of the following: generating data, inserting data, modifying data, deleting data, table design, graph design, querying data, etc.

[0050] In a possible implementation, the business operation request input by the user may not strictly comply with the business prompt word specification. In this case, the LLM model can perform natural language processing and semantic recognition on the user input to convert it into a call prompt word that complies with the business prompt word specification.

[0051] For example, in the predefined business prompt words, the field name price corresponds to price, the operator gte corresponds to greater than or equal to, and the condition value is represented by Arabic numerals. If the business operation request entered by the user is "find products with prices greater than or equal to 100", the call prompt word determined by the LLM model based on the business operation request and the business prompt word can be expressed as: pricegte 100. At this time, the background general API called by LLM is the query parameter (query) API to obtain the query parameters and display the query results.

[0052] Specifically, at the beginning of a session, the LLM may call a first background general API, which is used to query a database schema. Then, the LLM parses the content in the business operation request, and generates a call prompt word according to the parsing result, the business prompt word, and the database schema.

[0053] S13: using the call prompt word to call the corresponding background general application program interface API and configure the parameters of the background general API.

[0054] LLM can use the Open API specification of the background general API to identify the background general API corresponding to the call prompt word, and the Open API specification of the background general API can be pre-defined.

[0055] The Open API Specification (OAS) is a universal, programming language-independent API description specification that enables both users and computers to discover and understand the functionality of a service without accessing source code, documentation, or sniffing interfaces. When properly defined, LLM can understand and interact with remote services using minimal implementation logic.

[0056] LLM uses the Open API specification of the background common API and the parameters carried in the business operation request to configure the parameters of the background common API.

[0057] In one possible implementation, the call prompt words are dynamically generated by LLM based on the business prompt words, the context of the user's interaction with LLM, and the user's intention. Therefore, the accuracy of the called background general API can be ensured, and the call of irrelevant or erroneous background general APIs can be avoided, thereby improving the intelligence of the system and user experience.

[0058] S14: Call the client API of the corresponding database and / or the client API of the corresponding business platform through the background general API to complete the business operation.

[0059] Since the background general API calls the client API of the database and / or the client API of the corresponding business platform, that is, the main purpose of the background general API is to accept the parameters input by the foreground and complete the call to the general interface of the database client and / or the business platform client, the implementation of the background general API has nothing to do with the specific business, and the background general API is decoupled from the actual business.

[0060] In summary, the method provided by the embodiment of the present application is used to use LLM to understand natural language and call the background general API. The background general API calls the client API provided by the database (or other persistent format) or the general API provided by the business platform. Therefore, the background general API is decoupled from the actual business implementation, and there is no need to design and implement the background general API for each business separately, which can save a lot of manpower and time resources, and also avoid a lot of maintenance work caused by subsequent business changes. And because of the pre-defined business prompt words, LLM can use business operation requests and business prompt words to generate accurate call prompt words to call the corresponding background general API, which improves the intelligence and user experience of the system. This solution greatly reduces the difficulty of non-technical personnel to perform complex business operations, simplifies the operation process of non-technical personnel, and reduces the technical background requirements of users while improving the efficiency and accuracy of operations. This solution can cover the entire automation process from database design, data entry to data query and display, and has high practicality.

[0061] The following is an explanation in conjunction with a specific implementation method.

[0062] The following first describes the steps of designing and implementing the background general API and designing prompts related to the LLM business in this solution.

[0063] See also Figure 3, which is a flowchart of another method for performing business operations using a large language model provided in an embodiment of the present application.

[0064] The method comprises the following steps:

[0065] S21: Design the background general API.

[0066] An application programming interface (API) is a code provided by a computer operating system or program library for application programs to call and use. It is a computing interface that defines the interaction between multiple software intermediaries, as well as the types of calls or requests that can be made, how to make calls or requests, the data format to be used, the conventions to be followed, etc.

[0067] The background program code of the background general API in the embodiment of the present application calls the client API provided by the database (or other persistent format) or the general API provided by the business platform. The background general API is general and has nothing to do with specific business objects.

[0068] For example, taking database storage as an example, to query data from a table in the database, the provided background general API is similar to the following:

[0069] antdb.from('table name').select('output field')

[0070] Among them, the table name and output field are input parameters that need to be filled in.

[0071] If the user requests to query all fields of a product, the following two parameters are passed in: 'products' and '*'. After the API program replaces the parameters, the actual API call is:

[0072] antdb.from('products').select('*')

[0073] If the user also enters the query conditions, such as querying all the information of the first product, the actual API call is:

[0074] antdb.from('products').select('*').filter('product_id','eq','1')

[0075] The implementation of the database in the above example is only an example, and does not mean that the implementation method of the present application is only a database. For example, there may be other persistence formats.

[0076] In this way, the backend general API and actual business are decoupled, so there is no need to design and implement an API for each business separately. This not only saves a lot of manpower and time resources, but also avoids a lot of maintenance work caused by subsequent business changes.

[0077] The background general API in the embodiment of the present application can interact with the client API of the database and the client API of the business to perform related business operations, such as product configuration, information query, ordering or payment, etc.

[0078] Among them, the background general APIs that interact with the database mainly include the following two categories:

[0079] 1. Data definition language (DDL) class: This class of API can be used to create, modify or delete database tables, and is used to implement the design and optimization of table structures based on natural language.

[0080] 2. Data manipulation language (DML) and data query language (DQL) classes. Through this type of API, the business data in the database table can be added, deleted, modified, and queried, thereby achieving business goals such as product configuration, order placement, and payment.

[0081] The following is an explanation of the design and implementation of the background general API with specific examples.

[0082] In the following embodiments, the functional interface for operating the database is exposed through FastAPI.

[0083] In an example, the background general API for implementing new business data is shown in the following code:

[0084] @app.post(" / api / insert")

[0085]

[0086] In another example, the following code is used to implement the general API for querying business data:

[0087]

[0088] From the above two examples, we can see that the background general API calls the general interface provided by the client of the antdb database. By receiving and merging the parameters entered by the user in the foreground, the configuration of the background general API is completed to replace the call of the database API. Therefore, the implementation of the background general API has nothing to do with the specific business, and there is no need to design and implement it separately for each business.

[0089] S22: Design the Open API specification for the backend general API.

[0090] LLM uses the OAS designed for the background general API to realize the recognition of the background general API, that is, to recognize the background general API corresponding to the call prompt word, and then LLM uses the OAS designed for the background general API and the parameters carried in the business operation request to realize the parameter assembly configuration and call of the background general API.

[0091] The Open API specification is written in YAML or JSON language and is stored in a sub-YAML or JSON file after configuration. When designing OAS, the host uniform resource locator (URL), path, input and output parameters involved in the backend general API are designed in the YAML or JSON file. In addition, the Schema definition containing the API endpoint, operation, parameters, response, and security is also designed.

[0092] A URL is the address of a given unique resource on the Web. Every valid URL points to a unique resource.

[0093] OSA's Schema defines a standardized format for describing the structure and behavior of RESTful APIs, including API endpoints, operations, parameters, responses, and security. Endpoint is a concept in APIs, which refers to the specific access point or URL that an API exposes to external callers.

[0094] The following is an explanation with reference to specific examples.

[0095] In one example, information related to API calls is defined in OAS. The information of the URL where the API is located is shown in the following code:

[0096] "servers":[{"url":"https: / / test.xxxxxxxxx.xxxxxxxx.com"}],

[0097] The specific URL address in the above code is for illustration only and does not constitute a limitation on the technical solution of the present application.

[0098] In another example, the background common API definition for adding new business data is shown in the following code:

[0099]

[0100] The above code indicates the parameter format required to insert business data. In the above example, the Content of the requestBody is defined by the Schema "$ref":"# / components / schemas / insertModel" of the OAS file.

[0101] The complete definition of insertModel is:

[0102]

[0103] The definition mainly includes table (table name) and Data (data), which is consistent with the requirements of the above example.

[0104] S23: Design LLM action operations.

[0105] The action operation allows LLM to consider whether to seek external tools or what external tools to use to assist in completing the task based on needs.

[0106] When designing an action, you can import the APIOAS file content designed in S22 to list, test and confirm the API interface definition in OAS.

[0107] S24: Design LLM business prompt.

[0108] The prompt is the input text or instruction provided to the LLM to guide the model to generate a specific type of response. The business prompt in the embodiment of the present application can be a question, a description, a task description, or a part of the conversation history, etc. By designing and optimizing the business prompt, the model can be guided to generate an expected response or complete a specific task.

[0109] First, configure LLM to prompt LLM to call the first common API to query the database schema at the beginning of each new session. The first common API is a background common API specifically used to query the database schema.

[0110] By querying the database schema, business-related database definition information can be obtained for subsequent natural language operations on the database. For example, when querying or modifying a table, the corresponding products in the natural language are matched to the corresponding real table name, which can correspond to the product table.

[0111] In addition, the input business parameters need to be clearly defined, such as the definition of conditions for query, modification, deletion, etc., so that LLM can clearly understand the meaning of the business prompt. The definition of input business parameters includes but is not limited to the definition of field names, operators, and conditional values.

[0112] The field name refers to the identifier of each column in a two-dimensional table with a relational model as its data structure.

[0113] The operator indicates the nature of the operation that the instruction should perform. The operator may include comparison, bit operation, logical operation and other operators. The operator may also include an operator for indicating a specific function, such as indicating the use of a fuzzy matching function.

[0114] Fuzzy matching is a data matching technique that compares two or more records and calculates the likelihood that they belong to the same entity.

[0115] The condition value refers to the value in the query condition.

[0116] The following example illustrates this.

[0117] For example, if you want to query products with a price greater than 100, the query condition should be defined as follows:

[0118] Define the field name column: such as price.

[0119] The operator operator can prepend the following definitions:

[0120] Equal to: eq; Not equal to: neq; Greater than: gt; Greater than or equal to gte; Less than: lt; Less than or equal to: lte; Fuzzy match: like.

[0121] In this example, you should use greater than: gt

[0122] Condition value criteria: '100' in this example.

[0123] Furthermore, it is necessary to define business operations and clearly define the APIs corresponding to various specific business operations and the requirements for input and output parameters. For example, clearly define the APIs corresponding to operations such as inserting data, modifying data, and deleting data, as well as the requirements for the corresponding input and output parameters.

[0124] Define the business prompt of the business operation in LLM so that after receiving the user's request, LLM organizes the parameters and calls the relevant background general API to perform the business operation.

[0125] In an example, the example of business prompt words for adding new business data is used for explanation. When the user requests to insert data, it is necessary to determine whether the user enters the table name. If the user does not enter the table name, it is necessary to prompt the user to enter the table name. At this time, according to the queried table structure, the LLM dialog box prompts the user to enter the corresponding value and converts the user's input into parameters in the following format.

[0126]

[0127] Among them, table is the table name, data is the JSON object corresponding to the value, and JavaScript Object Notation (JSON) is a syntax used to represent structured data as a standard format for JavaScript objects. It is used to serialize objects, arrays, numbers, strings, Boolean values, and null.

[0128] Then you can further call / api / insert (insert parameters) to insert data and display the operation results.

[0129] In another example, a business prompt word example of querying business data is used as an example for explanation.

[0130] When the user requests to query data from a table but does not enter the table name, the LLM model will prompt the user to enter the table name in the dialog. If the user does not specify the output field list, a preset character, such as "*", can be used as the content of the select. The query condition is a list of fields and values. When the user enters multiple conditions, the multiple conditions can be in an "and" relationship, that is, the multiple conditions can be connected by "and"; or, the multiple conditions can be in an "or" relationship, that is, the multiple conditions can be connected by "or"; or, other relationships between multiple conditions can be further defined, which will not be repeated in the embodiments of this application.

[0131] If the user enters an output field list and one or more other query conditions, the user's requirements need to be converted into parameters in the following format:

[0132] {

[0133] "table":"",

[0134] "select":"",

[0135] "conditions":"{}"

[0136] }

[0137] Among them, table is the table name, select is the selected output field list, and condition is the user's input condition.

[0138] After the user's specific input conditions and the output field list selected by the user are filled into the business prompt word, a call prompt word is generated. Then the call prompt word is used to further call / api / query (insert parameters) to query data and display the operation results.

[0139] The calling prompt for calling the background general API in the embodiment of the present application is dynamically generated by LLM based on the business prompt, the context of the user's interaction with LLM, and the user's intention. Therefore, the accuracy of the called background general API can be ensured, thereby improving the intelligence of the system and user experience.

[0140] S25: Use natural language to conduct business operation testing.

[0141] After completing the design of the background general API and the design of the LLM business prompt, the business operation test can be performed using natural language. The natural language can be in the form of text input or voice input, and the embodiment of the present application does not specifically limit it.

[0142] By using natural speech to design tables, add new business data, modify business data, delete business data, search business data, and perform statistics, analysis, and graphical display of business data, test whether the system can work normally. If there is a problem, modify the API, OAS, prompt, etc. according to the problem and then retest until the problem is eliminated.

[0143] The business system in the embodiment of the present application can be set up independently, or as a functional module of the business support system. The business system mainly includes LLM and related background general API.

[0144] S26: Use LLM to perform business operations.

[0145] When the business system passes the test in S25, the corresponding business operations can be performed using natural speech. It should be noted that after the application phase, the form of natural language needs to be as similar as that in the test phase, such as text input or voice input. Also, the form of business operations needs to be the same as that in the test phase, for example, the business in the application phase is also table design, adding business data, modifying business data, deleting business data, searching business data, statistics, analysis, and graphical display of business data.

[0146] The above embodiments illustrate the steps of designing and implementing a general background API and designing prompts related to LLM business. The following describes the process of business operations in actual applications.

[0147] See also Figure 4 , which is a flowchart of another method for performing business operations using a large language model provided in an embodiment of the present application.

[0148] Figure 4 Some examples of interactions between users and LLM, backend general API, database or other business clients are illustrated. In the embodiment of the present application, the object is a product as an example for explanation, and the operation request input by the user in the LLM model is generally a business operation request.

[0149] The method comprises the following steps:

[0150] S31: The user inputs a first business operation request in the dialog box of the LLM.

[0151] A dialog box (also called a message box or prompt box) is a special window in a graphical user interface that is used to display information to a user. In the embodiment of the present application, the first business operation is not specifically limited. In the following description, the first business operation is to create a product table as an example, and the first operation business request is a request to create a table.

[0152] A request to create a table can request to create one or more tables, as shown below.

[0153] In one example, the user enters the following text in the LLM dialog:

[0154] Please create a product table, a product pricing table, and a product pricing discount table. A product has one or more pricings, and a pricing has zero or more product pricing discounts. The product pricing discount table includes discount conditions (conditions), discount actions (actions), and discount types (discounts or exemptions). Discount conditions are a combination of multiple conditional expressions that ultimately evaluate to true or false. Discount actions are to set the discount rate or exemption value for the pricing.

[0155] S32: After receiving the first operation request from the user, the LLM dialog sends a background general API call request to the LLM action engine.

[0156] LLM can accept business operation requests input by users, combine predefined prompt instructions and variables in the current environment, and synthesize the final prompt instruction to call the background general API.

[0157] The variables in the environment may include some parameters used to specify the operating environment of the operating system, such as temporary folder location and system folder location, etc.; they may also include some environmental parameters that affect object parameters, which may be variable, such as time, exchange rate, etc. Combining the variables in the environment can improve the accuracy of prompt calling the background general API. In actual applications, it is also possible not to combine the variables in the environment to shorten the response time.

[0158] The request sent by the LLM dialog to the LLM action engine can indicate that the background general API needs to be called to create a product table, which can be expressed as:

[0159] / API / createTable('Products').

[0160] The API in the request indicates that the current operation request needs to call the background common API, and createTable('Products') indicates that the business operation is to create a product table.

[0161] S33: The LLM action engine determines the corresponding background general API and requests the corresponding background general API to create a product table.

[0162] The designed APIOAS file content has been imported into the LLM action engine, so it can correctly identify the specific background general API that needs to be called at this time, thereby achieving accurate matching.

[0163] After the LLM action engine determines the corresponding background general API, it requests the background general API to create a product table.

[0164] S34: The backend general API calls the database or other business clients to request a business operation of creating a product table.

[0165] After the background general API merges the user input information, it calls the database client API to access the database and call data. It can also call the client API of other businesses to access and call data for clients of other businesses, and then request the business operation of creating a product table.

[0166] Continuing with the example in S31, the backend general API will request the database or other business clients to create the following three tables:

[0167] Products table;

[0168] Product pricing table Product_pricing;

[0169] Product pricing discounts table Product_pricing_discounts;

[0170] S35: The database or other service client returns the first indication information that the product table is created.

[0171] The backend general API can obtain the indication information fed back by the client API of the database and / or the client API of the corresponding business platform, and the indication information is used to indicate the processing result of the business operation. Thereafter, the LLM can feed back the processing result of the business operation to the user according to the indication information obtained by the backend general API. The processing result can indicate that the business operation has been completed, or carry specific data information. Among them, the data information can be the user's data query result.

[0172] In this example, when the database or other business client completes the business operation of creating the corresponding product table, indication information indicating that the creation of the product table is completed is returned.

[0173] The indication information is returned by the database or other business client to the background general API, and can be called the first indication information.

[0174] S36: The background general API returns the second indication information that the table creation is completed to the LLM action engine.

[0175] S37: The LLM action engine returns the third indication information indicating that the table creation is completed to the LLM dialog.

[0176] The first indication information, the second indication information and the third indication information indicate the same content, but are distinguished because the sending end and the receiving end of the information are different.

[0177] S38: The LLM dialog feedback product table has been created.

[0178] At this time, the LLM dialog can show that the product table has been created, which means that the first business operation request has been completed.

[0179] S39: The user makes a second service operation request in the LLM dialog.

[0180] After the above product table creation is completed, the user can continue to make a second business operation request. For example, the second business operation request can be a request to create a test data in the product table, that is, a request to add data.

[0181] In one example, the user enters the following text in the LLM dialog:

[0182] Please design the test data related to these tables and insert them into the corresponding tables. The test data should be as close to the actual situation as possible. You can design several more product pricing data. Different product pricing data can have different product pricing discount data, involving some exemption types and discount types. The exemption type is the amount of direct exemption. The discount is the proportion of the discount.

[0183] S40: After receiving the second operation request from the user, the LLM dialog sends a background general API call request to the LLM action engine.

[0184] The request sent by the LLM dialog to the LLM action engine can indicate that the background general API needs to be called to insert product test data, which can be expressed as:

[0185] / API / insert.

[0186] The API in the request indicates that the current operation request needs to call the background general API, and insert indicates that the business operation is to create test data.

[0187] S41: The LLM action engine determines the corresponding background general API and requests the corresponding background general API to insert test data.

[0188] After the LLM action engine determines the corresponding background general API, it requests the background general API to create test data. It is understandable that the background general API determined in S41 is not the same as the background general API determined in S33.

[0189] S42: The backend general API calls the database or other business clients to request a business operation of inserting test data.

[0190] After the background general API merges the user input information, it calls the database client API to access the database and call data. It can also call the client API of other businesses to access and call data of other business clients, and then request the business operation of creating test data.

[0191] Continuing with the example in S39, the backend general API will request the database or other business clients to create the following three tables:

[0192] Table 1: Products

[0193] id int4 name varchar description text 1 Laptop Pro 15 High performance laptop with 16GB RAM, 1TB SSD. 2 Smartphone Ultra Flagship smartphone with 128GB storage, 48MP camera.

[0194] In Table 1, int4 means that the length of id is 4 bytes and id is integer data. varchar means that name is character data. text is the description text of the product corresponding to id.

[0195] Table 2: Product pricing table Product_pricing

[0196] id int4 product_id int4 price numeric currency varchar 1 1 1500 USD 2 1 1400 USD 3 2 800 USD

[0197] The currency in Table 2 is a currency type. In the database, numeric is an exact numeric data type used to store exact values, including integers and decimals.

[0198] Table 3: Product pricing discounts table Product_pricing_discounts

[0199] id int4 pricing_id int4 condition text action text discount_type varchar 1 1 Buy 1get 10% off 10% Discount 2 2 Buy 2get$100off $100 Relief

[0200] Condition records the preferential conditions that trigger the discount, action is the preferential action, and discount_type is the preferential type.

[0201] S43: The database or other service client returns fourth indication information indicating that the test data insertion is completed.

[0202] When the database or other business client completes the business operation of creating the corresponding test data, an indication message indicating that the test data creation is completed is returned.

[0203] The indication information is returned by the database or other business client to the background general API, and can be called the fourth indication information.

[0204] S44: The background general API returns fifth indication information indicating that the test data insertion is completed to the LLM action engine.

[0205] S45: The LLM action engine returns sixth indication information indicating that the test data insertion is completed to the LLM dialog.

[0206] The fourth indication information, the fifth indication information and the sixth indication information indicate the same content, but are distinguished because the sending end and the receiving end of the information are different.

[0207] S46: The LLM dialog feeds back that the test data has been inserted, and feeds back the inserted test data.

[0208] The three tables after adding the test data in S42 may be displayed in the LLM dialog or not, which is not specifically limited in the embodiment of the present application. In one possible implementation, the above tables and data are stored in a corresponding database after being generated.

[0209] After that, users can use LLM to query product-related table data. The following examples illustrate this.

[0210] In an example, the user enters "Query the first product" in the LLM dialog. At this time, the results obtained by LLM through the query interface of the background general API are shown as follows:

[0211] The query results show that the detailed information of the first product is as follows:

[0212] ID:1

[0213] Name:Laptop Pro 15

[0214] Description: High performance laptop with 16GB RAM, 1TB SSD.

[0215] This indicates that the first product in the database is a high-performance laptop called "Laptop Pro 15" equipped with 16GB of RAM and 1TB of SSD storage.

[0216] Furthermore, the user requests the display of product details of product-related data through LLM. At this time, the user can enter "Query all the information of the first product, including the basic information, pricing and discount of the product. Based on the above information, please generate the product details of the product for recommending products to customers." in the LLM dialog.

[0217] At this point, the product details information generated by LLM is as follows:

[0218] Product recommendation: Laptop Pro 15

[0219] Product Description: Laptop Pro 15 is a high-performance laptop designed for users who pursue outstanding performance. It is equipped with 16GB of RAM and a 1TB solid-state drive (SSD), ensuring ultra-fast data processing speed and a large amount of storage space. Whether it is handling complex computing tasks, HD video editing, or heavyweight games, Laptop Pro 15 can easily cope with all your needs.

[0220] Pricing plans:

[0221] Pricing Plan 1: $1500 USD

[0222] Special Offer: Buy 1 and get 10% off.

[0223] Pricing Plan 2: $1400 USD

[0224] Discount: Buy 2 and get $100 off the total price.

[0225] Recommended reasons:

[0226] Superior Performance: The combination of 16GB RAM and 1TB SSD gives you unprecedented speed and efficiency.

[0227] Portable design: Despite its powerful performance, the Laptop Pro 15 still maintains a thin and portable design, allowing you to work efficiently anytime, anywhere.

[0228] HD display: High-resolution display with accurate colors and rich details enhances your viewing experience.

[0229] Flexible purchasing options: Two pricing plans are available, both with attractive offers, allowing you to choose the most suitable purchasing method based on your needs and budget.

[0230] Applicable scenarios:

[0231] Professional workstation: suitable for professionals such as designers, programmers and video editors.

[0232] High-end games: Meet the running requirements of high-performance games and bring you an immersive gaming experience.

[0233] Daily entertainment and office work: Efficient data processing capabilities make daily use smoother and faster.

[0234] It can be understood that the LLM generation term in the above example is only for the convenience of explanation and does not constitute a limitation on the technical solution of the present application.

[0235] Furthermore, in order to have a clearer understanding of the relevant data of the product, users can also use LLM to display product charts of product-related data. Users can enter "Use a table to display the detailed information of each product by comparing the same attributes" in the LLM dialog.

[0236] The results are shown in Table 4 below:

[0237]

[0238] Furthermore, users can also use the LLM model to convert the contents of Table 4 above into a graph to make the display more intuitive. In this case, users can enter "From the comparison information of the two products shown in this table, determine the attributes that can be compared and displayed in the form of a graph, and display them through the graph" in the LLM dialog. The result is shown as follows Figure 5 As shown, Figure 5 A schematic diagram of the relationship between prices and discounts corresponding to different product pricing IDs provided in an embodiment of the present application.

[0239] Figure 5 The chart shows the price (bar chart) and discount (line chart) comparison under different pricing IDs. Each bar represents the product price under a pricing ID, and the line chart shows the discount amount for the corresponding pricing ID. The chart display method can intuitively see the changes in product prices and the discount amounts provided under different pricing strategies, helping to understand the differences in pricing and discount conditions for each product.

[0240] The above examples are for illustrative purposes only and do not constitute a limitation on the technical solution of the present application. In actual applications, users can use the LLM model to implement other management operations. For example, through LLM, an order table can be established, and product orders can be selected to purchase, order status can be checked, etc., to complete end-to-end business operations from product creation to product ordering.

[0241] It is understandable that the above description of this application only uses products as an example of the object of management. The above method can also be applied to manage other types of objects, such as employees, students, patients, etc., thereby achieving efficient personnel management.

[0242] In summary, the technical solution provided in the embodiment of the present application realizes the full process automation from background API design, prompt design to database operation and data display, and has at least the following technical effects:

[0243] Achieved direct mapping from natural language to API operations: LLM uses the ability to understand natural language and convert it into general backend API calls, which greatly reduces the difficulty for non-technical personnel to perform complex business operations and simplifies the operation process for non-technical personnel. It reduces the technical background requirements for users and improves the efficiency and accuracy of operations.

[0244] Implemented dynamic prompt design: The solution of this application can dynamically generate a call prompt based on predefined prompt instructions, context, and user intent to accurately call the background general API, improving the intelligence of the system and user experience;

[0245] When applied to business operations, this solution can cover the entire process from database design to data management (including adding, deleting, modifying, querying, and displaying), realizing the automation process of database operations and greatly simplifying the user's operation process;

[0246] High degree of intelligence: By dynamically generating prompts and using natural language to directly operate the API, the solution of this application not only improves the intelligence of the operation, but also significantly improves the user experience of non-technical users, allowing non-business personnel to directly use natural language to design and test business systems to achieve efficient business operations;

[0247] In this solution, the background general API is decoupled from the business. Even if the business changes frequently, there is no need to redesign and recode the background general API of the solution, thus reducing the cost of use.

[0248] Based on the method for performing business operations using a large language model provided in the above embodiments, an embodiment of the present application further provides a device for performing business operations using a large language model, which is described in detail below in conjunction with the accompanying drawings.

[0249] See also Figure 6 , which is a schematic diagram of an apparatus for performing business operations using a large language model provided in an embodiment of the present application.

[0250] The device includes: a receiving unit 61 , a generating unit 62 , a configuring unit 63 and a calling unit 64 .

[0251] The receiving unit 61 is used for the large language model LLM to receive a service operation request.

[0252] Business operation requests are used to trigger business operations on objects.

[0253] See also Figure 4 The user can input a business operation request in the LLM dialog so that the receiving unit 61 receives the business operation request.

[0254] The generating unit 62 is used for LLM to generate a call prompt word according to the business operation request and the predefined business prompt word.

[0255] The business prompt words are used to guide LLM to generate feedback results.

[0256] The function of the generating unit 62 can be implemented by the natural language processing algorithm of LLM. The natural language processing algorithm of LLM can parse the content in the business operation request and generate a call prompt word according to the parsing result, the business prompt word and the database schema.

[0257] The configuration unit 63 is used to call the corresponding background general application program interface API using the calling prompt word and configure the parameters of the background general API.

[0258] The function of configuration unit 63 can be implemented by LLM action engine. The designed APIOAS file content has been imported into LLM action engine, so LLM action engine can correctly identify the specific background general API that needs to be called at this time, and use the Open API specification of the background general API and the parameters carried in the business operation request to configure the parameters of the background general API.

[0259] The calling unit 64 is used to call the client API of the corresponding database and / or the client API of the corresponding business platform through the background general API to complete the business operation.

[0260] In a possible implementation, the background general API can obtain indication information fed back by the client API of the database and / or the client API of the corresponding business platform, and the indication information is used to indicate the processing result of the business operation. At this time, the device can further include a response unit, which is used to indicate in the LLM dialog that the business operation has been completed, or to display specific data information, such as displaying the data query result of the user.

[0261] The device for performing business operations using a large language model includes a processor and a memory. The above-mentioned units are stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions.

[0262] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to achieve business operations using a large language model.

[0263] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the method for performing business operations using a large language model is implemented.

[0264] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method of performing business operations using a large language model is executed when the program is running.

[0265] The embodiment of the present application also provides an electronic device, which is described in detail below with reference to the accompanying drawings.

[0266] See also Figure 7 , which is a schematic diagram of an electronic device provided in an embodiment of the present application.

[0267] The electronic device 70 includes at least one processor 701 , and at least one memory 702 and a bus 703 connected to the processor 701 .

[0268] The processor 701 and the memory 702 communicate with each other via the bus 703 .

[0269] The processor 701 is used to call the program instructions in the memory 702 to execute the above-mentioned method of using a large language model to perform business operations. The electronic device in this article can be a server or a computer.

[0270] The processor may include one or more processing units. For example, the processor may include a neural-network processing unit (NPU) and an application processor (AP).

[0271] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the method for performing business operations using a large language model in the above embodiments.

[0272] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0273] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0274] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0275] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, parameter random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically-erasable programmable read-only memory (EEPROM), flash memory or other memory technologies.

[0276] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0277] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. The device embodiments described above are merely schematic, wherein the units and modules described as separate components may or may not be physically separated. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art can understand and implement it without paying creative work.

[0278] The above is only a specific implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for performing business operations using a large language model, It is characterized in that The method comprises: The large language model LLM receives a business operation request, where the business operation request is used to trigger a business operation on an object; The LLM generates a call prompt word according to the business operation request and a predefined business prompt word, wherein the business prompt word is used to guide the LLM to generate a feedback result; Using the calling prompt word to call the corresponding background general application program interface API and configure the parameters of the background general API; The business operation is completed by calling the client API of the corresponding database and / or the client API of the corresponding business platform through the background general API.

2. The method according to claim 1, It is characterized in that The LLM generates a call prompt word according to the business operation request and a predefined business prompt word, specifically including: The LLM calls a first background general API at the beginning of a session, where the first background general API is used to query a database schema; The LLM parses the content in the business operation request; The LLM generates the call prompt word according to the parsing result, the business prompt word and the Schema.

3. The method according to claim 1, It is characterized in that The using the calling prompt word to call the corresponding background general application program interface API and configuring the parameters of the background general API specifically includes: The LLM uses the Open API specification of the background general API to identify the background general API corresponding to the call prompt word; The LLM configures the parameters of the background general API using the Open API specification of the background general API and the parameters carried in the business operation request.

4. The method according to claim 3, It is characterized in that After the business operation is completed by calling the client API of the corresponding database and / or the client API of the corresponding business platform through the background general API, the method further includes: The backend general API obtains indication information fed back by the client API of the database and / or the client API of the corresponding business platform, wherein the indication information is used to indicate the processing result of the business operation; The LLM feeds back the processing result of the business operation to the user according to the indication information obtained by the background general API.

5. The method according to claim 1, It is characterized in that Before the large language model LLM receives the service operation request, the method further includes: Design an Open API specification for the background common API, wherein the Open API specification for the background common API includes a host uniform resource locator URL, a path, input and output parameters, and also includes a Schema definition including one or more contents such as an API endpoint, operation, parameter, response, and security.

6. The method according to claim 1, It is characterized in that Before the large language model LLM receives the service operation request, the method further includes: Design business prompt words for the LLM, the business prompt words include prompt words corresponding to business parameters and prompt words corresponding to business operations, wherein the business parameters include one or more of the following: field name, operator and conditional value, and the business operation includes one or more of the following: generate data, insert data, modify data, delete data, table design, graph design, query data.

7. The method according to claim 1, It is characterized in that The background general API includes at least one of the following: The first type of API and the second type of API, wherein the first type of API includes a data definition language DDL type API, and the second type of API includes a data manipulation language DML type API and a data query language DQL type API.

8. A device for performing business operations using a large language model, It is characterized in that The device comprises: a receiving unit, a generating unit, a configuring unit and a calling unit; The receiving unit is used for the large language model LLM to receive a business operation request, where the business operation request is used to trigger a business operation on an object; The generating unit is used for the LLM to generate a call prompt word according to the business operation request and a predefined business prompt word, wherein the business prompt word is used to guide the LLM to generate a feedback result; The configuration unit is used to call the corresponding background general application program interface API using the call prompt word and configure the parameters of the background general API; The calling unit is used to call the client API of the corresponding database and / or the client API of the corresponding business platform through the background general API to complete the business operation.

9. An electronic device, It is characterized in that The electronic device is used to run a program, and when the program is run, the method for performing business operations using a large language model described in any one of claims 1 to 7 is executed.

10. A storage medium, It is characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the method for performing business operations using a large language model according to any one of claims 1 to 7.

Citation Information

Cited By

  • Question and answer method and device based on large language model

    CN119621902A

  • Service configuration method and related device

    WO2026130035A1