Noise data identification method and device, electronic equipment and readable storage medium
By calculating the semantic vector and cross-distance of the text to be identified, the minimum spanning tree algorithm is used to identify noisy text, which solves the problem of inaccurate noisy text identification in the existing technology and improves the intent recognition effect of natural language processing models.
Patent Information
- Application Number
- CN202410797599.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2025-12-19
AI Technical Summary
Existing technologies are not very accurate in recognizing noisy text, especially in business scenarios where users express themselves in different ways. It is difficult to accurately identify noisy text from a large number of training samples, which affects the intent recognition ability of natural language processing models.
By obtaining the semantic vector of the text to be identified, calculating the cross-distance, and using the cross-distance to increase the difference between normal text and noisy text, the minimum spanning tree algorithm is used to prune the target edges to identify noisy text and improve the recognition accuracy.
It enables the rapid and accurate identification of noisy text from a large amount of normal text, thereby improving the intent recognition capability of natural language processing models.
Smart Images

Figure CN121168438A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a noise data identification method and device, electronic equipment and readable storage medium. BACKGROUND
[0002] Intent Recognition is a kind of natural language processing (NLP) technology, which is used to identify the intent or purpose of a user from the text provided by the user. In order to improve the intent recognition capability of the natural language processing model, it is usually necessary to fine-tune or train the natural language processing model with samples manually labeled with intent. However, the manual labeling method may cause the intent of the sample to be labeled incorrectly, and the number of training samples is usually large, so it is difficult to determine the noise text from the training samples. SUMMARY
[0003] Therefore, the embodiments of the present application provide a noise data identification method and device, electronic equipment and readable storage medium, so as to increase the difference between normal text and noise text by mutual distance, thereby accurately identifying noise text from a large number of normal text.
[0004] In the first aspect, the embodiments of the present application provide a noise data identification method, which comprises:
[0005] obtaining semantic vectors of each to-be-identified text in a to-be-identified text set, each to-be-identified text corresponding to a same business scenario;
[0006] obtaining mutual distances between each to-be-identified text according to each semantic vector;
[0007] determining noise text from the to-be-identified text set according to each mutual distance.
[0008] Optionally, the obtaining of the semantic vectors of each to-be-identified text in the to-be-identified text set comprises:
[0009] obtaining the semantic vectors of each to-be-identified text based on a pre-trained natural language processing model, the natural language processing model being fine-tuned based on a training sample set, each training sample in the training sample set corresponding to the same business scenario as the to-be-identified text;
[0010] respectively taking each to-be-identified text as the input of the natural language processing model to obtain the corresponding semantic vector.
[0011] Optionally, the obtaining of the mutual distances between each to-be-identified text according to each semantic vector comprises:
[0012] dimension reduction is performed on each semantic vector to obtain a two-dimensional vector of each of the to-be-identified texts;
[0013] The mutual reach distance between each of the to-be-identified texts is obtained according to each of the two-dimensional vectors.
[0014] Optionally, the mutual reach distance between each of the to-be-identified texts is obtained according to each of the two-dimensional vectors, including:
[0015] A core distance corresponding to each of the to-be-identified texts is determined according to each of the two-dimensional vectors, the core distance being a minimum neighborhood radius that makes the to-be-identified text a core point;
[0016] The mutual reach distance between each of the to-be-identified texts is determined according to each of the core distances.
[0017] Optionally, the noise text is determined from the set of to-be-identified texts according to each of the mutual reach distances, including:
[0018] A minimum mutual reach distance corresponding to each of the to-be-identified texts is determined;
[0019] The to-be-identified text that satisfies a preset distance condition on the minimum mutual reach distance is determined as the noise text.
[0020] Optionally, the preset distance condition is determined according to a total number of the to-be-identified texts and a noise text proportion.
[0021] Optionally, the noise text is determined from the set of to-be-identified texts according to each of the mutual reach distances, including:
[0022] A minimum spanning tree corresponding to the set of to-be-identified texts is determined according to each of the mutual reach distances;
[0023] A target edge in the minimum spanning tree is determined in an iterative manner, and the target edge is pruned until a number of the two-dimensional vectors in the minimum spanning tree satisfies a preset number condition, the target edge being an edge with the largest weight;
[0024] The to-be-identified text corresponding to the two-dimensional vector that is pruned is determined as the noise text.
[0025] Optionally, the preset number condition is determined according to a total number of the to-be-identified texts and a noise text proportion.
[0026] In a second aspect, an embodiment of the present application provides a noise data identification device, the device including:
[0027] A vector obtaining unit is configured to obtain semantic vectors of each to-be-identified text in a set of to-be-identified texts, each of the to-be-identified texts corresponding to a same business scenario;
[0028] a distance obtaining unit, configured to obtain mutual distances between the to-be-recognized texts according to the semantic vectors of the to-be-recognized texts;
[0029] a text determining unit, configured to determine noise texts from the set of to-be-recognized texts according to the mutual distances.
[0030] In a third aspect, an electronic device is provided, including a memory and a processor, the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method in any one of the first aspect.
[0031] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method in any one of the first aspect.
[0032] In a fifth aspect, a computer program product is provided, the computer program product includes computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the method in any one of the first aspect.
[0033] The embodiments of the present application obtain semantic vectors of multiple to-be-recognized texts corresponding to the same service scenario, obtain mutual distances between the to-be-recognized texts according to the semantic vectors of the to-be-recognized texts, and then determine noise texts in the multiple to-be-recognized texts according to the mutual distances between the to-be-recognized texts. The embodiments of the present application increase the difference between normal texts and noise texts through the mutual distances, and thus can accurately identify noise texts from a large number of normal texts. BRIEF DESCRIPTION OF DRAWINGS
[0034] The above and other objects, features and advantages of the present application will become more apparent from the following description of embodiments of the present application taken in conjunction with the accompanying drawings, in which:
[0035] Figure 1 is a flowchart of a noise data identification method according to an embodiment of the present application;
[0036] Figure 2 is a position diagram of a semantic vector in a semantic space according to an embodiment of the present application;
[0037] Figure 3 is a diagram of a minimum spanning tree according to an embodiment of the present application;
[0038] Figure 4 is a diagram of a noise data identification device according to an embodiment of the present application;
[0039] Figure 5 is a diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0040] The present application is described in detail below based on examples, but the present application is not limited only to these examples. In the following detailed description of the present application, some specific details are described in detail. The present application can also be fully understood without the description of these details by those skilled in the art. In order to avoid confusion of the essence of the present application, well-known methods, processes, procedures, elements and circuits are not described in detail.
[0041] In addition, those of ordinary skill in the art will understand that the drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0042] Unless the context clearly requires otherwise, throughout the description, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is to say, in the sense of "including, but not limited to".
[0043] In the description of the present application, it should be understood that the terms "first", "second", and the like are only for the purpose of description and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise stated, the meaning of "multiple" is two or more.
[0044] The solutions described in the specification and examples, if related to personal information processing, will be processed on the premise of having a legal basis (for example, obtaining the consent of the subject of personal information, or being necessary for the performance of a contract, etc.), and will only be processed within the prescribed or agreed range. Users refuse to process personal information other than the necessary information required for basic functions, which will not affect the user's use of basic functions.
[0045] The goal of intent recognition is to classify the text input by the user into a natural language model into one of the preset intent categories, for example, in an e-commerce system, the text input by the user is "how long will it be shipped", the intent of the text can be recognized by the natural language model as "prompt delivery"; in a network car-hailing system, the text input by the user is "I want to go to location A", the intent of the text can be recognized by the natural language model as "book a network car-hailing". But different users may have different ways of expressing the same intent, and the same user may have the same way of expressing different intents in different business scenarios, and such differences may be difficult for the natural language model to accurately identify. Therefore, in order to more accurately identify the intent, the natural language processing model is usually fine-tuned or trained by manually marking the intent of the sample. But the manually marked way may cause the intent of the sample to be marked incorrectly, that is, the marked intent of the sample does not match the actual intent, and the number of training samples is usually large, so it is difficult to determine the noise text from a large number of training samples by manual means.
[0046] To solve the above problems, the prior art mainly uses K-means to identify noise text. However, K-means is only suitable for noise data identification of data in cluster clusters in a group distribution. However, the difference in expression of the same intent by users in a specific business scenario often leads to a distribution of semantic vectors of text in a semantic space that does not conform to a group distribution form, that is, semantic vectors of text corresponding to the same intent cannot be classified into the same cluster. Therefore, the semantic center of the cluster obtained based on K-means often differs greatly from the real semantic center. For example, the text expressing the intent that the driver has dangerous driving behavior can be "the driver is not focused on driving", "the driver is brushing his mobile phone while driving", "the driver is driving while tired", etc. The difference in expression of the above text often leads to a large difference between semantic vectors. Therefore, when the semantic vectors of the above multiple texts are clustered based on K-means, multiple cluster clusters are formed in the semantic space, and the semantic center of each cluster cluster in the multiple cluster clusters is different from the real semantic center of the intent that the driver has dangerous driving behavior. At the same time, the difference in expression of users can lead to a large difference between the distance of multiple different semantic vectors corresponding to the same intent and the semantic center. Therefore, the accuracy of identifying noise text using K-means is not high, and the effect of improving the intent recognition ability of the natural language processing model is limited.
[0047] Figure 1 is a flowchart of the noise data identification method of an embodiment of the present application. As shown in Figure 1 the method of the present embodiment includes the following steps:
[0048] In step S100, the semantic vector of each to-be-identified text in the to-be-identified text set is obtained.
[0049] In the step, the server can randomly obtain multiple to-be-identified texts from the database as the to-be-identified text set. In the present embodiment, the intent corresponding to each to-be-identified text is pre-marked by artificial. Therefore, in order to improve the accuracy of the natural language processing model in identifying the intent in a specific business scenario, the server can determine at least one intent in a specific business scenario as a target intent, and obtain multiple to-be-identified texts corresponding to the target intent as the to-be-identified text set.
[0050] For example, the server can determine that the target intent in the online car-hailing business scenario is "the driver has dangerous driving behavior" and "the waiting time is long", and obtain multiple to-be-identified texts corresponding to "the driver has dangerous driving behavior" and multiple to-be-identified texts corresponding to "the waiting time is long" as the to-be-identified text set.
[0051] In an optional implementation, the server can obtain the semantic vectors of the to-be-recognized texts based on a pre-trained natural language processing model. Optionally, to improve the representation capability of the semantic vectors for the to-be-recognized texts and thus improve the accuracy of the noise text recognition, the server can fine-tune the natural language processing model based on training samples of at least one intent in the same business scenario as the to-be-recognized texts, and then input the to-be-recognized texts into the fine-tuned natural language processing model to obtain the semantic vectors of the to-be-recognized texts. According to actual needs, the natural language processing model can be various existing models, such as RoBERT-WWM-EXT-LARGE (a type of BERT model), a Word Embedding model, and the like, which are not limited in the present embodiment.
[0052] In the process of fine-tuning the pre-trained natural language model, the server can input the to-be-recognized texts into the natural language model and train the natural language model with the intent labels corresponding to the to-be-recognized texts as the training target until a predetermined condition is met. According to actual needs, the predetermined condition can be set as that the loss function of the natural language model converges, the recognition accuracy of the natural language model for the target intent is higher than a preset threshold, and the like, which are not limited in the present embodiment.
[0053] In step S200, the mutual reachable distance between the to-be-recognized texts is obtained according to the semantic vectors.
[0054] In the present step, the server can obtain the mutual reachable distance between any two to-be-recognized texts according to the semantic vectors of the two to-be-recognized texts, so as to determine the mutual reachable distance between the to-be-recognized texts. The mutual reachable distance is also referred to as mutual reachable distance, which is also used to represent the distance between the to-be-recognized samples. However, unlike the Euclidean distance, the distance between to-be-recognized texts in a dense area is not affected, while the distance between to-be-recognized texts in a sparse area and to-be-recognized texts in a dense area is increased, so that the mutual reachable distance can better represent the difference between the to-be-recognized texts and thus improve the accuracy of the noise text recognition.
[0055] In an optional implementation, to save computing resources and improve the recognition efficiency of the noise texts, the server can perform dimension reduction processing on the semantic vectors to obtain two-dimensional vectors of the to-be-recognized texts, and then obtain the mutual reachable distance between the to-be-recognized texts according to the two-dimensional vectors of the to-be-recognized texts.
[0056] Specifically, the server can determine the core distance of each text to be identified based on its two-dimensional vector, and then determine the inter-text distances based on these core distances. The core distance of a text to be identified is the smallest neighborhood radius within which the text becomes a core point (i.e., a semantic center), and can be calculated using the following formula:
[0057]
[0058] Where ε represents the neighborhood radius parameter, and MinPts represents the minimum threshold for the number of texts to be identified in the ε-neighborhood. N represents the set of texts to be recognized. ε The i-th neighboring text to be identified in (x), |N ε (x)| represents the set of texts to be identified N. ε (x) represents the number of texts to be recognized. If |N ε (x)|<MinPts, indicating that the text x to be identified is not a core point, and therefore there is no core distance; if |N ε (x)|≥MinPts, which can be used to calculate the difference between the text to be recognized x and the text to be recognized. European distance The core distance is used as the distance to be identified for the text x.
[0059] After determining the core distance of each text to be identified, the server can determine the cross-distance d between text a and text b to be identified in the following way. mreach-k (a,b):
[0060] d mreach-k (a,b)=max{cd k (a),cd k (b),d(a,b)};
[0061] Among them, cd k (a) represents the core distance between the text to be identified, a, and the k-th nearest neighbor text to be identified, cd k (b) represents the core distance between the text to be identified b and the k-th nearest neighbor text to be identified, and d(a,b) represents the Euclidean distance between the text to be identified a and the text to be identified b. max{cd k (a),cd k (b),d(a,b)} represents cd k (a) cd k The maximum value among (b) and d(a,b).
[0062] Figure 2is a schematic diagram of positions of semantic vectors of embodiments of the present application in a semantic space, in which the number of texts to be identified is merely illustrative. As shown in Figure 2 each blue dot and red dot represents a position of a text to be identified in the semantic space, in which the core distance of dot 21 is cd(21), the core distance of dot 22 is cd(22), the Euclidean distance between dot 21 and dot 22 is d(21, 22), and cd(22) > d(21, 22) > cd(21). Therefore, the mutual distance between dot 21 and dot 22 is max{cd(21), cd(22), d(21, 22)}, that is, cd(22).
[0063] In step S300, the server determines noise texts from the set of texts to be identified according to the mutual distances.
[0064] After determining the texts to be identified, the server can determine noise texts in the texts to be identified according to the mutual distances of the texts to be identified, so that the intents of the noise texts can be relabeled, further improving the intent recognition capability of the natural language processing model.
[0065] In an optional implementation, the server can determine the minimum mutual distance corresponding to each text to be identified, in which the minimum mutual distance corresponding to a text to be identified is the mutual distance between the text to be identified and the nearest text to be identified, and determine the text to be identified whose minimum mutual distance satisfies a preset distance condition as a noise text. Therefore, for any text to be identified, if the minimum mutual distance of the text to be identified satisfies the preset distance condition, it indicates that the difference between the text to be identified and the nearest text to be identified is large, and the difference between the text to be identified and other texts to be identified is greater than the difference between the text to be identified and the nearest text to be identified. Therefore, the server can determine the text to be identified as a noise text.
[0066] For example, the mutual distance between text to be identified 1 and text to be identified 2 is 10, the mutual distance between text to be identified 1 and text to be identified 3 is 11.2, the mutual distance between text to be identified 1 and text to be identified 4 is 9.1, the mutual distance between text to be identified 1 and text to be identified 5 is 9.7, the mutual distance between text to be identified 1 and text to be identified 6 is 6.8, the mutual distance between text to be identified 1 and text to be identified 7 is 23.1, the mutual distance between text to be identified 1 and text to be identified 8 is 21.9, the mutual distance between text to be identified 1 and text to be identified 9 is 19.3, and the mutual distance between text to be identified 1 and text to be identified 10 is 28.6. The server can determine that the minimum mutual distance corresponding to text to be identified 1 is the mutual distance between text to be identified 1 and text to be identified 6, that is, 6.8.
[0067] In this embodiment, in order to enhance the accuracy of noise text recognition, the preset distance condition can be determined according to the total number of to-be-recognized texts in the to-be-recognized text set and the noise text proportion. The noise text proportion can be determined according to the accuracy of intent recognition of the training sample by the natural language processing model. For example, if the accuracy of intent recognition of the training sample by the natural language processing model is 97%, the noise text proportion can be determined as 3%.
[0068] In order to identify as much noise text as possible from the to-be-recognized text set, the preset distance condition can be set as the minimum mutual distance ranking in the top n, where n = [N*2p], where N represents the total number of to-be-recognized texts, p represents the noise text proportion, and [N*2p] represents the maximum integer part of (N*2p).
[0069] According to actual needs, the preset distance condition can also be set as other conditions, such as the minimum mutual distance being greater than a preset threshold, or the minimum mutual distance ranking being in the top n, where n = [N*1.5p], etc., which is not limited in this embodiment.
[0070] In another optional implementation, the server can generate a minimum spanning tree (MST) according to the mutual distances between the to-be-recognized texts. The minimum spanning tree is also a minimal connected graph, and the sum of the weights of the edges between the nodes (i.e., the to-be-recognized texts) in the minimum spanning tree is the minimum value of the sum of the mutual distances between the nodes. Specifically, the server can generate the minimum spanning tree corresponding to the to-be-recognized text set according to a preset MST generation algorithm, such as the Prim algorithm, the Kruskal algorithm, etc.
[0071] After generating the minimum spanning tree, the server can determine the edge with the maximum weight in the minimum spanning tree in an iterative manner, that is, the target edge, and then prune the edge with the maximum weight, until the number of two-dimensional vectors in the minimum spanning tree satisfies a preset number condition. Then, the server can determine the to-be-recognized text corresponding to the pruned two-dimensional vector as a noise text.
[0072] Similar to the above optional implementation, in order to enhance the accuracy of noise text recognition, the preset number condition can be determined according to the total number of to-be-recognized texts in the to-be-recognized text set and the noise text proportion, and the preset number condition can be set as the number of remaining two-dimensional vectors in the minimum spanning tree reaching a preset number m, where m = [N*(1-2p)].
[0073] According to actual needs, the preset quantity condition can also be set as other conditions, for example, the number of the pruned two-dimensional vectors reaches a preset quantity q, where q=[N*2p], or the number of the remaining two-dimensional vectors in the minimum spanning tree reaches a preset quantity m, where m=[N*(1-1.2p)], or the like, and the embodiments are not limited.
[0074] Figure 3 is a schematic diagram of the minimum spanning tree of the embodiments of the present application, where the number of the texts to be identified is only illustrative. Taking the number of the pruned two-dimensional vectors reaching 4 as an example in the preset quantity condition, as shown in Figure 3 the minimum spanning tree 30 is composed of the two-dimensional vectors corresponding to the texts to be identified and the edges corresponding to the texts to be identified. The server can determine that the edge with the largest weight in the minimum spanning tree 30 is the edge 31 in the first iteration period, and prune the edge 31, determine that the edge with the largest weight in the minimum spanning tree 30 is the edge 32 in the second iteration period, and prune the edge 32, determine that the edge with the largest weight in the minimum spanning tree 30 is the edge 33 in the third iteration period, and prune the edge 33, and determine that the edge with the largest weight in the minimum spanning tree 30 is the edge 34 in the fourth iteration period, and prune the edge 34. After the edges 31, 32, 33 and 34 are pruned, the server can determine that the pruned two-dimensional vectors are the vectors v31, v32, v33 and v34, and the number of the pruned two-dimensional vectors satisfies the preset quantity condition, and thus the text to be identified corresponding to the vector v31, the text to be identified corresponding to the vector v32, the text to be identified corresponding to the vector v33 and the text to be identified corresponding to the vector v34 can all be determined as noise texts.
[0075] In order to achieve the above process, the sample number of the minimum clustering cluster can be set as [N*(1-2p)], that is, the maximum number of the two-dimensional vectors that can be accommodated in the clustering cluster is [N*(1-2p)], which makes the number of the finally formed clustering clusters be 1, and the clustering result indicates that the texts to be identified corresponding to the two-dimensional vectors classified into the clustering cluster are all correctly marked texts, and thus the texts to be identified corresponding to the two-dimensional vectors that cannot be classified into the clustering cluster are all determined as noise texts.
[0076] The embodiments of the present application obtain the semantic vectors of a plurality of texts to be identified corresponding to the same service scenario, and obtain the mutual distance between the texts to be identified according to the semantic vectors of the texts to be identified, and further determine the noise texts in the plurality of texts to be identified according to the mutual distance between the texts to be identified. The embodiments of the present application increase the difference between the normal texts and the noise texts through the mutual distance, and thus the method of the embodiments can quickly and accurately identify the noise texts from a large number of normal texts.
[0077] Figure 4is a schematic diagram of a noise data identification device according to an embodiment of the present application. As shown in Figure 4 The device according to the embodiment includes a vector obtaining unit 401, a distance obtaining unit 402, and a text determining unit 403.
[0078] The vector obtaining unit 401 is configured to obtain semantic vectors of each of the to-be-identified texts in the to-be-identified text set, each of the to-be-identified texts corresponding to the same business scenario; the distance obtaining unit 402 is configured to obtain mutual distances between each of the to-be-identified texts according to each of the semantic vectors; and the text determining unit 403 is configured to determine a noise text from the to-be-identified text set according to each of the mutual distances.
[0079] Further, the vector obtaining unit 401 includes a vector obtaining subunit.
[0080] The vector obtaining subunit is configured to obtain the semantic vector of each of the to-be-identified texts based on a pre-trained natural language processing model, the natural language processing model being fine-tuned based on a training sample set, each of the training samples in the training sample set corresponding to the same business scenario as the to-be-identified texts.
[0081] Further, the distance obtaining unit 402 includes a dimension reduction subunit and a distance obtaining subunit.
[0082] The dimension reduction subunit is configured to reduce the dimension of each of the semantic vectors to obtain a two-dimensional vector of each of the to-be-identified texts; and the distance obtaining subunit is configured to obtain the mutual distance between each of the to-be-identified texts according to each of the two-dimensional vectors.
[0083] Further, the distance obtaining subunit includes a first distance determining module and a second distance determining module.
[0084] The first distance determining module is configured to determine a core distance corresponding to each of the to-be-identified texts according to each of the two-dimensional vectors, the core distance being a minimum neighborhood radius that makes the to-be-identified text a core point; and the second distance determining module is configured to determine the mutual distance between each of the to-be-identified texts according to each of the core distances.
[0085] Further, the text determining unit 403 includes a distance determining subunit and a first text determining subunit.
[0086] The distance determining subunit is configured to determine a minimum mutual distance corresponding to each of the to-be-identified texts; and the first text determining subunit is configured to determine the to-be-identified text that satisfies a preset distance condition as the noise text.
[0087] Further, the preset distance condition is determined according to a total number of the to-be-identified texts and a noise text proportion.
[0088] Further, the text determining unit 403 comprises a generating subunit, a pruning subunit and a second text determining subunit.
[0089] The generating subunit is configured to determine a minimum spanning tree corresponding to the set of to-be-recognized texts according to the mutual distances; the pruning subunit is configured to determine a target edge in the minimum spanning tree in an iterative manner, and prune the target edge until the number of the two-dimensional vectors in the minimum spanning tree meets a preset number condition, the target edge being an edge with the largest weight; and the second text determining subunit is configured to determine the to-be-recognized text corresponding to the pruned two-dimensional vector as the noise text.
[0090] Further, the preset number condition is determined according to the total number of the to-be-recognized texts and a noise text proportion.
[0091] The embodiment of the present application obtains semantic vectors corresponding to a plurality of to-be-recognized texts of the same service scenario, and obtains mutual distances between the to-be-recognized texts according to the semantic vectors of the to-be-recognized texts, and further determines noise texts in the plurality of to-be-recognized texts according to the mutual distances between the to-be-recognized texts. The embodiment of the present application increases the difference between normal texts and noise texts through mutual distances, so that the noise texts can be quickly and accurately identified from a large number of normal texts through the embodiment.
[0092] Figure 5 is a schematic diagram of an electronic device of the embodiment of the present application. As shown in Figure 5 The electronic device 5 is a general-purpose data processing device, which includes a general-purpose computer hardware structure, and at least includes a processor 501 and a memory 502. The processor 501 and the memory 502 are connected through a bus 503. The memory 502 is adapted to store instructions or programs executable by the processor 501. The processor 501 can be a stand-alone microprocessor, or can be a set of one or more microprocessors. Thus, the processor 501 performs the processing of data and the control of other devices by executing the instructions stored in the memory 502, thereby implementing the method flow of the embodiment of the present application as described above. The bus 503 connects the above-mentioned components together, and connects the above-mentioned components to a display controller 504 and a display device, and to an input / output (I / O) device 505. The input / output (I / O) device 505 can be a mouse, a keyboard, a modem, a network interface, a touch input device, a body sense input device, a printer, and other devices known in the art. Typically, the input / output device 505 is connected to the system through an input / output (I / O) controller 506.
[0093] Those skilled in the art will understand that embodiments of the present application can be provided as methods, apparatus (devices) or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product embodied on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage media, etc.) having computer usable program code embodied thereon.
[0094] The present application is described with reference to flowcharts according to the methods, apparatus (devices) and computer program products of embodiments of the present application. It should be understood that each flow of the flowcharts can be implemented by computer program instructions.
[0095] These computer program instructions can be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a specific manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions apparatus that implement the function specified in the flowchart Figure 1 of one or more flows.
[0096] These computer program instructions can also be provided to a processor of a general purpose computer, a special purpose computer, an embedded processing machine or other programmable data processing apparatus to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing apparatus produce an apparatus that implements the function specified in the flowchart Figure 1 of one or more flows.
[0097] Another embodiment of the present application relates to a non-volatile storage medium for storing a computer readable program for a computer to execute the above-mentioned partial or all method embodiments.
[0098] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned method embodiments can be completed by a program stored in a storage medium, including a number of instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the method described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0099] The above merely illustrates the preferred embodiments of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for identifying noise data, characterized in that, The method includes: Obtain the semantic vector of each text to be identified in the set of texts to be identified, where each text to be identified corresponds to the same business scenario; The cross-distance between the texts to be identified is obtained based on the semantic vectors of each text. Noisy text is determined from the set of texts to be identified based on the aforementioned inter-communication distances.
2. The method according to claim 1, characterized in that, The process of obtaining the semantic vector of each text to be identified in the set of texts to be identified includes: The semantic vectors of each text to be identified are obtained based on a pre-trained natural language processing model. The natural language processing model is fine-tuned based on a training sample set, and each training sample in the training sample set corresponds to the same business scenario as the text to be identified.
3. The method according to claim 1, characterized in that, The step of obtaining the cross-distance between the texts to be identified based on the semantic vectors includes: The semantic vectors are reduced in dimensionality to obtain two-dimensional vectors of the text to be identified. The intercommunication distance between the texts to be identified is obtained based on the two-dimensional vectors.
4. The method according to claim 3, characterized in that, The step of obtaining the cross distance between the texts to be identified based on the two-dimensional vectors includes: The core distance corresponding to each of the two-dimensional vectors is determined, and the core distance is the minimum neighborhood radius that makes the text to be identified a core point. The intercommunication distance between the texts to be identified is determined based on the core distances.
5. The method according to claim 1, characterized in that, The step of determining noisy text from the set of texts to be identified based on the respective inter-distances includes: Determine the minimum reach distance for each of the texts to be identified; The text to be identified that meets the preset distance condition for minimum reachability is determined as the noise text.
6. The method according to claim 5, characterized in that, The preset distance condition is determined based on the total number of texts to be identified and the proportion of noisy text.
7. The method according to claim 3, characterized in that, The step of determining noisy text from the set of texts to be identified based on the respective inter-distances includes: The minimum spanning tree corresponding to the set of texts to be identified is determined based on the mutual reach distances described above. The target edge in the minimum spanning tree is determined iteratively and the target edge is pruned until the number of the two-dimensional vectors in the minimum spanning tree meets a preset quantity condition, and the target edge is the edge with the largest weight; The text to be identified corresponding to the two-dimensional vector that has been pruned is determined as the noise text.
8. The method according to claim 7, characterized in that, The preset quantity condition is determined based on the total number of texts to be identified and the proportion of noisy text.
9. A noise data identification device, characterized in that, The device includes: The vector acquisition unit is used to acquire the semantic vector of each text to be identified in the set of texts to be identified, and each text to be identified corresponds to the same business scenario; A distance acquisition unit is used to acquire the cross-distance between the texts to be identified based on the semantic vectors. A text determination unit is used to determine noisy text from the set of texts to be identified based on the respective intercommunication distances.
10. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.
12. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-8.