Private domain knowledge sharing method and system for different users

The method and system address inconsistencies and security risks in private domain knowledge integration by determining user access levels and merging LoRA sub-models to protect private domain knowledge.

CN119203090AActive Publication Date: 2024-12-27JIANGSU DAOYUNYIN TECH CO LTD

Patent Information

Application Number
CN202411280430.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-27
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

Existing methods for integrating private domain knowledge into large models face issues of inconsistent analysis logic, heavy reliance on retrieval systems, lack of isolation between knowledge sets, and security risks due to varying user access permissions.

Method used

A method and system that determine access permission levels for users based on identity and historical access information, dividing private domain knowledge into accessible and inaccessible groups using LoRA sub-models, and merging accessible groups to form a secured merged model.

Benefits of technology

Ensures secure and effective management of private domain knowledge by granting access based on user permissions, protecting against information leakage and ensuring confidentiality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203090A_ABST
    Figure CN119203090A_ABST
Patent Text Reader

Abstract

The invention discloses a private domain knowledge sharing method and system for different users, and the method comprises the following steps: S1, obtaining the identity information and historical access information of a current user when an access request of the current user is received; s2, confirming the access authority level of the current user according to the identity information and the historical access information; s3, judging whether the access permission level is matched with the access request or not; s4, if the access permission level is matched with the access request, the K groups of private domain knowledge are divided into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level, each group of private domain knowledge is correspondingly trained with a LoRA sub-model, and K = m + n; and S5, merging the m LoRA sub-models corresponding to the m groups of accessible knowledge to obtain a merged model, and opening the access right of the merged model for the current user, the current user knowing the m groups of accessible knowledge through the merged model. Therefore, the private domain knowledge can be better protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of private domain knowledge protection, and in particular to a method and system for sharing private domain knowledge for different users. Background Art

[0002] Large models are widely used in the field of artificial intelligence, and can handle complex tasks and generate high-quality results. For some specific tasks, private domain knowledge is often needed to be integrated into the training and reasoning of large models. The RAG (Retrieval Augmented Generation) knowledge base solution has problems such as inconsistent analysis logic and heavy reliance on the retrieval system. Using private domain knowledge directly for model training will result in no isolation between knowledge sets, which cannot be flexibly modified and have the risk of information leakage.

[0003] In the related technology, a LoRA (Low-Rank Adaptation) model can be set up separately for private domain knowledge for calling. However, when users access private domain knowledge, since different users have different access permissions to private domain knowledge, there are certain security risks when all private domain knowledge is opened to all users. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a private domain knowledge sharing method for different users, obtains corresponding access permission levels for different users, and opens corresponding private domain knowledge according to the access permission levels, so as to better protect private domain knowledge.

[0005] The technical solution adopted by the present invention is as follows:

[0006] A method for sharing private domain knowledge for different users comprises the following steps: S1, upon receiving an access request from a current user, obtaining the identity information and historical access information of the current user; S2, confirming the access permission level of the current user according to the identity information and the historical access information; S3, judging whether the access permission level matches the access request; S4, if the access permission level matches the access request, dividing K groups of private domain knowledge into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level, wherein each group of private domain knowledge is trained with a LoRA sub-model, K=m+n; S5, merging the m LoRA sub-models corresponding to the m groups of the accessible knowledge to obtain a merged model, and granting the current user access to the merged model, wherein the current user obtains the m groups of the accessible knowledge through the merged model.

[0007] In one embodiment of the present invention, the historical access information includes the number of historical visits and the first visit time, the identity information is the identity level, and step S2 specifically includes the following steps: S21, dividing the time from the first visit time to the current visit time into M access time intervals in sequence, and setting a first weight for each access time interval; S22, obtaining the number of historical visits in each access time interval; S23, calculating the access permission score of the current user according to the identity level, the number of historical visits in each access time interval and the first weight; S24, confirming the access permission level according to the access permission score.

[0008] In one embodiment of the present invention, step S23 specifically includes calculating the access permission score by the following formula:

[0009]

