Data enhancement method, electronic equipment and storage medium
By constructing logical expression formats and generating natural language texts, the high cost and inefficiency problems caused by the traditional semantic analysis method relying on manual annotation are solved, the data set diversity and construction efficiency are improved, and the multi-language of semantic analysis model is improved. Environmental adaptability.
Patent Information
- Application Number
- CN202410529696.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-02-07
AI Technical Summary
Traditional semantic analytics methods rely on manual annotation, which is expensive and difficult to maintain consistency, especially in multilingual environments, resulting in limited semantic analytics technology in large-scale practical applications.
By building a logical expression format based on preset underlying logical language, generating multiple logical expressions and converting them into natural language text, we will build a goal-enhancing data set, reducing manual annotation costs and improving data set diversity.
It has achieved the reduction of manual labeling costs, improved data set diversity and construction efficiency, and improved the accuracy and parsing efficiency of semantic analytical models in multi-language environments.
Smart Images

Figure CN119397265A_ABST
Abstract
Description
Technical Field
[0001] The present application generally relates to the field of artificial intelligence technology. More specifically, the present application relates to a data enhancement method, an electronic device, and a storage medium. Background Art
[0002] In today's multilingual environment, the role of semantic parsing cannot be underestimated. It is the core of achieving accurate language understanding and effective natural language processing. Traditional semantic parsing methods mostly rely on manual annotation, which not only requires a lot of human resources, but also makes it extremely difficult to maintain annotation consistency due to the rich grammatical structure, semantic differences in the language and the different backgrounds of the annotators themselves. Especially in multilingual conditions, the differences, unique grammatical structures and cultural backgrounds of each language bring additional challenges to accurate semantic parsing. In addition, the manual annotation process in traditional methods is time-consuming and costly, which limits the application of semantic parsing technology in large-scale practice. In this case, even the most advanced semantic parsing systems find it difficult to cover or quickly migrate to multiple scenarios, thus affecting their universality and effectiveness in many fields.
[0003] In the existing technology, we can use the text generated by the text generation model through the reverse generation of annotated data to build a richer dataset, but this method has obvious limitations, because the text generation model can only produce a single sentence that lacks diversity, and faces challenges in generalization across domains. In addition, such models require a large amount of domain-specific data for training and fine-tuning in order to effectively perform data augmentation tasks.
[0004] In view of this, there is an urgent need to provide a data augmentation method to reduce the cost of manual annotation and improve the diversity and construction efficiency of data sets. Summary of the invention
[0005] In order to at least solve one or more of the above-mentioned technical problems, the present application proposes a data enhancement method, an electronic device and a storage medium in multiple aspects. The data enhancement method can reduce the cost of manual annotation and improve the diversity and construction efficiency of the data set.
[0006] In a first aspect, the present application provides a data enhancement method, comprising: constructing a logical expression format based on a preset underlying logical language; generating multiple element values corresponding to each variable element based on each variable element in the logical expression format; constructing multiple logical expressions based on the logical expression format and the multiple element values corresponding to each variable element; generating multiple natural language texts based on the multiple logical expressions to constitute a target enhanced data set.
[0007] In some embodiments, constructing a logical expression format based on a preset underlying logical language includes: constructing a logical expression format based on a logical assertion to obtain a logical assertion format.
[0008] In some embodiments, constructing multiple logical expressions based on the logical expression format and multiple element values corresponding to each variable element includes: concatenating multiple element values corresponding to each variable element based on the logical assertion format to obtain multiple logical expressions.
[0009] In some embodiments, generating multiple element values corresponding to each variable element based on each variable element in the logical expression format includes: generating multiple element values corresponding to each variable element through a code generator, a preset text generation model and / or a preset database.
[0010] In some embodiments, after constructing multiple logical expressions based on the logical expression format and multiple element values corresponding to each variable element, the method further includes: performing syntax verification and logic verification on the multiple logical expressions respectively.
[0011] In some embodiments, generating multiple natural language texts based on multiple logical expressions to constitute a target enhanced data set includes: inputting multiple logical expressions into a preset text generation model respectively to obtain multiple natural language texts output by the preset text generation model; and constructing a target enhanced data set based on the multiple natural language texts.
[0012] In some embodiments, after obtaining multiple natural language texts output by a preset text generation model, the method also includes: determining whether an element value in a logical expression corresponding to the currently generated natural language text exists in the currently generated natural language text; if it is determined that it exists, retaining the currently generated natural language text; if it is determined that it does not exist, removing the currently generated natural language text.
[0013] In some embodiments, after constructing a target enhanced dataset based on multiple natural language texts, the method also includes: fine-tuning and correcting the target enhanced dataset through a preset dataset correction model to obtain a corrected dataset; wherein the preset dataset correction model is a model obtained by modifying the mT5 model into a pointer network structure and training it.
[0014] In a second aspect, the present application provides an electronic device, comprising: a processor; and a memory, on which a program code for data enhancement is stored, and when the program code is executed by the processor, the electronic device implements the method as described above.
[0015] In a third aspect, the present application provides a non-transitory machine-readable storage medium having stored thereon a program code for data enhancement, and when the program code is executed by a processor, the method as described above can be implemented.
[0016] The technical solution provided by this application may have the following beneficial effects:
[0017] The data enhancement method, electronic device and storage medium provided by the present application can accurately describe the information in a specified field by constructing a logical expression format based on a preset underlying logical language, thereby providing a solid foundation for data enhancement. Then, based on each variable element in the logical expression format, multiple element values corresponding to each variable element are generated, and multiple logical expressions are constructed based on the logical expression format and the multiple element values corresponding to each variable element, so that the clear structure of the logical expression can be used to quickly construct grammatically correct annotation results, reducing the cost of manual annotation.
[0018] Furthermore, the present application can generate multiple natural language texts based on multiple logical expressions to form a target enhanced data set, thereby being able to generate multiple natural language texts with diverse language styles and sentence structures based on logical expressions. The semantic parsing model trained based on the target enhanced data set composed of multiple natural language texts can improve the accuracy and parsing efficiency of semantic parsing in practical application scenarios such as professional document analysis, language translation, and content understanding recommendation.
[0019] In general, this application can reduce the cost of manual annotation, improve the diversity and construction efficiency of data sets, and facilitate the construction of semantic parsing models. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0021] Figure 1 An exemplary flow chart of a data enhancement method according to some embodiments of the present application is shown;
[0022] Figure 2 An exemplary flow chart showing a data enhancement method according to some other embodiments of the present application is shown;
[0023] Figure 3 An exemplary flow chart showing a data enhancement method according to some other embodiments of the present application is shown;
[0024] Figure 4 A schematic diagram of the structure of an electronic device shown in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. For the simplicity and clarity of the description, the figure marks may be repeated in the drawings to indicate corresponding or similar elements when deemed appropriate. In addition, the present application sets forth many specific details in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein may be practiced without these specific details. In other cases, well-known methods, processes, and components are not described in detail to avoid blurring the embodiments described herein. Moreover, the description should not be regarded as limiting the scope of the embodiments described herein. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0026] It should be understood that the possible terms "first" or "second" etc. in the claims, specifications and drawings disclosed in this application are used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of this application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.
[0027] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0028] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0029] Most traditional semantic parsing methods rely on manual annotation, which not only requires a lot of human resources, but also makes it extremely difficult to maintain annotation consistency due to the rich grammatical structures, semantic differences in languages, and the different backgrounds of the annotators themselves. Especially in the case of multiple languages, the differences, unique grammatical structures, and cultural backgrounds of each language bring additional challenges to accurate semantic parsing. In addition, the manual annotation process in traditional methods is time-consuming and costly, which limits the application of semantic parsing technology in large-scale practice. In this case, even the most advanced semantic parsing systems are difficult to cover or quickly migrate to multiple scenarios, thus affecting their universality and effectiveness in many fields. In the prior art, a richer dataset can be constructed by using text generated by text generation models in reverse using annotated data, but this method has obvious limitations, because text generation models can often only produce single and lacking diversity sentences, and face challenges in generalization across domains, and such models require a large amount of data in specific fields for training and fine-tuning to effectively perform data augmentation tasks.
[0030] In view of this, there is an urgent need to provide a data augmentation method to reduce the cost of manual annotation and improve the diversity and construction efficiency of data sets.
[0031] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.
[0032] Figure 1 An exemplary flow chart showing the data enhancement method of some embodiments of the present application is shown in Figure 1 , the data enhancement method shown in the embodiment of the present application may include:
[0033] In step S101, a logical expression format is constructed based on a preset underlying logic language. In the embodiment of the present application, the aforementioned underlying logic language generally refers to a programming language used to construct and express computer program logic, and different underlying logic languages may correspond to different logical expression formats.
[0034] In step S102, multiple element values corresponding to each variable element are generated based on each variable element in the logical expression format. In the embodiment of the present application, the aforementioned variable element refers to a concept that clearly describes the specified field information in the logical expression format. For example, assuming that someone's educational information needs to be described, the variable elements present in the logical expression format may include but are not limited to a person identifier, a time period, degree information, and a school name.
[0035] Furthermore, the embodiments of the present application need to generate multiple element values corresponding to each variable element for each variable element. Taking the above hypothetical description of a person's educational information as an example, the character identifier can be a name or an ID number, and a variety of names can be generated for the character identifier; the time period can be randomly generated within a reasonable time period; the degree information and school name can be randomly extracted and generated through an existing database. It can be understood that the generation method of the multiple element values corresponding to each variable element can be diverse. In actual applications, it is necessary to select a suitable method for generating element values according to the actual application situation. The present application does not impose any restrictions in this regard.
[0036] In step S103, multiple logical expressions are constructed based on the logical expression format and multiple element values corresponding to each variable element. In the embodiment of the present application, the element value corresponding to each variable element can be substituted according to the logical expression format, so as to construct and generate multiple logical expressions.
[0037] In step S104, multiple natural language texts are generated based on multiple logical expressions to form a target enhanced data set. In an embodiment of the present application, multiple natural language texts with diverse language styles and sentence structures can be generated according to logical expressions, thereby forming a target enhanced data set based on these multiple natural language texts. The semantic parsing model trained using this constructed target enhanced data set can accurately and efficiently parse professional terms in professional documents in application scenarios such as professional document analysis, accurately and efficiently annotate words in articles in application scenarios such as language translation, and parse user questions or points of interest in application scenarios such as content understanding recommendation to provide users with more accurate content recommendations.
[0038] This application constructs a logical expression format based on a preset underlying logical language, so that the information in the specified field can be accurately described, providing a solid foundation for data enhancement. Then, based on each variable element in the logical expression format, multiple element values corresponding to each variable element are generated, and multiple logical expressions are constructed based on the logical expression format and the multiple element values corresponding to each variable element, so that the clear structure of the logical expression can be used to quickly construct grammatically correct annotation results, reducing the cost of manual annotation. Further, the application can generate multiple natural language texts based on multiple logical expressions to constitute a target enhanced data set, so that multiple natural language texts with diversified language styles and sentence structures can be generated according to the logical expression. Based on the semantic parsing model trained by the target enhanced data set composed of multiple natural language texts, the accuracy and parsing efficiency of semantic parsing can be improved in practical application scenarios such as professional document analysis, language translation, and content understanding recommendation. In general, the application can reduce the cost of manual annotation, improve the diversity and construction efficiency of data sets, and is conducive to the construction of semantic parsing models.
[0039] In some embodiments, logical assertions may be selected as the preset underlying logic language to construct a logical expression format, and logical expressions may be constructed based on this. Figure 2 Let's explain in detail the process of building logical expressions based on logical assertions. Figure 2 An exemplary flowchart showing the data enhancement method of some other embodiments of the present application is shown in Figure 2 , the data enhancement method shown in the embodiment of the present application may include:
[0040] In step S201, a logical expression format is constructed based on a logical assertion to obtain a logical assertion format. A logical assertion is a statement used in logic and computer science that expresses a proposition that is considered to be true or false. In formal logic, an assertion is a simple statement that does not contain any operations or commands, but only declares the state of a logical expression. Assertions are generally used to describe conditions, rules, or properties that a system should satisfy. In an embodiment of the present application, illustratively, assuming that someone's educational information needs to be described, the logical assertion format can be expressed as: school_educate_of(PERSON, PERIOD, DEGREE) = SCHOOL, where PERSON represents a person identifier, PERIOD represents a time period, DEGREE represents degree information, SCHOOL represents a school name, and school_educate_of represents a function name or a rule name. In this example, the educational information is stated as a specified event or a specified field.
[0041] In step S202, multiple element values corresponding to each variable element are generated by a code generator, a preset text generation model and / or a preset database. Exemplarily, the above hypothetical description of describing someone's educational information is used as an example to continue to explain that a time period can be randomly generated by a code generator such as a random number generator provided by Python; a character identifier and degree information can be generated by preset text generation models such as a recurrent neural network (RNN), a Transformer model that processes sequence data through a self-attention mechanism (Self-Attention), and a BERT (Bidirectional Encoder Representations from Transformers) model, etc.; a school name can be generated by querying a preset database. It can be understood that the generation methods of multiple element values corresponding to each variable element can be diverse. In actual applications, it is necessary to select a suitable method for generating element values according to the actual application situation, and this application does not impose any restrictions in this regard.
[0042] In step S203, multiple element values corresponding to each variable element are spliced based on the logical assertion format to obtain multiple logical expressions. In the embodiment of the present application, multiple element values corresponding to each variable element can be combined and spliced to form multiple variable element combinations, and then the spliced variable element combinations are substituted into the logical assertion format to obtain multiple logical expressions.
[0043] In step S204, a plurality of logical expressions are respectively subjected to syntax checking and logic checking. In an embodiment of the present application, in order to ensure the accuracy of the logical expression and avoid affecting the data quality of the subsequently generated data set, it is necessary to perform syntax checking and logic checking on the logical expression. Exemplarily, a regular expression can be used to perform syntax checking and logic checking, and a regular expression can be used to match and check whether a string conforms to a specific pattern; a syntax analyzer can also be used to check whether the code follows the grammatical rules of the language. It can be understood that there are various ways to perform syntax checking and logic checking on logical expressions. In practical applications, it is necessary to select a suitable verification method according to the actual application situation, and the present application does not impose any restrictions in this regard.
[0044] In some embodiments, the target enhanced data set may be further modified to obtain a data set that effectively covers a multilingual environment. Figure 3 The generation process of the target enhanced dataset and the correction process of the target enhanced dataset are described in detail. Figure 3 An exemplary flow chart showing the data enhancement method of some other embodiments of the present application is shown in Figure 3, the data enhancement method shown in the embodiment of the present application may include:
[0045] In step S301, multiple logical expressions are respectively input into a preset text generation model to obtain multiple natural language texts output by the preset text generation model. In the embodiment of the present application, since the logical expression can accurately describe the information of the specified field or the specified event, it can ensure that the preset text generation model can process the data of the specified field or the specified event to be able to output natural language text, thereby using the preset text generation model's ability to quickly understand logical instructions and excellent text generation ability to help obtain rich and diverse semantic analysis annotations and reduce the cost of manual annotation.
[0046] In step S302, quality monitoring is performed on multiple natural language texts respectively. To ensure the data quality of the generated natural language text, in an embodiment of the present application, quality monitoring can be implemented by determining whether the element value in the logical expression corresponding to the currently generated natural language text exists in the currently generated natural language text, wherein if it is determined to exist, the currently generated natural language text is retained; if it is determined not to exist, the currently generated natural language text is removed to ensure the accuracy and consistency of the generated data. It can be understood that there are various ways to monitor the quality of natural language text. In actual applications, it is necessary to select a suitable method to monitor the quality of natural language text according to the actual application situation. The present application does not impose any restrictions in this regard.
[0047] In step S303, a target enhanced data set is constructed based on multiple natural language texts. Multiple natural language texts that have passed quality control are collected to construct a target enhanced data set. The semantic parsing model trained based on the target enhanced data set can improve the accuracy and parsing efficiency of semantic parsing in practical application scenarios such as professional document analysis, language translation, and content understanding recommendation.
[0048] In step S304, the target enhanced dataset is fine-tuned and corrected by the preset dataset correction model to obtain a corrected dataset. In an embodiment of the present application, the preset dataset correction model is a model obtained by modifying the mT5 model into a pointer network structure and training it. Among them, the mT5 (Modified T5) model is a multilingual variant of T5 (Text-to-Text Transfer Transformer), and is a model pre-trained on the CommonCrawl dataset, which covers more than 101 languages.
[0049] If the mT5 model needs to be modified into a pointer network structure, the decoder part of the model needs to be adjusted in order to introduce the pointer mechanism. First, the encoder of the mT5 model needs to be retained. The encoder of the mT5 model is usually a Transformer-based encoder, which is responsible for encoding the input text into a fixed-length context vector, which can provide the model with powerful text understanding and representation capabilities. Then, the decoder of the mT5 model needs to be modified. Specifically, a pointer network layer can be added after the output layer of the decoder. The output dimension of this layer should match the length of the input sequence so that a pointer is assigned to each input element; then, in each decoding step of the decoder, in addition to generating a new vocabulary, the model also needs to output a pointer vector, which indicates which element in the input sequence the model is considering as part of the output; then, in the decoding process, the output of the model can be a new vocabulary or an element in the input sequence, depending on the result of the pointer vector. Then, after the decoder is modified, the model needs to be trained to adapt to the new decoder structure. Finally, after the training is completed, the above-mentioned preset data set correction model is generated.
[0050] By correcting the target enhanced dataset through the above-mentioned preset dataset correction model, the dataset can effectively cover multilingual environments, so that the semantic parsing model trained using the corrected dataset has multilingual parsing capabilities, which not only improves the parsing performance and generalization ability of the semantic parsing model in multilingual environments, but also ensures the effectiveness of the semantic parsing model in different language environments.
[0051] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides an electronic device for executing a data enhancement method and a corresponding embodiment.
[0052] Figure 4 FIG. 4 is a block diagram showing a hardware configuration of an electronic device 400 that can implement the data enhancement method of an embodiment of the present application. Figure 4 As shown, the electronic device 400 may include a processor 410 and a memory 420. Figure 4 In the electronic device 400, only the components related to this embodiment are shown. Therefore, it is obvious to those skilled in the art that the electronic device 400 may also include components related to this embodiment. Figure 4 The components shown in the figure are different from the common components. For example: fixed-point arithmetic units.
[0053] The electronic device 400 may correspond to a computing device having various processing functions, for example, a function for generating a neural network, training or learning a neural network, quantizing a floating-point neural network to a fixed-point neural network, or retraining a neural network. For example, the electronic device 400 may be implemented as various types of devices, such as a personal computer (PC), a server device, a mobile device, etc.
[0054] The processor 410 controls all functions of the electronic device 400. For example, the processor 410 controls all functions of the electronic device 400 by executing a program stored in the memory 420 on the electronic device 400. The processor 410 may be implemented by a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. provided in the electronic device 400. However, the present application is not limited thereto.
[0055] In some embodiments, the processor 410 may include an input / output (I / O) unit 411 and a computing unit 412. The I / O unit 411 may be used to receive various data, such as a preset underlying logic language. Exemplarily, the computing unit 412 may be used to construct a logical expression format based on the preset underlying logic language received via the I / O unit 411; and then generate multiple element values corresponding to each variable element based on each variable element in the logical expression format; and then construct multiple logical expressions based on the logical expression format and the multiple element values corresponding to each variable element; and then generate multiple natural language texts based on the multiple logical expressions to constitute a target enhanced data set. This target enhanced data set may be output by the I / O unit 411, for example. The output data may be provided to the memory 420 for reading and use by other devices (not shown), or may be directly provided to other devices for use.
[0056] The memory 420 is hardware for storing various data processed in the electronic device 400. For example, the memory 420 can store processed data and data to be processed in the electronic device 400. The memory 420 can store data sets involved in the data enhancement method process that has been processed or to be processed by the processor 410, for example, preset underlying logic languages, etc. In addition, the memory 420 can store applications, drivers, etc. to be driven by the electronic device 400. For example: the memory 420 can store various programs related to the data enhancement method to be executed by the processor 410. The memory 420 can be a DRAM, but the present application is not limited thereto. The memory 420 may include at least one of a volatile memory or a non-volatile memory. The non-volatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, a phase change RAM (PRAM), a magnetic RAM (MRAM), a resistive RAM (RRAM), a ferroelectric RAM (FRAM), and the like. The volatile memory may include dynamic RAM (DRAM), static RAM (SRAM), synchronous DRAM (SDRAM), PRAM, MRAM, RRAM, ferroelectric RAM (FeRAM), etc. In an embodiment, the memory 420 may include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, caches, or a memory stick.
[0057] In summary, the specific functions implemented by the memory 420 and the processor 410 of the electronic device 400 provided in the implementation mode of this specification can be explained in comparison with the aforementioned implementation modes in this specification, and can achieve the technical effects of the aforementioned implementation modes, and will not be repeated here.
[0058] In this embodiment, the processor 410 can be implemented in any suitable manner. For example, the processor 410 can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc.
[0059] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions exemplified herein may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.
[0060] Although multiple embodiments of the present application have been shown and described herein, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art can think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The attached claims are intended to limit the scope of protection of the present application, and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A data enhancement method, characterized in that: include: Construct logical expression format based on preset underlying logic language; Generate multiple element values corresponding to each variable element based on each variable element in the logical expression format; Constructing multiple logical expressions based on the logical expression format and multiple element values corresponding to each variable element; A plurality of natural language texts are generated based on the plurality of logical expressions to constitute a target enhanced data set.
2. The data enhancement method according to claim 1, characterized in that: The constructing of the logical expression format based on the preset underlying logical language includes: The logical expression format is constructed based on the logical assertion to obtain the logical assertion format.
3. The data enhancement method according to claim 2, characterized in that: The constructing of multiple logical expressions based on the logical expression format and multiple element values corresponding to each variable element comprises: Based on the logic assertion format, multiple element values corresponding to each variable element are concatenated to obtain the multiple logical expressions.
4. The data enhancement method according to claim 1, characterized in that: The generating of a plurality of element values corresponding to each variable element based on each variable element in the logical expression format comprises: Multiple element values corresponding to each variable element are generated through a code generator, a preset text generation model and / or a preset database.
5. The data enhancement method according to claim 1, characterized in that: After constructing a plurality of logical expressions based on the logical expression format and a plurality of element values corresponding to each variable element, the method further includes: The multiple logical expressions are respectively subjected to syntax check and logic check.
6. The data enhancement method according to claim 4, characterized in that: Generating a plurality of natural language texts based on the plurality of logical expressions to form a target enhanced data set comprises: Inputting the multiple logical expressions into the preset text generation model respectively to obtain multiple natural language texts output by the preset text generation model; The target enhanced dataset is constructed based on the multiple natural language texts.
7. The data enhancement method according to claim 6, characterized in that: After obtaining the plurality of natural language texts output by the preset text generation model, the method further includes: Determine whether the element value in the logical expression corresponding to the currently generated natural language text exists in the currently generated natural language text; If it is determined to exist, the currently generated natural language text is retained; If it is determined that it does not exist, the currently generated natural language text is removed.
8. The data enhancement method according to claim 6, characterized in that: After constructing the target enhanced dataset based on the multiple natural language texts, the method further includes: Fine-tune and correct the target enhanced dataset using a preset dataset correction model to obtain a corrected dataset; The preset data set correction model is a model obtained by modifying the mT5 model into a pointer network structure and training it.
9. An electronic device, characterized in that: include: processor; as well as A memory having a program code for data enhancement stored therein, wherein when the program code is executed by the processor, the electronic device implements the method as claimed in any one of claims 1 to 8.
10. A non-transitory machine-readable storage medium having a program code for data enhancement stored thereon, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 8 is implemented.