Knowledge-controllable large model data processing method, system, device and medium

By determining user permissions and data processing task types in the large model, and selecting and loading the corresponding knowledge plug-ins, the problem of large model output exceeding user permissions is solved, the security and controllability of data processing is achieved, and the security of enterprise data is ensured.

CN118484826BActive Publication Date: 2024-10-29BEIJING VENUS INFORMATION SECURITY TECH +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410943400.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-10-29
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

When large models are used to process internal data within an enterprise, they are unable to construct inference boundaries for data security, causing the output content to exceed user permissions, invalidating access control of enterprise data, and affecting data security.

Method used

By determining the user permissions and data processing task type, select and load the corresponding knowledge plug-in, change the large model into a fine-tuned large model, and make it perform inference based on the data processing task type to ensure that the inference results do not exceed the user permissions.

Benefits of technology

It achieves safe and controllable content boundaries during large model data processing, ensuring the security and compliance of data access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118484826B_ABST
    Figure CN118484826B_ABST
Patent Text Reader

Abstract

A method, system, device and medium for processing data of a knowledge-controllable large model, which relates to the field of artificial intelligence technology, wherein the method comprises: when a user requests a large model to process data, determining the user's authority and the type of data processing task; based on the user's authority and the type of data processing task, determining a target knowledge plug-in from knowledge plug-ins obtained by pre-training the large model with data of different authority and type, the knowledge plug-in includes a network structure and weight information generated after fine-tuning the large model; loading the target knowledge plug-in into the large model, changing the large model to a fine-tuned large model, so that the fine-tuned large model performs reasoning based on the type of data processing task, and the reasoning result does not include content that exceeds the user's authority; using the fine-tuned large model to respond to the user's data processing instruction. It realizes the construction of data access boundaries according to the user's authority, thereby ensuring data security when the large model processes data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of artificial intelligence, and in particular to a knowledge-controllable large-model data processing method, system, device and medium. Background Art

[0002] A big model refers to a complex model with a large number of parameters in the field of machine learning. It can process and understand large amounts of data and is widely used in many fields of artificial intelligence. Due to its powerful data processing capabilities, more and more enterprise users are using big models to help their business automation and intelligence levels. Enterprises need to continuously use internal data to fine-tune big models so that the internal knowledge of big models is timely to meet the latest needs of various business applications.

[0003] In practice, in order to ensure data security, different business departments and business personnel usually have different data access permissions. After the enterprise uses internal data to fine-tune the big model, since the big model cannot build a data security reasoning boundary, when the business personnel in the enterprise use the big model to process data, the data output by the big model may exceed the business personnel's access permissions, making the access control boundary of the enterprise's internal data invalid, which has a negative impact on the security of the enterprise data. Summary of the invention

[0004] The embodiments of the present disclosure provide a knowledge-controllable large-model data processing method, system, device and medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a knowledge-controllable big model data processing method, comprising: when a user requests a big model to process data, determining the user's authority and the type of data processing task; based on the user's authority and the type of data processing task, determining a target knowledge plug-in from knowledge plug-ins pre-trained on the big model using data of different authorities and types, the knowledge plug-in including a network structure and weight information generated after fine-tuning the big model; loading the target knowledge plug-in into the big model, changing the big model to a fine-tuned big model, so that the fine-tuned big model performs reasoning based on the type of data processing task, and the reasoning result does not include content that exceeds the user's authority; and using the fine-tuned big model to respond to the user's data processing instructions.

[0006] In a second aspect, an embodiment of the present disclosure provides a knowledge-controllable big model data processing system, comprising: a request receiving module, configured to receive a user's data processing request, and determine the user's authority and the type of data processing task; a boundary routing module, configured to determine a target knowledge plug-in from knowledge plug-ins obtained by pre-training the big model with data of different authorities and types according to the user's authority and the type of data processing task, the knowledge plug-in including a network structure and weight information generated after fine-tuning the big model; a model structure control module, configured to load the target knowledge plug-in into the big model, and change the big model to a fine-tuned big model, so that the fine-tuned big model performs reasoning based on the type of data processing task, and the reasoning result does not include content that exceeds the user's authority; a model reasoning module, configured to respond to the user's data processing instructions using the fine-tuned big model.

