Risk query method and device based on large model, medium and equipment
By using Hairuo big model to convert natural language problems into SQL statements in project procurement risk query, the problems of inefficient and high thresholds of traditional query methods are solved, and efficient and intuitive query and display of risk alarm information is achieved.
Patent Information
- Application Number
- CN202411720812.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-14
AI Technical Summary
Traditional database query methods are inefficient and have high usage thresholds in project procurement risk query, making it difficult to effectively manage multiple risk alarm information.
The risk query method based on the big model is adopted to input natural language procurement risk problems through the front end, and the back end uses the pre-trained Hairuo model to convert it into SQL statements, and performs query operations to return risk alarm information.
It significantly improves query efficiency, reduces the operation complexity and professional threshold for database operations, improves user experience, and enables users to understand risk alert information more intuitively through intelligent display.
Smart Images

Figure CN119621759A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database query technology, and in particular to a risk query method and device, medium and equipment based on a large model. Background Art
[0002] During the project procurement process, enterprises face multiple risks such as bid collusion, bidding with others, supplier IP tracking, project document response, and supplier equity relationships. In order to effectively manage these risks, enterprises usually aggregate relevant alarm information and store it in a database. However, when it is necessary to query relevant alarm information for a specific project, the traditional query method is not only inefficient, but also has a high threshold for use. Summary of the invention
[0003] In response to at least one of the above technical problems, an embodiment of the present invention provides a risk query method and device, medium, and equipment based on a large model.
[0004] According to the first aspect, the risk query method based on the big model provided by the embodiment of the present invention is executed by the backend, and the method includes:
[0005] Obtain the procurement risk questions about the preset project entered by the user in natural language on the front end;
[0006] Input the procurement risk problem into the pre-trained Hairuda model to obtain the corresponding SQL statement; wherein the Hairuda model is used to convert the natural language statement into the corresponding SQL statement;
[0007] Send the SQL statement output by the Hairuo model to the database, so that the database performs a query operation according to the SQL statement, obtains corresponding risk warning information, and returns the risk warning information to the back end;
[0008] The risk warning information returned by the database is returned to the front end, so that the front end determines a matching display format according to the structural type of the risk warning information, and displays the risk warning information according to the display format.
[0009] In one embodiment, before inputting the procurement risk problem into the pre-trained Hairuo model, it also includes: preprocessing the procurement risk problem; wherein the preprocessing method includes removing invalid characters and performing word segmentation processing; correspondingly, inputting the procurement risk problem into the pre-trained Hairuo model includes: inputting the preprocessed procurement risk problem into the Hairuo model.
[0010] In one embodiment, before sending the SQL statement output by the Hairuo model to the database, the method further includes:
[0011] Establishing a connection with the database through Java database connection technology;
[0012] After the connection is established, the user is authenticated and the permissions are checked;
[0013] If both the identity authentication and permission check are passed, the SQL statement output by the Hairuo model is executed and sent to the database.
[0014] In one embodiment, the method further includes: caching the risk warning information returned by the database; correspondingly, before inputting the procurement risk issue into the pre-trained Hairuo model, the method further includes: determining whether the risk warning information corresponding to the procurement risk issue of the preset project exists in the cache; if so, returning the risk warning information corresponding to the procurement risk issue of the preset project in the cache to the front end; otherwise, executing the input of the procurement risk issue into the pre-trained Hairuo model.
[0015] In one embodiment, before the risk warning information returned to the database is returned to the front end, the method also includes: performing format conversion and / or data cleaning on the risk warning information; correspondingly, returning the risk warning information returned to the database to the front end includes: returning the risk warning information after format conversion and / or data cleaning to the front end.
[0016] In one embodiment, the process of the front end determining a matching display form according to the structural type of the risk warning information includes: if the structural type of the risk warning information is structured data, determining that the matching display form is a table; if the structural type of the risk warning information is unstructured data, determining that the matching display form is text.
[0017] In one embodiment, the method further comprises:
[0018] Automatically detect whether there are potential errors during the generation of the SQL statement, during the execution of the SQL statement, and during the processing of the risk warning information;
[0019] If any, the error information will be fed back to the front end, and solution suggestions will be provided. For errors that cannot be solved automatically, guidance information for manual processing solutions will be provided.
[0020] According to the second aspect, the risk query device based on the big model provided by the embodiment of the present invention is deployed at the back end, and the device includes:
[0021] The question acquisition module is used to obtain the procurement risk questions about the preset project entered by the user in the form of natural language on the front end;
[0022] A model calling module, used to input the procurement risk problem into the pre-trained Hairuo model to obtain a corresponding SQL statement; wherein the Hairuo model is used to convert a natural language statement into a corresponding SQL statement;
[0023] A statement execution module, used for sending the SQL statement output by the Hairuo model to the database, so that the database performs a query operation according to the SQL statement, obtains corresponding risk warning information, and returns the risk warning information to the back end;
[0024] The risk return module is used to return the risk warning information returned by the database to the front end, so that the front end determines a matching display format according to the structural type of the risk warning information, and displays the risk warning information according to the display format.
[0025] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.
[0026] According to a fourth aspect, an embodiment of the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.
[0027] The risk query method, device, medium, and equipment based on the big model provided by the embodiment of the present invention, the user inputs the procurement risk problem about the preset project in natural language form at the front end, and the back end obtains the procurement risk problem and inputs the procurement risk problem into the Hairuo big model to obtain the corresponding SQL statement, and then sends the SQL statement to the database, the database will execute the SQL statement to obtain the risk warning information, the back end returns the risk warning information to the front end, the front end determines the matching display form according to the structure type of the risk warning information, and displays the risk warning information according to the display form. It can be seen that in the embodiment of the present invention, the Hairuo big model is used to generate SQL statements, the database executes the SQL statement, obtains the query results, and then returns to the front end interface. The user only needs to raise risk-related questions to quickly obtain the required data, which significantly improves the query efficiency, greatly reduces the complexity of the operation, and reduces the professional threshold of database operation. Moreover, according to the specific content of the query results, it is intelligently presented in a table or text form so that the user can intuitively understand it, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a flowchart of a risk query method based on a large model in one embodiment of the present invention;
[0029] Figure 2 It is a structural block diagram of a risk query device based on a large model in one embodiment of the present invention. DETAILED DESCRIPTION
[0030] In the first aspect, the embodiment of the present invention provides a risk query method based on a large model, see Figure 1 The method is executed by the backend, and includes the following steps S110 to S140:
[0031] S110, obtaining a procurement risk question about a preset project input by a user in a natural language form on the front end;
[0032] Among them, the back end can adopt Java back end.
[0033] Among them, the front end is responsible for receiving procurement risk questions in natural language input by users, and can also display the risk warning information queried later.
[0034] Among them, the front end can be built using technologies such as HTML, CSS and JavaScript, and can provide rich user interaction functions.
[0035] It can be seen that after the user inputs the procurement risk issue on the front end, the back end can obtain the procurement risk issue from the front end.
[0036] In one embodiment, before inputting the procurement risk problem into the pre-trained Hairuo model in S120, it may also include: preprocessing the procurement risk problem; wherein the preprocessing method includes removing invalid characters and performing word segmentation processing; correspondingly, inputting the procurement risk problem into the pre-trained Hairuo model may include: inputting the preprocessed procurement risk problem into the Hairuo model.
[0037] That is to say, before executing S120, removing invalid characters and word segmentation from the procurement risk question can improve the retrieval accuracy in the subsequent S120.
[0038] In one embodiment, before sending the SQL statement output by the Hairuo model to the database in S120, the method may further include:
[0039] Establishing a connection with the database through Java database connection technology;
[0040] After the connection is established, the user is authenticated and the permissions are checked;
[0041] If both the identity authentication and permission check are passed, the SQL statement output by the Hairuo model is executed and sent to the database.
[0042] It can be seen that the backend establishes a connection with the database through technologies such as JDBC. After the connection is established, user identity authentication and permission check are required to ensure that only authorized users can access the database.
[0043] S120, inputting the procurement risk problem into the pre-trained Hairuo model to obtain a corresponding SQL statement; wherein the Hairuo model is used to convert a natural language statement into a corresponding SQL statement;
[0044] Among them, the Hairuoda model has the NL2SQL function, which is also called Text-to-SQL technology. It is a technology that can cleverly convert users' natural language query statements into SQL queries that can be directly executed on relational databases. Its core essence lies in deeply understanding the query requirements expressed by users in natural language and accurately converting them into SQL statements that can be recognized by the database, allowing users to overcome complex SQL syntax barriers and directly interact with the database in natural language, greatly improving the convenience of operation.
[0045] It can be seen that the backend calls the Hairuda model to input the procurement risk problem into the pre-trained Hairuda model. The Hairuda model will output the corresponding SQL statement and then return the SQL statement to the backend.
[0046] The backend calls the NL2SQL interface of the Hairuo model to convert the pre-processed natural language procurement risk questions into SQL query statements. This conversion process involves in-depth analysis of natural language queries, including entity recognition, relationship extraction, intent understanding and other steps. The Hairuo model is built based on deep learning technology, which can accurately understand the intent of user queries and generate SQL statements that conform to database syntax.
[0047] Among them, the Hairuo model can be trained based on a training sample set formed by multiple historical projects and corresponding procurement risk issues-risk warning information. After multiple trainings, the accuracy of answering questions related to procurement risks is improved until the verification accuracy reaches more than 90%.
[0048] Among them, after the backend receives the SQL query statement returned by the Hairuo model, it can perform necessary formatting and optimization processing to ensure its correct execution in the database.
[0049] S130, sending the SQL statement output by the Hairuo model to the database, so that the database performs a query operation according to the SQL statement, obtains corresponding risk warning information, and returns the risk warning information to the back end;
[0050] It can be seen that the backend sends the SQL statement to the database, so that the database will execute the SQL statement, that is, perform the query operation according to the SQL statement, obtain the corresponding risk warning information, and the database will return the queried risk warning information to the backend.
[0051] Among them, the database stores various procurement risk issues of various historical projects.
[0052] S140. Return the risk warning information returned by the database to the front end, so that the front end determines a matching display format according to the structural type of the risk warning information, and displays the risk warning information according to the display format.
[0053] It can be seen that the back end returns the risk warning information to the front end, so that the front end will select a suitable display form according to the structural type of the risk warning information returned to the front end, and then display the risk warning information in the selected display form.
[0054] In one embodiment, before the risk warning information returned to the database in S140 is returned to the front end, the method may also include: performing format conversion and / or data cleaning on the risk warning information; correspondingly, returning the risk warning information returned to the database to the front end includes: returning the risk warning information after format conversion and / or data cleaning to the front end.
[0055] It can be seen that after the database executes the SQL statement, it returns the risk warning information, and the backend further processes the risk warning information, such as data format conversion, data cleaning, etc. After processing, the backend returns the risk warning information to the frontend, thereby ensuring that the frontend obtains the risk warning information in a suitable format and with high data quality.
[0056] In one embodiment, the process of the front end determining the matching display form according to the structural type of the risk warning information may include: if the structural type of the risk warning information is structured data, determining that the matching display form is a table; if the structural type of the risk warning information is unstructured data, determining that the matching display form is text.
[0057] It can be seen that the front end intelligently selects the display method according to the structural type of risk warning information. For structured data, the front end uses a table format for display and can provide filtering, sorting and other functions; for unstructured data or information that requires special explanation, the front end uses text format for display.
[0058] Among them, in the process of receiving risk warning information, the front end can verify and analyze the risk warning information to ensure the correctness and integrity of the data.
[0059] In one embodiment, the method may further include:
[0060] Cache the risk warning information returned by the database;
[0061] Correspondingly, before inputting the procurement risk problem into the pre-trained Hairuo model, the method also includes: determining whether the risk warning information corresponding to the procurement risk problem of the preset project exists in the cache; if so, returning the risk warning information corresponding to the procurement risk problem of the preset project in the cache to the front end; otherwise, executing the step of inputting the procurement risk problem into the pre-trained Hairuo model.
[0062] It can be seen that each time the database returns the risk warning information, the risk warning information will be cached. In this way, before inputting the procurement risk problem into the pre-trained Hairuo model, it is possible to first determine whether the risk warning information corresponding to the procurement risk problem of the preset project exists in the cache. If so, the risk warning information in the cache can be directly returned to the front end. If not, the procurement risk problem is input into the pre-trained Hairuo model, that is, S120 to S140 is executed. The advantage of doing this is that the efficiency of subsequent queries can be improved.
[0063] In one embodiment, the method may further include:
[0064] Automatically detect whether there are potential errors during the generation of the SQL statement, during the execution of the SQL statement, and during the processing of the risk warning information;
[0065] If any, the error information will be fed back to the front end, and solution suggestions will be provided. For errors that cannot be solved automatically, guidance information for manual processing solutions will be provided.
[0066] It can be seen that anomalies or errors may occur during the generation of the SQL statement, during the execution of the SQL statement, and during the processing of the risk warning information, so potential errors and anomalies are automatically detected and identified. These errors may include syntax errors, data type mismatches, database connection failures, etc. When an error is detected, error information and solution suggestion information are provided to the front end. For errors that cannot be automatically resolved, the user can be guided to manually correct or re-query.
[0067] Of course, error information can also be recorded in a log file for subsequent analysis and improvement.
[0068] In actual scenarios, for data that needs to be kept confidential, the data stored in the database is encrypted to ensure the security of user data. At the same time, the database is backed up and restored regularly to prevent data loss or damage.
[0069] The backend serves as a bridge between the frontend and the database. It is responsible for receiving natural language query statements from the frontend, calling the Hairuo model for NL2SQL conversion, executing the generated SQL query statements, and processing the query results. The backend can be built using frameworks such as Spring Boot, providing API interfaces for interaction with the frontend.
[0070] Among them, there are risk warning information, such as collusion, accompanying bidding, supplier IP, etc.
[0071] The database uses MySQL relational database and supports standard SQL query language.
[0072] In the embodiment of the present invention, the NL2SQL capability of the Hairuo model is combined with the Java function to achieve direct conversion from natural language query statements to actual execution results of the database. Specifically, the embodiment of the present invention can receive SQL statements generated by the Hairuo model based on natural language questions asked by users, and automatically execute these statements in the database. After execution, the real query results will be returned to the front end, and the front end will intelligently choose to display them in tabular form or text form according to the characteristics of the results. This innovation not only optimizes the user experience, but also significantly improves the efficiency of data processing and presentation.
[0073] With the help of the NL2SQL function of the Hairu model, users can ask questions related to procurement risks. Subsequently, the SQL statement generated by the Hairu model will be executed in the database, and the query results will be returned to the front-end interface in real time. According to the specific content of the query results, they are intelligently presented in a table or text form so that users can understand them intuitively. It can be seen that users only need to ask risk-related questions to quickly obtain the required data, which significantly improves the query efficiency and greatly reduces the complexity of operations. That is, the embodiment of the present invention allows users to easily obtain the required data through simple questioning. In short, the embodiment of the present invention not only simplifies the user's operating process and lowers the professional threshold for database operations, but also greatly improves the query efficiency and user experience.
[0074] The embodiments of the present invention have the following beneficial effects:
[0075] (1) Improve user experience: Users can obtain the required risk warning information through natural language queries without having to learn complex SQL syntax. The query results are displayed in intuitive table or text format, making it easier for users to understand and use.
[0076] (2) Improve query efficiency: Use the NL2SQL capability of the Hairuo model to quickly convert natural language query statements into SQL statements, reducing the time for manually writing SQL statements. Use Redis to cache query results to reduce the overhead of repeated queries and further improve system performance.
[0077] (3) Enhance data security: Perform regular database backup and recovery operations to prevent data loss or damage. Perform identity authentication and permission checks during database connection and query execution to ensure that only authorized users can access data.
[0078] (4) Reduce operation and maintenance costs: It can automatically detect and identify potential errors and anomalies, reducing the cost of manual troubleshooting and repair. It provides clear error messages and solution suggestions to reduce user confusion and frustration during use. The system is scalable and maintainable, facilitating subsequent functional upgrades and optimizations.
[0079] (5) Promote business innovation: Through intelligent query and data analysis, provide new ideas and solutions for risk warning management in project procurement. Help enterprises achieve digital transformation, improve business processing efficiency and decision-making accuracy. Provide experience and reference for natural language query and data analysis in other similar scenarios.
[0080] In a second aspect, an embodiment of the present invention provides a risk query device based on a large model, wherein the device is deployed at the back end, see Figure 2 , the device 100 comprises:
[0081] The question acquisition module 110 is used to acquire the procurement risk questions about the preset project input by the user in the form of natural language at the front end;
[0082] The model calling module 120 is used to input the procurement risk problem into the pre-trained Hairuo model to obtain the corresponding SQL statement; wherein the Hairuo model is used to convert the natural language statement into the corresponding SQL statement;
[0083] The statement execution module 130 is used to send the SQL statement output by the Hairuo model to the database, so that the database performs a query operation according to the SQL statement, obtains corresponding risk warning information, and returns the risk warning information to the back end;
[0084] The risk return module 140 is used to return the risk warning information returned by the database to the front end, so that the front end determines a matching display format according to the structural type of the risk warning information, and displays the risk warning information according to the display format.
[0085] In one embodiment, the apparatus further comprises:
[0086] A preprocessing module, used for preprocessing the procurement risk problem before the model calling module inputs the procurement risk problem into the pre-trained Hairuoda model; wherein the preprocessing method includes removing invalid characters and performing word segmentation processing;
[0087] Correspondingly, the model calling module is specifically used to: input the pre-processed procurement risk problem into the Hairuo model.
[0088] In one embodiment, before sending the SQL statement output by the Hairuo model to the database, the statement execution module 130 is also used to: establish a connection with the database through Java database connection technology; after the connection is established, perform identity authentication and permission check on the user; if the identity authentication and permission check are passed, execute the SQL statement output by the Hairuo model and send it to the database.
[0089] In one embodiment, the device may further include:
[0090] An information caching module, used for caching the risk warning information returned by the database;
[0091] Correspondingly, before inputting the procurement risk problem into the pre-trained Hairuo model, the model calling module 120 is also used to: determine whether there is risk warning information corresponding to the procurement risk problem of the preset project in the cache; if so, return the risk warning information corresponding to the procurement risk problem of the preset project in the cache to the front end; otherwise, execute the input of the procurement risk problem into the pre-trained Hairuo model.
[0092] In one embodiment, the device may further include:
[0093] A result processing module, used for performing format conversion and / or data cleaning on the risk warning information returned by the database before the risk return module 140 returns the risk warning information to the front end;
[0094] Correspondingly, the risk return module 140 is specifically used to return the risk warning information after format conversion and / or data cleaning to the front end.
[0095] In one embodiment, the process of determining a matching display form according to the structural type of the risk warning information in the front end includes: if the structural type of the risk warning information is structured data, determining that the matching display form is a table; if the structural type of the risk warning information is unstructured data, determining that the matching display form is text.
[0096] In one embodiment, the device may further include:
[0097] The error detection module is used to automatically detect whether there are potential errors in the generation process of the SQL statement, the execution process of the SQL statement, and the processing process of the risk warning information; if so, the error information is fed back to the front end, solution suggestion information is provided, and for errors that cannot be automatically resolved, guidance information for manual processing solutions is provided.
[0098] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0099] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.
[0100] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.
[0101] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0102] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0103] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0104] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0105] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0106] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.
[0107] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0108] 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. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0109] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0110] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A risk query method based on a large model, characterized in that: The method is executed by a backend, and includes: Obtain the procurement risk questions about the preset project entered by the user in natural language on the front end; Input the procurement risk problem into the pre-trained Hairuda model to obtain the corresponding SQL statement; wherein the Hairuda model is used to convert the natural language statement into the corresponding SQL statement; Send the SQL statement output by the Hairuo model to the database, so that the database performs a query operation according to the SQL statement, obtains corresponding risk warning information, and returns the risk warning information to the back end; The risk warning information returned by the database is returned to the front end, so that the front end determines a matching display format according to the structural type of the risk warning information, and displays the risk warning information according to the display format.
2. The method according to claim 1, characterized in that Before inputting the procurement risk problem into the pre-trained Hairuo model, the method further includes: pre-processing the procurement risk problem; wherein the pre-processing method includes removing invalid characters and performing word segmentation processing; Correspondingly, the step of inputting the procurement risk problem into the pre-trained Hairuda model includes: inputting the pre-processed procurement risk problem into the Hairuda model.
3. The method according to claim 1, characterized in that Before sending the SQL statement output by the Hairuo model to the database, the method further includes: Establishing a connection with the database through Java database connection technology; After the connection is established, the user is authenticated and the permissions are checked; If both the identity authentication and permission check are passed, the SQL statement output by the Hairuo model is executed and sent to the database.
4. The method according to claim 1, characterized in that: Also includes: Cache the risk warning information returned by the database; Correspondingly, before inputting the procurement risk problem into the pre-trained Hairuda model, the method further includes: Determine whether the risk warning information corresponding to the procurement risk problem of the preset project exists in the cache; if so, return the risk warning information corresponding to the procurement risk problem of the preset project in the cache to the front end; otherwise, execute the input of the procurement risk problem into the pre-trained Hairuda model.
5. The method according to claim 1, characterized in that Before the risk warning information returned to the database is returned to the front end, the method further includes: performing format conversion and / or data cleaning on the risk warning information; Correspondingly, the risk warning information returned to the database is returned to the front end, including: returning the risk warning information after format conversion and / or data cleaning to the front end.
6. The method according to claim 1, characterized in that The process of the front end determining a matching display form according to the structure type of the risk warning information includes: If the structure type of the risk warning information is structured data, it is determined that the matching display form is a table; if the structure type of the risk warning information is unstructured data, it is determined that the matching display form is text.
7. The method according to claim 1, characterized in that Also includes: Automatically detect whether there are potential errors during the generation of the SQL statement, during the execution of the SQL statement, and during the processing of the risk warning information; If any, the error information will be fed back to the front end, and solution suggestions will be provided. For errors that cannot be solved automatically, guidance information for manual processing solutions will be provided.
8. A risk query device based on a large model, characterized in that: The device is deployed at the back end, and the device includes: The question acquisition module is used to obtain the procurement risk questions about the preset project entered by the user in the form of natural language on the front end; A model calling module, used to input the procurement risk problem into the pre-trained Hairuo model to obtain a corresponding SQL statement; wherein the Hairuo model is used to convert a natural language statement into a corresponding SQL statement; A statement execution module, used for sending the SQL statement output by the Hairuo model to the database, so that the database performs a query operation according to the SQL statement, obtains corresponding risk warning information, and returns the risk warning information to the back end; The risk return module is used to return the risk warning information returned by the database to the front end, so that the front end determines a matching display format according to the structural type of the risk warning information, and displays the risk warning information according to the display format.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. A computing device, characterized in that: The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Splunk-based log query method and device, computer equipment, and storage medium
CN114036181A
Question query method and device, equipment, medium and program product
CN115292352A
Medical insurance intelligent query method and system based on NL2SQL
CN118132579A
Query permission verification method and device, equipment and storage medium
CN118643536A
Underground coal mine early warning data query method and system based on language large model
CN118733608A