Method, device, medium and equipment for business data screening based on language model

By using language models in general fields and predetermined business fields to perform probability predictions on the data to be filtered, the problem in the existing technology that it is difficult to quickly and accurately obtain data samples in specific business fields is solved, and efficient data screening and language model training are achieved.

CN111767712BActive Publication Date: 2025-01-24BEIJING HORIZON ROBOTICS TECH RES & DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910262775.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-02
Publication Date
2025-01-24
Estimated Expiration
2039-04-02

AI Technical Summary

Technical Problem

In language model training, it is difficult for the prior art to quickly and accurately obtain data samples belonging to a specific business field, resulting in inefficient training and manual screening requires high cost and time.

Method used

By using the first language model in the general field and the second language model in the scheduled business field, the probability prediction of screening data is performed, and the probability value of the first and second groups will be generated. Calculate the scoring value based on these probability values, determine whether the data belongs to whether the data belongs to Book the business field.

Benefits of technology

This method can easily filter out data belonging to predetermined business fields from data in general fields, reducing the cost and time of business data screening and improving the training efficiency of language models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111767712B_ABST
    Figure CN111767712B_ABST
Patent Text Reader

Abstract

The disclosed embodiment discloses a method and device for filtering business data based on a language model, the method comprising: inputting the data to be filtered belonging to a general field into a first language model corresponding to the general field, obtaining a first group of occurrence probability values ​​of at least one word in the data to be filtered; inputting the data to be filtered belonging to the general field into a second language model corresponding to a predetermined business field, obtaining a second group of occurrence probability values ​​of at least one word in the data to be filtered; determining a first score value of the data to be filtered according to the first group of occurrence probability values; determining a second score value of the data to be filtered according to the second group of occurrence probability values; determining whether the data to be filtered is business data belonging to the predetermined business field according to the first score value and the second score value. The disclosed embodiment is conducive to reducing the cost of filtering business data, and is conducive to improving the efficiency of filtering business data, and thus is conducive to improving the training efficiency of the language model corresponding to the predetermined business field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to language model technology, and in particular to a method and device for filtering business data based on a language model, a storage medium, and an electronic device. Background Art

[0002] In various applications such as speech recognition and machine translation, it is often necessary to use language models to predict the probability of the next word given a historical word.

[0003] When a language model is applied to a specific business field, a large number of data samples from the specific business field are often required to train the language model so that the successfully trained language model can be well applied to the specific business field. Quickly and accurately obtaining data samples belonging to a specific business field is conducive to improving the training efficiency of the language model.

[0004] The traditional method of obtaining data samples based on data crawling often contains a large number of data samples that do not belong to a specific business field. If the data samples are manually screened, it often takes a lot of manpower and time costs. Summary of the invention

[0005] In order to solve the above technical problems, the present disclosure is proposed. The embodiments of the present disclosure provide a method and device for filtering business data based on a language model, a storage medium, and an electronic device.

[0006] According to one aspect of an embodiment of the present disclosure, a method for screening business data based on a language model is provided, comprising: inputting data to be screened belonging to a general field into a first language model corresponding to the general field, and obtaining a first group of occurrence probability values ​​of at least one word in the data to be screened; inputting the data to be screened belonging to the general field into a second language model corresponding to a predetermined business field, and obtaining a second group of occurrence probability values ​​of at least one word in the data to be screened; determining a first score value of the data to be screened according to the first group of occurrence probability values; determining a second score value of the data to be screened according to the second group of occurrence probability values; and determining whether the data to be screened is business data belonging to the predetermined business field according to the first score value and the second score value.

[0007] According to another aspect of an embodiment of the present disclosure, a language model-based business data screening device is provided, comprising: a first acquisition module, used to input the data to be screened belonging to a general field into a first language model corresponding to the general field, and obtain a first group of occurrence probability values ​​of at least one word in the data to be screened; a second acquisition module, used to input the data to be screened belonging to the general field into a second language model corresponding to a predetermined business field, and obtain a second group of occurrence probability values ​​of at least one word in the data to be screened; a first scoring module, used to determine a first scoring value of the data to be screened according to the first group of occurrence probability values; a second scoring module, used to determine a second scoring value of the data to be screened according to the second group of occurrence probability values; and a screening module, used to determine whether the data to be screened is business data belonging to the predetermined business field according to the first scoring value and the second scoring value.

[0008] Based on the above embodiment of the present disclosure, a method and device for screening business data based on a language model is provided. By using the first language model corresponding to the general field and the second language model corresponding to the predetermined business field to respectively perform probability prediction on the data to be screened belonging to the general field, the first language model and the second language model can be obtained. The probability prediction is performed for at least one word in the data to be screened, and the first group of occurrence probability values ​​and the second group of occurrence probability values ​​are obtained. Since different language models correspond to different fields, the first group of occurrence probability values ​​and the second group of occurrence probability values ​​predicted by different language models can, to a certain extent, represent the occurrence of the corresponding words in different fields. Thus, the first score value and the second score value formed by the present disclosure based on the first group of occurrence probability values ​​and the second group of occurrence probability values ​​can, to a certain extent, represent the occurrence of the data to be screened in different fields. Then, according to the first score value and the second score value, the present disclosure can conveniently screen out the business data belonging to the predetermined business field from the data belonging to the general field. It can be seen from this that the technical solution provided by the present disclosure is conducive to reducing the screening cost of business data, and is conducive to improving the screening efficiency of business data, and is conducive to improving the training efficiency of the language model corresponding to the predetermined business field.

[0009] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] By describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present disclosure will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.

[0011] Figure 1 is a schematic diagram of a scenario to which the present disclosure is applicable;

[0012] Figure 2 A flowchart of an embodiment of a method for filtering business data based on a language model disclosed herein;

[0013] Figure 3 A flowchart of another embodiment of the method for filtering business data based on a language model disclosed in the present invention;

[0014] Figure 4 This is a flowchart of another embodiment of the method for filtering business data based on a language model disclosed herein;

