Data query method and device of intelligent question system, medium and equipment

By determining user attributes and generating structured query statements in a large language model, and combining authorized ledger tables for permission control, the problem of data query security is solved, and safe and efficient data access and sharing is achieved.

CN120277707APending Publication Date: 2025-07-08SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510296336.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

How to ensure the security of data queries in large language models, especially to prevent unauthorized access and data breaches during data access and sharing.

Method used

By determining the user's attribute information, a restriction condition that meets the user's access rights is generated, and a structured query statement is generated using a preset big model to verify whether the query field is accessible. Only query operations are performed after verification is passed, and permission control is performed in combination with the authorized ledger list.

Benefits of technology

Improve the security and compliance of data queries, ensure that the scope of query is within user authorization permissions, prevent data leakage and illegal access, and provide an efficient and secure data query environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277707A_ABST
    Figure CN120277707A_ABST
Patent Text Reader

Abstract

The invention provides a data query method and device of an intelligent question system, a medium and equipment. The method comprises the following steps: determining a query request proposed by a user; obtaining attribute information of the user, and determining a limiting condition meeting the user access permission according to the attribute information; generating a corresponding structured query statement by utilizing a preset large model according to the query request and the limiting condition; analyzing the structured query statement, and verifying whether a query field in an analysis result is an accessible field or not; if yes, verification passes, query operation is carried out according to the structured query statement, a query result is obtained, and the query result is fed back to the user. According to the invention, the security of data query can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data query, and in particular, to a data query method, device, medium, and equipment for an intelligent question-answering system. Background Art

[0002] With the rapid development of artificial intelligence technology, large model intelligent question-answering systems have been widely used in various fields. In recent years, Large Language Models (LLMs) have made breakthroughs in the field of natural language processing. LLMs perform well in understanding semantics, capturing context information, and performing complex reasoning, and can better handle complex and diverse natural language questions and generate more accurate and efficient SQL queries. However, in the process of data access and sharing, how to ensure the security of query data has become an urgent problem to be solved. Summary of the Invention

[0003] In view of at least one of the above technical problems, embodiments of the present invention provide a data query method, device, medium, and equipment for an intelligent question-answering system.

[0004] According to a first aspect, the data query method for an intelligent question-answering system provided by an embodiment of the present invention includes:

[0005] Determine the query request proposed by the user;

[0006] Obtain the attribute information of the user, and determine the restriction conditions that meet the user's access authority according to the attribute information;

[0007] According to the query request and the restriction conditions, and use a preset large model to generate a corresponding structured query statement;

[0008] Parse the structured query statement, and verify whether the query fields in the parsing result are accessible fields;

[0009] If so, the verification passes, perform a query operation according to the structured query statement to obtain a query result, and feedback the query result to the user.

[0010] In one embodiment, the attribute information includes a user ID, an administrative division to which the user belongs, and a department.

[0011] In one embodiment, the determining the restriction conditions that meet the user's access authority according to the attribute information includes:

[0012] Determine the role of the user according to the user ID and the department;

[0013] Determine whether to allow the user to access data across administrative divisions according to the role of the user; among them, if the role of the user is an ordinary member, only allow the user to access data within the affiliated administrative division; if the role of the user is an administrator, allow the user to access data across administrative divisions;

[0014] Determine the restriction conditions according to whether to allow the user to access data across administrative divisions.

[0015] In one embodiment, the method further includes: obtaining the authorized ledger table corresponding to the user and the authorized fields in the authorized ledger table;

[0016] Correspondingly, the generating the corresponding structured query statement according to the query request and the restriction conditions and using a preset large model includes: generating the corresponding structured query statement according to the query request, the restriction conditions and the authorized ledger table and using a preset large model.

[0017] In one embodiment, verifying whether the query field in the parsing result is an accessible field includes: determining whether the query field in the parsing result belongs to the authorized fields in the authorized ledger table.

[0018] In one embodiment, the feeding back the query result to the user includes:

[0019] Performing header analysis on the structured query statement through the preset large model;

[0020] Determine the corresponding data display structure according to the header analysis result;

[0021] Organize the query result into the form of the data display structure and feed it back to the user.

[0022] In one embodiment, the method further includes:

[0023] If the verification fails, feedback the information of no permission to query to the user.

[0024] According to the second aspect, the data query device of the intelligent question answering system provided by the embodiment of the present invention includes:

[0025] A request determination module, configured to determine a query request proposed by a user;

[0026] A condition determination module, configured to obtain the attribute information of the user and determine the restriction conditions that meet the user's access permissions according to the attribute information;