[0007] In a third aspect, an embodiment of the present disclosure provides a knowledge-controllable large model data processing device, comprising a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the knowledge-controllable large model data processing method in the above-mentioned embodiment can be implemented.

[0008] In a fourth aspect, an embodiment of the present disclosure provides a non-volatile computer storage medium, which stores a computer program. When the computer program is executed by a processor, the knowledge-controllable large model data processing method in the above embodiment is implemented.

[0009] According to the data processing method of the disclosed embodiment, when a user requests a big model to process data, a target knowledge plug-in can be selected according to the user's authority and the type of data processing task, and then the big model can be changed to a fine-tuned big model according to the target knowledge plug-in, so that the fine-tuned big model can perform reasoning according to the type of data processing task, and the reasoning result does not include content that exceeds the user's authority. The data access boundary is dynamically constructed according to the user's authority, which can not only use a big model to process different types of reasoning tasks, but also realize the security and controllability of the content boundary generated by the big model reasoning, and ensure data security when the big model processes data.

[0010] Other features and advantages of the present disclosure will be described in the following description, and partly become clearer from the description, or understood by implementing the present disclosure. Other advantages of the present disclosure can be realized and obtained by the schemes described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to provide an understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure.

[0012] Figure 1 A schematic diagram of the structure of an embodiment of the knowledge-controllable large-model data processing system disclosed in the present invention;

[0013] Figure 2 A flowchart of an embodiment of the knowledge-controllable large model data processing method disclosed in the present invention;

[0014] Figure 3 A schematic diagram of a process of generating a knowledge plug-in in one embodiment of the knowledge-controllable large model data processing method disclosed in the present invention;

[0015] Figure 4 A schematic diagram of a process of determining a target knowledge plug-in in one embodiment of the knowledge-controllable large model data processing method disclosed herein;

[0016] Figure 5 A schematic diagram of a process of determining a target knowledge plug-in in one embodiment of the knowledge-controllable large model data processing method disclosed herein;

[0017] Figure 6 The present invention is a flowchart of another embodiment of the knowledge-controllable large model data processing method disclosed in the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present disclosure can be combined with each other arbitrarily without conflict.

[0019] The embodiments of the present disclosure are not necessarily limited to the dimensions shown in the drawings, and the shapes and sizes of the components in the drawings do not reflect the true proportions. In addition, the drawings schematically show ideal examples, and the embodiments of the present disclosure are not limited to the shapes or values ​​shown in the drawings.

[0020] In the present disclosure, ordinal numbers such as “first” and “second” are provided to avoid confusion among constituent elements and do not indicate any order, quantity or importance.

[0021] Figure 1 A schematic diagram of the structure of an embodiment of the knowledge controllable large model data processing system disclosed in the present invention is shown as follows: Figure 1As shown, the system includes: a request receiving module 110, configured to receive a user's data processing request and determine the user's authority and the type of data processing task; a boundary routing module 120, configured to determine a target knowledge plug-in from knowledge plug-ins obtained by pre-training a large model using data of different authorities and types according to the user's authority and the type of data processing task, the knowledge plug-in including a network structure and weight information generated after fine-tuning the large model; a model structure control module 130, configured to load the target knowledge plug-in into the large model, and change the large model to a large model fine-tuned using the knowledge plug-in, so that the fine-tuned large model performs reasoning based on the type of data processing task, and the reasoning result does not include content that exceeds the user's authority; a model reasoning module 140, configured to respond to the user's data processing instructions using the fine-tuned large model.