[0015] Figure 5 A flowchart of another embodiment of the method for filtering business data based on a language model disclosed herein;

[0016] Figure 6 This is a structural diagram of an embodiment of a language model-based business data screening device disclosed in the present invention;

[0017] Figure 7 It is a structural diagram of another embodiment of the business data screening device based on the language model disclosed in the present invention;

[0018] Figure 8 It is a structural diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0019] Below, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0020] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

[0021] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0022] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.

[0023] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0024] In addition, the term "and / or" in this disclosure is only a description of the association relationship of associated objects, indicating that there may be three relationships, such as A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this disclosure generally indicates that the associated objects before and after are in an "or" relationship.

[0025] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0026] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0027] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0028] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0029] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0030] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems or servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0031] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, target programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment. In a distributed cloud computing environment, tasks can be performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0032] SUMMARY OF THE DISCLOSURE

[0033] In the process of implementing the present disclosure, the inventors found that when training a language model belonging to a specific business field, a large number of data samples belonging to the specific business field are often required, while the existing data samples are often data samples belonging to a general field.

[0034] If data samples in a specific business field are obtained from data samples in a general field by manual screening, there are at least the following problems: a lot of manpower and time costs are consumed, thereby failing to improve the training efficiency of the language model.

[0035] Exemplary Overview

[0036] The present disclosure can filter out data samples belonging to a predetermined business field from a first data sample set belonging to a general field, thereby forming a second data sample set belonging to the predetermined business field. Figure 1 As shown, the first data sample set includes: n data samples, namely data sample 1, data sample 2, ..., and data sample n. Where n is an integer greater than 1. After the n data samples are screened by the technical solution provided by the present disclosure, m screened data samples can be obtained, and these m data samples can be added to the second data sample set. Where m is an integer greater than or equal to 0 and less than or equal to n.

[0037] Exemplary Methods

[0038] Figure 2 FIG. 1 is a flow chart of an embodiment of a method for filtering business data based on a language model disclosed in the present invention. Figure 2 As shown, the method of this embodiment includes steps: S200, S201, S202, S203 and S204. Each step is described in detail below.

[0039] S200, input the data to be screened belonging to the general field into the first language model corresponding to the general field, and obtain a first group of occurrence probability values ​​of at least one word in the data to be screened. Go to step S202.

[0040] In an optional example, the general area in the present disclosure may be considered as: not specifically for a specific business, but a field with general business characteristics. That is, the general area in the present disclosure may cover a variety of predetermined business fields.

[0041] In an optional example, the first language model in the present disclosure can be considered as: a language model based on a general domain, that is, the first language model is a language model applicable to a general domain. The first language model in the present disclosure is used to predict the probability of at least one word in each input data to be screened appearing after the corresponding historical word when it is used as a target word, so that the occurrence probability of each word in the data to be screened can be obtained. The present disclosure uses the first language model to predict the occurrence probability of one or more words to form a first group of occurrence probability values. A piece of data to be screened usually includes multiple words, and the first group of occurrence probability values ​​usually includes: the occurrence probability of each word in the data to be screened when it is used as a target word.

[0042] S201, input the data to be screened belonging to the general field into the second language model corresponding to the predetermined business field, and obtain a second set of occurrence probability values ​​of at least one word in the data to be screened. Go to step S203.

[0043] In an optional example, the predetermined business field in the present disclosure corresponds to a specific business. The predetermined business field is usually a part of the general field. That is, the predetermined business field is completely covered by the general field. The predetermined business field includes, but is not limited to: knowledge question and answer field, specific product pre-sales / after-sales service field or medical field, etc.

[0044] In an optional example, the second language model in the present disclosure can be considered as: a language model based on a predetermined business field, that is, the second language model is a language model specifically suitable for the predetermined business field. The second language model in the present disclosure is used to predict the probability of at least one word in each input data to be screened appearing after the corresponding historical word when it is used as a target word, so that the occurrence probability of each word in the data to be screened can be obtained. The present disclosure uses the second language model to predict the occurrence probability of one or more words to form a second set of occurrence probability values. A piece of data to be screened usually includes multiple words, and the second set of occurrence probability values ​​usually includes the occurrence probability of each word in the data to be screened when it is used as a target word.

[0045] S202: Determine the first score value of the data to be screened according to the first group of occurrence probability values. Go to step S204.

[0046] In an optional example, the present disclosure may calculate at least one occurrence probability in the first group of occurrence probability values, and obtain a first scoring value of the data to be screened according to the calculation result. In the case where the first group of occurrence probability values ​​includes: the occurrence probability corresponding to each word in the data to be screened, the present disclosure will usually calculate all the occurrence probabilities included in the first group of occurrence probability values, and obtain a first scoring value of the data to be screened according to the calculation result.

[0047] S203: Determine the second scoring value of the data to be screened according to the second group of occurrence probability values. Go to step S204.

[0048] In an optional example, the present disclosure may calculate at least one occurrence probability in the second group of occurrence probability values, and obtain a second scoring value of the data to be screened according to the calculation result. In the case where the second group of occurrence probability values ​​includes: the occurrence probability corresponding to each word in the data to be screened, the present disclosure will usually calculate all occurrence probabilities included in the second group of occurrence probability values, and obtain a second scoring value of the data to be screened according to the calculation result.

[0049] S204: Determine whether the data to be screened is business data belonging to a predetermined business field according to the first scoring value and the second scoring value of the data to be screened.

[0050] The present disclosure uses the first language model corresponding to the general field and the second language model corresponding to the predetermined business field to respectively predict the probability of the data to be screened belonging to the general field, and can respectively obtain the first group of occurrence probability values ​​and the second group of occurrence probability values ​​predicted by the first language model and the second language model for at least one word in the data to be screened. Since the fields corresponding to the first language model and the second language model are different, the first group of occurrence probability values ​​and the second group of occurrence probability values ​​predicted by different language models can represent the occurrence of the corresponding words in different fields to a certain extent, so that the first score value and the second score value formed by the present disclosure based on the first group of occurrence probability values ​​and the second group of occurrence probability values ​​can represent the occurrence of the data to be screened in different fields to a certain extent, and then the present disclosure can conveniently screen out the business data belonging to the predetermined business field from the data belonging to the general field according to the first score value and the second score value. It can be seen from this that the technical solution provided by the present disclosure is conducive to reducing the screening cost of business data, and is conducive to improving the screening efficiency of business data, and is conducive to improving the training efficiency of the language model corresponding to the predetermined business field.

