Data processing method and device based on data classification and grading and storage medium

By performing classification and classification processing and permission matching on database data, a data classification and classification matrix is ​​generated, which solves the problem of lack of flexibility and security in data security management and control in the existing technology, and achieves refined control of data access by users and language models. Improved data management flexibility and security.

CN118484792APending Publication Date: 2024-08-13ZHONGKE YUNGU TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410672398.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-08-13

AI Technical Summary

Technical Problem

Existing data processing solutions lack flexibility and security in data security management and control, and cannot accurately control data in different forms and needs.

Method used

Using a processing method based on data classification and grading, by classifying and grading the data in the database, the data short code corresponding to each level of data is determined, and a data classification and grading matrix is ​​generated based on the matching of user permissions with plug-ins and knowledge bases. Data not accessible except by the user or language model.

Benefits of technology

It improves the flexibility and controllability of data management, ensures that data without permission is automatically filtered out when users ask questions through the language model, and enhances data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118484792A_ABST
    Figure CN118484792A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method based on data classification and grading. The data processing method comprises the following steps: performing classification and grading processing on data in a database, and determining a data short code corresponding to each grade of data; obtaining a question text input by a user; determining a first plug-in and a first knowledge base matched with the question text; determining first data corresponding to the first plug-in and a second plug-in successfully matched with the authority of the user in the first knowledge base and second data corresponding to a second knowledge base; under the condition that it is determined that the access authority for the first data and the second data exists, the data size of the first data and the data size of the second data are obtained respectively, and a data classification and grading matrix of the problem text is generated in combination with the corresponding data short codes; and combining the data classification and grading matrix with a preset data processing algorithm to determine a target data classification and grading matrix so as to determine an answer text for the question text. According to the invention, the flexibility and security of data management and control can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and specifically to a data processing method, device and storage medium based on data classification and grading. Background Art

[0002] The current data processing solutions on the market have obvious defects, mainly reflected in the oversimplification of data security control. The existing technology can only input all data into the neural network language model, or completely exclude it from the neural network language model, and cannot accurately control the data. Therefore, the existing technology cannot meet various scenarios under different forms and requirements, and lacks flexibility and security. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a data processing method, device and storage medium based on data classification and grading, so as to solve the problem of lack of flexibility and security in data management and control in the prior art.

[0004] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a data processing method based on data classification and grading, the data processing method comprising:

[0005] Classify and grade the data in the database, and determine the data short code corresponding to each level of data;

[0006] Get the question text entered by the user;

[0007] Determining a first plug-in and a first knowledge base that matches the question text;

[0008] Matching the permissions of the first plug-in with the permissions of the user, and determining a second plug-in in the first plug-in that successfully matches the permissions of the user;

[0009] Matching the authority of the first knowledge base with the authority of the user, and determining a second knowledge base in the first knowledge base that successfully matches the authority of the user;

[0010] Calling the second plug-in and the second knowledge base to obtain the first data corresponding to the second plug-in and the second data corresponding to the second knowledge base;

[0011] In a case where it is determined that there is access permission for the first data and the second data, obtaining a first data size of the first data and a second data size of the second data;

[0012] Generate a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data;

[0013] Determine the target data classification and grading matrix based on the data classification and grading matrix and a preset data processing algorithm;

[0014] Determine the answer text for the question text according to the target data classification and classification matrix.

[0015] In an embodiment of the present application, the data processing method also includes: determining the first data matrix and the second data matrix based on the data classification and grading matrix when it is determined that there is no access permission to the first data and / or the second data; determining a temporary data matrix based on the first data matrix and a preset data processing algorithm; and determining the target data classification and grading matrix based on the temporary data matrix and the second data matrix.

[0016] In an embodiment of the present application, determining the first data matrix and the second data matrix based on the data classification and grading matrix includes: obtaining data short codes corresponding to the first data and / or second data without access rights to construct the first data matrix; and determining the second data matrix based on the data classification and grading matrix and the first data matrix.

[0017] In an embodiment of the present application, generating a data classification and grading matrix for a question text according to a first data size, a second data size, a data short code corresponding to the first data, and a data short code corresponding to the second data includes: creating an empty data classification and grading matrix; determining the total number of elements in the data classification and grading matrix according to the first data size and the second data size; determining each element in the data classification and grading matrix according to the data short code corresponding to the first data and the data short code corresponding to the second data.