[0022] In this embodiment, the large model can be privately deployed on a local server, and can provide data processing services for internal staff of the enterprise; the large model can also be deployed on a cloud server, and can provide data processing services for cloud tenants. Usually, after the training of the large model is completed, the large model needs to be fine-tuned through training so that the fine-tuned large model can be applied to different downstream tasks. Fine-tuning refers to the process of training the large model using a fine-tuning algorithm to obtain fine-tuning weights and network structure. In this process, the weight of the large model itself remains unchanged. Loading the fine-tuning weights and network structure to the large model can change the large model to a model loaded with fine-tuning weights, that is, the fine-tuned large model. Subsequently, the fine-tuning weights and network structure in the fine-tuned large model are unloaded, and the fine-tuned large model can be restored to the large model body (that is, the large model before fine-tuning).

[0023] In this embodiment, before fine-tuning the large model, the training data required for fine-tuning can be divided into multiple data sets according to the security level of the data and the type of downstream tasks, and each data set corresponds to a permission and task type. Afterwards, the large model is trained separately using each data set, and the parameters obtained by training (for example, network structure and weights) are not merged with the parameters of the large model, but are saved separately in the form of a knowledge plug-in. As an example, a low-rank adaptation (LoRA) fine-tuning algorithm can be used to train the large model using different data sets to obtain the weights of the low-rank matrix corresponding to each data set, and save them separately in the form of a LoRA Adapter knowledge plug-in. Subsequently, the knowledge plug-in can be loaded into the large model to change the large model to the fine-tuned large model. Since the knowledge plug-in is trained based on the data set of corresponding permissions and types, it can ensure that the fine-tuned large model can only be inferred based on the corresponding type of task, and will not output content that exceeds the permissions of the knowledge plug-in.

[0024] Afterwards, the permissions and task types of the data set can be used as permissions and task types of the knowledge plug-in and as description information of the knowledge plug-in, so that the boundary routing module 120 can retrieve matching target knowledge plug-ins from the knowledge plug-ins according to the user's permissions and the type of data processing tasks.

[0025] In some optional implementations of this embodiment, the knowledge controllable large model data processing system may further include a knowledge plug-in library 150 for storing and managing knowledge plug-ins. The knowledge plug-in library 150 may also provide a configuration acquisition interface for the knowledge plug-in so that the edge routing module 120 may obtain the description information of the knowledge plug-in through the interface.

[0026] Here, the permissions of knowledge plug-ins correspond to the permissions of users. Users can only call knowledge plug-ins with permissions lower than or equal to their permissions, but cannot call knowledge plug-ins with permissions higher than their permissions. User permissions can be predetermined by the deployer of the large model (such as an enterprise). For example, enterprise users can determine the permissions of each user based on the department and position of internal personnel, and then determine the correspondence between user identification and permissions.

[0027] When the request receiving module 110 receives a data processing request from a user, the user's authority can be determined according to the user identifier, and the type of the data processing task can be determined according to the data processing request. For example, when the type of the data processing task is not specified in the user's data processing request, the request receiving module 110 can call the classification model to estimate the type of the data processing task based on the user's information, historical request records, and the user's data processing request, and send the user's authority and the type of the data processing task to the edge routing module 120.

[0028] The boundary routing module 120 can determine the knowledge plug-in whose authority does not exceed that of the user as the knowledge plug-in that can be called by the user, and then determine one or more knowledge plug-ins with the highest degree of match from the callable knowledge plug-ins according to the type of data processing task as the target knowledge plug-in, and send the identifier of the target knowledge plug-in to the model structure control module 130.

[0029] The model structure control module 130 can obtain the target knowledge plug-in according to the identifier of the target knowledge plug-in, and then make structural changes to the large model according to the network structure and weight information included in the target knowledge plug-in. As an example, the model structure control module 130 can read the network structure in the target knowledge plug-in from the disk or the processor's memory, and create a submodule object, and then assign the weight information in the target knowledge plug-in to the submodule object, and by modifying the configuration object loaded into the memory by the large model, the network structure in the target knowledge plug-in is embedded in the specified position in the network layer of the large model to obtain a fine-tuned large model.

[0030] After the structural modification of the large model is completed, the model inference module 140 can encapsulate the fine-tuned large model according to the network structure of the fine-tuned large model and the storage address of the weight information, so as to use the fine-tuned large model to respond to the user's data processing instructions.