[0051] In an optional example, the first language model in the present disclosure includes but is not limited to: a language model based on probability statistics (for example, N_Gram language model, etc.), RNNLM (Recurrent Neural Network Language Modeling, a language model based on recurrent neural network), or CNNLM (Convolutional Neural Networks Language Modeling, a language model based on convolutional neural network), etc.

[0052] In an optional example, the second language model in the present disclosure includes but is not limited to: a language model based on probability statistics (for example, N_Gram language model, etc.), RNNLM, or CNNLM, etc.

[0053] It should be noted that the second language model and the first language model usually adopt the same language model structure. For example, both the first language model and the second language model are language models based on probability statistics; for another example, both the first language model and the second language model are RNNLM; for another example, both the first language model and the second language model are CNNLM, etc.

[0054] In an optional example, the present disclosure can train a language model using data samples belonging to a general domain, thereby obtaining a first language model based on the general domain. By training a language model using data samples from a general domain to obtain a first language model, it is beneficial to make the occurrence probability predicted by the first language model for the data to be screened more consistent with its probability distribution in the general domain.

[0055] In an optional example, the present disclosure can train a language model using data samples belonging to a predetermined business domain, thereby obtaining a second language model based on the predetermined business domain. By training a language model using data samples from a predetermined business domain to obtain a second language model, it is beneficial to make the occurrence probability predicted by the second language model for the data to be screened more consistent with its probability distribution in the predetermined business domain.

[0056] It should be noted that, although the data samples used to train the first language model are not the same as the data samples used to train the second language model, the data samples used to train the first language model and the data samples used to train the second language model are roughly the same in terms of usage scale. In one example, the order of magnitude of the data samples used to train the first language model should be the same as the order of magnitude of the data samples used to train the second language model. In the present disclosure, the order of magnitude of the data samples may refer to: the unit of the size of the storage space occupied by all data samples; for example, M (megabytes) or KB (kilobytes), etc. Optionally, the two are not only the same in order of magnitude, but the difference in the storage space occupied by the two is preferably not more than a predetermined difference. For example, assuming that the predetermined difference is 5M, when the storage space occupied by the data samples used to train the first language model is 100M, the storage space occupied by the data samples used to train the second language model may be between 95M and 105M. In another example, the number of all words contained in all data samples used to train the first language model should be roughly the same as the number of all words contained in all data samples used to train the second language model. Optionally, the difference between the number of all words included in all data samples used to train the first language model and the number of all words included in all data samples used to train the second language model is not greater than a predetermined number. For example, assuming that the predetermined number is 100 words, when the number of all words included in all data samples used to train the first language model is 10,000 words, the number of all words included in all data samples used to train the second language model may be between 9,900 and 10,100 words.

[0057] By using data samples used to train the first language model and data samples used to train the second language model on a roughly similar scale, the probability values ​​in the first language model and the second language model can be obtained by statistically analyzing roughly the same base number, thereby avoiding a large gap between the two and improving the accuracy of data screening.

[0058] In an optional example, the present disclosure may obtain a piece of data or multiple pieces of data at one time from a data set based on a general domain, and provide each piece of data obtained as a piece of data to be screened to the first language model, so that for each piece of data to be screened, the present disclosure may obtain a first set of occurrence probability values ​​through the first language model. In addition, the data to be screened in the present disclosure may be a sample of data to be screened belonging to a general domain, for example, the present disclosure may obtain a data sample from a data sample set based on a general domain, and use the obtained data sample as the data to be screened.

[0059] In an optional example, the data to be screened provided by the present disclosure for the first language model also needs to be provided to the second language model, that is, the present disclosure provides the same input data for the first language model and the second language model. The present disclosure does not limit the order in which the data to be screened are provided to the first language model and the second language model. For example, the present disclosure can provide the data to be screened to the first language model and the second language model at the same time. For another example, the present disclosure can first provide the data to be screened to the first language model, and then provide the data to be screened to the second language model. For another example, the present disclosure can first provide the data to be screened to the second language model, and then provide the data to be screened to the first language model.

[0060] Optionally, the first group of occurrence probability values ​​obtained using the first language model generally includes: multiple occurrence probabilities. The present disclosure does not limit the number of occurrence probabilities included in the first group of occurrence probability values. An example: Assuming that a piece of to-be-screened data provided to the first language model includes: word 1, word 2, word 3, and word 4, the present disclosure performs probability prediction on the to-be-screened data using the first language model, and the obtained first group of occurrence probability values ​​may include:

[0061] When the history word is empty, the probability of word 1 appearing is a;

[0062] When the historical word is word 1, the probability of word 2 appearing is b;

[0063] When the historical words are word 1 and word 2, the probability of word 3 appearing is c;

[0064] When the historical words are word 1, word 2, and word 3, the occurrence probability of word 4 is e.

[0065] Optionally, the second set of occurrence probability values ​​obtained using the second language model generally includes: multiple occurrence probabilities. The present disclosure does not limit the number of occurrence probabilities included in the second set of occurrence probability values. An example: Assuming that a piece of to-be-screened data provided to the second language model includes: word 1, word 2, word 2, and word 4, the present disclosure performs probability prediction on the to-be-screened data using the second language model, and the obtained second set of occurrence probability values ​​may include:

[0066] When the history word is empty, the probability of word 1 appearing is A;

[0067] When the historical word is word 1, the probability of word 2 appearing is B;

[0068] When the historical words are word 1 and word 2, the probability of word 3 appearing is C;

[0069] When the historical words are word 1, word 2, and word 3, the occurrence probability of word 4 is E.