[0018] In an embodiment of the present application, generating a data classification and grading matrix for the question text based on the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data also includes: the number of elements of the data short code corresponding to the first data in the data classification and grading matrix corresponds to the value of the first data size; the number of elements of the data short code corresponding to the second data in the data classification and grading matrix corresponds to the value of the second data size.

[0019] In an embodiment of the present application, generating a corresponding data classification and grading matrix based on the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data also includes: determining the authority with a higher authority level in the first data and the second data as the authority of the data classification and grading matrix.

[0020] In an embodiment of the present application, the data processing method also includes: when the permissions of the first plug-in do not match the permissions of the user, shielding the data received from the first plug-in; when the permissions of the first knowledge base do not match the permissions of the user, shielding the data received from the first knowledge base.

[0021] In an embodiment of the present application, the data processing method further includes: when the data corresponding to the first plug-in is not classified and graded, setting the classification and grade of the first plug-in to the classification and grade of the data corresponding to the first plug-in.

[0022] A second aspect of the present application provides a data processing device based on data classification and grading, the data processing device comprising:

[0023] a memory configured to store instructions; and

[0024] The processor is configured to call instructions from a memory and implement a data processing method based on data classification and grading when executing the instructions.

[0025] A third aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute a data processing method based on data classification and grading.

[0026] Through the above technical scheme, the data in the database are classified and graded in advance, and the data short code corresponding to each level of data is determined; the question text input by the user is obtained, the permissions of the first plug-in and the first knowledge base that hit the question text are matched with the user's permissions, and the second plug-in and the second knowledge base that successfully match the user's permissions in the first plug-in and the first knowledge base are determined; the second plug-in and the second knowledge base are called and the first data output by the second plug-in and the second data output by the second knowledge base are received; in the case of determining that there is access permission for the first data and the second data, the first data size of the first data and the second data size of the second data are obtained; then a data classification and grading matrix for the question text is generated according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data; based on the data classification and grading matrix and the preset data processing algorithm, a target data classification and grading matrix is ​​determined; finally, the answer text for the question text is determined according to the target data classification and grading matrix. The present application can classify and grade users and various types of data in an actual production environment, so that when the user asks questions through a language model, the data that the user or the language model does not have permission to access is automatically screened out according to the classification and grading, thereby improving the flexibility and controllability of data management.

[0027] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:

[0029] Figure 1 A flowchart of a data processing method based on data classification and grading according to an embodiment of the present application is schematically shown;

[0030] Figure 2 A flow chart of a classification and grading data management strategy according to an embodiment of the present application is schematically shown;

[0031] Figure 3 A schematic diagram of a data classification and hierarchical access control matrix algorithm according to an embodiment of the present application is schematically shown;

[0032] Figure 4 The structural block diagram of a data processing device based on data classification and grading according to an embodiment of the present application is schematically shown.

[0033] Description of Reference Numerals

[0034] 410 memory 420 processor DETAILED DESCRIPTION

[0035] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme 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. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0036] If there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their 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 at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0037] Figure 1 The flowchart of a data processing method based on data classification and grading according to an embodiment of the present application is schematically shown. Figure 1 As shown, the embodiment of the present application provides a data processing method based on data classification and grading, which may include the following steps:

[0038] Step 101, classify and grade the data in the database, and determine the data short code corresponding to each level of data;

[0039] In one embodiment, the neural network language model needs to classify and grade the data of each section in the database in advance, and the classification and grading can support data classification and grading authority management at the row level, column level, file level and plug-in level. Preferably, the data classification can be divided into: customer data, financial fields in order data, financial data and knowledge base documents, and the data classification can be divided into L1 public level, L2 internal level, L3 sensitive level, L4 important level and L5 core level. The neural network language model also needs to determine the data short code corresponding to each level of data in advance to facilitate the subsequent calculation of the data classification and grading matrix.

[0040] Step 102, obtaining the question text input by the user;

[0041] In one embodiment, after the user enters the question text into the chat box, the question text will be sent to the neural network language model and processed. For example, the question text received by the neural network language model is: I need to see the historical maintenance record, current location, engine speed of this excavator, and the excavator engine often makes abnormal noises. How to solve this problem?