[0031] In some optional implementations of this embodiment, when the user's data processing task is completed, the model structure control module 130 can uninstall the target knowledge plug-in from the fine-tuned big model to restore the fine-tuned big model to the big model body (i.e., the big model without any knowledge plug-in loaded); or, when receiving a data processing request from a new user, the target knowledge plug-in in the fine-tuned big model can be directly replaced with a new target knowledge plug-in to obtain a new fine-tuned big model to respond to the data processing request from the new user.

[0032] In some optional implementations of this embodiment, the knowledge-controllable large model data processing system may further include a runtime library 160 for storing the code required for the large model to run. As an example, the runtime library may be a Transformer library, in which encapsulation code may be stored. The model reasoning module 140 may call the corresponding code from the runtime library 160 to encapsulate the fine-tuned large model according to the storage address of the structure and weight information of the fine-tuned large model, so as to respond to the user's data processing instructions using the fine-tuned large model.

[0033] The knowledge-controllable big model data processing system in this embodiment can determine the target knowledge plug-in according to the user's authority and the type of data processing task, and then change the big model to a fine-tuned big model according to the target knowledge plug-in, so that the fine-tuned big model can perform reasoning according to the type of data processing task, and a big model can be used to process different types of reasoning tasks; and the reasoning results do not include content that exceeds the user's authority, thereby realizing the dynamic construction of data access boundaries according to the user's authority, which can ensure data security when the big model processes data.

[0034] In some optional implementations of this embodiment, the knowledge-controllable large model data processing system also includes a preloading module 170, which is configured to: preload the knowledge plug-in into a preset buffer; load the weight information in the knowledge plug-in into the memory of the processor, and determine the storage address of the weight information in the knowledge plug-in in the memory.

[0035] In this embodiment, the processor can be a CPU or GPU of a local server or cloud server running a large model, and the buffer can be set in the memory of the processor. When the data processing system is started, the preloading module 170 can preload the knowledge plug-ins in the knowledge plug-in library into the buffer, load the weight information in each knowledge plug-in into the memory of the processor, and determine the storage address of the weight information in the memory. In this way, the model structure control module 130 can directly call the target knowledge plug-in from the buffer, and the model reasoning module 140 can assign the network structure of the large model according to the storage address of the weight information in the memory, which helps to improve the efficiency of data processing.

[0036] Figure 2 A flowchart of an embodiment of the knowledge-controllable large model data processing method disclosed in the present invention is shown as follows: Figure 2 As shown, the process includes the following steps.

[0037] Step 210: When a user requests the large model to process data, the user's authority and the type of data processing task are determined.

[0038] The data processing method in this embodiment can be Figure 1 The data processing system in the illustrated embodiment is implemented such that when the data processing system is deployed on a local server, the execution subject of the data processing method may be the local server; when the data processing system is deployed on the cloud, the execution subject of the data processing method may be the cloud server.

[0039] A user or cloud tenant can send a data processing request to an execution entity (for example, a local server or a cloud server) through a terminal device. When the execution entity receives the request, it can determine the user's permissions based on the user identifier carried in the request and determine the type of data processing task based on the request.

[0040] In this embodiment, the deployer of the big model (eg, an enterprise user or a cloud tenant) can determine the user's permissions when the user (ie, the caller of the big model) registers, so that different registered users can call different knowledge plug-ins.

[0041] In some optional implementations of this embodiment, the permissions of the registered user can be determined based on the registered user's information. As an example, the information may include at least one of the following: department information, position information; then, the correspondence between the registered user's identification and permissions is determined to determine the user's permissions based on the user identification.

[0042] Step 220: Based on the user's authority and the type of data processing task, a target knowledge plug-in is determined from knowledge plug-ins obtained by pre-training a large model using data of different authorities and types.

[0043] Among them, the knowledge plug-in includes the network structure and weight information generated after fine-tuning the large model.

