A strategy determination method, device and related equipment
By iteratively adjusting the preset values of sub-strategies in the risk strategy, the recall rate and false positive rate are optimized, solving the problem of low accuracy in risk strategy classification in existing technologies, and achieving more efficient risk identification and improved user experience.
Patent Information
- Application Number
- CN202610934506.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-08-25
AI Technical Summary
In existing technologies, risk strategies based on past risk classification experience cannot effectively cope with new risks, resulting in low optimization efficiency and low classification accuracy.
By iteratively adjusting the preset values of sub-strategies in the risk strategy, the recall rate and false positive rate are optimized, and a more accurate strategy is obtained after meeting the preset conditions. This includes methods such as iterative adjustment based on classification results and random exchange of preset values of sub-strategies.
It improved the accuracy of risk strategy classification, reduced the proportion of misclassified labels, enhanced risk identification capabilities, reduced interference with normal users, and improved user experience and business efficiency.
Smart Images

Figure CN122636029A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a strategy determination method, apparatus and related equipment. Background Technology
[0002] In risk control and prevention scenarios, electronic devices can be equipped with risk strategies that can classify users and determine their risk levels.
[0003] In related technologies, risk strategies can be set based on past risk classification experience. However, risk strategies based on past experience cannot effectively cope with new risks, and past experience cannot be quickly updated to address new risks, resulting in the inability to optimize risk strategies in real time and low optimization efficiency. While machine learning methods can improve the optimization efficiency of risk strategies, the classification accuracy of risk strategies optimized by machine learning methods is relatively low. Summary of the Invention
[0004] The purpose of this invention is to provide a strategy determination method, apparatus, and related equipment to solve the problem of low classification accuracy of optimized risk strategies in the prior art. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, a strategy determination method is provided, the method comprising:
[0006] Based on the classification results of the first strategy, a first recall rate and a first false positive rate corresponding to the first strategy are determined; the first strategy includes: at least one sub-strategy; different sub-strategies in the at least one sub-strategy correspond to different preset strategy values, and the preset strategy values are used to determine the classification labels; the recall rate is the proportion of correct classification labels determined by the strategy, and the false positive rate is the proportion of incorrect classification labels determined by the strategy.
[0007] At least one iteration is performed on at least some of the sub-strategies in the first strategy, and the iteration is used to adjust the preset strategy value corresponding to the at least some sub-strategies.
[0008] Under the premise of satisfying the preset conditions, the second strategy after iteration is obtained;
[0009] The preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference; wherein, the first false positive rate is greater than the second false positive rate, the second false positive rate is the false positive rate corresponding to the second strategy determined based on the classification result of the second strategy, and the second recall rate is the recall rate corresponding to the second strategy determined based on the classification result of the second strategy.
[0010] Optionally, the classification result includes: a first category label corresponding to each user in the user set; the classification result based on the first strategy, determining the first recall rate and the first false positive rate corresponding to the first strategy, includes:
[0011] Based on the first strategy, determine the first category label corresponding to each user;
[0012] The category labels of each user are calibrated to obtain the second category label corresponding to each user;
[0013] The recall rate is calculated for the first category label and the second category label corresponding to each user to obtain the recall rate corresponding to the first strategy.
[0014] The false positive rate is calculated for the first category label and the second category label corresponding to each user to obtain the false positive rate corresponding to the first strategy.
[0015] Optionally, determining the first category label corresponding to each user based on the first strategy includes:
[0016] Obtain the operation information corresponding to the target user; the user set includes the target user.
[0017] The operation information is analyzed to determine at least one first target sub-strategy that matches the operation information; the first target sub-strategy is a sub-strategy among the at least one sub-strategy.
[0018] Obtain the preset policy value corresponding to the at least one first target sub-policy;
[0019] Calculate the preset strategy value corresponding to the at least one first target sub-strategy to obtain the strategy score corresponding to the target user;
[0020] Determine the classification threshold range to which the strategy score belongs;
[0021] Determine the target category label corresponding to the classification threshold range, and use the target category label as the first category label corresponding to the target user.
[0022] Optionally, the step of performing at least one iteration on at least some of the sub-strategies in the first strategy includes:
[0023] Perform N iterations on at least some of the sub-strategies in the first strategy;
[0024] Wherein, the nth iteration is any one of the N iterations, and during the nth iteration, the preset strategy values corresponding to at least some of the sub-strategies in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy of the nth iteration.
[0025] Optionally, adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes:
[0026] Randomly select at least two sub-strategies from the first strategy after the (n-1)th iteration;
[0027] The preset policy values of each of the at least two sub-policies are swapped to obtain the first policy of the nth iteration.
[0028] Optionally, adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes:
[0029] Determine the influence factors of the preset strategy values corresponding to each sub-strategy in the first strategy after the (n-1)th iteration on the recall rate and the false positive rate.
[0030] Based on the aforementioned influencing factors, the fitness corresponding to each sub-strategy is determined. The fitness is used to characterize the classification accuracy corresponding to each sub-strategy. The fitness is directly proportional to the recall rate and inversely proportional to the false positive rate.
[0031] The fitness corresponding to each sub-strategy is normalized to obtain the selection probability corresponding to each sub-strategy.
[0032] The selection probabilities corresponding to each sub-strategy are summed to obtain the probability intervals corresponding to each sub-strategy.
[0033] Generate random numbers;
[0034] If the random number belongs to the probability range corresponding to the second target sub-strategy, the preset strategy value corresponding to the second target sub-strategy is retained; the second target sub-strategy is a sub-strategy in the first strategy after the (n-1)th iteration.
[0035] The preset strategy values corresponding to the sub-strategies other than the second target sub-strategy in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy for the nth iteration.
[0036] In a second aspect of the invention, a strategy determination apparatus is provided, comprising:
[0037] The first determining module is used to determine the first recall rate and the first false positive rate corresponding to the first strategy based on the classification result of the first strategy; the first strategy includes: at least one sub-strategy; different sub-strategies in the at least one sub-strategy correspond to different preset strategy values, and the preset strategy values are used to determine the classification label; the recall rate is the proportion of correct classification labels determined by the strategy, and the false positive rate is the proportion of incorrect classification labels determined by the strategy.
[0038] An iteration module is used to perform at least one iteration on at least some of the sub-strategies in the first strategy, wherein the iteration is used to adjust the preset strategy value corresponding to the at least some of the sub-strategies;
[0039] The second determining module is used to obtain the iterative second strategy under the condition that the preset conditions are met;
[0040] The preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference; wherein, the first false positive rate is greater than the second false positive rate, the second false positive rate is the false positive rate corresponding to the second strategy determined based on the classification result of the second strategy, and the second recall rate is the recall rate corresponding to the second strategy determined based on the classification result of the second strategy.
[0041] In a third aspect of the present invention, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0042] Memory, used to store programs;
[0043] When a processor executes a program stored in memory, it implements the method described in the first aspect.
[0044] In a fourth aspect of the invention, a readable storage medium is provided having a program stored thereon that, when executed by a processor, implements the method described in the first aspect.
[0045] In a fifth aspect of the invention, a computer program product is provided, including computer instructions that, when executed by a processor, implement the method described in the first aspect.
[0046] In this embodiment of the invention, the electronic device first determines a first recall rate and a first false positive rate corresponding to the first strategy based on the classification results of the first strategy. The recall rate is the proportion of correctly classified labels determined by the strategy, and the false positive rate is the proportion of incorrectly classified labels determined by the strategy. The electronic device then iterates at least one time on at least some sub-strategies in the first strategy, with the iteration used to optimize preset strategy values corresponding to at least some sub-strategies. The electronic device obtains an iterated second strategy when preset conditions are met. These preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference. It can be understood that, compared to the first strategy, the second strategy obtained by the electronic device, when the proportion of correctly classified labels does not change significantly between the first recall rate corresponding to the first strategy and the second recall rate corresponding to the second strategy, has a lower second false positive rate than the first false positive rate corresponding to the first strategy. That is, the optimized second strategy of the electronic device effectively reduces the proportion of incorrectly classified labels and improves the accuracy of the classified labels determined by the strategy without affecting the recall rate. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0048] Figure 1 This is a flowchart illustrating a strategy determination method according to an embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of the structure of a strategy determination device according to an embodiment of the present invention;
[0050] Figure 3 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. A process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. A process can correspond to a method, function, procedure, subroutine, subroutine, etc.
[0053] Furthermore, the terms "first," "second," etc., may be used herein to describe various directions, actions, steps, or elements, but these directions, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step, or element from another direction, action, step, or element. For example, without departing from the scope of the invention, a first speed difference may be referred to as a second speed difference, and similarly, a second speed difference may be referred to as a first speed difference. Both the first speed difference and the second speed difference are speed differences, but they are not the same speed difference. The terms "first," "second," etc., should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0054] This invention provides a strategy determination method, such as... Figure 1 As shown, the steps of this method include:
[0055] Step 101: Based on the classification results of the first strategy, determine the first recall rate and the first false positive rate corresponding to the first strategy; the first strategy includes: at least one sub-strategy; different sub-strategies in the at least one sub-strategy correspond to different preset strategy values, and the preset strategy values are used to determine the classification labels; the recall rate is the proportion of correct classification labels determined by the strategy, and the false positive rate is the proportion of incorrect classification labels determined by the strategy.
[0056] In this embodiment, the first strategy can be a risk strategy used to identify the user's risk. For example, the first strategy can determine the user's classification label, resulting in a user classification result. The classification label can determine the user's risk level, and the electronic device can set two or more classification labels.
[0057] The following explanation uses setting two types of category labels on electronic devices as an example.
[0058] Example 1: Category labels can include high-risk labels and no-risk labels. Electronic devices can use a first strategy to classify users and determine whether a user's label is high-risk or no-risk. For example, if an electronic device detects that a user has engaged in a high-risk activity, it can use the first strategy to classify the user and set their category label to high-risk.
[0059] In this embodiment, recall can be used to characterize the coverage of the first strategy for risk detection, and false positive rate can characterize the false positive rate of the first strategy for non-risk detection. For example, in Example 1, recall can be used to characterize the coverage of the first strategy for high-risk detection, and false positive rate can characterize the false positive rate of the first strategy for non-risk detection.
[0060] Example 2: The classification labels of the first strategy can also include high-risk, low-risk, medium-risk, and no-risk labels. Recall rate can be used to characterize the coverage of the first strategy for high-risk, low-risk, and medium-risk detections, while false positive rate can characterize the false positive rate for no-risk detections. Alternatively, the first strategy can have one recall rate for high-risk labels, one for medium-risk labels, and one for low-risk labels. That is, the recall rate corresponding to the high-risk label characterizes the coverage of the first strategy for high-risk detections, the recall rate corresponding to the medium-risk label characterizes the coverage of the first strategy for medium-risk detections, and the recall rate corresponding to the low-risk label characterizes the coverage of the first strategy for low-risk detections, while the false positive rate of the first strategy can still characterize the false positive rate for no-risk detections.
[0061] The calculation process for recall and error rate will be explained in detail below.
[0062] In some embodiments, the classification result includes: a first classification label corresponding to each user in the user set; the classification result based on the first strategy, determining the first recall rate and the first false positive rate corresponding to the first strategy, includes:
[0063] Based on the first strategy, determine the first category label corresponding to each user;
[0064] The category labels of each user are calibrated to obtain the second category label corresponding to each user;
[0065] The recall rate is calculated for the first category label and the second category label corresponding to each user to obtain the recall rate corresponding to the first strategy.
[0066] The false positive rate is calculated for the first category label and the second category label corresponding to each user to obtain the false positive rate corresponding to the first strategy.
[0067] Taking Example 1 above as an example, the electronic device can determine the first category label for each user through the first strategy. The electronic device can obtain a first category set and a second category set through the first category labels of each user. The first category set is a high-risk category label set, and the labels corresponding to users in the first category set are all high-risk labels. The second category set is a risk-free category label set, and the labels corresponding to users in the second category set are all risk-free labels.
[0068] The electronic device then calibrates the classification labels for each user, obtaining calibrated second classification labels. These calibrated second classification labels represent the actual risk associated with each user. The electronic device can then obtain a third and fourth classification set from these second classification labels. The third classification set is the calibrated set of high-risk classification labels, and all users in this set have calibrated high-risk labels. The fourth classification set is the calibrated set of risk-free classification labels, and all users in this set have calibrated risk-free labels.
[0069] The electronic device then uses the first, second, third, and fourth classification sets to identify users in the first classification set who are actually risk-free but were mistakenly labeled as high-risk by the first strategy, and users in the second classification set who are actually high-risk but were mistakenly labeled as risk-free by the first strategy.
[0070] The electronic device then determines the intersection of the first category set and the third category set, and determines the number of first users in the intersection. The electronic device then determines the number of second users in the third category set, and compares the number of first users and the number of second users to obtain the recall rate corresponding to the first strategy.
[0071] The electronic device then determines the intersection of the first category set and the fourth category set, and determines the number of third users in the intersection. The electronic device then determines the number of fourth users in the fourth category set, and compares the number of third users and the number of fourth users to obtain the false alarm rate corresponding to the first strategy.
[0072] Understandably, in this embodiment, the electronic device can determine the false positive rate and recall rate of the first strategy through the first category label and the second category label corresponding to each user, so as to facilitate subsequent judgment on whether the iterated first strategy meets the conditions based on the false positive rate and recall rate.
[0073] The following section will explain in detail how electronic devices determine a user's primary category label.
[0074] In some embodiments, determining the first category label corresponding to each user based on the first strategy includes:
[0075] Obtain the operation information corresponding to the target user; the user set includes the target user.
[0076] The operation information is analyzed to determine at least one first target sub-strategy that matches the operation information; the first target sub-strategy is a sub-strategy among the at least one sub-strategy.
[0077] Obtain the preset policy value corresponding to the at least one first target sub-policy;
[0078] Calculate the preset strategy value corresponding to the at least one first target sub-strategy to obtain the strategy score corresponding to the target user;
[0079] Determine the classification threshold range to which the strategy score belongs;
[0080] Determine the target category label corresponding to the classification threshold range, and use the target category label as the first category label corresponding to the target user.
[0081] Understandably, in this embodiment, the electronic device can acquire the target user's operation information. This operation information can be information determined by the electronic device based on the user's interactive operations. For example, the operation information can be login information determined by the electronic device based on the user's login operation, device information determined by the electronic device based on the user's touch operation, or input information determined by the electronic device based on the user's input operation. No further limitations are imposed here.
[0082] After the electronic device acquires the target user's operation information, it determines at least one first target sub-strategy that matches the operation information. Assuming the first strategy includes a visitor type sub-strategy and a manager type sub-strategy, if the user type in the target user's operation information is "visitor," then the visitor type sub-strategy is matched to the target user as the first target sub-strategy.
[0083] Sub-policies can also correspond to a preset policy value range, and electronic devices can obtain different preset policy values within the preset policy value range based on different user operation information.
[0084] Example 3 illustrates this by taking the example of login information determined by an electronic device based on the user's login operation.
[0085] Assume the sub-policies include two device sub-policies and two user type sub-policies. The two device sub-policies are: one for phone model 1 and one for phone model 2. The two user type sub-policies are: a guest type sub-policy and an administrator type sub-policy. Each of the two device sub-policies and the two user type sub-policies corresponds to a preset policy value, which falls within a preset policy value range. When an electronic device detects that operation information matches one of the device sub-policies or the user type sub-policy, it retrieves the preset policy value corresponding to the matched device sub-policy or user type sub-policy.
[0086] For example, assuming the preset policy value range is [0, 60], the preset policy value of the device sub-policy corresponding to mobile phone model 1 is 20, the preset policy value of the device sub-policy corresponding to mobile phone model 2 is 30, the preset policy value of the visitor type sub-policy is 40, and the preset policy value of the administrator type sub-policy is 10.
[0087] If the electronic device detects that the user is using phone model 1, the operation information matches the device sub-policy corresponding to phone model 1, and the electronic device obtains the preset policy value of the device sub-policy corresponding to phone model 1. In this case, the operation information does not match the device sub-policy corresponding to phone model 2, and the electronic device will not obtain the preset policy value of the device sub-policy corresponding to phone model 2. Similarly, if the electronic device detects that the user is using phone model 2, the operation information matches the device sub-policy corresponding to phone model 2, and the electronic device obtains the preset policy value of the device sub-policy corresponding to phone model 2. In this case, the operation information does not match the device sub-policy corresponding to phone model 1, and the electronic device will not obtain the preset policy value of the device sub-policy corresponding to phone model 1. Similarly, if the electronic device detects that the user is logged in as a guest, the operation information matches the guest type sub-policy, and the electronic device obtains the preset policy value of the guest type sub-policy. In this case, the operation information does not match the administrator type sub-policy, and the electronic device will not obtain the preset policy value of the administrator type sub-policy. Similarly, if the electronic device detects that the user is logged in as an administrator, the operation information matches the administrator type sub-policy, and the electronic device obtains the preset policy value of the administrator type sub-policy. In this case, the operation information does not match the guest type sub-policy, and the electronic device will not obtain the preset policy value of the guest type sub-policy.
[0088] That is, the electronic device can obtain login information and determine, based on the login information, that the user currently logging in is using mobile phone model 2 and is logged in as a guest. Specifically, the login information is matched with the device sub-policy and guest type sub-policy corresponding to mobile phone model 2, and the electronic device obtains the preset policy value 30 of the device sub-policy corresponding to mobile phone model 2 and the preset policy value 40 of the guest type sub-policy.
[0089] The electronic device then determines the user's strategy score based on a preset strategy score calculation formula. Optionally, the electronic device can substitute the preset strategy value corresponding to the sub-strategy that matches the operation information into the strategy score calculation formula to obtain the user's strategy score.
[0090] Example 4: Suppose the first strategy includes 10 sub-strategies. The strategy score calculation formula could be:
[0091] .
[0092] in, to Used to represent the 10 sub-strategies in the first strategy, the corresponding values are the preset strategy values of the sub-strategies.
[0093] Assume the electronic device detects a sub-policy that matches the operational information as the first sub-policy. Second sub-strategy Fourth sub-strategy Eighth sub-strategy and the ninth strategy Electronic devices can acquire the first sub-policy Second sub-strategy Fourth sub-strategy Eighth sub-strategy and the ninth strategy Each corresponding preset strategy value is then input into the strategy score calculation formula, and the electronic device will not match the third sub-strategy. Fifth sub-strategy Sixth sub-strategy Seventh sub-strategy Tenth Sub-Strategy By substituting a preset value into the strategy score calculation formula, the preset value can be 0.
[0094] For example, suppose 10, It is 20. It is 50. It is 30. If it is 40, then Therefore, the final strategy score is 120.
[0095] The electronic device then determines the category label corresponding to the category threshold range to which the strategy score belongs, and uses this label as the user's category label. For example, assuming the category threshold range for high-risk labels is (100, 200), and the strategy score of 120 falls within the category threshold range for high-risk labels, then the user's category label is high-risk label.
[0096] Understandably, in this embodiment, the electronic device determines a sub-strategy that matches the operation information and obtains a preset strategy value corresponding to the matched sub-strategy. The electronic device then calculates the preset strategy value to obtain a strategy score, and determines the category label corresponding to the category threshold range to which the strategy score belongs, using this label as the user's category label. In this process, the electronic device can accurately determine the user's category label, reducing the recall rate.
[0097] Step 102: Perform at least one iteration on at least some of the sub-strategies in the first strategy, wherein the iteration is used to adjust the preset strategy values corresponding to the at least some sub-strategies.
[0098] In some embodiments, performing at least one iteration on at least some of the sub-strategies in the first strategy includes:
[0099] Perform N iterations on at least some of the sub-strategies in the first strategy;
[0100] Wherein, the nth iteration is any one of the N iterations, and during the nth iteration, the preset strategy values corresponding to at least some of the sub-strategies in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy of the nth iteration.
[0101] Understandably, in this embodiment, the electronic device can iterate the first strategy N times to obtain a better strategy. Furthermore, by using a preset algorithm to adjust the preset strategy values corresponding to at least some sub-strategies, the electronic device can achieve more comprehensive and efficient strategy optimization. Moreover, by using the preset strategy values corresponding to at least some sub-strategies as the smallest unit of optimization, the electronic device can directly avoid processing high-dimensional parameters and reduce computational complexity.
[0102] The iteration method for the first strategy can be described as follows.
[0103] In some embodiments, adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes:
[0104] Randomly select at least two sub-strategies from the first strategy after the (n-1)th iteration;
[0105] The preset policy values of each of the at least two sub-policies are swapped to obtain the first policy of the nth iteration.
[0106] In this embodiment, if only the preset strategy value corresponding to a single sub-strategy is adjusted, the iterative process is easily limited to the vicinity of the original parameters of that strategy, making it difficult to discover a better preset strategy value for that sub-strategy. Therefore, the electronic device can refer to the biological gene recombination process in nature and randomly exchange the preset strategy values corresponding to different sub-strategies to detect and discover better preset strategy values corresponding to each sub-strategy, and obtain an iterative first strategy. This allows the iterative first strategy to be superior to the previous first strategy, resulting in a more accurate classification result.
[0107] In some embodiments, adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes:
[0108] Determine the influence factors of the preset strategy values corresponding to each sub-strategy in the first strategy after the (n-1)th iteration on the recall rate and the false positive rate.
[0109] Based on the aforementioned influencing factors, the fitness corresponding to each sub-strategy is determined. The fitness is used to characterize the classification accuracy corresponding to each sub-strategy. The fitness is directly proportional to the recall rate and inversely proportional to the false positive rate.
[0110] The fitness corresponding to each sub-strategy is normalized to obtain the selection probability corresponding to each sub-strategy.
[0111] The selection probabilities corresponding to each sub-strategy are summed to obtain the probability intervals corresponding to each sub-strategy.
[0112] Generate random numbers;
[0113] If the random number belongs to the probability range corresponding to the second target sub-strategy, the preset strategy value corresponding to the second target sub-strategy is retained; the second target sub-strategy is a sub-strategy in the first strategy after the (n-1)th iteration.
[0114] The preset strategy values corresponding to the sub-strategies other than the second target sub-strategy in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy for the nth iteration.
[0115] In this embodiment, the electronic device calculates the fitness of each sub-strategy corresponding to the first strategy based on the influence factor of the preset strategy value corresponding to each sub-strategy on the recall rate and false positive rate. The higher the fitness, the higher the classification accuracy in determining the classification label through that sub-strategy. The electronic device then divides the fitness value of each sub-strategy by the sum of the fitness values of all sub-strategies, i.e., performs normalization processing to determine the selection probability of each sub-strategy. The electronic device then accumulates the selection probabilities of each sub-strategy to obtain the probability interval corresponding to each sub-strategy. That is, the entire sub-strategy forms an interval of 0 to 1, and each sub-strategy corresponds to a sub-interval of 0 to 1 (for example, the probability interval of sub-strategy 1 is [0-0.3], the probability interval of sub-strategy 2 is (0.3-0.6], and the probability interval of sub-strategy 3 is (0.6-1)). The electronic device then generates a random number between [0, 1). The electronic device retains the preset strategy value of the corresponding second target sub-strategy if the random number falls within the probability interval of the sub-strategy (i.e., the second target sub-strategy). The electronic device adjusts the preset policy values corresponding to the sub-policies in the first strategy, excluding the second target sub-policy, to obtain the iterative first strategy. Assuming the random number is 0.7 and falls within the probability range of sub-policy 3, sub-policy 3 is taken as the second target sub-policy, and the electronic device adjusts the preset policy values of sub-policies 1 and 2.
[0116] In this embodiment, sub-policies with higher fitness are more likely to be retained. That is, the retained sub-policies are those that performed relatively well in the previous iteration. Directly retaining these well-performing sub-policies in the next iteration ensures that the preset policy values corresponding to these well-performing sub-policies will not be changed. Secondly, for sub-policies that are not retained, their preset policy values are adjusted or regenerated. This is equivalent to trying new preset policy values based on the original sub-policies, which may optimize the adjusted sub-policies and thus obtain the first policy for iteration. This allows the iterated first policy to be superior to the previous first policy, resulting in more accurate classification results.
[0117] In some embodiments, the electronic device may also refer to the gene mutation process of organisms in nature, randomly select one or more sub-strategies, and randomly adjust the preset strategy value corresponding to the selected sub-strategy.
[0118] Step 103: Under the premise of satisfying the preset conditions, obtain the second strategy after iteration;
[0119] The preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference; wherein, the first false positive rate is greater than the second false positive rate, the second false positive rate is the false positive rate corresponding to the second strategy determined based on the classification result of the second strategy, and the second recall rate is the recall rate corresponding to the second strategy determined based on the classification result of the second strategy.
[0120] For example, suppose there are five users. Of these, two are high-risk (User 1 and User 2), and three are risk-free (User 3, User 4, and User 5). Using the first strategy, the classification labels for these five users are determined: Users 1, 2, and 3 are labeled as high-risk, and Users 4 and 5 are labeled as risk-free. The recall rate is calculated as the number of users whose labels are high-risk (as determined by the strategy) and the actual number of high-risk users, divided by the actual number of high-risk users, and then multiplied by a percentage. The false positive rate is calculated as the number of users whose labels are high-risk (as determined by the strategy) and the actual number of risk-free users, divided by the actual number of high-risk users, and then multiplied by a percentage. Therefore, the recall rate of the first strategy is 100%, and the false positive rate is 33%. Using the second strategy, the classification labels for these five users are determined: Users 1 and 2 are labeled as high-risk, and Users 3, 4, and 5 are labeled as risk-free. Therefore, the recall rate of the second strategy is 100%, and the false positive rate of the first strategy is 0%. It is evident that the iteratively optimized second strategy reduced the false positive rate without affecting the recall rate.
[0121] In some embodiments, after the electronic device iterates the first strategy, the electronic device will determine the false positive rate and recall rate corresponding to the first strategy after each iteration, and determine the second strategy after the iteration if preset conditions are met.
[0122] The preset conditions include at least one of the following: the number of iterations exceeds a preset iteration threshold; or the difference between the first false positive rate and the third false positive rate is greater than a third preset difference; or the difference between the first false positive rate and the third false positive rate has not increased compared to the difference between the first false positive rate and the fourth false positive rate. The third false positive rate is the false positive rate of the first strategy after the nth iteration, and the fourth false positive rate is the false positive rate of the first strategy after the (n-1)th iteration.
[0123] The difference between the first false positive rate and the third false positive rate being greater than the third preset difference means that: the false positive rate of the first strategy after the nth iteration has been reduced compared to the false positive rate of the first strategy before the iteration, and the preset reduction requirement is met. In this case, the electronic device does not need to iterate the first strategy again.
[0124] The difference between the first and third false positive rates does not increase compared to the difference between the first and fourth false positive rates. This means that the false positive rate of the first strategy after the nth iteration is not much different from that after the (n-1)th iteration, i.e., the decreasing trend of the false positive rate has leveled off, and the electronic device does not need to iterate the first strategy anymore.
[0125] In this embodiment, the electronic device determines the calculation method of the false positive rate and recall rate of the first strategy after iteration in the same way as the calculation method of the false positive rate and recall rate of the first strategy described above, and will not be elaborated further here.
[0126] After obtaining the iterated second strategy, the electronic device can apply the preset strategy values corresponding to each sub-strategy in the second strategy to the electronic device to improve the accuracy of strategy classification.
[0127] As described in steps 101 to 103 above, the electronic device first determines the first recall rate and the first false positive rate corresponding to the first strategy based on the classification results of the first strategy. Recall rate is the proportion of correct classification labels determined by the strategy, and false positive rate is the proportion of incorrect classification labels determined by the strategy. The electronic device then iterates at least once on at least some sub-strategies in the first strategy, with the iteration used to optimize the preset strategy values corresponding to at least some sub-strategies. Under preset conditions, the electronic device obtains the iterated second strategy. The preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference. It can be understood that, compared to the first strategy, the second strategy obtained by the electronic device, while maintaining a similar proportion of correct classification labels between the first recall rate and the second recall rate, has a lower second false positive rate than the first false positive rate. In other words, the optimized second strategy effectively reduces the proportion of incorrect classification labels and improves the accuracy of classification label determination through the strategy without affecting the recall rate. Furthermore, since the embodiments of this application can improve the accuracy of the strategy, when applied in online risk control scenarios, electronic devices can more accurately identify users' malicious behavior and improve the defense capabilities of risk strategies, while also reducing losses caused by mistakenly harming normal users, improving user experience, increasing user satisfaction and loyalty, thereby bringing direct or indirect economic benefits to enterprises.
[0128] In addition, the embodiments of this application can also solve the limitations of setting risk strategies based on past risk classification experience in related technologies. This allows electronic devices to dynamically iterate and optimize the first strategy based on changes in user behavior patterns. Furthermore, it can fully explore the subtle features and rules in the first strategy, comprehensively optimize the first strategy, and efficiently identify and intercept risks while effectively reducing interference to ordinary users.
[0129] In the embodiments of this application, in addition to using iterative optimization algorithms, electronic devices may also use particle swarm optimization, ant colony optimization, etc., to further optimize and improve the strategy, without any limitation.
[0130] The following is an illustrative example of particle swarm optimization.
[0131] The electronic device treats each sub-strategy as a "particle," each particle possessing a current position and a current movement velocity in the parameter space. All particles collectively form a "particle swarm." In each iteration, the electronic device performs the following operations:
[0132] First, the electronic device calculates the fitness value of each particle based on the preset strategy value scheme of the sub-strategy corresponding to each particle. The fitness value is used to measure the quality of the classification result under the preset strategy value scheme.
[0133] Secondly, the electronic device records the position corresponding to the highest fitness value reached by each particle in each iteration, which is called the individual optimal position of that particle; at the same time, it records the position corresponding to the highest fitness value reached by all particles in the entire particle swarm in each iteration, which is called the global optimal position.
[0134] Then, the electronic device determines the next speed and direction of each particle's movement based on its current velocity, distance from its own optimal position, and distance from the global optimal position. Specifically, each particle's next speed is determined by three parts: the first part is the continuation of its current speed, maintaining its original motion trend; the second part is the direction towards its own optimal position, aligning with the particle's historically optimal preset strategy value; and the third part is the direction towards the global optimal position, causing the particle to move closer to the best preset strategy value currently found by the entire swarm. The particle moves to a new position based on the updated speed, thus obtaining a new set of preset strategy value schemes for its sub-strategies.
[0135] After multiple iterations, particles in the particle swarm gradually gather towards regions with higher fitness values, and the fitness value of the optimal preset strategy value scheme corresponding to the entire particle swarm gradually increases. When the preset termination condition is met (such as reaching the maximum number of iterations or the fitness value no longer significantly increases), the electronic device outputs the preset strategy value scheme of the sub-strategy corresponding to the current global optimal position as the optimized first strategy (i.e., the second strategy).
[0136] Compared to manually adjusting the preset policy values of sub-policies one by one, particle swarm optimization can discover better preset policy value combinations more quickly by having multiple particles in the swarm search in parallel, share information, and learn from each other, thus improving the efficiency of policy optimization.
[0137] The following is an example of ant colony optimization.
[0138] The electronic device transforms the optimization process of the preset strategy value scheme of the sub-strategy into a path search problem. Each set of possible preset strategy value schemes corresponds to a path composed of several nodes. The level of pheromone concentration on each path represents the priority of the preset strategy value scheme being selected.
[0139] In each iteration, the electronic device performs the following operations:
[0140] First, the electronic device initializes the pheromone concentration on multiple paths, so that each path has the same base pheromone concentration.
[0141] Secondly, the electronic device releases several virtual ants, each of which chooses its own path based on the pheromone concentration on each path. The higher the pheromone concentration, the greater the probability that the ant will choose the path. At the same time, the ant also considers the merits of the path itself (such as the actual performance of the preset policy value of the sub-strategy corresponding to the path on the validation set) when making its selection, so as to balance exploration and exploitation.
[0142] Then, after each virtual ant completes a path, it releases a certain amount of pheromones along that path. The better the preset policy value of the sub-policy corresponding to the path (i.e., the higher the fitness value), the more pheromones the ant releases on that path. At the same time, the pheromones on all paths will evaporate in a certain proportion over time, causing paths that performed poorly in the past but were accidentally chosen in the early stages to be gradually forgotten.
[0143] Through multiple iterations, the pheromone concentration on high-performing paths continuously accumulates and increases, attracting more and more ants to choose these paths; while the pheromone on low-performing paths gradually evaporates and decreases, making them less likely to be chosen by ants. This positive feedback mechanism—where "good paths are increasingly chosen and poor paths are gradually eliminated"—allows the entire ant colony to gradually converge to a better path, i.e., a better sub-strategy configuration. When a preset termination condition is met, the electronic device outputs the preset strategy value of the sub-strategy corresponding to the path with the highest current pheromone concentration as the optimized first strategy (i.e., the second strategy).
[0144] Compared to manually adjusting sub-strategy parameters one by one, ant colony optimization uses multiple ants to search different paths in parallel and utilizes the accumulation and volatilization mechanism of pheromones to effectively gather collective wisdom, which can select the best preset strategy value scheme for sub-strategies in a shorter time.
[0145] In embodiments of this application, the electronic device may also introduce more feature variables to enhance the policy recognition capability and improve the model's generalization capability.
[0146] In the embodiments of this application, the electronic device can also establish a dynamic adjustment mechanism to achieve real-time adjustment of relevant thresholds. For example, when the embodiments of this application are applied in scenarios with strict risk control, the electronic device can increase the second preset difference value.
[0147] like Figure 2 As shown, this embodiment of the invention also provides a strategy determination device 200, comprising:
[0148] The first determining module 201 is used to determine the first recall rate and the first false positive rate corresponding to the first strategy based on the classification result of the first strategy; the first strategy includes: at least one sub-strategy; different sub-strategies in the at least one sub-strategy correspond to different preset strategy values, and the preset strategy values are used to determine the classification label; the recall rate is the proportion of correct classification labels determined by the strategy, and the false positive rate is the proportion of incorrect classification labels determined by the strategy.
[0149] Iteration module 202 is used to perform at least one iteration on at least some of the sub-strategies in the first strategy, wherein the iteration is used to adjust the preset strategy value corresponding to the at least some sub-strategies;
[0150] The second determining module 203 is used to obtain the iterative second strategy under the condition that the preset conditions are met;
[0151] The preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference; wherein, the first false positive rate is greater than the second false positive rate, the second false positive rate is the false positive rate corresponding to the second strategy determined based on the classification result of the second strategy, and the second recall rate is the recall rate corresponding to the second strategy determined based on the classification result of the second strategy.
[0152] Optionally, the classification result includes: a first classification label corresponding to each user in the user set, and the first determining module 201 may further include:
[0153] The first determining unit is configured to determine the first category label corresponding to each user based on the first strategy;
[0154] A calibration unit is used to calibrate the classification labels of each user to obtain a second classification label corresponding to each user;
[0155] The first calculation unit is used to calculate the recall rate of the first category label and the second category label corresponding to each user to obtain the recall rate corresponding to the first strategy.
[0156] The second calculation unit is used to calculate the false positive rate for the first category label and the second category label corresponding to each user, so as to obtain the false positive rate corresponding to the first strategy.
[0157] Optionally, the first determining unit may also include:
[0158] The first acquisition subunit is used to acquire operation information corresponding to the target user; the user set includes the target user.
[0159] An analysis subunit is configured to analyze the operation information and determine at least one first target sub-strategy that matches the operation information; the first target sub-strategy is a sub-strategy among the at least one sub-strategy.
[0160] The second acquisition subunit is used to acquire the preset strategy value corresponding to the at least one first target sub-strategy;
[0161] Calculate the preset strategy value corresponding to the at least one first target sub-strategy to obtain the strategy score corresponding to the target user;
[0162] The first determining subunit is used to determine the classification threshold range to which the strategy score belongs;
[0163] The second determining subunit is used to determine the target classification label corresponding to the classification threshold range, and to use the target classification label as the first classification label corresponding to the target user.
[0164] Optionally, the iteration module 202 may also include:
[0165] An iteration unit is used to iterate N times over at least some of the sub-strategies in the first strategy;
[0166] Wherein, the nth iteration is any one of the N iterations, and during the nth iteration, the preset strategy values corresponding to at least some of the sub-strategies in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy of the nth iteration.
[0167] Optionally, adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes:
[0168] The third acquisition subunit is used to randomly acquire at least two sub-strategies from the first strategy after the (n-1)th iteration;
[0169] The exchange subunit is used to exchange the preset policy values of each of the at least two sub-policies to obtain the first policy of the nth iteration.
[0170] Optionally, adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes:
[0171] The third determining subunit is used to determine the influence factors of the preset strategy values corresponding to each sub-strategy in the first strategy after the (n-1)th iteration on the recall rate and the false positive rate.
[0172] The fourth determining subunit is used to determine the fitness corresponding to each sub-strategy based on the influencing factor. The fitness is used to characterize the classification accuracy corresponding to each sub-strategy. The fitness is directly proportional to the recall rate and inversely proportional to the false positive rate.
[0173] The normalization subunit is used to normalize the fitness corresponding to each sub-strategy to obtain the selection probability corresponding to each sub-strategy.
[0174] An accumulation subunit is used to accumulate the selection probabilities corresponding to each sub-strategy to obtain the probability interval corresponding to each sub-strategy;
[0175] Generate sub-units for generating random numbers;
[0176] The retention sub-unit is used to retain the preset policy value corresponding to the second target sub-policy when the random number belongs to the probability interval corresponding to the second target sub-policy; the second target sub-policy is a sub-policy in the first policy after the (n-1)th iteration;
[0177] The adjustment sub-unit is used to adjust the preset strategy values corresponding to the sub-strategies other than the second target sub-strategy in the first strategy after the (n-1)th iteration, so as to obtain the first strategy of the nth iteration.
[0178] The strategy determination device 200 provided in this embodiment of the invention can achieve Figure 1 The various processes implemented in the method embodiments shown are capable of achieving the same beneficial effects, and will not be described again here to avoid repetition.
[0179] This invention also provides an electronic device, such as... Figure 3 As shown, it includes a processor 301, a communication interface 302, a memory 303, and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.
[0180] The memory 303 is used to store computer programs; the processor 301, when executing the program stored in the memory 303, performs the following steps:
[0181] Based on the classification results of the first strategy, a first recall rate and a first false positive rate corresponding to the first strategy are determined; the first strategy includes: at least one sub-strategy; different sub-strategies in the at least one sub-strategy correspond to different preset strategy values, and the preset strategy values are used to determine the classification labels; the recall rate is the proportion of correct classification labels determined by the strategy, and the false positive rate is the proportion of incorrect classification labels determined by the strategy.
[0182] At least one iteration is performed on at least some of the sub-strategies in the first strategy, and the iteration is used to adjust the preset strategy value corresponding to the at least some sub-strategies.
[0183] Under the premise of satisfying the preset conditions, the second strategy after iteration is obtained;
[0184] The preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference; wherein, the first false positive rate is greater than the second false positive rate, the second false positive rate is the false positive rate corresponding to the second strategy determined based on the classification result of the second strategy, and the second recall rate is the recall rate corresponding to the second strategy determined based on the classification result of the second strategy.
[0185] Optionally, the classification result includes: a first classification label corresponding to each user in the user set. The processor 301, when executing the program stored in the memory 303, also performs the following steps:
[0186] The determination of the first recall rate and the first false positive rate corresponding to the first strategy based on the classification results of the first strategy includes:
[0187] Based on the first strategy, determine the first category label corresponding to each user;
[0188] The category labels of each user are calibrated to obtain the second category label corresponding to each user;
[0189] The recall rate is calculated for the first category label and the second category label corresponding to each user to obtain the recall rate corresponding to the first strategy.
[0190] The false positive rate is calculated for the first category label and the second category label corresponding to each user to obtain the false positive rate corresponding to the first strategy.
[0191] Optionally, when executing a program stored in memory 303, processor 301 may also perform the following steps:
[0192] The step of determining the first category label corresponding to each user based on the first strategy includes:
[0193] Obtain the operation information corresponding to the target user; the user set includes the target user.
[0194] The operation information is analyzed to determine at least one first target sub-strategy that matches the operation information; the first target sub-strategy is a sub-strategy among the at least one sub-strategy.
[0195] Obtain the preset policy value corresponding to the at least one first target sub-policy;
[0196] Calculate the preset strategy value corresponding to the at least one first target sub-strategy to obtain the strategy score corresponding to the target user;
[0197] Determine the classification threshold range to which the strategy score belongs;
[0198] Determine the target category label corresponding to the classification threshold range, and use the target category label as the first category label corresponding to the target user.
[0199] Optionally, when executing a program stored in memory 303, processor 301 may also perform the following steps:
[0200] The step of performing at least one iteration on at least some of the sub-strategies in the first strategy includes:
[0201] Perform N iterations on at least some of the sub-strategies in the first strategy;
[0202] Wherein, the nth iteration is any one of the N iterations, and during the nth iteration, the preset strategy values corresponding to at least some of the sub-strategies in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy of the nth iteration.
[0203] Optionally, when executing a program stored in memory 303, processor 301 may also perform the following steps:
[0204] The step of adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes:
[0205] Randomly select at least two sub-strategies from the first strategy after the (n-1)th iteration;
[0206] The preset policy values of each of the at least two sub-policies are swapped to obtain the first policy of the nth iteration.
[0207] Optionally, when executing a program stored in memory 303, processor 301 may also perform the following steps:
[0208] The step of adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes:
[0209] Determine the influence factors of the preset strategy values corresponding to each sub-strategy in the first strategy after the (n-1)th iteration on the recall rate and the false positive rate.
[0210] Based on the aforementioned influencing factors, the fitness corresponding to each sub-strategy is determined. The fitness is used to characterize the classification accuracy corresponding to each sub-strategy. The fitness is directly proportional to the recall rate and inversely proportional to the false positive rate.
[0211] The fitness corresponding to each sub-strategy is normalized to obtain the selection probability corresponding to each sub-strategy.
[0212] The selection probabilities corresponding to each sub-strategy are summed to obtain the probability intervals corresponding to each sub-strategy.
[0213] Generate random numbers;
[0214] If the random number belongs to the probability range corresponding to the second target sub-strategy, the preset strategy value corresponding to the second target sub-strategy is retained; the second target sub-strategy is a sub-strategy in the first strategy after the (n-1)th iteration.
[0215] The preset strategy values corresponding to the sub-strategies other than the second target sub-strategy in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy for the nth iteration.
[0216] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0217] The communication interface is used for communication between the aforementioned terminal and other devices.
[0218] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0219] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0220] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the strategy determination methods described in the above embodiments.
[0221] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the strategy determination methods described in the above embodiments.
[0222] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0223] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0224] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0225] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A strategy determination method, characterized in that, The method includes: Based on the classification results of the first strategy, a first recall rate and a first false positive rate corresponding to the first strategy are determined; the first strategy includes: at least one sub-strategy; different sub-strategies in the at least one sub-strategy correspond to different preset strategy values, and the preset strategy values are used to determine the classification labels; the recall rate is the proportion of correct classification labels determined by the strategy, and the false positive rate is the proportion of incorrect classification labels determined by the strategy. At least one iteration is performed on at least some of the sub-strategies in the first strategy, and the iteration is used to adjust the preset strategy value corresponding to the at least some sub-strategies. Under the premise of satisfying the preset conditions, the second strategy after iteration is obtained; The preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference; wherein, the first false positive rate is greater than the second false positive rate, the second false positive rate is the false positive rate corresponding to the second strategy determined based on the classification result of the second strategy, and the second recall rate is the recall rate corresponding to the second strategy determined based on the classification result of the second strategy.
2. The method according to claim 1, characterized in that, The classification results include: first category labels corresponding to each user in the user set; the classification results based on the first strategy, determining the first recall rate and the first false positive rate corresponding to the first strategy, include: Based on the first strategy, determine the first category label corresponding to each user; The category labels of each user are calibrated to obtain the second category label corresponding to each user; The recall rate is calculated for the first category label and the second category label corresponding to each user to obtain the recall rate corresponding to the first strategy. The false positive rate is calculated for the first category label and the second category label corresponding to each user to obtain the false positive rate corresponding to the first strategy.
3. The method according to claim 2, characterized in that, The step of determining the first category label corresponding to each user based on the first strategy includes: Obtain the operation information corresponding to the target user; the user set includes the target user. The operation information is analyzed to determine at least one first target sub-strategy that matches the operation information; the first target sub-strategy is a sub-strategy among the at least one sub-strategy. Obtain the preset policy value corresponding to the at least one first target sub-policy; Calculate the preset strategy value corresponding to the at least one first target sub-strategy to obtain the strategy score corresponding to the target user; Determine the classification threshold range to which the strategy score belongs; Determine the target category label corresponding to the classification threshold range, and use the target category label as the first category label corresponding to the target user.
4. The method according to claim 3, characterized in that, The step of performing at least one iteration on at least some of the sub-strategies in the first strategy includes: Perform N iterations on at least some of the sub-strategies in the first strategy; The nth iteration is any one of the N iterations, and during the nth iteration, the preset strategy values corresponding to at least some of the sub-strategies in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy of the nth iteration.
5. The method according to claim 4, characterized in that, The step of adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes: Randomly select at least two sub-strategies from the first strategy after the (n-1)th iteration; The preset policy values of each of the at least two sub-policies are swapped to obtain the first policy of the nth iteration.
6. The method according to claim 4, characterized in that, The step of adjusting the preset policy values corresponding to at least some sub-policies in the first policy after the (n-1)th iteration to obtain the first policy for the nth iteration includes: Determine the influence factors of the preset strategy values corresponding to each sub-strategy in the first strategy after the (n-1)th iteration on the recall rate and the false positive rate. Based on the aforementioned influencing factors, the fitness corresponding to each sub-strategy is determined. The fitness is used to characterize the classification accuracy corresponding to each sub-strategy. The fitness is directly proportional to the recall rate and inversely proportional to the false positive rate. The fitness corresponding to each sub-strategy is normalized to obtain the selection probability corresponding to each sub-strategy. The selection probabilities corresponding to each sub-strategy are summed to obtain the probability intervals corresponding to each sub-strategy. Generate random numbers; If the random number belongs to the probability range corresponding to the second target sub-strategy, the preset strategy value corresponding to the second target sub-strategy is retained; the second target sub-strategy is a sub-strategy in the first strategy after the (n-1)th iteration. The preset strategy values corresponding to the sub-strategies other than the second target sub-strategy in the first strategy after the (n-1)th iteration are adjusted to obtain the first strategy for the nth iteration.
7. A strategy determination device, characterized in that, include: The first determining module is used to determine the first recall rate and the first false positive rate corresponding to the first strategy based on the classification results of the first strategy. The first strategy includes: at least one sub-strategy; different sub-strategies in the at least one sub-strategy correspond to different preset strategy values, and the preset strategy values are used to determine the classification labels; the recall rate is the proportion of correct classification labels determined by the strategy, and the false positive rate is the proportion of incorrect classification labels determined by the strategy; An iteration module is used to perform at least one iteration on at least some of the sub-strategies in the first strategy, wherein the iteration is used to adjust the preset strategy value corresponding to the at least some of the sub-strategies; The second determining module is used to obtain the iterative second strategy under the condition that the preset conditions are met; The preset conditions are: the difference between the first recall rate and the second recall rate is less than a first preset difference, and the difference between the first false positive rate and the second false positive rate is greater than a second preset difference; wherein, the first false positive rate is greater than the second false positive rate, the second false positive rate is the false positive rate corresponding to the second strategy determined based on the classification result of the second strategy, and the second recall rate is the recall rate corresponding to the second strategy determined based on the classification result of the second strategy.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store programs; A processor, when executing a program stored in memory, implements the method as described in any one of claims 1-6.
9. A readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.
10. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the method as described in any one of claims 1-6.