[0042] Step 103, determining a first plug-in and a first knowledge base that match the question text;

[0043] In one embodiment, the question text sent by the user will be semantically understood by the neural network language model, and will hit a series of plug-ins related to the question text (plug-ins are interfaces, and the functions of the interfaces will be described in natural language. The neural network language model can perform semantic understanding based on the question text raised by the user and the description of the plug-in, thereby determining the plug-in that the neural network language model needs to call) and the knowledge base. Taking the example in step 102 as an example, the neural network model will hit the historical maintenance record plug-in, the current position plug-in, the engine speed questionnaire, the fault knowledge base plug-in, and the fault analysis plug-in. Each plug-in will provide data, and the processor will mix these data together to form an unstructured data, such as mixed text and image data, and then input it into a specific vertical field language model or business language model. Which specific neural network language models or language models are entered depends on the specific business settings.

[0044] Step 104, matching the permissions of the first plug-in with the permissions of the user, and determining a second plug-in in the first plug-in that successfully matches the permissions of the user;

[0045] Step 105, matching the authority of the first knowledge base with the authority of the user, and determining a second knowledge base in the first knowledge base that successfully matches the authority of the user;

[0046] In one embodiment, the processor needs to match the permissions of the first plug-in with the permissions of the user. If the user's permission level is higher than the permission level of the first plug-in, then the second plug-in that successfully matches the user's permissions can be determined. Similarly, if the user's permission level is higher than the permission level of the first knowledge base, then the second knowledge base that successfully matches the user's permissions can be determined. Taking the example in the above steps as an example, it is assumed that there are 3 language models, 1 is a marketing vertical language model, 1 is a financial vertical language model, and 1 is a Microsoft language model. In an actual production environment, some data may not be able to enter the marketing vertical language model, some data may not be able to enter the financial vertical language model, and some data may not be able to enter the Microsoft language model. These data mixed together become an unstructured data (such as mixed text and image data). There is currently no solution in the prior art to achieve refined control of these data. The processor can achieve the inability to access the corresponding plug-in or knowledge base data when the user's permission level is insufficient by matching the user's permission level with the permission level of the plug-in and the knowledge base, thereby achieving flexibility and security in data control.

[0047] Step 106, calling the second plug-in and the second knowledge base to obtain the first data corresponding to the second plug-in and the second data corresponding to the second knowledge base;

[0048] In one embodiment, the neural network language model can obtain the first data corresponding to the second plug-in and the second data corresponding to the second knowledge base by calling the second plug-in and the second knowledge base.

[0049] Step 107, when it is determined that there is access permission for the first data and the second data, obtaining a first data size of the first data and a second data size of the second data;

[0050] In one embodiment, after the neural network language model determines that there is access permission for the first data and the second data, the neural network language model obtains a first data size of the first data and a second data size of the second data. The first data size refers to the byte value of the first data, and the second data size refers to the byte value of the second data.

[0051] Step 108, generating a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data;

[0052] In one embodiment, the neural network language model can generate a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data. The data classification and grading matrix refers to the data short code to be entered into the language model. The data classification and grading matrix contains the short codes corresponding to the data that the user has the authority to call, and the short codes of the data that the user does not have the authority to call have been screened out, so as to achieve flexibility and security of data management. For example, assuming that the data size returned by plug-in 1 is 2 bytes, the classification and grading short code is A, the data size returned by plug-in 2 is 3 bytes, the classification and grading short code is 1, the data size returned by plug-in 3 is 1 byte, the classification and grading short code is F, the data size returned by knowledge base 1 is 3 bytes, the classification and grading short code is 9, and the data size returned by knowledge base 2 is 2 bytes, and the classification and grading short code is Z, then the formed data classification and grading matrix can be expressed as [A, A, 1, 1, 1, F, 9, 9, 9, Z, Z]. That is, the short code "A" corresponding to plug-in 1 with a data size of 2 bytes, the short code "1" corresponding to plug-in 2 with a data size of 3 bytes, the short code "F" corresponding to plug-in 3 with a data size of 1 byte, the short code "9" corresponding to knowledge base 1 with a data size of 3 bytes, and the short code "Z" corresponding to knowledge base 2 with a data size of 2 bytes.