[0027] A statement generation module, configured to generate a corresponding structured query statement according to the query request and the restriction conditions and using a preset large model;

[0028] A statement parsing module, configured to parse the structured query statement and verify whether the query fields in the parsing result are accessible fields;

[0029] A data query module, configured to, if so, pass the verification, perform a query operation according to the structured query statement, obtain a query result, and feedback the query result to the user.

[0030] In one embodiment, the attribute information includes a user ID, an administrative division to which the user belongs, and a department.

[0031] In one embodiment, the condition determination module is specifically configured to: determine the role of the user according to the user ID and the department; determine whether to allow the user to access data across administrative divisions according to the role of the user; wherein, if the role of the user is an ordinary member, only allow the user to access data within the administrative division to which the user belongs; if the role of the user is an administrator, allow the user to access data across administrative divisions; determine the restriction condition according to whether to allow the user to access data across administrative divisions.

[0032] In one embodiment, the device further includes:

[0033] A first acquisition module, configured to acquire the authorized ledger table corresponding to the user and the authorized fields in the authorized ledger table;

[0034] Correspondingly, the statement generation module is specifically configured to: generate a corresponding structured query statement according to the query request, the restriction condition, and the authorized ledger table, and by using a preset large model.

[0035] In one embodiment, the statement parsing module is specifically configured to: determine whether the query fields in the parsing result belong to the authorized fields in the authorized ledger table.

[0036] In one embodiment, the data query module is specifically configured to: perform a header analysis on the structured query statement through the preset large model; determine a corresponding data display structure according to the header analysis result; organize the query result into the form of the data display structure and feedback it to the user.

[0037] In one embodiment, the device further includes:

[0038] A failure feedback module, configured to, if the verification fails, feedback information of no permission to query to the user.

[0039] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute the method provided by the first aspect.

[0040] According to a fourth aspect, a computing device provided by an embodiment of the present invention includes a memory and a processor. An executable code is stored in the memory. When the processor executes the executable code, the method provided by the first aspect is implemented.

[0041] For the data query method, device, medium, and equipment of the intelligent question answering system provided by the embodiments of the present invention, first, a query request proposed by a user is determined, then attribute information of the user is obtained, a restriction condition that meets the user's access permission is determined according to the attribute information, and then the query request and the restriction condition are input into a preset large model to obtain a structured query statement. Next, it is verified whether the query fields in the structured query statement are accessible fields. Only when the verification passes will the query operation be performed according to the structured query statement to obtain a query result, and the query result is fed back to the user. In the above process, a restriction condition that meets the user's access permission is determined according to the user's attribute information. Therefore, when the large model generates a structured query statement, it not only considers the user's query problem but also the user's access permission, which can improve the security of data query according to the structured query statement. Moreover, after the structured query statement is generated, it is verified whether the query fields in the structured query statement are accessible fields. Only when the verification passes can the query operation be performed, further ensuring the security of data query. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic flowchart of the data query method of the intelligent question answering system in an embodiment of the present invention;

[0043] Figure 2 It is a structural block diagram of the data query device of the intelligent question answering system in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] In a first aspect, an embodiment of the present invention provides a data query method for an intelligent question answering system. Refer to Figure 1 , the method includes the following steps S110 to S150:

[0045] S110. Determine the query request proposed by the user;

[0046] Among them, the method provided by the embodiment of the present invention can be executed by the client of the intelligent question answering system.

[0047] In an actual scenario, before using the intelligent inquiry system, users must first go through a strict identity verification process, including entering key information such as the correct username and password. This authentication mechanism ensures that only legitimate users can access the intelligent inquiry system, effectively enhancing security. The user group of the intelligent inquiry system directly comes from the grass-roots one-table-through business system, ensuring the authenticity and integrity of user information. It can be seen that only after a user successfully logs in to the intelligent inquiry system can they submit a query request, and the query request carries the user's query question.

[0048] Among them, the grass-roots one-table-through business system is used to store ledger data and perform query operations on the ledger data, etc.

[0049] S120. Obtain the attribute information of the user, and determine the restriction conditions that meet the user's access rights according to the attribute information;

[0050] Among them, the attribute information may include user ID, administrative division and department to which the user belongs.

[0051] In one embodiment, the determining the restriction conditions that meet the user's access rights according to the attribute information in S120 may include S121 to S123:

[0052] S121. Determine the role of the user according to the user ID and department;

