CN114066526A - User traffic distribution method, device, medium and electronic equipment - Google Patents

User traffic distribution method, device, medium and electronic equipment Download PDF

Info

Publication number
CN114066526A
CN114066526A CN202111386705.8A CN202111386705A CN114066526A CN 114066526 A CN114066526 A CN 114066526A CN 202111386705 A CN202111386705 A CN 202111386705A CN 114066526 A CN114066526 A CN 114066526A
Authority
CN
China
Prior art keywords
traffic
flow
user
group
experiment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111386705.8A
Other languages
Chinese (zh)
Inventor
吕鸿鹏
钟轶
李珊珊
吴官林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Netease Cloud Music Technology Co Ltd
Original Assignee
Hangzhou Netease Cloud Music Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Netease Cloud Music Technology Co Ltd filed Critical Hangzhou Netease Cloud Music Technology Co Ltd
Priority to CN202111386705.8A priority Critical patent/CN114066526A/en
Publication of CN114066526A publication Critical patent/CN114066526A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0203Market surveys; Market polls

Landscapes

  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a user flow distribution method. The method can comprise the following steps: and acquiring the user flow change requirement aiming at the target experiment. Responding to the user traffic change requirement, and performing traffic change according to a principle of minimizing user traffic change cost of each experimental group aiming at each experimental group needing traffic change; the cost of a flow path for transferring the flow to the user by any experimental group is the lowest, so that the user flow of the experimental group can be preferentially distributed to the user, the user can be kept in the original experimental group to the maximum extent before and after the flow of the experimental group is changed, the change is avoided, and the problem caused by the change of the experimental group to which the user belongs is reduced. In addition, the embodiment of the application provides a user flow distribution device, a medium and an electronic device.

Description