[0053] Step 109, determining a target data classification and grading matrix based on the data classification and grading matrix and a preset data processing algorithm;

[0054] In one embodiment, the preset data processing algorithm refers to the algorithm that the target data classification and grading matrix that should be output after the data classification and grading matrix is ​​processed by the language model. Taking the example in step 108 as an example, assuming that the neural network language model A has a short code of X, and the authority level of the language model A supports access to data of all authority levels, the data classification and grading matrix entering the language model A is [A, A, 1, 1, 1, F, 9, 9, 9, Z, Z], and the data obtained by the language model A after the preset data processing algorithm is [X, X, X, X, X, X, X, X, X, X].

[0055] Step 110, determining the answer text for the question text according to the target data classification and grading matrix.

[0056] In one embodiment, the target data classification and grading matrix includes the data that the language model has the authority to call, and is a matrix composed of short codes obtained after calculation by a preset data processing algorithm. The neural network language model achieves flexibility and security in data management by only calling the data that it has the authority to obtain.

[0057] Through the above technical scheme, the neural network language model classifies and grades the data in the database in advance, and determines the data short code corresponding to each level of data; obtains the question text input by the user, matches the permissions of the first plug-in and the first knowledge base that hit the question text with the user's permissions, and determines the second plug-in and the second knowledge base that successfully matches the user's permissions in the first plug-in and the first knowledge base; calls the second plug-in and the second knowledge base and receives the first data output by the second plug-in and the second data output by the second knowledge base; in the case of determining that there is access permission for the first data and the second data, obtains the first data size of the first data and the second data size of the second data; then generates a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data; determines the target data classification and grading matrix based on the data classification and grading matrix and the preset data processing algorithm; finally determines the answer text for the question text according to the target data classification and grading matrix. The present application can classify and grade users and various types of data in an actual production environment, so that when the user asks questions through the language model, the data that the user or the language model does not have permission to access is automatically screened out according to the classification and grading, thereby improving the flexibility and controllability of data management.

[0058] In one embodiment, the data processing method may further include: determining the first data matrix and the second data matrix based on the data classification and grading matrix when it is determined that there is no access permission to the first data and / or the second data; determining a temporary data matrix based on the first data matrix and a preset data processing algorithm; and determining a target data classification and grading matrix based on the temporary data matrix and the second data matrix.

[0059] In one embodiment, determining the first data matrix and the second data matrix based on the data classification and grading matrix may include: obtaining data short codes corresponding to the first data and / or second data without access rights to construct the first data matrix; and determining the second data matrix based on the data classification and grading matrix and the first data matrix.

[0060] In one embodiment, the first data matrix is ​​composed of short codes corresponding to data that the language model has the authority to access, and the second data matrix is ​​composed of short codes corresponding to data that the language model does not have the authority to access. The language model uses a preset data processing algorithm to form a new temporary data matrix with the short codes in the first data matrix that the language model has the authority to access, and then recombines the temporary data matrix with the second data matrix that the language model does not have the authority to access (putting the elements in the second data matrix back to the position of the data classification and grading matrix where they originally were), thereby obtaining the target data classification and grading matrix.

[0061] As in the example of step 108, assume that language model A has a short code of X and language model A cannot access data with short codes of 1 and F, and language model B has a short code of Y and language model B cannot access data with short code of F. The data that language model A and language model B cannot access will be taken out as the second data matrix of language model A and language model B respectively, and the accessible data will be retained as the first data matrix of language model A and language model B. The data classification matrix entering language model A is [A, A, 9, 9, 9, Z, Z]. Since language model A cannot access data with short codes of 1 and F, the second data matrix is ​​[1, 1, 1, F]. The temporary data matrix output by language model A after processing the first data matrix with a preset data processing algorithm is [X, X, X, X, X, X, X], and after combining with the second data matrix, [X, X, 1, 1, 1, F, X, X, X, X, X] is obtained, and then the matrix is ​​input into language model B. Since language model B cannot access data with short code F, the first data matrix entering language model B is [X,X,1,1,1,X,X,X,X,X] and the temporary data matrix obtained after language model B processes the first data matrix through a preset data processing algorithm is [Y,Y,Y,Y,Y,Y,Y,Y,Y,Y] and language model B then recombines the temporary data matrix with the second data matrix to obtain the final target data classification and grading matrix [Y,Y,Y,Y,Y,F,Y,Y,Y,Y,Y].