[0070] In an optional example, for a piece of data to be screened, the present disclosure may calculate the cross entropy of all occurrence probabilities in the first group of occurrence probability values ​​of the data to be screened, thereby obtaining the first cross entropy of the data to be screened. The present disclosure may directly use the first cross entropy of the data to be screened as the first scoring value of the data to be screened, and the present disclosure may also perform further calculations on the first cross entropy, and use the result of the further calculation as the first scoring value of the data to be screened. For example, the first cross entropy is used to calculate the perplexity, and the calculated perplexity is used as the first scoring value of the data to be screened.

[0071] In an optional example, for a piece of data to be screened, the present disclosure may calculate the cross entropy of all occurrence probabilities in the second group of occurrence probability values ​​of the data to be screened, thereby obtaining the second cross entropy of the data to be screened. The present disclosure may directly use the second cross entropy of the data to be screened as the second scoring value of the data to be screened, and the present disclosure may also perform further calculations on the second cross entropy, and use the result of the further calculation as the second scoring value of the data to be screened. For example, the second cross entropy is used to calculate the perplexity, and the calculated perplexity is used as the second scoring value of the data to be screened.

[0072] In an optional example, the present disclosure uses a pre-set evaluation criterion to measure the first score value and the second score value of the data to be screened, and can determine whether the data to be screened belongs to a predetermined business field. The present disclosure uses the data to be screened that belongs to the predetermined business field as the screened business data, and filters out the data to be screened that does not belong to the predetermined business field. The pre-set evaluation criterion can be set according to actual needs.

[0073] In an optional example, the evaluation criteria preset in the present disclosure include but are not limited to: whether the difference between the two meets the predetermined requirements and whether at least one of the scoring values ​​meets the predetermined requirements. Whether the difference between the two meets the predetermined requirements may include but are not limited to: whether the difference exceeds a preset value or whether the difference is not less than a preset value. Whether the at least one scoring value meets the predetermined requirements may include but are not limited to: whether at least one of the scoring values ​​(such as the second scoring value) does not exceed another preset value or whether at least one of the scoring values ​​is less than another preset value. In addition, the evaluation criteria preset in the present disclosure may also be adopted in other ways, for example, setting a threshold for each of the two scoring values.

[0074] Since the difference between the first score value and the second score value can, to a certain extent, indicate the differences in the data to be screened in different fields, the present disclosure is conducive to improving the accuracy of the screened business data by setting evaluation criteria for the difference.

[0075] In cases where the language model is sparse, etc., it may result in a phenomenon that although the difference between the two meets the predetermined requirements, the data to be screened does not belong to the predetermined business field. The present disclosure can avoid the occurrence of this phenomenon by setting a judgment standard for at least one of the scoring values ​​(such as the second scoring value), thereby further helping to improve the accuracy of the screened business data.

[0076] Figure 3 FIG. 1 is a flow chart of an embodiment of a method for filtering business data based on a language model disclosed in the present invention. Figure 3 As shown, the method of this embodiment includes: S300, S301, S302, S303, S304, S305, S306 and S307. Each step is described in detail below.

[0077] S300, input the to-be-screened data belonging to the general domain into the first language model corresponding to the general domain, and obtain a first set of occurrence probability values ​​of at least one word in the to-be-screened data. To S302. The description of S300 can refer to the description of S200 and its corresponding optional example in the above method embodiment, and will not be described in detail here.

[0078] S301, input the to-be-screened data belonging to the general field into the second language model corresponding to the predetermined business field, and obtain a second set of occurrence probability values ​​of at least one word in the to-be-screened data. To S303. The description of S301 can refer to the description of S201 and its corresponding optional example in the above method embodiment, and will not be described in detail here.

[0079] S302: Determine a first scoring value of the data to be screened according to the first group of occurrence probability values. Go to S304.

[0080] Optionally, the present disclosure can calculate the cross entropy using the following formula (1) based on all the occurrence probabilities included in the first group of occurrence probability values ​​(such as the occurrence probabilities of all words in the data to be screened) to obtain the first cross entropy of the data to be screened. The present disclosure can use the first cross entropy as the first scoring value of the data to be screened.

[0081]

[0082] In the above formula (1), H p (T) represents the first cross entropy of the data to be screened T; W T represents the number of words contained in the data to be screened T; p(T) represents the product of the occurrence probabilities of each word predicted by the first language model for the data to be screened T.

[0083] Optionally, the present disclosure may also calculate the perplexity according to all the occurrence probabilities included in the first group of occurrence probability values ​​using the following formula (2) to obtain a first perplexity of the data to be screened. The present disclosure may use the first perplexity as the first scoring value of the data to be screened.

[0084]

[0085] In the above formula (2), PPL(T) represents the first perplexity of the data to be screened T, H p (T) represents the first cross entropy of the data T to be screened.

[0086] S303: Determine the second scoring value of the data to be screened according to the second group of occurrence probability values. Go to S304.

[0087] Optionally, the present disclosure can calculate the cross entropy based on all the occurrence probabilities contained in the second group of occurrence probability values ​​(such as the occurrence probabilities of all words in the data to be screened) using the above formula (1) to obtain the second cross entropy of the data to be screened. The present disclosure can use the second cross entropy as the second scoring value of the data to be screened.

[0088] Optionally, the present disclosure may also calculate the perplexity using the above formula (2) according to all the occurrence probabilities included in the second group of occurrence probability values ​​to obtain a second perplexity of the data to be screened. The present disclosure may use the second perplexity as a second scoring value of the data to be screened.

[0089] S304: Calculate the difference between the first score value and the second score value. For example, calculate h1-h2, where h1 represents the first score value and h2 represents the second score value.

[0090] S305, determine whether the magnitude relationship between the difference and the first threshold value meets the first preset requirement, if so, go to step S306; if not, go to step S307.

[0091] Optionally, the first preset requirement in the present disclosure may be that the difference exceeds a first threshold. That is, the present disclosure may determine whether the difference exceeds the first threshold, and if the difference exceeds the first threshold, determine that the magnitude relationship between the difference and the first threshold satisfies the first preset requirement, and if the difference does not exceed the first threshold, determine that the magnitude relationship between the difference and the first threshold does not satisfy the first preset requirement.

