Label generation method, label generation system, storage medium and program product
By using the tag generation decision tree to generate tags based on merchant data characteristics, the problem of inefficient merchant tags is solved, and efficient and objective merchant tag generation is achieved.
Patent Information
- Application Number
- CN202411495928.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-11
AI Technical Summary
The method of manually analyzing merchant data and information to get labels is inefficient, requiring a lot of human resources, and the evaluation criteria are subjective and lacking unified and objective evaluation criteria.
By obtaining the label-free data set of unlabeled objects, the label generation decision tree is used to match the label based on the decreasing gain rate of the maximum weighted information of specific features, and a unified and objective merchant label is generated.
It improves the efficiency of merchant label generation, ensures the objectivity and unity of labels, and reduces the consumption of human resources.
Smart Images

Figure CN119415954A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a label generation method, a label generation system, a storage medium, and a computer program product. Background Art
[0002] In the business scenario of trading with merchants, business personnel will collect data information such as business data, transaction records, financial data, etc. of the merchants, and obtain the evaluation of the merchants as the labels of the merchants by analyzing the data information of the merchants. In this way, on the one hand, the characteristics of the merchants can be intuitively obtained through the merchant labels, and on the other hand, it is convenient to filter merchants with the same labels.
[0003] However, manually analyzing data information to obtain the merchant's label is inefficient and requires a lot of human resources. In addition, each person's evaluation criteria are different, and the evaluation basis for obtaining the label is subjective, lacking a unified and objective evaluation standard. Summary of the invention In order to solve one of the above technical problems, the present disclosure provides a label generation method, a label generation system, a storage medium and a computer program product.
[0004] The first aspect of the present disclosure provides a label generation method, comprising: obtaining an unlabeled data set of an unlabeled object, the unlabeled data set comprising a plurality of specific features and an unlabeled feature value corresponding to each of the specific features; matching a label corresponding to the unlabeled object according to the plurality of specific features contained in the unlabeled data set to generate a decision tree, the label generation decision tree corresponding to the unlabeled object comprising label generation thresholds for the first to nth specific features, and the maximum weighted information gain rates corresponding to the first to nth specific features decreasing; using the label generation threshold of the i-th specific feature to perform label matching on the unlabeled feature value corresponding to the i-th specific feature, to generate an i-th label or an i-th transfer instruction, i=1, 2, ... n-2; and in response to the i-th transfer instruction, using the label generation threshold of the i+1-th specific feature to perform label matching on the unlabeled feature value corresponding to the i+1-th specific feature, generating the i+1-th label or the i+1-th transfer instruction; wherein the maximum weighted information gain rate of the specific feature is the maximum value of the product of the weight value of the specific feature in the labeled data set and the information gain rate of the specific feature in the labeled data set; the information gain rate of the specific feature is configured as: calculated as the ratio between the labeled information gain and the labeled split information; the labeled information gain is the information gain of the specific feature in the labeled data set, and the evaluated split is the split information of the specific feature in the labeled data set.
[0005] In at least one optional embodiment, obtaining an unlabeled data set of an unlabeled object includes: obtaining an initial data set of the unlabeled object, the unlabeled data set including multiple specific features and initial feature values corresponding to each of the specific features; and performing data normalization on each of the initial feature values, and setting the normalized initial feature values as the unlabeled feature values of the corresponding specific features.
[0006] In at least one optional embodiment, the weight value of the specific feature is configured as follows: the ratio between the single labeled difference coefficient and the sum of the labeled difference coefficients is calculated; wherein the single labeled difference coefficient is 1-e j , e j is the information entropy of the j-th specific feature in the labeled data set, j=1, 2, ... n, and the sum of the labeled difference coefficients is the sum of the single labeled difference coefficients corresponding to each specific feature in the labeled data set.
[0007] In at least one optional embodiment, the labeled data set includes reference labels corresponding to multiple labeled objects, and labeled feature values corresponding to each labeled object in multiple specific features; the label generation threshold of the i-th specific feature is configured as: respectively calculating the weighted information gain rate of the labeled feature value of the i-th specific feature of each labeled object in the labeled data set, and setting the labeled feature value corresponding to the maximum weighted information gain rate as the label generation threshold of the i-th specific feature; the i-th label is configured as: obtaining the i-th reference object from the multiple labeled objects, and using the reference label corresponding to the i-th reference object as the i-th label; wherein the i-th reference object is the labeled object whose labeled feature value of the i-th specific feature is greater than the label generation threshold of the i-th specific feature, and the labeled feature value of the i-1-th specific feature is less than or equal to the label generation threshold of the i-1-th specific feature.
[0008] In at least one optional embodiment, the label generation threshold of the i-th specific feature is used to perform label matching on the unlabeled feature value corresponding to the i-th specific feature to generate the i-th label or the i-th transfer instruction, including: comparing the label generation threshold of the i-th specific feature and the unlabeled feature value corresponding to the i-th specific feature; in response to the unlabeled feature value corresponding to the i-th specific feature being greater than the label generation threshold of the i-th specific feature, generating the i-th label; and in response to the unlabeled feature value corresponding to the i-th specific feature being less than or equal to the label generation threshold of the i-th specific feature, generating the i-th transfer instruction.
[0009] In at least one optional embodiment, the label generation method further includes: in response to the n-1th transmission instruction, comparing the label generation threshold of the nth specific feature and the unlabeled feature value corresponding to the nth specific feature; in response to the unlabeled feature value corresponding to the nth specific feature being greater than the label generation threshold of the nth specific feature, generating the nth label; and in response to the unlabeled feature value corresponding to the nth specific feature being less than or equal to the label generation threshold of the nth specific feature, generating the n+1th label; wherein the nth label is configured to: obtain the nth reference object from the multiple labeled objects, and the reference corresponding to the nth reference object The label is used as the nth label; the nth reference object is the labeled object whose labeled feature value of the nth specific feature is greater than the label generation threshold of the nth specific feature, and the labeled feature value of the n-1th specific feature is less than or equal to the label generation threshold of the n-1th specific feature; the n+1th label is configured as: obtaining the n+1th reference object from multiple labeled objects, and taking the reference label corresponding to the n+1th reference object as the n+1th label; the n+1th reference object is the labeled object whose labeled feature value of the nth specific feature is less than the label generation threshold of the nth specific feature.
[0010] In at least one optional embodiment, the unlabeled data set of the unlabeled object includes the unlabeled data sets corresponding to the unlabeled object at multiple specific time nodes; the label includes the label of the unlabeled data set corresponding to the unlabeled object at multiple specific time nodes; the label generation method also includes: outputting a label change view of the unlabeled object, the label change view characterizing the change trend of multiple labels of the unlabeled object at multiple specific time nodes.
[0011] A second aspect of the present disclosure provides a label generation system, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following process: obtaining an unlabeled data set of an unlabeled object, wherein the unlabeled data set includes multiple specific features and unlabeled feature values corresponding to each of the specific features; matching a label generation decision tree corresponding to the unlabeled object according to the multiple specific features contained in the unlabeled data set, wherein the label generation decision tree corresponding to the unlabeled object includes label generation thresholds for the first to nth specific features, and the maximum weighted information gain rates corresponding to the first to nth specific features decrease; labeling the unlabeled feature value corresponding to the i-th specific feature using the label generation threshold of the i-th specific feature; Matching, generating the i-th label or the i-th transfer instruction, i=1, 2, ... n-2; and in response to the i-th transfer instruction, using the label generation threshold of the i+1-th specific feature to perform label matching on the unlabeled feature value corresponding to the i+1-th specific feature, generating the i+1-th label or the i+1-th transfer instruction; wherein the maximum weighted information gain rate of the specific feature is the maximum value of the product of the weight value of the specific feature in the labeled data set and the information gain rate of the specific feature in the labeled data set; the information gain rate of the specific feature is configured as: calculated as the ratio between the labeled information gain and the labeled split information; the labeled information gain is the information gain of the specific feature in the labeled data set, and the evaluated split is the split information of the specific feature in the labeled data set.
[0012] A third aspect of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the label generation method of any embodiment of the present disclosure is executed.
[0013] A fourth aspect of the present disclosure provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the label generation method of any embodiment of the present disclosure is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0015] Figure 1 It is a schematic diagram of a scenario in which a label generation method according to some embodiments of the present disclosure performs label generation.
[0016] Figure 2It is a schematic diagram of the structure of a label generation system of some embodiments of the present disclosure.
[0017] Figure 3 It is a flowchart of a label generation method according to some embodiments of the present disclosure.
[0018] Figure 4 is a schematic diagram of a label generation decision tree according to some embodiments of the present disclosure.
[0019] Figure 5 It is a flowchart of a label generation method according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0020] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0021] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0022] Unless otherwise specified, the exemplary embodiments / embodiments shown will be understood as providing exemplary features of various details of some ways in which the technical concept of the present disclosure can be implemented in practice. Therefore, unless otherwise specified, the features of the various embodiments / embodiments can be combined, separated, interchanged and / or rearranged without departing from the technical concept of the present disclosure.
[0023] The use of cross-hatching and / or shading in the accompanying drawings is generally used to make the boundaries between adjacent components clear. As such, unless otherwise specified, the presence or absence of cross-hatching or shading does not convey or indicate any preference or requirement for the specific materials, material properties, dimensions, proportions, commonalities between the components shown, and / or any other characteristics, attributes, properties, etc. of the components. In addition, in the accompanying drawings, the sizes and relative sizes of the components may be exaggerated for clarity and / or descriptive purposes. When the exemplary embodiments can be implemented differently, the specific process sequence can be performed in a different order than described. For example, two successively described processes can be performed substantially simultaneously or in an order opposite to the described order. In addition, the same figure numbers represent the same components.
[0024] When a component is referred to as being "on" or "over," "connected to," or "coupled to" another component, the component may be directly on, directly connected to, or directly coupled to the other component, or intervening components may be present. However, when a component is referred to as being "directly on," "directly connected to," or "directly coupled to" another component, there are no intervening components. For this purpose, the term "connected" may refer to a physical connection, an electrical connection, etc., with or without intervening components.
[0025] The terms used herein are for the purpose of describing specific embodiments, and are not intended to be restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "(the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups are not excluded from existence or addition. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or the values provided that will be recognized by those of ordinary skill in the art.
[0026] In a business scenario of transactions with merchants, business personnel will collect merchant data information, and obtain the merchant's evaluation as a label for the merchant by analyzing the merchant's data information. However, the method of manually analyzing data information to obtain merchant labels is relatively inefficient and requires a lot of human resources. In addition, each person's evaluation criteria are different, and the basis for obtaining the evaluation of the label is subjective, lacking a unified and objective evaluation standard. Based on the above problems, the present disclosure provides a label generation method, and a label generation system 1000 that applies the label generation method, which can adopt a unified and objective evaluation standard to efficiently generate merchant labels. Among them, the label generation system 1000 can be a computer device.
[0027] Figure 1 A schematic diagram of a scenario in which the label generation system 1000 of an embodiment of the present disclosure applies the label generation method to generate labels is shown.
[0028] The label generation system 1000 stores multiple label generation decision trees. Different label generation decision trees are used to generate labels for data sets with different characteristics. The label generation decision tree includes split nodes and result nodes. The result node is a node for generating labels. Each result node corresponds to a label. When the decision process of the decision tree reaches a certain result node, the label of the result node is output. The split node is a judgment node, which is used to judge whether the characteristic value of a feature meets a certain condition, and determines whether the next node of the split node is a result node or another split node based on whether the characteristic value meets certain conditions.
[0029] In one example, the split node uses the label generation threshold of the feature as the judgment condition. If the feature value of the feature exceeds the label generation threshold of the feature, it goes to the result node; otherwise, if the feature value of the feature does not exceed the label generation threshold of the feature, it goes to another split node. In particular, if the split node is the last split node in the label generation decision tree, when the feature value of the feature corresponding to the split node does not exceed the label generation threshold of the feature, it goes to another result node. In other words, the label generation threshold is used to determine whether the merchant corresponding to the data set matches the label of the result node. If it matches, the label of the merchant is generated with the label corresponding to the matching result node; if it does not match, it enters the judgment of the next label generation threshold.
[0030] For example, the data set collected from supplier A includes two features, namely "product quality" and "delivery time". The first label generation decision tree includes the label generation thresholds of the two features "product quality" and "delivery time", and the second label generation decision tree includes the label generation thresholds of the two features "product quality" and "supply capacity". When generating labels for supplier A, the first label generation decision tree is used to generate labels.
[0031] Supplier A's data set also includes the characteristic value X1 of "product quality" and the characteristic value X2 of "delivery time". Assume that in the first label generation decision tree, the label generation threshold of "product quality" is Y1, and the label generation threshold of "delivery time" is Y2. Compare the size of X1 and Y1 at the first split node. If X1>Y1, go to the result node and generate it as "preferred cooperative merchant"; if X1≤Y1, go to the second split node. Compare the size of X2 and Y2 at the second split node. If X2>Y2, go to the result node and get the evaluation result of "ordinary merchant"; if X2≤Y2, go to another result node and get the evaluation result of "pending merchant".
[0032] Among them, whether to compare X1 and Y1 first or X2 and Y2 first depends on the size of the maximum weighted information gain rate of the feature "product quality" and the maximum weighted information gain rate of the feature "delivery time". The maximum weighted information gain rate of the feature will be introduced in detail later and will not be discussed here.
[0033] In this way, when a supplier's data set is obtained, a decision tree can be generated by matching labels of the same type according to the type of features contained in the supplier's data set, and the feature values in the supplier's data set are generated by using the matched labels to generate a decision tree to obtain the supplier's label. This has the advantages of high evaluation efficiency and objective evaluation results.
[0034] Furthermore, the label generation method provided by the present disclosure can perform label matching based on the feature values of various features in the supplier's data set, that is, it can perform label matching based on multi-dimensional data, making risk assessment more reliable.
[0035] Figure 2 The structure diagram of the label generation system 1000 according to the embodiment of the present disclosure is shown. The label generation system 1000 includes a processor 1200 and a memory 1300, and the memory 1300 stores a computer program.
[0036] Please combine Figure 3 When the computer program is executed by the processor 1200, the processor 1200 may execute the following steps included in the tag generation method M100: S110: Acquire an unlabeled data set of unlabeled objects, where the unlabeled data set includes a plurality of specific features and an unlabeled feature value corresponding to each specific feature. This process can be implemented by the acquisition module 110.
[0037] S120: Generate a label decision tree corresponding to the unlabeled object according to the multiple specific features included in the unlabeled data set, wherein the label generation decision tree corresponding to the unlabeled object includes label generation thresholds for the first to nth specific features, and the maximum weighted information gain rates corresponding to the first to nth specific features decrease. This process can be implemented by the matching module 120.
[0038] S130: Use the label generation threshold of the i-th specific feature to perform label matching on the unlabeled feature value corresponding to the i-th specific feature to generate the i-th label or the i-th transfer instruction, i=1, 2, . . . n-2. This process can be implemented by the judgment module 130.
[0039] S140: In response to the i-th transfer instruction, use the label generation threshold of the i+1-th specific feature to perform label matching on the unlabeled feature value corresponding to the i+1-th specific feature to generate the i+1-th label or the i+1-th transfer instruction. This process can be implemented by the judgment module 130.
[0040] In step S110, the unlabeled object refers to the object to be labeled, which may be a merchant such as a supplier or a purchaser.
[0041] The unlabeled dataset includes multiple specific features and the unlabeled feature value of each specific feature. A specific feature is a feature that describes a specific attribute of an unlabeled object. For example, a specific feature can be a feature such as "product quality", "delivery time", and "supply capacity". The unlabeled feature value of a specific feature describes the quality of the specific feature of the unlabeled object in the form of a numerical value. The larger the unlabeled feature value, the better the specific feature that represents the unlabeled object; the smaller the unlabeled feature value, the worse the specific feature that represents the unlabeled object. For example, the larger the unlabeled feature value of the feature "product quality" of the unlabeled object, the better the product quality that represents the unlabeled object; the smaller the unlabeled feature value of the feature "delivery time" of the unlabeled object, the slower the delivery time that represents the unlabeled object.
[0042] In step S120, the label generation decision tree is composed of a split node and a result node. A split node includes at least two child nodes, and a result node has no child nodes. The child nodes of a split node can be another split node or a result node. In particular, the child nodes of the last split node in the label generation decision tree are all result nodes.
[0043] Each split node has a corresponding label generation threshold for a specific feature. The label generation threshold for a specific feature is used to perform label matching on the unlabeled feature value corresponding to the specific feature. The label matching method can be to compare the label generation threshold with the unlabeled feature value to determine whether the unlabeled feature value matches the label corresponding to the label generation threshold, or it can be based on the label generation threshold to determine whether the unlabeled feature value meets a certain condition to determine whether the unlabeled feature value matches the label corresponding to the label generation threshold. There is no limitation here.
[0044] Each result node has a corresponding label. Different result nodes can correspond to the same or different labels.
[0045] The order of the split nodes is related to the specific features corresponding to them. For example, the child nodes of the first split node include the second split node and the first result node, and the child nodes of the second split node include the third split node and the second result node. The first split node has a label generation threshold of the first specific feature, the second split node has a label generation threshold of the second specific feature, and the third split node has a label generation threshold of the third specific feature.
[0046] When using a label generation decision tree to perform label matching on unlabeled feature values in an unlabeled data set, firstly, at the first split node, the label generation threshold of the first specific feature is used to perform label matching on the unlabeled feature value corresponding to the first specific feature. Possible results include: generating the first label, or generating the first transfer instruction. Among them, generating the first label indicates that the unlabeled feature value corresponding to the first specific feature matches the label corresponding to the label generation threshold of the first specific feature (that is, the label corresponding to the first result), and in the label generation decision tree, going from the first split node to the first result node, outputting the first label in the first result node. Obtaining the first transfer instruction indicates that the unlabeled feature value corresponding to the first specific feature does not match the label corresponding to the label generation threshold of the first specific feature (that is, the label corresponding to the first result), and in the label generation decision tree, going from the first split node to the second split node, it is necessary to use the label generation threshold of the second specific feature to perform label matching on the unlabeled feature value corresponding to the second specific feature.
[0047] Similarly, the label generation decision tree is used to perform label matching on the unlabeled feature values in the unlabeled data set, that is, the label generation threshold of the i-th specific feature is used in turn to perform label matching on the unlabeled feature value corresponding to the i-th specific feature. If a label can be produced (the i-th label), the label is output as the label of the unlabeled object; if the label cannot be obtained, the label generation threshold of the i+1-th specific feature is used to continue to perform label matching on the unlabeled feature value corresponding to the i+1-th specific feature until a label can be generated.
[0048] That is, in step S130 and step S140, generating a label means ending the label matching process of the label generation decision tree, and the generated label is the label of the unlabeled object. Obtaining the transfer instruction means continuing the label matching process of the label generation decision tree until a label is generated.
[0049] The order of the first to nth specific features is the order of the maximum weighted information gain rate corresponding to the specific features in descending order. The maximum weighted information gain rate of the specific feature is the maximum value of the product of the weight value of the specific feature in the labeled data set and the information gain rate of the specific feature in the labeled data set; the information gain rate of the specific feature is configured as: the ratio between the labeled information gain and the labeled split information is calculated; the labeled information gain is the information gain of the specific feature in the labeled data set, and the labeled split information is the split information of the specific feature in the labeled data set. The labeled data set includes labeled feature values corresponding to multiple specific features of multiple labeled objects, and reference labels corresponding to multiple labeled objects.
[0050] Table 1 For example, please refer to Table 1, which is an example of a labeled data set. Among them, multiple labeled objects include "Supplier A", "Supplier B", "Supplier C", and "Supplier D", and the corresponding reference labels are "Preferred Cooperation Merchant", "Ordinary Merchant", "Ordinary Merchant", and "Pending Merchant", respectively. Multiple specific features include the feature "order fulfillment rate", the feature "transaction record", and the feature "supply capacity". Each labeled object has corresponding labeled feature values in multiple specific features. For example, the labeled feature value of "Supplier A" in "Order Fulfillment Rate" is 0.75. At this time, the reference label corresponding to the labeled feature value 0.75 in "Order Fulfillment Rate" is "Preferred Cooperation Merchant". Other items are not listed one by one.
[0051] Please combine Figure 4 , assuming that the first specific feature is "order fulfillment rate", the second specific feature is "transaction record", and the third specific feature is "supply capacity". And assuming that the maximum weighted information gain rate of "order fulfillment rate" is WG max (S, order fulfillment rate), the maximum weighted information gain rate of "transaction record" is denoted as WG max (S, transaction record), the maximum weighted information gain rate of “supply capacity” is denoted as WG max (S, supply capacity). Then, WG max (S, order fulfillment rate) > WG max (S, transaction record) > WG max (S, supply capacity).
[0052] As shown in Table 1, each specific feature includes 4 corresponding labeled feature values, and each labeled feature value can be used to calculate a weighted information gain rate. In the labeled data set in Table 1, the maximum weighted information gain rate of a specific feature is the largest one among the 4 weighted information gain rates of the specific feature.
[0053] Taking "order fulfillment rate" as an example, the weighted information gain rate of "order fulfillment rate" includes WG (S, order fulfillment rate ≤ 0.75), WG (S, order fulfillment rate ≤ 0.50), WG (S, order fulfillment rate 0.25) and WG (S, order fulfillment rate ≤ 0.00), among which the one with the largest value is WG. max(S, order fulfillment rate). Among them, order fulfillment rate ≤ 0.75 is the segmentation condition of the specific feature "order fulfillment rate", which represents the segmentation of the labeled data set S with order fulfillment rate ≤ 0.75. Similarly, order fulfillment rate ≤ 0.50, order fulfillment rate ≤ 0.25 and order fulfillment rate ≤ 0.00 are different segmentation conditions of the specific feature "order fulfillment rate". Order fulfillment rate ≤ 0.00 is meaningless, so WG (S, order fulfillment rate ≤ 0.00) is discarded.
[0054] The weighted information gain rate WG(S, A) can be calculated by the following formula 1.
[0055] Formula 1: WG (S, A) = w (A) GainRatio(S,A).
[0056] Among them, S is a labeled dataset, A is a specific feature, w(A) is the weight value of the specific feature, and GainRatio(S, A) is the information gain rate of the specific feature.
[0057] The information gain rate GainRatio (S, A) of a specific feature can be calculated using the following formula 2.
[0058] Formula 2: .
[0059] in, is the information gain of a specific feature A in the labeled dataset S, denoted as labeled information gain . is the split information of a specific feature A in the labeled dataset S, denoted as labeled split information .
[0060] Labeled Information Gain It can be calculated by the following formula 3.
[0061] Formula 3: .
[0062] in, is the subset obtained by segmenting the labeled dataset S by the label generation threshold A of a specific feature, z is the number of subsets obtained by segmenting the labeled dataset S by the segmentation condition A of a specific feature, is the information entropy of the labeled dataset S, is the tth subset The number of samples, is the number of samples in the labeled dataset S, is the tth subset Information entropy.
[0063] Any set and S anyThe information entropy of can be calculated by the following formula 4.
[0064] Formula 4: .
[0065] Where k is the set and S any The number of types of reference tags in , is the proportion of reference labels in the fth category.
[0066] There are label split information It can be calculated by the following formula 5.
[0067] Formula 5: .
[0068] Since the weight value corresponding to each labeled feature value of the feature "order fulfillment rate" is w (order fulfillment rate), when comparing the sizes of the four weighted information gain rates of the feature "order fulfillment rate", it is only necessary to compare the information gain rates of the four labeled feature values.
[0069] Taking the calculation of WG (S, order fulfillment rate ≤ 0.50) as an example, we can get from Formula 1: WG (S, A) = w (order fulfillment rate) GainRatio(S, order fulfillment rate 0.50).
[0070] From formula 2, we can get: .
[0071] Combined with Table 1, the order fulfillment rate ≤ 0.50 is a split condition, and the labeled data set S is split into and There are two subsets. The samples that meet the condition "order fulfillment rate ≤ 0.50" account for , is a subset The samples that do not meet the condition "order fulfillment rate ≤ 0.50" account for , is a subset The sample in. That is, z=2 in Formula 3, = , = .
[0072] Substituting into formula 3, we get: .
[0073] The number of reference label types in the labeled dataset S is k=3, and the proportion of the reference label "preferred cooperative merchants" is recorded as , ; The proportion of reference label "ordinary merchants" is recorded as , ; The proportion of reference label "pending merchants" is recorded as , .
[0074] Substituting into formula 4, we get: .
[0075] Subset The number of reference label types in k=2, and the proportion of reference label “ordinary merchants” is recorded as , ; The proportion of reference label "pending merchants" is recorded as , .
[0076] Substituting into formula 4, we get: .
[0077] Subset The number of reference tag types in k=1, and the proportion of reference tag "preferred cooperative merchants" is recorded as , .
[0078] Substituting into formula 4, we get: .
[0079] The above , , Substitute the value of into formula 3 and calculate: .
[0080] From formula 5, we can get: .
[0081] The above and Substitute the value of into formula 2 and calculate: .
[0082] Will Substituting the value of into formula 1, we can get: WG (S, ) = w ( ) GainRatio(S, ) = w ( ) .
[0083] Similarly, we can calculate and value. Since for " "," "and" ”, the corresponding w( ) are the same. Therefore, in , and The largest value among WG (S, order fulfillment rate ≤ 0.25), WG (S, order fulfillment rate 0.50) and WG (S, order fulfillment rate ≤ 0.75).
[0084] In an optional implementation, the weight values of specific features may be set by assigning values to the weight values corresponding to each specific feature.
[0085] In an optional implementation, the weight value of a specific feature is configured as follows: the weight value is obtained by calculating the ratio between a single labeled difference coefficient and the sum of the labeled difference coefficients.
[0086] Specifically, the weight value w of a specific feature ( ) can be calculated by the following formula 6.
[0087] Formula 6: .
[0088] in, is the single-item labeled variance coefficient, , e j It is the information entropy of the j-th specific feature in the labeled data set S, j=1, 2,...n, and the sum of labeled difference coefficients is the sum of the individual labeled difference coefficients corresponding to each specific feature in the labeled data set.
[0089] The information entropy e of the j-th specific feature j , can be calculated by the following formula 7.
[0090] Formula 7: .
[0091] Among them, m is the total number of labeled objects in the labeled dataset S, is the proportion of the evaluation value of the g-th labeled object in the j-th specific feature. It can be calculated by the following formula 8.
[0092] Formula 8: .
[0093] in, is the reference label of the g-th labeled object at the j-th specific feature.
[0094] The feature weight values corresponding to the specific features "order fulfillment rate", "transaction record" and "supply capacity" in Table 1 above can be calculated by the above formulas 6, 7 and 8, and the calculation results are shown in the following Table 2.
[0095] Table 2 In this way, for each specific feature in the labeled data set S, the above formulas 1 to 8 can be combined to calculate its maximum weighted information gain rate.
[0096] In an optional embodiment, the label generation threshold of the i-th specific feature is configured as: calculating the weighted information gain rate of the labeled feature value of the i-th specific feature of each labeled object in the labeled data set, and setting the labeled feature value corresponding to the maximum weighted information gain rate as the label generation threshold of the i-th specific feature.
[0097] For example, please refer to Table 1, assuming that the i-th specific feature is "order fulfillment rate", and the labeled feature values of the labeled objects "supplier A", "supplier B", "supplier C", and "supplier D" in "order fulfillment rate" are 0.75, 0.50, 0.25, and 0.00 respectively. From the above calculation, it can be seen that when the segmentation condition is "order fulfillment rate ≤ 0.50", the maximum weighted information gain rate WG of the specific feature "order fulfillment rate" is obtained. max (S, order fulfillment rate), so the maximum weighted information gain rate WG max The labeled feature value corresponding to (S, order fulfillment rate) is 0.50, and "0.50" is set as the label generation threshold for the specific feature "order fulfillment rate".
[0098] In an optional embodiment, the i-th label is configured to: obtain the i-th reference object from multiple labeled objects, and use the reference label corresponding to the i-th reference object as the i-th label; wherein the i-th reference object is a labeled object whose labeled feature value of the i-th specific feature is greater than the label generation threshold of the i-th specific feature, and whose labeled feature value of the i-1-th specific feature is less than or equal to the label generation threshold of the i-1-th specific feature.
[0099] For example, please combine Figure 4 Assuming that the i-1th specific feature is "order fulfillment rate" and the label generation threshold of "order fulfillment rate" is "0.50" and the i-th specific feature is "transaction record" and the label generation threshold of "transaction record" is "0.50", when selecting the i-th reference object, it is necessary to satisfy that the labeled feature value of the i-th reference object in "transaction record" is greater than the label generation threshold of "transaction record" 0.50, and the labeled feature value of "order fulfillment rate" is less than or equal to the label generation threshold of "order fulfillment rate" 0.50. In Table 1, the i-th reference object that meets the conditions is "supplier B", and the reference label of "supplier B" is "ordinary merchant". In the case that the i-1th specific feature is "order fulfillment rate" and the i-th specific feature is "transaction record", the i-th label obtained is "ordinary merchant".
[0100] In an optional implementation, step S130 includes step S131, step S132 and step S133.
[0101] S131: Compare the label generation threshold of the i-th specific feature with the unlabeled feature value corresponding to the i-th specific feature.
[0102] S132: In response to the unlabeled feature value corresponding to the ith specific feature being greater than the label generation threshold of the ith specific feature, generate an ith label.
[0103] S133: In response to the unlabeled feature value corresponding to the ith specific feature being less than or equal to the label generation threshold of the ith specific feature, generating an ith transfer instruction.
[0104] The unlabeled feature value corresponding to the i-th specific feature is greater than the label generation threshold of the i-th specific feature, indicating that the unlabeled feature value corresponding to the i-th specific feature matches the i-th label corresponding to the label generation threshold of the i-th specific feature, and the i-th label is generated as the label of the unlabeled object.
[0105] The unlabeled feature value corresponding to the i-th specific feature is less than or equal to the label generation threshold of the i-th specific feature, indicating that the unlabeled feature value corresponding to the i-th specific feature does not match the i-th label corresponding to the label generation threshold of the i-th specific feature, and then the i-th transfer instruction is generated to continue the comparison of the subsequent splitting nodes of the i+1-th specific feature.
[0106] For example, please combine Figure 4 As shown in Table 1, the first specific feature is "order fulfillment rate", and the label generation threshold of the specific feature "order fulfillment rate" is 0.50. Assume that in the unlabeled dataset, the unlabeled feature value corresponding to "order fulfillment rate" is 0.60. Since 0.60>0.50, the decision process goes to the result node and generates the first label. Assume that in the unlabeled dataset, the unlabeled feature value corresponding to "order fulfillment rate" is 0.40. Since 0.40<0.50, the decision process goes to the next split node and generates the first transfer instruction. The first transfer instruction is used to trigger the label matching of the split node of the second specific feature "transaction record".
[0107] In particular, when the specific feature is the last one in the label generation decision tree, that is, for the nth specific feature, its child nodes are all result nodes. In other words, when performing label matching on the split node corresponding to the nth specific feature, no transfer instruction will be obtained, but at least one label will be obtained. For example, when performing label matching on the nth specific feature, there are 2 types of labels obtained, which are recorded as the nth label and the n+1th label.
[0108] The nth evaluation result is configured as follows: obtaining the nth reference object from multiple labeled objects, and taking the reference label corresponding to the nth reference object as the i-th label; the nth reference object is a labeled object whose labeled feature value of the nth specific feature is greater than the label generation threshold of the nth specific feature, and whose labeled feature value of the n-1th specific feature is less than or equal to the label generation threshold of the n-1th specific feature.
[0109] The n+1th evaluation result is configured as: obtaining the n+1th reference object from multiple labeled objects, and taking the reference label corresponding to the n+1th reference object as the i-th label; the n+1th reference object is a labeled object whose labeled feature value of the n-th specific feature is less than the label generation threshold of the label generation threshold of the n-th specific feature.
[0110] For example, please combine Figure 4 As shown in Table 1, "supply capacity" is the nth specific feature, and the label generation threshold of the specific feature "supply capacity" is "0.33"; "transaction record" is the n-1th specific feature, and the label generation threshold of "transaction record" is "0.50". When selecting the nth reference object, it is necessary to satisfy that the labeled feature value of the nth reference object in "supply capacity" is greater than the label generation threshold of 0.33 of "supply capacity", and the labeled feature value of "transaction record" is less than or equal to the label generation threshold of 0.50 of "transaction record". The reference object that meets the conditions in Table 1 is "supplier B", and the reference label of "supplier B" is "ordinary merchant", so the nth evaluation result is "ordinary merchant". When selecting the nth reference object, it is necessary to satisfy that the labeled feature value of the nth reference object in "supply capacity" is less than the label generation threshold of 0.33 of "supply capacity". The reference object that meets the conditions in Table 1 is "supplier D", and the reference label of "supplier D" is "pending merchant", so the n+1th evaluation result is "pending merchant".
[0111] In an optional implementation, step S130 also includes step S134, step S135 and step S136.
[0112] S134: In response to the n-1th transfer instruction, compare the label generation threshold of the nth specific feature with the unlabeled feature value corresponding to the nth specific feature; S135: In response to the unlabeled feature value corresponding to the nth specific feature being greater than the label generation threshold of the nth specific feature, obtaining the nth label.
[0113] S136: In response to the unlabeled feature value corresponding to the nth specific feature being less than or equal to the label generation threshold of the nth specific feature, obtaining the (n+1)th label.
[0114] For example, please combine Figure 4As in Table 1, n=3, the third specific feature is "supply capacity", and the label generation threshold of the specific feature "supply capacity" is 0.33. Assume that in the unlabeled dataset, the unlabeled feature value corresponding to "order fulfillment rate" is 0.40. Since 0.40>0.33, the decision process moves to the third result node and obtains the third label. Assume that in the unlabeled dataset, the unlabeled feature value corresponding to "order fulfillment rate" is 0.10. Since 0.10<0.33, the decision process moves to the fourth result node and obtains the fourth label.
[0115] See also Figure 4 For example, a certain unlabeled object “supplier E” has an unlabeled dataset that includes specific features “order fulfillment rate”, “transaction record”, and “supply capacity”, and the corresponding feature values are 0.35 (order fulfillment rate), 0.65 (transaction record), and 0.45 (supply capacity).
[0116] When performing label matching on "Supplier E", first compare the unlabeled feature value 0.35 corresponding to the first specific feature "order fulfillment rate" with the label generation threshold 0.50 of the first specific feature "order fulfillment rate". In response to 0.35<0.50, the first transfer instruction is obtained.
[0117] In response to the first transfer instruction, the unlabeled feature value 0.65 corresponding to the second specific feature "transaction record" is compared with the label generation threshold 0.50 of the second specific feature "transaction record", and in response to 0.65>0.50, the second label is obtained.
[0118] In an optional implementation, step S110 includes step S111 and step S112.
[0119] Step S111: obtaining an initial data set of unlabeled objects, where the unlabeled data set includes a plurality of specific features and initial feature values corresponding to each specific feature.
[0120] Step S112: performing data normalization processing on each initial eigenvalue respectively, and setting the normalized initial eigenvalue as the unlabeled eigenvalue of the corresponding specific feature.
[0121] Among them, the unlabeled feature values of each specific feature constitute the unlabeled data set.
[0122] In this way, it can be ensured that a unified evaluation standard can be used to generate labels for different types of specific features.
[0123] For example, the initial dataset of unlabeled objects “Supplier E”, “Supplier F”, “Supplier G”, and “Supplier H” is shown in Table 3 below.
[0124] Table 3 Among them, the units of the initial feature values of the specific features "product quality score", "delivery time" and "customer feedback" are inconsistent, and data normalization is required to unify the dimensions. An example of the unlabeled data set of the unlabeled objects "supplier E", "supplier F", "supplier G" and "supplier H" obtained after normalization is shown in Table 4 below.
[0125] Table 4 Among them, the characteristic values of "product quality score" and "delivery time" are calculated by the maximum-minimum normalization method to calculate the normalized initial characteristic values. For example, the normalized initial characteristic values are calculated by the following formula 9.
[0126] Formula 9: .
[0127] in, is the normalized initial eigenvalue corresponding to the i-th specific feature, that is, the unlabeled eigenvalue corresponding to the i-th specific feature, The initial eigenvalue corresponding to the i-th specific feature, is the smallest initial eigenvalue of the i-th specific feature, is the largest initial eigenvalue of the i-th specific feature.
[0128] The initial eigenvalue of "customer feedback" is first converted into a score according to a specific conversion rule, for example, "excellent" is converted into 3 points, "good" is converted into 2 points, etc. Then, the normalized initial eigenvalue is calculated using Formula 9 for the converted score.
[0129] In an optional implementation, the unlabeled data set of the unlabeled object includes the unlabeled data sets corresponding to the unlabeled object at multiple specific time nodes; the label includes the label of the unlabeled data sets corresponding to the unlabeled object at multiple specific time nodes.
[0130] For example, the unlabeled data set of a certain unlabeled object "supplier E" includes 6 unlabeled data sets of "supplier E" in January, February, March, April, May and June, that is, the unlabeled data sets corresponding to 6 specific time nodes. The labels obtained by label matching for the unlabeled object "supplier E" include the labels of the unlabeled data sets corresponding to the above 6 specific time nodes.
[0131] In an optional implementation, the tag generation method M100 further includes step S150.
[0132] S150: Outputting a label change view of the unlabeled object, where the label change view represents a change trend of multiple labels of the unlabeled object at multiple specific time nodes.
[0133] See also Figure 5 , Figure 5 The label change view is obtained by matching labels of four unlabeled objects, namely, unlabeled object A, unlabeled object B, unlabeled object C, and unlabeled object D, with each month from 2022 to 2024 as a specific time node. The horizontal axis of the label change view is the specific time node, and the vertical axis is the label. In this way, labels can be provided more intuitively.
[0134] The embodiments of the present disclosure also provide a computer-readable storage medium, in which execution instructions are stored, and when the execution instructions are executed by a processor, they are used to implement the above-mentioned method. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit programs for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0135] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which implements the question answering method provided in the embodiments of the present disclosure when the computer program / instruction processor is executed.
[0136] The method in the embodiment of the present disclosure can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function of the present application is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM or other programmable device.
[0137] A computer program or instruction may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, a computer program or instruction may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. A computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. Available media may be magnetic media, such as a floppy disk, hard disk, or magnetic tape; may also be optical media, such as a digital video disk; or may be semiconductor media, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0138] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0139] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic representations of the above terms are not necessarily the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments / methods or examples described in this specification and the features of the different embodiments / methods or examples, unless they are contradictory.
[0140] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0141] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure and the technical solutions of the present disclosure, rather than limiting them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art who is familiar with the present technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A label generation method, characterized in that: include: Acquire an unlabeled data set of unlabeled objects, wherein the unlabeled data set includes a plurality of specific features and an unlabeled feature value corresponding to each of the specific features; A label generation decision tree corresponding to the unlabeled object is matched according to the multiple specific features included in the unlabeled data set, wherein the label generation decision tree corresponding to the unlabeled object includes label generation thresholds for the first to nth specific features, and the maximum weighted information gain rates corresponding to the first to nth specific features decrease in a descending manner; Using the label generation threshold of the i-th specific feature to perform label matching on the unlabeled feature value corresponding to the i-th specific feature, to generate the i-th label or the i-th transfer instruction, i=1, 2, ...n-2; as well as In response to the i-th transfer instruction, a label generation threshold of the i+1-th specific feature is used to perform label matching on the unlabeled feature value corresponding to the i+1-th specific feature to generate an i+1-th label or an i+1-th transfer instruction; Among them, the maximum weighted information gain rate of the specific feature is the maximum value of the product of the weight value of the specific feature in the labeled data set and the information gain rate of the specific feature in the labeled data set; the information gain rate of the specific feature is configured as: calculated as the ratio between the labeled information gain and the labeled split information; the labeled information gain is the information gain of the specific feature in the labeled data set, and the evaluated split is the split information of the specific feature in the labeled data set.
2. The label generation method according to claim 1, characterized in that: Get an unlabeled dataset of unlabeled objects, including: Acquire an initial data set of the unlabeled object, the unlabeled data set comprising a plurality of specific features and an initial feature value corresponding to each of the specific features; and Data normalization is performed on each of the initial feature values, and the normalized initial feature values are set as the unlabeled feature values of the corresponding specific features.
3. The label generation method according to claim 1, characterized in that: The weight value of the specific feature is configured as follows: the weight value is obtained by calculating the ratio between the single labeled difference coefficient and the total labeled difference coefficient; Among them, the single item has a label difference coefficient of 1-e j , e j is the information entropy of the j-th specific feature in the labeled data set, j=1, 2, ... n, and the sum of the labeled difference coefficients is the sum of the single labeled difference coefficients corresponding to each specific feature in the labeled data set.
4. The label generation method according to claim 1, characterized in that: The labeled data set includes reference labels corresponding to each of the plurality of labeled objects, and labeled feature values corresponding to each of the plurality of specific features of each of the labeled objects; The label generation threshold of the i-th specific feature is configured as follows: the weighted information gain rate of the labeled feature value of the i-th specific feature of each labeled object in the labeled data set is calculated respectively, and the labeled feature value corresponding to the maximum weighted information gain rate is set as the label generation threshold of the i-th specific feature; The i-th label is configured to: obtain the i-th reference object from multiple labeled objects, and use the reference label corresponding to the i-th reference object as the i-th label; wherein the i-th reference object is a labeled object whose labeled feature value of the i-th specific feature is greater than the label generation threshold of the i-th specific feature, and whose labeled feature value of the i-1-th specific feature is less than or equal to the label generation threshold of the i-1-th specific feature.
5. The label generation method according to claim 1, characterized in that: Using the label generation threshold of the i-th specific feature to perform label matching on the unlabeled feature value corresponding to the i-th specific feature to generate the i-th label or the i-th transfer instruction includes: Comparing the label generation threshold of the i-th specific feature with the unlabeled feature value corresponding to the i-th specific feature; In response to the unlabeled feature value corresponding to the i-th specific feature being greater than the label generation threshold of the i-th specific feature, generating the i-th label; and In response to the unlabeled feature value corresponding to the i-th specific feature being less than or equal to the label generation threshold of the i-th specific feature, the i-th transfer instruction is generated.
6. The label generation method according to claim 1, characterized in that: Also includes: In response to the n-1th transmission instruction, comparing the label generation threshold of the nth specific feature with the unlabeled feature value corresponding to the nth specific feature; In response to the unlabeled feature value corresponding to the nth specific feature being greater than a label generation threshold of the nth specific feature, generating an nth label; as well as In response to the unlabeled feature value corresponding to the nth specific feature being less than or equal to the label generation threshold of the nth specific feature, generating an (n+1)th label; The nth label is configured as follows: obtaining an nth reference object from a plurality of labeled objects, and using a reference label corresponding to the nth reference object as the nth label; the nth reference object is a labeled object whose labeled feature value of the nth specific feature is greater than a label generation threshold of the nth specific feature, and whose labeled feature value of the n-1th specific feature is less than or equal to a label generation threshold of the n-1th specific feature; The n+1th label is configured to: obtain the n+1th reference object from multiple labeled objects, and use the reference label corresponding to the n+1th reference object as the n+1th label; the n+1th reference object is the labeled object whose labeled feature value of the nth specific feature is less than the label generation threshold of the nth specific feature.
7. The label generation method according to claim 1, characterized in that: The unlabeled data set of the unlabeled object includes the unlabeled data sets corresponding to the unlabeled object at multiple specific time nodes; the label includes the label of the unlabeled data sets corresponding to the unlabeled object at multiple specific time nodes; The label generation method further includes: A label change view of the unlabeled object is output, where the label change view represents a change trend of the multiple labels of the unlabeled object at the multiple specific time nodes.
8. A label generation system, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the label generation method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the label generation method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product comprises a computer program, which is used at least to implement the label generation method according to any one of claims 1 to 7 when executed by a processor.