[0062] In one embodiment, generating a data classification grading matrix corresponding to the question text based on the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data may include: creating an empty data classification grading matrix; determining the total number of elements in the data classification grading matrix based on the first data size and the second data size; determining each element in the data classification grading matrix based on the data short code corresponding to the first data and the data short code corresponding to the second data.

[0063] In one embodiment, generating a data classification and grading matrix for the question text based on the first data size, the second data size, the data short code corresponding to the first data and the data short code corresponding to the second data also includes: the number of elements of the data short code corresponding to the first data in the data classification and grading matrix corresponds to the value of the first data size; the number of elements of the data short code corresponding to the second data in the data classification and grading matrix corresponds to the value of the second data size.

[0064] In one embodiment, the value of the first data size corresponds to the number of elements of the data short code corresponding to the first data in the data classification and grading matrix, and the value of the second data size corresponds to the number of elements of the data short code corresponding to the second data in the data classification and grading matrix. The data classification and grading matrix is ​​composed of the data short code corresponding to the first data and the data short code corresponding to the second data. The elements in the data classification and grading matrix are the data short code corresponding to the first data and the data short code corresponding to the second data. The total number of elements in the data classification and grading matrix is ​​the sum of the value of the first data size and the value of the second data size. The present application hands the short code of each level of data to the neural network language model for processing in the form of a data matrix and obtains the data that the user has the authority to access and the neural network language model has the authority to access through a preset data processing algorithm, thereby avoiding the situation where the user has insufficient authority but can access some core confidential data. At the same time, the flexibility and security of data management can be achieved by adjusting the authority of the user or data.

[0065] In one embodiment, generating a corresponding data classification and grading matrix based on the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data may also include: determining the authority with a higher authority level in the first data and the second data as the authority of the data classification and grading matrix.

[0066] In one embodiment, after the data is processed by the neural network language model, the classification and grading information of the original data may be disrupted. At this time, the language model determines the processed data as the authority of the data classification and grading matrix according to the authority with a higher authority level in the original data (i.e., the first data and the second data) and continues to pass it to the next language model or form a target data classification and grading matrix, thereby achieving security of data management and control.

[0067] In one embodiment, the data processing method may further include: when the permissions of the first plug-in do not match the permissions of the user, shielding the data received from the first plug-in; when the permissions of the first knowledge base do not match the permissions of the user, shielding the data received from the first knowledge base.

[0068] In one embodiment, if the user's permissions cannot be successfully matched with the permissions of the first plug-in or the permissions of the first knowledge base (that is, the user's permission level is lower than the permission level of the first plug-in or the permission level of the first knowledge base), the language model will block data from the first plug-in or the first knowledge base, thereby ensuring the security of data management.

[0069] In one embodiment, the data processing method may further include: when the data corresponding to the first plug-in is not classified and graded, setting the classification and grade of the first plug-in to the classification and grade of the data corresponding to the first plug-in.

[0070] In one embodiment, if the data corresponding to the first plug-in is not classified and graded, the language model sets the classification and grade of the first plug-in to the classification and grade of the data corresponding to the first plug-in, thereby ensuring the flexibility and security of data management and control.

[0071] Through the above technical solution, the present application can classify and grade users and various types of data in an actual production environment, so that when a user asks a question through a language model, the data that the user or the language model does not have permission to access can be automatically filtered out based on the classification and grading, thereby improving the flexibility and controllability of data management.

[0072] The technical solution of the present application is described below with a specific embodiment.

[0073] like Figure 2 and Figure 3 As shown:

[0074] 1. The language model encodes the data classification and grading. For example, customer data L5 core level, the short code is A, L1 public level, the short code is M, financial data L5 core level, the short code is F, and so on. The short code is composed of calculation codes (single characters: letters, numbers);

[0075] 2. The user asks a question and passes it to the neural network language model. The language model hits plugins 1, 2, 3, and knowledge bases 1 and 2 in order;

[0076] 3. Assume that the user has access rights to plugins 1, 2, 3, and knowledge bases 1 and 2;