[0092] Optionally, the first preset requirement in the present disclosure may also be: the difference is not less than a first threshold. That is, the present disclosure may determine whether the difference is greater than or equal to the first threshold, and when the difference is greater than or equal to the first threshold, determine that the magnitude relationship between the difference and the first threshold satisfies the first preset requirement, and when the difference is less than the first threshold, determine that the magnitude relationship between the difference and the first threshold does not satisfy the first preset requirement.

[0093] Optionally, the first threshold in the present disclosure is a preset known constant, and the first threshold can be adjusted according to actual conditions. For example, the present disclosure can adjust the size of the first threshold according to the accuracy of the currently screened business data.

[0094] S306: The data to be screened is used as screened business data belonging to a predetermined business field.

[0095] Optionally, in the case where the predetermined business field is the medical field, if the data to be screened is “side effects of drugs”, the data to be screened may be regarded as business data belonging to the predetermined business field.

[0096] S307: Filter out the data to be screened.

[0097] Optionally, in the case where the predetermined business field is the medical field, if the data to be filtered is "the weather is very good today", the data to be filtered may be filtered out.

[0098] Since the cross entropy or perplexity can reflect the closeness between the data to be screened and the language model, the smaller the cross entropy or perplexity, the closer the data to be screened is to the language model; therefore, the present disclosure sets a first preset requirement for the difference between the first cross entropy and the second cross entropy, or the difference between the first perplexity and the second perplexity, so as to objectively obtain evaluation indicators for the data to be screened belonging to different fields, thereby facilitating improving the accuracy of the screened business data.

[0099] Figure 4 The present invention is a flowchart of an embodiment of a method for filtering business data based on a language model. Figure 4 The method of this embodiment includes: S400, S401, S402, S403, S404, S405, S406, S407 and S408. Each step is described in detail below.

[0100] S400: Input the data to be screened belonging to the general field into the first language model corresponding to the general field to obtain a first set of occurrence probability values ​​of at least one word in the data to be screened. To S402. The description of S400 can refer to the description of S200 and its corresponding optional example in the above method embodiment, and will not be described in detail here.

[0101] S401, input the to-be-screened data belonging to the general field into the second language model corresponding to the predetermined business field, and obtain a second set of occurrence probability values ​​of at least one word in the to-be-screened data. To S403. The description of S401 can refer to the description of S201 and its corresponding optional example in the above method embodiment, and will not be described in detail here.

[0102] S402: Determine a first scoring value of the data to be screened according to the first group of occurrence probability values. Go to S404.

[0103] The description of S402 can refer to the description of S302 in the above method embodiment, and will not be described in detail here.

[0104] S403: Determine the second scoring value of the data to be screened according to the second group of occurrence probability values. Go to S404.

[0105] The description of S403 may refer to the description of S303 in the above method embodiment, and will not be described in detail here.

[0106] S404: Calculate the difference between the first score value and the second score value.

[0107] S405: Determine whether the magnitude relationship between the difference and the first threshold value meets the first preset requirement. If so, proceed to S406; if not, proceed to S408. The description of S405 can refer to the description of S305 in the above method embodiment, and will not be described in detail here.

[0108] S406: Determine whether the magnitude relationship between the second score value and the second threshold value satisfies a second preset requirement. If so, proceed to S407; if not, proceed to S408.

[0109] Optionally, the second preset requirement in the present disclosure may be: the second score value does not exceed the second threshold. That is, the present disclosure may determine whether the second score value is less than or equal to the second threshold, and when the second score value is less than or equal to the second threshold, determine that the magnitude relationship between the second score value and the second threshold satisfies the second preset requirement, and when the second score value is greater than the second threshold, determine that the magnitude relationship between the second score value and the second threshold does not satisfy the second preset requirement.

[0110] Optionally, the second preset requirement in the present disclosure may also be that the second score value is less than the second threshold value. That is, the present disclosure may determine whether the second score value is less than the second threshold value, and when the second score value is less than the second threshold value, determine that the magnitude relationship between the second score value and the second threshold value meets the second preset requirement, and when the second score value is less than the second threshold value, determine that the magnitude relationship between the second preset requirement and the second threshold value does not meet the second preset requirement.

[0111] Optionally, the second threshold in the present disclosure is a preset known constant, and the second threshold can be adjusted according to actual conditions. For example, the present disclosure can adjust the size of the second threshold according to the accuracy of the currently screened business data.

[0112] S407: Use the data to be screened as the screened business data belonging to the predetermined business field. The description of S407 can refer to the description of S306 in the above method embodiment, and will not be described in detail here.

[0113] S408: Filter out the data to be screened. The description of S408 can refer to the description of S307 in the above method embodiment, and will not be described in detail here.

[0114] Due to factors such as the sparsity of the language model, although the relationship between the difference and the first threshold value meets the first preset requirement, the data to be screened does not belong to the predetermined business field. Therefore, the present disclosure sets a second threshold value for the second score value to objectively obtain another evaluation indicator that the data to be screened belongs to a different field, which is conducive to avoiding the occurrence of the above phenomenon and further improving the accuracy of the screened business data.

[0115] Figure 5 The present invention is a flowchart of an embodiment of a method for filtering business data based on a language model. Figure 5 The method of this embodiment includes: S500, S501, S502, S503, S504, S505, S506, S507 and S508. Each step is described in detail below.

[0116] S500: Input the data to be screened belonging to the general field into the first language model corresponding to the general field to obtain a first set of occurrence probability values ​​of at least one word in the data to be screened. To S502. The description of S500 can refer to the description of S200 and its corresponding optional example in the above method embodiment, and will not be described in detail here.

[0117] S501, input the data to be screened belonging to the general field into the second language model corresponding to the predetermined business field, and obtain a second set of occurrence probability values ​​of at least one word in the data to be screened. To S503. The description of S501 can refer to the description of S201 and its corresponding optional example in the above method embodiment, and will not be described in detail here.

