Traffic data processing method and device, computer equipment, readable storage medium and program product
By obtaining user traffic data and determining the scope of event attribution based on the status of the device and account, the problem of low applicability of traditional traffic attribution technology is solved, and the applicability and accurate attribution effect to multiple business scenarios is achieved.
Patent Information
- Application Number
- CN202411927655.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-25
AI Technical Summary
Traditional traffic attribution technology is difficult to implement and is difficult to apply to application scenarios with a large number of business types, resulting in low applicability.
By obtaining the user traffic data of the events to be attributed, the event attribution scope is determined based on the device usage status and account usage status, and the attribution events are classified according to the matching event attribution logic, and the media channel category they belong to is determined, thereby establishing a mapping relationship between events and channels and obtaining event attribution results.
It improves the applicability of traffic attribution, making it suitable for application scenarios with a large number of business types, and ensures the accurate attribution results of attribution events.
Smart Images

Figure CN119692456A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data management technology, and in particular to a flow data processing method, device, computer equipment, readable storage medium and program product. Background Art
[0002] Due to the booming development of the Internet, various platforms have ushered in an unprecedented influx of traffic. By attributing traffic, platforms can more accurately manage and use different types of traffic, so that they can formulate targeted strategies and measures based on the characteristics of each type of traffic and provide users with more personalized content and services. However, the traffic attribution technology in traditional technologies is difficult to implement and is difficult to apply to application scenarios with a wide range of business types.
[0003] Therefore, traffic attribution in traditional technologies has the problem of low applicability. Summary of the invention
[0004] Based on this, it is necessary to provide a traffic data processing method, device, computer equipment, readable storage medium and program product that can improve the applicability of traffic attribution in response to the above technical problems.
[0005] In a first aspect, in one embodiment, the present application provides a flow data processing method, the method comprising:
[0006] Obtain user traffic data of the event to be attributed; user traffic data includes device usage status and account usage status; the event to be attributed is an event triggered by the user account on the client;
[0007] Determine the event attribution scope of the event to be attributed based on the device usage status and account usage status;
[0008] According to the event attribution logic that matches the event attribution scope, the events to be attributed are classified to determine the media channel category to which the events to be attributed belong;
[0009] Establish a mapping relationship between the event to be attributed and the media channel category to obtain the event attribution result of the event to be attributed.
[0010] In one embodiment, the user traffic data is pre-cached in a first message queue provided by the distributed message system. Before the step of obtaining the user traffic data of the event to be attributed, the method further includes:
[0011] Pulling event description data reported by the client in response to the event to be attributed from the second message queue provided by the distributed messaging system;
[0012] Mark the event description data to obtain user traffic data for the event to be attributed;
[0013] The user traffic data of the event to be attributed is sent to the first message queue for caching.
[0014] In one embodiment, the event description data is marked to obtain user traffic data of the event to be attributed, including:
[0015] Acquire event classification logic that matches the event type of the event to be attributed; wherein the event type of the event to be attributed includes at least one of a device activation event, an account registration event, or an account login event;
[0016] According to the event classification logic, the event description data is marked according to the device usage status and account usage status to obtain user traffic data.
[0017] In one embodiment, according to the event classification logic, the event description data is marked according to the device usage status and the account usage status to obtain user traffic data, including:
[0018] Get historical login records associated with user accounts;
[0019] Determine the device status mark and account status mark based on historical login records and event description data; the device status mark is used to represent the device usage status, and the account status mark is used to represent the account usage status;
[0020] According to the event classification logic, assemble device status tags and account status tags, and output user traffic data of the event to be attributed.
[0021] In one embodiment, obtaining historical login records associated with a user account includes:
[0022] The bitmap structure data associated with the user account is read from the key-value pair database; the bitmap structure data is a binary code of a preset number of digits; the code value corresponding to any code position in the binary code is used to indicate whether the user account has a login behavior on the target date; the target date is the date corresponding to any code position in the preset statistical period; the preset statistical period matches the preset number of digits;
[0023] Parse the bitmap structure data to obtain historical login records.
[0024] In one embodiment, according to the event attribution logic matching the event attribution scope, the event to be attributed is classified to determine the media channel category to which the event to be attributed belongs, including:
[0025] Obtain the traffic generation time of the user traffic data of the event to be attributed;
[0026] In response to the traffic generation time being within the attribution window period, the event to be attributed is classified according to the event attribution logic that matches the event attribution scope, and the media channel category to which the event to be attributed belongs is determined;
[0027] The method also includes:
[0028] In response to the fact that the traffic generation time is not within the attribution window period, the user traffic data is supplemented and corrected.
[0029] In a second aspect, in one embodiment, the present application provides a flow data processing device, the device comprising:
[0030] A user traffic data acquisition module is used to acquire user traffic data of the event to be attributed; the user traffic data includes device usage status and account usage status; the event to be attributed is an event triggered by the user account on the client;
[0031] An event attribution scope determination module is used to determine the event attribution scope of the event to be attributed according to the device usage status and the account usage status;
[0032] A classification module is used to classify the events to be attributed according to the event attribution logic that matches the event attribution scope, and determine the media channel category to which the events to be attributed belong;
[0033] The mapping relationship determination module is used to establish a mapping relationship between the event to be attributed and the media channel category, and obtain the event attribution result of the event to be attributed.
[0034] In a third aspect, in one embodiment, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods described in the first aspect are implemented.
[0035] In a fourth aspect, in one embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.
[0036] In a fifth aspect, in one embodiment, the present application provides a computer program product, including a computer program, which implements the steps of any one of the methods described in the first aspect when the computer program is executed by a processor.
[0037] The above-mentioned data processing method, device, computer equipment, readable storage medium and program product, the method can obtain user traffic data of the event to be attributed, and determine the event attribution scope of the event to be attributed according to the device usage status and the account usage status, and then classify the event to be attributed according to the event attribution logic that matches the event attribution scope, so as to determine the media channel category to which the event to be attributed belongs; and then establish a mapping relationship between the event to be attributed and the media channel category to obtain the event attribution result of the event to be attributed; in this way, the event attribution scope of the event to be attributed can be accurately determined according to the device usage status and the account usage status recorded in the user traffic data of the event to be attributed, and the appropriate event attribution logic can be adaptively matched for the event to be attributed according to the event attribution scope, so as to use the event attribution logic to accurately associate the corresponding media channel category with the event to be attributed, so that the traffic attribution operation of the event to be attributed can be applicable to application scenarios with more business types, effectively improving the applicability of traffic attribution. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 An application environment diagram of a flow data processing method in an embodiment;
[0040] Figure 2 A flow chart of a method for processing flow data in one embodiment;
[0041] Figure 3 A schematic diagram of a process for determining an event attribution scope in one embodiment;
[0042] Figure 4 A schematic diagram of a process for obtaining user traffic data in one embodiment;
[0043] Figure 5 A schematic diagram of a process for obtaining user traffic data in another embodiment;
[0044] Figure 6 A schematic diagram of a process for determining a media channel category in one embodiment;
[0045] Figure 7a A schematic diagram of a traffic attribution operation for a device activation event in one embodiment;
[0046] Figure 7bA schematic diagram of a traffic attribution operation for an account registration event in one embodiment;
[0047] Figure 7c A schematic diagram of a traffic attribution operation for an account login event in one embodiment;
[0048] Figure 8 is a structural block diagram of a flow data processing device in one embodiment;
[0049] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] With the continuous advancement of real-time bidding (RTA, Realtime API) and refined operation technology, accurate judgment of user status has become increasingly important. Among them, by attributing traffic, the platform can more accurately manage and use different types of traffic, so that targeted strategies and measures can be formulated according to the characteristics of each type of traffic, providing users with more personalized content and services. However, the traffic attribution technology in traditional technology still has the following technical problems:
[0052] ① Traditional traffic attribution solutions are too highly customized, which often prevents them from being promoted and widely used. This also further leads to relatively high maintenance and upgrade costs for the corresponding traffic attribution systems.
[0053] ② Traditional traffic attribution solutions need to undergo major changes when integrating into new businesses, which is difficult to implement and may also affect the stable operation of the system.
[0054] ③When problems arise with the relevant data in traditional traffic attribution solutions, it is difficult to repair the data in a timely manner, which can easily cause serious losses to the company.
[0055] In view of the above technical problems, the present application provides a flow data processing method. The flow data processing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0056] In an exemplary embodiment, Figure 2 As shown, a flow data processing method is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 202 to 208. Among them:
[0057] Step 202, obtaining user traffic data of the event to be attributed.
[0058] Among them, the event to be attributed is the event triggered by the user account on the client; user traffic data includes device usage status and account usage status.
[0059] Exemplarily, the events to be attributed may include device activation events, user registration events, and user login events triggered on the client based on user behavior, and traffic attribution operations may be performed on these events.
[0060] Optionally, when a user downloads, installs and opens the application to which the event belongs, a corresponding device activation event is triggered on the client; when a user registers a new account for the application to which the event belongs, a corresponding user registration event is triggered on the client; when a user logs in to the account of the application to which the event belongs, a corresponding user login event is triggered on the client. It can be understood that the operator of the application (i.e., the platform) can classify and analyze the reasons for triggering the above events to achieve refined operations.
[0061] It is understandable that the event type of the above-mentioned event to be attributed is not limited to the implementation method mentioned in the above embodiment. As long as it is a related event triggered on the client based on user behavior, this application does not specifically limit the event type of the event to be attributed.
[0062] Exemplarily, user traffic data may refer to traffic data matching related events reported by the client after related events are triggered on the client. It is understood that user traffic data may include the device usage status of the device where the current client is located and the account usage status of the current client user.
[0063] In some possible implementations, the device usage status may include: the device currently located by the client is a newly activated device, an active device, and a recalled device. Optionally, the newly activated device may indicate that the device located by the client has downloaded, installed, and opened the application to which the event to be attributed belongs for the first time; the active device may indicate that the device located by the client has opened the application a specified number of times within a preset period; the recalled device may indicate that the device located by the client has uninstalled the application to which the event to be attributed belongs, but has now downloaded, installed, and opened the application again.
[0064] It is understandable that the specific type of the above-mentioned device usage status is not limited to the implementation method mentioned in the above embodiment, as long as it can represent the relevant operating status of the device where the client is located, other possible implementations will not be repeated here.
[0065] In some possible implementations, on the device where the current client is located, the account usage status may include: account not logged in, account first login, account first login and then registration, and account not first login. Optionally, when the account usage status is account not logged in, it means that on the device where the current client is located, the user has only installed the application to which the event to be attributed belongs, and has not logged in to the account; when the account usage status is account first login, it means that on the device where the current client is located, the user has logged in to the account of the above application for the first time; when the account usage status is account first login and then registration, it means that on the device where the current client is located, the user has triggered the first login related event and then re-registered the account; when the account usage status is account not first login, it means that on the device where the current client is located, the user's account login behavior is not the first login on the device. In some examples, on the device where the current client is located, the account usage status may also include: active account. Optionally, when the account usage status is active account, it means that the client user has frequently logged in to the account recently.
[0066] It is understandable that the specific type of the above account usage status is not limited to the implementation method mentioned in the above embodiment. As long as it can characterize the user's account behavior status, other possible implementations will not be repeated here.
[0067] Step 204, determining the event attribution scope of the event to be attributed according to the device usage status and the account usage status.
[0068] Among them, the event attribution scope may include the active attribution scope and the customer acquisition attribution scope. For example, the active attribution scope may indicate that the event to be attributed is triggered when the device where the client is located or the account on the client enters an active state; the customer acquisition attribution scope indicates that the event to be attributed is triggered when a new user is acquired, for example, a new client device is activated or a user account in a dormant state is reactivated, etc., which may indicate that a new user is currently acquired.
[0069] It is understandable that the above-mentioned method of dividing the event attribution scope is not limited to the implementation method mentioned in the above embodiment. The method of dividing the event attribution scope can be set according to the needs of the application scenario, and other possible implementations will not be described here.
[0070] Specifically, the event attribution scope of the event to be attributed may be determined based on the device usage status and the account usage status.
[0071] Step 206: Classify the event to be attributed according to the event attribution logic that matches the event attribution scope, and determine the media channel category to which the event to be attributed belongs.
[0072] The media channel category to which the event to be attributed belongs may represent the specific media channel that triggered the event to be attributed. For example, the event to be attributed may be triggered based on a promotion channel without advertisements, or may be triggered based on a channel corresponding to a deeplink.
[0073] Among them, the event attribution logic can be used to analyze the reasons for the generation of traffic data corresponding to the event to be attributed, that is, to perform traffic attribution processing.
[0074] For example, based on whether the unattributed event triggered on the client matches the advertising event on the client, it can be determined whether the user traffic corresponding to the unattributed event can be attributed to the advertising channel. For another example, based on whether the unattributed event triggered on the client matches the deeplink, it can be determined whether the user traffic corresponding to the unattributed event can be attributed to the channel corresponding to the deeplink.
[0075] It is understandable that the above event attribution logic is not limited to the implementation method mentioned in the above embodiment. As long as it can parse and obtain the media channel category to which the event to be attributed belongs, the present application does not specifically limit the specific setting of the media channel category.
[0076] Specifically, based on the event attribution logic that matches the event attribution scope, the attribution events can be classified and processed to determine the media channel category to which the event to be attributed belongs, so as to understand the reason for the traffic data corresponding to the event to be attributed.
[0077] Step 208: Establish a mapping relationship between the event to be attributed and the media channel category to obtain the event attribution result of the event to be attributed.
[0078] Among them, the event attribution results of the unattributed event can be used to characterize the reasons for the traffic corresponding to the unattributed event. It can be understood that based on the obtained event attribution results, the platform can analyze and manage traffic more accurately, thereby further formulating more effective promotion strategies and improving the operation level.
[0079] Specifically, after performing traffic attribution processing on the event to be attributed, a corresponding mapping relationship can be constructed based on the event to be attributed and its corresponding media channel category, so as to obtain the event attribution result corresponding to the event to be attributed.
[0080] The present application can accurately determine the event attribution scope of the event to be attributed based on the device usage status and account usage status recorded in the user traffic data of the event to be attributed, and adaptively match the appropriate event attribution logic for the event to be attributed based on the event attribution scope, so as to utilize the event attribution logic to accurately associate the event to be attributed with the corresponding media channel category, so that the traffic attribution operation of the event to be attributed can be applicable to application scenarios with more business types, effectively improving the applicability of traffic attribution.
[0081] In one embodiment, if Figure 3 As shown, the user traffic data is pre-cached in the first message queue provided by the distributed message system. Before the step of obtaining the user traffic data of the event to be attributed, the method further includes the following steps 210 to 212. Among them:
[0082] Step 210: Pull the event description data reported by the client in response to the event to be attributed from the second message queue provided by the distributed message system.
[0083] Among them, the distributed messaging system can be used to obtain data reported from the client and cache the relevant data in the message queue of the messaging system. The event description data can be the client data corresponding to the triggered event to be attributed. For example, the event description data can include the device data of the client, such as the device model, device identification number, device activation time, etc.; the event description data can also include user behavior data, such as user account information (for example: user ID), account login record, account first login mark, etc.
[0084] It is understandable that the above event description data is not limited to the implementation method mentioned in the above embodiment. As long as it belongs to the client data corresponding to the triggered event to be attributed, the present application does not specifically limit the specific type of event description data.
[0085] Optionally, the distributed messaging system may include KAFKA. By using KAFKA as the messaging system, the efficiency of data analysis and processing can be effectively improved, and the security of data processing can be ensured. Furthermore, Flink can be used to customize the data source for pulling client data.
[0086] In some examples, in order to prevent the failure of real-time data transmission due to network delays or other reasons, the "T+1" form can be used to supplement offline data, that is, when the platform ends its operation, all data collected that day (such as event description data, historical login records) will be sorted and summarized, and then stored in the cache library. In this way, even if there is a problem with real-time data transmission in some cases, these offline data can be used to supplement the missing parts to ensure the continuity and integrity of the data.
[0087] Specifically, in response to triggering an event to be attributed, the client reports event description data related to the triggered event to be attributed to the distributed messaging system, and the server pulls the event description data reported by the client from the first message queue of the distributed messaging system.
[0088] Step 212, mark the event description data to obtain user traffic data of the event to be attributed.
[0089] Among them, user traffic data includes device usage status and account usage status. It can be understood that the event description data includes the original event description data uploaded by the client, and the marking process can be performed based on these original event description data to further determine the device usage status and account usage status corresponding to the triggered event to be attributed. According to the marked event description data, user traffic data containing the determined device usage status and account usage status can be obtained.
[0090] Specifically, when event description data is received, the event description data can be marked, so that user traffic data corresponding to the event to be attributed and including a determined device usage status and account usage status can be obtained.
[0091] Step 214: Send the user traffic data of the event to be attributed to the first message queue for caching.
[0092] Specifically, after the event description data is marked and processed, it can be sent to the first message queue of the distributed message system for caching, so that other functional modules can pull, analyze and process the data.
[0093] In one embodiment, if Figure 4 As shown, the event description data is marked to obtain user traffic data of the event to be attributed, including steps S402 to S404. Among them:
[0094] Step S402, obtaining event classification logic that matches the event type of the event to be attributed.
[0095] Among them, the event type of the event to be attributed includes at least one of a device activation event, an account registration event, or an account login event.
[0096] Exemplarily, a device activation event may indicate that the event to be attributed is triggered by the client when the user downloads, installs and opens the application to which the event belongs; an account registration event may indicate that the event to be attributed is triggered by the client when the user registers a new account for the application to which the event belongs; an account login event may indicate that the event to be attributed is triggered by the client when the user logs in to the account of the application to which the event belongs.
[0097] It is understandable that based on the event types of different events to be attributed, an event classification logic matching the corresponding event type can be executed to determine the specific event attribution scope to which the event to be attributed belongs.
[0098] Specifically, according to the event type of the event to be attributed triggered on the client, the event classification logic matching the event type can be obtained for subsequent classification and marking processing.
[0099] Step S404: Mark the event description data according to the event classification logic based on the device usage status and the account usage status to obtain user traffic data.
[0100] Among them, the device usage status can be used to characterize the usage status of the device where the current client is located. Exemplarily, the device usage status may include: the device where the current client is located is a newly activated device, an active device, and a recalled device. The account usage status can be used to characterize the registration, login, and other behavior status of the user account on the client. Exemplarily, the account usage status may include: the account is not logged in, the account is logged in for the first time, the account is registered after the first login, and the account is not logged in for the first time.
[0101] Exemplarily, the specific event classification logic may be determined based on the client device information and user account information in the event description data, thereby performing tagging processing on the event description data.
[0102] For example, when it is determined that the event type of the event to be attributed belongs to a device activation event, the event classification logic can be as follows: if it is determined from the reported event description data that the client is an old device that has not logged in to the user account, the event description data classification mark is marked as "activated-not logged in-old device"; if it is determined from the reported event description data that the client is a new device that has not logged in to the user account, the event description data classification mark is marked as "activated-not logged in-new device".
[0103] Furthermore, based on the tags of the above event description data, the device usage status and account usage status can be known, so as to further determine the event attribution scope of the event to be attributed. For example, if the user traffic data includes the tag of "activated-not logged in-new device", the user traffic data and its corresponding event to be attributed can be processed for customer acquisition, that is, the reason why the platform can obtain this part of new traffic can be explored.
[0104] Specifically, when event description data reported by the client is received, the event classification logic is used to mark the received event description data according to the device usage status and account usage status, thereby obtaining user traffic data containing the determined device usage status and account usage status.
[0105] In one embodiment, if Figure 5 As shown, according to the event classification logic, the event description data is marked according to the device usage status and the account usage status to obtain the user traffic data, including the following steps S502 to S506. Among them:
[0106] Step S502: Obtain historical login records associated with the user account.
[0107] Among them, historical login records can be used to store historical data related to user account login behavior.
[0108] Specifically, historical login records associated with the user account may be read from the database to mark the user's account login status.
[0109] Step S504, determining the device status mark and the account status mark according to the historical login record and event description data.
[0110] Among them, the device status mark is used to represent the device usage status, and the account status mark is used to represent the account usage status.
[0111] Exemplarily, the device status tag labels may include: "new device", "old device", "recalled", "not logged in", "registered" and "active". Among them, the "new device" label may indicate that the client device is a terminal device that has newly downloaded the application to which the event to be attributed belongs; the "old device" label may indicate that the client device is a device that has downloaded and retained the application to which the event to be attributed belongs for a long time; the "recalled" label may indicate that the client device that has been in a dormant state is reactivated; the "active" label may indicate that the client device frequently starts the application to which the event to be attributed belongs; the "not logged in" label may indicate that the client device has not logged in to a specific user account; the "registered" label may indicate that the user registers an account on the client device.
[0112] Exemplarily, the labels of account status marking may include: "new account", "old account", "recalled", "active" and "sub-account". Among them, the "new account" label can represent the latest account logged in after registration, and the "old account" label can represent the user account that has been registered for a period of time; the "recalled" label can represent the return of a user account that has been lost or dormant to the platform; the "active" label can represent the frequent login of the user account to the platform; the "sub-account" label can represent that the user has registered a new account when the device or user account is active.
[0113] Furthermore, the account status mark corresponding to the user flow data can be determined based on the historical login records and event description data of the user account. For example, if it is known from the historical login records that the currently logged-in account has not had other login behaviors in the past two months, it can be determined that the account status mark of the user flow data has a "recall" tag.
[0114] Specifically, based on the historical login records and the event description data pulled from the database, the device status mark and the account status mark can be obtained.
[0115] Step S506, assemble the device status tag and the account status tag according to the event classification logic, and output the user traffic data of the event to be attributed.
[0116] Among them, the device status mark represents the device usage status corresponding to the event to be attributed, and the account status mark represents the account usage status corresponding to the event to be attributed.
[0117] Specifically, by assembling the device status tag and the account status tag, user traffic data containing clear device usage status and account usage status can be output.
[0118] In one embodiment, if Figure 6 As shown, obtaining the historical login records associated with the user account includes the following steps S602 to S604. Among them:
[0119] Step S602: Read the bitmap structure data associated with the user account from the key-value pair database.
[0120] Among them, the bitmap structure data is a binary code of a preset number of bits; the code value corresponding to any code position in the binary code is used to represent whether the user account has login behavior on the target date; the target date is the date corresponding to any code position in the preset statistical period; the preset statistical period matches the preset number of bits.
[0121] Alternatively, the BITFIELD function in the key-value pair database (KVDB) can be used for data storage. It should be noted that BITFIELD is a bitmap structure that can store multiple Boolean values in an integer, thereby saving space and improving query efficiency.
[0122] Specifically, the bitmap structure data associated with the user account may be read based on the BITFIELD of the key-value pair database.
[0123] Step S604, parsing the bitmap structure data to obtain historical login records.
[0124] For example, a bit position can be assigned to each date of the user account's behavior within a preset statistical period. If the user account has a login behavior on a certain date within the preset statistical period, the bit value of the corresponding position will be set to 1; if the user account has no login behavior, the bit value here is 0.
[0125] For example, taking the preset statistical period as 31 days, if the login status of the user account in the past 31 days can be represented in BITFIELD as the following bitmap structure: 001000000100000000000000000000000.
[0126] Specifically, according to the bitmap structure data read from the key-value pair database, the historical login records associated with the user account can be parsed. In the above manner, the historical login records of the user can be quickly read, thereby improving the efficiency of data analysis.
[0127] In one embodiment, if Figure 6 As shown, according to the event attribution logic that matches the event attribution scope, the event to be attributed is classified to determine the media channel category to which the event to be attributed belongs, including the following steps S602 to S604. Among them:
[0128] Step S602, obtaining the traffic generation time of the user traffic data of the event to be attributed.
[0129] The flow generation time of the user flow data may represent the triggering time of the event to be attributed. Optionally, the flow generation time of the user flow data may be cached and transmitted in the form of a timestamp.
[0130] Specifically, after the user traffic data is pulled from the distributed messaging system, the traffic generation time of the user traffic data of the event to be attributed is obtained.
[0131] Step S604, in response to the traffic generation time being within the attribution window period, the event to be attributed is classified according to the event attribution logic that matches the event attribution range, and the media channel category to which the event to be attributed belongs is determined.
[0132] Among them, the attribution window period can be used to determine whether it is necessary to perform traffic attribution operations on the received user traffic data. For example, if the traffic generation time is within the attribution window period, the traffic attribution operation is performed on the received user traffic data, and the event attribution logic matching the event attribution range is executed; if the traffic generation time is outside the attribution window period, the traffic attribution operation is not performed on the received user traffic data for the time being.
[0133] It is understandable that by setting the attribution window period, it is possible to avoid missing some client data that is reported by the client late, thereby improving the accuracy of data analysis. In addition, during the attribution window period, the server can also perform additional data marking on some reported black market data and low-quality data, thereby further improving the reliability of traffic attribution results.
[0134] Exemplarily, the event attribution scope may include a customer acquisition attribution scope and an active attribution scope. Among them, the customer acquisition attribution scope. If the event attribution scope belongs to the customer acquisition attribution scope, the corresponding event attribution logic executed is the customer acquisition attribution logic, and the customer acquisition attribution logic can be used to analyze the reasons why the platform can obtain this part of the client traffic. If the event attribution scope belongs to the active attribution scope, the corresponding event attribution logic executed is the active attribution logic, and the active attribution logic can be used to analyze the reasons why the device or user account corresponding to the client traffic is active.
[0135] The media channel may refer to a channel used to guide and trigger the event to be attributed. For example, the media channel may include one-click activation ads, ad events in the app store, self-attributed ad channels, and ad channels within the window period.
[0136] Specifically, when the acquired traffic generation time is within the attribution window period, the event to be attributed can be classified according to the event attribution logic that matches the event attribution scope, thereby determining the media channel category to which the event to be attributed belongs.
[0137] In some possible implementations, the method further includes:
[0138] In response to the fact that the traffic generation time is not within the attribution window period, the user traffic data is supplemented and corrected.
[0139] For example, for the user traffic data whose traffic generation time is not within the attribution window period, data may be missing, and an offline task can be established on the server to supplement and correct this part of the data.
[0140] For example, the historical data of this part of user traffic data can be supplemented based on the historical login records stored in the KVDB. For another example, the missing part of the user traffic data can be supplemented based on the offline data stored in the cache library in the above embodiment. In the above manner, the present application can reuse this part of user traffic data that is not within the attribution window period, thereby improving data utilization efficiency.
[0141] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figures 7a to 7c The present application is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. The specific implementation methods are as follows:
[0142] In an exemplary embodiment, Figure 7a As shown, if the event type of the event to be attributed is determined to be a device activation event, the following event classification logic steps can be performed:
[0143] Step A1: Determine whether the device where the client that triggers the device activation event is located is a new device. If it is confirmed that the device where the client that triggers the device activation event is located is a new device, the user traffic data corresponding to the device activation event contains a label of "activation-not logged in-new device"; if it is confirmed that the device where the client that triggers the device activation event is located is not a new device, execute step A2;
[0144] Step A2: Determine whether the client device that triggers the device activation event is an old device in which the user account has not been logged in. If it is confirmed that the client device that triggers the device activation event is an old device in which the user account has not been logged in, the user traffic data corresponding to the device activation event contains a label of "Activation-Not logged in-Old device"; if it is confirmed that the client device that triggers the device activation event is not an old device in which the user account has not been logged in, the event classification logic is terminated.
[0145] Furthermore, for user traffic data with the tag "Activated-Not logged in-New device", the corresponding event attribution scope is the customer acquisition attribution scope. For user traffic data with the tag "Activated-Not logged in-Old device", there is no corresponding event attribution scope, that is, traffic attribution processing for these users is not performed.
[0146] In an exemplary embodiment, Figure 7b As shown, if the event type of the event to be attributed is determined to be an account registration event, the following event classification logic steps can be performed:
[0147] Step B1: Determine whether the device where the client that triggers the account registration event is located is an active device. If it is confirmed that the device where the client that triggers the account registration event is located is an active device, the user traffic data corresponding to the account registration event contains a label of "Active-Opening a Second Account"; if it is confirmed that the device where the client that triggers the account registration event is located is not an active device, execute step B2.
[0148] Step B2: Determine whether the triggered account registration event is the first event triggered by the device that day. If it is determined that the account registration event is the first event triggered by the device that day, execute step B3; if it is determined that the account registration event is the first event triggered by the device that day, execute step B4.
[0149] Step B3: Determine whether the device of the client that triggers the account registration event is a new device. If it is determined that the device of the client that triggers the account registration event is a new device, the user traffic data corresponding to the account registration event contains a label of "New User-Registration-New Device"; if it is determined that the device of the client that triggers the account registration event is not a new device, execute step B5.
[0150] Step B4: Determine whether the client device that triggers the account registration event is a new device. If it is confirmed that the client device that triggers the account registration event is a new device, execute step B6; if it is confirmed that the client device that triggers the account registration event is not a new device, execute step B7.
[0151] Step B5: Determine whether the device of the client that triggers the account registration event is an old device that has not logged in. If it is determined that the device of the client that triggers the account registration event is an old device that has not logged in, the label included in the user traffic data corresponding to the account registration event is "attract new users-register-old device"; if it is determined that the device of the client that triggers the account registration event is not an old device that has not logged in, the label included in the user traffic data corresponding to the account registration event is "recall-old device-new account".
[0152] Step B6: Determine the type of the first event triggered by the device on that day. If it is confirmed that the type of the first event triggered on that day is an account registration event, the user flow data corresponding to the account registration event includes a label of "attracting new users - registering - new devices - opening a small account"; if it is confirmed that the type of the first event triggered on that day is an account login event, the user flow data corresponding to the account registration event includes a label of "recalling - registering - new devices - opening a small account".
[0153] Step B7: Determine whether the device of the client that triggers the account registration event is a non-logged-in device. If it is confirmed that the device of the client that triggers the account registration event is a non-logged-in device, the user traffic data corresponding to the account registration event includes a label of "attract new users-register-old device-open a small account"; if it is confirmed that the device of the client that triggers the account registration event is not a non-logged-in device, the user traffic data corresponding to the account registration event includes a label of "recall-register-old device-open a small account".
[0154] Furthermore, for user traffic data containing the tags "attract new users-register-new devices", "attract new users-register-old devices", "recall-old devices-new accounts", "attract new users-register-new devices-open small accounts", "recall-register-new devices-open small accounts", "attract new users-register-old devices-open small accounts", "recall-register-old devices-open small accounts", "attract new users-register-old devices-open small accounts", and "recall-register-old devices-open small accounts", the corresponding event attribution scope is the customer acquisition attribution scope, and the customer acquisition attribution logic needs to be executed on the user traffic data containing the above tags. For user traffic data containing the tag "active-open small accounts", the corresponding event attribution scope is the active attribution scope, and the active attribution logic needs to be executed on the user traffic data containing the above tags.
[0155] In an exemplary embodiment, Figure 7c As shown, if the event type of the event to be attributed is determined to be an account login event, the following event classification logic steps can be performed:
[0156] Step C1: Determine whether the account login event triggered by the client is the first event triggered by the user account that day. If it is determined that the triggered account login event is the first event triggered by the user account that day, execute step C2; otherwise, terminate the execution of the current event classification logic.
[0157] Step C2: Determine whether the account login event triggered by the client is the first event triggered by the device that day. If it is determined that the triggered account login event is the first event triggered by the device that day, execute step C3; otherwise, terminate the execution of the current event classification logic.
[0158] Step C3: Determine whether the user account that triggers the account login event is an active account. If it is confirmed that the user account of the account login event is not an active account, execute step C4; if it is confirmed that the user account of the account login event is an active account, the user traffic data corresponding to the account login event contains a label of "active".
[0159] Step C4: Determine whether the device that triggers the account login event is a new device. If it is confirmed that the device that triggers the account login event is a new device, the user traffic data corresponding to the account login event contains a label of "Recall-New Device-Old Account"; if it is confirmed that the device that triggers the account login event is not a new device, execute step C5.
[0160] Step C5: Determine whether the device that triggers the account login event is an old device that has not logged in. If it is confirmed that the device that triggers the account login event is an old device that has not logged in, the user traffic data corresponding to the account login event contains a label of "Recall-Not Activated-Old Device-Old Account"; if it is confirmed that the device that triggers the account login event is not an old device that has not logged in, execute step C6.
[0161] Step C6: Determine whether the device that triggers the account login event is an active device. If the device that triggers the account login event is confirmed to be not an active device, the label included in the user traffic data corresponding to the account login event is "Recall-Old Device-Old Account"; if the device that triggers the account login event is confirmed to be an active device, the label included in the user traffic data corresponding to the account login event is "Active".
[0162] Furthermore, for user traffic data containing the tags "Recall-New Device-Old Account", "Recall-Unactivated-Old Device-Old Account" and "Recall-Old Device-Old Account", the corresponding event attribution scope is the customer acquisition attribution scope, and the customer acquisition attribution logic needs to be executed on the user traffic data containing the above tags. For user traffic data containing the tag "Active", the corresponding event attribution scope is the active attribution scope, and the active attribution logic needs to be executed on the user traffic data containing the above tags.
[0163] In an exemplary embodiment, if it is determined that the event attribution scope belongs to the customer acquisition attribution scope and the traffic generation time is within the attribution window period, the following event attribution logic steps may be performed:
[0164] It is determined whether the event to be attributed corresponding to the user traffic data matches the advertising event on the client. If the event to be attributed matches the advertising event on the client, it is determined that the media channel category to which the event to be attributed belongs is the advertising channel within the window period.
[0165] In an exemplary embodiment, if it is determined that the event attribution range belongs to the active attribution range and the traffic generation time is within the attribution window period, the following event attribution logic steps may be performed:
[0166] Determine whether the event description data corresponding to the user traffic data reflects the one-click launch behavior of the client. If the event description data reflects the one-click launch behavior of the client, determine that the media channel category to which the event to be attributed belongs is the advertising channel within the window period.
[0167] It can be understood that the above event classification logic and event attribution logic are only one exemplary implementation method. The event classification logic and event attribution logic are not limited to the implementation methods mentioned in the above embodiments. Other possible implementations will not be described here.
[0168] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0169] Based on the same inventive concept, the embodiment of the present application also provides a flow data processing device for implementing the flow data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more flow data processing device embodiments provided below can refer to the limitations of the flow data processing method above, and will not be repeated here.
[0170] In one embodiment, the present application provides a flow data processing device 800, the device 800 comprising:
[0171] The user flow data acquisition module 802 is used to acquire user flow data of the event to be attributed; the user flow data includes device usage status and account usage status; the event to be attributed is an event triggered by the user account on the client;
[0172] An event attribution scope determination module 804 is used to determine the event attribution scope of the event to be attributed according to the device usage status and the account usage status;
[0173] A classification module 806 is used to classify the event to be attributed according to the event attribution logic that matches the event attribution scope, and determine the media channel category to which the event to be attributed belongs;
[0174] The mapping relationship determination module 808 is used to establish a mapping relationship between the event to be attributed and the media channel category, and obtain the event attribution result of the event to be attributed.
[0175] In one embodiment, the user traffic data is pre-cached in a first message queue provided by the distributed message system, and the apparatus 800 further includes:
[0176] An event description data pulling module, used to pull event description data reported by the client in response to the event to be attributed from the second message queue provided by the distributed message system;
[0177] A tag processing module is used to tag the event description data to obtain user traffic data of the event to be attributed;
[0178] The user traffic data sending and caching module is used to send the user traffic data of the event to be attributed to the first message queue for caching.
[0179] In one embodiment, the tag processing module is further configured to:
[0180] Acquire event classification logic that matches the event type of the event to be attributed; wherein the event type of the event to be attributed includes at least one of a device activation event, an account registration event, or an account login event;
[0181] According to the event classification logic, the event description data is marked according to the device usage status and account usage status to obtain user traffic data.
[0182] In one embodiment, the tag processing module is further configured to:
[0183] Get historical login records associated with user accounts;
[0184] Determine the device status mark and account status mark based on historical login records and event description data; the device status mark is used to represent the device usage status, and the account status mark is used to represent the account usage status;
[0185] According to the event classification logic, assemble device status tags and account status tags, and output user traffic data of the event to be attributed.
[0186] In one embodiment, the tag processing module is further configured to:
[0187] The bitmap structure data associated with the user account is read from the key-value pair database; the bitmap structure data is a binary code of a preset number of digits; the code value corresponding to any code position in the binary code is used to indicate whether the user account has a login behavior on the target date; the target date is the date corresponding to any code position in the preset statistical period; the preset statistical period matches the preset number of digits;
[0188] Parse the bitmap structure data to obtain historical login records.
[0189] In one embodiment, the classification module 806 is further configured to:
[0190] Obtain the traffic generation time of the user traffic data of the event to be attributed;
[0191] In response to the traffic generation time being within the attribution window period, the event to be attributed is classified according to the event attribution logic that matches the event attribution scope, and the media channel category to which the event to be attributed belongs is determined;
[0192] In some possible implementations, the apparatus 800 further includes:
[0193] The supplementary correction module is used to supplement and correct the user traffic data in response to the traffic generation time not being within the attribution window period.
[0194] Each module in the above-mentioned flow data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0195] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store user history records, event description data and user traffic data, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a traffic data processing method is implemented.
[0196] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0197] In one embodiment, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods described in the above method embodiments are implemented.
[0198] In one embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any one of the methods described in the above method embodiments are implemented.
[0199] In one embodiment, the present application provides a computer program product, including a computer program, which implements the steps of any one of the methods described in the above method embodiments when the computer program is executed by a processor.
[0200] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0201] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0202] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0203] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A flow data processing method, characterized in that: The method comprises: Obtaining user traffic data of the event to be attributed; the user traffic data includes device usage status and account usage status; the event to be attributed is an event triggered by a user account on a client; Determining an event attribution scope of the event to be attributed according to the device usage status and the account usage status; Classifying the event to be attributed according to the event attribution logic that matches the event attribution scope, and determining the media channel category to which the event to be attributed belongs; A mapping relationship between the event to be attributed and the media channel category is established to obtain an event attribution result of the event to be attributed.
2. The method according to claim 1, characterized in that The user traffic data is pre-cached in a first message queue provided by the distributed message system. Before the step of obtaining the user traffic data of the event to be attributed, the method further includes: Pulling, from a second message queue provided by the distributed messaging system, event description data reported by the client in response to the event to be attributed; Marking the event description data to obtain user traffic data of the event to be attributed; The user traffic data of the event to be attributed is sent to the first message queue for caching.
3. The method according to claim 2, characterized in that The marking process of the event description data to obtain user traffic data of the event to be attributed includes: Acquire an event classification logic that matches the event type of the event to be attributed; wherein the event type of the event to be attributed includes at least one of a device activation event, an account registration event, or an account login event; According to the event classification logic, the event description data is marked according to the device usage status and the account usage status to obtain the user traffic data.
4. The method according to claim 3, characterized in that The step of marking the event description data according to the event classification logic according to the device usage status and the account usage status to obtain user traffic data includes: Obtain historical login records associated with the user account; Determine a device status mark and an account status mark according to the historical login record and the event description data; the device status mark is used to represent the device usage status, and the account status mark is used to represent the account usage status; According to the event classification logic, the device status tag and the account status tag are assembled, and the user traffic data of the event to be attributed is output.
5. The method according to claim 4, characterized in that The obtaining of historical login records associated with the user account includes: The bitmap structure data associated with the user account is read from the key-value pair database; the bitmap structure data is a binary code of a preset number of digits; the code value corresponding to any code position in the binary code is used to indicate whether the user account has a login behavior on a target date; the target date is the date corresponding to any code position in a preset statistical period; the preset statistical period matches the preset number of digits; The bitmap structure data is parsed to obtain the historical login record.
6. The method according to claim 1, characterized in that The classifying the event to be attributed according to the event attribution logic matching the event attribution scope and determining the media channel category to which the event to be attributed belongs includes: Obtaining the traffic generation time of the user traffic data of the event to be attributed; In response to the traffic generation time being within the attribution window period, the event to be attributed is classified according to the event attribution logic matching the event attribution range, and the media channel category to which the event to be attributed belongs is determined; The method further comprises: In response to the traffic generation time not being within the attribution window period, the user traffic data is supplemented and corrected.
7. A flow data processing device, characterized in that: The device comprises: A user traffic data acquisition module is used to acquire user traffic data of the event to be attributed; the user traffic data includes device usage status and account usage status; the event to be attributed is an event triggered by the user on the client; An event attribution scope determination module, used to determine the event attribution scope of the event to be attributed according to the device usage status and the account usage status; A classification module, used to classify the event to be attributed according to the event attribution logic matching the event attribution scope, and determine the media channel category to which the event to be attributed belongs; The mapping relationship determination module is used to establish a mapping relationship between the event to be attributed and the media channel category, and obtain an event attribution result of the event to be attributed.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.