Traffic distribution method, device and equipment for AB experiment and storage medium
By generating a whitelist based on historical traffic, the problem of users who may jump to groups in AB test experiments is solved, ensuring that the user requests to stably hit the same group after adjusting the proportion of packet traffic, realizing the verification of the stability of data collection and experimental results.
Patent Information
- Application Number
- CN202411807507.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-18
AI Technical Summary
In AB test experiments, when the traffic ratio between the experimental group and the control group changes, it is impossible to ensure that the same user always enters the same group, resulting in the user jumping to the group and unable to effectively collect data to verify the experimental effect.
By generating a whitelist based on historical traffic, recording the mapping relationship between the traffic identification and hit group of each historical traffic, ensuring that even if the business party changes the packet traffic ratio, user requests can stably hit the same group.
After adjusting the proportion of packet traffic, the user requests will not experience group jump behavior, ensuring the stability of data collection and the verification of experimental results.
Smart Images

Figure CN119652836A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a flow distribution method, device, equipment and storage medium for an AB experiment. Background Art
[0002] When performing random traffic diversion in AB testing experiments, it is necessary to ensure that traffic does not jump to the same group. That is, when the same user makes multiple requests, it is necessary to ensure that each hit experiment is assigned to the same group. For example, when an APP is doing a page comparison experiment, it is necessary to determine which page performs better. When the same user clicks to enter page A, it is necessary to ensure that the user always enters page A and cannot enter page B or page C. Otherwise, it is impossible to collect data and verify the experimental effect.
[0003] At present, the common way to achieve random diversion in AB test experiments is to divide all traffic into buckets to obtain the total number of buckets, such as 100, and then divide the experimental group and the control group according to the proportion to obtain the corresponding bucket index. For the request hit experiment, the request ID is obtained by splicing a random seed or other value, and a hash value is obtained through a hash function. The total number of buckets is modulo the hash value to obtain a subscript, and the subscript value is used to determine whether it falls into the experimental group or the control group. When the traffic ratio of the experimental group and the control group does not change, this method can ensure that the same user will always enter the same group.
[0004] However, when the traffic ratio between the experimental group and the control group changes, for example, the experimental group is reduced from 50% to 40%, the reduced 10% of the traffic cannot be guaranteed to hit the experimental group again. Because the traffic ratio of this 10% of traffic is reduced, the bucket interval is reduced. According to the traffic modulus rule, some users of the experimental group that were previously hit will hit the control group, causing the previous users to jump to the control group. Summary of the invention
[0005] Based on this, it is necessary to provide a flow distribution method, device, equipment and storage medium for an AB experiment in order to solve at least one of the above technical problems.
[0006] The present invention provides a flow distribution method for an AB experiment, comprising:
[0007] Obtaining a traffic allocation request for an AB experiment, wherein the traffic allocation request includes a request identifier of a target traffic;
[0008] Matching the request identifier of the target traffic with the traffic identifier in the whitelist, wherein the whitelist is generated based on various historical traffics that hit different groups in the AB experiment, and the whitelist is used to record the mapping relationship between the traffic identifier of each historical traffic and the hit group;
[0009] If the match is successful, the grouping of the target traffic hit in the AB experiment is determined based on the whitelist.
[0010] Optionally, according to a traffic allocation method for an AB experiment provided by the present invention, before matching the request identifier of the target traffic with the traffic identifier in the whitelist, the method further includes:
[0011] When receiving a traffic fixed grouping request, sending the traffic fixed grouping request to the fixed grouping service, so that the fixed grouping service generates the whitelist based on each historical traffic corresponding to the fixed grouping condition in the traffic fixed grouping request and the hit group of each historical traffic in the AB experiment, and returns the whitelist to the business system;
[0012] The fixed grouping condition is a screening condition used to screen historical traffic to generate a whitelist.
[0013] Optionally, according to a traffic allocation method for an AB experiment provided by the present invention, before matching the request identifier of the target traffic with the traffic identifier in the whitelist, the method further includes:
[0014] Record the hit groups of each historical traffic in the AB experiment;
[0015] The flow identifier of each historical flow and its hit group are associated and stored, and the flow identifier of each historical flow and its hit group are sent to the fixed group service to generate the white list.
[0016] The present invention provides a flow distribution method for an AB experiment, comprising:
[0017] Receiving a traffic fixed grouping request sent by a business system, wherein the traffic fixed grouping request includes a fixed grouping condition;
[0018] Based on the fixed grouping condition, determine each historical flow that needs to be fixedly grouped, and the hit grouping of each historical flow in the AB experiment;
[0019] Based on the traffic identifiers of each of the historical traffic and the hit groups thereof, a whitelist is generated and pushed to the business system, so that the business system determines the hit groups of the target traffic in the traffic allocation request in the AB experiment based on the whitelist.
[0020] Optionally, according to a traffic allocation method for an AB experiment provided by the present invention, generating a whitelist based on the traffic identifier of each historical traffic and its hit grouping includes:
[0021] For any hit group in the AB experiment:
[0022] Based on the hit groups of each historical traffic in the AB experiment, the total traffic volume corresponding to the hit group is counted;
[0023] When the total amount of traffic is less than a preset quantity threshold, a whitelist is generated based on the traffic identifier of each historical traffic in the hit group;
[0024] When the total amount of traffic is greater than or equal to a preset quantity threshold, a Bloom filter is generated based on traffic identifiers of all historical traffic, and the Bloom filter is used as the whitelist.
[0025] Optionally, according to a flow distribution method for an AB experiment provided by the present invention, the fixed grouping condition includes a flow screening range and / or a screening time;
[0026] The determining, based on the fixed grouping condition, each historical flow that needs to be fixedly grouped includes:
[0027] All stored historical processes are screened to obtain various historical flows corresponding to the flow screening range and / or screening time.
[0028] The present invention also provides a flow distribution device for AB experiment, comprising:
[0029] An acquisition module, used to acquire a traffic allocation request for an AB experiment, wherein the traffic allocation request includes a request identifier of a target traffic;
[0030] A matching module, used for matching the request identifier of the target traffic with the traffic identifier in the whitelist, wherein the whitelist is generated based on each historical traffic that hits different groups in the AB experiment, and the whitelist is used for recording the mapping relationship between the traffic identifier of each historical traffic and the hit group;
[0031] The first determination module is used to determine the grouping of the target traffic hit in the AB experiment based on the whitelist if the match is successful.
[0032] The present invention also provides a flow distribution device for AB experiment, comprising:
[0033] A receiving module, used for receiving a flow fixed grouping request sent by a business system, wherein the flow fixed grouping request includes a fixed grouping condition;
[0034] A second determination module is used to determine each historical flow that needs to be fixedly grouped, and a hit group of each historical flow in the AB experiment based on the fixed grouping condition;
[0035] A generation module is used to generate a whitelist based on the traffic identifier of each historical traffic and its hit grouping, and push it to the business system, so that the business system can determine the grouping hit by the target traffic in the traffic allocation request in the AB experiment based on the whitelist.
[0036] The present invention also provides a computer device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the flow distribution method of the above-mentioned AB experiment when executing the computer-readable instructions.
[0037] The present invention also provides one or more readable storage media storing computer-readable instructions, and when the computer-readable instructions are executed by a processor, the flow distribution method of the above-mentioned AB experiment is implemented.
[0038] The traffic allocation method, device, equipment and storage medium of the above-mentioned AB experiment, the present invention generates a white list of groups according to the traffic identification and hit grouping of each historical traffic, and when a traffic allocation request is subsequently received, it can determine the grouping hit by the target traffic in the traffic allocation request in the AB experiment based on the white list; even if the business party needs to change the group traffic ratio, the historical hit grouping in the white list can be used as the fixed grouping hit by the target traffic in the AB experiment, to ensure that the user request will not jump to the group after the group traffic ratio is adjusted. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0040] Figure 1 It is one of the flow charts of the flow distribution method of the AB experiment in one embodiment of the present invention;
[0041] Figure 2 is a schematic diagram of a fixed grouping process provided by an embodiment of the present invention;
[0042] Figure 3 This is the second flow chart of the flow distribution method of the AB experiment in one embodiment of the present invention;
[0043] Figure 4It is a flow chart of calling hive-udf to generate a whitelist on a k8s service provided by an embodiment of the present invention;
[0044] Figure 5 It is a schematic diagram of a process of generating a whitelist provided by an embodiment of the present invention;
[0045] Figure 6 It is one of the structural schematic diagrams of the flow distribution device of the AB experiment in one embodiment of the present invention;
[0046] Figure 7 This is the second structural schematic diagram of the flow distribution device of the AB experiment in one embodiment of the present invention;
[0047] Figure 8 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms of "a", "said" and "the" used in one or more embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more associated listed items.
[0050] In view of the above problems, the present invention provides the following embodiments. Specifically, in one embodiment, Figure 1 As shown, Figure 1 FIG. 1 is a flow chart of a flow distribution method for an AB experiment in an embodiment of the present invention. The embodiment of the present invention provides a flow distribution method for an AB experiment, comprising the following steps:
[0051] Step S11, obtaining a traffic allocation request for an AB experiment;
[0052] It should be noted that the traffic allocation request includes a request identifier of the target traffic, such as a user ID, a driver ID, an order ID, etc.
[0053] Step S12, matching the request identifier of the target traffic with the traffic identifier in the whitelist;
[0054] It should be noted that the whitelist is generated based on various historical flows that hit different groups in the AB experiment. The whitelist is used to record the mapping relationship between the flow identifier of each historical flow and the hit group, so that the group previously hit by each flow can be determined based on the whitelist.
[0055] In addition, before matching the request identifier of the target traffic with the traffic identifier in the whitelist, it is necessary to detect whether the traffic allocation request hits the experiment; it should be noted that in AB testing, an experimental group (Group A) and a control group (Group B) are usually set up, and it may also be divided into multiple other groups. Each operation or request of the user (such as visiting a web page, submitting an order, etc.) will be detected by the system. When the user's request is recognized by the system as eligible for AB testing, the request is considered to have hit the experiment. Further, the request identifier of the target traffic is matched with the traffic identifier in the whitelist to determine whether the traffic exists in the historical hit group.
[0056] Step S13: If the match is successful, the grouping of the target traffic that is hit in the AB experiment is determined based on the whitelist.
[0057] Specifically, if the match is successful, the target traffic is queried for the group hit in the AB experiment based on the whitelist. Therefore, even if the business side needs to change the group traffic ratio, the current traffic hit group can be determined based on the traffic hit group in the past.
[0058] In addition, if the match fails, it proves that the request identifier is not in the whitelist, and the target traffic is randomly diverted. For example, the request identifier is hashed using a hash function to obtain a hash value, and the total number of buckets is modulo the hash value to obtain an index. The group that the target traffic hits in the AB experiment is determined based on the index.
[0059] The embodiment of the present invention, through the above scheme, includes: obtaining a traffic allocation request for an AB experiment, wherein the traffic allocation request includes a request identifier of a target traffic; matching the request identifier of the target traffic with a traffic identifier in a whitelist, wherein the whitelist is generated based on each historical traffic that hits different groups in the AB experiment, and the whitelist is used to record the mapping relationship between the traffic identifier of each historical traffic and the hit group; if the match is successful, then based on the whitelist, determining the group that the target traffic hits in the AB experiment. The embodiment of the present invention generates a whitelist of groups based on the traffic identifiers and hit groups of each historical traffic, and can subsequently determine the group that the target traffic in the traffic allocation request hits in the AB experiment based on the whitelist; even if the business party needs to change the group traffic ratio, the historical hit group in the whitelist can be used as a fixed group that the target traffic hits in the AB experiment, to ensure that the user request will not have group jumping behavior after adjusting the group traffic ratio.
[0060] In one embodiment of the present invention, before matching the request identifier of the target traffic with the traffic identifier in the whitelist, the method further includes:
[0061] When a traffic fixed grouping request is received, the traffic fixed grouping request is sent to the fixed grouping service, so that the fixed grouping service generates the whitelist based on the historical traffic corresponding to the fixed grouping conditions in the traffic fixed grouping request and the hit groups of the historical traffic in the AB experiment, and returns the whitelist to the business system.
[0062] It should be noted that the fixed group service refers to the k8s service task, wherein the k8s service is an application service running in the Kubernetes (k8s) cluster, which is responsible for processing fixed group requests from the client. Optionally, because the data of the hit experiment group is generally managed by the data warehouse and stored in the hive or Hbase database, and the amount of data is large, it takes a certain amount of time to obtain the data. To directly obtain data at the back end of the AB experimental platform, it is necessary to maintain a long link for communication between the system back end and the data warehouse for a long time, which will cause excessive memory pressure on the back end service. In one embodiment, the logic of generating the whitelist can be encapsulated into a udf for use by users or platforms by encapsulating hive-udf. The running logic can also be split and stripped, and the time-consuming operation can be separated from the platform back end using the k8s service scheduling, and real-time callbacks and notifications can be obtained by communicating with k8s for task scheduling.
[0063] In addition, when conducting an AB experiment, the hit groups of each historical flow in the AB experiment will be recorded; then the flow identifier of each historical flow and its hit group will be associated and stored, and the flow identifier of each historical flow and its hit group will be sent to the fixed group service to generate the whitelist.
[0064] Specifically, refer to Figure 2 , Figure 2 It is a flowchart of fixed grouping provided by an embodiment of the present invention. Receive a traffic fixed grouping request corresponding to a business administrator, wherein the traffic fixed grouping request includes a fixed grouping condition, which is a screening condition for screening historical traffic to generate a whitelist, and the fixed grouping condition includes a traffic screening range and / or a screening time, and then send the traffic fixed grouping request to a fixed grouping service, so that the fixed grouping service can query and obtain the corresponding historical traffic and the hit group of each historical traffic in the AB experiment based on the fixed grouping condition, and then generate the whitelist based on the traffic identifier of each historical traffic and its hit group, and return the whitelist to the business system. Therefore, even if the business party needs to change the group traffic ratio, the historical hit group in the whitelist can be used as the fixed group hit by the target traffic in the AB experiment, ensuring that the user request will not jump to the group after adjusting the group traffic ratio.
[0065] In one embodiment, if Figure 3 As shown, Figure 3 FIG2 is a flow chart of a flow distribution method for an AB experiment in an embodiment of the present invention. The embodiment of the present invention provides a flow distribution method for an AB experiment, comprising the following steps:
[0066] Step S21, receiving a traffic fixed grouping request sent by a business system, wherein the traffic fixed grouping request includes a fixed grouping condition;
[0067] Step S22, based on the fixed grouping condition, determining each historical flow that needs to be fixedly grouped, and the hit grouping of each historical flow in the AB experiment;
[0068] Step S23, based on the traffic identifiers of each of the historical traffic and their hit groups, a white list is generated and pushed to the business system, so that the business system can determine the hit groups of the target traffic in the traffic allocation request in the AB experiment based on the white list.
[0069] Specifically, refer to Figure 4 , Figure 4It is a flow chart of calling hive-udf on a k8s service to generate a whitelist provided by an embodiment of the present invention, receiving a traffic fixed grouping request sent by a business system, the traffic fixed grouping request including a fixed grouping condition, the fixed grouping condition including a traffic screening range and / or a screening time; then filtering out all stored historical processes to obtain various historical traffic corresponding to the traffic screening range and / or the screening time, and hit groups of various historical traffic in an AB experiment; for example, if the experiment is conducted in multiple cities, the user can choose to fix the traffic in a certain city or a certain time period for fixed grouping.
[0070] Furthermore, the encapsulated hive-udf is called to perform a fixed grouping operation to generate a whitelist based on the traffic identifier of each historical traffic and its hit group, and the whitelist is pushed to the business system so that the business system can determine the group hit by the target traffic in the traffic allocation request in the AB experiment based on the whitelist.
[0071] The specific implementation of hive-udf is as follows: First, you need to add hive dependencies.
[0072] <dependency>
[0073] <groupid> org.apache.hive< / groupid>
[0074] <artifactid> hive-exec< / artifactid>
[0075] <version> 3.1.3< / version>
[0076] < / dependency>
[0077] Furthermore, define an interface (for example, BfService) as the entry point, implement the GenericUDAFResolver2 interface, and implement its methods. In addition, define a class (for example, BfEvaluator) that inherits the GenericUDAFEvaluator class and implements related methods. In the implementation method of BfService, directly create a BfEvaluator object and return it. Classes that inherit GenericUDAFEvaluator need to implement multiple overloaded methods. The init(Mode m,ObjectInspector[]parameters) method is used to obtain input and output data, and different returns need to be obtained according to different stages. For example, PARTIAL1 is the original data, and the user of the return value is terminatePartial. And getNewAggregationBuffer() is used to obtain intermediate results. iterate(AggregationBufferaggregationBuffer,Object[]parameters) will get each row of data, and the data needs to be stored in the intermediate result. terminatePartial(Agg regationBuffer aggregationBuffer) will return the persistent object of partial aggregation data. The merge(AggregationBuffer aggregationBuffer,Objectpartial) method will merge the partial aggregation data returned by terminatePartial, and the required data needs to be processed in this step. The terminate(AggregationBuffer aggregationBuffer) method will return the final result. The final data is returned in this step, and this part of the data is finally processed, such as generating a whitelist file or a Bloom filter file.
[0078] The embodiment of the present invention uses the above scheme to generate a whitelist of groups based on various historical flows and hit groups. Even if the business party needs to change the group flow ratio, the historical hit groups in the whitelist can be used as fixed groups hit by the target flow in the AB experiment, ensuring that user requests will not jump groups after adjusting the group flow ratio.
[0079] In one embodiment of the present invention, a whitelist is generated based on the traffic identifier of each of the historical traffic and its hit grouping, including:
[0080] For any hit group in the AB experiment: based on the hit grouping of each historical traffic in the AB experiment, the total traffic amount corresponding to the hit group is counted; when the total traffic amount is less than the preset quantity threshold, based on the traffic identifier of each historical traffic in the hit group, a whitelist is generated; when the total traffic amount is greater than or equal to the preset quantity threshold, based on the traffic identifier of all historical traffic, a Bloom filter is generated, and the Bloom filter is used as the whitelist.
[0081] It should be noted that if the total amount of data is too large, directly loading the file into the memory for precise matching will cause pressure on the memory and have low efficiency. Figure 5 , Figure 5 It is a schematic diagram of a process of generating a whitelist provided by an embodiment of the present invention. The strategy for generating the whitelist can use different whitelist generation methods according to the total amount of traffic.
[0082] Specifically, for any hit group in the AB experiment, the following steps are performed: based on the hit groups of each historical flow in the AB experiment, the total flow corresponding to the hit group is counted, and then the total flow is compared with the preset quantity threshold, wherein the preset quantity threshold can be set according to the actual situation, for example, set to 90,000; when the total flow is less than the preset quantity threshold, a whitelist is generated directly based on the flow identifier of each historical flow in the hit group, for example, when the total data is less than 90,000, the flow id of all historical flows is directly written into the whitelist file. When the total flow is greater than or equal to the preset quantity threshold, a Bloom filter can be used for determination, that is, a Bloom filter is generated based on the flow identifier of all historical flows, and the Bloom filter is used as the whitelist, so as to determine whether the subsequent request identifier to be allocated matches through the Bloom filter. Therefore, even if the business party needs to change the group flow ratio, the historical hit group in the whitelist can be used as the fixed group hit by the target flow in the AB experiment, ensuring that the user request will not have group jumping behavior after adjusting the group flow ratio.
[0083] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0084] In one embodiment, a flow distribution device for AB experiment is provided, and the flow distribution device for AB experiment corresponds to the flow distribution method for AB experiment in the above embodiment. Figure 6 As shown, Figure 6 1 is one of the structural schematic diagrams of a flow distribution device for an AB experiment in one embodiment of the present invention. The flow distribution device for the AB experiment includes:
[0085] An acquisition module 31 is used to acquire a traffic allocation request for an AB experiment, wherein the traffic allocation request includes a request identifier of a target traffic;
[0086] A matching module 32, used for matching the request identifier of the target traffic with the traffic identifier in the whitelist, wherein the whitelist is generated based on each historical traffic that hits different groups in the AB experiment, and the whitelist is used to record the mapping relationship between the traffic identifier of each historical traffic and the hit group;
[0087] The first determination module 33 is used to determine the grouping of the target traffic that is hit in the AB experiment based on the whitelist if the match is successful.
[0088] The flow distribution device for AB experiment includes:
[0089] A sending module, configured to, when receiving a traffic fixed grouping request, send the traffic fixed grouping request to a fixed grouping service, so that the fixed grouping service generates the white list based on each historical traffic corresponding to the fixed grouping condition in the traffic fixed grouping request and a hit group of each historical traffic in an AB experiment, and returns the white list to the business system;
[0090] The fixed grouping condition is a screening condition used to screen historical traffic to generate a whitelist.
[0091] The flow distribution device for AB experiment includes:
[0092] The recording module is used to record the hit groups of each historical traffic in the AB experiment;
[0093] The storage module is used to associate and store the flow identification of each historical flow and its hit group, and send the flow identification of each historical flow and its hit group to the fixed group service to generate the white list.
[0094] like Figure 7 As shown, Figure 7 FIG. 2 is a second structural diagram of a flow distribution device for an AB experiment in an embodiment of the present invention. The flow distribution device for the AB experiment includes:
[0095] The receiving module 41 is used to receive a flow fixed grouping request sent by the service system, wherein the flow fixed grouping request includes a fixed grouping condition;
[0096] A second determination module 42 is used to determine each historical flow that needs to be fixedly grouped, and a hit group of each historical flow in the AB experiment based on the fixed grouping condition;
[0097] The generation module 43 is used to generate a whitelist based on the traffic identifier of each historical traffic and its hit grouping, and push it to the business system, so that the business system can determine the grouping hit by the target traffic in the traffic allocation request in the AB experiment based on the whitelist.
[0098] The generation module 43 is also used for:
[0099] For any hit group in the AB experiment:
[0100] Based on the hit groups of each historical traffic in the AB experiment, the total traffic volume corresponding to the hit group is counted;
[0101] When the total amount of traffic is less than a preset quantity threshold, a whitelist is generated based on the traffic identifier of each historical traffic in the hit group;
[0102] When the total amount of traffic is greater than or equal to a preset quantity threshold, a Bloom filter is generated based on traffic identifiers of all historical traffic, and the Bloom filter is used as the whitelist.
[0103] The second determining module 42 is further used for:
[0104] All stored historical processes are screened to obtain various historical flows corresponding to the flow screening range and / or screening time.
[0105] For the specific definition of the flow distribution device of the AB experiment, please refer to the definition of the flow distribution method of the AB experiment above, which will not be repeated here. Each module in the flow distribution device of the above-mentioned AB experiment can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0106] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, Figure 8: This is a schematic diagram of a computer device in one embodiment of the present invention. The computer device includes a processor, a memory, a network interface and a database connected by a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating device, a computer-readable instruction and a database. The internal memory provides an environment for the operation of the operating device and the computer-readable instructions in the readable storage medium. The database of the computer device is used to store data involved in the traffic distribution method of the AB experiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instruction is executed by the processor, a traffic distribution method for an AB experiment is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0107] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, and a network interface connected by a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a traffic distribution method for an AB experiment is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0108] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the traffic distribution method of the AB experiment described above are implemented.
[0109] In one embodiment, a readable storage medium is provided, the readable storage medium stores computer-readable instructions, and the computer-readable instructions are executed by the processor to implement the flow distribution method steps of the above-mentioned AB experiment. It can be understood by a person of ordinary skill in the art that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0110] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0111] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A flow distribution method for AB experiment, characterized in that: include: Obtaining a traffic allocation request for an AB experiment, wherein the traffic allocation request includes a request identifier of a target traffic; Matching the request identifier of the target traffic with the traffic identifier in the whitelist, wherein the whitelist is generated based on various historical traffics that hit different groups in the AB experiment, and the whitelist is used to record the mapping relationship between the traffic identifier of each historical traffic and the hit group; If the match is successful, the grouping of the target traffic hit in the AB experiment is determined based on the whitelist.
2. The flow distribution method for AB experiment according to claim 1, characterized in that: Before matching the request identifier of the target traffic with the traffic identifier in the whitelist, the method further includes: When receiving a traffic fixed grouping request, sending the traffic fixed grouping request to the fixed grouping service, so that the fixed grouping service generates the whitelist based on each historical traffic corresponding to the fixed grouping condition in the traffic fixed grouping request and the hit group of each historical traffic in the AB experiment, and returns the whitelist to the business system; The fixed grouping condition is a screening condition used to screen historical traffic to generate a whitelist.
3. The flow distribution method for AB experiment according to claim 1, characterized in that: Before matching the request identifier of the target traffic with the traffic identifier in the whitelist, the method further includes: Record the hit groups of each historical traffic in the AB experiment; The flow identifier of each historical flow and its hit group are associated and stored, and the flow identifier of each historical flow and its hit group are sent to the fixed group service to generate the white list.
4. A flow distribution method for AB experiment, characterized in that: include: Receiving a traffic fixed grouping request sent by a business system, wherein the traffic fixed grouping request includes a fixed grouping condition; Based on the fixed grouping condition, determine each historical flow that needs to be fixedly grouped, and the hit grouping of each historical flow in the AB experiment; Based on the traffic identifiers of each of the historical traffic and the hit groups thereof, a whitelist is generated and pushed to the business system, so that the business system determines the hit groups of the target traffic in the traffic allocation request in the AB experiment based on the whitelist.
5. The flow distribution method for AB experiment according to claim 4, characterized in that: The generating of a whitelist based on the flow identifier of each historical flow and its hit grouping includes: For any hit group in the AB experiment: Based on the hit groups of each historical traffic in the AB experiment, the total traffic volume corresponding to the hit group is counted; When the total amount of traffic is less than a preset quantity threshold, a whitelist is generated based on the traffic identifier of each historical traffic in the hit group; When the total amount of traffic is greater than or equal to a preset quantity threshold, a Bloom filter is generated based on traffic identifiers of all historical traffic, and the Bloom filter is used as the whitelist.
6. The flow distribution method for AB experiment according to claim 4, characterized in that: The fixed grouping conditions include a flow screening range and / or a screening time; The determining, based on the fixed grouping condition, each historical flow that needs to be fixedly grouped includes: All stored historical processes are screened to obtain various historical flows corresponding to the flow screening range and / or screening time.
7. A flow distribution device for AB experiment, characterized in that: Said, including: An acquisition module, used to acquire a traffic allocation request for an AB experiment, wherein the traffic allocation request includes a request identifier of a target traffic; A matching module, used for matching the request identifier of the target traffic with the traffic identifier in the whitelist, wherein the whitelist is generated based on each historical traffic that hits different groups in the AB experiment, and the whitelist is used for recording the mapping relationship between the traffic identifier of each historical traffic and the hit group; The first determination module is used to determine the grouping of the target traffic hit in the AB experiment based on the whitelist if the match is successful.
8. A flow distribution device for AB experiment, characterized in that: include: A receiving module, used for receiving a flow fixed grouping request sent by a business system, wherein the flow fixed grouping request includes a fixed grouping condition; A second determination module is used to determine each historical flow that needs to be fixedly grouped, and a hit group of each historical flow in the AB experiment based on the fixed grouping condition; A generation module is used to generate a whitelist based on the traffic identifier of each historical traffic and its hit grouping, and push it to the business system, so that the business system can determine the grouping hit by the target traffic in the traffic allocation request in the AB experiment based on the whitelist.
9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executed on the processor, characterized in that: When the processor executes the computer-readable instructions, the flow distribution method for the AB experiment as described in any one of claims 1 to 4 or 5 to 6 is implemented.
10. A readable storage medium having computer readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the flow distribution method for the AB experiment as described in any one of claims 1 to 4 or 5 to 6 is implemented.