AB experiment data processing method and device, computer device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA PING AN PROPERTY INSURANCE CO LTD
- Filing Date
- 2023-04-11
- Publication Date
- 2026-05-29
AI Technical Summary
Existing A/B testing data processing methods are inefficient, have long statistical cycles, cannot finely classify experimental events, rely on the Hadoop big data ecosystem for poor scalability, and result in poor precision in experimental conclusions.
Data from A/B tests is obtained through Spring services. Attribute tags are added to candidate events using a TiDB database configuration attribute list. The data is then stored in the ClickHouse database, and a pre-defined SQL task is executed for data processing. ClickHouse's high throughput capability is then used for data analysis.
It enables faster A/B test data processing, finer-grained event segmentation, and eliminates the need for manual intervention. Simply setting up a Spring service and a ClickHouse cluster can improve processing efficiency.
Smart Images

Figure CN116737713B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology, and in particular to an A / B experiment data processing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] With data analysis increasingly emphasizing precision, A / B testing is gaining wider application. A / B testing involves dividing participants into experimental and control groups, applying different protocols to each group, and recording the participants' responses in the data. This data is then statistically analyzed to derive experimental conclusions. A / B testing is widely used in product iteration and strategy optimization scenarios. For example, when optimizing a product interface or adding features, an A / B test is conducted where one group of users uses the product without optimized interface and added features, while another group uses the product with optimized interface and added features. User behavior data for both products is collected and statistically analyzed to determine how to improve the product.
[0003] A / B testing often involves preparing multiple versions, resulting in a large amount of data that requires processing. Current A / B testing data processing typically involves synchronizing the data to Hive and then executing Hive SQL for processing. However, this method has a long statistical cycle, often only showing Hive results the following day; it also fails to allow for detailed segmentation of events in the A / B test, leading to poorly refined experimental conclusions that require manual extraction of necessary information; furthermore, Hive relies on the Hadoop big data ecosystem, limiting its scalability. All of these factors contribute to the low efficiency of A / B testing data processing. Summary of the Invention
[0004] The purpose of this application is to provide an AB experiment data processing method, apparatus, computer equipment, and storage medium to solve the problem of low efficiency in AB experiment data processing.
[0005] To address the aforementioned technical problems, this application provides an AB experiment data processing method, employing the following technical solution:
[0006] Obtain A / B experiment data through Spring services;
[0007] Attribute labels are added to candidate events in the AB experimental data according to the attribute list configured in the TiDB database to obtain the events to be processed;
[0008] Store the events to be processed in the clickhouse table of the clickhouse database;
[0009] A preset SQL task is executed to process the data in the clickhouse table and obtain the AB experiment data processing results. The attribute tags are used to extract data from the events to be processed.
[0010] To address the aforementioned technical problems, this application also provides an AB experiment data processing device, which employs the following technical solution:
[0011] The data acquisition module is used to obtain A / B experiment data through Spring services;
[0012] The attribute addition module is used to add attribute labels to candidate events in the AB experimental data according to the attribute list configured in the TiDB database, so as to obtain the events to be processed;
[0013] The event storage module is used to store the events to be processed in the clickhouse table of the clickhouse database;
[0014] The data processing module is used to execute preset SQL tasks to process the data in the clickhouse table and obtain the AB experiment data processing results. The attribute tags are used to extract data from the events to be processed.
[0015] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:
[0016] Obtain A / B experiment data through Spring services;
[0017] Attribute labels are added to candidate events in the AB experimental data according to the attribute list configured in the TiDB database to obtain the events to be processed;
[0018] Store the events to be processed in the clickhouse table of the clickhouse database;
[0019] A preset SQL task is executed to process the data in the clickhouse table and obtain the AB experiment data processing results. The attribute tags are used to extract data from the events to be processed.
[0020] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:
[0021] Obtain A / B experiment data through Spring services;
[0022] Attribute labels are added to candidate events in the AB experimental data according to the attribute list configured in the TiDB database to obtain the events to be processed;
[0023] Store the events to be processed in the clickhouse table of the clickhouse database;
[0024] A preset SQL task is executed to process the data in the clickhouse table and obtain the AB experiment data processing results. The attribute tags are used to extract data from the events to be processed.
[0025] Compared with existing technologies, the embodiments of this application have the following main advantages: A / B test data is obtained through Spring services; an attribute list is configured in the TiDB database, and attribute tags are added to candidate events in the A / B test data that meet the attribute conditions based on the attribute list to obtain events to be processed, thereby achieving finer-grained event segmentation; the events to be processed are stored in the clickhouse table of the clickhouse database, and a preset SQL task is executed to process the data in the clickhouse table to obtain the A / B test data processing results. During data processing, the SQL statement can directly extract data from the relevant events to be processed based on the attribute tags and output the processing results related to the attribute tags; this application utilizes the high-throughput clickhouse for A / B test data processing, resulting in faster computation speed. Attribute tags enable finer-grained event segmentation, eliminating the need for manual intervention for finer-grained statistical analysis. Only a Spring service and a clickhouse cluster are required to achieve big data processing, improving the processing efficiency of A / B test data. Attached Figure Description
[0026] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;
[0028] Figure 2 This is a flowchart of one embodiment of the AB experimental data processing method according to this application;
[0029] Figure 3 This is a schematic diagram of one embodiment of the AB experimental data processing device according to this application;
[0030] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0032] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0034] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0035] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0036] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0037] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.
[0038] It should be noted that the AB experimental data processing method provided in this application embodiment is generally executed by a server, and correspondingly, the AB experimental data processing device is generally located in the server.
[0039] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0040] Continue to refer to Figure 2 A flowchart of an embodiment of the AB experimental data processing method according to this application is shown. The AB experimental data processing method includes the following steps:
[0041] Step S201: Obtain AB experiment data through Spring service.
[0042] In this embodiment, the AB experimental data processing method runs on electronic devices (e.g., Figure 1 The server shown can communicate with the terminal via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections, and other currently known or future wireless connection methods.
[0043] Among them, AB experiment data can be a collection of data related to the AB experiment.
[0044] Specifically, this application constructs a Spring service that can run on multiple nodes and obtains A / B test data through the Spring service.
[0045] It should be emphasized that, to further ensure the privacy and security of the aforementioned A / B experiment data, the A / B experiment data can also be stored in a blockchain node.
[0046] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0047] Furthermore, step S201 above may include: obtaining AB experiment split logs from the AB experiment split service through the Spring service; obtaining AB experiment behavior event data of the experiment objects from preset platforms through the Spring service; and determining the AB experiment split logs and AB experiment behavior event data as AB experiment data.
[0048] Specifically, the A / B test data consists of two parts: A / B test routing logs and A / B test behavioral event data. A / B test routing can be performed by the A / B routing Spring service, and the resulting A / B test routing logs can be printed. For example, it can record which user was assigned to which group in which experiment. The A / B test routing logs can be transmitted to the Spring service via Kafka.
[0049] In A / B testing, the experimental subjects (such as users) can generate user behaviors on various platforms. These behaviors can be individual events, generating A / B test behavior event data. For example, users can perform user operations on platforms such as iOS, H5, and Android, generating A / B test behavior event data. This A / B test behavior event data can also be transmitted to the Spring service via Kafka.
[0050] In one embodiment, this application also sets up a TiDB database, which can store experimental configuration data. This data can include various experimental configurations for starting an A / B experiment, such as experiment category, experiment splitting type, and splitting ratio. The Spring service can also retrieve the experimental configuration data from the TiDB database and use it as A / B experiment data.
[0051] A / B testing data can be any type of A / B testing-related data collection. A / B testing is widely used in product iteration and strategy optimization scenarios. Product iteration includes product interface optimization, feature addition, and process enhancement, all of which can be tested using A / B testing to determine the success of product redesigns. Strategy optimization includes operational strategy optimization and algorithm strategy optimization, both of which can be verified through A / B testing to confirm whether the strategies achieve their expected goals. During A / B testing, the A / B testing traffic is distributed to the experimental and control groups by the A / B testing traffic splitting service, generating A / B testing traffic splitting logs. When the product under test involves network services, users in the traffic splitting and control groups can use the product and perform user operations on platforms such as iOS, H5, and Android, generating A / B testing behavioral event data. In this embodiment, the A / B testing data includes A / B testing traffic splitting logs obtained from the A / B testing traffic splitting service, as well as A / B testing behavioral event data of the experimental objects obtained from each platform, ensuring comprehensive data analysis and processing for A / B testing.
[0052] Step S202: Add attribute labels to candidate events in the AB experimental data according to the attribute list configured in the TiDB database to obtain the events to be processed.
[0053] Specifically, this application includes a TiDB database, which contains an attribute list. Each piece of information in the AB experimental data is a candidate event. Events have multi-dimensional attributes; for example, event name, event identifier, and a specific metric within the event can all be considered attributes. The attribute list provides various attribute conditions. If a candidate event matches a certain attribute condition, the candidate event is given the corresponding attribute label, thus obtaining the event to be processed.
[0054] Step S203: Store the events to be processed in the clickhouse table of the clickhouse database.
[0055] Specifically, the Spring service processes the candidate events in the A / B test data to obtain the events to be processed, and then stores the events to be processed in the ClickHouse database. In the ClickHouse database, the data is stored in the form of the ClickHouse table.
[0056] ClickHouse is a columnar database management system for Online Analytical Processing (OLAP). Its vectorized query engine enables faster query speeds in big data scenarios. ClickHouse features columnar storage, ordered storage, primary key indexes, partitioning and sharding, data TTL (Time To Live), high throughput, master-slave synchronization, multi-core parallelism, a vectorized engine, dynamic code generation, comprehensive SQL support, and support for complex data types.
[0057] Step S204: Execute a preset SQL task to process the data in the clickhouse table and obtain the AB experiment data processing results. The attribute tags are used to extract data from the events to be processed.
[0058] Specifically, this application pre-sets multiple SQL tasks, which the Spring service can run to process the data in the ClickHouse table, perform statistical analysis of the A / B test data, and obtain the A / B test data processing results.
[0059] During statistical analysis, because the events to be processed in the clickhouse table have attribute tags, the SQL statements in the SQL task can directly extract relevant data from the events to be processed based on the attribute tags for analysis and calculation, and can output the data processing results related to the attribute tags without requiring manual fine-grained statistical analysis. For example, to calculate the statistical value of a certain indicator in a certain group of an experiment, the attribute conditions for that indicator in that group of the experiment can be configured in the attribute list of the TiDB database. If a candidate event meets the attribute conditions, an attribute tag matching the attribute conditions is added to the candidate event. When executing the SQL task, the SQL statement can extract the value of that indicator under that group of the experiment from each event to be processed based on the attribute tags, perform statistical analysis, and output the corresponding data processing results.
[0060] Hive is typically used for data analysis in big data scenarios, focusing on offline processing and data warehouse construction. It requires significant investment in software deployment, operation and maintenance, and platform development, such as setting up Hadoop, Hive, and ZooKeeper clusters, resulting in high costs. In contrast, ClickHouse is a database with storage and considerable computing power. It's a high-throughput, vectorized engine that allows for near real-time viewing of computation results, and a small ClickHouse cluster can handle large volumes of data. This application demonstrates how to achieve rapid processing of A / B test data with minimal investment by simply deploying Spring services and building a separate ClickHouse cluster.
[0061] In this embodiment, A / B test data is obtained through Spring services. The TiDB database contains an attribute list. Based on this list, attribute tags are added to candidate events in the A / B test data that meet the attribute conditions to obtain events to be processed, thus achieving finer-grained event segmentation. These events to be processed are stored in the `clickhouse` table of the `clickhouse` database. A preset SQL task is executed to process the data in the `clickhouse` table, obtaining the A / B test data processing results. During data processing, SQL statements can directly extract data from the relevant events to be processed based on attribute tags and output the processing results related to the attribute tags. This application utilizes the high-throughput `clickhouse` for A / B test data processing, resulting in faster computation speed. Attribute tags enable finer-grained event segmentation, eliminating the need for manual intervention for finer-grained statistical analysis. Only a Spring service and `clickhouse` cluster are required to achieve large-scale data processing, improving the efficiency of A / B test data processing.
[0062] Furthermore, step S202 above may include: caching the attribute list configured in the TiDB database to the Spring service; determining the matching attributes of candidate events in the AB experiment data based on the attribute list through the Spring service, wherein the matching attributes are event attributes or indicator attributes in the attribute list; adding attribute tags corresponding to the matching attributes to the candidate events to obtain the events to be processed.
[0063] Specifically, the attribute list is usually stored in the TiDB database to reduce the runtime pressure on the Spring service. When performing event matching, the Spring service caches the attribute list configured in the TiDB database, and then matches the attribute conditions in the attribute list with each candidate event in the A / B test data in order to determine the matching attributes in the candidate events.
[0064] You can configure the events you want to monitor through an attribute list. In this case, you can use the event name or event identifier as the attribute condition. If a candidate event meets the attribute condition, then the event name or event identifier of the candidate event becomes the matching attribute, and this matching attribute belongs to the event attributes.
[0065] You can also configure the metrics you want to focus on. For example, if a certain attribute condition in the attribute list is that metric a = 10, and if a candidate event has metric a and the value of a is 10, then the candidate event satisfies the attribute condition. Metric a is a matching attribute in the candidate event, and this matching attribute belongs to the metric attribute.
[0066] Add attribute tags corresponding to the matching attributes to the candidate events to mark that the candidate events meet the relevant attribute conditions, and obtain the events to be processed.
[0067] Furthermore, after the above steps of determining the matching attributes of candidate events in the A / B test data through the Spring service based on the attribute list, it can also include: discarding the candidate event when there is no matching event attribute.
[0068] Specifically, when a candidate event does not have a matching event attribute, it indicates that the candidate event does not need to be considered and is an invalid event. The candidate event can be discarded directly to reduce the amount of data that needs to be processed and improve the efficiency of A / B experiment data processing.
[0069] In this embodiment, when a candidate event does not have a matching event attribute, the candidate event is discarded to reduce the amount of computation and improve the efficiency of AB experiment data processing.
[0070] In this embodiment, matching attributes of candidate events in AB experimental data are determined based on the attribute list. Matching attributes include event attributes or indicator attributes. Attribute labels corresponding to the matching attributes are added to the candidate events to obtain the events to be processed, thus achieving a finer-grained division of events.
[0071] Furthermore, step S203 above may include: importing the events to be processed into a preset event queue, wherein the event queue has a finite length; and storing the events to be processed into the clickhouse table of the clickhouse database based on the event queue.
[0072] Specifically, this application sets up a finite-length event queue. The Spring service imports events to be processed into the event queue, and then stores the events to be processed into the clickhouse table of the clickhouse database based on the event queue.
[0073] When the event queue reaches saturation, the Spring service pauses consuming A / B experiment logs and A / B experiment behavior event data from Kafka. By setting the length of the event queue, rate limiting can be achieved, controlling the data import speed into ClickHouse and ensuring that data is imported into ClickHouse in an orderly manner.
[0074] In this embodiment, the events to be processed are imported into an event queue of finite length. This event queue can be used to control the data import speed of ClickHouse, thereby importing data into ClickHouse in an orderly manner.
[0075] Furthermore, step S204 above may include: when the preset triggering condition of the SQL task is met, obtaining the upstream task of the SQL task; querying the task status of the upstream task in the preset task status table; when the task status is completed, executing the SQL task through the node in the Spring service to process the data in the ClickHouse table and obtain the AB experiment data processing results.
[0076] Specifically, SQL tasks have preset triggering conditions. For example, an SQL task can be a scheduled task that is triggered and executed at regular intervals. When the triggering condition of an SQL task is reached, the upstream tasks of the SQL task are first retrieved. Upstream tasks are the tasks that the SQL task depends on. The SQL task contains the clickhouse table that needs to be processed, and the dependencies between clickhouse tables constitute the dependencies between SQL tasks. Upstream tasks can be obtained through a preset task dependency table, or the upstream tasks that need to perform status checks can be written into the SQL task code.
[0077] This application also sets up a task status table, which represents the task status of each SQL task, including completed and incomplete status. Among them, the SQL task being executed is in the incomplete status. The task status table can be set in Redis, which is a key-value database. The key can be the task name of the SQL task, and the value uses 0 and 1 to represent the task status of the SQL task (for example, 0 represents the incomplete status and 1 represents the completed status).
[0078] When the upstream task is in a completed state, it indicates that the data on which the SQL task depends has been prepared. The SQL task is then executed through the node in the Spring service to process the data in the ClickHouse table and obtain the data processing results of the A / B test.
[0079] In this application, the Spring service is deployed across multiple nodes, each capable of executing SQL tasks. Before executing a SQL task, each node first locks the `clickhouse` table within the SQL task using a distributed lock. If the upstream task it depends on has completed, the current SQL task is executed. Once the SQL task is completed, the node updates its Redis record to show the completed status and unlocks the `clickhouse` table. After all SQL tasks have been executed, the processing of this batch of A / B test data is complete, and the task status records in Redis are initialized.
[0080] In this embodiment, when the preset triggering condition of the SQL task is met, the upstream task of the SQL task is obtained. When the task status of the upstream task is completed, the SQL task is executed through the node in the Spring service, thus ensuring the accuracy of the A / B test data processing results.
[0081] Furthermore, after step S204 above, the process may also include: sending the AB experiment data processing results to the TiDB database for storage and display.
[0082] Specifically, after obtaining the data processing results of the A / B experiment, they can be sent to the TiDB database for storage and the results can be displayed so that the results of the A / B experiment can be fed back to the developers for further improvement of the A / B experiment.
[0083] In this embodiment, the AB experiment data processing results are sent to the TiDB database for storage and display, thereby providing timely feedback of the AB experiment results to the developers.
[0084] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0085] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0086] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of an AB experimental data processing device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0087] like Figure 3 As shown, the AB experiment data processing device 300 described in this embodiment includes: a data acquisition module 301, an attribute addition module 302, an event storage module 303, and a data processing module 304, wherein:
[0088] The data acquisition module 301 is used to obtain AB experiment data through Spring services.
[0089] The attribute addition module 302 is used to add attribute labels to candidate events in the AB experimental data according to the attribute list configured in the TiDB database, so as to obtain the events to be processed.
[0090] Event storage module 303 is used to store events to be processed in the clickhouse table of the clickhouse database.
[0091] The data processing module 304 is used to execute preset SQL tasks to process the data in the clickhouse table and obtain the AB experiment data processing results. The attribute tags are used to extract data from the events to be processed.
[0092] In this embodiment, A / B test data is obtained through Spring services. The TiDB database contains an attribute list. Based on this list, attribute tags are added to candidate events in the A / B test data that meet the attribute conditions to obtain events to be processed, thus achieving finer-grained event segmentation. These events to be processed are stored in the `clickhouse` table of the `clickhouse` database. A preset SQL task is executed to process the data in the `clickhouse` table, obtaining the A / B test data processing results. During data processing, SQL statements can directly extract data from the relevant events to be processed based on attribute tags and output the processing results related to the attribute tags. This application utilizes the high-throughput `clickhouse` for A / B test data processing, resulting in faster computation speed. Attribute tags enable finer-grained event segmentation, eliminating the need for manual intervention for finer-grained statistical analysis. Only a Spring service and `clickhouse` cluster are required to achieve large-scale data processing, improving the efficiency of A / B test data processing.
[0093] In some optional implementations of this embodiment, the data acquisition module 301 may include: a log acquisition submodule, an event acquisition submodule, and a determination submodule, wherein:
[0094] The log retrieval submodule is used to retrieve A / B experiment split logs from the A / B experiment split service via Spring services.
[0095] The event acquisition submodule is used to retrieve A / B experiment behavior event data of experimental objects from various preset platforms through Spring services.
[0096] The determination submodule is used to identify AB experiment split logs and AB experiment behavioral event data as AB experiment data.
[0097] In this embodiment, the A / B experiment data includes A / B experiment routing logs obtained from the A / B experiment routing service, as well as A / B experiment behavior event data of the experiment objects obtained from various platforms, ensuring that comprehensive data analysis and processing of A / B experiments can be performed.
[0098] In some optional implementations of this embodiment, the attribute adding module 302 may include: a list caching submodule, an attribute determination submodule, and a tag adding submodule, wherein:
[0099] The list caching submodule is used to cache the list of properties configured in the TiDB database to the Spring service.
[0100] The attribute determination submodule is used to determine the matching attributes of candidate events in A / B test data based on an attribute list using Spring services. The matching attributes are either event attributes or indicator attributes in the attribute list.
[0101] The tag addition submodule is used to add attribute tags corresponding to the matching attributes to candidate events, thus obtaining the events to be processed.
[0102] In this embodiment, matching attributes of candidate events in AB experimental data are determined based on the attribute list. Matching attributes include event attributes or indicator attributes. Attribute labels corresponding to the matching attributes are added to the candidate events to obtain the events to be processed, thus achieving a finer-grained division of events.
[0103] In some optional implementations of this embodiment, the attribute adding module 302 may further include an event discarding submodule, used to discard candidate events when no matching event attribute exists for the candidate event.
[0104] In this embodiment, when a candidate event does not have a matching event attribute, the candidate event is discarded to reduce the amount of computation and improve the efficiency of AB experiment data processing.
[0105] In some optional implementations of this embodiment, the event storage module 303 may include: an event import submodule and an event storage submodule, wherein:
[0106] The event import submodule is used to import events to be processed into a preset event queue, where the event queue has a finite length.
[0107] The event storage submodule is used to store pending events into the clickhouse table of the clickhouse database based on the event queue.
[0108] In this embodiment, the events to be processed are imported into an event queue of finite length. This event queue can be used to control the data import speed of ClickHouse, thereby importing data into ClickHouse in an orderly manner.
[0109] In some optional implementations of this embodiment, the data processing module 304 may include: an upstream acquisition submodule, a status query submodule, and a task execution submodule, wherein:
[0110] The upstream acquisition submodule is used to acquire the upstream task of the SQL task when the preset triggering conditions of the SQL task are met.
[0111] The status query submodule is used to query the task status of upstream tasks in a preset task status table.
[0112] The task execution submodule is used to execute SQL tasks through nodes in the Spring service when the task status is completed, in order to process the data in the ClickHouse table and obtain the data processing results of the A / B test.
[0113] In this embodiment, when the preset triggering condition of the SQL task is met, the upstream task of the SQL task is obtained. When the task status of the upstream task is completed, the SQL task is executed through the node in the Spring service, thus ensuring the accuracy of the A / B test data processing results.
[0114] In some optional implementations of this embodiment, the AB experiment data processing device 300 may further include: a result sending module, used to send the AB experiment data processing results to the TiDB database for storage and display.
[0115] In this embodiment, the AB experiment data processing results are sent to the TiDB database for storage and display, thereby providing timely feedback of the AB experiment results to the developers.
[0116] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0117] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0118] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0119] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for AB experimental data processing methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.
[0120] In some embodiments, the processor 42 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the AB experimental data processing method.
[0121] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.
[0122] The computer device provided in this embodiment can execute the above-described AB experiment data processing method. Here, the AB experiment data processing method can be any of the AB experiment data processing methods described in the various embodiments above.
[0123] In this embodiment, A / B test data is obtained through Spring services. The TiDB database contains an attribute list. Based on this list, attribute tags are added to candidate events in the A / B test data that meet the attribute conditions to obtain events to be processed, thus achieving finer-grained event segmentation. These events to be processed are stored in the `clickhouse` table of the `clickhouse` database. A preset SQL task is executed to process the data in the `clickhouse` table, obtaining the A / B test data processing results. During data processing, SQL statements can directly extract data from the relevant events to be processed based on attribute tags and output the processing results related to the attribute tags. This application utilizes the high-throughput `clickhouse` for A / B test data processing, resulting in faster computation speed. Attribute tags enable finer-grained event segmentation, eliminating the need for manual intervention for finer-grained statistical analysis. Only a Spring service and `clickhouse` cluster are required to achieve large-scale data processing, improving the efficiency of A / B test data processing.
[0124] This application also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the AB experimental data processing method described above.
[0125] In this embodiment, A / B test data is obtained through Spring services. The TiDB database contains an attribute list. Based on this list, attribute tags are added to candidate events in the A / B test data that meet the attribute conditions to obtain events to be processed, thus achieving finer-grained event segmentation. These events to be processed are stored in the `clickhouse` table of the `clickhouse` database. A preset SQL task is executed to process the data in the `clickhouse` table, obtaining the A / B test data processing results. During data processing, SQL statements can directly extract data from the relevant events to be processed based on attribute tags and output the processing results related to the attribute tags. This application utilizes the high-throughput `clickhouse` for A / B test data processing, resulting in faster computation speed. Attribute tags enable finer-grained event segmentation, eliminating the need for manual intervention for finer-grained statistical analysis. Only a Spring service and `clickhouse` cluster are required to achieve large-scale data processing, improving the efficiency of A / B test data processing.
[0126] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0127] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A method for processing AB experimental data, characterized in that, Includes the following steps: Obtain A / B experiment data through Spring services; According to the attribute list configured in the TiDB database, attribute labels are added to the candidate events in the AB experimental data to obtain the events to be processed. The candidate events have multi-dimensional attributes, and the attribute list lists a variety of attribute conditions. When the candidate event matches the attribute condition, the attribute list is used to add the attribute label corresponding to the attribute condition to the candidate event to obtain the event to be processed. Store the events to be processed in the clickhouse table of the clickhouse database; A preset SQL task is executed to process the data in the clickhouse table and obtain the AB experiment data processing results. The attribute tags are used to extract data from the events to be processed. The steps for obtaining A / B experiment data through Spring services include: Obtain A / B experiment split logs from the A / B experiment split service using Spring services; The Spring service is used to obtain A / B experiment behavior event data of the experimental objects from various preset platforms. The AB experiment diversion logs and the AB experiment behavioral event data are identified as AB experiment data.
2. The AB experimental data processing method according to claim 1, characterized in that, The step of adding attribute labels to candidate events in the AB experimental data according to the attribute list configured in the TiDB database to obtain the events to be processed includes: The attribute list configured in the TiDB database is cached in the Spring service; Based on the attribute list, the matching attributes of candidate events in the AB experiment data are determined by the Spring service, wherein the matching attributes are event attributes or indicator attributes in the attribute list; Add attribute tags corresponding to the matching attributes to the candidate events to obtain the events to be processed.
3. The AB experimental data processing method according to claim 2, characterized in that, After the step of determining the matching attributes of candidate events in the A / B experiment data based on the attribute list using the Spring service, the method further includes: If no matching event attribute exists for the candidate event, the candidate event is discarded.
4. The AB experimental data processing method according to claim 1, characterized in that, The step of storing the event to be processed into the clickhouse table of the clickhouse database includes: The events to be processed are imported into a preset event queue, wherein the event queue has a finite length; Based on the event queue, the events to be processed are stored in the clickhouse table of the clickhouse database.
5. The AB experimental data processing method according to claim 1, characterized in that, The steps of executing a preset SQL task to process the data in the clickhouse table and obtain the AB experiment data processing results include: When the preset triggering conditions of the SQL task are met, the upstream task of the SQL task is retrieved; Query the task status of the upstream task in the preset task status table; When the task status is completed, the SQL task is executed through the node in the Spring service to process the data in the ClickHouse table and obtain the AB experiment data processing results.
6. The AB experimental data processing method according to claim 1, characterized in that, After the step of executing a preset SQL task to process the data in the clickhouse table and obtain the AB experiment data processing results, the method further includes: The AB experiment data processing results are sent to the TiDB database for storage and display.
7. An AB experiment data processing device, characterized in that, include: The data acquisition module is used to obtain A / B experiment data through Spring services; The attribute adding module is used to add attribute tags to candidate events in the AB experimental data according to the attribute list configured in the TiDB database to obtain events to be processed. The candidate events have multi-dimensional attributes, and the attribute list lists a variety of attribute conditions. The attribute list is used to add attribute tags corresponding to the attribute conditions to the candidate events when the candidate events match the attribute conditions to obtain events to be processed. The event storage module is used to store the events to be processed in the clickhouse table of the clickhouse database; The data processing module is used to execute preset SQL tasks to process the data in the clickhouse table and obtain the AB experiment data processing results. The attribute tags are used to extract data from the events to be processed. The data acquisition module includes a log acquisition submodule, an event acquisition submodule, and a determination submodule. The log acquisition submodule is used to obtain AB experiment split logs from the AB experiment split service through the Spring service. The event acquisition submodule is used to acquire A / B experiment behavior event data of the experimental object from preset platforms through the Spring service; The determination submodule is used to determine the AB experiment diversion log and the AB experiment behavioral event data as AB experiment data.
8. A computer device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the AB experimental data processing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the AB experimental data processing method as described in any one of claims 1 to 6.