A method, apparatus, computer device, and medium for generating a flowing water sample set
By obtaining and analyzing the basic label rule base, determining the label rules hit by the flow information and labeling, the problem of time-consuming, labor-intensive and low accuracy of manual labeling flow is solved, and the accuracy and cost reduction of flow recognition is improved.
Patent Information
- Application Number
- CN202211035582.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-08-26
AI Technical Summary
When handling large amounts of flow, manual labeling and judgments are time-consuming and labor-intensive, and judgment errors are prone to occur, and accuracy is low.
By obtaining the basic label rule library, analyzing and processing each basic label rule, obtaining the corresponding short-circuit mechanism trigger condition set, determining the basic label rule hit by the flow information, and using the corresponding classification labels to label the flow sample to form the flow sample set.
It effectively improves the accuracy of flow recognition, reduces the labor cost of flow label labeling, and solves the problems of large workload and low recognition accuracy caused by the huge amount of flow to be marked.
Smart Images

Figure CN115391537B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to computer data processing technologies, and in particular, to a method, device, computer device, and medium for generating a running water sample set. Background Art
[0002] As a kind of proof material, bank statements play an important role in aspects such as qualification review during the process of enterprise listing and repayment ability review during the credit process. During the review, specific logical relationships in fields such as the amount size, the name of the counterparty account, and the transfer remarks can be used to label subcategories, and then the authenticity and rationality of the statements can be inferred. Correct and reasonable classification is the basis for all reasonable analyses.
[0003] The inventors found the defects of the existing technologies during the invention process: when the number of statements is huge, traditional manual labeling and judgment are very laborious. Judging the nature of each statement not only takes time and effort, but may also cause judgment errors due to other human factors, etc., and the executability is very low. Summary of the Invention
[0004] The embodiments of the present invention provide a method, device, computer device, and medium for generating a running water sample set to effectively perform label annotation on the running water and improve the accuracy of running water recognition.
[0005] In a first aspect, the embodiments of the present invention provide a method for generating a running water sample set, which includes:
[0006] Obtain a basic label rule library, where the basic label rules in the basic label rule library include multiple conditional statements connected by at least one logical connective;
[0007] Perform parsing processing on each basic label rule to obtain a set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively; the short-circuit mechanism trigger conditions include the expected value of at least one target conditional statement and the short-circuit type when all target conditional statements meet the expected value;
[0008] Wherein, the short-circuit type includes: direct miss skip of the basic label rule, or direct hit of the basic label rule;
[0009] Determine the basic label rules hit by each running water information in the running water information set to be labeled through the set of short-circuit mechanism trigger conditions corresponding to each basic label rule, and label each running water sample with the classification label corresponding to the hit basic label rule to form a running water sample set.
[0010] In a second aspect, the embodiments of the present invention further provide a device for generating a running water sample set, and the device for generating a running water sample set includes:
[0011] The basic tag rule library acquisition module is used to acquire the basic tag rule library, and the basic tag rules in the basic tag rule library include multiple conditional statements connected by at least one logical connective;
[0012] The short - circuit mechanism trigger condition set determination module is used to perform parsing processing on each basic tag rule to obtain a short - circuit mechanism trigger condition set corresponding to each basic tag rule respectively; the short - circuit mechanism trigger conditions include the expected values of at least one target conditional statement, and the short - circuit type when all target conditional statements meet the expected values;
[0013] Among them, the short - circuit type includes: direct miss skip of the basic tag rule, or direct hit of the basic tag rule;
[0014] The flowing - water sample set formation module is used to determine the basic tag rules hit by each flowing - water information in the flowing - water information set to be labeled through the short - circuit mechanism trigger condition sets corresponding to each basic tag rule respectively, and use the classification tags corresponding to the hit basic tag rules to label each flowing - water sample to form a flowing - water sample set.
[0015] In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. Among them, when the processor executes the computer program, it implements the method for generating a flowing - water sample set as described in any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer - readable storage medium, on which a computer program is stored. Among them, when the computer program is executed by a processor, it implements the method for generating a flowing - water sample set as described in any embodiment of the present invention.
[0017] The technical solution provided by the embodiment of the present invention is as follows: by acquiring the basic tag rule library; performing parsing processing on each basic tag rule to obtain a short - circuit mechanism trigger condition set corresponding to each basic tag rule respectively; through the short - circuit mechanism trigger condition sets corresponding to each basic tag rule respectively, determining the basic tag rules hit by each flowing - water information in the flowing - water information set to be labeled, and using the classification tags corresponding to the hit basic tag rules to label each flowing - water sample to form a flowing - water sample set. The embodiment of the present invention solves the problems of large workload and low recognition accuracy of staff caused by the huge number of flowing - water to be labeled, realizes effective label annotation of flowing - water, improves the accuracy of flowing - water recognition, and reduces the labor cost of flowing - water label annotation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flowchart of a method for generating a flowing - water sample set provided by Embodiment 1 of the present invention;
[0019] Figure 2 It is a flowchart of another method for generating a flowing water sample set provided in the second embodiment of the present invention;
[0020] Figure 3 It is a schematic structural diagram of a device for generating a flowing water sample set provided in the third embodiment of the present invention;
[0021] Figure 4 It is a schematic structural diagram of a computer device provided in the fourth embodiment of the present invention. Detailed implementation manners
[0022] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that for the sake of description, only parts related to the present invention rather than all structures are shown in the accompanying drawings.
[0023] Embodiment 1
[0024] Figure 1 It is a flowchart of a method for generating a flowing water sample set provided in the first embodiment of the present invention. This embodiment is applicable to the situation of label annotation for flowing water samples. The method of this embodiment can be executed by a device for generating a flowing water sample set, and the device can be implemented in a software and / or hardware manner, and the device can be configured in a server or a terminal device.
[0025] Correspondingly, the method specifically includes the following steps:
[0026] S110. Obtain a basic label rule library.
[0027] Among them, the basic label rules in the basic label rule library include multiple conditional statements connected by at least one logical connective.
[0028] Among them, the basic label rule library can be a rule library composed of multiple basic label rules determined by business experts summarizing representative flowing water field rules.
[0029] It can be understood that there are multiple basic label rules in the basic label rule library, and each basic label rule can correspond to a classification label. When the characteristics of a flowing water sample meet a certain basic label rule, the classification label of the flowing water sample can be determined.
[0030] Exemplarily, assume that there are 3 basic label rules in the basic label rule library, namely basic label rule 1, basic label rule 2, and basic label rule 3. Specifically, basic label rule 1 can be A&(B|C), basic label rule 2 can be C&(A|B), and basic label rule 3 can be B&(A|C).
[0031] Further, in the basic label rules, the logical connectors can be "&" and "|"; the multiple conditional statements can be A, B, and C. Among them, the logical connectors can connect multiple conditional statements.
[0032] S120. Parse and process each basic label rule to obtain a set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively.
[0033] Among them, the short-circuit mechanism trigger conditions include at least one expected value of the target conditional statement, and the short-circuit type when all target conditional statements meet the expected values.
[0034] Among them, the short-circuit type includes: direct miss skip of the basic label rule, or direct hit of the basic label rule.
[0035] Specifically, the set of short-circuit mechanism trigger conditions can be obtained by parsing the basic label rules to get multiple condition sets, and through logical connector operations, ensuring that the condition set with the calculation result being true is the set of short-circuit mechanism trigger conditions.
[0036] It can be understood that A or B is the most commonly used short-circuit mechanism. When either A or B is true, the entire expression is true, and the program will stop judging. Using such a feature can save computing resources, reduce time consumption, and quickly obtain a large amount of training data when matching streaming labels for training data.
[0037] Continuing with the previous example, assume that the basic label rule 1 obtained is A&(B|C). Specifically, it represents the meanings of 3 constraint conditions A, B, and C (corresponding to 3 fields of the streaming sample respectively, such as the local account, the counterparty account, and the transaction amount).
[0038] Further, simplify the basic label rule 1 to that condition A must hold, and at least one of conditions B and C holds. Each streaming field participating in the calculation has only two possibilities, namely 1 (representing meeting the condition) or 0 (representing not meeting the condition). Split into three conditions A, B, and C using logical connectors. At this time, the conditions have a sequence. According to the logical operator operations, a set of short-circuit mechanism trigger conditions corresponding to each basic label rule can be obtained.
[0039] Optionally, each basic label rule is parsed to obtain a set of short - circuit mechanism trigger conditions corresponding to each basic label rule respectively, including: parsing each basic label rule to obtain a plurality of conditional statements and logical connectives; where each conditional statement includes a conforming conditional statement and a non - conforming conditional statement, and the conforming conditional statement is set to 1 and the non - conforming conditional statement is set to 0; according to the conforming and non - conforming conditional statements associated with the plurality of conditional statements, permutations and combinations are performed to obtain a set of conditional statement permutation and combination sets; according to the logical connectives, it is judged whether the calculation results of the conditional statements in each conditional statement permutation and combination set are true. If so, a set of short - circuit mechanism trigger conditions corresponding to each basic label rule is obtained.
[0040] Among them, the set of conditional statement permutation and combination sets is a set of permutations and combinations obtained by combining a plurality of conditional statements.
[0041] It can be understood that for each conditional statement, there are two cases: the conforming conditional statement and the non - conforming conditional statement. Among them, the conforming conditional statement can be defined as 1 and the non - conforming conditional statement can be defined as 0. For a basic label rule, if there are 3 conditional statements and each conditional statement has two cases of conforming and non - conforming, then there are 8 possible permutations and combinations, that is, there are 8 combinations in the set of conditional statement permutation and combination sets. Among these 8 permutations and combinations, the permutations and combinations with the calculation result of true can be calculated through logical connectives, so as to obtain the set of short - circuit mechanism trigger conditions.
[0042] Continuing with the previous example, assume that the basic label rule 1 obtained is A&(B|C). In the basic label rule 1, there are 3 conditional statements A, B, and C. The conforming conditional statement is defined as 1 and the non - conforming conditional statement is defined as 0. Therefore, 8 permutations and combinations can be obtained, which are [0,0,0], [0,0,1], [0,1,0], [0,1,1], [1,0,0], [1,0,1], [1,1,0], and [1,1,1] respectively. When it is [0,0,0], it can be determined that the conditions of A, B, and C are not met. On the contrary, when it is [1,1,1], it can be determined that the conditions of A, B, and C are all met.
[0043] Furthermore, according to the logical connectives, the calculation results of each conditional statement in the set of permutations and combinations of conditional statements can be calculated. Respectively, [0, 0, 0] is false, [0, 0, 1] is false, [0, 1, 0] is false, [0, 1, 1] is false, [1, 0, 0] is false, [1, 0, 1] is true, [1, 1, 0] is true, and [1, 1, 1] is true. Determine the set of short-circuit mechanism trigger conditions corresponding to each basic label rule based on the calculation result being true. Specifically, the set of short-circuit mechanism trigger conditions includes [1, 0, 1], [1, 1, 0], and [1, 1, 1]. That is, it is necessary to satisfy conditional statement A and at least one of conditional statement B or conditional statement C.
[0044] The advantage of such a setting is that: through permutation and combination and logical connective operations, the set of short-circuit mechanism trigger conditions is obtained. This can make it possible to determine the set of short-circuit mechanism trigger conditions more quickly and accurately, so as to classify and label the streaming samples more quickly, improve the accuracy of the classification and labeling of the streaming samples, and also save time costs.
[0045] S130. Determine the basic label rules hit by each piece of streaming information in the set of streaming information to be labeled through the set of short-circuit mechanism trigger conditions corresponding to each basic label rule, and use the classification label corresponding to the hit basic label rule to label each streaming sample to form a set of streaming samples.
[0046] Among them, the set of streaming information to be labeled can be the streaming information to be labeled obtained in real time, which is a set composed of multiple pieces of streaming information. The set of streaming samples can be a set composed of multiple streaming samples that already have classification labels, and the set of streaming samples can be used to train the model.
[0047] It can be understood that the set of streaming samples contains multiple groups of streaming samples, and each streaming sample corresponds to a classification label.
[0048] Optionally, the basic label rules hit by each piece of transaction information in the transaction information set to be labeled are determined through a set of short - circuit mechanism trigger conditions corresponding to each basic label rule, including: obtaining the current processing transaction information in the transaction information set to be labeled; obtaining the current set of short - circuit mechanism trigger conditions in the set of short - circuit mechanism trigger conditions corresponding to each basic label rule; determining whether the current processing transaction information meets the current set of short - circuit mechanism trigger conditions. If so, determining the basic label rule hit by the current processing transaction information; if not, determining whether there are remaining basic label rules in the basic label rule library. If so, obtaining the current set of short - circuit mechanism trigger conditions corresponding to the remaining basic label rules from the remaining basic label rules, and returning to execute the determination of whether the current processing transaction information meets the current set of short - circuit mechanism trigger conditions. If so, determining the basic label rule hit by the current processing transaction information until there are no remaining basic label rules.
[0049] Among them, the current processing transaction information can be obtained from the transaction information set to be labeled and is used to describe the current transaction information to be processed. The remaining basic label rules can be the other basic label rules existing in the basic label rule library except for the current basic label rule.
[0050] It can be understood that if the current processing transaction information cannot match the current set of short - circuit mechanism trigger conditions corresponding to the current basic label rule, then the next basic label rule is obtained from the basic label rule library, that is, one is obtained from the remaining basic label rules, and the above - mentioned matching operation is repeated. If it matches, the classification label of the current processing transaction information can be determined. If it does not match, then continue with the next basic label rule until there are no remaining basic label rules.
[0051] Continuing with the previous example, obtain the current processing transaction information. First, obtain the current set of short - circuit mechanism trigger conditions in the set of short - circuit mechanism trigger conditions corresponding to basic label rule 1, that is, [1, 0, 1], [1, 1, 0], and [1, 1, 1] (that is, it must meet condition statement A and at least one of condition statement B or condition statement C).
[0052] Furthermore, determine whether the current processing transaction information meets condition statement A and at least one of condition statement B or condition statement C. If so, determine that the current processing transaction information hits basic label rule 1.
[0053] Otherwise, determine whether there are any remaining basic label rules in the basic label rule library. Since there are still basic label rule 2 and basic label rule 3 in the basic label rule library, obtain the current short-circuit mechanism trigger condition set corresponding to basic label rule 2. Similarly, determine whether the current processing flow information meets the current short-circuit mechanism trigger condition set corresponding to basic label rule 2. If it meets, determine the basic label rule 2 hit by the current processing flow information.
[0054] If it does not meet, it is necessary to continue to obtain the current short-circuit mechanism trigger condition set corresponding to basic label rule 3 and match it with the current processing flow information until there are no remaining basic label rules.
[0055] Optionally, the determining whether the current processing flow information meets the current short-circuit mechanism trigger condition set includes: parsing the current processing flow information, obtaining the current processing flow information conditions associated with the current short-circuit mechanism trigger condition set in the current processing flow information; determining whether the current processing flow information conditions hit the current short-circuit mechanism trigger condition set. If so, the current processing flow information meets the current short-circuit mechanism trigger condition set.
[0056] In the embodiment, since the current processing flow information contains many fields, which may include fields such as the local account, the counterparty account, the transaction amount, and the transaction time, obtain the current processing flow information conditions according to the current short-circuit mechanism trigger condition set. Assume that the local account, the counterparty account, and the transaction amount are obtained as the current processing flow information conditions and matched with the current short-circuit mechanism trigger condition set. If it meets, determine that the current processing flow information meets the current short-circuit mechanism trigger condition set.
[0057] Continuing the previous example, assume that the obtained basic label rule 1 is A&(B|C). Specifically, it represents three constraint conditions A, B, and C (corresponding to three fields of the flow sample respectively, such as the local account, the counterparty account, and the transaction amount). Therefore, obtain the corresponding fields in the current processing flow information for matching.
[0058] Optionally, after determining whether there are any remaining basic label rules in the basic label rule library, it further includes: if not, the current processing flow information does not hit the basic label rule, and determine the current processing flow information as an unclassified flow sample; reclassify and label the unclassified flow sample, add the unclassified flow sample to the flow sample set, and update the flow sample set.
[0059] Among them, the unclassified flow sample can be a flow sample that has not been classified. Specifically, the unclassified flow sample means that none of the basic label rules in the basic label rule library are hit.
[0060] Continuing with the previous example, if it is necessary to continue obtaining the set of current short - circuit mechanism trigger conditions corresponding to the basic label rule 3 and match it with the current processing flow information, and if the current processing flow information does not hit the basic label rule 3, and since there are no remaining basic label rules, the current processing flow information is determined as an unclassified flow sample. Further, the current processing flow information will be classified and labeled again, added to the flow sample set, and the flow sample set will be updated.
[0061] The advantage of such a setting is that by classifying and labeling the classification labels of the current processing flow information that does not hit the basic label rule again, adding and updating the flow sample set, the flow samples in the flow sample set can be made more abundant, so that the trained flow label classification model is more accurate.
[0062] The technical solution provided by the embodiments of the present invention obtains a basic label rule library; parses and processes each basic label rule to obtain a set of short - circuit mechanism trigger conditions corresponding to each basic label rule respectively; determines the basic label rules hit by each flow information in the set of flow information to be labeled through the set of short - circuit mechanism trigger conditions corresponding to each basic label rule respectively, and labels each flow sample with the classification label corresponding to the hit basic label rule to form a flow sample set. The embodiments of the present invention solve the problems of large workload and low recognition accuracy of staff caused by the large number of flows to be labeled, realize effective label annotation of flows, improve the accuracy of flow recognition, and reduce the labor cost of flow label annotation.
[0063] Embodiment Two
[0064] Figure 2 It is a flowchart of another method for generating a flow sample set provided by the second embodiment of the present invention. This embodiment is optimized based on the above - mentioned embodiments. In this embodiment, after labeling each flow sample with the classification label corresponding to the hit basic label rule to form a flow sample set, it is also necessary to train the classification model.
[0065] Correspondingly, the method specifically includes the following steps:
[0066] S210. Obtain a basic label rule library.
[0067] S220. Parse and process each basic label rule to obtain a set of short - circuit mechanism trigger conditions corresponding to each basic label rule respectively.
[0068] S230. Determine the basic label rules hit by each transaction information in the transaction information set to be labeled through the short-circuit mechanism trigger condition sets corresponding to the respective basic label rules, and label each transaction sample with the classification label corresponding to the hit basic label rule to form a transaction sample set.
[0069] Optionally, after labeling each transaction sample with the classification label corresponding to the hit basic label rule to form a transaction sample set, it further includes: judging whether there are abnormally classified transaction samples among the transaction samples according to the relevance of the transaction samples in the transaction sample set; if so, reclassify the abnormally classified transaction samples to obtain the classification label and the new basic label rule corresponding to the abnormally classified transaction samples; input the abnormally classified transaction samples into the transaction label classification model for model training to obtain an optimized transaction label classification model, and add the new basic label rule to the basic label rule library to update the basic label rule library.
[0070] Among them, the abnormally classified transaction sample may be a transaction sample with anomalies. Specifically, from the perspective of the overall dimension of the transaction samples, it is judged whether the fields in the current lost sample exist in the fields of other transaction samples. If so, it can be determined as an abnormal transaction sample.
[0071] Exemplarily, after the transaction sample set is generated, analyze all the fields of all transaction samples and the obtained classification labels as a whole dimension. For example, the counterparty account of transaction sample 1 appears in the own account of transaction sample 2. At this time, it can be judged that this label needs to be classified in the "related party transaction" label. If the result is different, it can be determined as an abnormal transaction sample and needs to be reclassified.
[0072] Furthermore, the classification label and the new basic label rule corresponding to the abnormally classified transaction sample can be obtained. Input the abnormally classified transaction samples into the transaction label classification model for model training to obtain an optimized transaction label classification model, and add the new basic label rule to the basic label rule library to update the basic label rule library.
[0073] The advantage of such a setting is that: by re-judging each transaction sample in the transaction sample set from the overall dimension, abnormally classified transaction samples are obtained. And reclassify the abnormally classified transaction samples, retrain the transaction label classification model, and update the basic label rule library, so that a more accurate transaction sample set with label classification can be obtained.
[0074] S240. Input the transaction samples in the transaction sample set into the classification model for model training to obtain a transaction label classification model.
[0075] Among them, the transaction label classification model can be a model that can accurately classify labels by inputting transaction samples.
[0076] S250. Determine whether the label classification accuracy rate of the transaction label classification model meets a preset standard accuracy rate. If so, execute S260; if not, execute S270.
[0077] Among them, the label classification accuracy rate can be a measure of the accuracy of the transaction label classification model in classifying transaction sample labels. The standard accuracy rate can be the accuracy rate that the transaction label classification model is preset to achieve.
[0078] It can be understood that the higher the label classification accuracy rate, the higher the accuracy rate of the corresponding transaction label classification model in classifying transaction samples, and the better it can classify transaction samples.
[0079] S260. Determine that the training of the transaction label classification model is completed.
[0080] S270. Classify the obtained to-be-labeled transaction information set based on the updated basic label rule library, and input it into the transaction label classification model for retraining until the label classification accuracy rate of the transaction label classification model meets the preset standard accuracy rate, and determine that the training of the transaction label classification model is completed.
[0081] It can be understood that when the label classification accuracy rate corresponding to the transaction label classification model does not meet the preset standard accuracy rate, the to-be-labeled transaction information set is classified by the updated basic label rule library, and the transaction label classification model is retrained to improve the label classification accuracy rate.
[0082] The technical solution provided by the embodiments of the present invention includes obtaining a basic label rule library; parsing and processing each basic label rule to obtain a set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively; determining the basic label rules hit by each flow information in the flow information set to be labeled through the set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively, and using the classification label corresponding to the hit basic label rule to label each flow sample to form a flow sample set; inputting the flow samples in the flow sample set into a classification model for model training to obtain a flow label classification model; determining whether the label classification accuracy of the flow label classification model meets a preset standard accuracy. If so, it is determined that the training of the flow label classification model is completed; if not, based on the updated basic label rules, the obtained flow information set to be labeled is classified and input into the flow label classification model for retraining until the label classification accuracy of the flow label classification model meets the preset standard accuracy, and it is determined that the training of the flow label classification model is completed. In this way, a flow label classification model with high accuracy can be obtained, the accuracy of label annotation for flow samples is improved, the labor cost of flow label annotation is reduced, and the time cost of flow sample annotation is saved.
[0083] Embodiment III
[0084] Figure 3 FIG. is a schematic structural diagram of a device for generating a flow sample set provided by Embodiment III of the present invention. The device for generating a flow sample set provided by this embodiment can be implemented by software and / or hardware, and can be configured in a terminal device or a server. It is used to implement a method for generating a flow sample set in the embodiments of the present invention. As Figure 3 shown, the device specifically includes: a basic label rule library acquisition module 310, a short-circuit mechanism trigger condition set determination module 320, and a flow sample set formation module 330.
[0085] Among them, the basic label rule library acquisition module 310 is used to obtain a basic label rule library, and the basic label rules in the basic label rule library include multiple conditional statements connected by at least one logical connective;
[0086] The short-circuit mechanism trigger condition set determination module 320 is used to parse and process each basic label rule to obtain a set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively; the short-circuit mechanism trigger conditions include at least one expected value of a target conditional statement and the short-circuit type when all target conditional statements meet the expected value;
[0087] Among them, the short-circuit type includes: direct miss skipping of the basic label rule, or direct hit of the basic label rule;
[0088] The flowing water sample set forming module 330 is configured to determine the basic label rules hit by each flowing water information in the flowing water information set to be labeled through the short - circuit mechanism trigger condition sets respectively corresponding to the basic label rules, and use the classification labels corresponding to the hit basic label rules to label each flowing water sample, thereby forming a flowing water sample set.
[0089] The technical solution provided by the embodiments of the present invention includes: obtaining a basic label rule library; performing parsing processing on each basic label rule to obtain short - circuit mechanism trigger condition sets respectively corresponding to the basic label rules; determining the basic label rules hit by each flowing water information in the flowing water information set to be labeled through the short - circuit mechanism trigger condition sets respectively corresponding to the basic label rules, and using the classification labels corresponding to the hit basic label rules to label each flowing water sample, thereby forming a flowing water sample set. The embodiments of the present invention solve the problems of large workload and low recognition accuracy of staff caused by the huge number of flowing waters to be labeled, realize effective label annotation of flowing waters, improve the accuracy of flowing water recognition, and reduce the labor cost of flowing water label annotation.
[0090] Based on the above embodiments, the short - circuit mechanism trigger condition set determining module 320 may specifically be configured to: perform parsing processing on each basic label rule to obtain a plurality of conditional statements and logical connectives; where each conditional statement includes a conforming conditional statement and a non - conforming conditional statement, and set the conforming conditional statement to 1 and the non - conforming conditional statement to 0; perform permutation and combination according to the conforming conditional statements and non - conforming conditional statements associated with the plurality of conditional statements to obtain a conditional statement permutation and combination set; and judge whether the calculation results of the conditional statements in each conditional statement permutation and combination set are true according to the logical connectives, and if so, obtain the short - circuit mechanism trigger condition sets respectively corresponding to the basic label rules.
[0091] Based on the above embodiments, the flowing water sample set forming module 330 may specifically include: a current processing flowing water information obtaining unit, configured to obtain the current processing flowing water information in the flowing water information set to be labeled; a current short - circuit mechanism triggering condition set obtaining unit, configured to obtain the current short - circuit mechanism triggering condition set from the short - circuit mechanism triggering condition sets respectively corresponding to each basic label rule; a current processing flowing water information judging unit, configured to judge whether the current processing flowing water information meets the current short - circuit mechanism triggering condition set. If so, determine the basic label rule hit by the current processing flowing water information; a remaining basic label rule judging unit. If the current processing flowing water information does not meet the current short - circuit mechanism triggering condition set, judge whether there are remaining basic label rules in the basic label rule library. If so, obtain the current short - circuit mechanism triggering condition set corresponding to the remaining basic label rules from the remaining basic label rules, and return to execute the judgment on whether the current processing flowing water information meets the current short - circuit mechanism triggering condition set. If so, determine the basic label rule hit by the current processing flowing water information until there are no remaining basic label rules.
[0092] Based on the above embodiments, the current processing flowing water information judging unit may specifically be configured to: analyze the current processing flowing water information, and obtain the current processing flowing water information condition associated with the current short - circuit mechanism triggering condition set from the current processing flowing water information; judge whether the current processing flowing water information condition hits the current short - circuit mechanism triggering condition set. If so, the current processing flowing water information meets the current short - circuit mechanism triggering condition set.
[0093] Based on the above embodiments, it further includes an unclassified flowing water sample determining module, which may specifically be configured to: after judging whether there are remaining basic label rules in the basic label rule library, if there are no remaining basic label rules in the basic label rule library, then the current processing flowing water information does not hit the basic label rule, and determine the current processing flowing water information as an unclassified flowing water sample; perform re - classification and classification label annotation on the unclassified flowing water sample, add the unclassified flowing water sample to the flowing water sample set, and update the flowing water sample set.
[0094] Based on the above embodiments, it further includes a flowing water label classification model determining module, which may specifically be configured to: after using the classification label corresponding to the hit basic label rule to label each flowing water sample to form a flowing water sample set, input the flowing water samples in the flowing water sample set into a classification model for model training to obtain a flowing water label classification model; judge whether the label classification accuracy of the flowing water label classification model meets a preset standard accuracy. If so, determine that the training of the flowing water label classification model is completed.
[0095] Based on the above embodiments, it further includes a basic label rule update module, which can be specifically used for: after using the classification labels corresponding to the hit basic label rules to label each transaction sample to form a transaction sample set, judging whether there are abnormally classified transaction samples among the transaction samples according to the relevance of the transaction samples in the transaction sample set; if so, reclassifying the abnormally classified transaction samples to obtain the classification labels and new basic label rules corresponding to the abnormally classified transaction samples; inputting the abnormally classified transaction samples into the transaction label classification model for model training to obtain an optimized transaction label classification model, and adding the new basic label rules to the basic label rule library to update the basic label rule library.
[0096] Based on the above embodiments, it further includes a transaction label classification model retraining module, which can be specifically used for: after judging whether the label classification accuracy of the transaction label classification model meets the preset standard accuracy, if the label classification accuracy of the transaction label classification model does not meet the preset standard accuracy, then classifying the obtained transaction information set to be labeled based on the updated basic label rules and inputting it into the transaction label classification model for retraining until the label classification accuracy of the transaction label classification model meets the preset standard accuracy, and determining that the training of the transaction label classification model is completed.
[0097] The above transaction sample set generation device can execute the transaction sample set generation method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0098] Embodiment 4
[0099] Figure 4 It is a schematic structural diagram of a computer device provided by Embodiment 4 of the present invention. As Figure 4 shown, the device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of processors 410 in the device can be one or more, Figure 4 taking one processor 410 as an example; the processor 410, the memory 420, the input device 430, and the output device 440 in the device can be connected through a bus or other means, Figure 4 taking the connection through the bus as an example.
[0100] The memory 420, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the method for generating a flow sample set in the embodiments of the present invention (for example, the basic tag rule library acquisition module 310, the short-circuit mechanism trigger condition set determination module 320, and the flow sample set formation module 330). The processor 410 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 420, that is, implements the above-mentioned method for generating a flow sample set. The method includes: acquiring a basic tag rule library; performing parsing processing on each basic tag rule to obtain a set of short-circuit mechanism trigger conditions corresponding to each basic tag rule respectively; determining the basic tag rules hit by each flow information in the flow information set to be labeled through the set of short-circuit mechanism trigger conditions corresponding to each basic tag rule respectively, and using the classification tag corresponding to the hit basic tag rule to label each flow sample to form a flow sample set.
[0101] The memory 420 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 420 may further include a memory remotely set relative to the processor 410, and these remote memories may be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The input device 430 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function control of the device. The output device 440 may include a display device such as a display screen.
[0103] Embodiment Five
[0104] Embodiment Five of the present invention further provides a computer-readable storage medium containing computer-readable instructions for executing a method for generating a flow sample set when executed by a computer processor. The method includes: acquiring a basic tag rule library; performing parsing processing on each basic tag rule to obtain a set of short-circuit mechanism trigger conditions corresponding to each basic tag rule respectively; determining the basic tag rules hit by each flow information in the flow information set to be labeled through the set of short-circuit mechanism trigger conditions corresponding to each basic tag rule respectively, and using the classification tag corresponding to the hit basic tag rule to label each flow sample to form a flow sample set.
[0105] Of course, the computer-readable storage medium provided in the embodiments of the present invention, the computer-readable instructions thereof are not limited to the method operations as described above, and can also execute the relevant operations in the method for generating a stream sample set provided in any embodiment of the present invention.
[0106] From the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course, it can also be implemented by hardware. However, in many cases, the former is a better implementation manner. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk, or an optical disc of a computer, etc., including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0107] It should be noted that in the embodiments of the above-mentioned apparatus for generating a stream sample set, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.
[0108] Note that the above is only the preferred embodiment of the present invention and the applied technical principle. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for generating a running water sample set, characterized in that, Including: Obtain a basic label rule library, where the basic label rules in the basic label rule library include multiple conditional statements connected by at least one logical connective; Perform parsing processing on each basic label rule to obtain a set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively; The short-circuit mechanism trigger conditions include the expected values of at least one target conditional statement, and the short-circuit type when all target conditional statements meet the expected values; Among them, the short-circuit type includes: direct miss skip of the basic label rule, or direct hit of the basic label rule; Determine the basic label rules hit by each piece of flow information in the flow information set to be labeled through the set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively, and label each flow sample with the classification label corresponding to the hit basic label rule to form a flow sample set.
2. The method according to claim 1, wherein Performing parsing processing on each basic label rule to obtain a set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively, includes: Perform parsing processing on each basic label rule to obtain multiple conditional statements and logical connectives; Among them, each conditional statement includes a conditional statement that meets the conditions and a conditional statement that does not meet the conditions, and set the conditional statement that meets the conditions to 1 and the conditional statement that does not meet the conditions to 0; According to the conditional statements that meet the conditions and the conditional statements that do not meet the conditions associated with the multiple conditional statements, perform permutation and combination to obtain a set of conditional statement permutation and combination; According to the logical connective, judge whether the calculation result of each conditional statement in each set of conditional statement permutation and combination is true. If so, obtain a set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively.
3. The method according to claim 2, wherein Determine the basic label rules hit by each piece of flow information in the flow information set to be labeled through the set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively, includes: Obtain the current processing flow information in the flow information set to be labeled; In the set of short-circuit mechanism trigger conditions corresponding to each basic label rule respectively, obtain the current set of short-circuit mechanism trigger conditions; Judge whether the current processing flow information meets the current set of short-circuit mechanism trigger conditions. If so, determine the basic label rule hit by the current processing flow information; If not, judge whether there are remaining basic label rules in the basic label rule library. If so, in the remaining basic label rules, obtain the current set of short-circuit mechanism trigger conditions corresponding to the remaining basic label rules, and return to execute the judgment whether the current processing flow information meets the current set of short-circuit mechanism trigger conditions. If so, determine the basic label rule hit by the current processing flow information until there are no remaining basic label rules.
4. The method according to claim 3, characterized in that, The judgment whether the current processing flow information meets the current set of short-circuit mechanism trigger conditions, includes: Parse the current processing flow information, and obtain the current processing flow information conditions associated with the current set of short-circuit mechanism trigger conditions in the current processing flow information; Judge whether the current processing flow information conditions hit the current set of short-circuit mechanism trigger conditions. If so, the current processing flow information meets the current set of short-circuit mechanism trigger conditions.
5. The method according to claim 4, characterized in that, After determining whether there are remaining basic label rules in each of the basic label rule libraries, it further includes: If not, the current processed flow information does not hit the basic label rule, and the current processed flow information is determined as an unclassified flow sample; Perform re - classification and classification label annotation on the unclassified flow sample, add the unclassified flow sample to the flow sample set, and update the flow sample set.
6. The method according to any one of claims 1-5, characterized in that, After using the classification label corresponding to the hit basic label rule to label each flow sample to form a flow sample set, it further includes: Input the flow samples in the flow sample set into a classification model for model training to obtain a flow label classification model; Determine whether the label classification accuracy of the flow label classification model meets a preset standard accuracy. If so, it is determined that the training of the flow label classification model is completed.
7. The method according to claim 6, characterized in that After using the classification label corresponding to the hit basic label rule to label each flow sample to form a flow sample set, it further includes: Based on the relevance of each flow sample in the flow sample set, determine whether there are abnormally classified flow samples among the flow samples; If so, re - classify the abnormally classified flow sample to obtain the classification label and new basic label rule corresponding to the abnormally classified flow sample; Input the abnormally classified flow sample into the flow label classification model for model training to obtain an optimized flow label classification model, and add the new basic label rule to the basic label rule library to update the basic label rule library.
8. The method according to claim 7, wherein After determining whether the label classification accuracy of the flow label classification model meets a preset standard accuracy, it further includes: If not, based on the updated basic label rule library, classify the obtained set of flow information to be labeled and input it into the flow label classification model for retraining until the label classification accuracy of the flow label classification model meets the preset standard accuracy, and it is determined that the training of the flow label classification model is completed.
9. A generating device for a flowing water sample set, characterized in that It includes: A basic label rule library acquisition module for acquiring a basic label rule library, where the basic label rules in the basic label rule library include multiple conditional statements connected by at least one logical connective; A short - circuit mechanism trigger condition set determination module for parsing and processing each basic label rule to obtain a short - circuit mechanism trigger condition set corresponding to each basic label rule respectively; the short - circuit mechanism trigger condition includes the expected value of at least one target conditional statement and the short - circuit type when all target conditional statements meet the expected value; Among them, the short - circuit type includes: direct miss skip of the basic label rule or direct hit of the basic label rule; A flow sample set formation module for determining the basic label rules hit by each flow information in the set of flow information to be labeled through the short - circuit mechanism trigger condition set corresponding to each basic label rule respectively, and using the classification label corresponding to the hit basic label rule to label each flow sample to form a flow sample set.
10. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for generating a flow sample set according to any one of claims 1 - 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for generating a set of pipelined samples as described in any one of claims 1-8.
Citation Information
Patent Citations
Bank transaction flow classification method and system integrated with label and text interaction mechanism
CN113449103A
Methods and systems for automated document classification with partially labeled data using semi-supervised learning
US20220036134A1