A large model application method, device, equipment and medium
By determining the intent and target data type of the problem text in the big model and converting it into target database query, the problem that the big model cannot accurately generate answers is solved, and the intelligent combination of multi-dimensional data analysis and platform is realized, and the accuracy of meeting user needs is achieved. Sex and efficiency.
Patent Information
- Application Number
- CN202411475383.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-10-22
AI Technical Summary
The current big model cannot accurately generate answers based on user needs, cannot conduct multi-dimensional cross-platform data analysis, cannot perfectly combine platform capabilities and intelligent capabilities, and cannot accurately meet user needs.
By entering the received question text into the big model, we determine the target business type corresponding to the intent of the question text, determine the target data type based on the correspondence between the pre-saved business type and the data type, convert the problem text into the target data type, and Obtain answer information based on the question text of the target data type and the target database.
It realizes that the big model generates answers more accurately according to user needs, can conduct multi-dimensional cross-platform data analysis, perfectly combines platform capabilities and intelligent capabilities, accurately meets user needs, and improves users' efficiency in information acquisition and decision-making.
Smart Images

Figure CN119005344B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of large model technology, and in particular to a large model application method, device, equipment and medium. Background Art
[0002] At present, artificial intelligence technology has been widely used and developed. In the field of natural language processing, deep learning technology has become the mainstream. At the same time, various large-scale language models have also been introduced, such as the Bidirectional Encoder Repres (BERT), ERNIE, and Generative Pre-Trained (GPT). The development of these technologies provides a good foundation for the development of natural gas GPT. In the field of natural gas, the application of GPT technology has also begun to receive attention. GPT is a language model based on transformers, which can learn the semantics and grammatical structure of natural language through unsupervised learning. In the field of natural gas, GPT technology can be applied to the processing and analysis of natural gas data.
[0003] The small models currently used require a lot of training, and the large models cannot accurately identify the intent to trigger the corresponding functions or capabilities. It is impossible to conduct multi-dimensional cross-platform data analysis based on user needs to reflect the business issues that users are concerned about. It is impossible to combine platform capabilities and intelligent capabilities more perfectly, and it is impossible to accurately meet user needs. The experience of business experts, industry information, and best practices of positions lack the accumulation and transmission of digital intelligence tools. Knowledge cannot be effectively recorded and transmitted, which affects the efficiency of users in information acquisition and decision-making.
[0004] Therefore, there is an urgent need for a large model application method to solve the problem that the current large model cannot accurately generate answers according to user needs. Summary of the invention
[0005] The present application provides a large model application method, device, equipment and medium, which are used to solve the problem that the current large model cannot accurately generate answers according to user needs.
[0006] In a first aspect, the present application provides a large model application method, the method comprising:
[0007] Input the received question text into the big model;
[0008] The large model determines the target business type corresponding to the intent according to the intent of the question text; determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; converts the question text into the target data type; and obtains answer information based on the question text of the target data type and the target database corresponding to the target data type.
[0009] In a possible implementation manner, if the target service type is a service analysis type; determining the target data type corresponding to the target service type includes:
[0010] Determine that the target data type corresponding to the business analysis type is a JSON type;
[0011] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0012] According to the question text of the JSON type, a query is performed in the target database corresponding to the JSON type to obtain answer information corresponding to the question text of the JSON type.
[0013] In a possible implementation manner, if the target service type is a service query type; determining the target data type corresponding to the target service type includes:
[0014] Determine that the target data type corresponding to the business query type is an SQL type;
[0015] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0016] The question text of the SQL type is used to query in the target database corresponding to the SQL type to obtain answer information corresponding to the question text of the SQL type.
[0017] In a possible implementation manner, if the target business type is a business knowledge type; determining the target data type corresponding to the target business type includes:
[0018] Determine that the target data type corresponding to the business knowledge type is a text type:
[0019] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0020] A query is performed based on the question text of the text type in a target database corresponding to the text type to obtain answer information corresponding to the question text of the text type.
[0021] In a possible implementation, the method further includes:
[0022] The target identification information of the target database corresponding to the answer information and the target data type is displayed.
[0023] In a second aspect, the present application provides a large model application device, the device comprising:
[0024] A receiving module, used for inputting the received question text into the large model;
[0025] An acquisition module is used to enable the large model to determine the target business type corresponding to the intent according to the intent of the question text; determine the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; convert the question text into the target data type; and acquire answer information based on the question text of the target data type and the target database corresponding to the target data type.
[0026] In a possible implementation, the acquisition module is specifically used to, if the target business type is a business analysis type; determine that the target data type corresponding to the business analysis type is a JSON type; and query in a target database corresponding to the JSON type according to the question text of the JSON type to obtain answer information corresponding to the question text of the JSON type.
[0027] In a possible implementation, the acquisition module is specifically used to, if the target business type is a business query type; determine that the target data type corresponding to the business query type is an SQL type; use the question text of the SQL type to query in the target database corresponding to the SQL type, and obtain answer information corresponding to the question text of the SQL type.
[0028] In a possible implementation, the acquisition module is specifically used to, if the target business type is a business knowledge type; determine that the target data type corresponding to the business knowledge type is a text type; based on the question text of the text type, query in the target database corresponding to the text type to obtain answer information corresponding to the question text of the text type.
[0029] In a possible implementation, the acquisition module is specifically configured to display the answer information and target identification information of the target database corresponding to the target data type.
[0030] In a third aspect, the present application provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any method described in the first aspect when executing a computer program stored in the memory.
[0031] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any method described in the first aspect.
[0032] In an embodiment of the present application, the received question text is input into the big model so that the big model determines the target business type corresponding to the intent according to the intent of the question text, and determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; the question text is converted into the target data type; based on the question text of the target data type and the target database corresponding to the target data type, the answer information corresponding to the question text can be obtained more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0034] Figure 1 A schematic diagram of a large model application process provided for some embodiments of the present application;
[0035] Figure 2 A functional schematic diagram of a natural gas GPT service provided for some embodiments of the present application;
[0036] Figure 3 A schematic diagram of the architecture of a natural gas GPT service provided for some embodiments of the present application;
[0037] Figure 4 A schematic diagram of a large model application device provided for some embodiments of the present application;
[0038] Figure 5 A schematic diagram of the structure of an electronic device is provided for some embodiments of the present application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0040] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0041] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0042] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0043] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0045] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0046] Before introducing the large model application method provided by the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced.
[0047] At present, artificial intelligence technology has been widely used and developed. In the field of natural language processing, deep learning technology has become the mainstream. At the same time, various large-scale language models have also been introduced, such as BERT, ERNIE, GPT, etc. The development of these technologies has provided a good foundation for the development of natural gas GPT. In the field of natural gas, the application of GPT technology has also begun to receive attention. GPT is a language model based on Transformer, which can learn the semantics and grammatical structure of natural language through unsupervised learning. In the field of natural gas, GPT technology can be applied to the processing and analysis of natural gas data.
[0048] The small models currently used require a lot of training, and the large models cannot accurately identify the intent to trigger the corresponding functions or capabilities. It is impossible to conduct multi-dimensional cross-platform data analysis based on user needs to reflect the business issues that users are concerned about. It is impossible to combine platform capabilities and intelligent capabilities more perfectly, and it is impossible to accurately meet user needs. The experience of business experts, industry information, and best practices of positions lack the accumulation and transmission of digital intelligence tools. Knowledge cannot be effectively recorded and transmitted, which affects the efficiency of users in information acquisition and decision-making.
[0049] Based on this, in order to solve the problem that the current big model cannot accurately generate answers according to user needs, the present application provides a big model application method, device, equipment and medium. In the method, the received question text is input into the big model; the big model determines the target business type corresponding to the intention according to the intention of the question text; determines the target data type corresponding to the target business type according to the correspondence between each business type and data type saved in advance; converts the question text into the target data type; obtains answer information based on the question text of the target data type and the target database corresponding to the target data type. Embodiment 1:
[0050] Figure 1 A schematic diagram of a large model application process provided for some embodiments of the present application, such as Figure 1 As shown, the process includes the following steps:
[0051] S101: Inputting the received question text into the big model; the big model determines the target business type corresponding to the intention according to the intention of the question text.
[0052] The large model application method provided in the embodiment of the present application is applied to an electronic device, which may be a PC, a server, a smart phone, etc.
[0053] The natural gas GPT system can be integrated into electronic devices, based on the design and development of the large language model, i.e. the large model, and uses the language user interface (LUI) as the form of interaction. The first phase goal is to create a role-based intelligent assistant for the gas network, i.e. the role-based intelligent assistant for natural gas, aiming to provide users with intelligent and convenient natural gas services. Through human-computer interaction, the role-based intelligent assistant accurately understands customer needs and helps them perform business operations such as business inquiries, data analysis, and the integration of industry knowledge and various types of information, thereby improving the user experience and digital intelligence of natural gas services in a new interactive way.
[0054] In order to obtain more accurate answer information for the question text input by the user, the question text input by the user can be received and input into the big model, and the big model is used to perform intent recognition on the question text. According to the intent of the recognized question text, the target business type corresponding to the intent is determined.
[0055] Specifically, for example, if the question text is "natural gas trading order status query", the intention of the question text is order query, and it can be determined that the target business type corresponding to the intention is the business query type.
[0056] S102: Determine the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; and convert the question text into the target data type.
[0057] In order to obtain the answer information corresponding to the question text more accurately, it is necessary to obtain the information in the database. The correspondence between each business type and the data type can be saved in advance. According to the pre-saved correspondence between each business type and the data type, the target data type corresponding to the target business type is determined, and the question text is converted into the target data type.
[0058] S103: based on the question text of the target data type and the target database corresponding to the target data type, obtaining answer information. The target data type includes: JSON type, SQL type and text type; converting the question text to the target data type includes: if the target data type is a non-text type, converting the question text to a JSON type or an SQL type.
[0059] Since data of different data types are stored in different databases, the database corresponding to the target data type can be determined according to the target data type corresponding to the question text, and the answer information can be obtained according to the question text of the target data type and the target database corresponding to the target data type.
[0060] In the embodiment of the present application, the feature extraction and deep learning of the question text input by the user through the large model intelligent technology realizes the accurate recognition of the user's question text intention, parameter processing, i.e. data type conversion, and completes the seamless connection with each business platform, i.e. database, for intelligent task scheduling. Compared with intelligent question and answer, artificial intelligence (AI) dialogue and other methods, it helps to improve the collaborative efficiency between product lines and enhance the user experience, and has fast recognition speed and high accuracy.
[0061] In an embodiment of the present application, the received question text is input into the big model so that the big model determines the target business type corresponding to the intent according to the intent of the question text, and determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; the question text is converted into the target data type; based on the question text of the target data type and the target database corresponding to the target data type, the answer information corresponding to the question text can be obtained more accurately.
[0062] Embodiment 2:
[0063] In order to use the large model to generate answer information more accurately, based on the above embodiment, in the embodiment of the present application, if the target business type is a business analysis type; the determination of the target data type corresponding to the target business type includes:
[0064] Determine that the target data type corresponding to the business analysis type is a JS key-value pair data (JavaScript Object Notation, JSON) type;
[0065] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0066] According to the question text of the JSON type, a query is performed in the target database corresponding to the JSON type to obtain answer information corresponding to the question text of the JSON type.
[0067] In order to use the big model to obtain the answer information more accurately, it is necessary to obtain the information in the target database corresponding to the target business type to which the question text belongs. If the target business type is a business analysis type, according to the pre-saved correspondence between each business type and the data type, it can be determined that the target data type corresponding to the business analysis type is a JSON type. The application programming interface (API) can be called to query the target database corresponding to the JSON type based on the JSON type question text to obtain the answer information corresponding to the JSON type question text.
[0068] It should be noted that if the answer information is in the form of natural language, it can be directly displayed to the user. If the answer information is in JSON type, the JSON type answer information can be converted into natural language type answer information, such as text type answer information.
[0069] In an embodiment of the present application, if the target business type corresponding to the intent of the question text is a business analysis type, it can be determined that the target data type corresponding to the business analysis type is a JSON type, and based on the JSON type question text, a query is performed in the target database corresponding to the JSON type, so that the answer information corresponding to the JSON type question text can be accurately obtained.
[0070] Based on the above embodiments, the big model can be used to work with the business system to provide business operation services. That is, the big model can be used to convert the question text entered by the user into a structured JSON type, and the relevant data, that is, the answer information corresponding to the question text, is obtained by calling the business system API, and the JSON type answer information is returned to the big model. Finally, the big model is used to convert the JSON type answer information into a natural language form, that is, a text type form, so that users can better understand and use it.
[0071] Embodiment 3:
[0072] In order to more accurately obtain the answer information corresponding to the question text, based on the above embodiments, in the embodiment of the present application, if the target business type is a business query type; the determination of the target data type corresponding to the target business type includes:
[0073] Determining that the target data type corresponding to the target business query type is a Structured Query Language (SQL) type;
[0074] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0075] The question text of the SQL type is used to query in the target database corresponding to the SQL type to obtain answer information corresponding to the question text of the SQL type.
[0076] In order to use the big model to obtain the answer information more accurately, it is necessary to obtain the information in the target database corresponding to the target business type to which the question text belongs. Since business information is usually stored in the database in the form of data, in order to obtain the answer information corresponding to the question text more accurately, if the target business type is a business query type, then according to the pre-saved correspondence between the business type and the data type, it can be determined that the target data type corresponding to the target business type is the SQL type. The API interface can be called to query the target database corresponding to the SQL type according to the SQL type question text to obtain the answer information corresponding to the SQL type question text.
[0077] It should be noted that if the answer information is in natural language form, it can be directly displayed to the user. If the answer information is in SQL type, the SQL type answer information can be converted into natural language form, such as text type answer information.
[0078] If the target business type corresponding to the intent of the question text is a business query type, then the target data type corresponding to the business query type can be determined to be an SQL type, and based on the SQL type question text, a query is performed in the target database corresponding to the SQL type, so that the answer information corresponding to the SQL type question text can be accurately obtained.
[0079] In an embodiment of the present application, if the target business type corresponding to the intent of the question text is a business query type, it can be determined that the target data type corresponding to the business query type is an SQL type, and based on the SQL type question text, a query is performed in the target database corresponding to the SQL type, so that the answer information corresponding to the SQL type question text can be accurately obtained.
[0080] On the basis of the above embodiments, the big model can be used to connect with the target database to provide business analysis services, that is, the big model can be used to convert the question text entered by the user into a structured SQL statement, that is, the SQL type, and then, by calling the business system API and the target database for linkage query, the answer information corresponding to the question text can be obtained. Finally, the big model can also be used to analyze and describe the query results, that is, the answer information, and present it to the user in the form of natural language. The user can choose whether to display the big model thinking process, that is, the process of the big model obtaining the answer information, to provide users with more in-depth and comprehensive analysis services.
[0081] Embodiment 4:
[0082] In order to more accurately obtain the answer information corresponding to the question text, based on the above embodiments, in the embodiment of the present application, if the target business type is a business knowledge type; the determination of the target data type corresponding to the target business type includes:
[0083] Determine that the target data type corresponding to the business knowledge type is a text type;
[0084] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0085] A query is performed based on the question text of the text type in a target database corresponding to the text type to obtain answer information corresponding to the question text of the text type.
[0086] If the target business type is a business knowledge type, based on the pre-saved correspondence between each business type and data type, it can be determined that the target data type corresponding to the business knowledge type is a text type. The API interface can be called to query the target database corresponding to the text type, such as a knowledge database, based on the text type question text to obtain the answer information corresponding to the text type question text.
[0087] In a possible implementation, if the big model cannot obtain the answer information corresponding to the question text in the target database, the big model can also be used in combination with the private domain knowledge base and the online search engine to provide the latest and professional natural gas industry knowledge services, so as to provide users with the latest natural gas industry knowledge. For example, the answer information corresponding to the text type question text can be obtained through the private domain knowledge base or the online search engine. Specifically, for example, it can be Baidu Wenxin big model, Microsoft Bing + GPT service, etc. In this way, various resources can be fully utilized to improve user satisfaction and experience.
[0088] On the basis of the above embodiments, a natural gas GPT service layer can be created, including defining service interfaces, implementing service logic, optimizing service performance, etc. By creating a natural gas GPT service layer, it is possible to flexibly call large models of respective languages in different application scenarios; use the large model to convert the question text into JSON type, call the business system API to obtain the answer information in the target database, and then convert the JSON type answer information into text type, thereby providing business operation services, i.e., business query type services; convert the question text into SQL type through the large model, link the business database, i.e., the target database, to query, obtain the answer information corresponding to the question text, and then use the large model to convert the query result, i.e., the answer information, into analysis description text, providing business analysis services and other functions.
[0089] Figure 2 A functional schematic diagram of a natural gas GPT service provided for some embodiments of the present application. Figure 2 As shown, a large model is established to connect with business systems and other intelligent capabilities, support complex question-answering arrangement, and cope with complex scenarios of the gas network. The gas network GPT service layer is the natural gas GPT service layer, including but not limited to scenario management, dialogue management, question-answering and feedback management, question-answering service, question-answering task definition management, system interface registration and management, system library table definition and management and other modules. Among them, the question-answering service includes the gas network procurement role intelligent assistant scenario, the gas network operation role intelligent assistant scenario and the market intelligence interpretation automatic generation scenario.
[0090] Among them, the question-and-answer service is based on the scene conversation intention recognition task and the scheduling question-and-answer task execution engine. Among them, the question-and-answer task execution engine can use the big model calling task component, the prompt template task component, the private domain knowledge matching task component, the Haoqi.com system interface task component and the Haoqi.com system database task component. Among them, the big model calling task component can use the Enniu big model service, that is, to train the natural gas industry big model based on the Enniu source model, and to fine-tune the natural gas model based on the Haoqi.com offline big data. Specifically, training the natural gas industry big model can be to deeply combine the Enniu source model with industry data, cooperate and research, and train the general model into the natural gas industry big model; provide language generation, language understanding, text classification, question-and-answer capabilities, voice translation, text summary, text error correction, sentiment analysis, language imitation, multimodality and other capabilities. It can also combine the Baidu Wenxin big model and Microsoft Bing+GPT services, that is, search engine + big model, to provide instant information GPT scenarios. Update the Enniu private domain knowledge base service through the Haoqi.com Civic knowledge base update. The question-and-answer task execution engine can also call the private domain knowledge matching task component to perform the Enniu private domain knowledge base service. The private domain knowledge base is combined, such as the knowledge base solution of the customer service system. The question-answering task execution engine can also call the Haoqi.com system interface task component. The big model is combined with the business system through the Haoqi.com business system interface to provide services such as transaction order status query; call the Haoqi.com business database. The big model is combined with the business database to provide services such as enterprise transaction status analysis.
[0091] The focus is on building the product framework of the role-based intelligent assistant and the ability to link large models with product APIs, SQL databases, and private domain knowledge bases, building a GPT task library, task orchestration, and task scheduling capabilities, so that other product lines can quickly integrate digital intelligence and connect to the role-based intelligent assistant, and achieve an overall upgrade of Haoqi.com interaction and digital intelligence.
[0092] Embodiment 5:
[0093] In order to facilitate users to view answer information, based on the above embodiments, in the embodiment of the present application, the method further includes:
[0094] The answer information and identification information of the target database corresponding to the target data type are displayed.
[0095] In order to facilitate users to view the answer information, after the answer information corresponding to the question text is obtained, the answer information can be displayed for users to view.
[0096] In order to further improve the readability of the answer information, in a possible implementation, the thinking process of the large model can also be displayed, and the user can choose whether to display the thinking process of the large model. That is, the answer information and the target identification information of the target database corresponding to the target data type are displayed. For example, the display of the large model is the answer information obtained in the target database of the target identification information.
[0097] In a possible implementation, the answer information may also be analyzed and described using a large model, and presented to the user in a natural language.
[0098] In the embodiment of the present application, the answer information can be displayed, and the target identification information of the target database to which the answer information belongs can also be displayed, thereby improving the readability of the answer information.
[0099] On the basis of the above embodiments, in order to improve the accuracy of the answer information, the big model can be fine-tuned based on business operations, business analysis, and industry knowledge to provide more accurate and professional GPT services. In order to further improve the service level of natural gas GPT, the big model can also be fine-tuned and optimized according to actual business needs and user feedback. Specifically, the parameters and structure of the big model can be adjusted according to different business operations and demand analysis; at the same time, the industry knowledge base and online search and other resources can also be used to supplement and update the knowledge of the big model, so as to continuously improve the accuracy of the answer information.
[0100] In the above embodiments and Figure 2 On the basis of Figure 3 A schematic diagram of the architecture of a natural gas GPT service provided in some embodiments of the present application. Figure 3As shown, the division of labor includes GPT R&D, business R&D, GPT R&D development tools, and business R&D configuration. The role assistant front end can receive user questions or to-do tasks, send them to the Haoqi.com GPT service, accept user questions, and select scenarios and create dialogues. After the task is accepted, permission judgment or intent recognition can be performed, tasks can be identified, and task instances can be created. Task scheduling can be performed according to the task type. Among them, tasks include operation tasks, analysis tasks, knowledge tasks, and GPT model services. Among them, operation tasks include API text return tasks, API card return tasks, and page card tasks. Among them, API text return tasks can call Word2Json task components, ExcelAPI task components, Json2Word task components, page card task components, and associated task components; API card return tasks can call Word2Json task components, ExcelAPI task components, page card task components, and associated task components; page card tasks can call Word2Json task components, page card task components, and associated task components. Analysis tasks include SQL analysis tasks, which can call Word2SQL task components, ExcelSQL task components, and Table2Word task components. Knowledge tasks include knowledge base answer tasks, online search answer tasks, and context answer tasks. Among them, the knowledge base answer task can call the knowledge base answer task component, the online search answer task can call the online search answer task component, and the context answer task can call the context answer task component. Among them, the Word2Json task component, the Json2Word task component, the Word2SQL task component, the Table2Word task component, the knowledge base answer task component, the online search answer task component, and the context answer task component can be connected to the large model docking service in the GPT model service. The large model docking service can be Enniu large model service, Enniu private domain knowledge base service and bing search service. The GPT model service also includes an intent recognition service, and the intent recognition service can be Enniu large model service and Enniu private domain knowledge base service. The ExcelAPI task component can be used for business service docking, including the Haoqi.com business system API and the Haoqi.com small model algorithm service. The ExcelSQL task component can be used for JDBC data service docking, including the Haoqi.com business database (standby database) and the Haoqi.com data service (database). Specifically, the specific implementation process of each task flow can refer to the above embodiments, which will not be repeated here.
[0101] Embodiment 6:
[0102] Based on the same technical concept, on the basis of the above embodiments, in the embodiments of the present application, a large model application device is provided. Figure 4A schematic diagram of a large model application device provided in some embodiments of the present application. Figure 4 As shown, the device comprises:
[0103] Receiving module 401, used for inputting the received question text into the large model;
[0104] Acquisition module 402 is used to enable the large model to determine the target business type corresponding to the intent according to the intent of the question text; determine the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; convert the question text into the target data type; and acquire answer information based on the question text of the target data type and the target database corresponding to the target data type.
[0105] In a possible implementation, the acquisition module 402 is specifically used to, if the target business type is a business analysis type; determine that the target data type corresponding to the business analysis type is a JSON type; query in the target database corresponding to the JSON type according to the question text of the JSON type, to obtain answer information corresponding to the question text of the JSON type.
[0106] In a possible implementation, the acquisition module 402 is specifically used to, if the target business type is a business query type; determine that the target data type corresponding to the business query type is an SQL type; use the question text of the SQL type to query in the target database corresponding to the SQL type, and obtain answer information corresponding to the question text of the SQL type.
[0107] In a possible implementation, the acquisition module 402 is specifically used to, if the target business type is a business knowledge type; determine that the target data type corresponding to the business knowledge type is a text type; based on the question text of the text type, query in the target database corresponding to the text type to obtain answer information corresponding to the question text of the text type.
[0108] In a possible implementation, the acquisition module 402 is specifically configured to display the answer information and the target identification information of the target database corresponding to the target data type.
[0109] In an embodiment of the present application, the received question text is input into the big model so that the big model determines the target business type corresponding to the intent according to the intent of the question text, and determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; the question text is converted into the target data type; based on the question text of the target data type and the target database corresponding to the target data type, the answer information corresponding to the question text can be obtained more accurately.
[0110] Embodiment 7:
[0111] Based on the same inventive concept, on the basis of the above embodiments, the embodiment of the present application further provides an electronic device, which can realize the functions of the telephone switching device mentioned above. Figure 5 The following is a schematic diagram of the structure of an electronic device 5 provided in some embodiments of the present application. Figure 5 As shown, the electronic device includes: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504;
[0112] The memory 503 stores a computer program. When the program is executed by the processor 501, the processor 501 performs the following steps:
[0113] Input the received question text into the big model;
[0114] The large model determines the target business type corresponding to the intent according to the intent of the question text; determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; converts the question text into the target data type; and obtains answer information based on the question text of the target data type and the target database corresponding to the target data type.
[0115] In a possible implementation, the processor 501 is also used to, if the target business type is a business analysis type; determine that the target data type corresponding to the business analysis type is a JSON type; and query in a target database corresponding to the JSON type according to the question text of the JSON type to obtain answer information corresponding to the question text of the JSON type.
[0116] In a possible implementation, the processor 501 is also used to, if the target business type is a business query type; determine that the target data type corresponding to the business query type is an SQL type; use the question text of the SQL type to query in the target database corresponding to the SQL type to obtain answer information corresponding to the question text of the SQL type.
[0117] In a possible implementation, the processor 501 is also used to, if the target business type is a business knowledge type; determine that the target data type corresponding to the business knowledge type is a text type; based on the question text of the text type, perform a query in the target database corresponding to the text type to obtain answer information corresponding to the question text of the text type.
[0118] In a possible implementation, the processor 501 is further configured to display the answer information and target identification information of the target database corresponding to the target data type.
[0119] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0120] The communication interface 502 is used for communication between the electronic device and other devices.
[0121] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0122] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0123] In an embodiment of the present application, the received question text is input into the big model so that the big model determines the target business type corresponding to the intent according to the intent of the question text, and determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; the question text is converted into the target data type; based on the question text of the target data type and the target database corresponding to the target data type, the answer information corresponding to the question text can be obtained more accurately.
[0124] Embodiment 8:
[0125] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program runs on the processor, the processor implements the following steps when executing:
[0126] Input the received question text into the big model;
[0127] The large model determines the target business type corresponding to the intent according to the intent of the question text; determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; converts the question text into the target data type; and obtains answer information based on the question text of the target data type and the target database corresponding to the target data type.
[0128] In a possible implementation manner, if the target service type is a service analysis type; determining the target data type corresponding to the target service type includes:
[0129] Determine that the target data type corresponding to the business analysis type is a JSON type;
[0130] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0131] According to the question text of the JSON type, a query is performed in the target database corresponding to the JSON type to obtain answer information corresponding to the question text of the JSON type.
[0132] In a possible implementation manner, if the target service type is a service query type; determining the target data type corresponding to the target service type includes:
[0133] Determine that the target data type corresponding to the business query type is an SQL type;
[0134] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0135] The question text of the SQL type is used to query in the target database corresponding to the SQL type to obtain answer information corresponding to the question text of the SQL type.
[0136] In a possible implementation manner, if the target business type is a business knowledge type; determining the target data type corresponding to the target business type includes:
[0137] Determine that the target data type corresponding to the business knowledge type is a text type:
[0138] The obtaining of answer information based on the question text of the target data type and the target database corresponding to the target data type includes:
[0139] A query is performed based on the question text of the text type in a target database corresponding to the text type to obtain answer information corresponding to the question text of the text type.
[0140] In a possible implementation, the method further includes:
[0141] The target identification information of the target database corresponding to the answer information and the target data type is displayed.
[0142] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drives (SSD), etc.
[0143] In an embodiment of the present application, the received question text is input into the big model so that the big model determines the target business type corresponding to the intent according to the intent of the question text, and determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; the question text is converted into the target data type; based on the question text of the target data type and the target database corresponding to the target data type, the answer information corresponding to the question text can be obtained more accurately.
[0144] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any large model application method discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the large model application method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0145] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0146] 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 present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.
[0147] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0149] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A large model application method, characterized in that: The method comprises: Input the received question text into the big model; The large model determines the target business type corresponding to the intent according to the intent of the question text; determines the target data type corresponding to the target business type according to the pre-saved correspondence between each business type and the data type; converts the question text into the target data type; and obtains answer information based on the question text of the target data type and the target database corresponding to the target data type; The target data type includes: JSON type, SQL type and text type; the step of converting the question text into the target data type includes: if the target data type is a non-text type, converting the question text into a JSON type or an SQL type; Wherein, if the target business type is a business analysis type; the determining the target data type corresponding to the target business type includes: determining that the target data type corresponding to the business analysis type is a JSON type; the obtaining the answer information based on the question text of the target data type and the target database corresponding to the target data type includes: querying the target database corresponding to the JSON type according to the question text of the JSON type, and obtaining the answer information corresponding to the question text of the JSON type; If the target business type is a business query type; determining the target data type corresponding to the target business type includes: determining that the target data type corresponding to the business query type is an SQL type; obtaining answer information based on the question text of the target data type and the target database corresponding to the target data type includes: using the question text of the SQL type to query the target database corresponding to the SQL type, and obtaining answer information corresponding to the question text of the SQL type; If the target business type is a business knowledge type; determining the target data type corresponding to the target business type includes: determining that the target data type corresponding to the business knowledge type is a text type; obtaining answer information based on the question text of the target data type and the target database corresponding to the target data type includes: querying the target database corresponding to the text type based on the question text of the text type to obtain answer information corresponding to the question text of the text type.
2. The method according to any one of claim 1, characterized in that: The method further comprises: The target identification information of the target database corresponding to the answer information and the target data type is displayed.
3. A large model application device, characterized in that: The device comprises: A receiving module, used for inputting the received question text into the large model; The acquisition module is used to enable the large model to determine the target business type corresponding to the intent according to the intent of the question text; determine the target data type corresponding to the target business type according to the correspondence between each business type and the data type saved in advance; convert the question text into the target data type; obtain answer information based on the question text of the target data type and the target database corresponding to the target data type; wherein the target data type includes: JSON type, SQL type and text type; converting the question text into the target data type includes: if the target data type is a non-text type, converting the question text into a JSON type or an SQL type; The acquisition module is specifically used to determine that the target data type corresponding to the business analysis type is a JSON type if the target business type is a business analysis type; query the target database corresponding to the JSON type according to the question text of the JSON type to obtain the answer information corresponding to the question text of the JSON type; The acquisition module is specifically used to determine that the target data type corresponding to the business query type is an SQL type if the target business type is a business query type; use the question text of the SQL type to query the target database corresponding to the SQL type to obtain the answer information corresponding to the question text of the SQL type; The acquisition module is specifically used to determine that the target data type corresponding to the business knowledge type is a text type if the target business type is a business knowledge type; based on the question text of the text type, query in the target database corresponding to the text type to obtain the answer information corresponding to the question text of the text type.
4. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-2 according to the obtained program instructions.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Method for importing text in JSON format into database
CN106095824A
Atlas construction and intelligent analysis system and analysis method based on dual-carbon business and computer readable storage medium
CN117556055A