[0077] 4. Assuming that the data size returned by plugin 1 is 2 bytes, the classification and grading short code is A, the data size returned by plugin 2 is 3 bytes, the classification and grading short code is 1, the data size returned by plugin 3 is 1 byte, the classification and grading short code is F, the data size returned by knowledge base 1 is 3 bytes, the classification and grading short code is 9, and the data size returned by knowledge base 2 is 2 bytes, and the classification and grading short code is Z, then the data classification and grading matrix that has not been processed by the neural network language model is as follows:

[0078] [A,A,1,

[0079] 1,1,F,

[0080] 9,9,9,

[0081] Z,Z]

[0082] 5. The data corresponding to the data classification and grading matrix will pass through language models A and B. Language model A cannot access data with short codes 1 and F, and language model B cannot access data with short code F. Assume that the classification and grading short code of language model A is X, and the classification and grading short code of language model B is Y.

[0083] 6. When data enters language model A, language model A will filter out inaccessible data as the second data matrix of language model A. After language model A processes the data matrix corresponding to the data with permission (i.e., the first data matrix), the matrix obtained is the temporary data matrix. After language model A assembles the temporary data matrix with the second data matrix, it transmits the formed data matrix to language model B. Language model B re-splits the data matrix transmitted by language model A into the first data matrix and the second data matrix of language model B. The processing steps of language model A on the data matrix are repeated until there is no other language model to be processed, and the final target data classification and grading matrix is ​​generated;

[0084] According to the above steps, the data classification matrix entering the language model A (i.e., the first data matrix of the language model A) is:

[0085] [A,A,

[0086] 9,9,9,

[0087] Z,Z]

[0088] The data classification matrix generated by language model A processing and combining the second data matrix of language model A (i.e., the matrix composed of short codes corresponding to data that language model A has no access to) is:

[0089] [X,X,1,

[0090] 1,1,F,

[0091] X,X,X,

[0092] X,X]

[0093] Language model A then inputs the data classification and grading matrix into language model B. After language model B removes the short codes corresponding to the data without permission to access (i.e., the second data matrix of language model B), the data classification and grading matrix is:

[0094] [X,X,1,

[0095] 1,1,

[0096] X,X,X,

[0097] X,X]

[0098] The target data classification matrix generated after being processed by language model B and combined with the second data matrix of language model B (i.e., the matrix composed of short codes corresponding to data that language model B has no access to) is:

[0099] [Y,Y,Y,

[0100] Y,Y,F,

[0101] Y,Y,Y,

[0102] Y,Y]

[0103] 7. Finally, the language model B transmits the corresponding data in the target data classification matrix to the next link (such as the user).

[0104] Figure 2 The following schematically shows a flow chart of a classification and grading data control strategy according to an embodiment of the present application. Figure 2 As shown, in an embodiment of the present application, the user has L5 level permissions in general data, L4 level permissions in marketing data, L5 level permissions in service data, and L3 level permissions in big data report data, and the default user's data permission level is in effect. After the user enters the question text in the language model and sends it to the language model, the language model hits plug-in one (general data, requiring users to have L1 permission level and above to access), plug-in two (marketing data, requiring users to have L5 permission level and above to access), plug-in three (service data, requiring users to have L4 permission level and above to access), plug-in four (no data, users cannot access) and plug-in five (marketing data, requiring users to have L4 permission level and above to access) according to the question text. Figure 2 The user's permission level in cannot access the data of plug-in 2 and plug-in 4. According to the technical solution of the present application, only the data of plug-in 1, plug-in 2 and plug-in 3 can enter the language model.

[0105] Figure 3 The following schematically shows a data classification and hierarchical access control matrix algorithm according to an embodiment of the present application. Figure 3 As shown, in the embodiment of the present application, the database part is general data, the short code is Z, and the language model is required to have L5 authority level or above to access; the marketing part is marketing data, the short code is Y, and the language model is required to have L4 authority level or above to access; the service part is maintenance records, the short code is F, and the language model is required to have L1 authority level or above to access; the financial part is financial data, the short code is J, and the language model is required to have L5 authority level or above to access. In the embodiment of the present application, the language model only has the L5 authority level to access the general data of the database part and the L1 authority level for the maintenance records of the service part. Therefore, only the general data with the short code Z and the maintenance record data with the short code F can be transmitted to the language model for processing. All other data will be automatically screened out.