[0044] In this embodiment, the knowledge plug-in is a parameter obtained by pre-training the large model based on data sets of different permissions and types, and can generally include network structure and weight information. The target knowledge plug-in refers to a knowledge plug-in that matches the task type requested by the user and does not exceed the user's permissions. The execution subject can first determine the knowledge plug-ins that the user can call based on the user's permissions, and then determine the best matching target knowledge plug-in from the knowledge plug-ins that can be called based on the type of data processing task.

[0045] As an example, matching knowledge plug-ins may be screened out from the knowledge plug-ins according to the type of data processing task, and then the user's permissions are compared with the permissions of each screened knowledge plug-in, and one or more knowledge plug-ins whose permissions do not exceed the user's permissions are determined as target knowledge plug-ins.

[0046] Step 230: load the target knowledge plug-in into the big model, and change the big model to a fine-tuned big model, so that the fine-tuned big model performs reasoning based on the type of data processing task, and the reasoning result does not include content that exceeds the user's authority.

[0047] Step 240: Use the fine-tuned large model to respond to the user's data processing instructions.

[0048] In this embodiment, the fine-tuned large model can be encapsulated as an algorithm instance according to the network structure and weight information of the fine-tuned large model to respond to the user's data processing instructions.

[0049] In a specific example, an enterprise can privatize the deployment of a large model, and the execution subject can be the local server of the enterprise. The staff of the enterprise can send data processing requests to the local server through the terminal device to call the large model to execute various types of downstream tasks. Assuming that the enterprise includes three departments: the president's office, the human resources department, and the R&D department, the staff of the president's office has the highest authority, that is, they can access all data and call all knowledge plug-ins, and the authority of the staff of the human resources department and the R&D department is limited to accessing the data of their own department. The knowledge plug-in library includes the following knowledge plug-ins: the downstream task applicable to knowledge plug-in 1 is to generate an operation report for the entire company, which can include all data and information of finance and R&D, and the authority is the highest; the downstream task applicable to knowledge plug-in 2 is to analyze the company's human resources data and generate an analysis report, which can include data such as the salary situation and resume of all personnel, and the authority is consistent with the access rights of the human resources department; the downstream task applicable to knowledge plug-in 3 is to analyze the status of the R&D project and generate a report, which can include information such as user needs, R&D investment, project progress, and technical solutions used, and the authority is consistent with the authority of the R&D department.

[0050] User A from the President's Office initiates a data processing request to the data processing system: Please generate a technology trend analysis report used in the company's projects in the past three years, and analyze the development of user needs. User C from the R&D department initiates a data processing request: What is the average salary of R&D personnel who have been employed for three years?

[0051] After receiving the data processing requests from user A and user C, the data processing system retrieves the information based on the user A's ID that user A has the calling rights for knowledge plug-in 1, knowledge plug-in 2, and knowledge plug-in 3, while user C only has the calling rights for knowledge plug-in 3. Combining the data processing requests from user A and user C, it is determined that the type of user A's data processing task matches knowledge plug-in 1 and knowledge plug-in 3, and the target knowledge plug-ins corresponding to user A are knowledge plug-in 1 and knowledge plug-in 3. Afterwards, the data processing system can load knowledge plug-in 1 and / or knowledge plug-in 3 into the large model, output the corresponding inference results, and continue to respond to user A's subsequent data processing instructions.

[0052] Although user C's data processing request matches knowledge plug-in 3, user C does not have the calling permission for knowledge plug-in 3. Therefore, the target knowledge plug-in of user C does not exist. The data processing system can reject user C's data processing request or directly use the large model ontology without the knowledge plug-in to respond to user C's data processing request.

[0053] exist Figure 2 In the illustrated embodiment, when a user requests a large model to process data, a target knowledge plug-in can be selected based on the user's authority and the type of data processing task, and then the large model can be changed to a fine-tuned large model based on the target knowledge plug-in, so that the fine-tuned large model can perform reasoning according to the type of data processing task, and the reasoning result does not include content that exceeds the user's authority. The data access boundary is dynamically constructed based on the user's authority, which can not only use a large model to process different types of reasoning tasks, but also achieve the security and controllability of the content boundary generated by the large model reasoning, thereby ensuring data security when the large model processes data.