[0118] S502: Determine a first scoring value of the data to be screened according to the first set of occurrence probability values. Go to S504.

[0119] The description of S502 can refer to the description of S302 in the above method embodiment, and will not be described in detail here.

[0120] S503: Determine the second scoring value of the data to be screened according to the second group of occurrence probability values. Go to S504.

[0121] The description of S503 may refer to the description of S303 in the above method embodiment, and will not be described in detail here.

[0122] S504: Determine whether the magnitude relationship between the second score value and the second threshold value meets the second preset requirement. If so, proceed to step S505; if not, proceed to step S508. The description of S504 can refer to the description of S406 in the above method embodiment, and will not be described in detail here.

[0123] S505: Calculate the difference between the first score value and the second score value.

[0124] S506: Determine whether the magnitude relationship between the difference and the first threshold value meets the first preset requirement. If so, proceed to S507; if not, proceed to S508. The description of S506 can refer to the description of S305 in the above method embodiment, and will not be described in detail here.

[0125] S507: Use the data to be screened as the screened business data belonging to the predetermined business field. The description of S507 can refer to the description of S306 in the above method embodiment, and will not be described in detail here.

[0126] S508: Filter out the data to be screened. The description of S508 can refer to the description of S307 in the above method embodiment, and will not be described in detail here.

[0127] The present disclosure helps to reduce the number of difference calculations by first determining whether the magnitude relationship between the second score value and the second threshold value meets the second preset requirement, and then calculating the difference between the first score value and the second score value for the second score value that meets the second preset requirement. This helps to reduce resource consumption while improving the accuracy of the screened business data.

[0128] Exemplary Devices

[0129] Figure 6 FIG. 1 is a schematic diagram of a structure of an embodiment of a business data screening device based on a language model of the present disclosure. The device of this embodiment can be used to implement the above method embodiment of the present disclosure. Figure 6 As shown, the device of this embodiment includes: a first acquisition module 600, a second acquisition module 601, a first scoring module 602, a second scoring module 603 and a screening module 604. Each module is described below.

[0130] The first acquisition module 600 is used to input the data to be screened belonging to the general field into a first language model corresponding to the general field, and obtain a first group of occurrence probability values ​​of at least one word in the data to be screened.

[0131] The second acquisition module 601 is used to input the data to be screened belonging to the general field into a second language model corresponding to a predetermined business field, and obtain a second set of occurrence probability values ​​of at least one word in the data to be screened.

[0132] The first scoring module 602 is used to determine a first scoring value of the to-be-screened data according to the first set of occurrence probability values ​​obtained by the first acquisition module 600 .

[0133] The second scoring module 603 is used to determine a second scoring value of the to-be-screened data according to the second group of occurrence probability values ​​obtained by the second acquisition module 601 .

[0134] The screening module 604 is used to determine whether the data to be screened is business data belonging to a predetermined business field according to the first scoring value determined by the first scoring module 602 and the second scoring value determined by the second scoring module 603 .

[0135] In an optional example, the first group of occurrence probability values ​​obtained by the first acquisition module 600 using the first language model generally includes: the occurrence probability of each word in the data to be screened when it is used as a target word. The first acquisition module 600 can obtain a piece of data from a data set based on a general domain or obtain multiple pieces of data at one time, and use each piece of data obtained as a piece of data to be screened, and provide it to the first language model belonging to the general domain, so that for each piece of data to be screened, the first acquisition module 600 can obtain a first group of occurrence probability values ​​through the first language model.

[0136] In an optional example, the data to be screened provided by the first acquisition module 600 to the first language model also needs to be provided by the second acquisition module 601 to the second language model, that is, the input data provided by the first acquisition module 600 to the first language model is the same as providing the same input data to the second language model. The present disclosure does not limit the order in which the first acquisition module 600 and the second acquisition module 601 provide the data to be screened to the first language model and the second language model. For example, the first acquisition module 600 and the second acquisition module 601 can provide the data to be screened to the first language model and the second language model at the same time. For another example, the first acquisition module 600 can first provide the data to be screened to the first language model, and then the second acquisition module 601 provides the data to be screened to the second language model. For another example, the second acquisition module 601 can first provide the data to be screened to the second language model, and then the first acquisition module 600 provides the data to be screened to the first language model.

[0137] In an optional example, the first scoring module 602 can calculate at least one occurrence probability in the first group of occurrence probability values, and obtain the first scoring value of the data to be screened according to the calculation result. In the case where the first group of occurrence probability values ​​includes: the occurrence probability corresponding to each word in the data to be screened, the first scoring module 602 usually calculates all the occurrence probabilities included in the first group of occurrence probability values, and obtains the first scoring value of the data to be screened according to the calculation result. For example, for a data to be screened, the first scoring module 602 can calculate the cross entropy of all the occurrence probabilities in the first group of occurrence probability values ​​of the data to be screened, so as to obtain the first cross entropy of the data to be screened. The first scoring module 602 can directly use the first cross entropy of the data to be screened as the first scoring value of the data to be screened, and the first scoring module 602 can also perform further calculations on the first cross entropy, and use the further calculated result as the first scoring value of the data to be screened. For example, the first scoring module 602 uses the first cross entropy to calculate the perplexity, and uses the calculated perplexity as the first scoring value of the data to be screened.

[0138] In an optional example, the second scoring module 603 can calculate at least one occurrence probability in the second group of occurrence probability values, and obtain the second scoring value of the data to be screened according to the calculation result. In the case where the second group of occurrence probability values ​​includes: the occurrence probability corresponding to each word in the data to be screened, the second scoring module 603 usually calculates all the occurrence probabilities included in the second group of occurrence probability values, and obtains the second scoring value of the data to be screened according to the calculation result. For example, for a data to be screened, the second scoring module 603 can calculate the cross entropy of all the occurrence probabilities in the second group of occurrence probability values ​​of the data to be screened, so as to obtain the second cross entropy of the data to be screened. The second scoring module 603 can directly use the second cross entropy of the data to be screened as the second scoring value of the data to be screened, and the second scoring module 603 can also further calculate the second cross entropy, and use the result of the further calculation as the second scoring value of the data to be screened. For example, the second scoring module 603 uses the second cross entropy to calculate the perplexity, and uses the calculated perplexity as the second scoring value of the data to be screened.