[0106] Figure 4 The structure block diagram of a data processing device based on data classification and grading according to an embodiment of the present application is schematically shown. Figure 4 As shown, an embodiment of the present application provides a data processing device, which may include:

[0107] Memory 410, configured to store instructions; and

[0108] The processor 420 is configured to call instructions from the memory and implement a data processing method based on data classification and grading when executing the instructions.

[0109] Specifically, in the embodiment of the present application, the processor 420 may be configured to:

[0110] Classify and grade the data in the database, and determine the data short code corresponding to each level of data;

[0111] Get the question text entered by the user;

[0112] Determining a first plug-in and a first knowledge base that matches the question text;

[0113] Matching the permissions of the first plug-in with the permissions of the user, and determining a second plug-in in the first plug-in that successfully matches the permissions of the user;

[0114] Matching the authority of the first knowledge base with the authority of the user, and determining a second knowledge base in the first knowledge base that successfully matches the authority of the user;

[0115] Calling the second plug-in and the second knowledge base to obtain the first data corresponding to the second plug-in and the second data corresponding to the second knowledge base;

[0116] In a case where it is determined that there is access permission for the first data and the second data, obtaining a first data size of the first data and a second data size of the second data;

[0117] Generate a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data;

[0118] Determine the target data classification and grading matrix based on the data classification and grading matrix and a preset data processing algorithm;

[0119] Determine the answer text for the question text according to the target data classification and classification matrix.

[0120] Furthermore, the processor 420 can also be configured to: determine the first data matrix and the second data matrix based on the data classification and grading matrix when it is determined that there is no access permission to the first data and / or the second data; determine a temporary data matrix based on the first data matrix and a preset data processing algorithm; and determine the target data classification and grading matrix based on the temporary data matrix and the second data matrix.

[0121] Further, the processor 420 can also be configured to: determine the first data matrix and the second data matrix based on the data classification and grading matrix, including: obtaining the data short code corresponding to the first data and / or the second data without access rights to construct the first data matrix; determine the second data matrix according to the data classification and grading matrix and the first data matrix.

[0122] Further, the processor 420 can also be configured to: generate a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data and the data short code corresponding to the second data, including: creating an empty data classification and grading matrix; determining the total number of elements in the data classification and grading matrix according to the first data size and the second data size; determining each element in the data classification and grading matrix according to the data short code corresponding to the first data and the data short code corresponding to the second data.

[0123] Further, the processor 420 can also be configured to: generate a data classification and grading matrix for the question text based on the first data size, the second data size, the data short code corresponding to the first data and the data short code corresponding to the second data, and also include: the number of elements of the data short code corresponding to the first data in the data classification and grading matrix corresponds to the value of the first data size; the number of elements of the data short code corresponding to the second data in the data classification and grading matrix corresponds to the value of the second data size.

[0124] Further, the processor 420 can also be configured to: generate a corresponding data classification and grading matrix based on the first data size, the second data size, the data short code corresponding to the first data and the data short code corresponding to the second data, and also include: determining the authority with a higher authority level in the first data and the second data as the authority of the data classification and grading matrix.

[0125] Furthermore, the processor 420 can also be configured to: block the reception of data from the first plug-in when the permissions of the first plug-in do not match the permissions of the user; block the reception of data from the first knowledge base when the permissions of the first knowledge base do not match the permissions of the user.

[0126] Furthermore, the processor 420 may also be configured to: when the data corresponding to the first plug-in is not classified and graded, set the classification and grade of the first plug-in to the classification and grade of the data corresponding to the first plug-in.

[0127] Through the above technical solution, the processor 420 classifies and grades the data in the database in advance, and determines the data short code corresponding to each level of data; the processor 420 controls the neural network model to obtain the question text input by the user, matches the permissions of the first plug-in and the first knowledge base that hit the question text with the user's permissions, and determines the second plug-in and the second knowledge base that successfully matches the user's permissions in the first plug-in and the first knowledge base; calls the second plug-in and the second knowledge base and receives the first data output by the second plug-in and the second data output by the second knowledge base; in the case of determining that there is access permission for the first data and the second data, obtains the first data size of the first data and the second data size of the second data; then generates a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data; determines the target data classification and grading matrix based on the data classification and grading matrix and the preset data processing algorithm; finally, the neural network model determines the answer text for the question text according to the target data classification and grading matrix. The present application can classify and grade users and various types of data in an actual production environment, so that when the user asks questions through the language model, the data that the user or the language model does not have permission to access is automatically screened out according to the classification and grading, thereby improving the flexibility and controllability of data management.

