A processing method and device for a discriminator model of knowledge editing
By building and training a discriminator model, the issues of compliance and consistency in the knowledge editor were resolved, improving the standardized management of the knowledge base and the user experience.
Patent Information
- Application Number
- CN202411510406.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-10-28
AI Technical Summary
Existing knowledge editors are inadequate in terms of compliance, consistency, and user experience, and cannot effectively meet the standardized management needs of knowledge bases.
We construct a dataset based on the target knowledge base, train models for knowledge compliance, consistency, and editing strategy discrimination, and provide compliance checks, consistency checks, and editing strategy recommendations by continuously tracking user behavior data, thereby improving the compliance, consistency, and user experience of the customized editor.
It improves the data compliance and consistency assurance capabilities of the knowledge editor, enhancing the user experience.
Smart Images

Figure CN119250180B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a processing method and device of a discriminator model for knowledge editing. BACKGROUND
[0002] Large language models (LLMs) are widely used in various natural language processing (NLP) tasks, such as translation tasks, question and answer tasks, etc. In order to improve the generalization, prediction accuracy and prediction timeliness of the large language model, a knowledge base capable of querying context reference / prompt information is often configured for the large language model.
[0003] Such a knowledge base is usually composed of multiple knowledge entries. The data elements of each knowledge entry can be roughly divided into two categories: 1) a triple element (s, r, o), which is fixedly composed of a knowledge subject, a subject-object relationship, and a knowledge object; 2) an additional feature element, which can be customized according to actual application requirements, and in the conventional case, it will include, for example, entry identification, creation / update time, knowledge weight, knowledge domain category, etc. Such a knowledge base also defines corresponding knowledge structure rules to standardize the management of the data types of all elements, such as integer data type, floating point data type, character data type, time data type, etc.
[0004] The editing tool for knowledge editing of such a knowledge base is called a knowledge editor. A conventional knowledge editor should at least provide three basic editing functions of query, addition, and modification: 1) when processing a knowledge query task, the editor performs a matching knowledge entry query on the knowledge base based on the query text input by the user side (such as a personal user, other models, other tools, etc.); 2) when processing a knowledge addition task, the editor adds a knowledge entry to the knowledge base based on the knowledge text input by the user side; 3) when processing a knowledge modification task, the editor updates the content of an entry in the knowledge base based on the updated knowledge text input by the user side. And when processing any type of editing task, the editor preferably provides the user with multiple knowledge editing strategies / ways (such as editing ways of graph structure, editing ways of list structure, editing ways of configuration structure, etc.) for selection.
[0005] Currently, there is no perfect general editor on the market, and most LLM model application parties still need to develop a private knowledge editor based on their own knowledge base characteristics. Due to the limitation of the developers' technical experience, such customized editors more or less have some problems: 1) compliance problem: some editors do not conduct compliance check on knowledge entries, resulting in that the knowledge entries in the library cannot meet the corresponding knowledge structure rules; 2) consistency problem: some editors only add / update the current entry when adding / updating knowledge, and do not update the content of other similar or synonymous entries in the library, resulting in inconsistent knowledge content of similar / synonymous entries in the library; 3) user experience problem: most customized editors do not actively recommend suitable knowledge editing strategies based on user behavior habits, which is also to be improved from the perspective of user experience.
[0006] To help custom developers improve the performance of the editor, the present application trains three types of discriminant models (knowledge compliance discriminant model, knowledge consistency discriminant model, and knowledge editing strategy discriminant model) based on a benchmark discriminator model structure. Developers can better solve or improve the compliance problem, consistency problem and user experience problem mentioned above by applying the three types of discriminant models. SUMMARY
[0007] The present application aims at the defects of the prior art, and provides a processing method and device for a discriminator model of knowledge editing, an electronic device, and a computer readable storage medium. The present application constructs a data set for training a knowledge compliance checking task and a data set for training a knowledge consistency checking task based on a target knowledge base, which are recorded as first and second data sets. The knowledge editor corresponding to the target knowledge base is recorded as a corresponding target editor. The user behavior data of all users using the target editor is continuously tracked, and the first user historical behavior data sequence corresponding to each user is refreshed based on the tracking results. When all the first user historical behavior data sequences obtained can cover all knowledge domain categories of the target knowledge base and all knowledge editing strategies of the target editor, a data set for training a knowledge editing strategy identification task is constructed based on all the first user historical behavior data sequences obtained, which is recorded as a corresponding third data set. A benchmark discriminator model is designed, and the benchmark discriminator model is trained based on the first, second, and third data sets to obtain a corresponding knowledge compliance discriminator model, a knowledge consistency discriminator model, and a knowledge editing strategy discriminator model. Then, when any user uses the target editor to process a knowledge adding task, the knowledge item information added at this time is taken as a corresponding current knowledge item, and a compliance checking is performed based on the current knowledge item and the knowledge compliance discriminator model to obtain a corresponding checking result, which is fed back to the target editor. When any user uses the target editor to process a knowledge adding or modifying task, the knowledge item information added or modified at this time is taken as a corresponding current knowledge item, and a same item query is performed on the target knowledge base based on the current knowledge item to obtain a same item sequence. When the same item sequence is not empty, a consistency checking is performed based on the current knowledge item, the same item sequence, and the knowledge consistency discriminator model to obtain a corresponding checking result, which is fed back to the target editor. When any user uses the target editor to complete a knowledge query and selects a knowledge item obtained by the query, the selected knowledge item information is taken as a corresponding current knowledge item, and the first user historical behavior data sequence corresponding to the current user is taken as a corresponding current user historical behavior data sequence. An editing strategy recommendation processing is performed based on the current knowledge item, the current user historical behavior data sequence, and the knowledge editing strategy discriminator model to obtain a corresponding recommended strategy, which is fed back to the target editor. The developers of the customized editor can better solve or improve the compliance problems, consistency problems, and user experience problems of the conventional customized editor by using the three types of discriminator models (the knowledge compliance discriminator model, the knowledge consistency discriminator model, and the knowledge editing strategy discriminator model) provided by the present application. The present application can not only improve the data compliance checking capability and data consistency guarantee capability of the customized editor, but also improve the user experience of the customized editor.
[0008] To achieve the above object, an embodiment of the present application provides a processing method of a discriminator model for knowledge editing, which comprises the following steps:
[0009] A data set for training a knowledge compliance checking task is constructed based on a preset target knowledge base, denoted as a corresponding first data set; a data set for training a knowledge consistency checking task is constructed based on the target knowledge base, denoted as a corresponding second data set; a knowledge editor corresponding to the target knowledge base is denoted as a corresponding target editor; user behavior data of all users using the target editor is continuously tracked, and first user historical behavior data sequences corresponding to respective users are refreshed based on tracking results; when all the first user historical behavior data sequences obtained can cover all knowledge domain categories of the target knowledge base and all knowledge editing strategies of the target editor, a data set for training a knowledge editing strategy identification task is constructed based on all the first user historical behavior data sequences obtained, denoted as a corresponding third data set;
[0010] A benchmark discriminator model is designed; the benchmark discriminator model is trained based on the first data set to obtain a corresponding knowledge compliance discrimination model; the benchmark discriminator model is trained based on the second data set to obtain a corresponding knowledge consistency discrimination model; and the benchmark discriminator model is trained based on the third data set to obtain a corresponding knowledge editing strategy discrimination model;
[0011] When any user uses the target editor to process a knowledge adding task, the knowledge item information added at this time is taken as a corresponding current knowledge item; and a compliance checking is performed based on the current knowledge item and the knowledge compliance discrimination model to obtain a corresponding first checking result, which is fed back to the target editor;
[0012] When any user uses the target editor to process a knowledge adding or modifying task, the knowledge item information added or modified at this time is taken as a corresponding current knowledge item; a synonymous item sequence is obtained by performing a synonymous item query on the target knowledge base based on the current knowledge item; and when the synonymous item sequence is not empty, a consistency checking is performed based on the current knowledge item, the synonymous item sequence and the knowledge consistency discrimination model to obtain a corresponding second checking result, which is fed back to the target editor;
[0013] When any user completes a knowledge query using the target editor and selects a knowledge item obtained by the query, the currently selected knowledge item information is taken as a corresponding current knowledge item; the first user historical behavior data sequence corresponding to the current user is taken as a corresponding current user historical behavior data sequence; and an editing strategy recommendation process is performed based on the current knowledge item, the current user historical behavior data sequence, and the knowledge editing strategy judgment model to obtain a corresponding strategy recommendation result, which is fed back to the target editor.
[0014] Preferably, the target knowledge base includes a plurality of first knowledge items; the data elements of the first knowledge items at least include a first item identifier, a first creation / update time, a first triple element, a first knowledge weight, and a first knowledge domain category; the first triple element includes a first knowledge subject, a first subject-object relationship, and a first knowledge object; the knowledge structure rules corresponding to the target knowledge base include a plurality of knowledge structure constraints; each knowledge structure constraint is used to constrain the data format or data type of a type of data element of a knowledge item;
[0015] The first data set includes a plurality of first data records; the first data records include a first training sequence and a first label vector; the first training sequence is a text sequence, which is sequentially spliced by a first training knowledge subject, a first separator, a first training subject-object relationship, the first separator, and a first training knowledge object; the first label vector is composed of a plurality of first label probabilities, which correspond one-to-one to the knowledge structure constraints; if the first training sequence satisfies the constraint condition of a certain knowledge structure constraint, the first label probability corresponding to the current knowledge structure constraint in the first label vector is 1; if the first training sequence does not satisfy the constraint condition of a certain knowledge structure constraint, the first label probability corresponding to the current knowledge structure constraint in the first label vector is 0;
[0016] The second data set includes a plurality of second data records; the second data records include a second training sequence and a second label vector; the second training sequence is composed of a plurality of first training item element groups; the first training item element group includes a first item object and a first item knowledge domain category; the second label vector is composed of a plurality of second label probabilities, which correspond one-to-one to the first training item element groups; if one first training item element group in the second training sequence is consistent with the content of all other first training item element groups, the corresponding second label probability is 1; if one first training item element group in the second training sequence is inconsistent with the content of any other first training item element group, the corresponding second label probability is 0;
[0017] The third data set includes a plurality of third data records; the third data records include a third training sequence and a third label vector; the third training sequence is sorted in chronological order by a plurality of first training behavior data; the first training behavior data includes a first training knowledge domain selection and a first training editing strategy selection; the first training knowledge domain selection includes a plurality of knowledge domain categories, and the first training editing strategy selection includes a plurality of knowledge editing strategies; the third label vector is composed of a plurality of third label probabilities, each of which corresponds to a domain + strategy combination composed of a knowledge domain category and a knowledge editing strategy; the third label probability is 0 or 1, and only one of the third label probabilities in the third label vector is 1; the third data set should cover all the knowledge domain categories of the target knowledge base and all the knowledge editing strategies of the target editor;
[0018] The first user historical behavior data sequence is sorted in chronological order by a plurality of first user historical behavior data; the first user historical behavior data includes a first user knowledge domain selection and a first user editing strategy selection; the first user knowledge domain selection includes a plurality of knowledge domain categories, and the first user editing strategy selection includes a plurality of knowledge editing strategies.
[0019] Preferably, the baseline discriminator model is used for classification and discrimination processing according to the model input sequence and outputs a corresponding classification and discrimination vector; the classification and discrimination vector is composed of a plurality of classification and discrimination probabilities, each of which corresponds to a discrimination type; the baseline discriminator model includes an encoding layer, a linear attention layer, a pooling layer, a fully connected network and a Softmax layer; the encoding layer is implemented based on the Encoder model structure of the Transformer architecture; the input end of the encoding layer is connected with the model input end, and the output end is connected with the input end of the linear attention layer; the output end of the linear attention layer is connected with the input end of the pooling layer; the output end of the pooling layer is connected with the input end of the fully connected network; the output end of the fully connected network is connected with the input end of the Softmax layer; the output end of the Softmax layer is connected with the model output end;
[0020] The knowledge compliance discrimination model is used for corresponding compliance classification and discrimination processing on a type of input sequence input by the model and outputs a corresponding compliance classification and discrimination vector; the type of input sequence is a text sequence, which is sequentially spliced by a knowledge subject, a first delimiter, a subject-object relationship, the first delimiter and a knowledge object; the first delimiter is a preset single character; the compliance classification and discrimination vector is composed of a plurality of compliance classification and discrimination probabilities; the compliance classification and discrimination probability corresponds one-to-one to the knowledge structure constraint;
[0021] The knowledge consistency discrimination model is used for corresponding consistency classification discrimination processing of a two-class input sequence input by the model and outputs a corresponding consistency classification discrimination vector; the two-class input sequence is sorted by a plurality of entry element groups; the entry element group includes an entry object and an entry knowledge field category; the consistency classification discrimination vector is composed of a plurality of consistency classification discrimination probabilities; the consistency classification discrimination probability corresponds to the entry element group one by one;
[0022] The knowledge editing strategy discrimination model is used for corresponding editing strategy classification discrimination processing of a three-class input sequence input by the model and outputs a corresponding field strategy classification discrimination vector; the three-class input sequence is sorted by a plurality of historical behavior data of the same user in chronological order; the historical behavior data includes knowledge field selection and editing strategy selection; the knowledge field selection includes a plurality of the knowledge field categories, and the editing strategy selection includes a plurality of the knowledge editing strategies; the field strategy classification discrimination vector is composed of a plurality of field strategy classification discrimination probabilities, and each field strategy classification discrimination probability corresponds to a field+strategy combination composed of one of the knowledge field categories and one of the knowledge editing strategies; the total number of the field strategy classification discrimination probabilities is consistent with the total number of the field+strategy combinations of the target knowledge base and the target editor.
[0023] Preferably, the target knowledge base based on the preset constructs a data set for performing a knowledge compliance inspection task training, denoted as a corresponding first data set, specifically including:
[0024] All the first knowledge entries in the target knowledge base that satisfy the knowledge structure rule are extracted to form a corresponding first entry set;
[0025] All the first knowledge entries in the first entry set are iterated once, and in this iteration process, the first knowledge entry currently iterated is taken as a corresponding current knowledge entry; a corresponding first data record is obtained based on the first positive sample record generation processing of the current knowledge entry; a corresponding first data record is obtained based on the first negative sample record generation processing of the current knowledge entry; and at the end of this iteration, all the first data records obtained form a corresponding first data set;
[0026] Among them,
[0027] The first positive sample record generation process based on the current knowledge entry obtains a corresponding first data record, specifically: the first knowledge subject, the first subject-object relationship and the first knowledge object of the first triple element of the current knowledge entry are extracted as the corresponding first training knowledge subject, the first training subject-object relationship and the first training knowledge object; and the first training knowledge subject, the first separator, the first training subject-object relationship, the first separator and the first training knowledge object are sequentially spliced to obtain a spliced text sequence as the corresponding first training sequence; and a numerical vector with all vector data being 1 is constructed as the corresponding first label vector, with the total number of knowledge structure constraints of the knowledge structure rule as the vector length; and the first training sequence and the first label vector corresponding to the current knowledge entry form a corresponding first data record.
[0028] The first negative sample record generation process based on the current knowledge entry obtains a corresponding first data record, specifically: the first knowledge subject, the first subject-object relationship and the first knowledge object of the first triple element of the current knowledge entry are extracted as the corresponding first training knowledge subject, the first training subject-object relationship and the first training knowledge object; and the first training knowledge subject and / or the first training subject-object relationship and / or the first training knowledge object are randomly modified according to the rule violation modification mode that violates the knowledge structure rule; and after completing this rule violation modification, each knowledge structure constraint in the knowledge structure rule that cannot be satisfied due to this rule violation modification is recorded as a corresponding rule violation constraint; and the latest first training knowledge subject, the first separator, the latest first training subject-object relationship, the first separator and the latest first training knowledge object are sequentially spliced to obtain a spliced text sequence as the corresponding first training sequence; and a numerical vector with all vector data being 1 is constructed as the corresponding first label vector, with the total number of knowledge structure constraints of the knowledge structure rule as the vector length; and the vector data corresponding to each rule violation constraint in the current first label vector is reset to 0; and the finally obtained first training sequence and the first label vector form a corresponding first data record.
[0029] Preferably, a data set for training a knowledge consistency verification task is constructed based on the target knowledge base, denoted as a corresponding second data set, specifically including:
[0030] extracting the first knowledge entries in the target knowledge base, which have the first knowledge subjects as synonyms, the first subject-object relationships as synonyms, the contents of the first knowledge objects consistent, and the contents of the first knowledge domain categories consistent, to form a corresponding first synonym entry sequence; and forming a corresponding first sequence set by all the first synonym entry sequences obtained;
[0031] performing a round of traversal on all the first synonym entry sequences in the first sequence set; in the current round of traversal, taking the first synonym entry sequence being traversed as a corresponding current synonym entry sequence; generating a corresponding second data record based on the current synonym entry sequence; generating a corresponding second data record based on the current synonym entry sequence; and forming a corresponding second data set by all the second data records obtained at the end of the current round of traversal;
[0032] wherein,
[0033] The second data record generated based on the current synonym entry sequence is specifically: extracting the first knowledge object and the first knowledge domain category of each first knowledge entry in the current synonym entry sequence as a corresponding first entry object and a corresponding first entry knowledge domain category to form a corresponding first training entry element group; sequentially ordering all the first training entry element groups obtained to form a corresponding second training sequence; constructing a numerical vector with all 1s as a corresponding second label vector with the total number of first knowledge entries in the current synonym entry sequence as the vector length; and forming a corresponding second data record by the second training sequence and the second label vector corresponding to the current synonym entry sequence.
[0034] The second negative sample record generation process based on the current synonymous item sequence obtains a corresponding second data record, specifically: the first knowledge object and the first knowledge field category of each first knowledge item in the current synonymous item sequence are extracted as the corresponding first item object and the first item knowledge field category to form a corresponding first training item element group; and the obtained all first training item element groups are sequentially sorted to form a corresponding second training sequence; and the first item object and / or the first item knowledge field category of part or all of the first training item element groups of the obtained second training sequence are randomly modified, so that the data content of part or all of the first training item element groups of the second training sequence cannot remain consistent; and after completing the sequence modification, the first training item element group in the second training sequence whose data content is inconsistent with that of any other first training item element group is recorded as a corresponding inconsistent element group; and a numerical vector with all vector data being 1 is constructed as a corresponding second label vector, with the total number of first knowledge items in the current synonymous item sequence as the vector length; and the vector data corresponding to each inconsistent element group in the second label vector is reset to 0; and the finally obtained second training sequence and the second label vector form a corresponding second data record.
[0035] Preferably, the user behavior data of all users using the target editor is continuously tracked, and the first user historical behavior data sequence corresponding to each user is refreshed based on the tracking results, specifically including:
[0036] When any user uses the target editor for the first time, an empty sequence is created for the current user as the corresponding first user historical behavior data sequence;
[0037] And when any user uses the target editor to add or modify knowledge to a first knowledge item in the target knowledge base each time, the first knowledge field category of the first knowledge item being processed by the current user is extracted as the corresponding first user knowledge field selection, and the knowledge editing strategy being used by the current user on the target editor is extracted as the corresponding first user editing strategy selection, and the first user knowledge field selection and the first user editing strategy selection obtained this time are combined to form a corresponding first user historical behavior data, which is added to the first user historical behavior data sequence corresponding to the current user.
[0038] Preferably, a third data set for training a knowledge editing strategy recognition task is constructed based on all obtained first user historical behavior data sequences, specifically including:
[0039] performing a round of traversal on all the first user historical behavior data sequences; and in the current round of traversal, taking the first user historical behavior data sequence being currently traversed as a corresponding current data sequence; and counting the total number of the first user historical behavior data in the current data sequence and taking the counting result as a corresponding current sequence length; and identifying whether the current sequence length exceeds a preset first sequence length threshold; if not, taking the current data sequence as a corresponding first data sequence; if yes, taking the first sequence length threshold as a corresponding maximum slice sequence length, and performing sliding slice processing on the current data sequence based on a preset sliding step and the maximum slice sequence length to obtain a plurality of slice data sequences, and taking each slice data sequence as a corresponding first data sequence;
[0040] After the traversal of all the first user historical behavior data sequences is completed, a round of traversal is continued on all the first data sequences obtained; and in the current round of traversal, taking the first data sequence being currently traversed as a corresponding current data sequence; and extracting the first user knowledge domain type and the first user editing strategy type of each first user historical behavior data in the current data sequence as a corresponding first training knowledge domain type and a first training editing strategy type to form a corresponding first training behavior data; and sorting all the first training behavior data obtained in chronological order to form a corresponding first temporary sequence; and taking the last first training behavior data in the first temporary sequence as a corresponding target behavior data; and taking the first temporary sequence from which the target behavior data is removed as a corresponding third training sequence; and identifying all the domain+strategy combinations of the target knowledge base and the target editor to obtain a corresponding domain+strategy combination set, and counting the total number of combinations of the domain+strategy combination set to obtain a corresponding first combination total number; and taking the first combination total number as the vector length to construct a numerical vector with all 0 as a corresponding third label vector; and taking the domain+strategy combination corresponding to the first training knowledge domain type and the first training editing strategy type of the target behavior data as a corresponding target combination; and resetting the vector data corresponding to the target combination in the third label vector to 1; and after the vector resetting is completed, taking the third training sequence corresponding to the current data sequence and the third label vector to form a corresponding third data record; and at the end of the current round of traversal, taking all the third data records obtained to form a corresponding third data set.
[0041] Preferably, the compliance test based on the current knowledge entry and the knowledge compliance judgment model obtains a corresponding first test result, which is fed back to the target editor, specifically including:
[0042] Step 81, the corresponding knowledge subject, subject-object relationship and knowledge object are extracted from the current knowledge entry as the corresponding current knowledge subject, current subject-object relationship and current knowledge object; and the current knowledge subject, the first delimiter, the current subject-object relationship, the first delimiter and the current knowledge object are sequentially spliced into a corresponding text sequence as a corresponding first input sequence;
[0043] Step 82, the first input sequence is input into the knowledge compliance judgment model for corresponding compliance classification judgment processing, and the output vector of the model is taken as a corresponding first compliance classification judgment vector;
[0044] Step 83, whether each compliance classification judgment probability in the first compliance classification judgment vector exceeds a preset compliance probability threshold is identified, if yes, the current compliance classification judgment probability is recorded as a corresponding first compliance probability, if not, the current compliance classification judgment probability is recorded as a corresponding first violation probability;
[0045] Step 84, a corresponding first test state is set for each knowledge structure constraint of the knowledge structure rule; and when the total number of the first compliance probability is not zero, the first test state corresponding to each first compliance probability is set to pass the test; and when the total number of the first violation probability is not zero, the first test state corresponding to each first violation probability is set to fail the test;
[0046] Step 85, a corresponding first test record is composed of each completed first test state and the corresponding knowledge structure constraint; and all the obtained first test records are composed of a corresponding first test result, which is fed back to the target editor.
[0047] Preferably, the consistency test based on the current knowledge entry, the synonymous entry sequence and the knowledge consistency judgment model obtains a corresponding second test result, which is fed back to the target editor, specifically including:
[0048] Step 91, the corresponding knowledge object and knowledge domain category are extracted from the current knowledge entry to form a corresponding first entry element group; and the first knowledge object and the first knowledge domain category of each first knowledge entry in the synonymous entry sequence are extracted to form a corresponding first entry element group; and all the obtained first entry element groups are sequentially sorted to form a corresponding second input sequence;
[0049] Step 92, input the second input sequence into the knowledge consistency discrimination model for corresponding consistency classification discrimination processing, and take the output vector of the model as a corresponding first consistency classification discrimination vector;
[0050] Step 93, identify whether each consistency classification discrimination probability in the first consistency classification discrimination vector exceeds a preset consistency probability threshold, if yes, record the current consistency classification discrimination probability as a corresponding second compliance probability, if not, record the current consistency classification discrimination probability as a corresponding second violation probability;
[0051] Step 94, set a corresponding second inspection state for each knowledge item corresponding to the first item element group of the second input sequence; and when the total number of the second compliance probability is not zero, set the second inspection state corresponding to each second compliance probability to inspection passed; and when the total number of the second violation probability is not zero, set the second inspection state corresponding to each second violation probability to inspection failed;
[0052] Step 95, form a corresponding second inspection record by each completed second inspection state and the corresponding knowledge item; and form a corresponding second inspection result by all the obtained second inspection records, and feed back to the target editor.
[0053] Preferably, the editing strategy recommendation processing based on the current knowledge item, the current user historical behavior data sequence and the knowledge editing strategy discrimination model obtains a corresponding strategy recommendation result, which is fed back to the target editor, specifically including:
[0054] Step 101, input the current user historical behavior data sequence into the knowledge editing strategy discrimination model for corresponding editing strategy classification discrimination processing, and take the output vector of the model as a corresponding first domain strategy classification discrimination vector;
[0055] Step 102, take the domain+strategy combination corresponding to the maximum domain strategy classification discrimination probability in the first domain strategy classification discrimination vector as a corresponding predicted domain+strategy combination; and take the knowledge domain category and the knowledge editing strategy corresponding to the predicted domain+strategy combination as a corresponding predicted knowledge domain category and a predicted knowledge editing strategy;
[0056] Step 103, identifying whether the knowledge domain category corresponding to the current knowledge entry matches the predicted knowledge domain category; if matching, taking the predicted knowledge editing strategy as the corresponding strategy recommendation result; if not matching, extracting all the domain+strategy combinations in which the knowledge domain category matches the knowledge domain category corresponding to the current knowledge entry from all the domain+strategy combinations corresponding to the target knowledge base and the target editor to form a corresponding first combination set, extracting the domain strategy classification discrimination probability in the first domain strategy classification discrimination vector corresponding to each domain+strategy combination in the first combination set to form a corresponding first probability set, and taking the knowledge editing strategy corresponding to the domain+strategy combination corresponding to the maximum probability in the first probability set as the corresponding strategy recommendation result;
[0057] Step 104, feeding back the obtained strategy recommendation result to the target editor.
[0058] The second aspect of the embodiment of the application provides a device for implementing the processing method of the discriminator model for knowledge editing in the first aspect, and the device comprises a data set preparation module, a model construction and training module, a first model application module, a second model application module and a third model application module.
[0059] The data set preparation module is used for constructing a data set for training a knowledge compliance verification task based on a preset target knowledge base, denoted as a corresponding first data set; constructing a data set for training a knowledge consistency verification task based on the target knowledge base, denoted as a corresponding second data set; taking a knowledge editor corresponding to the target knowledge base as a corresponding target editor; continuously tracking user behavior data of all users using the target editor and refreshing the first user historical behavior data sequence corresponding to each user based on the tracking result; and when all the first user historical behavior data sequences obtained can cover all knowledge domain categories of the target knowledge base and all knowledge editing strategies of the target editor, constructing a data set for training a knowledge editing strategy identification task based on all the first user historical behavior data sequences obtained, denoted as a corresponding third data set;
[0060] The model construction and training module is used for designing a benchmark discriminator model; training the benchmark discriminator model based on the first data set to obtain a corresponding knowledge compliance discrimination model; training the benchmark discriminator model based on the second data set to obtain a corresponding knowledge consistency discrimination model; and training the benchmark discriminator model based on the third data set to obtain a corresponding knowledge editing strategy discrimination model.
[0061] The first model application module is configured to, when any user uses the target editor to process a knowledge adding task, take the knowledge item information added at this time as a corresponding current knowledge item, and perform compliance verification based on the current knowledge item and the knowledge compliance discrimination model to obtain a corresponding first verification result and feed back the first verification result to the target editor.
[0062] The second model application module is configured to, when any user uses the target editor to process a knowledge adding or modifying task, take the knowledge item information added or modified at this time as a corresponding current knowledge item, perform synonymous item query on the target knowledge base based on the current knowledge item to obtain a corresponding synonymous item sequence, and when the synonymous item sequence is not empty, perform consistency verification based on the current knowledge item, the synonymous item sequence and the knowledge consistency discrimination model to obtain a corresponding second verification result and feed back the second verification result to the target editor.
[0063] The third model application module is configured to, when any user uses the target editor to complete a knowledge query and selects a knowledge item obtained by the query, take the currently selected knowledge item information as a corresponding current knowledge item, take the first user historical behavior data sequence corresponding to the current user as a corresponding current user historical behavior data sequence, and perform editing strategy recommendation processing based on the current knowledge item, the current user historical behavior data sequence and the knowledge editing strategy discrimination model to obtain a corresponding strategy recommendation result and feed back the strategy recommendation result to the target editor.
[0064] The third aspect of the embodiment of the application provides an electronic device, comprising a memory, a processor and a transceiver.
[0065] The processor is configured to read and execute instructions in the memory to realize the method steps of the first aspect.
[0066] The transceiver is coupled with the processor, and the transceiver is controlled by the processor to perform message transceiving.
[0067] The fourth aspect of the embodiment of the application provides a computer readable storage medium, and the computer readable storage medium stores computer instructions, when the computer instructions are executed by a computer, the computer instructions make the computer execute the instructions of the method of the first aspect.
[0068] The embodiment of the present application provides a processing method and device of a discriminator model for knowledge editing, an electronic equipment and a computer readable storage medium. According to the above content, the embodiment of the present application constructs a data set for knowledge compliance inspection task training and a data set for knowledge consistency inspection task training based on a target knowledge base, which are recorded as a first data set and a second data set; and records a knowledge editor corresponding to the target knowledge base as a corresponding target editor, continuously tracks user behavior data of all users using the target editor, and refreshes the first user historical behavior data sequence corresponding to each user based on the tracking result, and constructs a data set for knowledge editing strategy identification task training based on all the obtained first user historical behavior data sequences when all the obtained first user historical behavior data sequences can cover all knowledge domain categories of the target knowledge base and all knowledge editing strategies of the target editor, which is recorded as a corresponding third data set; and designs a benchmark discriminator model, and respectively trains the benchmark discriminator model based on the first, second and third data sets to obtain a corresponding knowledge compliance discrimination model, a knowledge consistency discrimination model and a knowledge editing strategy discrimination model; then, when any user uses the target editor to process a knowledge addition task, the knowledge item information added at this time is taken as a corresponding current knowledge item, and the compliance inspection is performed based on the current knowledge item and the knowledge compliance discrimination model to obtain a corresponding inspection result, which is fed back to the target editor; when any user uses the target editor to process a knowledge addition or modification task, the knowledge item information added or modified at this time is taken as a corresponding current knowledge item, and the same item query is performed on the target knowledge base based on the current knowledge item to obtain a corresponding synonym item sequence, and when the synonym item sequence is not empty, the consistency inspection is performed based on the current knowledge item, the synonym item sequence and the knowledge consistency discrimination model to obtain a corresponding inspection result, which is fed back to the target editor; and when any user uses the target editor to complete a knowledge query and selects a knowledge item obtained by the query, the current selected knowledge item information is taken as a corresponding current knowledge item, and the first user historical behavior data sequence corresponding to the current user is taken as a corresponding current user historical behavior data sequence, and the editing strategy recommendation processing is performed based on the current knowledge item, the current user historical behavior data sequence and the knowledge editing strategy discrimination model to obtain a corresponding recommended strategy, which is fed back to the target editor. The developers of the customized editor can better solve or improve the compliance problems, consistency problems and user experience problems of the conventional customized editor by using the three types of discrimination models (knowledge compliance discrimination model, knowledge consistency discrimination model and knowledge editing strategy discrimination model) provided by the embodiment of the present application; through the embodiment of the present application, the data compliance inspection capability and the data consistency guarantee capability of the customized editor are improved, and the user experience of the customized editor is also improved. BRIEF DESCRIPTION OF DRAWINGS
[0069] Figure 1 A processing method schematic diagram of a discriminator model for knowledge editing is provided for the first embodiment of the present application;
[0070] Figure 2 A module structure diagram of a benchmark discriminator model is provided for the first embodiment of the present application;
[0071] Figure 3 A derivative relationship between the benchmark discriminator model and the three-class discrimination model and an input / output description schematic diagram of the three-class discrimination model are provided for the first embodiment of the present application;
[0072] Figure 4 A module structure diagram of a processing device of a discriminator model for knowledge editing is provided for the second embodiment of the present application;
[0073] Figure 5 A structure schematic diagram of an electronic device is provided for the third embodiment of the present application. DETAILED DESCRIPTION
[0074] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
[0075] The first embodiment of the present application provides a processing method of a discriminator model for knowledge editing, which comprises the following steps: Figure 1 As shown in a processing method schematic diagram of a discriminator model for knowledge editing provided for the first embodiment of the present application, the method mainly comprises the following steps:
[0076] Step 1, based on a preset target knowledge base, a data set for training a knowledge compliance inspection task is constructed, denoted as a corresponding first data set; and based on the target knowledge base, a data set for training a knowledge consistency inspection task is constructed, denoted as a corresponding second data set; and a knowledge editor corresponding to the target knowledge base is denoted as a corresponding target editor; and user behavior data of all users using the target editor is continuously tracked, and based on the tracking result, a first user historical behavior data sequence corresponding to each user is refreshed; and when all the obtained first user historical behavior data sequences can cover all knowledge field categories of the target knowledge base and all knowledge editing strategies of the target editor, based on all the obtained first user historical behavior data sequences, a data set for training a knowledge editing strategy identification task is constructed, denoted as a corresponding third data set;
[0077] Specifically comprising: step 11, based on the preset target knowledge base, a data set for performing knowledge compliance checking task training is constructed, denoted as a corresponding first data set;
[0078] Specifically comprising: step 111, all first knowledge entries in the target knowledge base that meet the knowledge structure rules are extracted to form a corresponding first entry set;
[0079] Here, the target knowledge base of the embodiment of the application comprises a plurality of first knowledge entries; the data elements of the first knowledge entries at least include a first entry identifier, a first creation / update time, a first triple element, a first knowledge weight, and a first knowledge field category; the first triple element comprises a first knowledge subject, a first subject-object relationship, and a first knowledge object; the knowledge structure rules corresponding to the target knowledge base comprise a plurality of knowledge structure constraints; each knowledge structure constraint is used to constrain the data format or data type of a type of data elements of the knowledge entries;
[0080] Step 112, all first knowledge entries in the first entry set are traversed in one round; and in the current round of traversal, the first knowledge entry currently traversed is taken as a corresponding current knowledge entry; based on the current knowledge entry, a first positive sample record generation process is performed to obtain a corresponding first data record; based on the current knowledge entry, a first negative sample record generation process is performed to obtain a corresponding first data record; and at the end of the current round of traversal, all the first data records obtained are taken to form a corresponding first data set;
[0081] Here, the first data set of the embodiment of the application comprises a plurality of first data records; the first data record comprises a first training sequence and a first label vector; the first training sequence is a text sequence, which is sequentially spliced by a first training knowledge subject, a first separator, a first training subject-object relationship, a first separator, and a first training knowledge object; the first label vector is composed of a plurality of first label probabilities, and each first label probability corresponds to a knowledge structure constraint; if the first training sequence meets the constraint condition of a certain knowledge structure constraint, the first label probability corresponding to the current knowledge structure constraint in the first label vector is 1; if the first training sequence does not meet the constraint condition of a certain knowledge structure constraint, the first label probability corresponding to the current knowledge structure constraint in the first label vector is 0;
[0082] It should be noted that in the current step 112, the specific processing steps of generating a corresponding first data record based on the current knowledge entry in the first positive sample record generation process include: extracting the first knowledge subject, the first subject-object relationship and the first knowledge object of the first triple element of the current knowledge entry as the corresponding first training knowledge subject, the first training subject-object relationship and the first training knowledge object; and sequentially splicing the first training knowledge subject, the first separator, the first training subject-object relationship, the first separator and the first training knowledge object to obtain a spliced text sequence as the corresponding first training sequence; and constructing a numerical vector with all vector data being 1 as the corresponding first label vector with the total number of knowledge structure constraints of the knowledge structure rule as the vector length; and the first training sequence and the first label vector corresponding to the current knowledge entry form a corresponding first data record;
[0083] It should be noted that in the current step 112, the specific processing steps of generating a corresponding first data record based on the current knowledge entry in the first negative sample record generation process include: extracting the first knowledge subject, the first subject-object relationship and the first knowledge object of the first triple element of the current knowledge entry as the corresponding first training knowledge subject, the first training subject-object relationship and the first training knowledge object; and randomly modifying the obtained first training knowledge subject and / or first training subject-object relationship and / or first training knowledge object according to the rule violation modification mode that violates the knowledge structure rule; and after completing this rule violation modification, record each knowledge structure constraint in the knowledge structure rule that cannot be satisfied due to this rule violation modification as the corresponding rule violation constraint; and sequentially splicing the latest first training knowledge subject, the first separator, the latest first training subject-object relationship, the first separator and the latest first training knowledge object to obtain a spliced text sequence as the corresponding first training sequence; and constructing a numerical vector with all vector data being 1 as the corresponding first label vector with the total number of knowledge structure constraints of the knowledge structure rule as the vector length; and resetting the vector data corresponding to each rule violation constraint in the current first label vector to 0; and the finally obtained first training sequence and first label vector form a corresponding first data record;
[0084] Step 12, and based on the target knowledge base, a data set for training the knowledge consistency verification task is constructed and recorded as a corresponding second data set;
[0085] Specifically includes: step 121, extracting the first knowledge entry in the target knowledge base whose first knowledge subject is a synonym of each other, whose first subject-object relationship is a synonym of each other, whose first knowledge object content is consistent, and whose first knowledge domain category content is consistent to form a corresponding first synonym entry sequence; and the obtained all first synonym entry sequences form a corresponding first sequence set;
[0086] Step 122, and perform a round of traversal on all first synonym entry sequences of the first sequence set; and in the current round of traversal, take the first synonym entry sequence currently traversed as the corresponding current synonym entry sequence; and generate a corresponding second data record based on the current synonym entry sequence; and generate a corresponding second data record based on the current synonym entry sequence; and at the end of the current round of traversal, all second data records obtained form a corresponding second data set;
[0087] Here, the second data set of the embodiment of the application includes a plurality of second data records; the second data record includes a second training sequence and a second label vector; the second training sequence is sorted by a plurality of first training entry element groups; the first training entry element group includes a first entry object and a first entry knowledge field category; the second label vector is composed of a plurality of second label probabilities, and the second label probability corresponds to the first training entry element group one by one; if one first training entry element group in the second training sequence is consistent with the content of all other first training entry element groups, the corresponding second label probability is 1; if one first training entry element group in the second training sequence fails to be consistent with the content of any other first training entry element group, the corresponding second label probability is 0;
[0088] It should be noted that in the current step 122, the specific processing steps of generating a corresponding second data record based on the current synonym entry sequence include: extracting the first knowledge object and the first knowledge field category of each first knowledge entry in the current synonym entry sequence as the corresponding first entry object and the first entry knowledge field category to form a corresponding first training entry element group; and sequentially sorting all first training entry element groups obtained to form a corresponding second training sequence; and constructing a numerical vector with all 1s as the corresponding second label vector with the total number of first knowledge entries of the current synonym entry sequence as the vector length; and the second training sequence and the second label vector corresponding to the current synonym entry sequence form a corresponding second data record;
[0089] It should be noted that in the current step 122, the specific processing steps of generating a corresponding second data record based on the current synonym entry sequence in the second negative sample record generation process include: extracting the first knowledge object and the first knowledge field category of each first knowledge entry in the current synonym entry sequence as the corresponding first entry object and the first entry knowledge field category to form a corresponding first training entry element group; and sequentially sorting all the obtained first training entry element groups to form a corresponding second training sequence; and randomly modifying the first entry object and / or the first entry knowledge field category of part or all of the first training entry element groups of the obtained second training sequence, so that the data content of part or all of the first training entry element groups of the second training sequence cannot be kept consistent; and after completing the sequence modification, recording the first training entry element group in the second training sequence which is inconsistent with the data content of any other first training entry element group as the corresponding inconsistent element group; and constructing a numerical vector with all vector data being 1 as a corresponding second label vector with the total number of first knowledge entries in the current synonym entry sequence as the vector length; and resetting the vector data corresponding to each inconsistent element group in the second label vector to 0; and forming a corresponding second data record by the final obtained second training sequence and the second label vector;
[0090] Step 13, and record the knowledge editor corresponding to the target knowledge base as the corresponding target editor;
[0091] Step 14, and continuously track the user behavior data of all users using the target editor and refresh the first user historical behavior data sequence corresponding to each user based on the tracking results;
[0092] Specifically, step 141, when any user uses the target editor for the first time, an empty sequence is created for the current user as the corresponding first user historical behavior data sequence;
[0093] Step 142, and when any user uses the target editor to add or modify a first knowledge entry in the target knowledge base each time, the first knowledge field category of the first knowledge entry being processed by the current user is extracted as the corresponding first user knowledge field selection, and the knowledge editing strategy being used by the current user on the target editor is taken as the corresponding first user editing strategy selection, and the first user knowledge field selection and the first user editing strategy selection obtained this time are combined to form a corresponding first user historical behavior data, which is added to the first user historical behavior data sequence corresponding to the current user;
[0094] Here, the first user historical behavior data sequence of the embodiment of the application is sorted in chronological order by the first user historical behavior data when the sequence is not empty; the first user historical behavior data includes first user knowledge field selection and first user editing strategy selection; the first user knowledge field selection includes multiple knowledge field categories, and the first user editing strategy selection includes multiple knowledge editing strategies;
[0095] Step 15, and when all the obtained first user historical behavior data sequences can cover all the knowledge field categories of the target knowledge base and all the knowledge editing strategies of the target editor, a data set for training the knowledge editing strategy identification task is constructed based on all the obtained first user historical behavior data sequences, denoted as a corresponding third data set;
[0096] Specifically, it includes: step 151, a round of traversal is performed on all the obtained first user historical behavior data sequences; and in the traversal process, the first user historical behavior data sequence currently traversed is taken as a corresponding current data sequence; the total number of the first user historical behavior data of the current data sequence is counted and the counting result is taken as a corresponding current sequence length; whether the current sequence length exceeds a preset first sequence length threshold is identified; if not, the current data sequence is taken as a corresponding first data sequence; if yes, the first sequence length threshold is taken as a corresponding maximum slice sequence length, and the current data sequence is subjected to sliding slice processing based on a preset sliding step and the maximum slice sequence length to obtain a plurality of slice data sequences, and each slice data sequence is taken as a corresponding first data sequence;
[0097] Here, the first sequence length threshold and the sliding step are two preset positive integer parameters;
[0098] Step 152, after the traversal of all first user historical behavior data sequences is completed, continue to traverse all obtained first data sequences; and in the current round of traversal, take the first data sequence being traversed as the corresponding current data sequence; and extract the first user knowledge field selection and the first user editing strategy selection of each first user historical behavior data in the current data sequence as the corresponding first training knowledge field selection and the first training editing strategy selection to form a corresponding first training behavior data; and sort all obtained first training behavior data in chronological order to form a corresponding first temporary sequence; and record the last first training behavior data in the first temporary sequence as the corresponding target behavior data; and take the first temporary sequence from which the target behavior data is removed as a corresponding third training sequence; and identify all field+strategy combinations of the target knowledge base and the target editor to obtain a corresponding field+strategy combination set, and count the total number of combinations of the field+strategy combination set to obtain a corresponding first combination total; and construct a numerical vector with all 0s as the corresponding third label vector with the first combination total as the vector length; and record the field+strategy combination corresponding to the first training knowledge field selection and the first training editing strategy selection of the target behavior data as the corresponding target combination; and reset the vector data corresponding to the target combination in the third label vector to 1; and after the vector reset is completed, form a corresponding third data record from the third training sequence corresponding to the current data sequence and the third label vector; and at the end of the current round of traversal, form a corresponding third data set from all obtained third data records.
[0099] Here, the third data set of the embodiment of the application includes a plurality of third data records; the third data record includes a third training sequence and a third label vector; the third training sequence is sorted in chronological order from a plurality of first training behavior data; the first training behavior data includes a first training knowledge field selection and a first training editing strategy selection; the first training knowledge field selection includes a plurality of knowledge field categories, and the first training editing strategy selection includes a plurality of knowledge editing strategies; the third label vector is composed of a plurality of third label probabilities, each third label probability corresponds to a field+strategy combination composed of a knowledge field category and a knowledge editing strategy; the value of the third label probability is 0 or 1, and there is only one third label probability with a value of 1 in the third label vector; the third data set should cover all knowledge field categories of the target knowledge base and all knowledge editing strategies of the target editor.
[0100] Step 2, design a benchmark discriminator model; and train the benchmark discriminator model based on the first data set to obtain a corresponding knowledge compliance discrimination model; and train the benchmark discriminator model based on the second data set to obtain a corresponding knowledge consistency discrimination model; and train the benchmark discriminator model based on the third data set to obtain a corresponding knowledge editing strategy discrimination model;
[0101] Specifically, step 21, a benchmark discriminator model is designed;
[0102] Here, the benchmark discriminator model of the embodiment of the application is a basic model framework, which will be derived from the basic model framework to derive three types of discrimination models for processing specific discrimination tasks; the benchmark discriminator model is used for classification and discrimination processing according to the model input sequence and outputs a corresponding classification and discrimination vector, wherein the classification and discrimination vector is composed of multiple classification and discrimination probabilities, and each classification and discrimination probability corresponds to a discrimination type;
[0103] As Figure 2 As shown in the module structure diagram of the benchmark discriminator model provided by the embodiment one of the application, the model components of the benchmark discriminator model include: an encoding layer, a linear attention layer, a pooling layer, a fully connected network and a Softmax layer; wherein the encoding layer is implemented based on the Encoder model structure of the Transformer architecture; the linear attention layer is implemented based on a linear attention neural network; the connection relationship of each component of the benchmark discriminator model is: the input end of the encoding layer is connected with the model input end, and the output end is connected with the input end of the linear attention layer; the output end of the linear attention layer is connected with the input end of the pooling layer; the output end of the pooling layer is connected with the input end of the fully connected network; the output end of the fully connected network is connected with the input end of the Softmax layer; the output end of the Softmax layer is connected with the model output end;
[0104] As Figure 3 As shown in the input / output specification diagram of the benchmark discriminator model provided by the embodiment one of the application and the derivation relationship of the three types of discrimination models, the three types of discrimination models derived from the benchmark discriminator model by the embodiment of the application are: knowledge compliance discrimination model, knowledge consistency discrimination model, and knowledge editing strategy discrimination model; the input / output design requirements of the three types of models are briefly described as follows:
[0105] 1) The knowledge compliance discrimination model is used for corresponding compliance classification and discrimination processing on a type of input sequence of the model input and outputs a corresponding compliance classification and discrimination vector;
[0106] wherein one type of input sequence is a text sequence, which is sequentially spliced by a knowledge subject, a first separator, a subject-object relationship, the first separator, and a knowledge object; the first separator is a preset single character; the compliance classification discrimination vector is composed of multiple compliance classification discrimination probabilities; the compliance classification discrimination probability is in one-to-one correspondence with the knowledge structure constraint;
[0107] Here, the first separator is usually set as " / " by default, but can also be customized based on application requirements;
[0108] 2) The knowledge consistency discrimination model is used for corresponding consistency classification discrimination processing of the two types of input sequences input by the model and outputs a corresponding consistency classification discrimination vector;
[0109] wherein the two types of input sequences are sequentially sorted by multiple entry element groups; the entry element group includes an entry object and an entry knowledge domain category; the consistency classification discrimination vector is composed of multiple consistency classification discrimination probabilities; the consistency classification discrimination probability is in one-to-one correspondence with the entry element group;
[0110] 3) The knowledge editing strategy discrimination model is used for corresponding editing strategy classification discrimination processing of the three types of input sequences input by the model and outputs a corresponding domain strategy classification discrimination vector;
[0111] wherein the three types of input sequences are sequentially sorted by multiple historical behavior data of the same user in chronological order; the historical behavior data includes knowledge domain selection and editing strategy selection; the knowledge domain selection includes multiple knowledge domain categories, and the editing strategy selection includes multiple knowledge editing strategies; the domain strategy classification discrimination vector is composed of multiple domain strategy classification discrimination probabilities, each of which corresponds to a domain+strategy combination composed of one type of knowledge domain category and one type of knowledge editing strategy; the total number of domain strategy classification discrimination probabilities is consistent with the total number of domain+strategy combinations of the target knowledge base and the target editor;
[0112] Step 22, and based on the first data set, the baseline discriminator model is trained to obtain a corresponding knowledge compliance discrimination model;
[0113] Specifically, it includes: step 221, pre-adapting the component parameters of each model component of the baseline discriminator model based on the model input / output design requirements of the knowledge compliance discrimination model to obtain a knowledge compliance discrimination model that has not been trained;
[0114] Step 222, based on a preset first segmentation ratio, the first data set is segmented into two sub-data sets, denoted as a corresponding first training set and a first evaluation set;
[0115] The first split ratio is a preset ratio parameter, for example, 8:2; the first training set and the first evaluation set each consist of a plurality of first data records; the ratio of the total number of records in the first training set to the total number of records in the first evaluation set meets the first split ratio;
[0116] Step 223, the first data record of the first training set is extracted as a corresponding current training record;
[0117] Step 224, the first training sequence of the current training record is input into the knowledge compliance discrimination model for corresponding compliance classification discrimination processing, and the model output vector is taken as a corresponding first prediction vector;
[0118] Step 225, the first prediction vector and the first label vector of the current training record are input into a preset first model loss function; and based on a preset first model optimizer, the knowledge compliance discrimination model is optimized for one round of model parameter optimization in the direction of making the first model loss function reach a preset first optimal loss value;
[0119] The first model loss function at least includes a cross-entropy loss function, and other types of loss functions can also be customized based on application requirements; the first model optimizer at least includes an SGD optimizer and an ADAM optimizer, and other types of model optimizers can also be customized based on application requirements; the first optimal loss value is a preset value corresponding to the loss function type of the first model loss function, and if the first model loss function is implemented based on the cross-entropy loss function, the first optimal loss value will be set to 0 by default;
[0120] Step 226, whether the current training record is the last first data record of the first training set is identified; if yes, go to step 227; if no, the next first data record of the first training set is extracted as a new current training record and returns to step 224;
[0121] Step 227, all first data records of the first evaluation set are iterated for one round; and in this round of iteration, the currently iterated first data record is taken as a corresponding current evaluation record; the first training sequence of the current evaluation record is input into the knowledge compliance discrimination model for corresponding compliance classification discrimination processing, and the model output vector is taken as a corresponding second prediction vector; and a corresponding first prediction-label pair is formed by the second prediction vector and the first label vector of the current evaluation record; and at the end of this round of iteration, the first accuracy, the first precision, the first recall and the first F1 score are calculated according to all the first prediction-label pairs obtained;
[0122] Step 228, the first accuracy, the first precision, the first recall and the first F1 score are identified; if the first accuracy does not meet the preset first accuracy range or the first precision does not meet the preset first precision range or the first recall does not meet the preset first recall range or the first F1 score does not meet the preset first F1 score range, return to step 223 for continuous training; if the first accuracy meets the first accuracy range, the first precision meets the first precision range, the first recall meets the first recall range and the first F1 score meets the first F1 score range, it is confirmed that the knowledge compliance checking task of the knowledge compliance discrimination model is trained and ended;
[0123] Here, the first accuracy range, the first precision range, the first recall range and the first F1 score range are four pre-set numerical range parameters;
[0124] Step 23, the baseline discriminator model is trained based on the second data set to obtain the corresponding knowledge consistency discrimination model;
[0125] Specifically, it includes: step 231, the component parameters of each model component of the baseline discriminator model are adaptively adjusted based on the model input / output design requirements of the knowledge consistency discrimination model to obtain a knowledge consistency discrimination model that has not been trained;
[0126] Step 232, the second data set is divided into two sub-data sets based on a preset second segmentation ratio, denoted as a corresponding second training set and a second evaluation set;
[0127] Wherein, the second segmentation ratio is a pre-set ratio parameter, for example, 8:2; the second training set and the second evaluation set are both composed of a plurality of second data records; the ratio of the total number of records in the second training set to the total number of records in the second evaluation set meets the second segmentation ratio;
[0128] Step 233, the first second data record of the second training set is extracted as a corresponding current training record;
[0129] Step 234, the second training sequence of the current training record is input into the knowledge consistency discrimination model for corresponding consistency classification discrimination processing, and the model output vector is taken as a corresponding third prediction vector;
[0130] Step 235, the third prediction vector and the second label vector of the current training record are brought into a preset second model loss function; and based on a preset second model optimizer, the knowledge consistency discrimination model is optimized for one round of model parameter optimization in the direction of making the second model loss function reach a preset second optimal loss value;
[0131] The second model loss function at least includes a cross-entropy loss function, and other types of loss functions can be customized based on application requirements; the second model optimizer at least includes an SGD optimizer and an ADAM optimizer, and other types of model optimizers can be customized based on application requirements; the second optimal loss value is a preset value corresponding to the loss function type of the second model loss function, and if the second model loss function is implemented based on the cross-entropy loss function, the second optimal loss value will be set to 0 by default;
[0132] Step 236, whether the current training record is the last second data record of the second training set is identified; if yes, go to step 237; if no, the next second data record of the second training set is extracted as a new current training record and returns to step 234;
[0133] Step 237, all second data records of the second evaluation set are traversed in one round; and in this round of traversal, the second data record currently traversed is taken as the corresponding current evaluation record; and the second training sequence of the current evaluation record is input into the knowledge consistency discrimination model for corresponding consistency classification discrimination processing, and the model output vector is taken as the corresponding fourth prediction vector; and a corresponding second prediction-label pair is formed by the fourth prediction vector and the second label vector of the current evaluation record; and at the end of this round of traversal, the second accuracy, the second precision, the second recall and the second F1 score are calculated according to all the second prediction-label pairs obtained;
[0134] Step 238, the second accuracy, the second precision, the second recall and the second F1 score obtained are identified; if the second accuracy does not satisfy the preset second accuracy range or the second precision does not satisfy the preset second precision range or the second recall does not satisfy the preset second recall range or the second F1 score does not satisfy the preset second F1 score range, return to step 233 for training; if the second accuracy satisfies the second accuracy range, the second precision satisfies the second precision range, the second recall satisfies the second recall range and the second F1 score satisfies the second F1 score range, it is confirmed that the knowledge consistency discrimination model is trained to end the knowledge consistency verification task;
[0135] Here, the second accuracy range, the second precision range, the second recall range and the second F1 score range are four pre-set numerical range parameters;
[0136] Step 24, the baseline discriminator model is trained based on the third data set to obtain the corresponding knowledge editing strategy discrimination model;
[0137] Specifically comprising: step 241, pre-adapting the component parameters of each model component of the benchmark discriminator model to obtain an untrained knowledge editing strategy discriminator model based on the model input / output design requirements of the knowledge editing strategy discriminator model;
[0138] Step 242, dividing the third data set into two sub-data sets based on a preset third split ratio, denoted as a corresponding third training set and a third evaluation set;
[0139] Wherein, the third split ratio is a preset ratio parameter, for example, 8:2; the third training set and the third evaluation set are both composed of multiple third data records; the ratio of the total number of records in the third training set to the total number of records in the third evaluation set satisfies the third split ratio;
[0140] Step 243, extracting the first third data record of the third training set as a corresponding current training record;
[0141] Step 244, inputting the second training sequence of the current training record into the knowledge editing strategy discriminator model for corresponding editing strategy classification discrimination processing, and taking the model output vector as a corresponding fifth prediction vector;
[0142] Step 245, taking the fifth prediction vector and the third label vector of the current training record into a preset third model loss function; and based on a preset third model optimizer, a round of model parameter optimization is performed on the knowledge editing strategy discriminator model in the direction of making the third model loss function reach a preset third optimal loss value;
[0143] Wherein, the third model loss function at least includes a cross-entropy loss function, and other types of loss functions can also be customized based on application requirements; the third model optimizer at least includes an SGD optimizer and an ADAM optimizer, and other types of model optimizers can also be customized based on application requirements; the third optimal loss value is a preset value corresponding to the loss function type of the third model loss function, if the third model loss function is realized based on the cross-entropy loss function, then the third optimal loss value will be set to 0 by default;
[0144] Step 246, identifying whether the current training record is the last third data record of the third training set; if yes, go to step 247; if no, extract the next third data record of the third training set as a new current training record and return to step 244;
[0145] Step 247, a round of traversal is performed on all third data records of the third evaluation set; and in the round of traversal, the third data record currently traversed is taken as a corresponding current evaluation record; and the third training sequence of the current evaluation record is input into the knowledge editing strategy discrimination model to perform corresponding editing strategy classification discrimination processing and the model output vector is taken as a corresponding sixth prediction vector; and a corresponding third prediction-label pair is formed by the sixth prediction vector and the third label vector of the current evaluation record; and at the end of the round of traversal, the third accuracy, the third precision, the third recall and the third F1 score are calculated according to all the third prediction-label pairs obtained;
[0146] Step 248, the third accuracy, the third precision, the third recall and the third F1 score obtained are identified; if the third accuracy does not satisfy the preset third accuracy range or the third precision does not satisfy the preset third precision range or the third recall does not satisfy the preset third recall range or the third F1 score does not satisfy the preset third F1 score range, step 243 is returned to continue training; if the third accuracy satisfies the third accuracy range, the third precision satisfies the third precision range, the third recall satisfies the third recall range and the third F1 score satisfies the third F1 score range, it is confirmed that the knowledge editing strategy discrimination model is trained to end the knowledge editing strategy identification task;
[0147] Here, the third accuracy range, the third precision range, the third recall range and the third F1 score range are four pre-set numerical range parameters.
[0148] Step 3, when any user uses the target editor to process a knowledge adding task, the knowledge item information added at this time is taken as a corresponding current knowledge item; and based on the current knowledge item and the knowledge compliance discrimination model, a compliance test is performed to obtain a corresponding first test result which is fed back to the target editor;
[0149] Specifically, step 31, when any user uses the target editor to process a knowledge adding task, the knowledge item information added at this time is taken as a corresponding current knowledge item;
[0150] Step 32, and based on the current knowledge item and the knowledge compliance discrimination model, a compliance test is performed to obtain a corresponding first test result which is fed back to the target editor;
[0151] Specifically, step 321, the corresponding knowledge subject, subject-object relationship and knowledge object are extracted from the current knowledge item as a corresponding current knowledge subject, current subject-object relationship and current knowledge object; and the current knowledge subject, first delimiter, current subject-object relationship, first delimiter and current knowledge object are sequentially spliced into a corresponding text sequence as a corresponding first input sequence;
[0152] Step 322, input the first input sequence into the knowledge compliance discrimination model for corresponding compliance classification discrimination processing, and take the output vector of the model as a corresponding first compliance classification discrimination vector;
[0153] Step 323, identify whether each compliance classification discrimination probability in the first compliance classification discrimination vector exceeds a preset compliance probability threshold, if yes, record the current compliance classification discrimination probability as a corresponding first compliance probability, if not, record the current compliance classification discrimination probability as a corresponding first violation probability;
[0154] Here, the compliance probability threshold is a pre-set probability threshold parameter;
[0155] Step 324, set a corresponding first test state for each knowledge structure constraint of the knowledge structure rule; and when the total number of first compliance probabilities is not zero, set the first test state corresponding to each first compliance probability as test passed; and when the total number of first violation probabilities is not zero, set the first test state corresponding to each first violation probability as test failed;
[0156] Step 325, form a corresponding first test record from each completed first test state and the corresponding knowledge structure constraint; and form a corresponding first test result from all the obtained first test records and feed back to the target editor.
[0157] Step 4, when any user uses the target editor to process knowledge addition or modification tasks, take the knowledge entry information added or modified at this time as a corresponding current knowledge entry; and based on the current knowledge entry, perform synonym entry query on the target knowledge base to obtain a corresponding synonym entry sequence; and when the synonym entry sequence is not empty, based on the current knowledge entry, the synonym entry sequence and the knowledge consistency discrimination model, perform consistency test to obtain a corresponding second test result and feed back to the target editor;
[0158] Specifically includes: step 41, when any user uses the target editor to process knowledge addition or modification tasks, take the knowledge entry information added or modified at this time as a corresponding current knowledge entry;
[0159] Step 42, and based on the current knowledge entry, perform synonym entry query on the target knowledge base to obtain a corresponding synonym entry sequence;
[0160] Specifically includes: extract the first knowledge entry in which all the first knowledge subjects in the target knowledge base and the knowledge subject of the current knowledge entry are mutual synonyms and the first subject-object relationship and the subject-object relationship of the current knowledge entry are mutual synonyms to form a corresponding synonym entry sequence;
[0161] Step 43, and when the synonym item sequence is not empty, performing consistency verification based on the current knowledge item, the synonym item sequence, and the knowledge consistency discrimination model to obtain a corresponding second verification result and feeding back to the target editor;
[0162] Specifically comprising: step 431, extracting the corresponding knowledge object and knowledge domain category from the current knowledge item to form a corresponding first item element group; and extracting the first knowledge object and the first knowledge domain category of each first knowledge item in the synonym item sequence to form a corresponding first item element group; and sequentially sorting all the obtained first item element groups to form a corresponding second input sequence;
[0163] Step 432, inputting the second input sequence into the knowledge consistency discrimination model for corresponding consistency classification discrimination processing and taking the output vector of the model as a corresponding first consistency classification discrimination vector;
[0164] Step 433, identifying whether each consistency classification discrimination probability in the first consistency classification discrimination vector exceeds a preset consistency probability threshold, and if so, recording the current consistency classification discrimination probability as a corresponding second compliance probability, and if not, recording the current consistency classification discrimination probability as a corresponding second violation probability;
[0165] Here, the consistency probability threshold is a pre-set probability threshold parameter;
[0166] Step 434, setting a corresponding second verification state for the knowledge item of each first item element group of the second input sequence; and when the total number of second compliance probabilities is not zero, setting the second verification state corresponding to each second compliance probability as verification passed; and when the total number of second violation probabilities is not zero, setting the second verification state corresponding to each second violation probability as verification failed;
[0167] Step 435, forming a corresponding second verification record from each completed second verification state and the corresponding knowledge item; and forming all the obtained second verification records into a corresponding second verification result and feeding back to the target editor.
[0168] Step 5, when an arbitrary user uses the target editor to complete a knowledge query and selects a knowledge item obtained by the query, taking the information of the currently selected knowledge item as a corresponding current knowledge item; taking the first user historical behavior data sequence corresponding to the current user as a corresponding current user historical behavior data sequence; and performing editing strategy recommendation processing based on the current knowledge item, the current user historical behavior data sequence, and the knowledge editing strategy discrimination model to obtain a corresponding strategy recommendation result and feeding back to the target editor;
[0169] Specifically comprising: step 51, when an arbitrary user completes a knowledge query using a target editor once and selects a knowledge item obtained by the query, taking the information of the currently selected knowledge item as a corresponding current knowledge item;
[0170] Step 52, and taking the first user historical behavior data sequence corresponding to the current user as a corresponding current user historical behavior data sequence;
[0171] Step 53, and performing editing strategy recommendation processing based on the current knowledge item, the current user historical behavior data sequence and the knowledge editing strategy discrimination model to obtain a corresponding strategy recommendation result and feed back to the target editor;
[0172] Specifically comprising: step 531, inputting the current user historical behavior data sequence into the knowledge editing strategy discrimination model to perform corresponding editing strategy classification discrimination processing and taking the output vector of the model as a corresponding first domain strategy classification discrimination vector;
[0173] Step 532, taking the domain+strategy combination corresponding to the maximum domain strategy classification discrimination probability in the first domain strategy classification discrimination vector as a corresponding predicted domain+strategy combination; and taking the knowledge domain category and the knowledge editing strategy corresponding to the predicted domain+strategy combination as a corresponding predicted knowledge domain category and a predicted knowledge editing strategy;
[0174] Step 533, identifying whether the knowledge domain category corresponding to the current knowledge item matches the predicted knowledge domain category; if yes, taking the predicted knowledge editing strategy as a corresponding strategy recommendation result; if no, extracting a plurality of domain+strategy combinations whose knowledge domain categories match the knowledge domain category corresponding to the current knowledge item from all domain+strategy combinations corresponding to the target knowledge base and the target editor to form a corresponding first combination set, extracting the domain strategy classification discrimination probabilities corresponding to each domain+strategy combination of the first combination set from the first domain strategy classification discrimination vector to form a corresponding first probability set, and taking the knowledge editing strategy corresponding to the domain+strategy combination corresponding to the maximum probability in the first probability set as a corresponding strategy recommendation result;
[0175] Step 534, feeding back the obtained strategy recommendation result to the target editor.
[0176] Figure 4 A module structure diagram of a processing device of a discriminator model for knowledge editing provided by the second embodiment of the present application, the device being a terminal device or a server for implementing the method embodiments, or a device capable of enabling the terminal device or the server to implement the method embodiments, for example, the device can be a device or a chip system of the terminal device or the server. As shown in the figure, the device comprises a receiving module 10, a processing module 20 and a feeding back module 30. Figure 4As shown, the apparatus comprises a dataset preparation module 201, a model construction and training module 202, a first model application module 203, a second model application module 204, and a third model application module 205.
[0177] The dataset preparation module 201 is configured to construct a dataset for training a knowledge compliance verification task based on a preset target knowledge base, denoted as a corresponding first dataset; construct a dataset for training a knowledge consistency verification task based on the target knowledge base, denoted as a corresponding second dataset; record a knowledge editor corresponding to the target knowledge base as a corresponding target editor; continuously track user behavior data of all users using the target editor and refresh the first user historical behavior data sequence corresponding to each user based on the tracking results; and when all the first user historical behavior data sequences obtained can cover all knowledge domain categories of the target knowledge base and all knowledge editing strategies of the target editor, construct a dataset for training a knowledge editing strategy identification task based on all the first user historical behavior data sequences obtained, denoted as a corresponding third dataset.
[0178] The model construction and training module 202 is configured to design a baseline discriminator model; train the baseline discriminator model based on the first dataset to obtain a corresponding knowledge compliance discriminator model; train the baseline discriminator model based on the second dataset to obtain a corresponding knowledge consistency discriminator model; and train the baseline discriminator model based on the third dataset to obtain a corresponding knowledge editing strategy discriminator model.
[0179] The first model application module 203 is configured to, when any user uses the target editor to process a knowledge addition task, take the knowledge item information added at this time as a corresponding current knowledge item; and perform compliance verification based on the current knowledge item and the knowledge compliance discriminator model to obtain a corresponding first verification result and feed back to the target editor.
[0180] The second model application module 204 is configured to, when any user uses the target editor to process a knowledge addition or modification task, take the knowledge item information added or modified at this time as a corresponding current knowledge item; perform synonymous item query on the target knowledge base based on the current knowledge item to obtain a corresponding synonymous item sequence; and when the synonymous item sequence is not empty, perform consistency verification based on the current knowledge item, the synonymous item sequence, and the knowledge consistency discriminator model to obtain a corresponding second verification result and feed back to the target editor.
[0181] The third model application module 205 is configured to, when any user uses the target editor to complete a knowledge query and selects a knowledge item obtained by the query, take the currently selected knowledge item information as a corresponding current knowledge item, take the first user historical behavior data sequence corresponding to the current user as a corresponding current user historical behavior data sequence, and perform editing strategy recommendation processing based on the current knowledge item, the current user historical behavior data sequence, and the knowledge editing strategy discrimination model to obtain a corresponding strategy recommendation result and feed back the result to the target editor.
[0182] The processing device for a discriminator model for knowledge editing provided in the embodiments of the present application can execute the method steps in the method embodiments, and has similar implementation principles and technical effects, which will not be described here again.
[0183] It should be noted that the division of each module of the above device is only a logical functional division, and all or part of the modules can be integrated into one physical entity, or can be physically separated. The modules can all be implemented in the form of software called by a processing element, or all be implemented in the form of hardware, or part of the modules are implemented in the form of software called by a processing element, and part of the modules are implemented in the form of hardware. For example, the data set preparation module can be a separately set processing element, or can be integrated in a chip of the above device, in addition, the data set preparation module can also be stored in the form of program code in the memory of the above device, and the function of the data set preparation module is called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, all or part of the modules can be integrated together, or can be independently implemented. The processing element described herein can be an integrated circuit having a signal processing capability. In the implementation process, each step of the above method or each module can be completed by an integrated logic circuit of hardware or an instruction in the form of software in the processing element.
[0184] For example, the above modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), and so on. For another example, when a certain module above is implemented in the form of a processing element scheduling code, the processing element can be a general purpose processor, such as a Central Processing Unit (CPU) or other processor capable of invoking code. For another example, the modules can be integrated together to implement the above methods in the form of a System-on-a-chip (SOC).
[0185] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, the computer instructions generate all or part of the processes or functions described in the above method embodiments. The computer can be a general purpose computer, a special purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.) manner. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0186] Figure 5 A structural schematic diagram of an electronic device is provided for Embodiment Three of the present application. The electronic device can be a terminal device or a server implementing the method of the above embodiments, or a terminal device or a server connected to the terminal device or the server implementing the method of the above embodiments. As shown in FIG. 3, the electronic device includes a processor 301, a memory 302, a communication interface 303, and a bus 304. The bus 304 can be a hardware line used for communication between the above components. The processor 301 is configured to implement the method of the above embodiments. The memory 302 is configured to store the computer instructions of the processor 301. The communication interface 303 is configured to implement the communication function of the electronic device.Figure 5 As shown in the figure, the electronic device can include a processor 301 (for example, a CPU), a memory 302, a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiving action of the transceiver 303. The memory 302 can store various instructions for completing various processing functions and implementing the processing steps described in the foregoing embodiment method description. Preferably, the electronic device related to the embodiments of the present application further includes a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize the communication connection between elements. The above-mentioned communication port 306 is used for connection and communication between the electronic device and other external devices.
[0187] In Figure 5 The system bus 305 mentioned in the foregoing can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as a client, a read-write library and a read-only library). The memory can include a Random Access Memory (RAM), and can also include a Non-Volatile Memory, such as at least one disk memory.
[0188] The above-mentioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), a Graphics Processing Unit (GPU), etc.; can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0189] It should be noted that the embodiments of the present application also provide a computer readable storage medium, which stores instructions, when running on a computer, causes the computer to execute the method and processing procedure provided in the above embodiments.
[0190] The embodiment of the present application provides a processing method and device of a discriminator model for knowledge editing, an electronic device and a computer readable storage medium. According to the above content, the embodiment of the present application constructs a data set for knowledge compliance inspection task training and a data set for knowledge consistency inspection task training based on a target knowledge base, which are recorded as a first data set and a second data set; and records a knowledge editor corresponding to the target knowledge base as a corresponding target editor, continuously tracks user behavior data of all users using the target editor, and refreshes the first user historical behavior data sequence corresponding to each user based on the tracking result, and constructs a data set for knowledge editing strategy identification task training based on all the obtained first user historical behavior data sequences when all the obtained first user historical behavior data sequences can cover all knowledge domain categories of the target knowledge base and all knowledge editing strategies of the target editor, which is recorded as a corresponding third data set; and designs a benchmark discriminator model, and respectively trains the benchmark discriminator model based on the first, second and third data sets to obtain a corresponding knowledge compliance discrimination model, a knowledge consistency discrimination model and a knowledge editing strategy discrimination model; then, when any user uses the target editor to process a knowledge addition task, the knowledge item information added at this time is taken as a corresponding current knowledge item, and the compliance inspection is performed based on the current knowledge item and the knowledge compliance discrimination model to obtain a corresponding inspection result, which is fed back to the target editor; when any user uses the target editor to process a knowledge addition or modification task, the knowledge item information added or modified at this time is taken as a corresponding current knowledge item, and the same item query is performed on the target knowledge base based on the current knowledge item to obtain a corresponding synonym item sequence, and when the synonym item sequence is not empty, the consistency inspection is performed based on the current knowledge item, the synonym item sequence and the knowledge consistency discrimination model to obtain a corresponding inspection result, which is fed back to the target editor; and when any user uses the target editor to complete a knowledge query and selects a knowledge item obtained by the query, the information of the currently selected knowledge item is taken as a corresponding current knowledge item, and the first user historical behavior data sequence corresponding to the current user is taken as a corresponding current user historical behavior data sequence, and the editing strategy recommendation processing is performed based on the current knowledge item, the current user historical behavior data sequence and the knowledge editing strategy discrimination model to obtain a corresponding recommended strategy, which is fed back to the target editor. The developers of the customized editor can better solve or improve the compliance problems, consistency problems and user experience problems of the conventional customized editor by using the three types of discrimination models (knowledge compliance discrimination model, knowledge consistency discrimination model and knowledge editing strategy discrimination model) provided by the embodiment of the present application; through the embodiment of the present application, the data compliance inspection capability and data consistency guarantee capability of the customized editor are improved, and the user experience of the customized editor is also improved.
[0191] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and
[0192] The above detailed description describes the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A processing method for a discriminator model used in knowledge editing, characterized in that, The method includes: A dataset for training a knowledge compliance verification task is constructed based on a preset target knowledge base, denoted as the first dataset; a dataset for training a knowledge consistency verification task is constructed based on the target knowledge base, denoted as the second dataset; the knowledge editor corresponding to the target knowledge base is denoted as the target editor; user behavior data of all users using the target editor is continuously tracked, and the first user historical behavior data sequence corresponding to each user is refreshed based on the tracking results; when all the obtained first user historical behavior data sequences can cover all knowledge domain categories of the target knowledge base and all knowledge editing strategies of the target editor, a dataset for training a knowledge editing strategy recognition task is constructed based on all the obtained first user historical behavior data sequences, denoted as the third dataset; Design a baseline discriminator model; train the baseline discriminator model on the first dataset to obtain a corresponding knowledge compliance discriminator model; train the baseline discriminator model on the second dataset to obtain a corresponding knowledge consistency discriminator model; and train the baseline discriminator model on the third dataset to obtain a corresponding knowledge editing strategy discriminator model. When any user uses the target editor to process a knowledge addition task, the information of the knowledge entry added at that time is taken as the corresponding current knowledge entry; and a compliance check is performed based on the current knowledge entry and the knowledge compliance judgment model to obtain the corresponding first check result, which is then fed back to the target editor. When any user uses the target editor to process knowledge addition or modification tasks, the information of the knowledge entry added or modified at that time is taken as the corresponding current knowledge entry; and a synonym query is performed on the target knowledge base based on the current knowledge entry to obtain the corresponding synonym entry sequence; and when the synonym entry sequence is not empty, a consistency check is performed based on the current knowledge entry, the synonym entry sequence, and the knowledge consistency discrimination model to obtain the corresponding second check result, which is then fed back to the target editor. When any user completes a knowledge query using the target editor and selects a queried knowledge item, the currently selected knowledge item information is taken as the corresponding current knowledge item; the first user's historical behavior data sequence corresponding to the current user is taken as the corresponding current user's historical behavior data sequence; and the editing strategy recommendation process is performed based on the current knowledge item, the current user's historical behavior data sequence, and the knowledge editing strategy discrimination model to obtain the corresponding strategy recommendation result, which is then fed back to the target editor.
2. The processing method for the discriminator model for knowledge editing according to claim 1, characterized in that, The target knowledge base includes multiple first knowledge entries; the data elements of the first knowledge entry include at least a first entry identifier, a first creation / update time, a first triplet element, a first knowledge weight, and a first knowledge domain category. The first triplet elements include the first knowledge subject, the first subject-object relation, and the first knowledge object; The knowledge structure rules corresponding to the target knowledge base include multiple knowledge structure constraints; each knowledge structure constraint is used to constrain the data format or data type of a type of data element of a knowledge entry; The first dataset includes multiple first data records; each first data record includes a first training sequence and a first label vector; the first training sequence is a text sequence, formed by sequentially concatenating a first training knowledge subject, a first separator, a first training subject-object relationship, the first separator, and a first training knowledge object; the first label vector consists of multiple first label probabilities, each corresponding one-to-one with the knowledge structure constraint; if the first training sequence satisfies a constraint of a certain knowledge structure constraint, the first label probability in the first label vector corresponding to the current knowledge structure constraint is 1; if the first training sequence does not satisfy a constraint of a certain knowledge structure constraint, the first label probability in the first label vector corresponding to the current knowledge structure constraint is 0. The second dataset includes multiple second data records; the second data records include a second training sequence and a second label vector; the second training sequence is formed by sorting multiple first training item element groups; the first training item element group includes a first item object and a first item knowledge domain category; The second label vector consists of multiple second label probabilities, and each second label probability corresponds one-to-one with the first training item element group; If the content of one of the first training item element groups in the second training sequence is consistent with the content of all other first training item element groups, the corresponding second label probability is 1; if the content of one of the first training item element groups in the second training sequence is inconsistent with the content of any other first training item element group, the corresponding second label probability is 0. The third dataset includes multiple third data records; the third data record includes a third training sequence and a third label vector; the third training sequence is formed by sorting multiple first training action data in chronological order. The first training behavior data includes a first training knowledge domain selection and a first training editing strategy selection; the first training knowledge domain selection includes multiple knowledge domain categories, and the first training editing strategy selection includes multiple knowledge editing strategies. The third label vector consists of multiple third label probabilities, each of which corresponds to a domain + strategy combination consisting of a knowledge domain category and a knowledge editing strategy. The value of the third label probability is 0 or 1, and there is only one third label probability of 1 in the third label vector. The third dataset should cover all the knowledge domain categories of the target knowledge base and all the knowledge editing strategies of the target editor. The first user historical behavior data sequence is composed of multiple first user historical behavior data arranged in chronological order; the first user historical behavior data includes the first user knowledge domain selection and the first user editing strategy selection; the first user knowledge domain selection includes multiple knowledge domain categories, and the first user editing strategy selection includes multiple knowledge editing strategies.
3. The processing method for the discriminator model for knowledge editing according to claim 2, characterized in that, The baseline discriminator model is used to perform classification and discrimination processing based on the model input sequence and output the corresponding classification and discrimination vector; the classification and discrimination vector is composed of multiple classification and discrimination probabilities, and each classification and discrimination probability corresponds to a discrimination type; The baseline discriminator model includes an encoding layer, a linear attention layer, a pooling layer, a fully connected network, and a softmax layer. The encoding layer is implemented based on the Transformer architecture's Encoder model structure. The input of the encoding layer is connected to the model input, and its output is connected to the input of the linear attention layer. The output of the linear attention layer is connected to the input of the pooling layer. The output of the pooling layer is connected to the input of the fully connected network. The output of the fully connected network is connected to the input of the softmax layer. The output of the softmax layer is connected to the model output. The knowledge compliance discrimination model is used to perform corresponding compliance classification and discrimination processing on a type of input sequence and output a corresponding compliance classification and discrimination vector. The type of input sequence is a text sequence, which is composed of knowledge subject, first separator, subject-object relation, first separator and knowledge object in sequence. The first separator is a preset single character. The compliance classification and discrimination vector is composed of multiple compliance classification and discrimination probabilities. The compliance classification and discrimination probabilities correspond one-to-one with the knowledge structure constraints. The knowledge consistency discrimination model is used to perform corresponding consistency classification discrimination processing on the binary input sequences of the model input and output the corresponding consistency classification discrimination vector; the binary input sequences are composed of multiple item element groups sorted together; the item element group includes the item object and the item knowledge domain category; The consistency classification discriminant vector is composed of multiple consistency classification discriminant probabilities; each consistency classification discriminant probability corresponds one-to-one with the entry element group. The knowledge editing strategy discrimination model is used to classify and discriminate the three types of input sequences into the model and output the corresponding domain strategy classification and discrimination vectors. The three types of input sequences are formed by sorting multiple historical behavior data of the same user in chronological order. The historical behavior data includes knowledge domain selection and editing strategy selection. The knowledge domain selection includes multiple knowledge domain categories, and the editing strategy selection includes multiple knowledge editing strategies. The domain strategy classification discriminant vector is composed of multiple domain strategy classification discriminant probabilities, and each domain strategy classification discriminant probability corresponds to a domain + strategy combination consisting of a knowledge domain category and a knowledge editing strategy; the total number of domain strategy classification discriminant probabilities is consistent with the total number of domain + strategy combinations of the target knowledge base and the target editor.
4. The processing method for the discriminator model for knowledge editing according to claim 2, characterized in that, The dataset constructed based on the preset target knowledge base for training knowledge compliance verification tasks is denoted as the corresponding first dataset, and specifically includes: Extract all first knowledge entries in the target knowledge base that satisfy the knowledge structure rules to form a corresponding first entry set; The first knowledge entries in the first entry set are traversed once; during this traversal, the first knowledge entry currently traversed is taken as the corresponding current knowledge entry; a first positive sample record generation process is performed based on the current knowledge entry to obtain a corresponding first data record; a first negative sample record generation process is performed based on the current knowledge entry to obtain a corresponding first data record; and at the end of this traversal, all the obtained first data records are combined to form the corresponding first dataset. in, The process of generating a first positive sample record based on the current knowledge entry to obtain a corresponding first data record specifically involves: extracting the first knowledge subject, the first subject-object relation, and the first knowledge object from the first triplet elements of the current knowledge entry as the corresponding first training knowledge subject, the first training subject-object relation, and the first training knowledge object; sequentially concatenating the first training knowledge subject, the first separator, the first training subject-object relation, the first separator, and the first training knowledge object, and using the total number of knowledge structure constraints in the knowledge structure rules as the vector length to construct a numerical vector with all data set to 1 as the corresponding first label vector; and forming a corresponding first data record by combining the first training sequence corresponding to the current knowledge entry and the first label vector. The process of generating a first negative sample record based on the current knowledge entry to obtain a corresponding first data record specifically involves: extracting the first knowledge subject, the first subject-object relation, and the first knowledge object from the first triplet element of the current knowledge entry as the corresponding first training knowledge subject, the first training subject-object relation, and the first training knowledge object; randomly modifying the obtained first training knowledge subject and / or the first training subject-object relation and / or the first training knowledge object according to the violation modification method of the knowledge structure rules; and after completing this violation modification, removing the constraints in the knowledge structure rules that are no longer valid due to this violation modification. The satisfied knowledge structure constraints are recorded as the corresponding violation constraints; the latest first training knowledge subject, the first separator, the latest first training subject-object relationship, the first separator, and the latest first training knowledge object are sequentially concatenated, and the resulting concatenated text sequence is used as the corresponding first training sequence; a numerical vector with all data set to 1 is constructed using the total number of knowledge structure constraints of the knowledge structure rules as the vector length, which is used as the corresponding first label vector; the vector data corresponding to each violation constraint in the current first label vector is reset to 0; and the final first training sequence and the first label vector form a corresponding first data record.
5. The processing method for the discriminator model for knowledge editing according to claim 2, characterized in that, The second dataset, denoted as the corresponding second dataset, is constructed based on the target knowledge base for training the knowledge consistency verification task. Specifically, it includes: Extract a set of first knowledge entries from the target knowledge base that are synonyms of each other in terms of the first knowledge subjects, the first subject-object relationship, the content of the first knowledge objects, and the content of the first knowledge domain categories, and form a corresponding first synonym entry sequence; and form a corresponding first sequence set by all the obtained first synonym entry sequences. The process involves iterating through all the first synonym entry sequences in the first sequence set; during this iteration, the currently iterated first synonym entry sequence is taken as the corresponding current synonym entry sequence; a second positive sample record generation process is performed based on the current synonym entry sequence to obtain a corresponding second data record; a second negative sample record generation process is performed based on the current synonym entry sequence to obtain a corresponding second data record; and at the end of this iteration, all the obtained second data records form the corresponding second dataset. in, The process of generating a second positive sample record based on the current synonym entry sequence to obtain a corresponding second data record specifically involves: extracting the first knowledge object and the first knowledge domain category of each first knowledge entry in the current synonym entry sequence as the corresponding first entry object and first entry knowledge domain category to form a corresponding first training entry element group; and sequentially sorting all the obtained first training entry element groups to form a corresponding second training sequence; constructing a numerical vector with all data set to 1 as the vector length using the total number of first knowledge entries in the current synonym entry sequence as the vector length to serve as the corresponding second label vector; and forming a corresponding second data record by combining the second training sequence corresponding to the current synonym entry sequence and the second label vector. The process of generating a second negative sample record based on the current synonym entry sequence to obtain a corresponding second data record specifically involves: extracting the first knowledge object and the first knowledge domain category of each first knowledge entry in the current synonym entry sequence as the corresponding first entry object and first entry knowledge domain category to form a corresponding first training entry element group; and sequentially sorting all the obtained first training entry element groups to form a corresponding second training sequence; randomly modifying the first entry object and / or the first entry knowledge domain category of some or all of the first training entry element groups in the obtained second training sequence so that the data content of some or all of the first training entry element groups in the second training sequence cannot be consistent; and after completing the sequence modification, recording the first training entry element groups in the second training sequence that are inconsistent with the data content of any other first training entry element group as the corresponding non-consistent element group; constructing a numerical vector with all data set to 1 as the vector length using the total number of first knowledge entries in the current synonym entry sequence as the vector length as the corresponding second label vector; resetting the vector data corresponding to each of the non-consistent element groups in the second label vector to 0; and finally forming a corresponding second data record from the obtained second training sequence and the second label vector.
6. The processing method for the discriminator model for knowledge editing according to claim 2, characterized in that, The continuous tracking of user behavior data of all users using the target editor and the updating of the first user historical behavior data sequence corresponding to each user based on the tracking results specifically include: When any user uses the target editor for the first time, an empty sequence is created for the current user as the corresponding historical behavior data sequence of the first user. Each time a user adds or modifies a first knowledge entry in the target knowledge base using the target editor, the first knowledge domain category of the first knowledge entry being processed by the current user is extracted as the corresponding first user knowledge domain selection, and the knowledge editing strategy currently being used by the current user in the target editor is used as the corresponding first user editing strategy selection. The first user knowledge domain selection and the first user editing strategy selection obtained this time are combined to form a corresponding first user historical behavior data and added to the first user historical behavior data sequence corresponding to the current user.
7. The processing method for the discriminator model for knowledge editing according to claim 2, characterized in that, The dataset constructed based on all the obtained historical behavior data sequences of the first user, for training the knowledge editing strategy recognition task, is denoted as the corresponding third dataset, and specifically includes: A traversal is performed on all the obtained first user historical behavior data sequences. During this traversal, the currently traversed first user historical behavior data sequence is taken as the corresponding current data sequence. The total number of first user historical behavior data in the current data sequence is counted, and the count result is taken as the corresponding current sequence length. It is then determined whether the current sequence length exceeds a preset first sequence length threshold. If not, the current data sequence is taken as a corresponding first data sequence. If so, the first sequence length threshold is taken as the corresponding maximum slice sequence length, and the current data sequence is slicing based on a preset sliding step and the maximum slice sequence length to obtain multiple corresponding slice data sequences. Each slice data sequence is taken as a corresponding first data sequence. After traversing all the first user historical behavior data sequences, another round of traversal is performed on all the obtained first data sequences. During this round of traversal, the currently traversed first data sequence is taken as the corresponding current data sequence. The first user knowledge domain selection and the first user editing strategy selection of each first user historical behavior data in the current data sequence are extracted as the corresponding first training knowledge domain selection and the first training editing strategy selection to form a corresponding first training behavior data. All the obtained first training behavior data are sorted in chronological order to form a corresponding first temporary sequence. The last first training behavior data in the first temporary sequence is recorded as the corresponding target behavior data. The first temporary sequence after removing the target behavior data is taken as a corresponding third training sequence. All domain + strategy combinations of the target knowledge base and the target editor are identified to obtain the corresponding domain + strategy combination set, and the total number of combinations in the domain + strategy combination set is counted to obtain the corresponding first combination total number; a numerical vector with all zero data is constructed using the first combination total number as the vector length as the corresponding third label vector; the domain + strategy combination corresponding to the first training knowledge domain selection and the first training editing strategy selection of the target behavior data is recorded as the corresponding target combination; the vector data corresponding to the target combination in the third label vector is reset to 1; after the vector reset is completed, the third training sequence corresponding to the current data sequence and the third label vector are combined to form a corresponding third data record; and at the end of this round of traversal, all the obtained third data records are combined to form the corresponding third dataset.
8. The processing method for the discriminator model for knowledge editing according to claim 3, characterized in that, The first compliance check, based on the current knowledge entry and the knowledge compliance discrimination model, is performed and the corresponding first check result is fed back to the target editor. Specifically, this includes: Step 81: Extract the corresponding knowledge subject, subject-object relationship, and knowledge object from the current knowledge entry as the corresponding current knowledge subject, current subject-object relationship, and current knowledge object; and sequentially concatenate the current knowledge subject, the first separator, the current subject-object relationship, the first separator, and the current knowledge object into a corresponding text sequence as the corresponding first input sequence; Step 82: Input the first input sequence into the knowledge compliance discrimination model to perform corresponding compliance classification discrimination processing, and use the output vector of the model as the corresponding first compliance classification discrimination vector; Step 83: Identify whether the compliance classification probability in the first compliance classification discrimination vector exceeds the preset compliance probability threshold. If so, record the current compliance classification discrimination probability as a corresponding first compliance probability; otherwise, record the current compliance classification discrimination probability as a corresponding first violation probability. Step 84: Set a corresponding first inspection state for each knowledge structure constraint of the knowledge structure rule; and when the total number of the first compliance probabilities is not zero, set the first inspection state corresponding to each first compliance probability to inspection passed; and when the total number of the first violation probabilities is not zero, set the first inspection state corresponding to each first violation probability to inspection failed. Step 85: Each completed first inspection state and its corresponding knowledge structure constraint form a corresponding first inspection record; and all the obtained first inspection records form the corresponding first inspection result, which is then fed back to the target editor.
9. The processing method for the discriminator model for knowledge editing according to claim 3, characterized in that, The process of performing a consistency check based on the current knowledge entry, the sequence of synonymous entries, and the knowledge consistency discrimination model to obtain a corresponding second check result, which is then fed back to the target editor, specifically includes: Step 91: Extract the corresponding knowledge object and knowledge domain category from the current knowledge entry to form a corresponding first entry element group; extract the first knowledge object and first knowledge domain category of each first knowledge entry in the synonym entry sequence to form a corresponding first entry element group; and sort all the obtained first entry element groups in order to form a corresponding second input sequence. Step 92: Input the second input sequence into the knowledge consistency discrimination model to perform corresponding consistency classification discrimination processing, and use the output vector of the model as the corresponding first consistency classification discrimination vector; Step 93: Identify whether each consistency classification probability in the first consistency classification discrimination vector exceeds a preset consistency probability threshold. If so, record the current consistency classification discrimination probability as a corresponding second compliance probability; otherwise, record the current consistency classification discrimination probability as a corresponding second violation probability. Step 94: Set a corresponding second inspection state for each knowledge item corresponding to each first item element group of the second input sequence; and when the total number of the second compliance probabilities is not zero, set the second inspection state corresponding to each second compliance probability to inspection passed; and when the total number of the second violation probabilities is not zero, set the second inspection state corresponding to each second violation probability to inspection failed. Step 95: Each completed second inspection state and its corresponding knowledge entry forms a corresponding second inspection record; and all the obtained second inspection records form the corresponding second inspection result, which is then fed back to the target editor.
10. The processing method for the discriminator model for knowledge editing according to claim 3, characterized in that, The step of performing editing strategy recommendation processing based on the current knowledge entry, the current user's historical behavior data sequence, and the knowledge editing strategy discrimination model to obtain the corresponding strategy recommendation result and then feeding it back to the target editor specifically includes: Step 101: Input the current user's historical behavior data sequence into the knowledge editing strategy discrimination model to perform corresponding editing strategy classification and discrimination processing, and use the model's output vector as the corresponding first domain strategy classification and discrimination vector; Step 102: Take the domain + strategy combination corresponding to the largest domain strategy classification discrimination probability in the first domain strategy classification discrimination vector as the corresponding predicted domain + strategy combination; and take the knowledge domain category and the knowledge editing strategy corresponding to the predicted domain + strategy combination as the corresponding predicted knowledge domain category and predicted knowledge editing strategy. Step 103: Identify whether the knowledge domain category corresponding to the current knowledge entry matches the predicted knowledge domain category; if they match, use the predicted knowledge editing strategy as the corresponding strategy recommendation result; if they do not match, extract multiple domain + strategy combinations from all domain + strategy combinations corresponding to the target knowledge base and the target editor that match the knowledge domain category corresponding to the current knowledge entry to form a corresponding first combination set, and extract the domain strategy classification discrimination probability from the first domain strategy classification discrimination vector corresponding to each domain + strategy combination in the first combination set to form a corresponding first probability set, and use the knowledge editing strategy corresponding to the domain + strategy combination with the highest probability in the first probability set as the corresponding strategy recommendation result; Step 104: Feed back the obtained strategy recommendation results to the target editor.
11. An apparatus for performing the processing method of the discriminator model for knowledge editing according to any one of claims 1-10, characterized in that, The device includes: a dataset preparation module, a model building and training module, a first model application module, a second model application module, and a third model application module; The dataset preparation module is used to construct a dataset for training a knowledge compliance verification task based on a preset target knowledge base, denoted as the corresponding first dataset; and to construct a dataset for training a knowledge consistency verification task based on the target knowledge base, denoted as the corresponding second dataset; and to designate the knowledge editor corresponding to the target knowledge base as the corresponding target editor; to continuously track user behavior data of all users using the target editor and refresh the first user historical behavior data sequence corresponding to each user based on the tracking results; and when all the obtained first user historical behavior data sequences can cover all knowledge domain categories of the target knowledge base and all knowledge editing strategies of the target editor, to construct a dataset for training a knowledge editing strategy recognition task based on all the obtained first user historical behavior data sequences, denoted as the corresponding third dataset. The model building and training module is used to design a benchmark discriminator model; train the benchmark discriminator model based on the first dataset to obtain a corresponding knowledge compliance discrimination model; train the benchmark discriminator model based on the second dataset to obtain a corresponding knowledge consistency discrimination model; and train the benchmark discriminator model based on the third dataset to obtain a corresponding knowledge editing strategy discrimination model. The first model application module is used to take the knowledge entry information added at that time as the corresponding current knowledge entry when any user uses the target editor to process the knowledge addition task; and to perform compliance verification based on the current knowledge entry and the knowledge compliance judgment model to obtain the corresponding first verification result and feed it back to the target editor. The second model application module is used to, when any user uses the target editor to process knowledge addition or modification tasks, take the knowledge entry information added or modified at that time as the corresponding current knowledge entry; and perform a synonym query on the target knowledge base based on the current knowledge entry to obtain the corresponding synonym entry sequence; and when the synonym entry sequence is not empty, perform a consistency check based on the current knowledge entry, the synonym entry sequence and the knowledge consistency discrimination model to obtain the corresponding second check result and feed it back to the target editor. The third model application module is used to, when any user completes a knowledge query using the target editor and selects a queried knowledge item, take the currently selected knowledge item information as the corresponding current knowledge item; take the first user's historical behavior data sequence corresponding to the current user as the corresponding current user's historical behavior data sequence; and perform editing strategy recommendation processing based on the current knowledge item, the current user's historical behavior data sequence, and the knowledge editing strategy discrimination model to obtain the corresponding strategy recommendation result and feed it back to the target editor.
12. An electronic device, characterized in that, include: Memory, processor, and transceiver; The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method according to any one of claims 1-10; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a computer, cause the computer to perform the method described in any one of claims 1-10.
Citation Information
Patent Citations
Design method of expert knowledge base oriented to intelligent garment manufacturing
CN105354375A
Knowledge retrieval method and device, electronic equipment and computer readable storage medium
CN115269815A