[0010] Where P is the access permission score, λ i is the first weight corresponding to the i-th access time interval, α1 is the second weight, d is the identity level, α2 is the third weight, and χ i is the number of historical visits within the i-th access time interval.

[0011] In one embodiment of the present invention, step S5 specifically includes the following steps: S51, respectively obtaining the first weight matrix and the corresponding weight coefficient corresponding to the first to mth LoRA sub-models; S52, calculating the second weight matrix corresponding to the merged model by the following formula:

[0012]

[0013] Where W is the first weight matrix, a j is the weight coefficient of the jth LoRA sub-model, W j is the first weight matrix of the j-th LoRA sub-model; S53, obtaining the merged model according to the second weight matrix.

[0014] A private domain knowledge sharing system for different users, comprising: a first acquisition module, the first acquisition module is used to obtain the identity information and historical access information of the current user when receiving an access request from the current user; a confirmation module, the confirmation module is used to confirm the access permission level of the current user according to the identity information and the historical access information; a judgment module, the judgment module is used to judge whether the access permission level matches the access request; a division module, the division module is used to divide K groups of private domain knowledge into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level when the access permission level matches the access request, wherein each group of private domain knowledge corresponds to a LoRA sub-model trained, K=m+n; a second acquisition module, the second acquisition module is used to merge the m LoRA sub-models corresponding to the m groups of the accessible knowledge to obtain a merged model, and open the access right of the merged model to the current user, wherein the current user obtains the m groups of the accessible knowledge through the merged model.

[0015] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned private domain knowledge sharing method for different users is implemented.

[0016] A non-temporary computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned private domain knowledge sharing method for different users.

[0017] Beneficial effects of the present invention:

[0018] The present invention obtains corresponding access authority levels for different users, and opens corresponding private domain knowledge according to the access authority levels, thereby being able to better protect private domain knowledge. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flow chart of a private domain knowledge sharing method for different users according to an embodiment of the present invention;

[0020] Figure 2 Schematic diagram of a private domain knowledge sharing system for different users according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] like Figure 1 As shown, the private domain knowledge sharing method for different users in the embodiment of the present invention may include the following steps:

[0023] S1, upon receiving an access request from the current user, obtaining the identity information and historical access information of the current user.

[0024] The historical access information may include the number of historical accesses and the time of the first access, and the identity information may be the identity level. As a possible implementation method, the identity level of the current user may be obtained according to the position of the current user. For example, if the current user is an ordinary employee, the identity level is 1; if the current user is a supervisor, the identity level is 2; if the current user is a director, the identity level is 3.

[0025] S2, confirming the access permission level of the current user based on the identity information and historical access information.

[0026] In one embodiment of the present invention, step S2 specifically includes the following steps:

[0027] S21, dividing the time from the first access time to the current access time into M access time intervals in sequence, and setting a first weight value for each access time interval.

[0028] Among them, M can be calibrated according to actual conditions.

[0029] S22, obtaining the number of historical visits within each visit time interval.

[0030] S23, calculating the access permission score of the current user according to the identity level, the number of historical accesses in each access time interval, and the first weight.

[0031] In one embodiment of the present invention, step S23 specifically includes calculating the access permission score by the following formula:

[0032]

[0033] Among them, P is the access permission score, λ i is the first weight corresponding to the i-th access time interval, α1 is the second weight, d is the identity level, α2 is the third weight, and χ i is the number of historical visits within the i-th access time interval.

[0034] Among them, the first weight, the second weight and the third weight can be calibrated according to actual conditions.

[0035] S24, confirming the access permission level according to the access permission score.

[0036] In one embodiment of the present invention, the access permission level can be confirmed according to the range of the access permission score. Specifically, in one embodiment of the present invention, it can be determined whether the access permission score is less than a first setting value. If the access permission score is less than the first setting value, the access permission level is confirmed to be level 1; if the access permission score is greater than or equal to the first setting value, it is determined whether the access permission score is less than a second setting value. If the access permission score is less than the second setting value, the access permission level is confirmed to be level 2; if the access permission score is greater than or equal to the second setting value, the access permission level is confirmed to be level 3.