User traffic distribution method, device, medium and electronic equipment
Technical Field
Embodiments of the present application relate to the field of computer processing, and more particularly, to a user traffic allocation method, apparatus, medium, and electronic device.
Background
This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. The description herein is not admitted to be relevant prior art by inclusion in this section.
Today, the age of internet product growth has passed and the population is lucrative. When a new product strategy is pushed out, the feasibility of the product strategy needs to be analyzed in a grouping test experiment mode, and then the online is pushed out.
In a grouping test experiment, user traffic can be randomly distributed to at least two experiment groups, wherein each experiment group can correspond to different product strategies, then the experiment indexes corresponding to each experiment group are counted, comparison of the product strategies is carried out according to the counted experiment indexes, and whether the corresponding product strategies are feasible or not is determined.
During the test, the user traffic allocated for the experimental packets may need to be changed. At present, when the user traffic of an experimental group needs to be changed, the user traffic can be re-allocated to the experimental group based on a method for randomly allocating traffic.
Disclosure of Invention
A problem that arises is that the method based on random traffic allocation reallocates user traffic to the experimental group, possibly causing the user to change the experimental group. For example, due to reallocation, a user originally belonging to experiment group a may be changed to experiment group B. The change of the experimental group to which the user belongs may cause a series of problems. For example, for a corresponding user, the user experience may be changed, and the user experience may be affected. As another example, due to user grouping changes, the statistics of some experimental indicators (e.g., user retention indicators, etc.) may present a delay problem.
Therefore, a user traffic distribution method is highly needed, so that a user can be kept in an original experimental group as much as possible before and after the experimental group traffic is changed, no change occurs, and the problem caused by the change of the experimental group to which the user belongs is reduced.
In this context, embodiments of the present application are intended to provide a user traffic distribution method, apparatus, medium, and electronic device.
In a first aspect of an embodiment of the present application, a method for allocating user traffic is provided, including: acquiring a user flow change demand for a target experiment; the target experiment comprises a grouping test experiment based on user flow; responding to the user traffic change requirement, and performing traffic change according to a principle of minimizing user traffic change cost of each experimental group aiming at each experimental group needing traffic change; wherein the traffic flow path cost of any experimental group transferring traffic to itself is the lowest.
In some embodiments, the performing traffic change according to the principle that the user traffic variation cost of each experimental group is minimized for each experimental group for which traffic change is required includes: determining at least one flow path of each experimental group according to the user flow change requirement;
obtaining a path cost corresponding to the at least one flow path; and carrying out flow change on each experimental group according to the path cost minimum principle.
In some embodiments, when the path cost between any experimental packet and the remaining traffic group is smaller than the path cost between different experimental packets, the performing traffic change on each experimental packet according to the path cost minimization principle includes: and when a first experiment packet with reduced flow exists in each experiment packet, carrying out flow change on the first experiment packet through a first flow path between the first experiment packet and the residual flow group.
In some embodiments, said traffic altering the first experimental packet through a first traffic path between the first experimental packet and the remaining traffic group comprises: determining a first initial flow sub-bucket and a first target volume corresponding to the first experiment group; reserving a traffic bucket matching the first target volume from the first initial traffic bucket to the first experimental group; transferring, through the first traffic path, excess ones of the first initial traffic sub-buckets to the remaining traffic group.
In some embodiments, when the path cost between any experimental packet and the remaining traffic group is smaller than the path cost between different experimental packets, the performing traffic change on each experimental packet according to the path cost minimization principle includes: and when a second experiment packet with increased flow exists in each experiment packet, carrying out flow change on the second experiment packet through a second flow path between the second experiment packet and the residual flow group.
In some embodiments, said traffic altering the second experimental packet through a second traffic path between the second experimental packet and the remaining traffic group comprises: determining a residual flow sub-bucket and a residual amount corresponding to the residual flow group; determining a second initial flow bucket, a second initial quantity and a second target quantity corresponding to the second experiment group; calculating a difference between the second target amount and the second initial amount; reserving the second initial traffic bucket within the second experimental group;
and when the residual amount is not lower than the difference amount, transferring the traffic sub-bucket matched with the difference amount from the residual traffic sub-bucket to the second experiment group through the second traffic path.
In some embodiments, said traffic altering the second experimental packet through a second traffic path between the second experimental packet and the remaining traffic group further comprises: when the residual quantity is lower than the difference quantity, transferring the redundant other traffic of other experimental groups to the residual traffic group in a bucket manner; and transferring the traffic sub-bucket matched with the difference quantity from the residual traffic sub-bucket corresponding to the residual traffic group to the second experiment group through the second traffic path.
In some embodiments, the traffic buckets transferred to the second experimental packet over the second traffic path do not include traffic buckets corresponding to other experimental packets.
In some embodiments, the method further comprises: acquiring a corresponding flow bucket interval of each experimental group after the flow change is finished; determining the identification of a user and a target experiment identification; performing hash operation on the user identification and the target experiment identification according to a hash algorithm with a hash factor to obtain a hash value; and measuring and balancing the total number of the flow sub-buckets based on the hash value to obtain a flow sub-bucket number to which the user belongs, determining a flow sub-bucket interval to which the user belongs according to the flow sub-bucket number, and further determining an experimental group to which the user belongs.
In some embodiments, in a case where the experiment type of the target experiment is changed, changing a value of a hash factor of the hash algorithm, and re-determining an experiment group to which the user belongs based on the hash algorithm after the hash factor is changed, so as to re-assign the user.
In some embodiments, the user traffic between experiments included in the experiment layer to which the target experiment belongs is mutually exclusive pairwise; and/or the user flow between the experimental layers included in the experimental system to which the experimental layer belongs is orthogonal pairwise.
In some embodiments, the target experiment identifier, the experiment grouping identifier, and the traffic bucket partition corresponding to the experiment grouping are distributed according to a preset data structure.
In a second aspect of the embodiments of the present application, there is provided a user traffic distribution apparatus, including: the first acquisition module is used for acquiring user flow change requirements aiming at a target experiment; the target experiment comprises a grouping test experiment based on user flow; the change module is used for responding to the user flow change requirement, aiming at each experiment group needing flow change, and carrying out flow change according to the principle of minimizing the user flow change cost of each experiment group; wherein the traffic flow path cost of any experimental group transferring traffic to itself is the lowest.
In a third aspect of embodiments of the present application, a computer-readable storage medium is provided, which stores a computer program for causing a processor to execute a user traffic distribution method as shown in any one of the foregoing embodiments.
In a fourth aspect of embodiments herein, there is provided an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor executes the executable instructions to implement the user traffic distribution method as shown in any one of the foregoing embodiments.
In the technical scheme, the user flow change requirement aiming at the target experiment can be acquired; responding to the user traffic change requirement, and aiming at each experiment group needing traffic change, carrying out traffic change according to the principle of minimizing the user traffic change cost of each experiment group; the cost of a flow path for transferring the flow to the experimental group is lowest by any experimental group, so that the user flow of the experimental group can be preferentially distributed to the experimental group, the user can be kept in the original experimental group to the greatest extent before and after the flow of the experimental group is changed, the change can not occur, the problem caused by the change of the experimental group to which the user belongs is reduced, for example, the user experience can not be influenced because the user group can not be changed. For another example, since the user group is not changed, the delay problem does not occur in the statistics of some experimental indicators (e.g., user retention indicators, etc.).
In addition, the technical scheme described in the application is not limited to one-to-one correspondence of the experiment groups and the flow sub-buckets, the experiment groups can be corresponded to the flow sub-bucket intervals, the number of the flow sub-buckets can be not limited, and the user flow can be divided into any preset number of flow sub-buckets, so that refined user flow division is realized.
Drawings
The foregoing and other objects, features and advantages of exemplary embodiments of the present application will be readily understood by reading the following detailed description with reference to the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
fig. 1 is a schematic view of an application scenario of a user traffic distribution method according to an embodiment of the present application;
fig. 2 is a flowchart of a method for allocating user traffic according to an embodiment of the present application;
fig. 3 is a flowchart of a method for allocating user traffic according to an embodiment of the present application;
fig. 4 is a flowchart of a method for changing traffic based on traffic bucket according to an embodiment of the present disclosure;
fig. 5 is a flowchart illustrating a method for changing traffic based on traffic bucket according to an embodiment of the present application;
fig. 6 is a schematic flowchart illustrating a user traffic distribution method based on traffic bucket according to an embodiment of the present application;
fig. 7 is a schematic diagram illustrating a flow distribution condition before flow change according to an embodiment of the present application;
fig. 8 is a flowchart illustrating a user traffic change method according to an embodiment of the present application;
fig. 9 is a schematic diagram illustrating a situation of flow distribution in barrels after flow change according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a user traffic distribution apparatus according to an embodiment of the present application;
fig. 11 is a program product applied to a user traffic distribution method according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present application will be described with reference to a number of exemplary embodiments. It should be understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the present application, and are not intended to limit the scope of the present application in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present application may be embodied as a system, apparatus, device, method, or computer program product. Thus, the present application may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
Moreover, any number of elements in the drawings are by way of example and not by way of limitation, and any nomenclature is used solely for differentiation and not by way of limitation.
According to the embodiment of the application, a user traffic distribution method, a medium, a device and electronic equipment are provided.
The principles and spirit of the present application are explained in detail below with reference to several representative embodiments of the present application.
Summary of The Invention
The inventor finds that when performing traffic change, the traffic flow path may include transferring traffic from any experimental packet to itself, transferring traffic from any experimental packet to a remaining traffic group, transferring traffic between experimental packets, and transferring traffic from the remaining traffic group to any experimental packet. The remaining traffic group is used to store user traffic not allocated to the experimental group.
If the cost of the path, which is the path for transferring the traffic from any experimental packet to the user, is set to be the lowest and the traffic change is performed according to the principle that the cost of the user traffic change of each experimental packet is minimized, the user traffic of the experimental packet can be preferentially distributed to the user, so that the user can be kept in the original experimental packet before and after the traffic change of the experimental packet as much as possible without change, and the problem caused by the change of the experimental packet to which the user belongs is reduced.
In conclusion, the user flow change requirement aiming at the target experiment can be obtained; responding to the user traffic change requirement, and performing traffic change according to a principle of minimizing user traffic change cost of each experimental group aiming at each experimental group needing traffic change; the cost of a flow path for transferring the flow to the user by any experimental group is the lowest, so that the user flow of the experimental group can be preferentially distributed to the user, the user can be kept in the original experimental group to the maximum extent before and after the flow of the experimental group is changed, the change is avoided, and the problem caused by the change of the experimental group to which the user belongs is reduced.
Having described the basic principles of the present application, various non-limiting embodiments of the present application are described in detail below.
Application scene overview
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of a user traffic distribution method according to an embodiment of the present application.
As shown in fig. 1, the foregoing application scenario may be any type of experimental scenario. Such as live services, e-commerce services, etc.
At least one experimental layer may be provided for these experimental scenarios. Each experimental layer may be used to perform a different type of experiment. As shown in fig. 1, the experiment scenario may be a live-broadcast scenario, and the scenario may include experiment layer 1 and experiment layer 2. Illustratively, a recall experiment may be deployed in experiment layer 1; the fine experiment can be deployed in the experiment layer 2. The recalling and the fine ranking are two links in an article recommendation system, and the recalling refers to finding and retrieving potentially interesting articles from a massive article library for a user; the precise sorting is to precisely sort the found articles.
At least one experiment may be deployed in each experimental layer. At least one experiment group may be deployed in each experiment. Illustratively, fig. 1 shows a scenario in which two experiments are deployed in each experimental layer. Two experimental groups were deployed in each experiment.
And the user traffic between the experiments included in the experiment layer is mutually exclusive in pairs. The mutual exclusion of every two is that there is no crossed user between two experiments.
And the user flow between the experimental layers included in the experimental system to which the experimental layer belongs is orthogonal pairwise. The pairwise orthogonality means that each experimental layer independently performs user allocation without being influenced mutually. Namely, each experimental layer is used for carrying out user traffic distribution of experimental grouping based on the total amount of users.
Different product strategies may be employed for each experimental group included in the same experiment. By randomly distributing the user flow to each experimental group and counting the result indexes corresponding to each experimental group, on one hand, the product strategies of each experimental group can be compared, and on the other hand, the feasibility of the product strategies can be analyzed. For example, in the scenario shown in fig. 1, the experiment group a and the experiment group B in the experiment 1 may adopt different product policies a and B, and by randomly allocating user traffic to the experiment group a and the experiment group B and counting result indicators corresponding to the two experiment groups, the advantages and disadvantages of the policy a and the policy B may be compared, and the feasibility of the policy a and the policy B may be analyzed.
The experimental scenario described in the present application may be deployed in an electronic device. The application does not limit the specific type of electronic device. The types of the electronic device may include a notebook computer, a mobile phone, a Personal Digital Assistant (PDA), and the like. The electronic device may be a server device or a client device.
The electronic equipment can acquire user flow change requirements aiming at a target experiment; the target experiment comprises a grouping test experiment based on user flow;
responding to the user traffic change requirement, and performing traffic change according to a principle of minimizing user traffic change cost of each experimental group aiming at each experimental group needing traffic change; the cost of a flow path for transferring the flow to the user by any experimental group is the lowest, so that the user flow of the experimental group can be preferentially distributed to the user, the user can be kept in the original experimental group to the maximum extent before and after the flow of the experimental group is changed, the change is avoided, and the problem caused by the change of the experimental group to which the user belongs is reduced.
Exemplary method
Referring to fig. 2, fig. 2 is a flowchart of a method for allocating user traffic according to an embodiment of the present application.
The user traffic distribution method shown in fig. 2 may be applied to an electronic device.
As shown in fig. 2, the user traffic distribution method may include S202-S204. The present application does not specifically limit the order of execution of the steps unless specifically stated otherwise.
In step S202, a user flow change requirement for the target experiment is obtained.
In the present application, an experiment requiring a flow rate change may be referred to as a target experiment. The target experiment comprises a packet test experiment based on user traffic. The target experiment can be deployed in an experiment layer, and the experiment layer can be deployed in any type of experiment scene. In the present application, the number of target experiments is not limited, that is, when there are a plurality of target experiments, S202 to S204 may be performed for each target experiment.
In some embodiments, in order to ensure that each experiment in the experiment layer is not allocated with a repeated user, and/or that traffic allocation between the experiment layers of the experiment system does not affect each other, user traffic between the experiments included in the experiment layer to which the target experiment belongs is mutually exclusive in pairs; and/or the user flow between the experimental layers included in the experimental system to which the experimental layer belongs is orthogonal pairwise.
The user traffic change refers to the change of the user traffic of the experimental grouping caused by the change of the user traffic allocated to the experimental grouping. The user volume is a notion of quantity.
For example, the user traffic of the experimental packet may be changed when the number of users allocated to the experimental packet is changed from small to large or when the number of users allocated to the experimental packet is changed from large to small.
In some embodiments, traffic may be allocated for the experimental packets using traffic bucketing. The traffic sub-bucket is used for loading user traffic, and the traffic sub-bucket divided by the user can be determined based on information such as user identification.
In some embodiments, a preset number of traffic sub-buckets may be set. For example, the preset number may be 100. 100 traffic sub-buckets may be preset and then traffic sub-buckets may be partitioned into experimental groups. And then determining the flow sub-bucket to which the user belongs according to the information such as the identification of the user and the like, and completing the distribution of the user flow.
Under the condition that the method for determining the divided traffic sub-buckets of the user is not changed, the user can be divided into the same traffic sub-bucket before and after the traffic of the user is changed, and then if the traffic sub-bucket originally allocated to the experimental group does not belong to the experimental group any more after the traffic is changed, the traffic of the user in the traffic sub-bucket cannot be allocated to the experimental group.
In some embodiments, the user volume may be characterized by a flow ratio. The flow rate proportion refers to the proportion of the user amount allocated for the experiment grouping to the total user amount.
In embodiments where the method of traffic binning is used to allocate traffic to an experimental group, the traffic proportion may indicate a percentage of the number of traffic bins allocated to the experimental group to the total number of traffic bins. For example, the total number of traffic buckets may be 100. The traffic proportion corresponding to the experimental group a is 10%, which may indicate that 10 traffic sub-buckets are allocated to the experimental group a.
The user traffic change requirement may be initiated by an experiment demander (e.g., an operator, a developer, a marketer, etc.) indicating the amount of users that need to be changed for the target experiment.
In some embodiments, the user traffic change requirement may include an experiment group in the target experiment requiring a traffic change, and a target volume of the experiment group after the traffic change, thereby indicating a traffic change condition in the target experiment.
For example, fig. 1 shows a scenario in which the user traffic change demand includes a user volume change of packet a of experiment 1 by 20% (traffic proportion). It can be known that experiment 1 is the target experiment, and the flow rate of the group a in experiment 1 is changed, and the target amount is 20%. Then, the current traffic proportion of the packet a can be obtained to be 10%, that is, the traffic variation of the packet a can be known to be 10%. In the present application, the user amount corresponding to the experimental group before the traffic change is referred to as an initial amount.
S204, responding to the user flow change requirement, and aiming at each experiment group needing flow change, carrying out flow change according to the principle of minimizing the user flow change cost of each experiment group; wherein the traffic flow path cost of any experimental group transferring traffic to itself is the lowest.
In the application, each experimental layer performs flow distribution based on the total amount of users. For example, in the scenario shown in fig. 1, assuming that the total number of users is 100, both experimental layers 1 and 2 perform traffic distribution based on the total number of users of 100. For example, experiment layer 1 may assign a user amount of 40% to experiment 1 and 20% to experiment 2, where experiment group A, C, D is assigned 10% and experiment group B is assigned 30%, respectively. In the application, the user amount which is not allocated to the experimental group in the total user amount can be centrally stored in the remaining traffic group. In the previous example, the remaining 40% of the user volume in experimental layer 1 may be concentrated in the remaining traffic group. The amount of users remaining in the remaining traffic group may be referred to herein as a remaining amount.
In response to the user traffic change demand, there are only two situations per experimental group where user change occurs, namely user traffic increase and decrease. For example, in the scenario shown in fig. 1, the user amount of experiment group a may be increased from 10% to 20%, and the user amount of experiment group B may be decreased from 30% to 20%. For the sake of convenience of differentiation, the experiment packet with the decreased user traffic may be referred to as a first experiment packet, and the experiment packet with the increased user traffic may be referred to as a second experiment packet.
Different traffic paths can be determined according to the traffic change condition of each experimental group.
During a user traffic change, the following three flow paths may exist for the first experimental packet: transferring traffic from the experimental group to itself; transferring traffic from the experimental group to the remaining traffic group; traffic is diverted from the experimental packet to other experimental packets.
There may be four flow paths for the second experimental packet:
transferring traffic from the experimental group to itself; transferring traffic from the remaining traffic group to the experimental group; transferring traffic from other experimental packets to the experimental packets; other experimental groups transfer traffic to and from the remaining traffic groups.
The principle of minimizing the user flow variation cost refers to the lowest sum of the flow path cost of the flow required for completing the flow variation. And carrying out flow change based on a user flow change cost minimization principle, and sorting and selecting flow paths according to the cost of the flow paths from low to high to carry out flow transfer in the flow change process so as to finish the flow change.
In the foregoing flow paths, the flow path cost of any experimental packet for transferring the traffic to itself is the lowest, so based on the principle of minimizing the user traffic variation cost, the flow path with the lowest cost is preferentially selected in the flow process, that is, the experimental packet transfers the traffic to itself.
It can be seen that in the scheme described in S202-S204, the user traffic change demand for the target experiment can be obtained; responding to the user traffic change requirement, and aiming at each experiment group needing traffic change, carrying out traffic change according to the principle of minimizing the user traffic change cost of each experiment group; the cost of a flow path for transferring the flow to the user by any experimental group is the lowest, so that the user flow of the experimental group can be preferentially distributed to the user, the user can be kept in the original experimental group to the maximum extent before and after the flow of the experimental group is changed, the change is avoided, and the problem caused by the change of the experimental group to which the user belongs is reduced.
The application also provides a user flow distribution method. The steps of the method can be seen in S202-S204. The step of S202 will not be described in detail. In S204, the flow rate change may be implemented by using the path cost of the corresponding flow rate flow path for each experimental group.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for allocating user traffic according to an embodiment of the present application. The steps illustrated in fig. 3 are related to S204. As shown in fig. 3, the steps of the method may be seen in S302-S306. The present application does not specifically limit the order of execution of the steps unless specifically stated otherwise.
S302, determining at least one flow path of each experimental group according to the user flow change requirement.
In this step, all possible flow paths may be obtained for each experimental group according to whether the experimental group is a flow increase or a flow decrease.
That is, the following three flow paths can be obtained for the first experimental packet: transferring traffic from the experimental group to itself; transferring traffic from the experimental group to the remaining traffic group; traffic is diverted from the experimental packet to other experimental packets.
The following four flow paths may be obtained for the second experimental group:
transferring traffic from the experimental group to itself; transferring traffic from the remaining traffic group to the experimental group; transferring traffic from other experimental packets to the experimental packets; other experimental groups transfer traffic to and from the remaining traffic groups.
S304, obtaining the path cost corresponding to the at least one flow path.
The paths shown in S302 are combined in the same type, and it can be obtained that the traffic change actually includes only four paths: the traffic is transferred from any one of the experimental packets to a remaining traffic group (hereinafter referred to as a first traffic path), the traffic is transferred from the remaining traffic group to any one of the experimental packets (hereinafter referred to as a second traffic path), the traffic is transferred from any one of the experimental packets to itself (hereinafter referred to as a third traffic path), and the traffic is transferred between the experimental packets (hereinafter referred to as a fourth traffic path). In some embodiments, the path costs of the aforementioned four paths may be preset according to the rule of high or low path costs.
The rule of the path cost may be a rule set by the experimental demander according to the business requirement. Wherein the third flow path is the least costly of the four paths. The cost of the other three flow paths can be set as desired. For example, in the case that the remaining traffic group has enough traffic, it needs to be ensured that traffic is transferred from the remaining traffic group to the experimental packet first, and the path cost of the second traffic path may be set to be lower than the path cost of the fourth traffic path. For another example, if it is required to ensure that the traffic is transferred from the other experimental packets to the remaining traffic group first and then from the remaining traffic group to the experimental packet when the traffic of the remaining traffic group is insufficient, the sum of the path cost of the first traffic path and the path cost of the second traffic path may be set to be lower than the path cost of the fourth traffic path. This application does not enumerate one possible cost setting method.
In this step, the preset path cost of each path may be obtained, and then the path cost of each path corresponding to each experimental group is determined for each experimental group.
For example, it is assumed that the preset path costs of the first and second flow paths are 1, the path cost of the third flow path is 0, and the path cost of the fourth flow path is 3.
For the first experimental group, three flow paths correspond: the path cost for transferring the traffic from the experimental packet to itself is 0; the path cost for transferring traffic from the experimental group to the remaining traffic group is 1; the path cost for transferring traffic from the experimental packet to other experimental packets is 3.
For the second experimental group, there are four corresponding flow paths:
transferring the flow from the experimental group to the self-body to be 0; the path cost for transferring traffic from the remaining traffic group to the experimental group is 1; the path cost of transferring traffic from other experimental packets to the experimental packets is 3; the other experimental packets have a path cost of 2 for transferring traffic to and from the remaining traffic group.
And S306, carrying out flow change on each experimental group according to the path cost minimum principle.
The path cost minimization principle refers to the sum of the flow path costs of the flow required for completing the flow change.
In S306, for the first experiment packet with the decreased user amount, the flow traffic distribution path may be selected from the three corresponding traffic flow paths in the order of the lower path cost to the higher path cost for traffic transfer.
In some embodiments, when the path cost between any experimental packet and the remaining traffic group is less than the path cost between different experimental packets, that is, the path cost for transferring traffic from the experimental packet to the remaining traffic group is lower than the path cost for transferring traffic from the experimental packet to other experimental packets, in S306, a traffic change may be performed on the first experimental packet through the first traffic path between the first experimental packet and the remaining traffic group.
Referring to fig. 4, fig. 4 is a flowchart of a method for changing traffic based on traffic buckets according to an embodiment of the present disclosure. The steps illustrated in fig. 4 are related to S306. As shown in fig. 4, the steps of the method may be seen in S402-S406. The present application does not specifically limit the order of execution of the steps unless specifically stated otherwise.
S402, determining a first initial flow bucket and a first target volume corresponding to the first experiment group.
The first initial traffic bucket refers to a traffic bucket that the first experimental packet owns prior to the traffic change.
In some embodiments, a correspondence between the experimental packets and the traffic buckets may be stored, from which the first initial traffic bucket may be determined. In some embodiments, the target experiment identifier, the experiment grouping identifier, and the flow bucket partition corresponding to the experiment grouping are distributed according to a preset data structure. The correspondence may be maintained by the data structure.
With data 1-A: {1-10} is an example. The data may indicate that in experiment 1, the interval of the flow buckets corresponding to the experiment group a is 1-10. The 1 bit of the initial flow bucket identifier in the 1-10 is the ending flow bucket identifier, and 10 is the ending flow bucket identifier.
And then, the data 2-D: { 71-75; 86-120} are examples. This data may indicate that experiment 2, experiment packet D corresponds to traffic buckets ranging from 71-75 and 86-120.
The first target amount may be determined by the flow rate change demand acquired in S202.
S404, reserving the flow bucket matched with the first target volume from the first initial flow bucket to the first experiment group.
Because the first experimental group can reduce the user quantity, the corresponding first target quantity is smaller than the first initial quantity, and the path cost of any experimental group for distributing the flow to the first experimental group is the lowest, the flow bucket matched with the first target quantity can be reserved from the first initial flow bucket to the first experimental group, so that the first experimental group can be guaranteed to preferentially reserve the flow to the first experimental group, and the user can be guaranteed not to change the experimental group to the maximum extent.
S406, transferring redundant traffic sub-buckets in the first initial traffic sub-bucket to the remaining traffic group through the first traffic path.
Since the first experimental group may reduce the number of users, there may be redundant traffic buckets in the first initial traffic bucket after S404 is completed.
Since the path cost between any one experimental group and the remaining traffic group is less than the path cost between different experimental groups, traffic conversion is performed through the first traffic path, and at this time, the redundant traffic in the first initial traffic sub-bucket may be transferred to the remaining traffic group.
Through the scheme recorded in S402-S406, it can be ensured to the greatest extent that the original traffic sub-bucket can be reserved for the first experimental group with reduced user traffic, and under the condition that the method for determining the traffic sub-bucket divided by the user does not change, the user can be divided into the same traffic sub-bucket before and after the user traffic changes, so if the traffic sub-bucket originally allocated to the experimental group continues to belong to the experimental group after the traffic changes, the user traffic in the traffic sub-bucket can also be allocated to the experimental group, that is, the user can be kept in the original experimental group before and after the traffic changes of the experimental group as much as possible without changing, and the problem caused by the change of the experimental group to which the user belongs is reduced.
In S306, for the second experimental packet with the increased user amount, the traffic paths may be selected from the four corresponding traffic paths in the order from low to high in path cost to perform traffic transfer.
In some embodiments, when the path cost between any experimental packet and the remaining traffic group is less than the path cost between different experimental packets, i.e., the path cost for transferring traffic from the remaining traffic group to the experimental packet is lower than the path cost for transferring traffic from the experimental packet to other experimental packets, in S306, a traffic change may be performed on the second experimental packet through a second traffic path between the second experimental packet and the remaining traffic group.
Referring to fig. 5, fig. 5 is a flowchart of a method for changing traffic based on traffic buckets according to an embodiment of the present disclosure. The steps illustrated in fig. 5 are related to S306. As shown in fig. 5, the steps of the method may be referred to as S502-S512. The present application does not specifically limit the order of execution of the steps unless specifically stated otherwise.
And S502, determining the residual flow bucket and the residual amount corresponding to the residual flow group.
In this step, the remaining traffic sub-bucket and the remaining amount may be determined by maintaining a correspondence between remaining traffic groups and traffic sub-buckets.
S504, determining a second initial flow bucket, a second initial amount and a second target amount corresponding to the second experiment group.
In this step, the second initial traffic sub-bucket may be determined by maintaining a correspondence between the second experimental group and the traffic sub-bucket. The experiment system stores the user quantity of each experiment group, and the current user quantity of the second experiment group is obtained, so that the second initial quantity corresponding to the second experiment group can be obtained. The second target amount may be determined by the flow rate change demand acquired in S202.
S506, calculating a difference value between the second target quantity and the second initial quantity.
The difference amount may indicate a number of traffic buckets that the second experimental packet needs to be increased. Since the second experimental group increases the user amount, i.e. the second target amount is larger than the second initial amount, in some embodiments, the difference amount may be obtained by subtracting the second initial amount from the second target amount. S508, reserving the second initial flow sub-bucket in the second experiment group.
Because the second experiment group increases the user quantity and the path cost of any experiment group distributing the flow to the second experiment group is the lowest, the second initial flow sub-bucket can be completely reserved so as to ensure that the second experiment group obtains the whole flow sub-bucket per se and ensure that the user can not change the experiment group to the maximum extent.
And S510, when the residual quantity is not lower than the difference quantity, transferring the flow sub-bucket matched with the difference quantity from the residual flow sub-bucket to the second experiment group through the second flow path.
When the remaining amount is not less than the difference amount, it can be said that there are enough flow buckets in the remaining flow group, and since the path cost between any experimental group and the remaining flow group is less than the path cost between different experimental groups, flow conversion is performed through a second flow path, that is, a flow bucket matched with the difference amount is transferred from the remaining flow bucket corresponding to the remaining flow group to the second experimental group through the second flow path.
In some embodiments, because there are enough traffic sub-buckets in the remaining traffic group, when the traffic sub-buckets are transferred, the traffic sub-buckets transferred to the second experimental group through the second traffic path may not include traffic sub-buckets corresponding to other experimental groups, so that it may be further ensured that the user does not change the experimental groups, and user experience is improved.
For example, the remaining traffic bucket includes two sections 41-50 and 71-100, where 41-50 is the excess traffic bucket transferred in the experimental packet B, and at this time, when the traffic bucket is transferred through the second traffic path, the traffic bucket may be allocated from the range of 71-100, so that it may be further ensured that the user does not change the experimental packet, and the user experience is improved.
And S512, when the residual quantity is lower than the difference quantity, transferring the redundant other flow sub-buckets of other experimental groups to the residual flow group, and transferring the flow sub-bucket matched with the difference quantity from the residual flow sub-buckets corresponding to the residual flow group to the second experimental group through the second flow path.
When the remaining amount is smaller than the difference amount, it can be stated that the remaining traffic sub-buckets in the remaining traffic group are not enough to be allocated to the second experimental group, and since the path cost between any one experimental group and the remaining traffic group is smaller than the path cost between different experimental groups, other traffic sub-buckets may be transferred to the remaining traffic group through the first traffic path first, and then the traffic sub-buckets matched with the difference amount are transferred from the remaining traffic group to the second experimental group through the second traffic path.
Through the schemes recorded in S502-S512, it can be ensured to the greatest extent that the second experimental group with increased user volume can retain the original traffic sub-bucket, and under the condition that the method for determining the traffic sub-bucket into which the user is divided is not changed, the user can be divided into the same traffic sub-bucket before and after the user traffic is changed, so if the traffic sub-bucket originally allocated to the experimental group continues to belong to the experimental group, the user traffic in the traffic sub-bucket can also be allocated to the experimental group, that is, the user can be retained in the original experimental group to the greatest extent before and after the traffic of the experimental group is changed, and the change does not occur, thereby reducing the problem caused by the change of the experimental group to which the user belongs.
The application also provides a user flow distribution method based on the flow sub-bucket. Referring to fig. 6, fig. 6 is a schematic flow chart illustrating a user traffic distribution method based on traffic bucket according to an embodiment of the present application. The method shown in fig. 6 includes S602-S612. The steps of S602-S604 may refer to the relevant descriptions of S202-S204. After S604, the experimental grouping described by the user may be determined according to information such as the user identifier.
And S606, acquiring a corresponding flow bucket interval of each experimental group after the flow change is finished.
In the user traffic allocation method based on traffic bucket, the correspondence between the experimental grouping and the traffic allocation may be stored. For example, the corresponding relationship is stored in a data structure composed of the target experiment identifier, the experiment grouping identifier and the flow bucket interval corresponding to the experiment grouping.
For the first experiment packet with reduced traffic, a first initial traffic bucket interval before the first experiment packet is changed may be obtained, and then after the steps illustrated in S402-S406, the traffic bucket interval reserved for itself in the first initial traffic bucket interval is the traffic bucket interval of the first experiment packet after the traffic change.
For example, in the scenario illustrated in fig. 1, the traffic of experimental packet B needs to be reduced from 30% to 20%. According to data 1-B: {21-50}, it can be seen that the first initial traffic bucket interval corresponding to the experimental packet B is 21-50, and after S402-S406, it is assumed that the remaining traffic bucket intervals 21-40, 41-50 are transferred to the remaining traffic groups. Namely, the corresponding flow bucket interval of the experimental group B after the change is 21-40.
For the second experiment packet with increased traffic, a second initial traffic bucket interval before the second experiment packet is changed may be obtained, and then after the steps indicated by, for example, S502-S512, on the basis of the second initial traffic bucket interval, the traffic bucket interval in which the remaining traffic group is transferred to the experiment packet is added, that is, the traffic bucket interval of the second experiment packet after the traffic change.
For example, in the scenario illustrated in fig. 1, the traffic of experimental packet a needs to be increased from 10% to 20%. According to data 1-A: {1-10}, it is known that the second initial traffic bucket interval corresponding to experimental packet a is 1-10, after S502-S512, it is assumed that traffic bucket intervals 1-10 remain, and traffic buckets 71-80 are transferred to experimental packet a by the remaining traffic groups. Namely, the corresponding flow bucket intervals of the experimental group A after the change are 1-10 and 71-80.
And S608, determining the user identification and the target experiment identification.
The user is assigned a unique identification when participating in a target experiment. The target experiment will also be assigned a unique identification at set-up. The identification of the user can be determined by acquiring the participation information of the user, and the identification of the target experiment can be determined by inquiring the relevant information of the target experiment.
S610, carrying out hash operation on the user identification and the target experiment identification according to a hash algorithm with a hash factor to obtain a hash value.
The Hash algorithm (Hash), also called Digest algorithm (Digest), functions as: any set of input data is calculated to obtain an output abstract with a fixed length.
The hash factor (hashed) is a preset value, and the hash factor can affect the calculation result of the hash algorithm. Under the condition that the hash factor is not changed, the same input must obtain the same output, so that under the condition that the user identification is not changed, the user can be divided into unique flow sub-buckets. If the hash factor changes, the hash calculation result also changes, and the user is repartitioned to a new traffic sub-bucket, which can be used to break up the user distribution result. The application does not limit the specific function used by the hash algorithm.
S612, measuring and balancing the total number of the flow sub-buckets based on the hash value to obtain a flow sub-bucket number to which the user belongs, determining a flow sub-bucket interval to which the user belongs according to the flow sub-bucket number, and further determining an experimental group to which the user belongs.
The total number of the flow buckets is a preset value. For example, it may be 100 or 1000. And (4) obtaining the surplus of the total number of the flow sub-buckets by using the hash value calculated in the step (S610), obtaining the flow sub-bucket number of the user, matching the flow sub-bucket number with the corresponding flow sub-bucket interval of each experimental group obtained in the step (S606) after the flow change is completed, obtaining the flow sub-bucket interval where the flow sub-bucket number of the user is located, and further determining the experimental group of the user.
For example, the traffic bucket number of the target user is 7 through S608 to S612, and the traffic bucket intervals of the experimental group a include 1 to 10 and 71 to 80 through S606, so that the target user is assigned to the experimental group a.
The method recorded in S602-S612 can realize user flow distribution based on flow bucket, and can ensure that the user can be kept in the original experimental group to the maximum extent before and after the flow of the experimental group is changed, and the change is avoided, thereby reducing the problems caused by the change of the experimental group to which the user belongs.
In some scenarios, the experiment type of the target experiment may change, and users participating in the target experiment need to be re-randomly assigned to each experiment group. A common practice in the related art is to re-allocate traffic sub-buckets for experimental groups to implement re-allocation of users, but such a method is relatively complicated to implement on one hand, and on the other hand, because the partition relationship between the traffic sub-buckets and the users still remains unchanged, re-allocating traffic sub-buckets is equivalent to allocating the entire users in the traffic sub-buckets, and it is not really possible that users are re-randomly allocated.
In some embodiments, in a case where the experiment type of the target experiment is changed, changing a value of a hash factor of the hash algorithm, and re-determining an experiment group to which the user belongs based on the hash algorithm after the hash factor is changed, so as to re-assign the user. Therefore, the flow sub-buckets corresponding to the users can be randomly scattered in a mode of changing the hash factors, on one hand, the users can be divided into experimental groups again by means of convenient and quick realization, on the other hand, the dividing relation between the flow sub-buckets and the users is scattered, and the users are really randomly distributed again.
For example, after the target experiment is originally an AB experiment and is changed to an AA experiment, the users need to be randomly allocated again. In the AB experiment, different strategies may be assigned to the experiment groups in the same experiment, focusing on comparing different strategies. In AA experiments, the same strategy can be assigned to experimental groups in the same experiment, focusing on the impact of checking for differences between strategy versions.
Assume that the flow bucket intervals corresponding to the experimental packet a are 1-10 and 71-80, and the flow bucket intervals corresponding to the flow packet B are 21-40.
When the target experiment is an AB experiment, for the target user, in S610, a hash algorithm with a first hash factor may be used to calculate a hash value corresponding to the target user, and then the total number of traffic sub-buckets is left to 100, so as to obtain a first traffic sub-bucket number corresponding to the target user. Such as a first traffic bucket number of 7. Then, according to the first traffic bucket number 7, it is determined that the target user belongs to the traffic bucket interval 1-10 corresponding to the experimental group a, and it is further determined that the target user belongs to the experimental group a.
When the experiment is changed into an AA experiment, the first hash factor may be changed into a second hash factor, the hash value corresponding to the target user is recalculated, and then the total number of traffic sub-buckets 100 is left to obtain a second traffic sub-bucket number corresponding to the target user. As the hash factor changes, the recalculated hash value may change, as may the traffic bucket number resulting after the remainder of the total number of traffic buckets. Assume that the second traffic bucket number is 33. According to the second traffic bucket number 33, the traffic bucket intervals 21-40 corresponding to the target user belonging to the experimental group B can be determined, and then the target user belonging to the experimental group B is determined, so that the effect of subdividing the target user into experimental groups is achieved, and the hash factor of the hash algorithm is easily changed, so that the objective user can be subdivided into the experimental groups conveniently and quickly.
The following description will be made with reference to an application scenario of fig. 1. It should be noted that the foregoing application scenarios are merely illustrative for the convenience of understanding the spirit and principles of the present application and that the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable. The following description is made in conjunction with a live scene. The scenario is deployed in an electronic device.
In the live broadcast scenario shown in fig. 1, the experiment layer 1 may be used to perform a recall experiment, and the experiment layer 1 includes a recall experiment 1 and a recall experiment 2. The recall experiment 1 includes an experiment group a and an experiment group B, and the recall experiment 2 includes an experiment group C and an experiment group D. The experimental layer 2 can be used for the fine ranging experiment, and the experimental layer 2 is not described in detail in the application.
The user flow between the experimental layer 1 and the experimental layer 2 is orthogonal, that is, the experimental distribution between the two layers is not affected. The total quantity of the preset flow sub-barrels is 100, the number is 1-100, namely, the experiment layers 1 and 2 divide the 100 flow sub-barrels respectively. The user traffic between experiment 1 and experiment 2 is mutually exclusive, i.e. there is no same traffic bucket between experiment 1 and experiment 2. Traffic sub-buckets in the experimental layer that are not assigned to the experimental packet are stored within the remaining traffic group, referred to as remaining traffic sub-buckets.
When the experiment groups are set for the first time, the flow sub-buckets matched with the flow proportions can be randomly distributed to the experiment groups based on the flow proportions distributed to the experiment groups.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating a flow bucket allocation situation before flow change according to an embodiment of the present application. Fig. 7 is an illustration of the case where traffic buckets are randomly allocated for each experimental group included in the experimental layer 1 before traffic is changed.
The upper part of the box illustrated in fig. 7 is the percentage between the name of the box and the number of the traffic buckets corresponding to the box and the total number of the traffic buckets, and the lower part of the box is the traffic bucket interval corresponding to the box.
In FIG. 7, the total flow bucket number is 100, the percentage is 100%, and the buckets are numbered 1-100. The flow bucket division interval corresponding to the experiment group A is 1-10, the percentage is 10%, the flow bucket division interval corresponding to the experiment group B is 21-50, the percentage is 30%, the flow bucket division interval corresponding to the experiment group C is 51-60, the percentage is 10%, the flow bucket division interval corresponding to the experiment group D is 61-70, the percentage is 10%, the flow bucket division interval corresponding to the residual flow group is 11-20, 71-100, and the percentage is 40%.
In some embodiments, in the electronic device, a preset data structure may be used to store the correspondence between the experiment packet and the traffic bucket interval. Taking the experimental group a as an example, the data may be 1-a: {1-10}. The data corresponding to other experimental groups are not detailed here.
In the scenario illustrated in fig. 1, a path cost for transferring traffic from any experimental packet to any remaining traffic group (hereinafter, referred to as a first traffic path) may be set to 1 in advance, a path cost for transferring traffic from any remaining traffic group to any experimental packet (hereinafter, referred to as a second traffic path) may be set to 1, a path cost for transferring traffic from any experimental packet to itself (hereinafter, referred to as a third traffic path) may be set to 0, and a path cost for transferring traffic between experimental packets (hereinafter, referred to as a fourth traffic path) may be set to 3.
Referring to fig. 8, fig. 8 is a schematic flowchart illustrating a user traffic change method according to an embodiment of the present application. As shown in fig. 8, the method may include: s801 to S808, unless otherwise specified, the present application does not specifically limit the execution order of these steps.
S801, acquiring a flow change demand.
The requirement is uploaded to the experiment system by the experiment demander according to the business requirement. Assume that the traffic change requirement indicates that the target volume for both experimental group a and experimental group B is 20%.
S802, responding to the flow change requirement, and determining a flow path corresponding to each experiment group needing to change the user flow.
In this example, the experimental packet a and the experimental packet B are used to change the flow rate.
The experimental group B is the first experimental group with reduced traffic, which corresponds to three flow paths: a third flow path, a first flow path, and a fourth flow path.
The experimental group a is a second experimental group with increased traffic, which corresponds to four flow paths:
a third flow path, a second flow path, a fourth flow path, and a combined path of the first and second flow paths.
And S803, determining the cost of the traffic path corresponding to each experimental group according to the prestored path cost.
The path cost stored in the device in advance is acquired, and it can be obtained that for the experimental packet B, the path cost of the third traffic path becomes 0, the path cost of the first traffic path becomes 1, and the path cost of the fourth traffic path becomes 3.
For the experiment packet a, the path of the third flow path becomes 0, the path cost of the second flow path is 1, the path cost of the fourth flow path is 3, and the path cost of the combined path of the first flow path and the second flow path is 2.
S804, for the first experiment packet with reduced traffic, in response to the third traffic path having the lowest cost, reserving a traffic bucket corresponding to the target traffic, and in response to the first traffic path having a cost lower than the path cost of the fourth traffic path, transferring the remaining traffic buckets in the first experiment packet to the remaining traffic group.
In this example, if the target amount of the experimental packet B is 20%, then 20% of the traffic buckets may be randomly reserved from the corresponding initial traffic bucket interval 21-50. For example, 21-40 traffic buckets may be reserved. The excess 41-50 traffic buckets may be diverted to the remaining traffic groups. The remaining flow groups at this time may include 41-50, 11-20, and 71-100, with a 50% flow ratio.
And S805, aiming at the second experiment grouping with increased flow, responding to the lowest cost of the third flow path, reserving all initial flow buckets, calculating a difference value based on the target quantity and the initial quantity, responding to the situation that the residual quantity in the residual flow group reaches the difference value and the cost of the second flow path is lower than the cost of the fourth flow path, and selecting the flow bucket matched with the difference value from the residual flow buckets in the residual flow group to be transferred to the second experiment grouping.
In this example, if the initial amount of the experimental packet a is 10% and the target amount is 20%, it is possible to reserve all the initial traffic of the experimental packet a by buckets 1-10 preferentially. The amount of difference between the target amount and the initial amount may then be calculated to be 10%. Since the remaining 50% of the remaining flow group is greater than the difference amount by 10%, 10% of the flow from the remaining flow group can be selected to be transferred to the experimental group a in a bucket.
In some embodiments, to further ensure that the user experimental packet is not altered, 10% of the traffic buckets diverted from the remaining traffic groups other than the experimental packet a may be selected for the experimental packet a. For example, the remaining traffic group includes intervals 41-50, 11-20, and 71-100, 41-50 is transferred from the experimental group B to the remaining traffic group, i.e., 10% of the traffic from 11-20 and 71-100, for example, 71-80 is selected for the experimental group a in S805.
Referring to fig. 9, fig. 9 is a schematic diagram illustrating a situation of flow distribution in buckets after flow change according to an embodiment of the present application. FIG. 9 is a view illustrating the result of the flow rate change performed through the steps S801 to S805,
as shown in fig. 9, in the upper experiment 1 and experiment 2, the dotted line indicates the flow bucket allocation before the change of each packet, and in the lower experiment, the flow bucket allocation after the change is indicated. The solid line with arrows indicates the diversion of the flow buckets. The solid line shows the diverted traffic fraction and the traffic bucket interval.
As shown in fig. 9, 20% of the traffic buckets 21 to 40 in the experimental group B before the traffic change are reserved until the traffic change, and 10% of the traffic buckets 41 to 50 are transferred to the remaining traffic group.
After 10% of the traffic sub-buckets 1-10 in the experimental group a before traffic change are reserved until the traffic change, 10% of the traffic sub-buckets 71-80 are transferred from the remaining traffic group to the experimental group a.
The flow buckets for experimental groups C and D were unchanged.
S806, obtaining a user identification and an experiment identification of a target user to be distributed, and calculating to obtain a hash value corresponding to the target user based on a hash algorithm with a hash factor.
And S807, measuring and balancing the total number of the traffic sub-buckets based on the hash value to obtain the traffic sub-bucket number to which the target user belongs, and determining the experimental group to which the user belongs according to the traffic sub-bucket interval corresponding to each experimental group after traffic change.
For example, if the traffic bucket number of the divided target user is 7 according to the calculation of S806-S807, it may be determined that the target user is divided into the experimental group a, i.e., the recall experiment is performed according to the policy of the experimental group a.
And S808, when the experiment type is changed, changing the hash factor and re-determining the experiment group to which the user belongs.
For example, after the type of experiment 1 is changed from AB to AA, the hash factor may be changed to break up the partitioned traffic buckets of the user, so as to implement the re-random allocation of the user traffic.
According to the schemes described in S801-S808, the user can be kept in the original experimental group to the maximum extent before and after the experimental group traffic is changed, and the change does not occur, so that the problem caused by the change of the experimental group to which the user belongs is reduced, for example, the user experience is not affected because the user group is not changed. For another example, since the user group is not changed, the delay problem does not occur in the statistics of some experimental indicators (e.g., user retention indicators, etc.). And after the experiment type is changed, users can be conveniently scattered, and user flow distribution is carried out again.
In addition, the technical scheme described in the application is not limited to one-to-one correspondence of the experiment groups and the flow sub-buckets, the experiment groups can be corresponded to the flow sub-bucket intervals, the number of the flow sub-buckets can be not limited, and the user flow can be divided into any preset number of flow sub-buckets, so that refined user flow division is realized.
Exemplary devices
Having described the method of the exemplary embodiment of the present application, a user traffic distribution apparatus exemplary disclosed herein is next described with reference to fig. 10. The user traffic distribution device can be applied to a client, and is used for implementing the user traffic distribution method shown in any one of the foregoing embodiments.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a user traffic distribution device according to an embodiment of the present application.
As shown in fig. 10, the user traffic distribution apparatus 1000 may include:
a first obtaining module 1010, configured to obtain a user traffic change requirement for a target experiment; the target experiment comprises a grouping test experiment based on user flow;
a changing module 1020, configured to respond to the user traffic change demand, perform traffic change for each experiment group that needs to perform traffic change according to a principle that a user traffic change cost of each experiment group is minimized; wherein the traffic flow path cost of any experimental group transferring traffic to itself is the lowest.
In some embodiments, the alteration module 1020 is to:
determining at least one flow path of each experimental group according to the user flow change requirement;
obtaining a path cost corresponding to the at least one flow path;
and carrying out flow change on each experimental group according to the path cost minimum principle.
In some embodiments, when the path cost between any experimental group and the remaining traffic group is less than the path cost between different experimental groups, the altering module 1020 is configured to:
and when a first experiment packet with reduced flow exists in each experiment packet, carrying out flow change on the first experiment packet through a first flow path between the first experiment packet and the residual flow group.
In some embodiments, the alteration module 1020 is to:
determining a first initial flow sub-bucket and a first target volume corresponding to the first experiment group;
reserving a traffic bucket matching the first target volume from the first initial traffic bucket to the first experimental group;
transferring, through the first traffic path, excess ones of the first initial traffic sub-buckets to the remaining traffic group.
In some embodiments, when the path cost between any experimental group and the remaining traffic group is less than the path cost between different experimental groups, the altering module 1020 is configured to:
and when a second experiment packet with increased flow exists in each experiment packet, carrying out flow change on the second experiment packet through a second flow path between the second experiment packet and the residual flow group.
In some embodiments, the alteration module 1020 is to:
determining a residual flow sub-bucket and a residual amount corresponding to the residual flow group;
determining a second initial flow bucket, a second initial quantity and a second target quantity corresponding to the second experiment group;
calculating a difference between the second target amount and the second initial amount;
reserving the second initial traffic bucket within the second experimental group;
and when the residual amount is not lower than the difference amount, transferring the traffic sub-bucket matched with the difference amount from the residual traffic sub-bucket to the second experiment group through the second traffic path.
In some embodiments, the altering module 1020 is further configured to:
when the residual quantity is lower than the difference quantity, transferring the redundant other traffic of other experimental groups to the residual traffic group in a bucket manner;
and transferring the traffic sub-bucket matched with the difference quantity from the residual traffic sub-bucket corresponding to the residual traffic group to the second experiment group through the second traffic path.
In some embodiments, the traffic buckets transferred to the second experimental packet over the second traffic path do not include traffic buckets corresponding to other experimental packets.
In some embodiments, the apparatus 1000 further comprises:
the second obtaining module is used for obtaining a corresponding flow bucket interval of each experimental group after the flow change is finished;
the first determining module is used for determining the identification of the user and the target experiment identification;
the calculation module is used for carrying out hash operation on the user identification and the target experiment identification according to a hash algorithm with a hash factor to obtain a hash value;
and the second determining module is used for measuring and balancing the total number of the flow sub-buckets based on the hash value to obtain the flow sub-bucket number to which the user belongs, determining the flow sub-bucket interval to which the user belongs according to the flow sub-bucket number, and further determining the experimental group to which the user belongs.
In some embodiments, the apparatus 1000 further comprises:
the changing module is used for changing the value of the hash factor of the hash algorithm under the condition that the experiment type of the target experiment is changed;
and the re-determination module is used for re-determining the experimental group to which the user belongs based on the hash algorithm after the hash factor is changed so as to re-distribute the user.
In some embodiments, the user traffic between experiments included in the experiment layer to which the target experiment belongs is mutually exclusive pairwise; and/or the user flow between the experimental layers included in the experimental system to which the experimental layer belongs is orthogonal pairwise.
In some embodiments, the target experiment identifier, the experiment grouping identifier, and the traffic bucket partition corresponding to the experiment grouping are distributed according to a preset data structure.
In the scheme, the user flow change requirement aiming at the target experiment can be acquired; responding to the user traffic change requirement, and aiming at each experiment group needing traffic change, carrying out traffic change according to the principle of minimizing the user traffic change cost of each experiment group; the cost of a flow path for transferring the flow to the user by any experimental group is the lowest, so that the user flow of the experimental group can be preferentially distributed to the user, the user can be kept in the original experimental group to the maximum extent before and after the flow of the experimental group is changed, the change is avoided, and the problem caused by the change of the experimental group to which the user belongs is reduced.
Exemplary Medium
Having described the method and apparatus of the exemplary embodiments of the present application, a readable storage medium of the exemplary disclosure of the present application is described with reference to fig. 11. The storage medium stores a computer program for causing a processor to execute a method of user traffic allocation as in any of the preceding embodiments.
Referring to fig. 11, fig. 11 is a program product 1100 applied to a user traffic distribution method according to an embodiment of the present application.
In some illustrated embodiments, the aforementioned user traffic distribution method may be implemented by a program product 800, such as may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RE, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the C language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of model, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (for example, through the internet using an internet service provider).
Exemplary electronic device
Having described the methods, apparatus and media of the exemplary embodiments of the present application, an electronic device of the exemplary disclosure of the present application is now described with reference to fig. 12. The apparatus comprises: a processor; a memory for storing processor-executable instructions; wherein the processor executes the executable instructions to implement the user traffic distribution method as shown in any one of the foregoing embodiments.
Referring to fig. 12, fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device 1200 shown in fig. 12 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 12, the electronic apparatus 1200 is represented in the form of a general electronic apparatus. The components of the electronic device 1200 may include, but are not limited to: the aforementioned at least one processor 1201, the aforementioned at least one storage processor 1202, and a bus 1203 connecting the various system components (including the processor 1201 and the storage processor 1202).
The bus 1203 includes a data bus, a control bus, and an address bus.
The storage processor 1202 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)12021 and/or cache memory 12022, and may further include readable media in the form of non-volatile memory, such as Read Only Memory (ROM) 12023.
Storage processor 1202 may also include a program/utility 12025 having a set (at least one) of program modules 12024, such program modules 12024 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a model environment.
The electronic device 1200 may also communicate with one or more external devices 1204 (e.g., keyboard, pointing device, etc.).
Such communication may occur via input/output (I/O) interfaces 1205. Also, electronic device 1200 can communicate with one or more models (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public model such as the Internet) via model adapter 1206. As shown in FIG. 12, model adapter 1206 communicates with the other modules of electronic device 1200 via bus 1203. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 1200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the user traffic distribution device are mentioned, this division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module, according to embodiments of the application. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
While the spirit and principles of the application have been described with reference to several particular embodiments, it is to be understood that the application is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit from the description. The application is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A method for allocating user traffic, comprising:
acquiring a user flow change demand for a target experiment; the target experiment comprises a grouping test experiment based on user flow;
responding to the user traffic change requirement, and performing traffic change according to a principle of minimizing user traffic change cost of each experimental group aiming at each experimental group needing traffic change; wherein the traffic flow path cost of any experimental group transferring traffic to itself is the lowest.
2. The method according to claim 1, wherein said performing traffic change according to the principle of minimizing user traffic variation cost of each experimental group for which traffic change is required comprises:
determining at least one flow path of each experimental group according to the user flow change requirement;
obtaining a path cost corresponding to the at least one flow path;
and carrying out flow change on each experimental group according to the path cost minimum principle.
3. The method of claim 2, wherein when the path cost between any experimental group and the remaining traffic group is less than the path cost between different experimental groups, said performing traffic change on each experimental group according to the path cost minimization principle comprises:
and when a first experiment packet with reduced flow exists in each experiment packet, carrying out flow change on the first experiment packet through a first flow path between the first experiment packet and the residual flow group.
4. The method of claim 3, wherein said traffic modifying the first experimental packet through a first traffic path between the first experimental packet and the remaining traffic group comprises:
determining a first initial flow sub-bucket and a first target volume corresponding to the first experiment group;
reserving a traffic bucket matching the first target volume from the first initial traffic bucket to the first experimental group;
transferring, through the first traffic path, excess ones of the first initial traffic sub-buckets to the remaining traffic group.
5. The method of claim 2, wherein when the path cost between any experimental group and the remaining traffic group is less than the path cost between different experimental groups, said performing traffic change on each experimental group according to the path cost minimization principle comprises:
and when a second experiment packet with increased flow exists in each experiment packet, carrying out flow change on the second experiment packet through a second flow path between the second experiment packet and the residual flow group.
6. The method of claim 5, wherein said traffic modifying the second experimental packet via a second traffic path between the second experimental packet and the remaining traffic group comprises:
determining a residual flow sub-bucket and a residual amount corresponding to the residual flow group;
determining a second initial flow bucket, a second initial quantity and a second target quantity corresponding to the second experiment group;
calculating a difference between the second target amount and the second initial amount;
reserving the second initial traffic bucket within the second experimental group;
and when the residual amount is not lower than the difference amount, transferring the traffic sub-bucket matched with the difference amount from the residual traffic sub-bucket to the second experiment group through the second traffic path.
7. The method of claim 6, wherein the traffic modifying the second experimental packet via a second traffic path between the second experimental packet and the remaining traffic group, further comprises:
when the residual quantity is lower than the difference quantity, transferring the redundant other traffic of other experimental groups to the residual traffic group in a bucket manner;
and transferring the traffic sub-bucket matched with the difference quantity from the residual traffic sub-bucket corresponding to the residual traffic group to the second experiment group through the second traffic path.
8. A user traffic distribution apparatus, comprising:
the first acquisition module is used for acquiring user flow change requirements aiming at a target experiment; the target experiment comprises a grouping test experiment based on user flow;
the change module is used for responding to the user flow change requirement, aiming at each experiment group needing flow change, and carrying out flow change according to the principle of minimizing the user flow change cost of each experiment group; wherein the traffic flow path cost of any experimental group transferring traffic to itself is the lowest.
9. An electronic device, characterized in that the device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the user traffic distribution method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program for causing a processor to execute the user traffic distribution method according to any of claims 1-7.
CN202111386705.8A 2021-11-22 2021-11-22 User traffic distribution method, device, medium and electronic equipment Pending CN114066526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111386705.8A CN114066526A (en) 2021-11-22 2021-11-22 User traffic distribution method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111386705.8A CN114066526A (en) 2021-11-22 2021-11-22 User traffic distribution method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114066526A true CN114066526A (en) 2022-02-18