[0053] Among them, the roles can be ordinary users and administrators, and administrators can be further divided into ordinary administrators and super administrators.

[0054] S122. Determine whether to allow the user to access data across administrative divisions according to the role of the user; among them, if the role of the user is an ordinary member, only allow the user to access data within the administrative division to which the user belongs; if the role of the user is an administrator, allow the user to access data across administrative divisions;

[0055] That is to say, if the user is an ordinary member, the query scope will be strictly limited to the data set within the administrative division to which the user belongs, ensuring the territorial isolation of data and the security and compliance of data. For users with the administrator role, they can be given broader query permissions, allowing them to cross administrative division boundaries and access a wider range of data resources. This process not only reflects the flexibility and efficiency of permission management, but also ensures the compliance and security of data access.

[0056] It can be seen that according to the role of the user, it can be determined whether to allow the user to access data across administrative divisions.

[0057] S123. Determine the restriction conditions according to whether to allow the user to access data across administrative divisions.

[0058] Specifically, based on whether to allow the user to access data across administrative regions, it can be determined which administrative regions the user can access, which is used as a limiting condition.

[0059] S130. According to the query request and the limiting condition, and using a preset large model to generate a corresponding structured query statement;

[0060] Among them, the query request includes the user's query question. By inputting the query request and the limiting condition into the preset large model, a structured query statement, that is, an SQL statement, can be obtained.

[0061] Among them, the large model is an artificial intelligence technology based on neural network technology. Text2SQL refers to the process of converting natural language text into structured query language. There is a close relationship between Text2SQL and the large model. As an important technical support for the Text2SQL task, the large model improves the performance, accuracy, application, and development of Text2SQL.

[0062] In one embodiment, the method provided by the embodiments of the present invention may further include: obtaining the authorized ledger table corresponding to the user and the authorized fields in the authorized ledger table;

[0063] Correspondingly, the step of generating a corresponding structured query statement according to the query request and the limiting condition, and using a preset large model includes: generating a corresponding structured query statement according to the query request, the limiting condition, and the authorized ledger table, and using a preset large model.

[0064] Among them, the relevant information of the authorized ledger table includes the table name and each field in the table. Some of these fields are authorized fields, and some are unauthorized fields. The authorized ledger table refers to the ledger table that the user can access, and the authorized field refers to the field that the user can access in the authorized ledger table.

[0065] It can be seen that when generating a structured query statement, in addition to considering the user's query question and the limiting condition, the authorized ledger table also needs to be considered, so that the generated structured query statement does not include information of unauthorized ledgers, thereby ensuring a certain degree of data security.

[0066] In an actual scenario, when the user raises a query question, the intelligent data query system will respond quickly. First, the intelligent data query system will extract the user's attribute information in the system, such as user ID, affiliated administrative region, department, etc. Then, these information are used to deeply interact with the basic one-table-through system, so as to obtain the above-mentioned limiting condition, the authorized ledger table corresponding to the user, and the authorized fields in the authorized ledger table.

[0067] To seamlessly integrate the permission control mechanism into the data query and analysis process, the intelligent data query system passes the restrictive conditions queried from the grass-roots unified form system, the information of the authorized ledger table corresponding to the user, and the user's query question as key parameters to a preset large model. After receiving these parameters, the preset large model will strictly follow these conditions to generate SQL statements, so as to ensure that subsequent query operations are carried out without overstepping the authority. This mechanism effectively prevents unauthorized access to ledger data, thus ensuring that the query scope of data is strictly limited to the authorized ledger information, providing users with a safe and efficient data query and analysis environment.

[0068] It can be understood that the application of large models in the field of intelligent data query analysis has its powerful data processing and analysis capabilities. The process of the preset large model generating SQL statements not only depends on the questions directly raised by users, but also deeply integrates a variety of key information obtained in real time by the intelligent data query system from the grass-roots unified form system, namely restrictive conditions, information of the authorized ledger table corresponding to the user, etc. The preset large model comprehensively analyzes these multi-dimensional information, so as to accurately construct an intelligent data query SQL statement that meets the user's needs.

[0069] In actual scenarios, to ensure the compliance and traceability of each data query, the intelligent data query system will record and archive the user's query questions, generated SQL statements, and the entire query process in detail. This measure not only facilitates subsequent data security audits and problem troubleshooting, but also provides valuable data support for system operation and maintenance and optimization.

[0070] S140. Parse the structured query statement and verify whether the query fields in the parsing result are accessible fields;