[0139] In an optional example, the screening module 604 can determine whether the data to be screened belongs to a predetermined business field by using a pre-set evaluation criterion to measure the first score value and the second score value of the data to be screened. The screening module 604 uses the data to be screened that belongs to the predetermined business field as the screened business data, and filters out the data to be screened that does not belong to the predetermined business field. The pre-set evaluation criterion can be set according to actual needs. For example, the pre-set evaluation criterion includes but is not limited to: whether the difference between the two meets the predetermined requirements and whether at least one of the score values ​​meets the predetermined requirements.

[0140] Figure 7 FIG. 1 is a schematic diagram of a structure of an embodiment of a business data screening device based on a language model of the present disclosure. The device of this embodiment can be used to implement the above method embodiment of the present disclosure. Figure 7 As shown, the device of this embodiment includes: a first acquisition module 600, a second acquisition module 601, a first scoring module 602, a second scoring module 603 and a screening module 604. Optionally, the screening module 604 may include: a calculation submodule 605 and a screening submodule 606. The description of the first acquisition module 600, the second acquisition module 601, the first scoring module 602 and the second scoring module 603 can refer to the relevant description in the above device embodiment. The calculation submodule 605 and the screening submodule 606 included in the screening module 604 are described below.

[0141] The calculation submodule 605 is used to calculate the difference between the first score value and the second score value. For example, the calculation submodule 605 calculates h1-h2, where h1 represents the first score value and h2 represents the second score value.

[0142] In an optional example, the screening submodule 606 is used to determine that the data to be screened is business data belonging to a predetermined business field when the magnitude relationship between the difference calculated by the calculation submodule 605 and the first threshold satisfies a first preset requirement.

[0143] In another optional example, the screening submodule 606 is used to determine that the data to be screened is business data belonging to a predetermined business field when the relationship between the difference calculated by the calculation submodule 605 and the first threshold meets the first preset requirement, and the relationship between the second score value and the second threshold meets the second preset requirement.

[0144] In an optional example, the calculation submodule 605 may first calculate the difference between the first score value and the second score value, and then the screening submodule 606 may determine whether the size relationship between the difference and the first threshold value satisfies the first preset requirement. If it is determined that the first preset requirement is not met, the screening submodule 606 may directly filter out the data to be screened. If it is determined that the first preset requirement is met, the screening submodule 606 will treat the data to be screened as business data belonging to a predetermined business field.

[0145] In another optional example, the calculation submodule 605 may first calculate the difference between the first score value and the second score value, and then the screening submodule 606 may determine whether the size relationship between the difference and the first threshold value satisfies the first preset requirement. If it is determined that the first preset requirement is not met, the screening submodule 606 may directly filter out the data to be screened; if it is determined that the first preset requirement is met, the screening submodule 606 may continue to determine whether the size relationship between the second score value and the second threshold value satisfies the second preset requirement. If it is determined that the second preset requirement is not met, the screening submodule 606 may filter out the data to be screened; if it is determined that the second preset requirement is met, the screening submodule 606 will treat the data to be screened as business data belonging to a predetermined business field.

[0146] In another optional example, the screening submodule 606 may first determine whether the size relationship between the second score value and the second threshold value satisfies the second preset requirement. If it is determined that the second preset requirement is not met, the screening submodule 606 may directly filter out the data to be screened; and after determining that the second preset requirement is met, the calculation submodule 605 calculates the difference between the first score value and the second score value, and then the screening submodule 606 determines whether the size relationship between the difference and the first threshold value satisfies the first preset requirement. If it is determined that the first preset requirement is not met, the screening submodule 606 may filter out the data to be screened; if it is determined that the first preset requirement is met, the screening submodule 606 treats the data to be screened as business data belonging to a predetermined business field.

[0147] Exemplary Electronic Devices

[0148] Reference below Figure 8 An electronic device according to an embodiment of the present disclosure is described. Figure 8 1 shows a block diagram of an electronic device according to an embodiment of the present disclosure. Figure 8 As shown, the electronic device 81 includes one or more processors 811 and a memory 812 .

[0149] The processor 811 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 81 to perform desired functions.

[0150] The memory 812 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may run the program instructions to implement the business data screening method based on the language model of each embodiment of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0151] In one example, the electronic device 81 may also include: an input device 813 and an output device 814, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). In addition, the input device 813 may also include, for example, a keyboard, a mouse, etc. The output device 814 may output various information to the outside. The output device 814 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0152] Of course, to simplify, Figure 8 Only some of the components related to the present disclosure in the electronic device 81 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 81 may also include any other appropriate components.

[0153] Exemplary computer program products and computer-readable storage media

[0154] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the language model-based business data screening method according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.

[0155] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0156] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the language model-based business data screening method according to various embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.

[0157] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive enumeration) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0158] The basic principles of the present disclosure are described above in conjunction with specific embodiments, but it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0159] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0160] The block diagrams of the devices, apparatuses, equipment, and systems involved in the present disclosure are intended only as illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems may be connected, arranged, and configured in any manner. Words such as "include," "comprise," "have," and the like are open words, meaning "including but not limited to," and may be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and may be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and may be used interchangeably therewith.

[0161] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0162] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0163] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0164] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple examples and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A business data screening method based on a language model, comprising: Inputting the data to be screened belonging to a general field into a first language model corresponding to the general field to obtain a first set of occurrence probability values ​​of at least one word in the data to be screened; Inputting the data to be screened belonging to the general field into a second language model corresponding to a predetermined business field to obtain a second set of occurrence probability values ​​of at least one word in the data to be screened, wherein the predetermined business field is a part of the general field; Determine a first scoring value of the to-be-screened data according to the cross entropy of all occurrence probabilities in the first group of occurrence probability values; Determining a second scoring value of the to-be-screened data according to the cross entropy of all occurrence probabilities in the second group of occurrence probability values; Whether the data to be screened is business data belonging to the predetermined business field is determined according to whether the difference between the first score value and the second score value meets a first preset requirement and whether at least one score value meets a second preset requirement.

