A method of testing flow distribution and related apparatus

By sharing a common control group for multiple tests and dynamically adjusting traffic allocation, the problem of excessive traffic consumption by the control group in multiple business tests is solved, achieving more efficient traffic utilization and testing efficiency.

CN117097648BActive Publication Date: 2026-08-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-05-11
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

During multiple business tests, the control group in the existing technology consumed too much traffic resources, resulting in less available traffic for the test group, making it difficult to meet the testing requirements and resulting in low traffic utilization.

Method used

By sharing a common control group for multiple tests and dynamically adjusting traffic allocation, traffic utilization can be improved through traffic allocation and recycling at the start and end of the test.

Benefits of technology

By dynamically adjusting the traffic allocation of the shared control group, traffic waste is reduced, testing efficiency and traffic utilization are improved, and the test is ensured to proceed smoothly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117097648B_ABST
    Figure CN117097648B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a test flow allocation method and related device, by obtaining a test task including multiple tests, the multiple tests share a shared control group in the test task, so that the control groups corresponding to the multiple tests can be combined into the shared control group, and too many control groups from occupying too many flow resources can be avoided. In the process of testing the test task by using the total flow allocated for the test task, when a first test in the multiple tests starts testing, the first test group corresponding to the first test is allocated with the required first test flow from the flow occupied by the shared control group, when a second test in the multiple tests ends testing, the second test resource occupied by the second test group corresponding to the second test is allocated to the shared control group. In this way, by the start and end of the test in the test task, the flow of the shared control group is dynamically adjusted, the dynamic allocation of the flow of the shared control group is realized, and the utilization rate of the flow is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of testing technology, and in particular to testing traffic allocation methods and related apparatus. Background Technology

[0002] Before a service goes live, it is usually necessary to test it in order to obtain effective test data to evaluate its functionality.

[0003] Controlled testing is a commonly used testing method. It involves setting up a control group in addition to the test group. Specifically, traffic is divided into two parts: one for the test group and the other for the control group. These two parts are mutually exclusive. The control group maintains its original strategy, while the test group adds the strategy corresponding to the service. Finally, the performance differences between the two parts are compared to evaluate the effectiveness of the service.

[0004] In some cases, it is necessary to test multiple services simultaneously. When there are many things to be tested, multiple control groups will consume a lot of traffic resources, resulting in less available traffic for actual testing and making it difficult to meet testing requirements. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a test traffic allocation method and related apparatus, which can improve traffic utilization.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] On one hand, embodiments of this application provide a test traffic allocation method, the method comprising:

[0008] Obtain a test task comprising multiple tests, wherein the multiple tests share a common control group in the test task;

[0009] The total test traffic allocated to the test task is determined based on the test groups corresponding to the multiple tests and the shared control group.

[0010] During the testing of the test task using the total test traffic, when the first test among the multiple tests starts, the required first test traffic is allocated to the first test group corresponding to the first test from the shared test traffic occupied by the shared control group.

[0011] When the second test in the plurality of tests ends, the second test traffic occupied by the second test group corresponding to the second test is added to the shared test traffic.

[0012] On the other hand, embodiments of this application provide a test traffic allocation device, the device comprising:

[0013] An acquisition module is used to acquire a test task that includes multiple tests, wherein the multiple tests share a common control group in the test task;

[0014] The determination module is used to determine the total test traffic allocated to the test task based on the test groups corresponding to the multiple tests and the shared control group;

[0015] The allocation module is used to allocate the required first test traffic from the shared test traffic occupied by the shared control group to the first test group corresponding to the first test when the first test among the multiple tests starts during the process of testing the test task with the total test traffic;

[0016] The adjustment module is used to add the second test traffic occupied by the second test group corresponding to the second test to the shared test traffic when the second test in the plurality of tests ends.

[0017] In another aspect, embodiments of this application provide a computer device, the computer device including a processor and a memory:

[0018] The memory is used to store program code and transmit the program code to the processor;

[0019] The processor is used to execute the test traffic allocation method described above according to the instructions in the program code.

[0020] In another aspect, embodiments of this application provide a computer-readable storage medium for storing a computer program for executing the test traffic allocation method described above.

[0021] In another aspect, embodiments of this application provide a computer program product including instructions that, when run on a computer, cause the computer to perform the test traffic allocation method described above.