[0071] In one embodiment, verifying whether the query fields in the parsing result are accessible fields may include: determining whether the query fields in the parsing result belong to the authorized fields in the authorized ledger table.

[0072] That is to say, after the SQL statement is generated, the intelligent data query system can use a SQL field parsing tool developed based on jsqlparser to deeply parse the SQL statement. This tool will traverse deeply and can accurately extract key elements in the SQL statement, such as table names, query fields, and query condition fields. Subsequently, the intelligent data query system will strictly compare these elements with the authorized fields in the authorized ledger table queried from the grass-roots unified form system. This process will verify whether the user's permission level meets all data fields and conditions involved in their query request, so as to ensure precise control and security of data access. If these elements belong to the authorized fields in the authorized ledger table, the comparison and verification pass, otherwise the comparison and verification fail.

[0073] If all the query fields in the SQL statement pass the comparison verification, that is, they all fall within the scope authorized by the user, then the intelligent query system will allow the query request to continue execution. At this time, the intelligent query system will use the SQL statement, user information, and relevant ledger information as parameters to call the query interface of the grass-roots unified form system to query the required data.

[0074] In one embodiment, the method may further include: if the verification fails, feedback information about unauthorized query to the user.

[0075] It can be seen that if the comparison verification fails, that is, the SQL statement contains fields unauthorized by the user, the intelligent query system will immediately intercept the current data query request and feedback a prompt message indicating that the user has no permission to view. In this case, the user can apply for additional authorization through the administrator to obtain the corresponding data access rights. This strict permission management mechanism ensures the effective protection of the ledger table data in the grass-roots unified form system. Only users with explicit authorization can view it, and the query permission can be precisely controlled at the field level, greatly enhancing the security of the system and the rigor of data protection.

[0076] S150. If so, the verification passes, perform a query operation according to the structured query statement to obtain a query result, and feedback the query result to the user.

[0077] That is, if the query fields in the SQL statement are all accessible fields, then a query operation can be performed according to the structured query statement, thereby obtaining a query result, and then the query result is feedback to the user.

[0078] In one embodiment, the feedback of the query result to the user may include:

[0079] Perform header analysis on the structured query statement through the preset large model;

[0080] Determine the corresponding data display structure according to the header analysis result;

[0081] Organize the query result into the form of the data display structure and feedback it to the user.

[0082] It can be seen that the preset large model will also perform header analysis on the SQL statement to determine a more user-friendly data display structure, so as to present the query result to the user in an intuitive and clear manner.

[0083] In the embodiments of the present invention, the intelligent question-asking system is designed based on users in the grass-roots one-table-through system, and a permission management mechanism based on user roles is adopted to ensure precise control of data access. Ordinary users are restricted by their role configurations and can only view data within their administrative divisions, ensuring data security and privacy. For ordinary administrator users, their permissions can be extended to cross the administrative divisions to which they belong and query relevant data across the entire administrative division, providing strong support for management decisions. Super administrators have all permissions and can access all data without restrictions to meet the needs of comprehensive supervision and in-depth analysis. In addition, administrators can also flexibly configure in the grass-roots one-table-through system to grant access permissions to specific ledgers to lower-level users, realizing precise transmission and dynamic adjustment of permissions. Once a user is authorized, they can initiate question-asking queries in the intelligent question-asking system for these ledgers, but the query scope is still strictly limited to their administrative division and only includes viewing the field data clearly authorized in the ledger, ensuring fine-grained control and compliance of data access. Of course, the permission settings can also be audited regularly to ensure that the permission allocation meets business requirements and security requirements. At the same time, monitor users' access and operation behaviors, discover and handle potential security problems in a timely manner. For abnormal behaviors or suspected violations, records will be made and relevant personnel will be notified for handling.

[0084] In the embodiments of the present invention, a role-based access control strategy is adopted to accurately allocate corresponding permissions to each user. This fine-grained permission management mechanism not only simplifies the permission management process but also ensures that users can only access data resources within their permission scope, effectively preventing the risks of data leakage and illegal operations. At the same time, it also improves the efficiency and accuracy of user authentication and permission allocation, providing users with a more convenient and secure system usage experience.

[0085] In the embodiments of the present invention, large model technology is used to generate SQL queries, and the powerful SQL parsing tool jsqlparser is utilized to traverse and deeply parse the generated SQL statements in detail. During the parsing process, the embodiments of the present invention combine the strict permission control requirements of the grass-roots one-table-through system and seamlessly integrate its permission management mechanism to tailor a set of efficient and accurate permission control and access restriction solutions for data query operations in the intelligent question-asking system. This solution not only realizes the intelligence and automation of data access, but more importantly, it strictly ensures that all data operations are carried out within the scope of user authorization, effectively preventing the risks of data leakage and illegal access, thus comprehensively protecting data security and privacy. In addition, the implementation of the present invention also promotes the healthy and orderly development of the data interaction environment and provides strong support for building a more secure and trustworthy data ecosystem.

