Data processing method and device, equipment and storage medium
Through the analysis of sentence components and feature aggregation of model test results, the model input text is automatically processed, which solves the problem of long-term and low accuracy of manual processing, and improves the accuracy and efficiency of model optimization.
Patent Information
- Application Number
- CN202411824156.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, the processing of results after model testing depends on manual labor, which takes a long time and is difficult to ensure accuracy, which affects the effect of model optimization.
By obtaining the set of pending data, conducting sentence component analysis, extracting sentence component features, determining input feature types, and generating an aggregated feature table to achieve automated processing of the model input text.
It shortens the time-consuming data processing, improves the accuracy of feature aggregation of the model input text, and facilitates the optimization of subsequent models.
Smart Images

Figure CN119782536A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a data processing method, device, equipment and storage medium. Background Art
[0002] The purpose of model testing is to optimize the model based on the test results of the model to improve the accuracy of the model output results. In practical applications, after completing the model test, the test results need to be statistically analyzed, screened, processed, etc. to determine the subsequent optimization direction of the model.
[0003] In the related art, the test results are usually processed manually by testers, which is time-consuming and difficult to guarantee accuracy, and may affect the subsequent optimization of the model. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide a data processing method, apparatus, device and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a data processing method, the method comprising:
[0006] Obtaining a data set to be processed; wherein the data set to be processed is obtained by performing data testing on the target model, the data set to be processed includes a plurality of model input texts, and the similarity between the model target output result corresponding to the model input text and the model actual output result is less than a preset first threshold;
[0007] Performing sentence component analysis on the first model input text in the data set to be processed, and extracting sentence component features of the first model input text;
[0008] Determining the input feature type to which the first model input text belongs based on the sentence component features of the first model input text;
[0009] Based on the input feature type to which the first model input text belongs, an aggregate feature table corresponding to the data set to be processed is generated; wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, the input feature type has a corresponding sentence component feature, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
[0010] In an optional implementation manner, determining the input feature type to which the first model input text belongs based on the sentence component features of the first model input text includes:
[0011] Querying the aggregate feature table to see whether there is an input feature type having a sentence component feature of the first model input text;
[0012] If it is determined that there is an input feature type having the sentence component feature of the first model input text in the aggregate feature table, the input feature type is determined to be the input feature type to which the first model input text belongs.
[0013] In an optional implementation manner, the method further includes:
[0014] If it is determined that the input feature type having the sentence component features of the first model input text does not exist in the aggregate feature table, generating a preset number of verification input texts based on the sentence component features of the first model input text;
[0015] The target model is data tested using the preset number of verification input texts, and the input feature type corresponding to the first model input text is determined based on the data test result, and the input feature type is added to the aggregate feature table.
[0016] In an optional implementation, the preset number of verification input texts includes a first preset number of positive verification input texts and / or a second preset number of negative verification input texts, and the method of performing data testing on the target model using the preset number of verification input texts, and determining the input feature type corresponding to the first model input text based on the data testing result, includes:
[0017] The target model is data tested using the first preset number of positive verification input texts and / or the second preset number of negative verification input texts, and the input feature type corresponding to the first model input text is determined based on the data test result.
[0018] In an optional implementation, the sentence component features of the first model input text include at least one of sentence features, grammatical features, and target word features, and a priority relationship is set between the at least one feature.
[0019] In an optional implementation, the aggregate feature table includes a set of model input texts corresponding to the at least one input feature type, and the set of model input texts includes model input texts belonging to the corresponding input feature type in the data set to be processed.
[0020] In an optional implementation manner, the method further includes:
[0021] A test input text of the target model is generated based on the aggregate feature table; wherein the test input text is used to perform data testing on the target model, and the test input text does not belong to the input feature type in the aggregate feature table.
[0022] In a second aspect, the present disclosure provides a data processing device, the device comprising:
[0023] An acquisition module is used to acquire a data set to be processed; wherein the data set to be processed is obtained by performing data testing on a target model, the data set to be processed includes a plurality of model input texts, and the similarity between the model target output result corresponding to the model input text and the model actual output result is less than a preset first threshold;
[0024] An extraction module, used for performing sentence component analysis on the first model input text in the to-be-processed data set, and extracting sentence component features of the first model input text;
[0025] A determination module, configured to determine the input feature type to which the first model input text belongs based on the sentence component features of the first model input text;
[0026] The first generation module is used to generate an aggregate feature table corresponding to the data set to be processed based on the input feature type to which the first model input text belongs; wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, the input feature type has a corresponding sentence component feature, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
[0027] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement a data processing method as provided in an embodiment of the present disclosure.
[0028] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the data processing method provided by the embodiment of the present disclosure.
[0029] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.
[0030] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0031] In the data processing method provided by the embodiment of the present disclosure, a data set to be processed is obtained, wherein the data set to be processed is obtained by performing data testing on a target model, the data set to be processed includes multiple model input texts, and the similarity between the model target output result corresponding to the model input text and the model actual output result is less than a preset first threshold value. Then, a sentence component analysis is performed on the first model input text in the data set to be processed, and the sentence component features of the first model input text are extracted. Based on the sentence component features of the first model input text, the input feature type to which the first model input text belongs is determined. Based on the input feature type to which the first model input text belongs, an aggregate feature table corresponding to the data set to be processed is generated, wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, the input feature type has a corresponding sentence component feature, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
[0032] The disclosed embodiment analyzes the sentence component features of the model input text in the data set to be processed, aggregates the input feature types to which the model input text in the data set to be processed belongs, and realizes automated processing of the model input text. While shortening the data processing time, it improves the accuracy of feature aggregation of the model input text, and facilitates subsequent optimization of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0035] Figure 1 A flowchart of a data processing method provided by an embodiment of the present disclosure;
[0036] Figure 2 A schematic diagram of a data processing flow provided by an embodiment of the present disclosure;
[0037] Figure 3 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;
[0038] Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0039] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0040] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0041] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0042] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0043] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0044] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0045] The purpose of model testing is to optimize the model based on the test results of the model to improve the accuracy of the model output results. In practical applications, after completing the model test, the test results need to be statistically analyzed, screened, processed, etc. to determine the subsequent optimization direction of the model.
[0046] In the related art, the test results are usually processed manually by testers, which is time-consuming and difficult to guarantee accuracy, and may affect the subsequent optimization of the model.
[0047] To this end, an embodiment of the present disclosure provides a data processing method, specifically, obtaining a data set to be processed, wherein the data set to be processed is obtained by performing data testing on a target model, the data set to be processed includes multiple model input texts, and the similarity between the model target output results corresponding to the model input texts and the model actual output results is less than a preset first threshold value. Then, sentence component analysis is performed on the first model input text in the data set to be processed, and sentence component features of the first model input text are extracted. Based on the sentence component features of the first model input text, an input feature type to which the first model input text belongs is determined. Based on the input feature type to which the first model input text belongs, an aggregate feature table corresponding to the data set to be processed is generated, wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, the input feature type has a corresponding sentence component feature, and at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
[0048] The disclosed embodiment analyzes the sentence component features of the model input text in the data set to be processed, aggregates the input feature types to which the model input text in the data set to be processed belongs, and realizes automated processing of the model input text. While shortening the data processing time, it improves the accuracy of feature aggregation of the model input text, and facilitates subsequent optimization of the model.
[0049] Based on this, an embodiment of the present disclosure provides a data processing method, which is introduced below in conjunction with a specific embodiment.
[0050] Figure 1 The present invention provides a flowchart of a data processing method provided in an embodiment of the present invention. The method can be executed by a data processing device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:
[0051] S101: Obtain a data set to be processed.
[0052] Among them, the data set to be processed is obtained by performing data testing on the target model, and the data set to be processed includes multiple model input texts, and the similarity between the model target output results corresponding to the model input texts and the actual output results of the model is less than a preset first threshold.
[0053] The model input test text included in the data set to be processed is obtained based on data testing of the target model. Specifically, the model input text corresponding to the model target output result whose similarity between the model target output result and the actual output result of the model is less than a preset first threshold can constitute the data set to be processed.
[0054] The target model may be a model to be tested. The target output result of the model may refer to the result that the target model should output under the correct circumstances, that is, the expected result. The actual output result of the model is the result that the target model actually outputs based on the model input text. The similarity between the target output result of the model and the actual output result of the model is less than a preset first threshold, that is, there is a deviation between the target output result of the model and the actual output result of the model, that is, there is a deviation between the target output result of the model and the actual output result of the model, that is, the target output result of the model and the actual output result of the model are different, and the preset first threshold is a similarity value pre-set based on the requirements.
[0055] S102: Perform sentence component analysis on the first model input text in the data set to be processed, and extract sentence component features of the first model input text.
[0056] The first model input text is any model input text in the data set to be processed.
[0057] In the embodiment of the present disclosure, sentence component analysis may refer to a method of splitting and analyzing the sentence structure to understand the structure of the sentence and related information such as grammar. Specifically, a sentence component analysis tool may be used to perform sentence component analysis on a sentence.
[0058] After performing sentence component analysis on the first model input text using a sentence component analysis tool, sentence component features of the first model input text are extracted from the sentence component analysis results.
[0059] The sentence component feature may represent a key feature of a sentence. For example, the sentence component feature may be a sentence pattern feature.
[0060] In an optional implementation, the sentence component features of the first model input text may include at least one of sentence features, grammatical features, and target word features, wherein sentence features may refer to features of sentence structure forms, such as declarative sentences, interrogative sentences, etc.; grammatical features may include tense, voice, subject-verb agreement, etc. of the sentence. Target word features may include verb features, noun features, adjective features, fixed collocation features, etc.
[0061] S103: Determine the input feature type to which the first model input text belongs based on the sentence component features of the first model input text.
[0062] Among them, the input feature type is used to reflect the characteristics of the model input text, that is, the feature type of the model input text can be determined by the input feature type, and the input feature type has a corresponding sentence component feature, that is, the determination of the input feature type is related to the sentence component feature, that is, the input feature type can be determined by the sentence component feature. For example, the sentence feature in the sentence component feature is assumed to be "Do you have XXX?", and the input feature type can be an input type with this "Do you have XXX?"
[0063] This input feature type can be used to aggregate model input text. Specifically, the model input text can be aggregated based on the sentence component features of the model input text.
[0064] By extracting the sentence component features of the first model input text to determine the input feature type to which the first model input text belongs, the model input texts in the data set to be processed can be aggregated to facilitate subsequent model optimization, improvement and other operations, so that the model can better process input texts with the same sentence component features.
[0065] In actual applications, the sentence component features of the first model input text may include multiple types. Since different sentence component features correspond to different input feature types, before determining the input feature type to which the first model input text belongs based on the sentence component features, a priority order between the sentence component features can be set for the sentence component features, and the input feature type can be determined based on the priority order of the sentence component features to improve the accuracy of determining the input feature type.
[0066] For example, assuming that the priority of sentence features is higher than that of grammatical features, and that the priority of grammatical features is higher than that of target word features, when determining the input feature type of the model input text, the input feature type will first be determined based on the sentence features. If the input feature type can be determined based on the sentence features, then it will be used as the basis; if the input feature type cannot be determined based on the sentence features, then the input feature type will be determined based on the grammatical features; if the input feature type cannot be determined based on the grammatical features, then the input feature type will be determined based on the target word features.
[0067] In an optional implementation, after extracting the sentence component features of the first model input text, the sentence component features can be compared with the sentence component features in the aggregate feature table to determine the input feature type to which the first model input text belongs. Specifically, based on the sentence component features of the first model input text, query whether there is a sentence component feature in the aggregate feature table whose similarity with the sentence component features of the first model input text exceeds a preset second threshold.
[0068] If there is a sentence component feature in the aggregate feature table whose similarity exceeds a preset second threshold, the input feature type having the sentence component feature is used to determine the input feature type to which the second model input text belongs. The preset second threshold is a pre-set similarity value. The sentence component feature whose similarity with the sentence component feature of the first model input text exceeds the preset second threshold can be, for example, the same sentence component feature as the sentence component feature of the first model input text, that is, there is a sentence component feature in the aggregate feature table that is the same as the sentence component feature of the first model input text.
[0069] In another optional implementation, based on the above embodiment, if there are no sentence component features in the aggregate feature table whose similarity exceeds a preset second threshold, it can be characterized that there is no input feature type with the sentence component features of the first model input text in the aggregate feature table, and then a preset number of verification input texts can be generated based on the sentence component features of the first model input text to determine the input feature type corresponding to the first model input text.
[0070] Specifically, a data test is performed on the target model using a preset number of verification input texts to obtain a data test result, and based on the data test result, the input feature type to which the first model input text belongs is determined, and the input feature type is added to the aggregate feature table. The preset number is the number of verification input texts that are preset.
[0071] In practical applications, the verification input text may include a first preset number of positive verification input texts and / or a second preset number of reverse verification input texts to improve verification accuracy. The first preset number may be a preset number of positive verification input texts, for example, the first preset number may be 10. The positive verification input text may refer to an input text whose sentence component features are the same as those of the first model input text. The second preset number may be a preset number of reverse verification input texts, for example, the second preset number may be 1. The reverse verification input text may be an input text whose sentence component features are different from those of the first model input text.
[0072] In an optional embodiment, data testing is performed on a target model using a preset number of verification input texts, and the input feature type corresponding to the sentence component feature of the first model input text is determined based on the data test results. This can include, based on a first preset number of positive verification input texts and / or a second preset number of negative verification input texts, inputting the positive verification input texts and / or the reverse verification input texts into the target model, performing data testing on the target model, obtaining data test results, and determining the input feature type corresponding to the sentence component feature based on the data test results.
[0073] Among them, the target model is data-tested using the positive verification input text to obtain a data test result, the similarity between the data test result and the model target output result corresponding to the first model input text is determined, and the number of data test results whose similarity is less than a preset first threshold is counted. If the number is greater than the preset threshold, it can be characterized that the input feature type to which the first model input text belongs can be determined based on the sentence component features of the first model input text. Among them, the data test result whose similarity with the model target output result corresponding to the first model input text is less than the preset first threshold can characterize that there is a deviation between the data test result and the model target output result, that is, the data test result does not meet the expected result. For example, the data test result corresponding to the positive verification input text is different from the model target output result.
[0074] The preset threshold is preset for the data test results, and is the number of similarities between the model target output results that is less than a preset first threshold. The preset threshold may be, for example, half of the first preset number.
[0075] Correspondingly, the target model is subjected to data testing using the reverse verification input text to obtain a data test result, and the similarity between the data test result and the model target output result corresponding to the first model input text is determined. If the similarity is not less than the preset first threshold, it can be characterized that the input feature type to which it belongs can be determined based on the sentence component features of the first model input text. Among them, if the similarity between the data test result corresponding to the reverse verification input text and the model target output result corresponding to the first model input text is not less than the preset first threshold, it can be characterized that there is no deviation between the data test result and the model target output result, that is, the data test result is the same as the model target output result.
[0076] On the basis of the above embodiment, if there is at least one data test result corresponding to the positive verification input text and the negative verification input text that can characterize the input feature type to which the sentence component feature of the first model input text can be determined, then the sentence component feature of the first model input text can be determined as the input feature type to which the first model input text belongs.
[0077] S104: Generate an aggregate feature table corresponding to the data set to be processed based on the input feature type to which the first model input text belongs.
[0078] The aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
[0079] After determining the input text type of each model input text in the data set to be processed, the input feature types that do not exist in the aggregate feature table can be added to the aggregate feature table to generate an aggregate feature table corresponding to the data set to be processed.
[0080] In actual applications, after obtaining the aggregate feature table, in order to facilitate the user's subsequent data testing on the target model, the embodiment of the present disclosure can also generate a test input text for the target model based on the aggregate feature table. The input feature type to which the test input text belongs does not belong to the input feature type in the aggregate feature table to avoid repeated testing.
[0081] Specifically, based on the input feature type in the aggregate feature table, the model can be used to generate text that does not belong to the input feature type as the test input text of the target model.
[0082] In the data processing method provided by the embodiment of the present disclosure, a data set to be processed is obtained, wherein the data set to be processed is obtained by performing data testing on a target model, the data set to be processed includes multiple model input texts, and the similarity between the model target output result corresponding to the model input text and the model actual output result is less than a preset first threshold value. Then, a sentence component analysis is performed on the first model input text in the data set to be processed, and the sentence component features of the first model input text are extracted. Based on the sentence component features of the first model input text, the input feature type to which the first model input text belongs is determined. Based on the input feature type to which the first model input text belongs, an aggregate feature table corresponding to the data set to be processed is generated, wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, the input feature type has a corresponding sentence component feature, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
[0083] The disclosed embodiment analyzes the sentence component features of the model input text in the data set to be processed, aggregates the input feature types to which the model input text in the data set to be processed belongs, and realizes automated processing of the model input text. While shortening the data processing time, it improves the accuracy of feature aggregation of the model input text, and facilitates subsequent optimization of the model.
[0084] In order to facilitate understanding of the content of the above embodiment, the present disclosure will provide another data processing flow chart, referring to Figure 2 . Take the model input text A as an example, assuming that the sentence component features of the model input text A are sentence features, grammatical features and target word features, the sentence features have the highest priority, the grammatical features have the second highest priority, and the target word features have the lowest priority. Specifically:
[0085] S201: Based on the model input text A in the data set to be processed, a sentence component analysis tool is used to obtain the sentence features, grammatical features and target word features of the model input text A.
[0086] Specifically, the sentence component analysis is performed on the model input text A to extract the sentence features, grammatical features and target word features of the model input text A, among which the sentence features have the highest priority, the grammatical features have the second highest priority, and the target word features have the lowest priority.
[0087] S202: Determine whether there is an input feature type to which the model input text A belongs in the aggregated feature table.
[0088] In an optional implementation, the aggregate feature table is queried based on the sentence features, grammatical features, and target word features of the model input text A to determine whether there is an input feature type with the sentence features, grammatical features, or target word features of the model input text A. If it is determined that the aggregate feature table contains an input feature type with the sentence features, grammatical features, or target word features, the input feature type in the aggregate feature is determined as the input feature type to which the model input text A belongs, and then the model input text A is added to the aggregate feature table, otherwise S203 is executed.
[0089] S203: If it is determined that there is no input feature type with the above-mentioned sentence component features in the aggregate feature table, the input feature type corresponding to the model input text A is determined according to the priority order among sentence features, grammatical features and target word features.
[0090] S204: Determine the input feature type to which the model input text A belongs based on the sentence features of the model input text A, and add the input feature type with the sentence features to the aggregate feature table. If the input feature type to which the model input text A belongs cannot be determined based on the sentence features, execute S205.
[0091] S205: Determine the input feature type to which the model input text A belongs based on the grammatical features of the model input text A, and add the input feature type with the grammatical features to the aggregate feature table. If the input feature type to which the model input text A belongs cannot be determined based on the grammatical features, execute S206.
[0092] S206: Determine the input feature type to which the input text A belongs based on the target word feature in the model input text A, and add the input feature type having the target word feature to the aggregated feature table.
[0093] For S204: the method of determining the input feature type to which the model input text A belongs based on the sentence features of the model input text A may include:
[0094] In an optional implementation, a first preset number of positive verification input texts are generated based on the sentence features of the model input text A. At the same time, a second preset number of negative verification input texts are generated based on the sentence features in the sentence component features of the model input text A.
[0095] Then, a first preset number of positive verification input texts are input into the target model to obtain corresponding data test results. A second preset number of negative verification input texts are input into the target model to obtain corresponding data test results.
[0096] After obtaining the corresponding data test results, the number of data test results that are different from the model target output results in the data test results corresponding to the positive verification input text is counted. If the number exceeds half of the first preset number, the input feature type can be determined based on the sentence features of the model input text A.
[0097] If the data test result corresponding to the reverse verification input text is the same as the model target output result, the input feature type can be determined based on the sentence features of the model input text A.
[0098] If the data test results corresponding to the positive verification input text and the negative verification input text respectively indicate that the input feature type of the input text A can be determined based on the sentence features in the model input text A, then the sentence features can be determined as the input feature type of the model input text A.
[0099] Similarly, S205 and S206 can be understood by referring to the above embodiments, and will not be elaborated here.
[0100] It can be seen that the embodiment of the present disclosure analyzes the sentence component features of the model input text in the data set to be processed, aggregates the input feature types to which the model input text in the data set to be processed belongs, and realizes the automated processing of the model input text. While shortening the data processing time, it improves the accuracy of the feature aggregation results of the model input text, and facilitates the subsequent optimization of the model.
[0101] In order to implement the above embodiments, the present disclosure also proposes a data processing device. Figure 3 The structure diagram of a data processing device provided by an embodiment of the present disclosure is shown in FIG. 1 , which can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 3 As shown, the device comprises:
[0102] The acquisition module 301 is used to acquire a data set to be processed; wherein the data set to be processed is obtained by performing data testing on the target model, and the data set to be processed includes a plurality of model input texts, and the similarity between the model target output result corresponding to the model input text and the model actual output result is less than a preset first threshold;
[0103] An extraction module 302 is used to perform sentence component analysis on the first model input text in the data set to be processed, and extract sentence component features of the first model input text;
[0104] A determination module 303, configured to determine the input feature type to which the first model input text belongs based on the sentence component features of the first model input text;
[0105] The first generation module 304 is used to generate an aggregate feature table corresponding to the data set to be processed based on the input feature type to which the first model input text belongs; wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
[0106] In an optional implementation manner, the determining module includes:
[0107] A query submodule, used for querying whether there is an input feature type corresponding to the sentence component feature of the first model input text in the aggregate feature table;
[0108] The determination submodule is used to determine that when an input feature type corresponding to the sentence component feature of the first model input text exists in the aggregate feature table, the input feature type is determined as the input feature type to which the first model input text belongs.
[0109] In an optional implementation, the device further includes:
[0110] A second generating module, configured to generate a preset number of verification input texts based on the sentence component features of the first model input text when determining that the input feature type corresponding to the sentence component features of the first model input text does not exist in the aggregate feature table;
[0111] A testing module is used to perform data testing on the target model using the preset number of verification input texts, and determine the input feature type corresponding to the first model input text based on the data testing result, and add the input feature type to the aggregate feature table.
[0112] In an optional implementation manner, the test module is specifically used to:
[0113] The target model is subjected to data testing using the first preset number of positive verification input texts and / or the second preset number of negative verification input texts, and the input feature type corresponding to the sentence component feature is determined based on the data testing result.
[0114] In an optional implementation, the sentence component features of the first model input text include at least one of sentence features, grammatical features, and target word features, and a priority relationship is set between the at least one feature.
[0115] In an optional implementation, the aggregate feature table includes a set of model input texts corresponding to the at least one input feature type, and the set of model input texts includes model input texts belonging to the corresponding input feature type in the data set to be processed.
[0116] In an optional implementation, the device further includes:
[0117] The third generating module is used to generate a test input text of the target model based on the aggregate feature table; wherein the test input text is used to perform data testing on the target model, and the test input text does not belong to the input feature type in the aggregate feature table.
[0118] In the data processing device provided by the embodiment of the present disclosure, a data set to be processed is obtained, wherein the data set to be processed is obtained by performing data testing on a target model, the data set to be processed includes multiple model input texts, and the similarity between the model target output results corresponding to the model input texts and the model actual output results is less than a preset first threshold value. Then, a sentence component analysis is performed on the first model input text in the data set to be processed, and the sentence component features of the first model input text are extracted. Based on the sentence component features of the first model input text, the input feature type to which the first model input text belongs is determined. Based on the input feature type to which the first model input text belongs, an aggregate feature table corresponding to the data set to be processed is generated, wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
[0119] The disclosed embodiment analyzes the sentence component features of the model input text in the data set to be processed, aggregates the input feature types to which the model input text in the data set to be processed belongs, and realizes automated processing of the model input text. While shortening the data processing time, it improves the accuracy of feature aggregation of the model input text, and facilitates subsequent optimization of the model.
[0120] In addition to the above-mentioned method and apparatus, the embodiments of the present disclosure further provide a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device implements the data processing method described in the embodiments of the present disclosure.
[0121] The embodiments of the present disclosure further provide a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the data processing method described in the embodiments of the present disclosure is implemented.
[0122] In addition, the present disclosure also provides a data processing device, see Figure 4 As shown, it may include:
[0123] Processor 401, memory 402, input device 403 and output device 404. The number of processors 401 in the data processing device can be one or more. Figure 4 In some embodiments of the present disclosure, the processor 401, the memory 402, the input device 403 and the output device 404 may be connected via a bus or other means, wherein: Figure 4 The example of connecting through bus is taken in the following.
[0124] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing of the data processing device by running the software programs and modules stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The input device 403 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the data processing device.
[0125] Specifically in this embodiment, the processor 401 will load the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 will run the applications stored in the memory 402, thereby realizing various functions of the above-mentioned data processing device.
[0126] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0127] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining a data set to be processed; wherein the data set to be processed is obtained by performing data testing on the target model, the data set to be processed includes a plurality of model input texts, and the similarity between the model target output result corresponding to the model input text and the model actual output result is less than a preset first threshold; Performing sentence component analysis on the first model input text in the data set to be processed, and extracting sentence component features of the first model input text; Determining the input feature type to which the first model input text belongs based on the sentence component features of the first model input text; Based on the input feature type to which the first model input text belongs, an aggregate feature table corresponding to the data set to be processed is generated; wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, the input feature type has a corresponding sentence component feature, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
2. The method according to claim 1, characterized in that The step of determining the input feature type to which the first model input text belongs based on the sentence component features of the first model input text includes: Querying the aggregate feature table to see whether there is an input feature type having a sentence component feature of the first model input text; If it is determined that there is an input feature type having the sentence component feature of the first model input text in the aggregate feature table, the input feature type is determined to be the input feature type to which the first model input text belongs.
3. The method according to claim 2, characterized in that The method further comprises: If it is determined that the input feature type having the sentence component features of the first model input text does not exist in the aggregate feature table, generating a preset number of verification input texts based on the sentence component features of the first model input text; The target model is data tested using the preset number of verification input texts, and the input feature type corresponding to the first model input text is determined based on the data test result, and the input feature type is added to the aggregate feature table.
4. The method according to claim 3, characterized in that The preset number of verification input texts includes a first preset number of positive verification input texts and / or a second preset number of negative verification input texts, and the method of performing data testing on the target model using the preset number of verification input texts, and determining the input feature type corresponding to the first model input text based on the data testing result, includes: The target model is data tested using the first preset number of positive verification input texts and / or the second preset number of negative verification input texts, and the input feature type corresponding to the first model input text is determined based on the data test result.
5. The method according to claim 1, characterized in that The sentence component features of the first model input text include at least one of sentence pattern features, grammatical features, and target word features, and a priority relationship is set between the at least one feature.
6. The method according to claim 1, characterized in that The aggregate feature table includes a set of model input texts corresponding to the at least one input feature type, and the set of model input texts includes model input texts belonging to the corresponding input feature type in the data set to be processed.
7. The method according to claim 6, characterized in that The method further comprises: A test input text of the target model is generated based on the aggregate feature table; wherein the test input text is used to perform data testing on the target model, and the test input text does not belong to the input feature type in the aggregate feature table.
8. A data processing device, characterized in that: The device comprises: An acquisition module is used to acquire a data set to be processed; wherein the data set to be processed is obtained by performing data testing on a target model, the data set to be processed includes a plurality of model input texts, and the similarity between the model target output result corresponding to the model input text and the model actual output result is less than a preset first threshold; An extraction module, used for performing sentence component analysis on the first model input text in the data set to be processed, and extracting sentence component features of the first model input text; A determination module, configured to determine the input feature type to which the first model input text belongs based on the sentence component features of the first model input text; The first generation module is used to generate an aggregate feature table corresponding to the data set to be processed based on the input feature type to which the first model input text belongs; wherein the aggregate feature table includes at least one input feature type determined based on the model input text in the data set to be processed, the input feature type has a corresponding sentence component feature, and the at least one input feature type is used to reflect the features of the model input text in the data set to be processed.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the data processing method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the data processing method described in any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.