[0054] Next reference Figure 3 , Figure 3 FIG. 1 is a flow chart showing a process of generating a knowledge plug-in in an embodiment of the knowledge controllable large model data processing method disclosed in the present invention. Figure 3 As shown, the process includes the following steps.

[0055] Step 310: Obtain the data set required for training the large model as well as the permission information and task type information of the data set.

[0056] Step 320: Based on the low-rank adaptive fine-tuning algorithm, the large model is trained using the data set, and the trained network structure and weight information are stored as a knowledge plug-in.

[0057] Step 330: Determine the permission information of the knowledge plug-in based on the permission information of the data set.

[0058] Step 340: Determine the task type applicable to the knowledge plug-in based on the task type information of the data set.

[0059] In this embodiment, each knowledge plug-in is trained based on a separate data set, and the permissions and task types of the data set can be used as the permissions and task types of the knowledge plug-in.

[0060] In this embodiment, the deployer of the large model can divide all data into multiple data sets according to the security level of the data and the type of downstream tasks, and each data set corresponds to a permission information and task type information. When fine-tuning the large model, different data sets can be selected for different downstream tasks to train the large model separately, and the trained network structure and weight information are stored in the form of knowledge plug-ins instead of being merged with the parameters of the large model, so as to obtain the knowledge plug-in corresponding to each data set, and the knowledge plug-in has the same permissions and task type as the data set.

[0061] Reference below Figure 4 , Figure 4 A schematic diagram of a process for determining a target knowledge plug-in in an embodiment of the knowledge controllable large model data processing method disclosed in the present invention is shown as follows: Figure 4 As shown, the process includes the following steps.

[0062] Step 410: Compare the user's authority with the authority information of each knowledge plug-in, and determine the knowledge plug-in that is not higher than the user's authority as a callable knowledge plug-in.

[0063] In some optional implementations of this embodiment, in the absence of a callable knowledge plug-in, the user's data processing instructions are rejected or a large model is used to respond to the user's data processing instructions to avoid adverse effects on data security.

[0064] Step 420: Determine a target knowledge plug-in from the callable knowledge plug-ins according to the type of the data processing task and the task type of the callable knowledge plug-in.

[0065] In this embodiment, the knowledge plug-ins that can be called by the user can be determined first according to the user's permissions, and then the target plug-in can be determined from the callable knowledge plug-ins according to the type of data processing task. This can determine the target knowledge plug-in more quickly and accurately, which helps to improve the efficiency of data processing.

[0066] In some embodiments, the above step 420 may further include: Figure 5 The process shown is as follows Figure 5 As shown, the process includes the following steps.

[0067] Step 510: Determine the knowledge plug-in corresponding to the classification task from the knowledge plug-ins, and load the knowledge plug-in into the large model to obtain a classification model.

[0068] Step 520: Use the classification model to determine the knowledge plug-in with the highest degree of matching with the type of the data processing task from the callable knowledge plug-ins as the target knowledge plug-in.

[0069] In this embodiment, a knowledge plug-in corresponding to a classification task may be generated in advance so that the knowledge plug-in can be loaded into a large model to generate a classification model, and the classification model can be used to determine a target knowledge plug-in.

[0070] As an example, the classification model can use a prompt word template to identify knowledge plug-ins based on the user's data processing request. For example, the classification model can be input with: Please select a scenario that matches the user's question (Query, i.e., the data processing request sent by the user) from the given scenario list, and return the corresponding knowledge plug-in identifier. The classification model can then return the identifiers of one or more target knowledge plug-ins that best match the user's data processing request.

[0071] Figure 6 A flow chart of another embodiment of the knowledge-controllable large model data processing method disclosed in the present invention is shown as follows: Figure 6 As shown, the process includes the following steps.

[0072] Step 610: When a user requests the large model to process data, the user's authority and the type of data processing task are determined.