[0086] In an embodiment of the present invention, aiming at the data access and sharing permission control problems of the intelligent question-answering system, a data permission control solution is provided to ensure that data can only be queried within the scope of user-authorised permissions, and to ensure the permission audit after data query, thereby ensuring the security of the data access and sharing process. The intelligent question-answering system interacts with the http interfaces of the large model and the grass-roots unified form system to perform permission control queries and data queries, so as to implement intelligent question-answering on the client side of the intelligent question-answering system. In the client side of the intelligent question-answering system, a parsing program is developed using jsqlparser. Jsqlparser is a Java library for processing SQL statements, which traverses and analyses the SQL statements returned by the large model to obtain elements such as table names, query fields, and filtering conditions in the SQL statements. It interacts with the grass-roots unified form system to query the permission control information of the ledger table and fields in the ledger, and through comparison and filtering judgments, accurate and effective queries are achieved, so as to realise the safe, effective management and control of data in the system.

[0087] It can be seen that the embodiment of the present invention combines the large model with the grass-roots unified form system, ensuring data security, promoting the effective utilisation and sharing of data resources; enhancing the flexibility and scalability of the intelligent question-answering system, enabling it to easily adapt to different business requirements and data management requirements; meeting the permission requirements of different users or roles in different scenarios; and realising the safe, effective management and control of data, avoiding the risks of data leakage and illegal access.

[0088] In a second aspect, an embodiment of the present invention provides a data query device for an intelligent question-answering system. Refer to Figure 2 , the device 100 includes:

[0089] A request determination module 110, configured to determine a query request proposed by a user;

[0090] A condition determination module 120, configured to obtain the attribute information of the user, and determine a restriction condition that meets the user's access permission according to the attribute information;

[0091] A statement generation module 130, configured to generate a corresponding structured query statement according to the query request and the restriction condition, and by using a preset large model;

[0092] A statement parsing module 140, configured to parse the structured query statement, and verify whether the query fields in the parsing result are accessible fields;

[0093] A data query module 150, configured to, if so, pass the verification, perform a query operation according to the structured query statement, obtain a query result, and feedback the query result to the user.

[0094] In one embodiment, the attribute information includes a user ID, an administrative division to which the user belongs, and a department.

[0095] In one embodiment, the condition determination module is specifically configured to: determine the role of the user according to the user ID and the department; determine whether to allow the user to access data across administrative divisions according to the role of the user; wherein, if the role of the user is an ordinary member, the user is only allowed to access data within the administrative division to which the user belongs; if the role of the user is an administrator, the user is allowed to access data across administrative divisions; determine the restriction condition according to whether to allow the user to access data across administrative divisions.

[0096] In one embodiment, the apparatus further includes:

[0097] A first acquisition module, configured to acquire the authorized ledger table corresponding to the user and the authorized fields in the authorized ledger table;

[0098] Correspondingly, the statement generation module is specifically configured to: generate a corresponding structured query statement according to the query request, the restriction condition, and the authorized ledger table, and by using a preset large model.

[0099] In one embodiment, the statement parsing module is specifically configured to: determine whether the query fields in the parsing result belong to the authorized fields in the authorized ledger table.

[0100] In one embodiment, the data query module is specifically configured to: perform header analysis on the structured query statement through the preset large model; determine a corresponding data display structure according to the header analysis result; organize the query result into the form of the data display structure and feedback it to the user.

[0101] In one embodiment, the apparatus further includes:

[0102] A failure feedback module, configured to, if the verification fails, feedback information indicating no permission to query to the user.

[0103] It can be understood that the explanations, specific implementation manners, beneficial effects, examples, etc. of the relevant content in the apparatus provided by the embodiments of the present invention can refer to the corresponding parts in the method provided in the first aspect, and will not be elaborated here.

[0104] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the processor is caused to execute the method provided in the first aspect.

[0105] Specifically, a system or device equipped with a storage medium can be provided. On this storage medium, software program code for implementing the functions of any one of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device is caused to read and execute the program code stored in the storage medium.

[0106] In this case, the program code read from the storage medium itself can implement the functions of any one of the above embodiments. Therefore, the program code and the storage medium storing the program code constitute a part of the present invention.