[0022] As can be seen from the above technical solution, this application provides a test traffic allocation method. Specifically, the processing device acquires a test task comprising multiple tests, and the multiple tests share a common control group within the test task. This merges the control groups corresponding to multiple tests into a single common control group, avoiding excessive traffic resources being consumed by too many control groups and affecting the traffic required for actual testing. During the testing process using the total test traffic allocated to the test task, when the first test among the multiple tests begins, the required first test traffic is allocated from the traffic occupied by the common control group to the first test group corresponding to the first test. Thus, when a test begins in the test task, the processing device allocates the required test traffic from the common control group to that test, ensuring the test can proceed normally. When the second test among the multiple tests ends, the second test resources occupied by the second test group corresponding to the second test are allocated to the common control group, avoiding waste of this traffic. In this way, by dynamically adjusting the allocation of traffic to the common control group through the start and end of tests in the test task, dynamic allocation of traffic to the common control group is achieved, improving traffic utilization and ensuring the smooth progress of testing. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A schematic diagram of a system architecture for a test traffic allocation method provided in this application embodiment;

[0025] Figure 2 A flowchart illustrating a test traffic allocation method provided in an embodiment of this application;

[0026] Figure 3 A schematic diagram of a shared control group including a first test group and a second test group provided for embodiments of this application;

[0027] Figure 4 A schematic diagram illustrating the configuration of a test traffic allocation method provided in an embodiment of this application;

[0028] Figure 5 This is a schematic diagram of the structure of a test flow distribution device provided in an embodiment of this application;

[0029] Figure 6 A structural diagram of a terminal device provided in an embodiment of this application;

[0030] Figure 7 This is a structural diagram of a server provided in an embodiment of this application. Detailed Implementation

[0031] The embodiments of this application will now be described with reference to the accompanying drawings.

[0032] Controlled testing is a common testing method for evaluating the effectiveness of a business function. It includes a test group and a control group. The control group retains the original functionality, while the test group has the new function to be tested. The control and test groups are identical in all other configurations. Then, a portion of the test traffic is used for the test group, and the other portion is used for the control group. These two traffic portions are homogeneous and mutually exclusive. Finally, the effectiveness is evaluated based on the feedback from the control and test groups.

[0033] For example, when testing whether setting the background color of a website page to green is more attractive to users, a controlled test can be conducted. The control group can have a common white background color, while the test group can have a green background color. Traffic (e.g., users) visiting the website is then divided into control and test groups, with both groups sharing similar age, gender, and geographic distributions. The number of clicks by the test group on the green-background page and the number of clicks by the control group on the white-background page determines whether green is more appealing to users.

[0034] Typically, each test corresponds to a test group and a control group. However, it's possible to conduct multiple tests simultaneously. For example, it might be necessary to simultaneously test whether setting a website page's background color to green is more attractive to users, whether setting it to red is more attractive, and whether setting it to blue is more attractive. Therefore, traffic needs to be divided into three parts to accommodate the simultaneous execution of three tests. Then, for any given test traffic, it's further divided into test traffic for the test group and control traffic for the control group. For example, if the total available test traffic is 1, each of the above functional tests occupies 1 / 3 of this total available traffic, the test group for each test occupies 1 / 6 of the total available traffic, and the control group for each test occupies 1 / 6 of the total available traffic, resulting in a total control group traffic consumption of 1 / 2. Thus, when multiple tests are conducted simultaneously, the control group consumes too much traffic, while the test group has limited available traffic, requiring a longer time to achieve significant results.

[0035]

[0036] Table 1 shows the number of test groups and the amount of data used by the control group in multiple functional tests.

[0037] In one scenario, as shown in Table 1, the total number of test and control groups was 802, with 396 in the control group. The control group accounted for 49.38% of the total number of test groups and 50.73% of the total traffic. Therefore, it can be seen that the control group consumed a large amount of traffic resources, resulting in less available traffic for the test group and lower traffic utilization.

[0038] In view of this, this application provides a method for improving traffic utilization. This method can be implemented by any computer device including an access layer, which includes multiple graphics processors. The computer device can be a terminal device or a server, wherein the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle terminal, smart TV, etc., but is not limited thereto. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0039] The test traffic allocation method provided in this application is illustrated in the following embodiments:

[0040] like Figure 1 As shown, firstly, the processing device 100 acquires a test task comprising multiple tests, where the multiple tests have similar configuration parameters and share a common control group within this test task. In related technologies, each test includes a control group when conducting comparative testing. Therefore, in this solution, multiple tests with the same control group can be merged into a new test task, and the control groups of the multiple tests can be merged into a shared control group. Thus, each test can be compared using the shared control group, avoiding the waste of bandwidth resources caused by setting up a large number of control groups. For example, in this solution, the test task includes test A and test B, and test A and test B share a common control group.