[0037] S3, determining whether the access permission level matches the access request.

[0038] Specifically, it can be determined whether the accessible knowledge corresponding to the access permission level is greater than or equal to the scope of the private domain knowledge required to be accessed in the current user's access request. If not, it is determined that the access permission level does not match the access request, and the result is fed back to the current user; if yes, it is determined that the access permission level matches the access request.

[0039] S4, if the access permission level matches the access request, the K groups of private domain knowledge are divided into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level. Among them, each group of private domain knowledge is trained with a LoRA sub-model, K = m + n.

[0040] Specifically, there are K groups of private domain knowledge, among which K groups of private domain knowledge can correspond to the setting of LoRA models, and each group of private domain knowledge corresponds to the training of a LoRA sub-model, that is, the LoRA model is composed of K LoRA sub-models.

[0041] Assume that there are three groups of private knowledge, namely type 1 private knowledge, type 2 private knowledge and type 3 private knowledge. When the access permission level is level 1, type 1 private knowledge can be divided into one group of accessible knowledge, and type 2 private knowledge and type 3 private knowledge can be divided into two groups of forgotten knowledge, that is, type 2 private knowledge is one group of forgotten knowledge, and type 3 private knowledge is another group of forgotten knowledge. When the access permission level is level 2, type 1 private knowledge and type 2 private knowledge can be divided into two groups of accessible knowledge, that is, type 1 private knowledge is one group of accessible knowledge, type 2 private knowledge is another group of accessible knowledge, and type 3 private knowledge is divided into one group of forgotten knowledge. Of course, type 1 private knowledge and type 3 private knowledge can also be divided into two groups of accessible knowledge, and type 2 private knowledge can be divided into one group of forgotten knowledge; or, type 2 private knowledge and type 3 private knowledge can be divided into two groups of accessible knowledge, and type 1 private knowledge can be divided into one group of forgotten knowledge. When the access permission level is 3, type one private domain knowledge, type two private domain knowledge and type three private domain knowledge are divided into three groups of accessible knowledge, that is, type one private domain knowledge is one group of accessible knowledge, type two private domain knowledge is another group of accessible knowledge, and type three private domain knowledge is another group of accessible knowledge.

[0042] S5, merging the m LoRA sub-models corresponding to the m groups of accessible knowledge to obtain a merged model, and granting access to the merged model to the current user. The current user obtains the m groups of accessible knowledge through the merged model.

[0043] Specifically, after m groups of accessible knowledge are divided, the m LoRA sub-models corresponding to the m groups of accessible knowledge can be merged to obtain a merged model, and the access right to the merged model can be opened. For example, after type 1 private domain knowledge and type 2 private domain knowledge are divided into two groups of accessible knowledge, the LoRA sub-model corresponding to type 1 private domain knowledge and the LoRA sub-model corresponding to type 2 private domain knowledge can be merged to obtain a merged model.

[0044] In one embodiment of the present invention, the merged model can be obtained by the following steps:

[0045] S51, respectively obtain the first weight matrix and the corresponding weight coefficient corresponding to the first to mth LoRA sub-models.

[0046] S52, calculating the second weight matrix corresponding to the combined model by the following formula:

[0047]

[0048] Among them, W is the first weight matrix, a j is the weight coefficient of the jth LoRA sub-model, W jis the first weight matrix of the j-th LoRA sub-model.

[0049] S53: Acquire the merged model according to the second weight matrix.

[0050] Therefore, through these multi-level security protection measures, the security of the model and the confidentiality of private knowledge data can be ensured to the greatest extent, and the safe and effective application and management of the model can be achieved.

[0051] In summary, according to the private domain knowledge sharing method for different users in an embodiment of the present invention, when receiving the access request of the current user, the identity information and historical access information of the current user are obtained, and the access permission level of the current user is confirmed based on the identity information and historical access information, and it is determined whether the access permission level matches the access request. If the access permission level matches the access request, the K groups of private domain knowledge are divided into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level, and the m LoRA sub-models corresponding to the m groups of accessible knowledge are merged to obtain a merged model, and the access right of the merged model is opened to the current user, wherein the current user obtains the m groups of accessible knowledge through the merged model. Thus, corresponding access permission levels are obtained for different users, and corresponding private domain knowledge is opened according to the access permission levels, so that private domain knowledge can be better protected.