[0073] Step 620: Based on the user's authority and the type of data processing task, determine the target knowledge plug-in from the knowledge plug-ins obtained by pre-training the large model with data of different authorities and types.

[0074] Step 630: embed the network structure in the knowledge plug-in into the specified network layer in the large model.

[0075] Step 640: Determine the weight of the network structure in the knowledge plug-in based on the weight information in the knowledge plug-in.

[0076] It should be noted that this embodiment does not limit the order of step 630 and step 640 . In other embodiments, step 640 may be executed before step 630 .

[0077] In some optional implementations of this embodiment, step 640 can be implemented in the following manner: determine the storage address of the weight information in the knowledge plug-in in the memory; assign the storage address to the large model after embedding the network structure.

[0078] Step 650: Use the fine-tuned large model to respond to the user's data processing instructions.

[0079] As an example, the execution entity can call the corresponding code to encapsulate the fine-tuned large model into an algorithm instance according to the storage address of the network structure and weight information of the fine-tuned large model, so as to respond to the user's data processing instructions.

[0080] from Figure 6 It can be seen from the illustrated embodiment that the network structure and weights of the large model can be adjusted according to the target knowledge plug-in, so that the large model can perform reasoning according to the type of data processing task within the scope of the target knowledge plug-in's authority, thereby establishing the data processing boundary of the large model, which helps to improve the data security level when the large model processes data.

[0081] In some embodiments, before the above step 630, the method may further include: preloading the target knowledge plug-in into the memory of the processor.

[0082] As an example, the execution subject can preload all knowledge plug-ins into the processor's memory when the knowledge-controllable large model data processing system is started, or preload the target knowledge plug-in into the processor's memory after step 620. In this way, when the execution subject changes the large model to a fine-tuned large model, the target knowledge plug-in can be read directly from the processor's memory, which takes less time than reading the target knowledge plug-in from the disk, and helps to improve data processing efficiency.

[0083] An embodiment of the present disclosure also provides a knowledge-controllable large model data processing device, including a processor and a memory storing a computer program. In some embodiments, when the computer program is executed by the processor, the knowledge-controllable large model data processing method in any of the above embodiments can be implemented.

[0084] The embodiments of the present disclosure also provide a non-transitory computer storage medium storing a computer program. In some embodiments, when the computer program is executed by a processor, the knowledge-controllable large model data processing method in any of the above embodiments is implemented.

[0085] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

Claims

1. A knowledge-controllable large model data processing method, characterized in that: include: When a user requests the large model to process data, determining the user's authority and the type of data processing task; Based on the authority of the user and the type of the data processing task, a target knowledge plug-in is determined from knowledge plug-ins obtained by pre-training the large model using data of different authorities and types, wherein the knowledge plug-in includes network structure and weight information generated by fine-tuning the large model using data sets corresponding to the authority and task type, and the knowledge plug-in is saved separately and is not merged with the parameters of the large model; preloading the target knowledge plug-in into a memory of a processor; Loading the target knowledge plug-in into the large model, changing the large model to a fine-tuned large model, so that the fine-tuned large model performs reasoning based on the type of the data processing task, and the reasoning result does not include content that exceeds the authority of the user; Responding to the data processing instruction of the user using the fine-tuned large model; Among them, the target knowledge plug-in is loaded into the large model, and the large model is changed into a fine-tuned large model, including: embedding the network structure in the target knowledge plug-in into the network layer specified in the large model; determining the storage address of the weight information in the target knowledge plug-in in the memory; assigning the storage address to the large model after the embedded network structure, so as to determine the weight of the network structure in the target knowledge plug-in based on the weight information in the target knowledge plug-in.

2. The method according to claim 1, characterized in that The knowledge plug-in is obtained in the following manner: Obtaining a data set required for training the large model as well as permission information and task type information of the data set; Based on a low-rank adaptive fine-tuning algorithm, the large model is trained using the data set, and the network structure and weight information obtained through training are stored as the knowledge plug-in; Determining permission information of the knowledge plug-in based on the permission information of the data set; Based on the task type information of the data set, a task type applicable to the knowledge plug-in is determined.