[0041] Then, the processing device 100 determines the total test traffic allocated to the test task based on the test groups and shared control groups corresponding to the multiple tests. Since multiple tests share a single shared control group, only the required traffic needs to be allocated to this shared control group, instead of allocating additional traffic to the control group for each test, thus reducing traffic consumption.

[0042] During the testing of a test task using total test traffic, when the first test in a series of tests begins, the processing device allocates the required first test traffic to the first test group corresponding to the first test from the test traffic occupied by the shared control group. When none of the tests in the series have begun, the shared control group occupies all the test traffic. When the first test begins, the processing device allocates the required first test traffic to the first test from the total test traffic occupied by the shared control group. For example, when test A begins, test group A corresponding to test A requires 10% of the total test traffic, so the processing device allocates 10% of the total test traffic to test A, and the shared control group occupies the remaining 90% of the total test traffic. When test B begins, test group B corresponding to test B requires 20% of the total test traffic, so the processing device allocates 20% of the total test traffic to test B, and the shared control group occupies the remaining 70% of the total test traffic.

[0043] When the second test in a series of tests concludes, the second test traffic occupied by the second test group corresponding to the second test is allocated to the shared control group, thereby promptly recovering traffic and avoiding waste. For example, when test A ends, 10% of the total test traffic corresponding to test group A will be idle. Therefore, the processing device allocates 10% of the total test traffic corresponding to test group A to the shared control group. Due to the end of test A, the traffic occupied by the shared control group increases by 10% of the total test traffic, becoming 80% of the total test traffic.

[0044] In this way, the traffic of the shared control group is dynamically adjusted as tests begin and end. When a test starts, the traffic occupied by the shared control group is allocated to the traffic that is about to begin, so that the test can proceed normally. When the test ends, the shared control group reclaims the traffic that was idle at the end of the test, avoiding traffic waste and improving traffic utilization.

[0045] Figure 2 This is a flowchart illustrating a test traffic allocation method provided in an embodiment of this application. In this embodiment, the processing device is described as the aforementioned computer device. The method includes the following steps:

[0046] S202: The processing device acquires a test task that includes multiple tests, in which multiple tests share a common control group.

[0047] In this test task, multiple tests can be tests with the same control group. Specifically, the processing device acquires the test parameters of the tests to be classified, and then identifies tests with similar test parameters as a single test task. For example, in scenarios where the test webpage background color is green, red, and blue, these three tests have similar test parameters; they are identical except for the background color. Therefore, these three tests can be identified as the same test task. By using a single test task, a color with a preset effect can be selected from multiple webpage background colors, thus quickly determining the background color, improving testing efficiency, and allowing simultaneous comparison of the effects of multiple colors, thereby increasing the reliability of the test.

[0048] Multiple tests within a testing task can also be used to improve different functions of the same product. For example, a shared control group can be the current state of the product, such as the current display page of a webpage. Multiple tests can be distributed across changes to the webpage font, font size, and text color. This allows for testing of multiple product functions through a single testing task, improving testing efficiency.

[0049] In related technologies, the control groups for these three tests all have a white webpage background. Therefore, in this solution, the control groups for the three tests can be merged, and all three tests can share a single merged control group in the testing task. In this way, all three tests can be compared using the shared control group, thereby enabling performance evaluation.

[0050] S204: The processing device determines the total test traffic allocated to the test task based on the test groups and shared control groups corresponding to multiple tests.

[0051] Before conducting a test, relevant personnel will determine the required traffic for effectiveness evaluation, such as needing 100,000 user views. In related technologies, if the test group requires 100,000 user views, the control group also needs 100,000 user views to determine the test's effectiveness. Continuing with the example of testing webpage background colors, in related technologies, when the test background color is green, 100,000 users need to view a webpage with a green background, and 100,000 users need to view a webpage with a white background. When the test background color is red, 100,000 users need to view a webpage with a red background, and 100,000 users need to view a webpage with a white background. When the test background color is blue, 100,000 users need to view a webpage with a blue background, and 100,000 users need to view a webpage with a white background.

[0052] In this solution, the three tests mentioned above are combined into one test task, and the three tests share a common control group. Therefore, it is only necessary for 100,000 users to browse a webpage with a green background, 100,000 users to browse a webpage with a red background, 100,000 users to browse a webpage with a blue background, and 100,000 users to browse a webpage with a white background to achieve the traffic allocation for the above three tests.