[0052] Corresponding to the private domain knowledge sharing method for different users in the above embodiment, the present invention also proposes a private domain knowledge sharing system for different users.

[0053] like Figure 2 As shown, the private domain knowledge sharing system for different users according to the embodiment of the present invention may include: a first acquisition module 100 , a confirmation module 200 , a judgment module 300 , a division module 400 and a second acquisition module 500 .

[0054] Among them, the first acquisition module 100 is used to obtain the identity information and historical access information of the current user when receiving the access request of the current user; the confirmation module 200 is used to confirm the access permission level of the current user based on the identity information and historical access information; the judgment module 300 is used to judge whether the access permission level matches the access request; the division module 400 is used to divide K groups of private domain knowledge into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level when the access permission level matches the access request, wherein each group of private domain knowledge corresponds to a LoRA sub-model trained, K=m+n; the second acquisition module 500 is used to merge the m LoRA sub-models corresponding to the m groups of accessible knowledge to obtain a merged model, and open access rights to the merged model to the current user, wherein the current user obtains the m groups of accessible knowledge through the merged model.

[0055] In one embodiment of the present invention, the historical access information includes the number of historical visits and the first visit time, the identity information is the identity level, and the confirmation module 200 is specifically used to: divide the first visit time to the current visit time into M access time intervals in sequence, and set a first weight for each access time interval; obtain the number of historical visits in each access time interval; calculate the access permission score of the current user according to the identity level, the number of historical visits in each access time interval and the first weight; and confirm the access permission level according to the access permission score.

[0056] In one embodiment of the present invention, the confirmation module 200 is specifically configured to calculate the access permission score by the following formula:

[0057]

[0058] Among them, P is the access permission score, λ i is the first weight corresponding to the i-th access time interval, α1 is the second weight, d is the identity level, α2 is the third weight, and χ i is the number of historical visits within the i-th access time interval.

[0059] In one embodiment of the present invention, the second acquisition module 500 is specifically used to: respectively obtain the first weight matrix and the corresponding weight coefficient corresponding to the first to mth LoRA sub-models; and calculate the second weight matrix corresponding to the merged model by the following formula:

[0060]

[0061] Among them, W is the first weight matrix, a j is the weight coefficient of the jth LoRA sub-model, W j is the first weight matrix of the j-th LoRA sub-model; and the merged model is obtained according to the second weight matrix.

[0062] It should be noted that for details not disclosed in the private domain knowledge sharing system for different users in an embodiment of the present invention, please refer to the details disclosed in the private domain knowledge sharing method for different users in an embodiment of the present invention, and will not be described in detail here.

[0063] According to the private domain knowledge sharing system for different users of the embodiment of the present invention, the first acquisition module obtains the identity information and historical access information of the current user when receiving the access request of the current user, and the confirmation module is used to confirm the access permission level of the current user according to the identity information and historical access information, and the judgment module is used to judge whether the access permission level matches the access request, and the division module divides K groups of private domain knowledge into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level when the access permission level matches the access request, and the m LoRA sub-models corresponding to the m groups of accessible knowledge are merged by the second acquisition module to obtain the merged model, and the access right of the merged model is opened to the current user. Thus, the corresponding access permission levels are obtained for different users, and the corresponding private domain knowledge is opened according to the access permission levels, so that the private domain knowledge can be better protected.

[0064] Corresponding to the above embodiment, the present invention also provides a computer device.

[0065] The computer device of the embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the private domain knowledge sharing method for different users of the above embodiment is implemented.

[0066] According to the computer device of the embodiment of the present invention, corresponding access authority levels are obtained for different users, and corresponding private domain knowledge is opened according to the access authority levels, so that the private domain knowledge can be better protected.