[0107] Examples of the storage medium for providing the program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer via a communication network.

[0108] Furthermore, it should be clear that not only can the functions of any one of the above embodiments be realized by executing the program code read by the computer, but also by causing an operating system or the like operating on the computer based on the instructions of the program code to complete part or all of the actual operations.

[0109] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in an expansion board inserted into the computer or into the memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, the CPU or the like installed on the expansion board or the expansion module is caused to execute part and all of the actual operations, thereby realizing the functions of any one of the above embodiments.

[0110] It can be understood that for the explanations, specific implementation manners, beneficial effects, examples, etc. of the content related to the computer-readable medium provided in the embodiments of the present invention, reference can be made to the corresponding parts in the method provided in the first aspect, and details are not described herein again.

[0111] In a fourth aspect, an embodiment of this specification provides a computing device, including a memory and a processor. An executable code is stored in the memory. When the processor executes the executable code, the method in any one of the embodiments described in the specification is implemented.

[0112] It can be understood that for the explanations, specific implementation manners, beneficial effects, examples, etc. of the content related to the computing device provided in the embodiments of the present invention, reference can be made to the corresponding parts in the method provided in the first aspect, and details are not described herein again.

[0113] Each embodiment in this specification is described in a progressive manner. For the identical or similar parts among the embodiments, reference can be made to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the apparatus embodiments, since they are basically similar to the method embodiments, the descriptions are relatively simple, and reference can be made to the relevant parts in the method embodiments for the relevant content.

[0114] Those skilled in the art should be able to realize that, in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, add-ons, 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.

[0115] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present invention should be included within the protection scope of the present invention.

Claims

1. A data query method for an intelligent question number system, characterized in that, Including: Determine the query request proposed by the user; Obtain the attribute information of the user, and determine the restriction conditions that meet the user's access rights according to the attribute information; According to the query request and the restriction conditions, and use a preset large model to generate a corresponding structured query statement; Parse the structured query statement, and verify whether the query fields in the parsing result are accessible fields; If so, the verification passes, perform a query operation according to the structured query statement, obtain a query result, and feedback the query result to the user.

2. The method according to claim 1, wherein The attribute information includes the user ID, the administrative division to which the user belongs, and the department.

3. The method according to claim 2, wherein The determining the restriction conditions that meet the user's access rights according to the attribute information includes: Determine the role of the user according to the user ID and the department; According to the role of the user, determine whether the user is allowed to access data across administrative divisions; among them, if the user's role is an ordinary member, the user is only allowed to access data within the administrative division to which the user belongs; if the user's role is an administrator, the user is allowed to access data across administrative divisions; Determine the restriction conditions according to whether the user is allowed to access data across administrative divisions.

4. The method according to claim 3, wherein It also includes: Obtain the authorized ledger table corresponding to the user and the authorized fields in the authorized ledger table; Correspondingly, the generating a corresponding structured query statement according to the query request and the restriction conditions, and using a preset large model includes: According to the query request, the restriction conditions, and the authorized ledger table, and use a preset large model to generate a corresponding structured query statement.

5. The method according to claim 4, wherein The verifying whether the query fields in the parsing result are accessible fields includes: Judge whether the query fields in the parsing result belong to the authorized fields in the authorized ledger table.

6. The method according to claim 1, wherein The feedbacking the query result to the user includes: Perform header analysis on the structured query statement through the preset large model; Determine the corresponding data display structure according to the header analysis result; Organize the query result into the form of the data display structure and feedback it to the user.

7. The method according to claim 1, characterized in that, It also includes: If the verification fails, feedback the information of no permission to query to the user.

8. A data query device for an intelligent number-asking system, characterized in that Including: A request determination module for determining the query request proposed by the user; A condition determination module for obtaining the attribute information of the user and determining the restriction conditions that meet the user's access rights according to the attribute information; A statement generation module for generating a corresponding structured query statement according to the query request and the restriction conditions, and using a preset large model; A statement parsing module for parsing the structured query statement and verifying whether the query fields in the parsing result are accessible fields; A data query module for, if so, passing the verification, performing a query operation according to the structured query statement, obtaining a query result, and feedbacking the query result to the user.

9. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and when the computer program is executed on a computer, the computer is made to execute the method described in any one of claims 1 to 7.

10. A computing device, characterized in that, It includes a memory and a processor. Executable code is stored in the memory. When the processor executes the executable code, the method described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Data security processing method and system based on large model

    CN122197076A