[0053] S206: When the processing device is testing a test task using the total test traffic, and the first test in multiple tests begins, it allocates the required first test traffic from the shared test traffic occupied by the shared control group to the first test group corresponding to the first test.

[0054] Since multiple tests in a test task may not start simultaneously, the shared control group occupies all the total test traffic while all tests are still pending. When the first test begins, the processing device allocates the necessary first test traffic to the first test group corresponding to the first test from the total test traffic occupied by the shared control group. In this way, the first test can obtain the necessary first test traffic from the shared test traffic occupied by the shared control group, allowing the first test to proceed normally.

[0055] In some possible implementations, the shared control group includes a first control group and a second control group, which are used for AA testing. AA testing refers to simultaneously conducting tests on two control groups with identical configurations. The purpose is to use these as examples to help determine whether the sampling strategy of the test is accurate and whether the traffic distribution is uniform.

[0056] Before the first test begins, the required first test traffic needs to be allocated to the first test group corresponding to the first test from the shared test traffic occupied by the shared control group. This first test traffic is homogeneous with the remaining shared test traffic of the shared control group. To ensure that the first test traffic homogeneous with the remaining shared test traffic can be extracted from the shared test traffic, the sampling strategy needs to be tested in advance. Specifically, before extracting the first test traffic, a portion of the traffic (e.g., half the traffic) is sampled from the shared control group as the first control group, and the remaining traffic is used as the second control group. When the similarity between the comparison results of the first control group and the second control group meets the condition, it indicates that the first control traffic of the first control group and the second control traffic of the second control group are homogeneous, meaning that the sampling strategy can extract homogeneous traffic. Therefore, the sampling strategy for extracting test traffic can be verified through the first and second control groups, thereby improving the reliability of the test task.

[0057] like Figure 3As shown, before test A begins, the shared control group occupies the entire total test traffic. Within the shared control group, a sampling strategy divides the total test traffic into a first control traffic for the first control group and a second control traffic for the second control group. The AA test is then performed using both the first and second control groups. When the similarity between the first control result of the first control group and the second control result of the second control group meets a preset condition, it indicates that the first control traffic and the second control traffic obtained through this sampling strategy are homogeneous. Therefore, the same strategy can be used to allocate the first test traffic required by the first test group from the shared test traffic occupied by the shared control group at the start of test A.

[0058] S208: When the second test in a series of tests ends, the processing device adds the second test traffic occupied by the second test group corresponding to the second test to the shared test traffic.

[0059] When the second test ends, the second test traffic occupied by the second test will be released. Therefore, in this solution, the processing device adds the second test traffic to the shared test traffic to avoid traffic waste and improve traffic utilization.

[0060] In some possible implementations, the traffic used for the second test may exhibit a carry-over effect when the second test ends. The carry-over effect, also known as the delay effect, refers to a causal phenomenon where results appear only after a certain period. Due to the carry-over effect, the second test traffic may differ from the shared test traffic, affecting the test results. For example, when the second test assesses the impact of a large-area advertisement on a webpage, such advertisements may evoke negative emotions in users. Therefore, users who have undergone this test may have a negative impression of the webpage. Directly adding this portion of traffic to the shared test traffic could lead to inaccurate shared test results.

[0061] Therefore, at the end of the second test, the processing device needs to perform a serialization check on the second test traffic. Based on the similarity between the check results of the second test traffic and the shared test traffic, the timing for adding the second test traffic to the shared test traffic is determined. Serialization check involves configuring the second test traffic with the same test environment as the shared control group and continuously comparing the second test results of the second test traffic with the control results of the shared control group. When the second test results are the same as the control results, it indicates that the second test traffic and the shared control traffic are homogeneous, and therefore the second test traffic can be added to the shared test traffic. Because the serialization check continuously compares the second test results of the second test traffic with the control results, the second test traffic can be added to the shared control traffic in a timely manner, reducing traffic waste.

[0062] After the testing is completed, the protocol also includes an effectiveness evaluation of the test results. Specifically, the processing device evaluates its effectiveness based on the test results from multiple tests, compared with the control results from a shared control group.

[0063] Because the shared control traffic in this scheme is dynamically changing, direct comparison is difficult and may even lead to Simpson's paradox. Therefore, to avoid this phenomenon and achieve accurate evaluation, traffic conversion is required first, followed by effect evaluation. Specifically, the processing device assigns a first weight to the first test result based on the traffic of the first test, and then performs effect evaluation based on the first test result and the corresponding first weight.

[0064] For example, when accumulating impressions, clicks, conversions, etc. across time periods, it is necessary to consider the proportion of traffic in different time periods to the total traffic before accumulating.