Family

ID=80278887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111386705.8A Pending CN114066526A (en) 2021-11-22 2021-11-22 User traffic distribution method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114066526A (en)

Similar Documents

Publication Publication Date Title
US11700300B2 (en) Cluster resource management in distributed computing systems
JP7127010B2 (en) Resource allocation methods, apparatus, electronic equipment, computer readable media and computer programs
US10599484B2 (en) Weighted stealing of resources
US8726290B2 (en) System and/or method for balancing allocation of data among reduce processes by reallocation
US8434088B2 (en) Optimized capacity planning
US9940022B1 (en) Storage space allocation for logical disk creation
CN101221517A (en) Device, system and method for trading resources between partitions of a data processing system
JPWO2010044131A1 (en) RESOURCE ALLOCATION DEVICE, RESOURCE ALLOCATION PROGRAM, RECORDING MEDIUM, AND RESOURCE ALLOCATION METHOD
CN112948279A (en) Method, apparatus and program product for managing access requests in a storage system
CN105630601A (en) Resource allocation method and system based on real-time computing
WO2020024207A1 (en) Service request processing method, device and storage system
CN114066526A (en) User traffic distribution method, device, medium and electronic equipment
US10855767B1 (en) Distribution of batch data to sharded readers
CN110633142B (en) Block chain consensus method, management node, electronic device, and storage medium
US10048940B2 (en) Parallel generation of random numbers
US10191935B2 (en) Database identifier generation in transaction processing systems
US11307889B2 (en) Schedule virtual machines
US11263130B2 (en) Data processing for allocating memory to application containers
JP6540141B2 (en) Allocation apparatus, allocation method, allocation program, and communication network apparatus
US11855908B2 (en) Resource allocation in cloud computing systems
US20230176925A1 (en) Managing multiple virtual processor pools
US20240103953A1 (en) Quadrant matrix based priority calls for failed drives replacement
CN114518836B (en) Method, apparatus and program product for managing storage resource pools of a storage system
US11611405B2 (en) Efficient spectrum allocation in a multi-node optical network
Walla et al. Solving a video-server load re-balancing problem by mixed integer programming and hybrid variable neighborhood search

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination