Data identification method and device, electronic equipment and storage medium
By constructing an entity relationship extraction model and generating triples, the problem of inaccurate identification of unstructured data is solved, and accurate identification and structured transformation of target information are achieved.
Patent Information
- Application Number
- CN202511638303.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-17
AI Technical Summary
Existing technologies struggle to effectively identify and process information in unstructured data, leading to inaccurate and fragmented information identification.
By constructing an entity relationship extraction model, generating triples, and training it using a bidirectional long short-term memory network and a Softmax layer, combined with the BIESO annotation method, unstructured text is identified and transformed into structured associations, achieving accurate identification of target information.
It achieves accurate identification of unstructured data, avoids misjudgment of individual words and information fragmentation, and improves the accuracy of target sentence identification.
Smart Images

Figure CN121543590A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data recognition technology, and in particular to a data recognition method, apparatus, electronic device, and storage medium. Background Technology
[0002] In the field of data security technology, most sensitive data identification currently focuses on identifying structured data.
[0003] However, with the continuous development of China's internet industry, internet data is growing at an astonishing rate, exhibiting characteristics such as heterogeneity, fragmentation, and multi-source nature. This massive amount of data contains a wealth of information, including a significant amount of unique information. Unstructured data constitutes a large proportion of this data. Therefore, a method for identifying unstructured data is urgently needed. Summary of the Invention
[0004] This invention provides a data identification method, apparatus, electronic device, and storage medium to solve the problem of difficulty in identifying information from unstructured data.
[0005] According to one aspect of the present invention, a data identification method is provided, the method comprising:
[0006] Identify the first statement, which is unstructured text;
[0007] The first statement is input into a pre-built entity relation extraction model to obtain at least one triple. Each triple contains at least two different entities and the entity relations of each entity in the triple.
[0008] Based on each triple, target information is identified to determine whether the first statement belongs to the target statement, which is a statement containing a preset meaning.
[0009] According to another aspect of the present invention, a data identification device is provided, the device comprising:
[0010] The first statement determination module is used to determine the first statement, which is unstructured text;
[0011] The triple generation module is used to input the first statement into a pre-built entity relation extraction model to obtain at least one triple. The triple contains at least two different entities and the entity relations of each entity in the triple.
[0012] The target statement recognition module is used to identify target information based on each triple and determine whether the first statement belongs to the target statement, which is a statement containing a preset meaning.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] At least one processor; and
[0015] A memory that is communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the data identification method of any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the data recognition method of any embodiment of the present invention.
[0018] The technical solution of this invention involves determining a first statement, which is unstructured text; inputting the first statement into a pre-built entity relation extraction model to obtain at least one triplet, where each triplet contains at least two different entities and the entity relations between the entities in the triplet. This improves the identification of the first statement, transforming fragmented information into structured associations of triples, making the target statement identification more accurate and clear, and avoiding misjudgments or information fragmentation caused by focusing on a single word. Finally, by identifying the target information based on each triplet, it is determined whether the first statement belongs to the target statement, which is a statement containing a preset meaning, thus achieving accurate identification of the target statement.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of a data identification method provided according to Embodiment 1 of the present invention;
[0022] Figure 2 This is a flowchart of another data identification method provided in Embodiment 2 of the present invention;
[0023] Figure 3This is a schematic diagram of the structure of a data identification device according to Embodiment 3 of the present invention;
[0024] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the data recognition method of this invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] Example 1
[0028] Figure 1 This is a flowchart illustrating a data recognition method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations requiring accurate recognition of a target language. The method can be executed by a data recognition device, which can be implemented in hardware and / or software and can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:
[0029] S110. Determine the first statement, which is unstructured text.
[0030] Unstructured text can be text data without a fixed format that cannot be directly stored in traditional databases or tables. The first sentence can be everyday written communication, office documents, feedback, comments, etc.
[0031] The first sentence can be obtained through methods such as text scanning and real-time text recognition. Text scanning can be achieved by taking a picture of the text, obtaining an image of the text, and then using an image recognition model to recognize the text in the image. Text scanning can also be performed using scanning devices.
[0032] S120. Input the first statement into the pre-built entity relation extraction model to obtain at least one triple. The triple contains at least two different entities and the entity relations of each entity in the triple.
[0033] A triple can be a data format that clearly expresses the relationship between two entities using a fixed structure of "entity-relationship-entity". For example, apple - belongs to - fruit.
[0034] To better identify the first sentence, the scattered information is transformed into a structured association of triples, which makes the target sentence identification more accurate and clear, and can avoid misjudgment or information fragmentation caused by focusing on a single word.
[0035] Therefore, the first statement is input into a pre-built entity relation extraction model, which extracts triples from the first statement, generating triples consisting of entity-relation-entity. Target statement recognition is then performed based on these triples.
[0036] In one alternative approach, the training process of the entity relation extraction model includes:
[0037] Determine the sample statement set; the sample statement set contains several sample statements; the sample statements are unstructured text;
[0038] The entity relation extraction model is trained based on a sample set of statements.
[0039] To ensure the computational accuracy of the entity relation extraction model, this application constructs a large number of sample statements to form a sample statement set, and uses the sample statement set to train the entity relation extraction model.
[0040] During training, the parameters of the entity relationship extraction model are adjusted in reverse by pre-generating corresponding triples for the sample statement set and comparing them with the model output.
[0041] Optionally, the entity relation extraction model includes a bidirectional long short-term memory network, a single-layer LSTM decoding layer, a softmax layer, and a bias objective function;
[0042] The expression for the bias objective function is:
[0043] ;
[0044] In the formula, It is the size of the training set. It is a sentence Length, It is a word The annotation of the word 't' in Chinese It is the normalized labeled probability; It is a bias weight; It is the normalized labeled probability; It is a conditional function.
[0045] The bias objective function adds a weight bias to the original cross-entropy function, making the model focus more on entities. The formula for its objective function is as follows:
[0046] It is the size of the training set. It is a sentence Length, It is a word The annotation of the word 't' in Chinese It is the normalized labeled probability. Furthermore, This is a switching function used to differentiate the loss when the label is "0" and not "0". A non-"0" label indicates the entity or relation label. It is defined as follows:
[0047] ;
[0048] It is a bias weight. The larger the value, the greater the impact on the relevant annotations in the model.
[0049] The Bi-LSTM Encoder Layer consists of a forward LSTM layer, a backward LSTM layer, and a connection layer. Its working principle is that the word embedding layer converts the one-hot representations of words into embedding vectors. Therefore, a word sequence can be represented as... ={ ,... , ... },in is the word vector of the t-th word in the d-th dimension, and n is the length of the sentence sequence. After word embedding, there are two parallel LSTM layers: a forward LSTM layer and a backward LSTM layer. The LSTM architecture consists of a set of recursively connected subnets (called memory blocks). Each time step is an LSTM memory block. The LSTM memory blocks in the Bi-LSTM encoding layer are used to calculate the value based on the previous hidden vector. The previous unit vector and the currently input word Calculate the current hidden vector The specific operation definition is as follows:
[0050] ;
[0051]
[0052] ;
[0053] ;
[0054] ;
[0055] ;
[0056] Where i, f, and o are the input gate, forget gate, and output gate, respectively; b is the bias term; c is the memory term; and W(.) is the parameter. For each word... The forward LSTM layer will consider words... arrive Contextual information (which is tagged as) Encoding Similarly, the backward LSTM layer will be based on... arrive Encoding with context information It is marked as Finally, we concatenate and to represent the encoded information of word t, denoted as . .
[0057] The LSTM decoding layer works by detecting a word. During annotation, the input to the decoding layer is: obtained from the Bi-LSTM encoding layer. Previous prediction labels Previous unit values and the previous hidden vector in the decoding layer. The decoder's internal formula is similar to the following:
[0058] ;
[0059] ;
[0060] ;
[0061] ;
[0062] ;
[0063] ;
[0064] ;
[0065] Predict vectors based on labels using a Softmax layer. Calculate the normalized entity label probability;
[0066] ;
[0067] ;
[0068] It is a Softmax matrix. It is the total number of tags. It is a vector for predicting labels. This represents the probability that the current character belongs to a certain entity label. Since T is similar to label embedding, and LSTM can learn long-term relevance, the decoding method can model label interactions. Because this scheme needs to consider the issue of multiple labels (the same character may belong to multiple entity labels), the Softmax function is transformed, and its formula is as follows:
[0069] ;
[0070] in, , , ..., Let represent k target labels, and s represent the score of each label. This represents the probability that the current character belongs to the k characters.
[0071] Optionally, the entity relation extraction model is trained based on a sample statement set, including:
[0072] The semantics of each sample in the sample sentence set are annotated to obtain a number of annotated corpora;
[0073] The entity relation extraction model is trained based on the sample sentence set and labeled corpus.
[0074] To improve the training efficiency of entity relationship extraction models, the model needs clear criteria for judging entities and relationships between entities, thus preventing the machine from finding the wrong entities or relationships in unstructured text.
[0075] This application annotates the semantics of each sample in the sample sentence set to generate several annotated corpora. During subsequent training, the sample sentence set and the annotated corpora are used to train the entity relation extraction model, thereby improving the accuracy of the entity relation extraction model in recognizing entities and the relationships between entities.
[0076] Optionally, the semantics of each sample in the sample sentence set are annotated, including:
[0077] The semantics of the samples are annotated using the BIESO annotation method.
[0078] BIESO annotation is an annotation system designed for entity recognition tasks in languages without natural word boundaries, such as Chinese. By assigning five types of labels, "B, I, E, S, O", to each character, it accurately delineates the boundaries of entities, such as "beginning, interior, end, and standalone entity", enabling entity relationship extraction models to locate and extract complete entities from continuous text.
[0079] The BIESO annotation method is used to assign an entity label to each word (character) in the training data. Here, B (Begin): indicates the start of the entity; I (Inside): indicates the inside of the entity; E (End): indicates the end of the entity; S (Single): indicates a single entity; and O (Other): indicates other unrelated words (characters). Except for "O", the other labels consist of three parts: the word's position within the entity, the entity relation type, and the relation role. The relation role information is represented by the numbers "1" and "2".
[0080] Taking "The grower of Hami melon is user A" as an example, the label for "Ha" is "B-PL-1", the label for "Mi" is "I-PL-1", the label for "Gua" is "E-PL-1", the label for "The grower is" is "0", the label for "Use" is "B-PL-2", the label for "User" is "I-PL-2", and the label for "A" is "E-PL-2".
[0081] The tag “B-PL-1” uses “B” to indicate that the current word (character) belongs to the beginning of an entity, “PL” (plant) to indicate the relationship between the current entity and other entities, and “1” to indicate that the current entity belongs to the first of two relation entities. The extracted result is represented by a triple: (Entity1, RelationType, Entity2). “Entity1” indicates that the word belongs to the first entity in the triple, while “Entity2” belongs to the second entity following the relation type. The relation type information comes from a predefined set of relations. The extracted triple is “{cantaloupe, grower, user A}”. The total number of tags is [number missing]. ,in It is the size of the predefined relation set.
[0082] S130. Based on each triple, identify the target information and determine whether the first statement belongs to the target statement. The target statement is a statement containing a preset meaning.
[0083] Based on the structured association of triples, rules or models are used to determine whether the entire triple involves target information.
[0084] Taking the search for sensitive information as an example, the triple {User A, Submit, Personal Information}, on its own, "Personal Information" is a sensitive word, but when combined with "User A" (the subject) and "Submit" (the relationship), it can be more accurately determined that this is personal information actively provided by the user, rather than a sensitive word in irrelevant text.
[0085] By adopting the technical solution of this application, a first statement is determined, which is unstructured text; the first statement is input into a pre-built entity relation extraction model to obtain at least one triple. The triple contains at least two different entities and the entity relations of each entity in the triple, thereby better identifying the first statement and transforming scattered information into structured associations of triples. This makes the target statement identification more accurate and clear, and avoids misjudgment or information fragmentation caused by focusing on a single word. Finally, by identifying the target information based on each triple, it is determined whether the first statement belongs to the target statement, which is a statement containing a preset meaning, thus achieving accurate identification of the target statement.
[0086] Example 2
[0087] Figure 2 This embodiment provides a flowchart of another data recognition method for this invention. Based on the above embodiments, this embodiment further optimizes the process in the foregoing embodiments of identifying target information based on each triplet to determine whether the first statement belongs to the target statement. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the data recognition method of this embodiment may include the following steps:
[0088] S210. Determine the first statement, which is unstructured text.
[0089] In one alternative approach, after determining the first statement, the following is also included:
[0090] Determine the text size of the first statement;
[0091] If the text size of the first statement is greater than the preset text size, the first statement is divided based on punctuation marks to obtain several statement segments.
[0092] Considering that in some scenarios the first sentence may be too long, the computational efficiency of the entity relation extraction model will decrease, and may even affect the recognition efficiency of triples.
[0093] Therefore, when the first statement is too long, it needs to be split into smaller parts, and the split results should replace the first statement.
[0094] To address this, we first need to determine the text size of the first statement. If the text size of the first statement is greater than the preset text size, it is determined that the first statement is too long. In this case, we can use punctuation marks as dividing points to divide the first statement into several statement segments.
[0095] Optionally, the segmentation of the first sentence can also be achieved by using a semantic recognition model to perform semantic recognition on the first sentence and then segmenting the first sentence according to the semantics.
[0096] S220. Input the first statement into the pre-built entity relation extraction model to obtain at least one triple. The triple contains at least two different entities and the entity relations of each entity in the triple.
[0097] S230. Determine whether each triplet conforms to the preset identification rules and preset combination rules corresponding to the target statement. If it does, determine that the first statement belongs to the target statement.
[0098] Identification rules transform the sensitive dimensions of triples into actionable judgment conditions. By clearly defining "what conditions a triple meets to be considered sensitive information," they enable rapid filtering and accurate determination of sensitive content, avoiding vague or subjective judgments. Combination rules combine individual rules according to business needs, forming a "multi-condition linkage" judgment logic.
[0099] A recognition unit is constructed based on preset recognition rules and preset combination rules. Triples are input into the recognition unit, which judges the triples based on preset recognition rules and preset combination rules. If all are satisfied, the first statement is determined to be the target statement.
[0100] By adopting the technical solution of this application, a first statement is determined, which is unstructured text; the first statement is input into a pre-built entity relation extraction model to obtain at least one triplet, which contains at least two different entities and the entity relations of each entity in the triplet; it is determined whether each triplet conforms to the preset recognition rules and preset combination rules corresponding to the target statement. If they conform, the first statement is determined to belong to the target statement, thereby achieving accurate judgment of the target statement.
[0101] Example 3
[0102] Figure 3 This invention provides a structural block diagram of a data recognition device, applicable to situations requiring accurate target language recognition. The data recognition device can be implemented in hardware and / or software and can be configured in an electronic device with data processing capabilities. Figure 3As shown, the data recognition device of this embodiment may include: a first statement determination module 310, a triplet generation module 320, and a target statement recognition module 330. Wherein:
[0103] The first statement determination module 310 is used to determine the first statement, which is unstructured text;
[0104] The triple generation module 320 is used to input the first statement into a pre-built entity relation extraction model to obtain at least one triple. The triple contains at least two different entities and the entity relations of each entity in the triple.
[0105] The target statement recognition module 330 is used to identify target information based on each triple and determine whether the first statement belongs to the target statement, which is a statement containing a preset meaning.
[0106] Based on the above embodiments, optionally, the training process of the entity relation extraction model includes:
[0107] Determine the sample statement set; the sample statement set contains several sample statements; the sample statements are unstructured text;
[0108] The entity relation extraction model is trained based on a sample set of statements.
[0109] Based on the above embodiments, optionally, the entity relation extraction model includes a bidirectional long short-term memory network, a single-layer LSTM decoding layer, a softmax layer, and a bias objective function.
[0110] The expression for the bias objective function is:
[0111] ;
[0112] In the formula, It is the size of the training set. It is a sentence Length, It is a word The annotation of the word 't' in Chinese It is the normalized labeled probability.
[0113] Based on the above embodiments, optionally, the entity relation extraction model is trained based on a sample statement set, including:
[0114] The semantics of each sample in the sample sentence set are annotated to obtain a number of annotated corpora;
[0115] The entity relation extraction model is trained based on the sample sentence set and labeled corpus.
[0116] Based on the above embodiments, optionally, after the first statement determination module 310, the following is included:
[0117] Determine the text size of the first statement;
[0118] If the text size of the first statement is greater than the preset text size, the first statement is divided based on punctuation marks to obtain several statement segments.
[0119] Based on the above embodiments, optionally, the semantics of each sample in the sample sentence set are annotated, including:
[0120] The semantics of the samples are annotated using the BIESO annotation method.
[0121] Based on the above embodiments, optionally, the target statement recognition module 330 includes:
[0122] Determine whether each triplet conforms to the preset identification rules and preset combination rules corresponding to the target statement. If it does, then determine that the first statement belongs to the target statement.
[0123] The data recognition device provided in the embodiments of the present invention can execute the data recognition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0124] Example 4
[0125] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0126] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0127] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0128] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as data recognition methods.
[0129] In some embodiments, the data identification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data identification method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the data identification method by any other suitable means (e.g., by means of firmware).
[0130] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0131] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0132] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0133] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0134] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0135] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0136] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0137] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A data recognition method characterized by, The method comprises the following steps: determining a first sentence, the first sentence being unstructured text; inputting the first sentence into a pre-constructed entity relation extraction model to obtain at least one triple, the triple containing at least two different entities and the entity relation of each entity in the triple; performing target information recognition according to each triple to determine whether the first sentence belongs to a target sentence, the target sentence being a sentence containing a preset meaning.
2. The method of claim 1, wherein, The training process of the entity relation extraction model comprises: determining a sample sentence set, the sample sentence set containing a plurality of sample sentences, the sample sentences being unstructured text; training the entity relation extraction model based on the sample sentence set.
3. The method of claim 2, wherein, The entity relation extraction model comprises a bidirectional long short-term memory network, a single-layer LSTM decoding layer, a Softmax layer, and a bias target function. The expression of the bias target function is as follows: ; where, is the size of the training set, is the length of the sentence , is the word t in the word is the normalized probability of the label is the bias weight; is the normalized probability of the label is the conditional function.
4. The method of claim 3, wherein, The training of the entity relation extraction model based on the sample sentence set comprises: annotating each sample sentence in the sample sentence set to obtain a plurality of annotated corpora; training the entity relation extraction model according to the sample sentence set and the annotated corpora.
5. The method of claim 1, wherein, After determining the first sentence, the method further comprises: determining the text size of the first sentence; if the text size of the first sentence is greater than a preset text size, dividing the first sentence based on punctuation to obtain a plurality of sentence segments.
6. The method of claim 4, wherein, The annotation of each sample sentence in the sample sentence set comprises: annotating the sample sentences based on the BIESO annotation method.
7. The method of claim 1, wherein, The target information recognition according to each triple to determine whether the first sentence belongs to a target sentence comprises: determining whether each triple meets the preset recognition rule and the preset combination rule corresponding to the target sentence, and determining that the first sentence belongs to the target sentence if the determination is positive.
8. A data recognition apparatus, characterized by comprising: The method comprises: a first sentence determination module configured to determine a first sentence, the first sentence being unstructured text; a triple generation module configured to input the first sentence into a pre-constructed entity relation extraction model to obtain at least one triple, the triple containing at least two different entities and the entity relation of each entity in the triple; a target sentence recognition module configured to perform target information recognition according to each triple to determine whether the first sentence belongs to a target sentence, the target sentence being a sentence containing a preset meaning.
9. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the data recognition method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the data recognition method of any one of claims 1-7 when executed.