[0065]

[0066] Table 2 shows the effect analysis based on weighted test results according to traffic volume.

[0067] As shown in Table 2, in both time periods 1 and 2, the click-through rate (CTR) of service 2 is higher than that of service 1. However, if the clicks and impressions in time periods 1 and 2 are summed separately, and the CTR is then calculated based on the summed CTR, then the CTR of service 1 is higher than that of service 2. This is clearly illogical, and this phenomenon is known as Simpson's Paradox.

[0068] To avoid Simpson's paradox, different weights can be assigned to the test results based on the traffic involved in the test. For example, if the impressions (traffic) of business 1 in time period 1 are 500, then the weight of business 1 in time period 1 is 1; if the impressions (traffic) of business 2 in time period 1 are 1500, then the weight of business 2 in time period 1 is 3; if the impressions (traffic) of business 1 in time period 2 are 2500, then the weight of business 1 in time period 2 is 5; and if the impressions (traffic) of business 2 in time period 2 are 1000, then the weight of business 2 in time period 2 is 2. Based on these determined weights, the click-through rate (test result) is weighted, resulting in a click-through rate of 3.00% for business 1 in time period 1 + time period 2, and a click-through rate of 3.97% for business 2 in time period 1 + time period 2.

[0069] Therefore, by determining the first weight for the first test result using the first test traffic, and then evaluating the effect of the first test result based on the first weight, the accuracy of the test effect evaluation can be improved, and the Simpson paradox can be avoided.

[0070] In some possible implementations, the testing task may include multiple tests, including a third test with sampling conditions. For example, the tests could be: the impact of a green background color on user click-through rate (CTR), the impact of a blue background color on user CTR, and the impact of a red background color on the CTR of users under 18 years old. The test on the impact of a red background color on the CTR of users under 18 years old is the third test with sampling conditions.

[0071] In this case, a shared control group can still be used for testing. However, when performing effect analysis, the sampling flow rate that hit the sampling condition is extracted from the shared control group, the sampling control result is determined based on the sampling flow rate, and then the effect of the third test is evaluated based on the third test result and the sampling control result.

[0072] For example, when testing the impact of a red background color on click-through rates among users under 18 years old, the test group consists of users under 18. During performance evaluation, sampled traffic from the shared control group of users under 18 is extracted. The results generated by these users serve as the sampled control results. Performance is then evaluated based on the third test results generated by users under 18 in the test group compared to the sampled control results. This eliminates the need to add a separate control group for tests with sampling conditions, expanding the application scope of the shared control group and improving traffic utilization.

[0073] Specifically, the processing device can achieve this by adding triggers. When a user creates a test with sampling conditions, the background automatically adds a trigger. The trigger's hit condition is the sampling condition. The trigger mechanism is used to determine whether the traffic in the shared control group hits the trigger. For hit triggers, the results are logged. During effect evaluation, only the results of the hit triggers are used for effect evaluation.

[0074] Thus, in this scheme, multiple tests share a shared control group, and the shared test traffic occupied by the shared control group is determined according to the test traffic required by the test. When the first test starts, the processing device allocates the first test traffic required by the first test from the shared test traffic. When the second test ends, the processing device adds the second test traffic released by the second test to the shared control group. By dynamically adjusting, traffic waste is avoided and traffic utilization is improved.

[0075] It should be noted that the more shared test traffic the shared control group uses, the more significant the test effect will be.

[0076]

[0077] Table 3. Shared control group flow rate and evaluation effect

[0078] The initial statistical power indicates the impact of this factor on the test results. A value of 0.1 indicates a small impact, while 0.8 indicates a large impact.

[0079] As shown in Table 3, when the impact of a certain service on the test results is small, for example, 0.1, when the shared control group traffic ratio is 5%, there is a probability of 0.139154 that the impact of the service can be obtained through the effect evaluation test; when the shared control group traffic ratio is 10%, there is a probability of 0.14797 that the impact of the service can be obtained through the effect evaluation test; when the shared control group traffic ratio is 20%, there is a probability of 0.153 that the impact of the service can be obtained through the effect evaluation test; and when the shared control group traffic ratio is 50%, there is a probability of 0.156252 that the impact of the service can be obtained through the effect evaluation test. When the initial statistical power is 0.2, there is a 0.302865 probability that the impact of the service can be obtained through the effect evaluation test when the shared control group traffic ratio is 5%, a 0.325642 probability when the shared control group traffic ratio is 10%, a 0.338525 probability when the shared control group traffic ratio is 20%, and a 0.346807 probability when the shared control group traffic ratio is 50%. When the initial statistical power is 0.5, there is a 0.71578 probability that the impact of the service can be obtained through the effect evaluation test when the shared control group traffic ratio is 5%, a 0.752653 probability when the shared control group traffic ratio is 10%, a 0.771881 probability when the shared control group traffic ratio is 20%, and a 0.783641 probability when the shared control group traffic ratio is 50%. When the initial statistical power is 0.8, there is a 0.951228 probability that the impact of the service can be obtained through the effect evaluation test when the shared control group traffic ratio is 5%, a 0.965445 probability when the shared control group traffic ratio is 10%, a 0.971714 probability when the shared control group traffic ratio is 20%, and a 0.97518 probability when the shared control group traffic ratio is 50%.

[0080] Therefore, as the proportion of the shared control group increases, the probability of the service being detected increases; that is, the larger the proportion of traffic in the shared traffic group, the easier it is to detect the service's impact. If the proportion of the shared control group in the total traffic is set to 20%, the test that originally required 7 days to obtain a significant effect can now be completed in only 5 days. Theoretically, if the proportion of the shared control group in the total traffic is 99%, a significant effect can be obtained in just 4 days. Thus, regardless of whether the effect is positive or negative, obtaining the evaluation results more quickly improves testing efficiency for subsequent decision-making, such as deciding whether to launch the service more quickly.

[0081] The test traffic allocation method in this solution can be pre-configured on the processing device. Developers can pre-write the processing logic of the test traffic allocation method into the processing device. Testers only need to create a shared control group and then automatically or manually add multiple tests that share the same control group.

[0082] like Figure 4 As shown, the developers' first step is to add a shared control group creation entry to the test system page, allowing testers to create shared control groups. The second step is to add shared control group management logic to the test management server, for example, setting the shared control group's share of total traffic to be no less than 20%. The third step is to add relevant fields for the shared control group to the test configuration database, representing the real-time traffic consumed by the shared control group. The fourth step is to modify the topology construction logic so that data can be published online. The fifth step is to upgrade the sampling remote procedure call service so that the server can understand the shared control group configuration. The sixth step is to modify the version parsing logic, adding a traffic conversion function. The seventh step is to modify the shared control group effect query logic to display the final effect evaluation results. `tracklog` and `pageview` are both logging systems used for logging. The data platform includes a big data analytics engine for evaluating test results and providing query services.

[0083] Based on the above description, this application provides a test traffic allocation method. The processing device acquires a test task comprising multiple tests, with each test sharing a common control group. This merges the control groups corresponding to multiple tests into a single shared control group, preventing excessive traffic resources from being consumed by too many control groups and affecting the actual traffic required for testing. During the testing process using the total test traffic allocated to the test task, when the first test among the multiple tests begins, the required first test traffic is allocated from the traffic occupied by the shared control group to the first test group corresponding to the first test. Thus, when a test begins within the test task, the processing device allocates the required test traffic from the shared control group to ensure the test can proceed normally. When the second test among the multiple tests ends, the second test resources occupied by the second test group corresponding to the second test are allocated to the shared control group, avoiding waste of this traffic. In this way, by dynamically adjusting the allocation of traffic to the shared control group based on the start and end of tests within the test task, dynamic allocation of traffic to the shared control group is achieved, improving traffic utilization and ensuring smooth testing.

[0084] In the foregoing Figures 1-4 Based on the corresponding embodiments, Figure 5 The diagram shows the structure of a test traffic allocation device 500, which includes: an acquisition module 502, a determination module 504, an allocation module 506, and an adjustment module 508.

[0085] The acquisition module 502 is used to acquire a test task that includes multiple tests, wherein the multiple tests share a common control group in the test task;

[0086] The determination module 504 is used to determine the total test traffic allocated to the test task based on the test groups corresponding to the multiple tests and the shared control group;

[0087] The allocation module 506 is used to allocate the required first test traffic from the shared test traffic occupied by the shared control group to the first test group corresponding to the first test when the first test among the multiple tests starts during the process of testing the test task with the total test traffic;

[0088] The adjustment module 508 is used to add the second test traffic occupied by the second test group corresponding to the second test to the shared test traffic when the second test in the plurality of tests ends.

[0089] In one possible implementation, the adjustment module 508 is specifically used for:

[0090] Perform serialization verification on the second test traffic and the shared test traffic;

[0091] Based on the similarity between the test results of the second test traffic and the shared test traffic, the timing for adding the second test traffic to the shared test traffic is determined.

[0092] In one possible implementation, the device further includes a weighting module for:

[0093] The first weight is determined based on the ratio of the first test traffic to the total test traffic.

[0094] The effectiveness of the first test result corresponding to the first test is evaluated based on the first weight.

[0095] In one possible implementation, the device further includes a sampling module for:

[0096] When the third test in the plurality of tests includes sampling conditions, the sampling flow that hits the sampling conditions is extracted from the shared control group, and the sampling control result is determined based on the sampling flow.

[0097] The effectiveness of the third test is evaluated based on the results of the third test and the sampling comparison results.

[0098] In one possible implementation, the shared control group includes a first control group and a second control group, and the device further includes a verification module for:

[0099] The shared control flow is divided into a first control flow and a second control flow using a sampling strategy. The first control flow is used to test the first control group, and the second control flow is used to test the second control group.

[0100] When the similarity between the first control result of the first control group and the second control result of the second control group meets a preset condition, the step of allocating the required first test traffic from the shared test traffic occupied by the shared control group to the first test group corresponding to the first test includes:

[0101] The sampling strategy allocates the required first test traffic from the shared test traffic occupied by the shared control group to the first test group corresponding to the first test.

[0102] In one possible implementation, the apparatus further includes an evaluation module for:

[0103] The effectiveness of the tests is evaluated based on the test results of the multiple tests and the comparison results of the shared control group.

[0104] In one possible implementation, the multiple tests are used to test different functions of the same product.

[0105] In one possible implementation, the device further includes a classification module for:

[0106] Obtain the test parameters to be categorized for testing;

[0107] Tests with similar test parameters are identified as a single test task.

[0108] Therefore, acquiring a test task comprising multiple tests, with each test sharing a common control group, allows for the merging of control groups for each test into a single shared control group. This avoids excessive traffic consumption by multiple control groups, which could impact the actual traffic required for testing. During the testing process using the total test traffic allocated to the test task, when the first test begins, the required first test traffic is allocated from the traffic occupied by the shared control group to the first test group corresponding to that first test. Thus, when a test begins within the test task, the processing device allocates the necessary test traffic from the shared control group to ensure the test can proceed normally. When the second test ends, the second test resources occupied by the second test group corresponding to that second test are allocated to the shared control group, preventing the waste of this traffic. In this way, by dynamically adjusting the allocation of traffic to the shared control group based on the start and end of tests within the test task, dynamic allocation of traffic to the shared control group is achieved, improving traffic utilization and ensuring smooth testing.

[0109] This application also provides a computer device, which is the computer device described above, and may include a terminal device or a server. The aforementioned test traffic allocation device may be configured in this computer device. The computer device will now be described in conjunction with the accompanying drawings.

[0110] If the computer device is a terminal device, please refer to Figure 6 As shown, this application provides a terminal device, taking a mobile phone as an example:

[0111] Figure 6 This diagram illustrates a partial structural representation of a mobile phone related to the terminal device provided in this embodiment. (Reference) Figure 6 The mobile phone includes components such as a radio frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a Wi-Fi module 670, a processor 680, and a power supply 690. Those skilled in the art will understand that... Figure 6The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0112] The following is combined Figure 6 A detailed introduction to each component of a mobile phone:

[0113] The RF circuit 610 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 680; in addition, it transmits uplink data to the base station.

[0114] The memory 620 can be used to store software programs and modules. The processor 680 executes various functions and data processing of the mobile phone by running the software programs and modules stored in the memory 620. The memory 620 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 620 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0115] The input unit 630 can be used to receive input numeric or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632.

[0116] The display unit 640 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 640 may include a display panel 641.

[0117] The mobile phone may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors.

[0118] Audio circuit 660, speaker 661, and microphone 662 provide an audio interface between the user and the mobile phone.

[0119] WiFi is a short-range wireless transmission technology. Through the WiFi module 670, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access.

[0120] The processor 680 is the control center of the mobile phone. It connects various parts of the mobile phone through various interfaces and lines. It performs various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 620 and calling data stored in the memory 620.

[0121] The phone also includes a power supply 690 (such as a battery) that powers the various components.

[0122] In this embodiment, the processor 680 included in the terminal device also has the following functions:

[0123] Obtain a test task comprising multiple tests, wherein the multiple tests share a common control group in the test task;

[0124] The total test traffic allocated to the test task is determined based on the test groups corresponding to the multiple tests and the shared control group.

[0125] During the testing of the test task using the total test traffic, when the first test among the multiple tests starts, the required first test traffic is allocated to the first test group corresponding to the first test from the shared test traffic occupied by the shared control group.