2. The method according to claim 1, wherein: The first language model is obtained by training using data samples belonging to a general domain; The second language model is obtained by training using data samples belonging to a predetermined business field.

3. The method according to claim 2, wherein: The order of magnitude of the data samples used to train the first language model is the same as the order of magnitude of the data samples used to train the second language model; and / or The difference between the number of words included in the data sample used to train the first language model and the number of words included in the data sample used to train the second language model is not greater than a predetermined number.

4. The method according to any one of claims 1 to 3, wherein: Determining a first scoring value of the to-be-screened data according to the cross entropy of all occurrence probabilities in the first group of occurrence probability values ​​comprises: Determining a first cross entropy of the data to be screened according to a first group of occurrence probability values ​​of all words in the data to be screened output by the first language model; Determine a first score value of the to-be-screened data based on the first cross entropy; Determining a second scoring value of the to-be-screened data according to the cross entropy of all occurrence probabilities in the second group of occurrence probability values ​​comprises: Determining a second cross entropy of the data to be screened according to a second group of occurrence probability values ​​of all words in the data to be screened output by the second language model; A second score of the to-be-screened data is determined based on the second cross entropy.

5. The method according to claim 4, wherein: The determining a first score value of the to-be-screened data based on the first cross entropy includes: Determine a first perplexity of the data to be screened according to the first cross entropy; Determine a first score value of the to-be-screened data based on the first perplexity; The determining a second score value of the to-be-screened data based on the second cross entropy comprises: Determine a second perplexity of the data to be screened according to the second cross entropy; A second score value of the to-be-screened data is determined based on the second perplexity.

6. The method according to any one of claims 1 to 3, wherein: The determining whether the data to be screened is business data belonging to the predetermined business field according to whether the difference between the first score value and the second score value meets a first preset requirement and whether at least one score value meets a second preset requirement includes: Calculate the difference between the first score value and the second score value; When the magnitude relationship between the difference and the first threshold satisfies the first preset requirement, it is determined that the data to be screened is business data belonging to the predetermined business field.

7. The method according to any one of claims 1 to 3, wherein: The determining whether the data to be screened is business data belonging to the predetermined business field according to whether the difference between the first score value and the second score value meets a first preset requirement and whether at least one score value meets a second preset requirement includes: Calculate the difference between the first score value and the second score value; When the magnitude relationship between the difference and the first threshold satisfies the first preset requirement, and the magnitude relationship between the second score value and the second threshold satisfies the second preset requirement, it is determined that the data to be screened is business data belonging to the predetermined business field.

8. The method according to any one of claims 1 to 3, wherein: The determining whether the data to be screened is business data belonging to the predetermined business field according to whether the difference between the first score value and the second score value meets a first preset requirement and whether at least one score value meets a second preset requirement includes: For the data to be screened whose magnitude relationship between the second score value and the second threshold value meets the second preset requirement, calculating the difference between the first score value and the second score value of the data to be screened; When the magnitude relationship between the difference and the first threshold satisfies the first preset requirement, it is determined that the data to be screened is business data belonging to the predetermined business field.

9. A business data screening device based on a language model, comprising: A first acquisition module, used for inputting the to-be-screened data belonging to a general field into a first language model corresponding to the general field, and obtaining a first group of occurrence probability values ​​of at least one word in the to-be-screened data; A second acquisition module is used to input the data to be screened belonging to the general field into a second language model corresponding to a predetermined business field to obtain a second set of occurrence probability values ​​of at least one word in the data to be screened, wherein the predetermined business field is a part of the general field; A first scoring module, used to determine a first scoring value of the to-be-screened data according to the cross entropy of all occurrence probabilities in the first group of occurrence probability values ​​obtained by the first acquisition module; A second scoring module, used to determine a second scoring value of the to-be-screened data according to the cross entropy of all occurrence probabilities in the second group of occurrence probability values ​​obtained by the second acquisition module; A screening module is used to determine whether the data to be screened is business data belonging to the predetermined business field based on whether the difference between the first scoring value determined by the first scoring module and the second scoring value determined by the second scoring module meets the first preset requirement and whether at least one scoring value meets the second preset requirement.

10. The device according to claim 9, wherein: The first scoring module is further used for: Determining a first cross entropy of the data to be screened according to a first group of occurrence probability values ​​of all words in the data to be screened output by the first language model; Determine a first score value of the to-be-screened data based on the first cross entropy; The second scoring module is further used for: Determining a second cross entropy of the data to be screened according to a second group of occurrence probability values ​​of all words in the data to be screened output by the second language model; A second score of the to-be-screened data is determined based on the second cross entropy.

11. The device according to claim 10, wherein: The first scoring module is further used for: Using the first cross entropy as the first score value of the data to be screened; or Determine a first perplexity of the data to be screened according to the first cross entropy, and use the first perplexity as a first score value of the data to be screened; The second scoring module is further used for: Using the first cross entropy as a second scoring value of the data to be screened; or A second perplexity of the data to be screened is determined according to the second cross entropy, and the second perplexity is used as a second score value of the data to be screened.

12. The device according to any one of claims 9 to 11, wherein: The screening module comprises: A calculation submodule, configured to calculate a difference between the first score value and the second score value; A screening submodule is used to determine that the data to be screened is business data belonging to the predetermined business field when the size relationship between the difference calculated by the calculation submodule and the first threshold meets the first preset requirement, and the size relationship between the second score value and the second threshold meets the second preset requirement.

13. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the method according to any one of claims 1 to 8.

14. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Text classification method, system, computer equipment and storage medium

    CN108536800A

  • Speech recognition method, device and apparatus

    CN109523991A