[0128] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned data processing method based on data classification and grading.

[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0130] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0133] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0134] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0135] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0136] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0137] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A data processing method based on data classification and grading, characterized in that: The data processing method comprises: Classify and grade the data in the database, and determine the data short code corresponding to each level of data; Get the question text entered by the user; Determine a first plug-in and a first knowledge base that match the question text; Matching the permission of the first plug-in with the permission of the user, and determining a second plug-in in the first plug-in that successfully matches the permission of the user; Matching the authority of the first knowledge base with the authority of the user, and determining a second knowledge base in the first knowledge base that successfully matches the authority of the user; Calling the second plug-in and the second knowledge base to obtain first data corresponding to the second plug-in and second data corresponding to the second knowledge base; In a case where it is determined that there is access permission for the first data and the second data, obtaining a first data size of the first data and a second data size of the second data; Generate a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data; Determine a target data classification and grading matrix based on the data classification and grading matrix and a preset data processing algorithm; An answer text for the question text is determined according to the target data classification and grading matrix.

2. The data processing method based on data classification and grading according to claim 1 is characterized in that: The data processing method further includes: In a case where it is determined that there is no access right to the first data and / or the second data, determining a first data matrix and a second data matrix based on the data classification and grading matrix; Determine a temporary data matrix based on the first data matrix and the preset data processing algorithm; The target data classification matrix is ​​determined according to the temporary data matrix and the second data matrix.

3. The data processing method based on data classification and grading according to claim 2 is characterized in that: The determining of the first data matrix and the second data matrix based on the data classification and grading matrix comprises: Acquire data short codes corresponding to the first data and / or second data without the access permission to construct the first data matrix; The second data matrix is ​​determined according to the data classification hierarchy matrix and the first data matrix.

4. The data processing method based on data classification and grading according to claim 1 is characterized in that: The step of generating a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data comprises: Create an empty data classification matrix; Determine the total number of elements of the data classification matrix according to the first data size and the second data size; Each element in the data classification matrix is ​​determined according to the data short code corresponding to the first data and the data short code corresponding to the second data.

5. The data processing method based on data classification and grading according to claim 4 is characterized in that: The step of generating a data classification and grading matrix for the question text according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data further comprises: The number of elements of the data short code corresponding to the first data in the data classification and grading matrix corresponds to the value of the first data size; The number of elements of the data short code corresponding to the second data in the data classification and grading matrix corresponds to the value of the second data size.

6. The data processing method based on data classification and grading according to claim 5 is characterized in that: The generating of the corresponding data classification and grading matrix according to the first data size, the second data size, the data short code corresponding to the first data, and the data short code corresponding to the second data also includes: The permission with a higher permission level among the first data and the second data is determined as the permission of the data classification and grading matrix.

7. The data processing method based on data classification and grading according to claim 1 is characterized in that: The data processing method further includes: When the permission of the first plug-in does not match the permission of the user, blocking the receiving of data of the first plug-in; When the authority of the first knowledge base does not match the authority of the user, the data of the first knowledge base is blocked from being received.

8. The data processing method based on data classification and grading according to claim 1 is characterized in that: The data processing method further includes: In the case that the data corresponding to the first plug-in is not classified and graded, the classification and grade of the first plug-in is set to the classification and grade of the data corresponding to the first plug-in.

9. A data processing device based on data classification and grading, characterized in that: include: a memory configured to store instructions; as well as A processor is configured to call the instructions from the memory and implement the data processing method based on data classification and grading according to any one of claims 1 to 8 when executing the instructions.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing a machine to execute a data processing method based on data classification and grading according to any one of claims 1 to 8.

Citation Information

Cited By

  • Content generation method, device and equipment based on retrieval enhancement generation

    CN121117187A