[0126] When the second test in the plurality of tests ends, the second test traffic occupied by the second test group corresponding to the second test is added to the shared test traffic.

[0127] If the computer device is a server, this application embodiment also provides a server; please refer to [link to relevant documentation]. Figure 7 As shown, Figure 7 This is a structural diagram of a server 700 provided in an embodiment of this application. The server 700 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 722 (e.g., one or more processors) and a memory 732, and one or more storage media 730 (e.g., one or more mass storage devices) for storing application programs 742 or data 744. The memory 732 and storage media 730 can be temporary or persistent storage. The program stored in the storage media 730 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 722 may be configured to communicate with the storage media 730 and execute the series of instruction operations in the storage media 730 on the server 700.

[0128] Server 700 may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input / output interfaces 758, and / or one or more operating systems 741, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.

[0129] The steps performed by the server in the above embodiments can be based on Figure 7 The server structure shown.

[0130] In addition, this application embodiment also provides a storage medium for storing a computer program for executing the method provided in the above embodiment.

[0131] This application also provides a computer program product including instructions that, when run on a computer, cause the computer to perform the methods provided in the above embodiments.

[0132] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk, or optical disk, etc., and other media capable of storing program code.

[0133] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0134] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Moreover, based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A test traffic allocation method, characterized in that, The method includes: Obtain a test task comprising multiple tests, wherein the multiple tests share a common control group in the test task; The total test traffic allocated to the test task is determined based on the test groups corresponding to the multiple tests and the shared control group. During the testing of the test task using the total test traffic, when the first test among the multiple tests starts, the required first test traffic is allocated to the first test group corresponding to the first test from the shared test traffic occupied by the shared control group. When the second test in the plurality of tests ends, the second test traffic occupied by the second test group corresponding to the second test is added to the shared test traffic.

2. The method according to claim 1, characterized in that, The step of adding the second test traffic occupied by the second test group corresponding to the second test to the shared test traffic includes: Perform serialization verification on the second test traffic and the shared test traffic; Based on the similarity between the test results of the second test traffic and the shared test traffic, the timing for adding the second test traffic to the shared test traffic is determined.

3. The method according to claim 1, characterized in that, The method further includes: The first weight is determined based on the ratio of the first test traffic to the total test traffic. The effectiveness of the first test result corresponding to the first test is evaluated based on the first weight.

4. The method according to claim 1, characterized in that, The method further includes: When the third test in the plurality of tests includes sampling conditions, the sampling flow that hits the sampling conditions is extracted from the shared control group, and the sampling control result is determined based on the sampling flow. The effectiveness of the third test is evaluated based on the results of the third test and the sampling comparison results.

5. The method according to any one of claims 1 to 4, characterized in that, The shared control group includes a first control group and a second control group, and the method further includes: The shared control flow is divided into a first control flow and a second control flow using a sampling strategy. The first control flow is used to test the first control group, and the second control flow is used to test the second control group. When the similarity between the first control result of the first control group and the second control result of the second control group meets a preset condition, the step of allocating the required first test traffic from the shared test traffic occupied by the shared control group to the first test group corresponding to the first test includes: The sampling strategy allocates the required first test traffic from the shared test traffic occupied by the shared control group to the first test group corresponding to the first test.

6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The effectiveness of the tests is evaluated based on the test results of the multiple tests and the comparison results of the shared control group.

7. The method according to any one of claims 1 to 4, characterized in that, The multiple tests are used to test different functions of the same product.

8. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain the test parameters to be categorized for testing; Tests with similar test parameters are identified as a single test task.

9. A test flow distribution device, characterized in that, The device includes: An acquisition module is used to acquire a test task that includes multiple tests, wherein the multiple tests share a common control group in the test task; The determination module is used to determine the total test traffic allocated to the test task based on the test groups corresponding to the multiple tests and the shared control group; The allocation module is used to allocate the required first test traffic from the shared test traffic occupied by the shared control group to the first test group corresponding to the first test when the first test among the multiple tests starts during the process of testing the test task with the total test traffic; The adjustment module is used to add the second test traffic occupied by the second test group corresponding to the second test to the shared test traffic when the second test in the plurality of tests ends.

10. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the test traffic allocation method according to any one of claims 1-8 according to the instructions in the program code.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for executing the test traffic allocation method according to any one of claims 1-8.

12. A computer program product comprising instructions that, when run on a computer, cause the computer to perform the test traffic allocation method according to any one of claims 1-8.