3. The method according to claim 2, characterized in that Based on the authority of the user and the type of the data processing task, a target knowledge plug-in is determined from knowledge plug-ins obtained by pre-training the large model with data of different authorities and types, including: Comparing the authority of the user with the authority information of each of the knowledge plug-ins, and determining the knowledge plug-ins whose authority is not higher than that of the user as callable knowledge plug-ins; The target knowledge plug-in is determined from the callable knowledge plug-ins according to the type of the data processing task and the task type of the callable knowledge plug-in.

4. The method according to claim 3, characterized in that The method further comprises: In the absence of the callable knowledge plug-in, the execution of the user's data processing instruction is refused or the large model is used to respond to the user's data processing instruction.

5. The method according to claim 3, characterized in that: Determining the target knowledge plug-in from the callable knowledge plug-ins according to the type of the data processing task and the task type of the callable knowledge plug-in includes: Determine a knowledge plug-in corresponding to the classification task from the knowledge plug-ins, and load the knowledge plug-in into the large model to obtain a classification model; The classification model is used to determine the knowledge plug-in with the highest degree of matching with the type of the data processing task from the callable knowledge plug-ins as the target knowledge plug-in.

6. The method according to claim 1, characterized in that The method further comprises: Determining the authority of the registered user according to the information of the registered user, wherein the information of the registered user includes at least one of the following: department information and position information; Determine the correspondence between the identifier and the authority of the registered user.

7. A knowledge-controllable large-model data processing system, characterized in that: include: A request receiving module, configured to receive a data processing request from a user and determine the authority of the user and the type of data processing task; A boundary routing module is configured to determine a target knowledge plug-in from knowledge plug-ins obtained by pre-training a large model using data of different permissions and types according to the permissions of the user and the type of the data processing task, wherein the knowledge plug-in includes a network structure and weight information generated by fine-tuning the large model using data sets of corresponding permissions and types; A preloading module, configured to preload the target knowledge plug-in into a memory of a processor; A model structure control module is configured to load the target knowledge plug-in into the large model, and change the large model to a fine-tuned large model, so that the fine-tuned large model performs reasoning based on the type of the data processing task, and the reasoning result does not include content that exceeds the authority of the user; A model reasoning module, configured to respond to the user's data processing instruction using the fine-tuned large model; The model control module is configured to load the target knowledge plug-in into the large model and change the large model into a fine-tuned large model, including: embedding the network structure in the target knowledge plug-in into a specified network layer in the large model; determining the storage address of the weight information in the target knowledge plug-in in the memory; and assigning the storage address to the large model after the network structure is embedded, so as to determine the weight of the network structure in the target knowledge plug-in based on the weight information in the target knowledge plug-in.

8. The system according to claim 7, characterized in that The system further includes a knowledge plug-in library configured to store and manage the knowledge plug-in.

9. The system according to claim 7, characterized in that The preloading module is further configured to: preload the knowledge plug-in into a preset buffer; load the weight information in the knowledge plug-in into the memory of the processor, and determine the storage address of the weight information in the knowledge plug-in in the memory.

10. The system according to claim 7, characterized in that The system also includes a runtime library configured to store codes required for the large model to run; as well as, The model reasoning module is configured to respond to the user's data processing instruction using the fine-tuned large model, including: Based on the network structure and weight information of the fine-tuned large model, the code required for runtime is called from the runtime library to utilize the fine-tuned large model to respond to the user's data processing instructions.

11. A knowledge-controllable large-scale model data processing device, comprising a processor and a memory storing a computer program, characterized in that: When the computer program is executed by the processor, the knowledge-controllable large model data processing method described in any one of claims 1 to 6 can be implemented.

12. A non-transitory computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the knowledge-controllable large model data processing method as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Oral medicine hospital guide method and system based on plug-in instruction fine tuning and enlarging model

    CN118230985A