[0067] Corresponding to the above embodiment, the present invention also proposes a non-transitory computer-readable storage medium.

[0068] The non-transitory computer-readable storage medium of the embodiment of the present invention stores a computer program, and when the program is executed by a processor, the above-mentioned private domain knowledge sharing method for different users is implemented.

[0069] According to the non-transitory computer-readable storage medium of the embodiment of the present invention, corresponding access authority levels are obtained for different users, and corresponding private domain knowledge is opened according to the access authority levels, so that private domain knowledge can be better protected.

[0070] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.

[0071] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0072] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0073] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0074] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0075] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A private domain knowledge sharing method for different users, characterized in that: The following steps are involved: S1, upon receiving an access request from a current user, obtaining identity information and historical access information of the current user; S2, confirming the access permission level of the current user according to the identity information and the historical access information; S3, determining whether the access permission level matches the access request; S4, if the access permission level matches the access request, dividing the K groups of private domain knowledge into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level, wherein each group of private domain knowledge is trained with a LoRA sub-model, K=m+n; S5, merging the m LoRA sub-models corresponding to the m groups of accessible knowledge to obtain a merged model, and opening the access right of the merged model to the current user, wherein the current user obtains the m groups of accessible knowledge through the merged model.

2. The private domain knowledge sharing method for different users according to claim 1 is characterized in that: The historical access information includes the number of historical accesses and the time of the first access, and the identity information is the identity level. Step S2 specifically includes the following steps: S21, dividing the time from the first access time to the current access time into M access time intervals in sequence, and setting a first weight value for each of the access time intervals; S22, obtaining the historical number of visits within each of the visit time intervals; S23, calculating the access permission score of the current user according to the identity level, the number of historical accesses in each access time interval, and the first weight; S24: confirming the access permission level according to the access permission score.

3. The private domain knowledge sharing method for different users according to claim 2 is characterized in that: Step S23 specifically includes calculating the access permission score by the following formula: Where P is the access permission score, λ i is the first weight corresponding to the i-th access time interval, α1 is the second weight, d is the identity level, α2 is the third weight, and χ i is the number of historical visits within the i-th access time interval.

4. The private domain knowledge sharing method for different users according to claim 1 is characterized in that: Step S5 specifically includes the following steps: S51, respectively obtain the first weight matrix and the corresponding weight coefficient corresponding to the first to mth LoRA sub-models; S52, calculating a second weight matrix corresponding to the combined model by the following formula: Where W is the first weight matrix, a j is the weight coefficient of the jth LoRA sub-model, W j is the first weight matrix of the j-th LoRA sub-model; S53: Acquire the merged model according to the second weight matrix.

5. A private domain knowledge sharing system for different users, characterized in that: include: A first acquisition module, the first acquisition module is used to acquire the identity information and historical access information of the current user when receiving an access request from the current user; A confirmation module, the confirmation module is used to confirm the access permission level of the current user according to the identity information and the historical access information; A determination module, the determination module being used to determine whether the access permission level matches the access request; A division module, wherein the division module is used to divide K groups of private domain knowledge into m groups of accessible knowledge and n groups of forgotten knowledge according to the access permission level when the access permission level matches the access request, wherein each group of private domain knowledge is trained with a LoRA sub-model, K=m+n; The second acquisition module is used to merge the m LoRA sub-models corresponding to the m groups of accessible knowledge to obtain a merged model, and open the access right of the merged model to the current user, wherein the current user obtains the m groups of accessible knowledge through the merged model.

6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the private domain knowledge sharing method for different users according to any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a private domain knowledge sharing method for different users according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Fault tree collaborative analysis system based on authority management and model decomposition

    CN104298825A

  • Secure access control method and system for private domain network, and readable storage medium

    CN114221824A

  • Multi-field fine-tuning large model parallel reasoning system and method thereof

    CN117474102A

  • Network malicious writer identification method and system based on AI large model

    CN117743698A

  • Big data system security protection method, device and equipment based on zero-trust architecture

    CN118300797A

Cited By

  • A knowledge sharing method, system and computer device based on large language model

    CN120317384B