Method for updating data recognition strategy and related device
By automatically identifying core words and matching category confidence, the problem of low efficiency in updating data identification strategies is solved, and efficient and accurate data identification strategy updates are achieved.
Patent Information
- Application Number
- CN202310835713.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-07-07
AI Technical Summary
In the existing technology, the update of data identification strategies mainly relies on manual analysis, resulting in low update efficiency.
The core words are automatically identified through data recognition strategy update instructions, matched with the target word set, and the recognition category and category confidence are determined to achieve automatic update of the data recognition strategy.
It improves the updating efficiency of data identification strategies, reduces manual intervention, and ensures the accuracy and flexibility of updates.
Smart Images

Figure CN116894201B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method for updating a data identification strategy and a related device. Background Art
[0002] As the types of data security issues increase, the requirements for data identification strategies are getting higher and higher. Data identification strategies are used to determine the categories of data to be identified. For example, by inputting the data to be identified into the data identification strategy, the identification category corresponding to the data can be obtained. The identification category can be "pornography", "security" and "illegal intrusion" and other identification categories to determine the security of the data. However, data security can no longer guarantee data security by simply relying on inherent data identification strategies. More attention must be paid to the flexibility and customization of data identification strategies (for example, users can request to add identification categories to the data identification strategy and / or further classify the identification categories). This allows for efficient detection of data security issues based on demand.
[0003] In the existing technology, the update of data recognition strategy mainly relies on manual analysis of data recognition update content, and then manually updating the data recognition strategy according to the update requirements obtained by word segmentation. However, this method wastes a lot of time, resulting in low efficiency in updating data recognition strategy. Summary of the Invention
[0004] In an exemplary embodiment of the present disclosure, a data identification strategy update method and related devices are provided for automatically updating the data identification strategy to be updated based on the data identification strategy update instruction, thereby saving the update time of the data identification strategy and improving the update efficiency of the data identification strategy.
[0005] A first aspect of the present disclosure provides a method for updating a data identification strategy, the method comprising:
[0006] In response to a data identification policy update instruction sent by a user, determining data identification policy update content and a data identification policy to be updated based on the data identification policy update instruction;
[0007] Identifying the data identification strategy update content to obtain at least one core word in the data identification strategy update content;
[0008] For any core word, the core word is matched with the target word set in the data recognition strategy to be updated to obtain the recognition category and category confidence of the core word;
[0009] The data identification strategy to be updated is updated according to the identification category of each core word and the category confidence of each core word to obtain an updated data identification strategy.
[0010] In the embodiment, the data recognition strategy updating instruction is used to determine the data recognition strategy updating content and the data recognition strategy to be updated, and then the data recognition strategy updating content is recognized to obtain core words. The core words are matched with a target word set in the data recognition strategy to be updated to obtain the recognition category and category confidence of the core words. Finally, the data recognition strategy to be updated is updated according to the recognition category of each core word and the category confidence of each core word to obtain an updated data recognition strategy. Thus, in the embodiment, the data recognition strategy can be automatically updated based on the data recognition strategy updating instruction, and the data recognition strategy updating content does not need to be manually segmented, and the data recognition strategy does not need to be manually updated, which can save time and improve the updating efficiency of the data recognition strategy.
[0011] In one embodiment, the recognition of the data recognition strategy updating content to obtain at least one core word in the data recognition strategy updating content includes:
[0012] The data recognition strategy updating content is segmented by using a preset algorithm to obtain a plurality of segmented words.
[0013] For any segmented word, the segmented word is compared with preset core words.
[0014] If the segmented word exists in the preset core words, the segmented word is determined as a core word.
[0015] In the embodiment, the data recognition strategy updating content is segmented first, and then the segmented words are compared with preset core words to identify core words in the data recognition strategy updating content. Thus, the accuracy of the identified core words is ensured.
[0016] In one embodiment, the type of the core word includes a first type of core word and / or a second type of core word, the target word set includes a plurality of target word sets of recognition categories, any target word set of a recognition category includes a key word set and a sample word set, the sample word set contains the key word set, and the sample word set includes a word and / or a sentence.
[0017] The matching of the core word with the target word set in the data recognition strategy to be updated to obtain the recognition category and category confidence of the core word includes:
[0018] If there are target core terms in the first type of core terms that are the same as the key terms in the key term set of each identified category, and the number of target core terms is greater than a specified number, for any target core term, the identified category of the key term that is the same as the target core term is determined as the identified category of the target core term, the category confidence of the target core term is determined as a specified confidence, and the type of the core terms in the first type of core terms other than the target core terms is determined as a second type; or,
[0019] If there are no target core terms in the first type of core terms that are the same as the key terms in the key term set of each identified category, or there are target core terms in the first type of core terms that are the same as the key terms in the key term set of each identified category, and the number of target core terms is not greater than a specified number, the type of each core term in the first type of core terms is determined as a second type.
[0020] The second type of core terms are matched with the sample term set of each identified category in the data identification strategy to be updated respectively, to obtain the matching degree between each identified category and each core term of the second type.
[0021] According to the matching degree between each identified category and each core term of the second type, the identified category and the category confidence of each core term of the second type are obtained.
[0022] In this embodiment, different types of core terms are used to determine the identified category and the category confidence of each core term in different ways, thereby improving the accuracy of the determined identified category and the category confidence of each core term.
[0023] In one embodiment, the matching of the second type of core terms with the sample term set of each identified category in the data identification strategy to be updated respectively to obtain the matching degree between each identified category and each core term of the second type comprises:
[0024] The second type of core terms are vectorized to obtain target vectors corresponding to the second type of core terms, wherein the number of vector parameters in the target vector is the same as the number of core terms of the second type, and each core term of the second type corresponds to a target vector.
[0025] According to the vector corresponding to the sample keyword set of the identified category and the target vector, a matching degree between each core keyword of the second type and the identified category is obtained.
[0026] In the embodiment, the second type of core keywords are vectorized to obtain the target vector corresponding to the second type of core keywords, and then the matching degree of the vector corresponding to the sample keyword set of each identified category is determined through the target vector. Thus, the accuracy of the determined matching degree is ensured.
[0027] In one embodiment, the data recognition strategy to be updated includes a keyword recognition strategy and / or an artificial intelligence (AI) recognition strategy. The keyword recognition strategy is to recognize keywords in the data to be recognized, and determine the identified category of the data to be recognized based on the number of occurrences of each recognized keyword in the data to be recognized and the recognition weight of the keyword. The AI recognition strategy is to input the data to be recognized into a pre-trained AI algorithm to obtain the identified category of the data to be recognized.
[0028] The data recognition strategy to be updated in the embodiment includes one or more data recognition strategies, so that the corresponding data recognition strategy can be used for data recognition according to different requirements, and the accuracy of data recognition is improved.
[0029] In one embodiment, if the data recognition strategy to be updated includes a keyword recognition strategy,
[0030] The data recognition strategy to be updated is updated according to the identified category of each core keyword and the category confidence of each core keyword to obtain an updated data recognition strategy, including:
[0031] If the data recognition strategy update instruction is to add a first specified identified category in the data recognition strategy to be updated, each keyword in the keyword set corresponding to the identified category of each core keyword is determined as each target keyword of the first specified identified category, and for any one target keyword, the updated recognition weight of the target keyword is obtained by using the recognition weight of the target keyword in the data recognition strategy to be updated and the category confidence corresponding to the identified category of the target keyword. The data recognition strategy to be updated is updated through the target keywords and the updated recognition weight of the target keywords to obtain the updated data recognition strategy; or,
[0032] If the data recognition strategy update instruction is to perform sub-classification on a second specified recognition category in the data recognition strategy to be updated, the recognition categories of the core terms are determined as each target recognition category after sub-classification of the second specified recognition category, and the key term set corresponding to the recognition category of each core term is determined as the key term set of each target recognition category. For any target recognition category, the updated recognition weight of each key term in the key term set of the target recognition category is obtained by using the recognition weight of each key term in the key term set of the target recognition category and the category confidence corresponding to the target recognition category in the data recognition strategy to be updated. The data recognition strategy to be updated is updated by using each key term in the key term set of the target recognition category and the updated recognition weight of each key term, and an updated data recognition strategy is obtained.
[0033] The updating of the data recognition strategy to be updated in the embodiment of the application can add an identification category to the data recognition strategy to be updated and further sub-classify a certain identification category in the data recognition strategy to be updated. Therefore, the data recognition strategy to be updated can be automatically customized and updated according to user needs in the embodiment of the application, thereby ensuring the accuracy of data recognition and improving the updating efficiency of the data recognition strategy.
[0034] In one embodiment, if the data recognition strategy to be updated includes an AI recognition strategy,
[0035] The updating of the data recognition strategy to be updated according to the recognition categories of the core terms and the category confidences of the core terms includes:
[0036] For any one of the recognition categories of the core terms, the target sample term quantity corresponding to the recognition category is obtained based on the category confidence of the recognition category and the total number of sample terms in the sample term set of the recognition category; and
[0037] The target sample term set is obtained by randomly sampling a target sample term quantity of sample terms in the sample term set of the recognition category.
[0038] If the data recognition strategy update instruction is to add a first specified recognition category to the data recognition strategy to be updated, the target sample term set corresponding to each recognition category is determined as the sample term set of the first specified recognition category, and the AI recognition model is retrained based on the sample term set of the first specified recognition category to obtain the updated data recognition strategy; or
[0039] If the data recognition strategy update instruction is to perform sub-classification on a second specified recognition category in the data recognition strategy to be updated, the recognition categories of the core words are determined as the recognition categories after sub-classification of the second specified recognition category, the target sample word set corresponding to each recognition category is determined as the sample word set of the recognition category, the AI recognition model is retrained according to the sample word set of each recognition category, and the updated data recognition strategy is obtained.
[0040] The updating of the data recognition strategy to be updated in the embodiment of the application can add a recognition category to the data recognition strategy to be updated and perform sub-classification on a certain recognition category in the data recognition strategy to be updated. Therefore, the data recognition strategy to be updated can be automatically customized and updated according to user needs in the embodiment of the application, the accuracy of data recognition is ensured, and the updating efficiency of the data recognition strategy is improved.
[0041] In one embodiment, if the data recognition strategy to be updated includes an AI recognition strategy and a keyword recognition strategy,
[0042] The updating of the data recognition strategy to be updated according to the recognition categories of the core words and the category confidences of the core words to obtain an updated data recognition strategy includes:
[0043] If the data recognition strategy update instruction is to add a first specified recognition category to the data recognition strategy to be updated, each keyword in the keyword set corresponding to the recognition category of each core word is determined as a target keyword of the first specified recognition category, for any target keyword, the updated recognition weight of the target keyword is obtained by using the recognition weight of the target keyword in the data recognition strategy to be updated and the category confidence corresponding to the recognition category of the target keyword, the data recognition strategy to be updated is updated by using the target keywords and the updated recognition weights of the target keywords, and the updated data recognition strategy is obtained;
[0044] and the target sample word set corresponding to each recognition category is determined as the sample word set of the first specified recognition category, and the AI recognition model is retrained based on the sample word set of the first specified recognition category to obtain the updated data recognition strategy, wherein the target sample word set is obtained by randomly extracting a target sample word number of word samples from the sample word set of the recognition category, and the target sample word number is obtained based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category; or,
[0045] If the data recognition strategy update instruction is to sub-classify a second specified recognition class in the data recognition strategy to be updated, the recognition classes of the core terms are determined as each target recognition class after sub-classification of the second specified recognition class, and the key term set corresponding to each core term is determined as the key term set of each target recognition class. For any target recognition class, the updated recognition weight of each key term in the key term set of the target recognition class is obtained by using the recognition weight of each key term in the key term set of the target recognition class and the class confidence corresponding to the target recognition class in the data recognition strategy to be updated. The data recognition strategy to be updated is updated by using each key term in the key term set of the target recognition class and the updated recognition weight of each key term, and an updated data recognition strategy is obtained.
[0046] The recognition classes of the core terms are determined as the recognition classes after sub-classification of the second specified recognition class, and the target sample term set corresponding to each recognition class is determined as the sample term set of each recognition class. The AI recognition model is retrained according to the sample term set of each recognition class, and the updated data recognition strategy is obtained.
[0047] The updating of the data recognition strategy to be updated in the embodiment of the application can add an identification class to the data recognition strategy to be updated and further sub-classify a certain recognition class in the data recognition strategy to be updated. If the data recognition strategy to be updated includes multiple strategies, each strategy needs to be updated. Therefore, the accuracy of data recognition is further improved.
[0048] The second aspect of the present disclosure provides an updating device of a data recognition strategy, the device comprising:
[0049] An updating content determination module is configured to determine data recognition strategy updating content and a data recognition strategy to be updated based on a data recognition strategy update instruction sent by a user in response to the data recognition strategy update instruction.
[0050] A core term determination module is configured to identify the data recognition strategy updating content to obtain at least one core term in the data recognition strategy updating content.
[0051] A matching module is configured to match, for any core term, the core term with a target term set in the data recognition strategy to be updated to obtain a recognition class of the core term and a class confidence.
[0052] The strategy updating module is configured to update the data recognition strategy to be updated according to the identified categories of the core words and the category confidence of the core words, and obtain an updated data recognition strategy.
[0053] In one embodiment, the core word determining module is specifically configured to:
[0054] The data recognition strategy updating content is segmented by using a preset algorithm, and a plurality of segmented words are obtained.
[0055] For any one segmented word, the segmented word is compared with the preset core words.
[0056] If the segmented word exists in the preset core words, the segmented word is determined as a core word.
[0057] In one embodiment, the types of the core words include first-type core words and / or second-type core words, the target word set includes a plurality of target word sets of identified categories, any one target word set of an identified category includes a keyword set and a sample word set, the sample word set contains the keyword set, and the sample word set includes words and / or sentences.
[0058] The matching module is specifically configured to:
[0059] For the first-type core words, if the first-type core words include target core words identical to the keywords in the keyword set of each identified category, and the number of the target core words is greater than a specified number, for any one target core word, the identified category of the keyword identical to the target core word is determined as the identified category of the target core word, the category confidence of the target core word is determined as a specified confidence, and the types of the core words other than the target core words in the first-type core words are determined as second-type core words; or,
[0060] If the first-type core words do not include target core words identical to the keywords in the keyword set of each identified category, or the first-type core words include target core words identical to the keywords in the keyword set of each identified category, and the number of the target core words is not greater than a specified number, the types of the first-type core words are all determined as second-type core words.
[0061] The second-type core words are matched with the sample word sets of each identified category in the data recognition strategy to be updated respectively, and the matching degrees between the second-type core words and each identified category are obtained.
[0062] According to the matching degree between each recognition category and each core word of the second type, the recognition category and category confidence of each core word of the second type are obtained.
[0063] In one embodiment, the matching module is further configured to:
[0064] performing vectorization processing on each core word of the second type to obtain a target vector corresponding to each core word of the second type, wherein the number of vector parameters in the target vector is the same as the number of each core word of the second type, and each core word of the second type corresponds to one target vector;
[0065] For any one recognition category in the data recognition strategy to be updated, the matching degree between each core word of the second type and the recognition category is obtained based on the vector corresponding to the sample word set of the recognition category and the target vector.
[0066] In one embodiment, the data identification strategy to be updated includes a keyword identification strategy and / or an artificial intelligence (AI) identification strategy, and the keyword identification strategy is to perform keyword identification on the data to be identified, and determine the identification category of the data to be identified based on the number of times each identified keyword appears in the data to be identified and the identification weight of each keyword. The AI identification strategy is to input the data to be identified into a pre-trained AI algorithm to obtain the identification category of the data to be identified.
[0067] In one embodiment, if the data identification strategy to be updated includes a keyword identification strategy;
[0068] The policy update module is specifically used to:
[0069] If the data identification strategy update instruction is to add a first designated identification category to the data identification strategy to be updated, each keyword in the keyword set corresponding to the identification category of each core word is determined as each target keyword of the first designated identification category, and for any target keyword, the identification weight of the target keyword in the data identification strategy to be updated and the category confidence corresponding to the identification category of the target keyword are used to obtain the updated identification weight of the target keyword, and the data identification strategy to be updated is updated by the target keywords and the updated identification weights of the target keywords to obtain the updated data identification strategy; or,
[0070] If the data recognition strategy updating instruction is to perform sub-classification on a second specified recognition category in the to-be-updated data recognition strategy, the recognition categories of the core words are determined as each target recognition category after sub-classification of the second specified recognition category, and the key word set corresponding to each core word is determined as the key word set of each target recognition category. For any target recognition category, the updated recognition weight of each key word in the key word set of the target recognition category is obtained by using the recognition weight of each key word in the key word set of the target recognition category in the to-be-updated data recognition strategy and the category confidence corresponding to the target recognition category. The to-be-updated data recognition strategy is updated by using each key word in the key word set of the target recognition category and the updated recognition weight of each key word, and an updated data recognition strategy is obtained.
[0071] In an embodiment, if the to-be-updated data recognition strategy includes an AI recognition strategy;
[0072] The strategy updating module is specifically configured to:
[0073] For any recognition category in each recognition category of the core words, a target sample word quantity corresponding to the recognition category is obtained based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category; and
[0074] A target sample word set is obtained by randomly extracting a target sample word quantity of sample words in the sample word set of the recognition category.
[0075] If the data recognition strategy updating instruction is to add a first specified recognition category in the to-be-updated data recognition strategy, the target sample word set corresponding to each recognition category is determined as the sample word set of the first specified recognition category, and the AI recognition model is retrained based on the sample word set of the first specified recognition category to obtain the updated data recognition strategy; or
[0076] If the data recognition strategy updating instruction is to perform sub-classification on a second specified recognition category in the to-be-updated data recognition strategy, the recognition categories of the core words are determined as each target recognition category after sub-classification of the second specified recognition category, and the key word set corresponding to each core word is determined as the key word set of each target recognition category. For any target recognition category, the updated recognition weight of each key word in the key word set of the target recognition category is obtained by using the recognition weight of each key word in the key word set of the target recognition category in the to-be-updated data recognition strategy and the category confidence corresponding to the target recognition category. The to-be-updated data recognition strategy is updated by using each key word in the key word set of the target recognition category and the updated recognition weight of each key word, and an updated data recognition strategy is obtained.
[0077] In an embodiment, if the data recognition strategy to be updated comprises an AI recognition strategy and a keyword recognition strategy;
[0078] The strategy updating module is specifically configured to:
[0079] If the data recognition strategy updating instruction is to add a first specified recognition category in the data recognition strategy to be updated, each keyword in the keyword set corresponding to the recognition category of each core word is determined as a target keyword of the first specified recognition category, and for any target keyword, the updated recognition weight of the target keyword is obtained by using the recognition weight of the target keyword in the data recognition strategy to be updated and the category confidence corresponding to the recognition category of the target keyword, the data recognition strategy to be updated is updated by using the target keyword and the updated recognition weight of the target keyword, and the updated data recognition strategy is obtained.
[0080] The target sample word set corresponding to each recognition category is determined as the sample word set of the first specified recognition category, and the AI recognition model is retrained based on the sample word set of the first specified recognition category to obtain the updated data recognition strategy, wherein the target sample word set is obtained by randomly extracting a word sample of a target sample word quantity from the sample word set of the recognition category, and the target sample word quantity is obtained based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category; or,
[0081] If the data recognition strategy updating instruction is to perform fine classification on a second specified recognition category in the data recognition strategy to be updated, the recognition category of each core word is determined as each target recognition category after fine classification of the second specified recognition category, and the keyword set corresponding to the recognition category of each core word is determined as the keyword set of each target recognition category, for any target recognition category, the updated recognition weight of each keyword in the keyword set of the target recognition category is obtained by using the recognition weight of each keyword in the keyword set of the target recognition category in the data recognition strategy to be updated and the category confidence corresponding to the target recognition category, the data recognition strategy to be updated is updated by using each keyword in the keyword set of the target recognition category and the updated recognition weight of each keyword, and the updated data recognition strategy is obtained.
[0082] The identified categories of the core words are determined as the identified categories after the second specified classification, and the target sample word set corresponding to each identified category is determined as the sample word set of the identified category, and the AI recognition model is retrained according to the sample word set of each identified category to obtain the updated data recognition strategy.
[0083] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, comprising:
[0084] at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executed by the at least one processor; the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the first aspect.
[0085] According to a fourth aspect of the embodiments of the present disclosure, a computer storage medium is provided, which stores a computer program for executing the method of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0086] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.
[0087] Figure 1 An applicable scenario diagram according to an embodiment of the present disclosure;
[0088] Figure 2 One of the flow diagrams of the updating method of the data recognition strategy according to an embodiment of the present disclosure;
[0089] Figure 3 The flow diagram of determining the identified categories and category confidence of the core words according to an embodiment of the present disclosure;
[0090] Figure 4 The identified categories in the data recognition strategy to be updated according to an embodiment of the present disclosure;
[0091] Figure 5 The flow diagram of determining the matching degree between each identified category and the core words of the second type according to an embodiment of the present disclosure;
[0092] Figure 6 The diagram of adding an identified category according to an embodiment of the present disclosure;
[0093] Figure 7 Fig. 2 is a schematic diagram of a sub-classification of a recognition category according to an embodiment of the present disclosure;
[0094] Figure 8 Fig. 3 is a schematic diagram of a process of updating an AI recognition strategy according to an embodiment of the present disclosure;
[0095] Figure 9 Fig. 4 is a schematic diagram of a process of an updating method of a data recognition strategy according to an embodiment of the present disclosure;
[0096] Figure 10 Fig. 5 is an updating device of a data recognition strategy according to an embodiment of the present disclosure;
[0097] Figure 11 Fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0098] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present disclosure.
[0099] In the embodiments of the present disclosure, the term “and / or” describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character “ / ” generally represents an “or” relationship between the associated objects before and after it.
[0100] The application scenarios described in the embodiments of the present disclosure are used to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those of ordinary skill in the art can know that, as new application scenarios appear, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems. In the description of the present disclosure, unless otherwise specified, the meaning of “multiple” is two or more.
[0101] In the prior art, the updating of the data recognition strategy mainly relies on manual analysis of the data recognition update content, and then manual updating of the data recognition strategy according to the segmented update requirements. However, this method wastes a lot of time and leads to low efficiency of updating the data recognition strategy.
[0102] Therefore, the present disclosure provides a data recognition strategy updating method. The data recognition strategy updating content and the data recognition strategy to be updated are determined through a data recognition strategy updating instruction. Then, the data recognition strategy updating content is recognized to obtain core words. The core words are matched with a target word set in the data recognition strategy to be updated to obtain the recognition categories and category confidence of the core words. Finally, the data recognition strategy to be updated is updated according to the recognition categories of the core words and the category confidence of the core words to obtain an updated data recognition strategy. Thus, in the embodiments of the present application, the data recognition strategy can be automatically updated based on the data recognition strategy updating instruction, without the need for manual word segmentation of the data recognition strategy updating content, and without the need for manual updating of the data recognition strategy, thereby saving time and improving the updating efficiency of the data recognition strategy. Hereinafter, the scheme of the present disclosure will be described in detail in combination with the drawings.
[0103] As shown in FIG. 1, an application scenario of a data recognition strategy updating method includes a terminal device 110 and a server 120. The server 120 can be implemented by a single server or multiple servers. The server 120 can be implemented by a physical server or a virtual server. Figure 1 In a possible application scenario, a user sends a data recognition strategy updating instruction to the server 120 through the terminal device 110. After receiving the data recognition strategy updating instruction, the server 120 determines the data recognition strategy updating content and the data recognition strategy to be updated based on the data recognition strategy updating instruction in response to the data recognition strategy updating instruction sent by the user. Then, the server 120 identifies the data recognition strategy updating content to obtain at least one core word in the data recognition strategy updating content. Then, the server 120 matches the core word with a target word set in the data recognition strategy to be updated to obtain the recognition category and category confidence of the core word. Finally, the server 120 updates the data recognition strategy to be updated according to the recognition categories of the core words and the category confidence of the core words to obtain an updated data recognition strategy.
[0104] In the application scenario, the server 120 and the terminal device 110 can exchange information through a communication network. The communication network can adopt a wireless communication mode or a wired communication mode.
[0105] Figure 1
[0106] For example, the server 120 can access the network through cellular mobile communication technology, such as 5th Generation Mobile Networks (5G) technology, to communicate with the terminal device 110.
[0107] Optionally, the server 120 can access the network through short-range wireless communication technology, such as Wireless Fidelity (Wi-Fi) technology, to communicate with the terminal device 110.
[0108] In the description of the present application, only one terminal device 110 and one server 120 are described in detail, but those skilled in the art should understand that the terminal device and the server shown are intended to represent the operation of the terminal device and the server involved in the technical solution of the present application. It is not implied that there is a limitation on the number, type or location of the terminal device and the server. It should be noted that if additional modules are added to the illustrated environment or individual modules are removed therefrom, the underlying concept of the example embodiments of the present application will not change.
[0109] It should be noted that the data recognition strategy updating method proposed in the present application is not only applicable to the application scenarios shown, but also applicable to any data recognition strategy updating device. Figure 1
[0110] The method of updating the data recognition strategy of the example embodiments of the present application will be described below in combination with the above-described application scenarios and with reference to the accompanying drawings. It should be noted that the above-described application scenarios are only shown to facilitate understanding of the method and principles of the present application, and the embodiments of the present application are not limited in this respect.
[0111] As shown in FIG. 1, a flowchart of the data recognition strategy updating method of the present disclosure can include the following steps: Figure 2
[0112] Step 201: In response to a data recognition strategy updating instruction sent by a user, determining data recognition strategy updating content and a data recognition strategy to be updated based on the data recognition strategy updating instruction.
[0113] The data recognition strategy update instruction in the embodiment of the application includes the data recognition strategy update content and the data recognition strategy to be updated. The data recognition strategy can include data recognition strategies in multiple fields, for example, a data recognition strategy in the financial field, a data recognition strategy in the education field, a data recognition strategy in the political field, and the like. In the embodiment of the application, which data recognition strategy is specifically updated is selected by a user. The data recognition strategy update content is a sentence, for example, can be "add the recognition category of 'bank' in the data recognition strategy in the financial field". The data recognition update content is set by a user according to a requirement, and the embodiment of the application does not limit the data recognition strategy update content here.
[0114] Step 202: identifying the data recognition strategy update content to obtain at least one core word in the data recognition strategy update content;
[0115] In one embodiment, step 202 can be specifically implemented as: performing word segmentation processing on the data recognition strategy update content by using a preset algorithm to obtain a plurality of segmented words; for any one segmented word, comparing the segmented word with preset core words; if the segmented word exists in the preset core words, the segmented word is determined as a core word.
[0116] The preset algorithm in the embodiment of the application is a word segmentation algorithm, and the specific word segmentation algorithm can be a character matching word segmentation algorithm, a shortest path word segmentation method, and a word segmentation method, and the like. The specific word segmentation algorithm can be set according to actual conditions, and the embodiment of the application does not limit the word segmentation algorithm here.
[0117] In order to improve the recognition efficiency of the core word, in one embodiment, before comparing the segmented word with the preset core words, the stop words in the segmented word are deleted.
[0118] The stop words in the embodiment of the application include a corresponding stop word library, the segmented word is compared with the stop words in the stop word library, the stop words in the segmented word are determined, and the stop words are deleted.
[0119] Step 203: for any one core word, matching the core word with a target word set in the data recognition strategy to be updated to obtain a recognition category of the core word and a category confidence;
[0120] The types of the core words include first-type core words and / or second-type core words, the target word set includes a plurality of identified-category target word sets, any identified-category target word set includes a keyword set and a sample word set, the sample word set contains the keyword set, and the sample word set includes words and / or sentences.
[0121] In the embodiment, a first-type core word library is preset. The first type in the embodiment is a type related to an identified category. The type of each core word can be determined in the following manner:
[0122] Each core word is compared with each word in the first-type core word library, and each core word that is the same as a word in the first-type core word library is determined as a first-type core word. Other core words in the core words except the first-type core words are determined as second-type core words.
[0123] Next, the manner of determining the identified category of each core word and the category confidence in step 203 is described in detail. As shown in FIG. 3, the manner can include the following steps: Figure 3
[0124] Step 301: For each first-type core word, it is determined whether there is a target core word that is the same as each keyword in the keyword set of each identified category in the first-type core words, and the number of the target core words is greater than a specified number. If yes, step 302 is performed, and if no, step 304 is performed.
[0125] In one embodiment, the target core word is determined in the following manner: For any core word in the first-type core words, the core word is compared with each keyword in the union of the keyword sets of each identified category. If it is determined that there is a keyword in the union that is the same as the core word, the core word is determined as the target core word.
[0126] The keyword set of any identified category in the data identification strategy to be updated in the embodiment can be directly obtained and is preset in advance. The specified number in the embodiment ranges from greater than 0 to less than the total number of core words. The specified number in the embodiment can be set according to actual conditions, and the embodiment does not limit the specific value of the specified number.
[0127] Step 302: For any target core word, determine the recognition category of the keyword that is the same as the target core word as the recognition category of the target core word, and determine the category confidence of the target core word as a specified confidence;
[0128] The specified confidence level in the embodiment of the present application is 1. However, the embodiment of the present application does not limit the specified confidence level. The specified confidence level in the embodiment of the present application can be set according to specific actual conditions.
[0129] Step 303: determining the types of the core words other than the target core words in the core words of the first type as the second type;
[0130] For example, Figure 4 As shown in the figure, the identification categories in the data identification strategy to be updated include identification category 1, identification category 2, identification category 3, and identification category 4. In this example, letters are used instead of words, but there is no limitation on keywords and core words. The core words and keywords in the embodiments of the present application can be Chinese characters, letters, numbers, symbols, etc., and can be set according to actual conditions. In the embodiments of the present application, there is no limitation on keywords and core words.
[0131] If the key word set of recognition category 1 is (a, b, c, d). The key word set of recognition category 2 is (m, n, l, k). The key word set of recognition category 3 is (d, e, h, g). The key word set of recognition category 4 is (x, o, r). If the core words of the first type are (a, d, s, p, r). And the specified number is 2, the union of the key words of each recognition category is (a, b, c, d, m, n, l, k, d, e, h, g, x, o, r). Then the target core words are determined to be: a, d and r. And it is determined that the number of target core words is greater than the specified number, and the recognition category of the target core word a is determined to be recognition category 1. The recognition category of the target core word d is determined to be recognition category 1. The recognition category of the target core word r is determined to be recognition category 4. And the types of core words s and core words p are determined to be the second type.
[0132] Step 304: Determine the type of each core word of the first type as the second type;
[0133] Step 305: Match each core word of the second type with the sample word set of each recognition category in the data recognition strategy to be updated, and obtain the matching degree between each recognition category and each core word of the second type;
[0134] like Figure 5As shown, a flowchart for determining the matching degree between each recognition category and the core words of the second type is shown, including the following steps:
[0135] Step 501: Vectorize each core word of the second type to obtain a target vector corresponding to each core word of the second type, wherein the number of vector parameters in the target vector is the same as the number of core words of the second type, and each core word of the second type corresponds to a target vector.
[0136] The vectorization processing method in the embodiment of the application is tf-idf (term frequency-inversed document frequency). That is, the core words of the second type are input into the tf-idf algorithm to obtain a target vector corresponding to each core word of the second type. However, the vectorization processing method is not limited in the embodiment of the application, and can be set according to actual conditions.
[0137] Step 502: For any one recognition category in the data recognition strategy to be updated, the matching degree between each core word of the second type and the recognition category is obtained according to the vector corresponding to the sample word set of the recognition category and the target vector.
[0138] In one embodiment, step 502 can be specifically implemented as: for any one recognition category, the product of the vector corresponding to the sample word set of the recognition category and the target vector is determined as the matching degree between each core word of the second type and the recognition category.
[0139] The vector corresponding to the sample word set in the embodiment of the application is pre-configured. If the sample word set of the recognition category does not have a corresponding vector, it can be determined based on the tf-idf algorithm. This method is a method in the prior art, which will not be described in detail in the embodiment of the application.
[0140] Step 306: According to the matching degree between each recognition category and each core word of the second type, the recognition category and the category confidence of each core word of the second type are obtained.
[0141] In one embodiment, step 306 can be specifically implemented as follows: sorting the matching degrees in descending order to obtain the sorted matching degrees; if the matching degrees of the first preset number of the sorted matching degrees are greater than the specified matching degree, then determining the recognition categories corresponding to the matching degrees of the first preset number of the sorted matching degrees as the recognition categories of the core words of the second category; if the number of the sorted matching degrees is not greater than the preset number, and each matching degree is greater than the specified matching degree, then determining the recognition categories corresponding to the matching degrees of the first preset number of the sorted matching degrees as the recognition categories of the core words of the second category; if there is a matching degree that is not greater than the specified matching degree among the matching degrees of the first preset number of the sorted matching degrees, then determining the recognition categories corresponding to the matching degrees that are greater than the specified matching degree as the recognition categories of the core words of the second category. After determining the recognition categories of the core words, for any recognition category, the matching degree of the recognition category is determined as the category confidence corresponding to the recognition category.
[0142] The preset number in the embodiment of the present application is 3, but this does not limit the preset number in the implementation of this application. The preset number in the embodiment of the present application can be set according to actual conditions. The specified matching degree in the embodiment of the present application can be 0.6. However, this does not limit the specified matching degree in the embodiment of the present application, and the specified matching degree in the embodiment of the present application can be set according to actual conditions.
[0143] For example, the target vector corresponding to each core word of the second type has a matching degree of 0.11 with recognition category 1, a matching degree of 0.62 with recognition category 2, a matching degree of 0.65 with recognition category 3, a matching degree of 0.24 with recognition category 4, and a matching degree of 0.71 with recognition category 5. Then, the recognition categories after sorting in order from large to small are: recognition category 5, recognition category 3, recognition category 2, recognition category 4, and recognition category 1. If the specified number is 3, and the specified matching degree can be 0.6. Recognition category 5, recognition category 3, and recognition category 2 are determined as the recognition categories corresponding to each core word of the second type, that is, each core word of the second type has three corresponding recognition categories, namely, recognition category 5, recognition category 3, and recognition category 2. And the category confidence corresponding to each recognition category is: 0.71, 0.65, and 0.62, respectively.
[0144] Step 204: updating the data identification strategy to be updated according to the identification category of each core word and the category confidence of each core word to obtain an updated data identification strategy.
[0145] The data recognition strategy to be updated in the embodiment of the application includes a keyword recognition strategy and / or an artificial intelligence (AI) recognition strategy. Hereinafter, the keyword recognition strategy and the AI recognition strategy are introduced.
[0146] The keyword recognition strategy: for any one recognition category in the data recognition strategy to be updated, keyword recognition is performed on the data to be recognized by using a keyword set of the recognition category, to obtain each keyword in the data to be recognized and the number of occurrences of each keyword in the data to be recognized; for any one keyword, the number of occurrences of the keyword in the data to be recognized and the recognition weight of the keyword in the data recognition strategy to be updated are multiplied to obtain a product corresponding to the keyword, and the products corresponding to all keywords are added to obtain a confidence degree of the data to be recognized belonging to the recognition category, and the recognition category with the highest confidence degree in all recognition categories of the data recognition strategy to be updated is determined as the recognition category of the data to be recognized.
[0147] The AI recognition strategy: the data to be recognized is input into a pre-trained AI algorithm to obtain the recognition category of the data to be recognized.
[0148] Hereinafter, the updating manner of the security recognition strategy to be updated in step 204 is described in detail, including the following three cases.
[0149] Case one: if the data recognition strategy to be updated includes a keyword recognition strategy.
[0150] (1) If the data recognition strategy updating instruction is to add a first specified recognition category in the data recognition strategy to be updated, the data recognition strategy to be updated is updated in the following manner:
[0151] Each keyword in the keyword set corresponding to the recognition category of each core keyword is determined as each target keyword of the first specified recognition category, and for any one target keyword, the updated recognition weight of the target keyword is obtained by using the recognition weight of the target keyword in the data recognition strategy to be updated and the category confidence degree corresponding to the recognition category of the target keyword, and the data recognition strategy to be updated is updated by using the target keywords and the updated recognition weights of the target keywords, to obtain the updated data recognition strategy.
[0152] In the embodiment of the application, the recognition weight of the target keyword in the data recognition strategy to be updated and the category confidence degree corresponding to the recognition category of the target keyword are multiplied to obtain the updated recognition weight of the target keyword.
[0153] In one embodiment, the data recognition strategy to be updated is updated by the target keywords and the updated recognition weights of the target keywords, and obtaining the updated data recognition strategy can be specifically implemented as:
[0154] The first specified recognition category is added in the data recognition strategy to be updated, the set of the target keywords is set as the keyword set of the first specified recognition category, and the updated recognition weights of the target keywords are respectively set as the recognition weights of the target keywords in the updated data recognition strategy, so as to obtain the updated data recognition strategy.
[0155] As shown in Figure 6 A recognition category n is added in the data recognition strategy to be updated.
[0156] (2) If the data recognition strategy update instruction is to perform sub-classification on the specified recognition category in the data recognition strategy to be updated, the data recognition strategy to be updated is updated by the following manner:
[0157] The recognition categories of the core keywords are determined as the target recognition categories after sub-classification of the second specified recognition category, the keyword sets corresponding to the recognition categories of the core keywords are respectively determined as the keyword sets of the target recognition categories, for any target recognition category, the updated recognition weights of the keywords in the keyword set of the target recognition category are obtained by using the recognition weights of the keywords in the keyword set of the target recognition category in the data recognition strategy to be updated and the category confidence corresponding to the target recognition category, and the data recognition strategy to be updated is updated by the keywords in the keyword set of the target recognition category and the updated recognition weights of the keywords, so as to obtain the updated data recognition strategy.
[0158] In the embodiment of the application, for any keyword in the keyword set of any target recognition category, the updated recognition weight of the keyword is obtained by multiplying the recognition weight of the keyword in the data recognition strategy to be updated and the category confidence corresponding to the target recognition category.
[0159] In one embodiment, the data recognition strategy to be updated is updated by the target recognition categories, the keyword sets of the target recognition categories, and the updated recognition weights of the keywords in the keyword sets of the target recognition categories, and obtaining the updated data recognition strategy can be specifically implemented as:
[0160] add each target recognition category in the second specified recognition category in the data recognition strategy to be updated, and for any one target recognition category, set a keyword set of the target recognition category in the data recognition strategy to be updated as a keyword set of the target recognition category in the updated data recognition strategy, and set an updated recognition weight of each keyword corresponding to the target recognition category as a recognition weight of each keyword in the updated data recognition strategy.
[0161] For example, as shown in Figure 7 the second specified recognition category is recognition category 1, and the determined target recognition categories are recognition category n and recognition category m, then recognition category 1 is reclassified to include recognition category n and recognition category m, and the keyword set of recognition category n and recognition category m in recognition category 1 is set based on the keyword set of recognition category n and recognition category m, and the recognition weight of each keyword corresponding to recognition category n and recognition category m is set as the updated recognition weight of each keyword.
[0162] Case two: if the data recognition strategy to be updated includes an AI recognition strategy. As shown in Figure 8 the following steps are included:
[0163] Step 801: for any one recognition category in each recognition category of the core keyword, based on the category confidence of the recognition category and the total number of sample keywords in the sample keyword set of the recognition category, the target sample keyword quantity corresponding to the recognition category is obtained;
[0164] In one embodiment, step 801 can be specifically implemented as: multiplying the category confidence of the recognition category by the total number of sample keywords of the recognition category to obtain the target sample keyword quantity.
[0165] Step 802: randomly extract a target sample keyword set of a target sample keyword quantity from the sample keyword set of the recognition category, to obtain a target sample keyword set;
[0166] Step 803: if the data recognition strategy update instruction is to add a first specified recognition category in the data recognition strategy to be updated, then the target sample keyword set corresponding to each recognition category is determined as the sample keyword set of the first specified recognition category, and the AI recognition model is retrained based on the sample keyword set of the first specified recognition category to obtain the updated data recognition strategy;
[0167] The AI recognition model in the embodiments of the present application can be set according to actual specific actual situations, and the embodiments of the present application do not limit the AI recognition model here. Moreover, the training mode of the AI recognition model can also be set according to actual situations, and the embodiments of the present application do not limit the training mode here.
[0168] Step 804: If the data recognition strategy update instruction is to perform sub-classification on a second specified recognition category in the to-be-updated data recognition strategy, the recognition categories of the core words are determined as the recognition categories after sub-classification of the second specified recognition category, the target sample word set corresponding to each recognition category is determined as the sample word set of the recognition category, the AI recognition model is retrained according to the sample word set of the recognition category, and the updated data recognition strategy is obtained.
[0169] Case three: If the to-be-updated data recognition strategy includes an AI recognition strategy and a keyword recognition strategy.
[0170] (1) If the data recognition strategy update instruction is to add a specified recognition category in the to-be-updated data recognition strategy, the data recognition strategy is updated in the following manner:
[0171] Each keyword in the keyword set corresponding to the recognition category of each core word is determined as each target keyword of the first specified recognition category, for any one target keyword, the updated recognition weight of the target keyword is obtained by using the recognition weight of the target keyword in the to-be-updated data recognition strategy and the category confidence corresponding to the recognition category of the target keyword, the to-be-updated data recognition strategy is updated by using the target keyword and the updated recognition weight of the target keyword, and the updated data recognition strategy is obtained; and the target sample word set corresponding to each recognition category is determined as the sample word set of the first specified recognition category, and the AI recognition model is retrained based on the sample word set of the first specified recognition category, and the updated data recognition strategy is obtained, wherein the target sample word set is obtained by randomly sampling a target sample word number of word samples from the sample word set of the recognition category, and the target sample word number is obtained based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category.
[0172] (2) If the data recognition strategy update instruction is to perform sub-classification on a second specified recognition category in the to-be-updated data recognition strategy, the to-be-updated data recognition strategy is updated in the following manner:
[0173] The identification categories of the core words are determined as the target identification categories after the second specified identification categories are classified, and the key word set corresponding to each identification category of the core words is determined as the key word set of each target identification category. For any target identification category, the updated identification weight of each key word in the key word set of the target identification category is obtained by using the identification weight of each key word in the key word set of the target identification category in the data recognition strategy to be updated and the category confidence corresponding to the target identification category. The data recognition strategy to be updated is updated by using each key word in the key word set of the target identification category and the updated identification weight of each key word, and an updated data recognition strategy is obtained. The identification categories of the core words are determined as the identification categories after the second specified identification categories are classified, and the target sample word set corresponding to each identification category is determined as the sample word set of each identification category. The AI recognition model is retrained according to the sample word set of each identification category, and the updated data recognition strategy is obtained.
[0174] It should be noted that when the data recognition strategy includes the AI recognition strategy and the key word recognition strategy, the AI recognition strategy can be updated first, or the key word recognition strategy can be updated first, or both strategies can be updated at the same time. The order of the identification side roads is not limited in the embodiments of the present application. The updating methods of the AI recognition strategy and the key word recognition strategy are the same as those in the first and second cases, and the embodiments of the present application will not be repeated here.
[0175] In order to further understand the technical solutions of the present disclosure, the following will be described in detail Figure 9 The detailed description can include the following steps:
[0176] Step 901: In response to a data recognition strategy update instruction sent by a user, determining data recognition strategy update content and a data recognition strategy to be updated based on the data recognition strategy update instruction;
[0177] Step 902: performing word segmentation processing on the data recognition strategy update content by using a preset algorithm to obtain a plurality of segmented words;
[0178] Step 903: For any segmented word, comparing the segmented word with preset core words;
[0179] Step 904: If the segmented word exists in the preset core words, the segmented word is determined as a core word;
[0180] Step 905: determining, for each core word of the first type, whether there is a target core word identical to each key word in the key word set of each identified category in the core words of the first type, and the number of target core words is greater than a specified number, if yes, executing step 906, if not, executing step 907;
[0181] Step 906: for any one target core word, determining the identified category of the key word identical to the target core word as the identified category of the target core word, and determining the category confidence of the target core word as a specified confidence, and determining the type of each core word other than the target core word in the core words of the first type as a second type;
[0182] Step 907: determining the type of each core word of the first type as a second type;
[0183] Step 908: vectorizing each core word of the second type to obtain a target vector corresponding to each core word of the second type, wherein the number of vector parameters in the target vector is the same as the number of core words of the second type;
[0184] Step 909: for any one identified category in the data recognition strategy to be updated, obtaining the matching degree between each core word of the second type and the identified category according to the vector corresponding to the sample word set of the identified category and the target vector;
[0185] Step 910: obtaining the identified category and category confidence of each core word of the second type according to the matching degree between each identified category and each core word of the second type;
[0186] Step 911: if the data recognition strategy update instruction is to add a specified identified category in the data recognition strategy to be updated, determining each key word in the key word set corresponding to the identified category of each core word as each target key word of the first specified identified category, and for any one target key word, obtaining the updated recognition weight of the target key word by using the recognition weight of the target key word in the data recognition strategy to be updated and the category confidence corresponding to the identified category of the target key word, updating the data recognition strategy to be updated by the each target key word and the updated recognition weight of the each target key word to obtain the updated data recognition strategy;
[0187] Step 912: Determine the target sample word set corresponding to each recognition category as the sample word set of the first specified recognition category, and retrain the AI recognition model based on the sample word set of the first specified recognition category to obtain the updated data recognition strategy, wherein the target sample word set is obtained by randomly sampling a target number of sample words from the sample word set of the recognition category, and the target number of sample words is obtained based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category;
[0188] Step 913: If the data identification strategy update instruction is to subclassify the designated identification category in the data identification strategy to be updated, the identification category of each core word is determined to be each target identification category after subclassification of the second designated identification category, and the keyword set corresponding to the identification category of each core word is determined to be the keyword set of each target identification category. For any target identification category, the identification weight of each keyword in the keyword set of the target identification category in the data identification strategy to be updated and the category confidence corresponding to the target identification category are used to obtain the updated identification weight of each keyword in the keyword set of the target identification category. The data identification strategy to be updated is updated by using each keyword in the keyword set of the target identification category and the updated identification weight of each keyword to obtain an updated data identification strategy.
[0189] Step 914: Determine each recognition category of each core word as the recognition category after subdividing the second designated recognition category, and determine the target sample word set corresponding to each recognition category as the sample word set of each recognition category, and retrain the AI recognition model according to the sample word set of each recognition category to obtain the updated data recognition strategy.
[0190] Based on the same disclosed concept, the data identification strategy update method described above can also be implemented by a data identification strategy update device. The effect of the data identification strategy update device is similar to that of the aforementioned method and will not be described in detail here.
[0191] Figure 10 2 is a schematic diagram of the structure of a device for updating a data identification strategy according to an embodiment of the present disclosure.
[0192] like Figure 10 As shown, the updating device 1000 for identifying a policy with data of the present disclosure may include an update content determination module 1010 , a core word determination module 1020 , a matching module 1030 and a policy updating module 1040 .
[0193] The update content determination module 1010 is configured to determine data recognition strategy update content and data recognition strategy to be updated based on a data recognition strategy update instruction in response to the user sending the data recognition strategy update instruction.
[0194] The core term determination module 1020 is configured to identify the data recognition strategy update content to obtain at least one core term in the data recognition strategy update content.
[0195] The matching module 1030 is configured to match, for any one core term, the core term with a target term set in the data recognition strategy to be updated to obtain an identification category of the core term and a category confidence.
[0196] The strategy update module 1040 is configured to update the data recognition strategy to be updated according to the identification category of each core term and the category confidence of the core term to obtain an updated data recognition strategy.
[0197] In an embodiment, the core term determination module 1020 is specifically configured to:
[0198] perform word segmentation processing on the data recognition strategy update content by using a preset algorithm to obtain a plurality of segmented terms;
[0199] For any one segmented term, the segmented term is compared with preset core terms;
[0200] If the segmented term exists in the preset core terms, the segmented term is determined as a core term.
[0201] In an embodiment, the type of the core term includes a first type of core term and / or a second type of core term, the target term set includes a plurality of target term sets of identification categories, any one target term set of identification category includes a keyword set and a sample term set, the sample term set contains the keyword set, and the sample term set includes terms and / or sentences.
[0202] The matching module 1030 is specifically configured to:
[0203] If there is a target core word phrase in each core word phrase of the first type that is the same as each key word phrase in the key word phrase set of each identified category, and the number of target core word phrases is greater than a specified number, for any target core word phrase, the identified category of the key word phrase that is the same as the target core word phrase is determined as the identified category of the target core word phrase, the category confidence of the target core word phrase is determined as a specified confidence, and the type of each core word phrase of the first type except the target core word phrase is determined as the second type; or,
[0204] If there is no target core word phrase in each core word phrase of the first type that is the same as each key word phrase in the key word phrase set of each identified category, or there is a target core word phrase in each core word phrase of the first type that is the same as each key word phrase in the key word phrase set of each identified category, and the number of target core word phrases is not greater than a specified number, the type of each core word phrase of the first type is determined as the second type.
[0205] The second type of each core word phrase is matched with the sample word phrase set of each identified category in the data identification strategy to be updated respectively, to obtain the matching degree between each identified category and each core word phrase of the second type.
[0206] According to the matching degree between each identified category and each core word phrase of the second type, the identified category and the category confidence of each core word phrase of the second type are obtained.
[0207] In one embodiment, the matching module 1030 is further configured to:
[0208] The second type of each core word phrase is subjected to vectorization processing to obtain a target vector corresponding to each core word phrase of the second type, wherein the number of vector parameters in the target vector is the same as the number of each core word phrase of the second type, and each core word phrase of the second type corresponds to a target vector.
[0209] For any identified category in the data identification strategy to be updated, the matching degree between each core word phrase of the second type and the identified category is obtained according to the vector corresponding to the sample word phrase set of the identified category and the target vector.
[0210] In an embodiment, the data recognition strategy to be updated comprises a keyword recognition strategy and / or an artificial intelligence (AI) recognition strategy. The keyword recognition strategy is keyword recognition on data to be recognized, and determination of a recognition category of the data to be recognized based on the number of occurrences of each keyword in the data to be recognized and the recognition weight of each keyword. The AI recognition strategy is inputting the data to be recognized into a pre-trained AI algorithm to obtain the recognition category of the data to be recognized.
[0211] In an embodiment, if the data recognition strategy to be updated comprises a keyword recognition strategy,
[0212] The strategy updating module 1040 is specifically configured to:
[0213] If the data recognition strategy updating instruction is to add a first specified recognition category in the data recognition strategy to be updated, each keyword in the keyword set corresponding to the recognition category of each core keyword is determined as a target keyword of the first specified recognition category, and for any target keyword, the updated recognition weight of the target keyword is obtained by using the recognition weight of the target keyword in the data recognition strategy to be updated and the category confidence corresponding to the recognition category of the target keyword. The data recognition strategy to be updated is updated by using the target keywords and the updated recognition weights of the target keywords, and the updated data recognition strategy is obtained.
[0214] If the data recognition strategy updating instruction is to perform fine classification on a second specified recognition category in the data recognition strategy to be updated, the recognition category of each core keyword is determined as each target recognition category after fine classification of the second specified recognition category, and the keyword set corresponding to the recognition category of each core keyword is determined as the keyword set of each target recognition category. For any target recognition category, the updated recognition weight of each keyword in the keyword set of the target recognition category is obtained by using the recognition weight of each keyword in the keyword set of the target recognition category in the data recognition strategy to be updated and the category confidence corresponding to the target recognition category. The data recognition strategy to be updated is updated by using each keyword in the keyword set of the target recognition category and the updated recognition weights of the keywords, and the updated data recognition strategy is obtained.
[0215] In an embodiment, if the data recognition strategy to be updated comprises an AI recognition strategy,
[0216] The strategy updating module 1040 is specifically configured to:
[0217] For any one of the identification categories of the core words, a target sample word quantity corresponding to the identification category is obtained based on a category confidence of the identification category and a total number of sample words in a sample word set of the identification category; and
[0218] A target sample word set is obtained by randomly extracting a target sample word quantity of sample words in the sample word set of the identification category;
[0219] If the data recognition strategy update instruction is to add a first specified identification category in the data recognition strategy to be updated, a target sample word set corresponding to each identification category is determined as a sample word set of the first specified identification category, and the AI recognition model is retrained based on the sample word set of the first specified identification category to obtain the updated data recognition strategy; or,
[0220] If the data recognition strategy update instruction is to perform fine classification on a second specified identification category in the data recognition strategy to be updated, each identification category of each core word is determined as an identification category after fine classification of the second specified identification category, and a target sample word set corresponding to each identification category is determined as a sample word set of each identification category, respectively, and the AI recognition model is retrained according to the sample word set of each identification category to obtain the updated data recognition strategy.
[0221] In one embodiment, if the data recognition strategy to be updated includes an AI recognition strategy and a keyword recognition strategy;
[0222] The strategy updating module 1040 is specifically configured to:
[0223] If the data recognition strategy update instruction is to add a first specified identification category in the data recognition strategy to be updated, each keyword in a keyword set corresponding to each identification category of each core word is determined as each target keyword of the first specified identification category, and for any one target keyword, an updated recognition weight of the target keyword is obtained by using an identification weight of the target keyword in the data recognition strategy to be updated and a category confidence corresponding to an identification category of the target keyword, the data recognition strategy to be updated is updated by using each target keyword and the updated recognition weight of each target keyword to obtain the updated data recognition strategy;
[0224] and the target sample word set corresponding to each of the recognition categories is determined as the sample word set of the first specified recognition category, and the AI recognition model is retrained based on the sample word set of the first specified recognition category to obtain the updated data recognition strategy, wherein the target sample word set is obtained by randomly extracting a target sample word quantity of word samples from the sample word set of the recognition category, and the target sample word quantity is obtained based on the category confidence of the recognition category and the total quantity of sample words in the sample word set of the recognition category; or
[0225] If the data recognition strategy update instruction is to perform sub-classification on a second specified recognition category in the to-be-updated data recognition strategy, the recognition categories of the core words are determined as each target recognition category after sub-classification of the second specified recognition category, and the key word set corresponding to each of the recognition categories of the core words is determined as the key word set of each of the target recognition categories, for any one target recognition category, the updated recognition weight of each key word in the key word set of the target recognition category is obtained by using the recognition weight of each key word in the key word set of the target recognition category in the to-be-updated data recognition strategy and the category confidence corresponding to the target recognition category, the to-be-updated data recognition strategy is updated by using each key word in the key word set of the target recognition category and the updated recognition weight of the key word, and an updated data recognition strategy is obtained.
[0226] The recognition categories of the core words are determined as the recognition categories after sub-classification of the second specified recognition category, and the target sample word set corresponding to each of the recognition categories is determined as the sample word set of each of the recognition categories, and the AI recognition model is retrained according to the sample word set of each of the recognition categories to obtain the updated data recognition strategy.
[0227] After introducing a data recognition strategy updating method and device of an example embodiment of the present disclosure, next, an electronic device according to another example embodiment of the present disclosure is introduced.
[0228] Those skilled in the art can understand that each aspect of the present disclosure can be implemented as a system, a method or a program product. Therefore, each aspect of the present disclosure can be embodied as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as “circuitry”, “module” or “system” here.
[0229] In some possible implementations, the electronic device according to the present disclosure can include at least one processor, and at least one computer storage medium. Among them, the computer storage medium stores program codes, when the program codes are executed by the processor, the processor executes the steps in the data recognition strategy updating method according to various exemplary embodiments of the present disclosure described above in the specification. For example, the processor can execute the steps 201-204 as shown in Figure 2 .
[0230] The electronic device 1100 according to this embodiment of the present disclosure will be described below with reference to Figure 11 . Figure 11 The electronic device 1100 shown is merely an example, and should not bring any limitation to the function and use range of the embodiments of the present disclosure.
[0231] As shown in Figure 11 , the electronic device 1100 is in the form of a general electronic device. The components of the electronic device 1100 can include, but are not limited to, the at least one processor 1101 described above, the at least one computer storage medium 1102 described above, and the bus 1103 connecting different system components, including the computer storage medium 1102 and the processor 1101.
[0232] The bus 1103 represents one or more of several types of bus structures, including a computer storage medium bus or a computer storage medium controller, a peripheral bus, a processor bus, or a local bus using any of the bus structures.
[0233] The computer storage medium 1102 can include readable media in the form of volatile computer storage media, such as random access computer storage media (RAM) 1121 and / or cache storage media 1122, and can further include read-only computer storage media (ROM) 1123.
[0234] The computer storage medium 1102 can also include program / utilities 1125 with a set of (at least one) program modules 1124, such as an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which can include the implementation of a network environment.
[0235] The electronic device 1100 can also communicate with one or more external devices 1104 such as a keyboard or a pointing device, through an input / output (I / O) interface(s) 1105. And, the electronic device 1100 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the public network, such as the Internet, through a network adapter 1106. As depicted, the network adapter 1106 is in communication with the other components of the electronic device 1100 through the bus 1103. It should be understood that although not shown, other hardware and / or software components could be used in conjunction with the electronic device 1100. These components, as well as the electronic device 1100 itself, are shown and described in connection with FIG. 1.
[0236] In some possible embodiments, various aspects of the method for updating a data recognition strategy provided by the present disclosure can also be implemented as a program product, including a program code for causing a computer device to perform the steps of the method for updating a data recognition strategy according to various exemplary embodiments of the present disclosure described above in the specification when the program product is run on the computer device.
[0237] The program product can employ any combination of one or more computer readable media or storage media. The computer readable media or storage media can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access computer memory (RAM), a read-only computer memory (ROM), an erasable programmable read-only computer memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only computer memory (CD-ROM), an optical computer storage device, a magnetic computer storage device, or any suitable combination of the above.
[0238] The program product for updating a data recognition strategy of an embodiment of the present disclosure can employ a portable compact disc read-only computer storage medium (CD-ROM) and include a program code, and can be run on an electronic device. However, the program product of the present disclosure is not limited thereto, and in this document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0239] A readable signal medium can be any medium that can be read by a machine (e.g., a computer) and can contain various kinds of machine-readable program code, calculations, or instructions. Examples of a readable signal medium include, but are not limited to, floppy diskettes, optical disks, CD-ROMs, DVD-ROMs, ROMs, RAMs, erasable programmable
[0240] The program code embodied on the readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical, RF, etc., or any suitable combination of the foregoing.
[0241] Program code, used by or in connection with the described embodiments, can be written in any of a number of suitable programming languages and / or programming or scripting tools, and can be stored in any type of now known or later developed computer-readable media, such as magnetic tapes, floppy diskettes, optical disks, optical fiber based disks, RAM, ROM, EEPROM, flash memory, or the like. The program code can be executed by one or more processing units, such as one or more digital signal processors (DSPs), general purpose microprocessors, ASICs, or other similar processing units.
[0242] It should be noted that, although the foregoing details have been presented in terms of several modules of the apparatus, this partitioning is merely exemplary and not mandatory. Indeed, in accordance with embodiments of the present disclosure, features and functionality of two or more modules described above can be embodied in a single module. Conversely, features and functionality of one module described above can be further partitioned into multiple modules.
[0243] Moreover, while operations of the methods of the present disclosure have been described in a particular order, this is not required or implied in any particular order for purposes of the desired outcomes to be achieved. Additionally or alternatively, certain steps can be omitted, combined, performed concurrently, or performed in a different order.
[0244] Those skilled in the art will appreciate that embodiments of the disclosure can be devised for a variety of applications. It is therefore intended that the disclosure be considered as in all respects only illustrative and not restrictive. Those skilled in the art will further appreciate that the disclosure can be used for a variety of applications. Accordingly, the disclosure is intended to embrace all alternatives, modifications and variations of the present disclosure that have been disclosed, suggested and / or can be apparent in light of the disclosure to those skilled in the art, and the present disclosure intends to embrace all alternatives, modifications and variations that fall within the scope of the claims and their equivalents. Those skilled in the art will further appreciate that the disclosure can be used for a variety of applications. Accordingly, the disclosure is intended to embrace all alternatives, modifications and variations of the present disclosure that have been disclosed, suggested and / or can be apparent in light of the disclosure to those skilled in the art, and the present disclosure intends to embrace all alternatives, modifications and variations that fall within the scope of the claims and their equivalents.
[0245] The present disclosure is described in reference to the drawings using flow diagrams and / or block diagrams of methods, apparatuses (systems) and computer program products according to the present disclosure. It will be understood that each flow and / or block in the flow diagrams and / or block diagrams, and combinations of flows and / or blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flow diagram and / or block diagram block or blocks.
[0246] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flow diagrams and / or block diagrams flow or flows and / or block or blocks. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flow diagram and / or block diagram block or blocks.
[0247] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow diagrams and / or block diagrams flow or flows and / or block or blocks. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flow diagram and / or block diagram block or blocks.
[0248] Obviously, numerous modifications and variations of the present disclosure are possible in light of the above teachings. It is therefore intended that the disclosure be considered in all respects as only illustrative and not restrictive. It is therefore intended that the disclosure be considered as in all respects only illustrative and not restrictive.
Claims
1. A method for updating a data identification strategy, characterized in that: The method comprises: In response to a data identification policy update instruction sent by a user, determining data identification policy update content and a data identification policy to be updated based on the data identification policy update instruction; Identifying the data identification strategy update content to obtain at least one core word in the data identification strategy update content, where the core word type includes a first type of core word and / or a second type of core word, a target word set includes target word sets of multiple identification categories, and any target word set of the identification category includes a keyword set and a sample word set, and the sample word set includes the keyword set, and the sample word set includes words and / or sentences; For each core word of the first type, if there is a target core word in each core word of the first type that is the same as each key word in the key word set of each identification category, and the number of the target core words is greater than a specified number, then for any target core word, the identification category of the key word that is the same as the target core word is determined as the identification category of the target core word, and the category confidence of the target core word is determined to be the specified confidence, and the types of other core words in each core word of the first type except the target core words are determined to be the second type; or, If there is no target core word identical to each key word in the key word set of each identification category among the core words of the first type, or if there is a target core word identical to each key word in the key word set of each identification category among the core words of the first type, and the number of the target core words is not greater than the specified number, then the type of each core word of the first type is determined to be the second type; Matching each core word of the second type with a sample word set of each recognition category in the data recognition strategy to be updated, and obtaining a matching degree between each recognition category and each core word of the second type; Obtaining the recognition category and category confidence of each core word of the second type according to the matching degree between each recognition category and each core word of the second type; The data identification strategy to be updated is updated according to the identification category of each core word and the category confidence of each core word to obtain an updated data identification strategy.
2. The method according to claim 1, characterized in that The identifying the data identification strategy update content to obtain at least one core word in the data identification strategy update content includes: Using a preset algorithm to perform word segmentation processing on the data identification strategy update content to obtain multiple word segmentation terms; For any segmented word, compare the segmented word with the preset core words; If the segmentation word exists in the preset core words, the segmentation word is determined as the core word.
3. The method according to claim 1, characterized in that The step of matching each core word of the second type with a sample word set of each identification category in the data identification strategy to be updated to obtain a matching degree between each identification category and each core word of the second type includes: performing vectorization processing on each core word of the second type to obtain a target vector corresponding to each core word of the second type, wherein the number of vector parameters in the target vector is the same as the number of each core word of the second type, and each core word of the second type corresponds to one target vector; For any one recognition category in the data recognition strategy to be updated, the matching degree between each core word of the second type and the recognition category is obtained according to the vector corresponding to the sample word set of the recognition category and the target vector.
4. The method according to claim 1, wherein The data identification strategy to be updated includes a keyword identification strategy and / or an artificial intelligence (AI) identification strategy, and the keyword identification strategy is to perform keyword identification on the data to be identified, and determine the identification category of the data to be identified based on the number of times each identified keyword appears in the data to be identified and the identification weight of each keyword. The AI identification strategy is to input the data to be identified into a pre-trained AI recognition model to obtain the identification category of the data to be identified.
5. The method according to claim 4, characterized in that If the data identification strategy to be updated includes a keyword identification strategy; The updating of the data identification strategy to be updated according to the identification category of each core word and the category confidence of each core word to obtain an updated data identification strategy includes: If the data identification strategy update instruction is to add a first designated identification category to the data identification strategy to be updated, each keyword in the keyword set corresponding to the identification category of each core word is determined as each target keyword of the first designated identification category, and for any target keyword, the identification weight of the target keyword in the data identification strategy to be updated and the category confidence corresponding to the identification category of the target keyword are used to obtain the updated identification weight of the target keyword, and the data identification strategy to be updated is updated by the target keywords and the updated identification weights of the target keywords to obtain the updated data identification strategy; or, If the data identification strategy update instruction is to subclassify the second specified identification category in the data identification strategy to be updated, the identification category of each core word is determined as the target identification category after subclassification of the second specified identification category, and the keyword set corresponding to the identification category of each core word is determined as the keyword set of each target identification category. For any target identification category, the identification weight of each keyword in the keyword set of the target identification category in the data identification strategy to be updated and the category confidence corresponding to the target identification category are used to obtain the updated identification weight of each keyword in the keyword set of the target identification category. The data identification strategy to be updated is updated by each keyword in the keyword set of the target identification category and the updated identification weight of each keyword to obtain an updated data identification strategy.
6. The method according to claim 4, characterized in that If the data identification strategy to be updated includes an AI identification strategy; The updating of the data identification strategy to be updated according to the identification category of each core word and the category confidence of each core word to obtain an updated data identification strategy includes: For any one of the recognition categories of the core words, based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category, obtain the number of target sample words corresponding to the recognition category; and Randomly extracting a target number of sample words from the sample word set of the recognition category to obtain a target sample word set; If the data identification strategy update instruction is to add a first designated identification category to the data identification strategy to be updated, the target sample word set corresponding to each identification category is determined to be the sample word set of the first designated identification category, and the AI recognition model is retrained based on the sample word set of the first designated identification category to obtain the updated data identification strategy; or, If the data identification strategy update instruction is to subclassify the second specified identification category in the data identification strategy to be updated, then the identification category of each core word is determined as the identification category after the subclassification of the second specified identification category, and the target sample word set corresponding to each identification category is respectively determined as the sample word set of each identification category. The AI recognition model is retrained according to the sample word set of each identification category to obtain the updated data identification strategy.
7. The method according to claim 4, characterized in that If the data identification strategy to be updated includes an AI identification strategy and a keyword identification strategy; The updating of the data identification strategy to be updated according to the identification category of each core word and the category confidence of each core word to obtain an updated data identification strategy includes: If the data identification strategy update instruction is to add a first designated identification category to the data identification strategy to be updated, each keyword in the keyword set corresponding to the identification category of each core word is determined as each target keyword of the first designated identification category, and for any target keyword, the identification weight of the target keyword in the data identification strategy to be updated and the category confidence corresponding to the identification category of the target keyword are used to obtain the updated identification weight of the target keyword, and the data identification strategy to be updated is updated by using the target keywords and the updated identification weights of the target keywords to obtain the updated data identification strategy; and determining the target sample word set corresponding to each recognition category as the sample word set of the first specified recognition category, and retraining the AI recognition model based on the sample word set of the first specified recognition category to obtain the updated data recognition strategy, wherein the target sample word set is obtained by randomly sampling a target number of sample words from the sample word set of the recognition category, and the target number of sample words is obtained based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category; or, If the data identification strategy update instruction is to subclassify the second designated identification category in the data identification strategy to be updated, the identification category of each core word is determined as each target identification category after the subclassification of the second designated identification category, and the keyword set corresponding to the identification category of each core word is determined as the keyword set of each target identification category. For any target identification category, the identification weight of each keyword in the keyword set of the target identification category in the data identification strategy to be updated and the category confidence corresponding to the target identification category are used to obtain the updated identification weight of each keyword in the keyword set of the target identification category. The data identification strategy to be updated is updated by each keyword in the keyword set of the target identification category and the updated identification weight of each keyword to obtain an updated data identification strategy. And each recognition category of each core word is determined as the recognition category after subclassification of the second designated recognition category, and the target sample word set corresponding to each recognition category is respectively determined as the sample word set of each recognition category, and the AI recognition model is retrained according to the sample word set of each recognition category to obtain the updated data recognition strategy.
8. A data identification strategy updating device, characterized in that: The device comprises: an update content determination module, configured to respond to a data identification policy update instruction sent by a user and determine data identification policy update content and a data identification policy to be updated based on the data identification policy update instruction; a core word determination module, configured to identify the data identification strategy update content and obtain at least one core word in the data identification strategy update content, wherein the type of the core word includes a first type of core word and / or a second type of core word, the target word set includes a plurality of target word sets of identification categories, and any target word set of the identification category includes a keyword set and a sample word set, and the sample word set includes the keyword set, and the sample word set includes words and / or sentences; A matching module is used for, for each core word of the first type, if there is a target core word in each core word of the first type that is the same as each key word in the key word set of each identification category, and the number of the target core words is greater than a specified number, then for any target core word, the identification category of the key word that is the same as the target core word is determined as the identification category of the target core word, and the category confidence of the target core word is determined to be a specified confidence, and the type of other core words in each core word of the first type except each target core word is determined to be the second type; or, if there is no target core word in each core word of the first type that is the same as each key word in the key word set of each identification category, If there is a target core word that is the same as each keyword in the keyword set of each identification category, or there is a target core word in each core word of the first type that is the same as each keyword in the keyword set of each identification category, and the number of the target core words is not greater than the specified number, then the type of each core word of the first type is determined to be the second type; each core word of the second type is matched with the sample word set of each identification category in the data identification strategy to be updated, and the matching degree between each identification category and each core word of the second type is obtained; according to the matching degree between each identification category and each core word of the second type, the identification category and category confidence of each core word of the second type are obtained; The strategy updating module is used to update the data identification strategy to be updated according to the recognition category of each core word and the category confidence of each core word to obtain an updated data identification strategy.
9. The device according to claim 8, characterized in that The core word determination module is specifically used to: Using a preset algorithm to perform word segmentation processing on the data identification strategy update content to obtain multiple word segmentation terms; For any segmented word, compare the segmented word with the preset core words; If the segmentation word exists in the preset core words, the segmentation word is determined as the core word.
10. The device according to claim 9, characterized in that The matching module is further configured to: performing vectorization processing on each core word of the second type to obtain a target vector corresponding to each core word of the second type, wherein the number of vector parameters in the target vector is the same as the number of each core word of the second type, and each core word of the second type corresponds to one target vector; For any one recognition category in the data recognition strategy to be updated, the matching degree between each core word of the second type and the recognition category is obtained according to the vector corresponding to the sample word set of the recognition category and the target vector.
11. The device according to claim 8, characterized in that The data identification strategy to be updated includes a keyword identification strategy and / or an artificial intelligence (AI) identification strategy, and the keyword identification strategy is to perform keyword identification on the data to be identified, and determine the identification category of the data to be identified based on the number of times each identified keyword appears in the data to be identified and the identification weight of each keyword. The AI identification strategy is to input the data to be identified into a pre-trained AI recognition model to obtain the identification category of the data to be identified.
12. The device according to claim 11, characterized in that If the data identification strategy to be updated includes a keyword identification strategy; The policy update module is specifically used to: If the data identification strategy update instruction is to add a first designated identification category to the data identification strategy to be updated, each keyword in the keyword set corresponding to the identification category of each core word is determined as each target keyword of the first designated identification category, and for any target keyword, the identification weight of the target keyword in the data identification strategy to be updated and the category confidence corresponding to the identification category of the target keyword are used to obtain the updated identification weight of the target keyword, and the data identification strategy to be updated is updated by using the target keywords and the updated identification weights of the target keywords to obtain the updated data identification strategy; or, If the data identification strategy update instruction is to subclassify the second specified identification category in the data identification strategy to be updated, the identification category of each core word is determined as the target identification category after subclassification of the second specified identification category, and the keyword set corresponding to the identification category of each core word is determined as the keyword set of each target identification category. For any target identification category, the identification weight of each keyword in the keyword set of the target identification category in the data identification strategy to be updated and the category confidence corresponding to the target identification category are used to obtain the updated identification weight of each keyword in the keyword set of the target identification category. The data identification strategy to be updated is updated by each keyword in the keyword set of the target identification category and the updated identification weight of each keyword to obtain an updated data identification strategy.
13. The device according to claim 12, characterized in that If the data identification strategy to be updated includes an AI identification strategy; The policy update module is specifically used to: For any one of the recognition categories of the core words, based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category, obtain the number of target sample words corresponding to the recognition category; and, Randomly extracting a target number of sample words from the sample word set of the recognition category to obtain a target sample word set; If the data identification strategy update instruction is to add a first designated identification category to the data identification strategy to be updated, the target sample word set corresponding to each identification category is determined to be the sample word set of the first designated identification category, and the AI recognition model is retrained based on the sample word set of the first designated identification category to obtain the updated data identification strategy; or, If the data identification strategy update instruction is to subclassify the second specified identification category in the data identification strategy to be updated, then the identification category of each core word is determined as the identification category after the subclassification of the second specified identification category, and the target sample word set corresponding to each identification category is respectively determined as the sample word set of each identification category. The AI recognition model is retrained according to the sample word set of each identification category to obtain the updated data identification strategy.
14. The device according to claim 12, characterized in that If the data identification strategy to be updated includes an AI identification strategy and a keyword identification strategy; The policy update module is specifically used to: If the data identification strategy update instruction is to add a first designated identification category to the data identification strategy to be updated, each keyword in the keyword set corresponding to the identification category of each core word is determined as each target keyword of the first designated identification category, and for any target keyword, the identification weight of the target keyword in the data identification strategy to be updated and the category confidence corresponding to the identification category of the target keyword are used to obtain the updated identification weight of the target keyword, and the data identification strategy to be updated is updated by using the target keywords and the updated identification weights of the target keywords to obtain the updated data identification strategy; and determining the target sample word set corresponding to each recognition category as the sample word set of the first specified recognition category, and retraining the AI recognition model based on the sample word set of the first specified recognition category to obtain the updated data recognition strategy, wherein the target sample word set is obtained by randomly sampling a target number of sample words from the sample word set of the recognition category, and the target number of sample words is obtained based on the category confidence of the recognition category and the total number of sample words in the sample word set of the recognition category; or, If the data identification strategy update instruction is to subclassify the second designated identification category in the data identification strategy to be updated, the identification category of each core word is determined as each target identification category after the subclassification of the second designated identification category, and the keyword set corresponding to the identification category of each core word is determined as the keyword set of each target identification category. For any target identification category, the identification weight of each keyword in the keyword set of the target identification category in the data identification strategy to be updated and the category confidence corresponding to the target identification category are used to obtain the updated identification weight of each keyword in the keyword set of the target identification category. The data identification strategy to be updated is updated by each keyword in the keyword set of the target identification category and the updated identification weight of each keyword to obtain an updated data identification strategy. And each recognition category of each core word is determined as the recognition category after subclassification of the second designated recognition category, and the target sample word set corresponding to each recognition category is respectively determined as the sample word set of each recognition category, and the AI recognition model is retrained according to the sample word set of each recognition category to obtain the updated data recognition strategy.
15. An electronic device, characterized in that: The invention comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor; the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.
16. A computer storage medium, characterized in that The computer storage medium stores a computer program for executing the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Safe medical treatment big data system based on Internet of Things
CN108040056A