Intelligent dialogue method based on user permission separation and related device
By parsing user identity and permission descriptions in the intelligent dialogue system, updating question descriptions, and querying target data sets, the problem of existing systems being unable to identify user identities and provide accurate responses is solved, thereby improving data security and response accuracy.
Patent Information
- Application Number
- CN202411804334.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing intelligent dialogue systems cannot identify users, resulting in insufficient data security and inaccurate responses. In particular, they cannot accurately infer the actual content of a user's question when the question has multiple possible answers.
By parsing the response content output request of the terminal device, the initial question description and basic identity information of the target user are obtained. Based on the identity information, the permission description is determined, the question description is updated, the target data set is queried, and the response content is output into the vertical domain big model, thereby realizing the identification and separation of user permissions.
It improves the data security and response accuracy of the intelligent dialogue system, ensures that the output content is within the scope of user permissions, and enhances the understanding of user intent and the accuracy of data processing.
Smart Images

Figure CN119293192A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic digital data processing, and in particular to an intelligent dialogue method and related devices based on user authority separation. Background Art
[0002] In the digital age, users are increasingly in need of accurate and timely data information. With the rapid development of natural language processing technology, the emergence of intelligent dialogue technology has overcome the shortcomings of traditional search engines in terms of effective information dispersion and omission, time-consuming and labor-intensive, and can generate relevant responses based on user intentions and context. However, the current dialogue system cannot identify the identity of the questioner, has data security loopholes, and cannot accurately infer the actual content of the user's question and output the correct answer when the user's question has multiple answers. It can be seen that the existing dialogue system still has problems with lack of data security and accuracy of responses. Summary of the invention
[0003] The embodiments of the present application provide an intelligent dialogue method and related devices based on user authority separation, in order to give the intelligent dialogue system the ability to identify and separate user authorities, accurately infer the content of the user's actual question and output the correct answer, thereby improving data security and response accuracy.
[0004] In a first aspect, an embodiment of the present application provides an intelligent dialogue method based on user rights separation, which is applied to a server in an intelligent dialogue system, wherein the intelligent dialogue system includes the server and a terminal device, and the method includes: Parsing the reply content output request from the terminal device to obtain the initial question description and basic identity information of the target user; Determine a permission description according to the basic identity information of the target user, where the permission description is used to characterize the data permission scope of the target user; Update the initial problem description according to the permission description to obtain a target problem description; Obtain a target data set according to the target problem description, wherein the data in the target data set is data within the data authority range and associated with the target problem description; The target problem description, the authority description, the target data set and the prompt word template are input into the vertical field big model, and the target answer content is output.
[0005] In a second aspect, an embodiment of the present application provides an intelligent dialogue device based on user authority separation, which is applied to a server in an intelligent dialogue system, wherein the intelligent dialogue system includes the server and a terminal device, and the device includes: A parsing unit, used for parsing the reply content output request from the terminal device to obtain an initial question description and basic identity information of a target user; A determination unit, configured to determine a permission description according to the basic identity information of the target user, wherein the permission description is used to characterize a data permission scope of the target user; An updating unit, configured to update the initial problem description according to the permission description to obtain a target problem description; A query unit, configured to query and obtain a target data set according to the target problem description, wherein the data in the target data set is data within the data authority range and associated with the target problem description; The output unit is used to input the target problem description, the authority description, the target data set and the prompt word template into the vertical field big model, and output the target answer content.
[0006] In a third aspect, an embodiment of the present application provides a server, comprising a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps in the first aspect of the embodiment of the present application.
[0008] It can be seen that in the embodiment of the present application, the server first parses the reply content output request from the terminal device to obtain the initial question description and the basic identity information of the target user, and then determines the permission description according to the basic identity information of the target user, and then updates the initial question description according to the permission description to obtain the target question description, and then queries the target data set according to the target question description, and the data in the target data set is data within the data permission range and associated with the target question description; finally, the target question description, the permission description, the target data set and the prompt word template are input into the vertical domain big model, and the target reply content is output. In this way, the server can determine the permission description according to the basic identity information of the target user, giving the intelligent dialogue system the ability to identify and separate user permissions, and can update the initial question description according to the permission description after obtaining the initial question description and the permission description, so that the intelligent dialogue system can predict the content that the user actually wants to ask based on the user's permission description and improve the initial question description, and finally query the target data set according to the target question description, merge and input into the vertical domain big model, obtain and output the target reply content, and improve the data security and reply accuracy of the intelligent dialogue system. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0010] Figure 1 is a structural block diagram of an intelligent dialogue system provided in an embodiment of the present application; Figure 2 It is a flowchart of an intelligent dialogue method based on user rights separation provided in an embodiment of the present application; Figure 3 This is an example diagram of a target graph database provided in an embodiment of the present application; Figure 4 This is a block diagram of the functional units of an intelligent dialogue device based on user rights separation provided by an embodiment of the present application; Figure 5 This is a block diagram of the functional units of another intelligent dialogue device based on user rights separation provided by an embodiment of the present application; Figure 6 It is a structural block diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0011] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0012] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0013] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0014] See also Figure 1 , Figure 1 is a structural block diagram of an intelligent dialogue system provided by an embodiment of the present application. Figure 1 As shown, the intelligent dialogue system 10 includes a server 11 and a terminal device 12, and the server 11 and the terminal device 12 are connected in communication to realize the interaction of data information. The server 11 can be a server, or a server cluster composed of several servers, or a cloud computing service center; the terminal device 12 can be a smart device used by the target user, such as a mobile phone, a tablet computer, a personal computer, etc.
[0015] The following introduces an intelligent dialogue method based on user rights separation provided by an embodiment of the present application.
[0016] See also Figure 2 , Figure 2 is a flowchart of an intelligent dialogue method based on user rights separation provided by an embodiment of the present application, which is applied to Figure 1 In the server 11 shown, Figure 2 As shown, the intelligent dialogue method based on user rights separation includes: S201, parsing the reply content output request from the terminal device to obtain an initial question description and basic identity information of the target user.
[0017] The intelligent dialogue system can be implemented as an online dialogue platform or software application on the terminal device. Users can log in to their accounts on the terminal device to verify their identity information and enter questions in the intelligent dialogue system to interact. After the user completes an inquiry, the terminal device will generate a corresponding reply content output request and send it to the server. After receiving the reply content output request, the server will parse it to obtain the initial question description and the basic identity information of the target user.
[0018] Among them, the initial question description refers to the original, unprocessed question content input by the target user in the intelligent dialogue system. It can be understood that these questions are non-standard, and the same non-standard question content input by different users may have different intentions. For example, for the same question content "What is the income in May", the question intention that user A actually wants to express may be "What is the salary of user A in May", and the question intention that user B actually wants to express may be "What is the company's turnover in May". It can be seen that for the same question content, the actual question intentions of different users may be different. Therefore, how the intelligent dialogue system can accurately understand the user's question content is one of the core issues in existing dialogue technology.
[0019] S202: Determine a permission description according to the basic identity information of the target user.
[0020] Among them, the permission description is used to characterize the data permission scope of the target user, and the data permission scope is used to characterize the data set that the target user is allowed to access. Exemplarily, the permission description can be "user A has access rights to data a", where data a can be a single data or a data set consisting of multiple data.
[0021] Among them, the server pre-stores a data resource library, which includes external public data and enterprise internal data. The external public data refers to public data that is queried and transferred through conventional channels, such as information, authoritative documents, teaching materials, encyclopedias, etc. captured by web crawlers, extracting the text content and related metadata, such as titles, links, etc., and establishing an index. The enterprise internal data refers to data resources within the scope of the target enterprise. The target enterprise is connected to the intelligent dialogue system, that is, the intelligent dialogue system can be specifically implemented as a dialogue platform dedicated to a specific enterprise, which is used to provide solutions for the data resource query needs of internal personnel of the enterprise. Among them, the enterprise internal data includes enterprise public data and enterprise authority data. The enterprise public data is data shared within the enterprise, such as employee manuals, attendance systems and other data, and the enterprise authority data includes financial data, department performance and other data. After integrating and storing the above-mentioned data resource library, the server classifies and grades the data in the data resource library to form the authority label of the data resource. For example, the above-mentioned external public data and enterprise public data are both data accessible to internal personnel of the enterprise and do not have permission labels. The above-mentioned enterprise permission data are data resources with permission labels, and only users with corresponding permission labels can access them. Specifically, when classifying and grading the data in the data resource library, it is necessary to combine the management process of the target enterprise. Under different management processes, the same data may have different permission labels. For example, for the "department personnel composition" data, some companies only allow people in the department to view this data. At this time, it is necessary to set the category and level of this data accordingly to form a permission label, while some companies allow everyone to view this data. At this time, this data belongs to the enterprise public data and does not have a permission label.
[0022] S203: Update the initial problem description according to the permission description to obtain a target problem description.
[0023] Among them, as mentioned above, the initial question description directly entered by the user may be non-standard. In this scenario, without considering the situation of malicious unauthorized access, the initial question description is updated to the target question description by introducing the user's permission description, so that the intelligent dialogue system can infer the target problem that the target user is more concerned about within the data permission scope of the target user, thereby improving the accuracy of understanding.
[0024] S204: Query and obtain a target data set according to the target problem description.
[0025] The data in the target data set are data within the data authority range and associated with the target question description, that is, answer data corresponding to the target question description within the authority range.
[0026] S205, input the target problem description, the authority description, the target data set and the prompt word template into the vertical field big model, and output the target answer content.
[0027] Among them, the vertical domain big model is a pre-trained basic language model, which has language generation capabilities, can generate text according to the input prompt words to complete sentences, and implicitly construct knowledge including factual knowledge and common sense knowledge. After the pre-training stage, it can be further supervised through user instructions. Fine-tuning, so that the model has the ability to understand instructions and context, can complete open-domain problems, reading comprehension, translation, code generation and other capabilities, and also has a certain ability to generalize unknown tasks. After the supervised fine-tuning stage, the ability to further train the model by constructing a reward model and a reinforcement learning model can be further constructed, so that the finally trained vertical domain big model can generate natural language based on a given text sequence, industry field, and prompt words.
[0028] It can be seen that in the embodiment of the present application, the server first parses the reply content output request from the terminal device to obtain the initial question description and the basic identity information of the target user, and then determines the permission description according to the basic identity information of the target user, and then updates the initial question description according to the permission description to obtain the target question description, and then queries the target data set according to the target question description, and the data in the target data set is the data within the data permission range and associated with the target question description; finally, the target question description, the permission description, the target data set and the prompt word template are input into the vertical domain big model, and the target reply content is output. In this way, the server can determine the permission description according to the basic identity information of the target user, giving the intelligent dialogue system the ability to identify and separate user permissions, and can update the initial question description according to the permission description after obtaining the initial question description and the permission description, so that the intelligent dialogue system can predict the content that the user actually wants to ask based on the user's permission description and improve the initial question description, and finally query the target data set according to the target question description, merge and input into the vertical domain big model, obtain and output the target reply content, and improve the data security and reply accuracy of the intelligent dialogue system.
[0029] In one possible example, parsing the reply content output request from the terminal device to obtain an initial question description and basic identity information of the target user includes: parsing the current conversation text content, historical conversation text content and account login information carried by the reply content output request; determining the initial question description based on the current conversation text content and the historical conversation text content; and determining the basic identity information of the target user based on the account login information.
[0030] In this example, the reply content output request carries the current dialogue text content, the historical dialogue text content and the account login information. The current dialogue text content refers to the question content entered by the target user in the current dialogue round, and the historical dialogue text content refers to the dialogue content before the current dialogue round in the same dialogue scene. The current dialogue text content and the historical dialogue text content together constitute the initial question description. Among them, the account login information refers to the account information logged in to the intelligent dialogue system on the terminal device, and the account login information at least includes the user name information. It can be understood that the accounts that can log in to the intelligent dialogue system are all pre-authorized accounts, that is, the target user can refer to the user with the account, specifically including internal personnel of the enterprise and / or specially authorized personnel outside the enterprise. The specially authorized personnel can be, for example, staff of the regulatory department. In some scenarios, the staff of the regulatory department needs to retrieve and review the relevant data of the enterprise. In order to cooperate with the work of the regulatory department, the enterprise will open the department authority to the staff of the regulatory department, that is, the specially authorized personnel outside the enterprise.
[0031] It can be seen that in this example, the server parses the current conversation text content, historical conversation text content and account login information carried by the reply content output request, and further determines the initial question description and the basic identity information of the target user. In this way, all conversation contents in the same conversation scenario are included to form the initial question description, which improves the accuracy of subsequent understanding of the user's question content. At the same time, the basic identity information of the target user is determined based on the account login information, which facilitates the subsequent determination of the target user's permission description, giving the intelligent dialogue system the ability to identify and separate user permissions and improve data security.
[0032] In a possible example, determining the permission description based on the basic identity information of the target user includes: determining a target user entity node corresponding to the target user based on the basic identity information of the target user; querying a target graph database based on the target user entity node to obtain a target role entity node and a first data entity node directly connected to the target user entity node, wherein the connection relationship between the target user entity node and the target role entity node is used to characterize the mapping relationship between the target user and the role corresponding to the target role entity node, and the connection relationship between the target user entity node and the first data entity node is used to characterize the permission relationship between the target user and the data corresponding to the first data entity node; querying the target graph database based on the target role entity node to obtain a second data entity node directly connected to the target role entity node, and the connection relationship between the target role entity node and the second data entity node is used to characterize the permission relationship between the role corresponding to the target role entity node and the data corresponding to the second data entity node; determining the permission description based on the first data entity node and the second data entity node.
[0033] Among them, see Figure 3 , Figure 3 This is an example diagram of a target graph database provided by an embodiment of the present application. Figure 3 As shown, the target graph database 30 includes a target user entity node 31, a target role entity node 32, a first data entity node 33 and a second data entity node 34. Among them, the target user entity node 31 is connected to the target role entity node 32 and the first data entity node 33, and the target role entity node 32 is connected to the second data entity node 34.
[0034] Specifically, the connection relationship between the target user entity node 31 and the target role entity node 32 belongs to role mapping, that is, it represents the mapping relationship between the target user and the role, for example, the role of the target user in the target enterprise is the head of the sales department and the rank is level 12; the connection relationship between the target user entity node 31 and the first data entity node 33 belongs to a permission mapping relationship, specifically a special permission mapping, that is, it represents the permission relationship between the target user and special permission data, for example, the role corresponding to the target user originally does not have access rights to financial data, but due to special authorization, the target user has access rights to financial data; the connection relationship between the target role entity node 32 and the second data entity node 34 belongs to a permission mapping relationship, specifically a role permission mapping, that is, it represents the permission relationship between the role corresponding to the target user and the basic permission data, for example, the role corresponding to the target user is the head of the sales department and the rank is level 12, and has access rights to basic permission data with data category of sales department and data level less than or equal to level 12.
[0035] It can be understood that in other possible examples, the target user entity node 31 can be connected to one or more target role entity nodes 32, which are used to characterize one or more roles of the target user in the target enterprise; the target user entity node 31 can be connected to one or more first data entity nodes 33, which are used to characterize that the target user is specially authorized to have one or more data resources; each target role entity node 32 can be connected to one or more second data entity nodes 34, which are used to characterize one or more data resources that the role corresponding to the target role entity node 32 has the right to access.
[0036] It can be seen that in this example, the server converts the basic identity information of the target user into a target user entity node, and queries the target graph database to find the first data entity node and the second data entity node that have a direct or indirect connection relationship with the target user entity node, and then determines the permission description, thereby improving the efficiency and accuracy of data query.
[0037] In a possible example, the target graph database is constructed in the following manner: Obtaining basic identity information of all first users, where the first users refer to users in the enterprise personnel set, and the basic identity information of the first users includes name information, department information, and rank information; The following operations are performed in sequence for the basic identity information of each first user: the special authorization information of the first user currently being processed is determined according to the name information of the first user currently being processed, and the special authorization information is used to indicate the authority relationship between the first user currently being processed and the special authority data; the role label of the first user currently being processed is determined according to the department information and rank information of the first user currently being processed, and the role label includes a role category and a role level; the basic authority data is determined according to the role label of the first user currently being processed, and the data category of the basic authority data corresponds to the role category, and the data level of the basic authority data corresponds to the role level; a user entity node corresponding to the first user currently being processed, a role entity node corresponding to the role label of the first user currently being processed, a data entity node corresponding to the special authority data, and a data entity node corresponding to the basic authority data are created; wherein the user entity node corresponding to the first user currently being processed is directly connected to the role entity node corresponding to the role label of the first user currently being processed and the data entity node corresponding to the special authority data, and the role entity node corresponding to the role label of the first user currently being processed is directly connected to the data entity node corresponding to the basic authority data; the above operations are repeated until the basic identity information of all first users is fully processed to obtain the first graph database; Obtaining basic identity information of all second users, where the second users refer to users outside the enterprise personnel set, and the basic identity information of the second users includes name information and special identity tags; The following operations are performed in sequence for the basic identity information of each second user: determining the exclusive authorization information of the second user currently being processed according to the name information and special identity tag of the second user currently being processed, wherein the exclusive authorization information is used to indicate the authority relationship between the second user currently being processed and the exclusive authorization data; creating a user entity node corresponding to the second user currently being processed and a data entity node corresponding to the exclusive authorization data; wherein the user entity node corresponding to the second user currently being processed is connected to the data entity node corresponding to the exclusive authorization data; repeating the above operations until the basic identity information of all second users is fully processed, and a second graph database is obtained; The first graph database and the second graph database are integrated to obtain the target graph database.
[0038] Among them, the first user is used to indicate an internal person of the enterprise, and the basic identity information of the internal person of the enterprise includes name information, department information and job grade information. The name information is used to determine the identity of the first user and create a user entity node that uniquely corresponds to the first user, and is used to query the internal database of the enterprise to determine the special authorization information of the first user, such as special authorization of the first user to have access to financial data, and the financial data is the special permission data. The department information and job grade information are used to determine the role label of the first user in the target enterprise, which can be specifically determined by determining the role category according to the department information and determining the role level according to the job grade information; after determining the role label, it is possible to establish a permission relationship with the data resources that have been marked with the data label in the data resource library pre-stored on the server, and create corresponding role entity nodes and data entity nodes, and establish a connection relationship to obtain the first graph database.
[0039] The second user is used to indicate an external person without a role definition. The basic identity information of the external person includes name information and special identity tags, such as staff of the regulatory department. The name information and special identity tags are used to determine the identity of the second user and create a user entity node that uniquely corresponds to the second user, as well as to query the internal database of the enterprise for exclusive authorization information for external persons, such as exclusive authorization of the second user to have access to the enterprise financial report data, which is the exclusive authorization data, to create a data entity node corresponding to the exclusive authorization data, and establish a connection relationship to obtain the second graph database.
[0040] Finally, the first graph database and the second graph database are merged to obtain a target graph database. Specifically, data entity nodes with overlapping content in the first graph database and the second graph database can be merged to form a complete graph database.
[0041] Among them, the process of establishing the permission relationship between users and data, roles and data can be implemented through a pre-trained mapping model. The process management information, special authorization information, exclusive authorization information, role labels, and data labels of the target enterprise can be input into the mapping model together. The mapping model completes the creation of the permission relationship between users and data, roles and data, which can replace manual labeling to a certain extent and improve efficiency. Specifically, in terms of model training, after inputting the description of the first permission relationship, manual annotation adjustments can be made according to the model output content, combined with reinforcement learning strategies and reward signals, and the model parameters can be continuously fine-tuned so that the model can eventually accurately output the description of the permission relationship. In practical applications, there are abnormal factors such as the introduction of new roles and user operation behaviors, and it is necessary to give the mapping model the ability to adaptively update. Specifically, the process management information is periodically called to detect the introduction of new roles in real time, such as adding new positions and new ranks within the enterprise, and the data permissions corresponding to the positions and ranks, to form a corresponding relationship; and, in real time, monitor the operation behavior of each user when using the intelligent dialogue system to monitor whether their operation behavior is abnormal. For example, when it is detected that the user has multiple super-authority accesses, it is detected whether the user entity node and role entity node corresponding to the user are labeled incorrectly, and whether the permission relationship mapping for the user is wrong. If an error occurs, it is corrected. If no error occurs, an abnormal event signal is generated and reported to the process management system of the target enterprise for prompting. Finally, a mapping model that can create permission relationships between users and data, and roles and data is trained.
[0042] It can be seen that in this example, the server creates the first graph database and the second graph database through the basic identity information of the first user and the second user, and finally merges them to form the target graph database, thereby supporting the server to use the target graph database to determine the data permission scope of the target user during the real-time conversation to determine the permission description, thereby improving the efficiency and accuracy of data processing.
[0043] In one possible example, updating the initial problem description according to the permission description to obtain a target problem description includes: inputting the permission description and the initial problem description into a pre-trained update model; processing the initial problem description to obtain a first vector sequence; calculating the initial attention weight of the update model according to the first vector sequence; processing the permission description to obtain a target bias vector; updating the initial attention weight according to the target bias vector to obtain a target attention weight; determining the attention output result of the update model according to the target attention weight; and updating the initial problem description according to the attention output result to obtain a target problem description.
[0044] The pre-trained update model can be obtained by fine-tuning the Transformer model, which is specifically manifested in that a target bias vector guided by the permission description is added to the Transformer model to adjust the attention output of the Transformer model so that it pays more attention to the content guided by the permission description when outputting, and finally updates the initial problem description. Specifically, the initial problem description is processed at the input layer of the update model to obtain a first vector sequence, which includes multiple representation vectors. The encoding layer of the update model includes a multi-layer encoder, and multiple Transformer encoders are used to encode the input text sequence. The Transformer encoder includes a multi-head attention layer, in which different attention weights are assigned to each word in the text sequence, so as to capture the dependency between words, and the target bias vector guided by the permission description is added during the attention calculation, so as to adjust the attention weight of the multi-head attention layer, so that the update model can pay more attention to the content guided by the permission description when outputting, and achieve high-quality update of the initial problem description.
[0045] The following example illustrates the existing self-attention mechanism. The input sequence includes Q, K, and V, where Q is the query vector, which represents the current query or content information of interest; K is the matching vector, which is used to calculate the similarity with Q to determine the attention weight S; V is the value representation vector, which is used to perform weighted summation of the input sequence according to the attention distribution to determine the attention output result H; the specific expression is as follows:
[0046] Among them, softmax() is used to perform layer normalization and convert the attention weight S into an attention distribution. Used to represent the dimension of the matching vector K to avoid dimensionality explosion during the calculation process.
[0047] On this basis, the embodiment of the present application adds a target bias vector guided by the permission description, and the target bias vector is used to adjust the attention weight of the update model, which is reflected in the expression:
[0048] Wherein, b is the target bias vector, is a preset weight matrix, and B is a target bias matrix corresponding to the target bias vector.
[0049] In other possible examples, the bias vector guided by the permission description may be multiple, such as a first bias vector b1 and a second bias vector b2, which are used to characterize that the same initial problem description may generate two different problem descriptions under the modification of the permission description, and based on the coupling of various factors, the above two different problem descriptions have different weight proportions, that is, and Different, at this time, the first bias matrix and the second bias matrix can be calculated to jointly adjust the attention weight of the update model, which is reflected in the expression:
[0050] After the attention output result is calculated, the initial problem description is updated according to the attention output result to obtain the target problem description.
[0051] It can be seen that in this example, the server inputs the permission description and the initial question description into the pre-trained update model, and adjusts the attention weight of the update model through the target bias vector guided by the permission description, so that the update model can pay more attention to the content guided by the permission description when outputting, and achieve high-quality update of the initial question description. In this way, the intelligent dialogue system has the ability to identify and separate user permissions, can accurately infer the content of the user's actual question, and improve data security and answer accuracy.
[0052] In a possible example, obtaining a target data set by querying according to the target problem description includes: determining a reference feature vector according to the target problem description; querying a vector database according to the reference feature vector to obtain a target data feature vector, wherein the target data feature vector refers to a data feature vector in the vector database whose similarity to the reference feature vector is greater than a preset similarity; and determining the target data set according to the target data feature vector.
[0053] Wherein, before obtaining the target data set by querying according to the target problem description, the method further includes: vectorizing the data in the data resource library to generate a vector database. The vector database can store vectorized text, and can represent the correlation between data through similar vectors. In this example, the server vectorizes the text content corresponding to the target problem description to obtain a reference feature vector, and queries the vector database based on the reference feature vector to find the target data feature vector whose similarity with the reference feature vector is greater than a preset similarity, thereby determining the target data set. Wherein, when calculating the vector similarity, the distance between vectors can be calculated by means of cosine distance, Euclidean distance, vector inner product, etc. to determine the vector similarity, and then the target data feature vector in the vector database can be queried to obtain.
[0054] It can be seen that in this example, the server vectorizes the target problem description after the permission description is updated, and queries the search vector database to determine the target data feature vector, and then determines the target data set, thereby improving the efficiency and accuracy of data query matching.
[0055] In one possible example, the target reply content includes a first reply content and a second reply content, wherein the first reply content is used to indicate the inquiry result corresponding to the target question description, and the second reply content is used to indicate the data analysis conclusion associated with the first reply content.
[0056] Among them, in some special dialogue scenarios, the intelligent dialogue system can further retrieve data that meets the scope of the target user's authority and the content of the question to form a data analysis conclusion and output it. For example, user C is a company manager, and the corresponding target question description is "What is the company's net profit in the third quarter?" In this scenario, the server queries the corresponding target data set, and integrates and calculates to obtain the first answer content "The company's net profit in the third quarter is 5 million yuan." At the same time, it can form a data analysis conclusion based on other data in the target data set that meets the scope of user C's authority. For example, the other data can be "The company's net profit in the second quarter is 4 million yuan." Then, the second answer content "The company's net profit in the third quarter increased by 25% compared to the second quarter" can be generated in combination with the first answer content. At this time, the target answer content generated and output by the vertical field big model is "The company's net profit in the third quarter is 5 million yuan, an increase of 25% compared to the second quarter."
[0057] It can be seen that in this example, when the server uses the vertical field big model to generate and output the target reply content, it can simultaneously generate the first reply content for the target question description and the data analysis conclusion about the first reply content, thereby providing users with more information and improving the flexibility of the intelligent dialogue system.
[0058] In accordance with the above-mentioned embodiment, please refer to Figure 4 , Figure 4 is a functional unit block diagram of an intelligent dialogue device based on user rights separation provided by an embodiment of the present application, such as Figure 4 As shown, the intelligent dialogue device 40 based on user authority separation includes: a parsing unit 401, used to parse the reply content output request from the terminal device to obtain an initial question description and basic identity information of the target user; a determination unit 402, used to determine the authority description according to the basic identity information of the target user, and the authority description is used to characterize the data authority range of the target user; an updating unit 403, used to update the initial question description according to the authority description to obtain a target question description; a query unit 404, used to query according to the target question description to obtain a target data set, the data in the target data set is data within the data authority range and associated with the target question description; an output unit 405, used to input the target question description, the authority description, the target data set and the prompt word template into the vertical field big model, and output the target reply content.
[0059] In one possible example, in parsing the reply content output request from the terminal device to obtain the initial question description and the basic identity information of the target user, the parsing unit 401 is specifically used to: parse the current conversation text content, historical conversation text content and account login information carried by the reply content output request; determine the initial question description based on the current conversation text content and the historical conversation text content; determine the basic identity information of the target user based on the account login information.
[0060] In one possible example, in terms of determining the permission description according to the basic identity information of the target user, the determination unit 402 is specifically used to: determine the target user entity node corresponding to the target user according to the basic identity information of the target user; query the target graph database according to the target user entity node to obtain a target role entity node and a first data entity node directly connected to the target user entity node, the connection relationship between the target user entity node and the target role entity node is used to characterize the mapping relationship between the target user and the role corresponding to the target role entity node, and the connection relationship between the target user entity node and the first data entity node is used to characterize the permission relationship between the target user and the data corresponding to the first data entity node; query the target graph database according to the target role entity node to obtain a second data entity node directly connected to the target role entity node, and the connection relationship between the target role entity node and the second data entity node is used to characterize the permission relationship between the role corresponding to the target role entity node and the data corresponding to the second data entity node; The permission description is determined according to the first data entity node and the second data entity node.
[0061] In a possible example, the intelligent dialogue device 40 based on user authority separation is also used to construct a target graph database in the following manner: obtain basic identity information of all first users, the first user refers to a user in a set of enterprise personnel, and the basic identity information of the first user includes name information, department information and rank information; perform the following operations in sequence for the basic identity information of each first user: determine the special authorization information of the first user currently being processed according to the name information of the first user currently being processed, and the special authorization information is used to indicate the authority relationship between the first user currently being processed and the special authority data; determine the role label of the first user currently being processed according to the department information and rank information of the first user currently being processed, and the role label includes a role category and a role level; determine basic authority data according to the role label of the first user currently being processed, the data category of the basic authority data corresponds to the role category, and the data level of the basic authority data corresponds to the role level; create a user entity node corresponding to the first user currently being processed, a role entity node corresponding to the role label of the first user currently being processed, a data entity node corresponding to the special authority data, and a data entity node corresponding to the basic authority data; wherein the user entity node corresponding to the first user currently being processed is consistent with the The role entity node corresponding to the role tag of the first user currently being processed and the data entity node corresponding to the special permission data are directly connected, and the role entity node corresponding to the role tag of the first user currently being processed is directly connected to the data entity node corresponding to the basic permission data; repeat the above operation until the basic identity information of all first users is fully processed to obtain the first graph database; obtain the basic identity information of all second users, the second user refers to the user outside the enterprise personnel set, and the basic identity information of the second user includes name information and special identity tags; perform the following operations in sequence for the basic identity information of each second user: determine the exclusive authorization information of the second user currently being processed according to the name information and special identity tag of the second user currently being processed, and the exclusive authorization information is used to indicate the permission relationship between the second user currently being processed and the exclusive authorization data; create a user entity node corresponding to the second user currently being processed and a data entity node corresponding to the exclusive authorization data; wherein the user entity node corresponding to the second user currently being processed is connected to the data entity node corresponding to the exclusive authorization data; repeat the above operation until the basic identity information of all second users is fully processed to obtain the second graph database; merge the first graph database and the second graph database to obtain the target graph database.
[0062] In one possible example, in terms of updating the initial problem description according to the permission description to obtain a target problem description, the updating unit 403 is specifically used to: input the permission description and the initial problem description into a pre-trained update model; process the initial problem description to obtain a first vector sequence; calculate the initial attention weight of the update model according to the first vector sequence; process the permission description to obtain a target bias vector; update the initial attention weight according to the target bias vector to obtain a target attention weight; determine the attention output result of the update model according to the target attention weight; and update the initial problem description according to the attention output result to obtain a target problem description.
[0063] In a possible example, in terms of obtaining a target data set by querying according to the target problem description, the query unit 404 is specifically used to: determine a reference feature vector according to the target problem description; query a vector database according to the reference feature vector to obtain a target data feature vector, wherein the target data feature vector refers to a data feature vector in the vector database whose similarity to the reference feature vector is greater than a preset similarity; and determine the target data set according to the target data feature vector.
[0064] In one possible example, the target reply content includes a first reply content and a second reply content, wherein the first reply content is used to indicate the inquiry result corresponding to the target question description, and the second reply content is used to indicate the data analysis conclusion associated with the first reply content.
[0065] In the case of integrated units, such as Figure 5 As shown, Figure 5 This is a functional unit block diagram of another intelligent dialogue device based on user rights separation provided by an embodiment of the present application. Figure 5 In the embodiment, the intelligent dialogue device 40 based on user rights separation includes a communication module 41 and a processing module 42. The processing module 42 is used to control and manage the actions of the device, for example, to execute the steps of the parsing unit 401, the determining unit 402, the updating unit 403, the query unit 404 and the output unit 405, and / or to execute other processes of the technology described herein. The communication module 41 is used to support the interaction between the device and other devices. Figure 5 As shown, the intelligent dialogue device 40 based on user authority separation may further include a storage module 43, and the storage module 43 is used to store program codes and data of the device.
[0066] Among them, the processing module 42 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 41 can be a transceiver, an RF circuit or a communication interface, and the like. The storage module 43 can be a memory.
[0067] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above intelligent dialogue device based on user authority separation can execute the above Figure 2 The intelligent dialogue method based on user rights separation is shown.
[0068] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.
[0069] See also Figure 6 , Figure 6 is a structural block diagram of a server provided in an embodiment of the present application. Figure 6As shown, the server may include one or more of the following components: a processor 601, and a memory 602 coupled to the processor 601, wherein the memory 602 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 601.
[0070] The processor 601 may include one or more processing cores. The processor 601 uses various interfaces and lines to connect various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 602, and calling data stored in the memory 602.
[0071] The memory 602 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the server during use, etc.
[0072] It can be understood that the server may include more or fewer structural elements than those in the above structural block diagram, which is not limited here.
[0073] An embodiment of the present application also provides a computer storage medium, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, part or all of the steps of any method recorded in the above method embodiments are implemented.
[0074] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any method recorded in the above method embodiments.
[0075] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0076] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0077] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0078] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0079] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present invention, and can make various changes and modifications, including the combination of the above-mentioned different functions and implementation steps, including software and hardware implementation methods, all of which are within the scope of protection of the present invention.
Claims
1. An intelligent dialogue method based on user rights separation, characterized in that: A server applied to an intelligent dialogue system, wherein the intelligent dialogue system includes the server and a terminal device, and the method includes: Parsing the reply content output request from the terminal device to obtain the initial question description and basic identity information of the target user; Determine a permission description according to the basic identity information of the target user, where the permission description is used to characterize the data permission scope of the target user; Update the initial problem description according to the permission description to obtain a target problem description; Obtain a target data set according to the target problem description, wherein the data in the target data set is data within the data authority range and associated with the target problem description; The target problem description, the authority description, the target data set and the prompt word template are input into the vertical field big model, and the target answer content is output.
2. The method according to claim 1, characterized in that The parsing of the reply content output request from the terminal device to obtain the initial question description and basic identity information of the target user includes: Parsing and obtaining the current conversation text content, historical conversation text content and account login information carried in the reply content output request; Determine the initial question description according to the current conversation text content and the historical conversation text content; The basic identity information of the target user is determined according to the account login information.
3. The method according to claim 1 or 2, characterized in that: The determining the permission description according to the basic identity information of the target user includes: Determine a target user entity node corresponding to the target user according to the basic identity information of the target user; According to the target user entity node, a target graph database is queried to obtain a target role entity node and a first data entity node directly connected to the target user entity node, wherein the connection relationship between the target user entity node and the target role entity node is used to characterize the mapping relationship between the target user and the role corresponding to the target role entity node, and the connection relationship between the target user entity node and the first data entity node is used to characterize the authority relationship between the target user and the data corresponding to the first data entity node; Query the target graph database according to the target role entity node to obtain a second data entity node directly connected to the target role entity node, wherein the connection relationship between the target role entity node and the second data entity node is used to characterize the authority relationship between the role corresponding to the target role entity node and the data corresponding to the second data entity node; The permission description is determined according to the first data entity node and the second data entity node.
4. The method according to claim 3, characterized in that The target graph database is constructed in the following way: Obtaining basic identity information of all first users, where the first users refer to users in the enterprise personnel set, and the basic identity information of the first users includes name information, department information, and rank information; The following operations are performed in sequence for each first user's basic identity information: Determine, according to the name information of the first user currently being processed, the special authorization information of the first user currently being processed, wherein the special authorization information is used to indicate the authority relationship between the first user currently being processed and the special authority data; Determine a role tag of the first user currently being processed according to the department information and rank information of the first user currently being processed, wherein the role tag includes a role category and a role level; Determine basic authority data according to the role tag of the first user currently being processed, wherein a data category of the basic authority data corresponds to the role category, and a data level of the basic authority data corresponds to the role level; Create a user entity node corresponding to the first user currently being processed, a role entity node corresponding to the role tag of the first user currently being processed, a data entity node corresponding to the special permission data, and a data entity node corresponding to the basic permission data; wherein the user entity node corresponding to the first user currently being processed is directly connected to the role entity node corresponding to the role tag of the first user currently being processed and the data entity node corresponding to the special permission data, and the role entity node corresponding to the role tag of the first user currently being processed is directly connected to the data entity node corresponding to the basic permission data; Repeat the above operation until all the basic identity information of the first users is processed, and obtain the first graph database; Obtaining basic identity information of all second users, where the second users refer to users outside the enterprise personnel set, and the basic identity information of the second users includes name information and special identity tags; Perform the following operations in sequence for each second user's basic identity information: Determine, according to the name information and the special identity tag of the second user currently being processed, the exclusive authorization information of the second user currently being processed, wherein the exclusive authorization information is used to indicate the authority relationship between the second user currently being processed and the exclusive authorization data; Creating a user entity node corresponding to the second user currently being processed and a data entity node corresponding to the exclusive authorization data; wherein the user entity node corresponding to the second user currently being processed is connected to the data entity node corresponding to the exclusive authorization data; Repeat the above operation until the basic identity information of all second users is processed, and obtain the second graph database; The first graph database and the second graph database are integrated to obtain the target graph database.
5. The method according to claim 4, characterized in that The updating the initial problem description according to the permission description to obtain a target problem description includes: Inputting the permission description and the initial problem description into a pre-trained update model; Processing the initial problem description to obtain a first vector sequence; Calculating an initial attention weight of the updated model according to the first vector sequence; Processing the permission description to obtain a target bias vector; Updating the initial attention weight according to the target bias vector to obtain a target attention weight; Determining an attention output result of the updated model according to the target attention weight; The initial problem description is updated according to the attention output result to obtain a target problem description.
6. The method according to claim 5, characterized in that The step of obtaining a target data set according to the target problem description query includes: Determine a reference feature vector according to the target problem description; Querying a vector database according to the reference feature vector to obtain a target data feature vector, wherein the target data feature vector refers to a data feature vector in the vector database whose similarity to the reference feature vector is greater than a preset similarity; The target data set is determined according to the target data feature vector.
7. The method according to claim 1, characterized in that The target reply content includes a first reply content and a second reply content, wherein the first reply content is used to indicate the inquiry result corresponding to the target question description, and the second reply content is used to indicate the data analysis conclusion associated with the first reply content.
8. An intelligent dialogue device based on user rights separation, characterized in that: A server applied to an intelligent dialogue system, wherein the intelligent dialogue system includes the server and a terminal device, and the device includes: A parsing unit, used for parsing the reply content output request from the terminal device to obtain an initial question description and basic identity information of a target user; A determination unit, configured to determine a permission description according to the basic identity information of the target user, wherein the permission description is used to characterize a data permission scope of the target user; An updating unit, configured to update the initial problem description according to the permission description to obtain a target problem description; A query unit, configured to query and obtain a target data set according to the target problem description, wherein the data in the target data set is data within the data authority range and associated with the target problem description; The output unit is used to input the target problem description, the authority description, the target data set and the prompt word template into the vertical field big model, and output the target answer content.
9. A server, characterized in that: The method comprises a processor, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Intelligent conversation privacy protection method and device, equipment and storage medium
CN116775837A
Large language model data security management method, device and equipment
CN118626603A
Human-computer interaction method and device and computer readable storage medium
CN118838998A
Problem rewriting method and device, terminal equipment and storage medium
CN118939773A
Cited By
Project management method for intelligent dialogue and computer equipment
CN119988571A
Intelligent authority management and dialogue system and method of multi-platform client integrated large model service
CN120639357A
Intelligent permission management and dialogue system and method for multi-platform client integration of large model service
CN120639357B
Employee information query method, apparatus and device, and storage medium
CN120804141A
Large model security management method based on organization isolation and authority control
CN120930179A