Advertisement attribution method and device
By combining the reception of real-time event data, partition processing and thread processing mechanism in the advertising analysis system, the problems of advertising attribution efficiency and accuracy under the impact of large traffic are solved, and the efficient processing and analysis accuracy of the system is achieved.
Patent Information
- Application Number
- CN202411558260.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-01
AI Technical Summary
When facing the impact of large traffic, the advertising analysis system is difficult to process a large number of requests in a timely manner, resulting in request timeout, data loss and processing errors, affecting the efficiency and accuracy of advertising attribution.
By receiving real-time event data, partitioning operations are performed based on preset partition conditions, multiple consumption tasks are generated, and advertising attribution operations are performed based on thread processing mechanisms, and finally, advertising attribution results are stored through batch service.
It realizes efficient processing of the advertising analysis system under the impact of large traffic, improves the efficiency and accuracy of advertising attribution, and thus improves the analysis accuracy of advertising delivery results.
Smart Images

Figure CN119648301A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to an advertising attribution method and device. Background Art
[0002] Advertising attribution helps companies optimize their advertising strategies and improve advertising effectiveness and return on investment by identifying the contribution of each advertising touchpoint (such as clicking on ads, browsing web pages, etc.) to user conversion behavior.
[0003] In practical applications, advertising attribution needs to process a large amount of real-time data. However, when advertising-related traffic surges, the advertising analysis system needs to cope with the impact of large traffic. If the system does not have the ability to process a large number of requests in a timely manner, it is easy to cause problems such as request timeouts, data loss, and processing errors, which will affect the efficiency and accuracy of advertising attribution.
[0004] Therefore, it is particularly important to propose a technical solution that can enable the advertising analysis system to efficiently cope with large traffic impacts, thereby improving the efficiency and accuracy of advertising attribution and improving the accuracy of analysis of advertising delivery effects. Summary of the invention
[0005] The present invention provides an advertising attribution method and device, which can enable an advertising analysis system to efficiently cope with large traffic impacts, thereby improving the efficiency and accuracy of advertising attribution, which is conducive to improving the accuracy of analysis of advertising delivery effects.
[0006] In order to solve the above technical problems, the first aspect of the present invention discloses an advertising attribution method, which is applied to an advertising analysis system and includes:
[0007] Receiving real-time event data reported through an advertising attribution service interface; the real-time event data includes a plurality of message events;
[0008] Based on a preset partitioning condition, a partitioning operation is performed on the real-time event data to obtain a plurality of consumption tasks; each of the consumption tasks includes at least one of the message events;
[0009] Based on a preset thread processing mechanism, an advertising attribution operation is performed on each of the consumption tasks to obtain an advertising attribution result corresponding to each of the consumption tasks;
[0010] Based on the preset batch collection service, all the advertising attribution results are stored in the target database corresponding to the advertising analysis system.
[0011] As an optional implementation, in the first aspect of the present invention, before performing the advertising attribution operation on each of the consumption tasks based on the preset thread processing mechanism to obtain the advertising attribution result corresponding to each of the consumption tasks, the method further includes:
[0012] Based on the reporting time sequence of each of the message events in the real-time event data, sequentially create a linked list node corresponding to each of the message events, and sequentially insert the linked list node corresponding to each of the message events into the event linked list corresponding to the advertising analysis system;
[0013] Wherein, the linked list node corresponding to each of the message events includes each of the message events and a processing status identifier corresponding to the message event; and, when each of the linked list nodes is recorded in the event linked list, the processing status identifier of each of the message events is an unprocessed status identifier;
[0014] Furthermore, in the process of performing an advertising attribution operation on each of the consumption tasks based on the preset thread processing mechanism to obtain an advertising attribution result corresponding to each of the consumption tasks, the method further includes:
[0015] After detecting that the advertisement attribution operation is completed for any of the message events, in the event chain list, the processing status identifier corresponding to the message event is modified to a processed status identifier.
[0016] As an optional implementation manner, in the first aspect of the present invention, the event linked list is provided with an ACK position; and the method further includes:
[0017] Based on the determined scanning order corresponding to the event linked list, sequentially read the processing status identifier of each linked list node in the event linked list until the processing status identifier of the linked list node currently read is the unprocessed status identifier, and determine the linked list node corresponding to the linked list node with the first reading order as the target node;
[0018] Determine the node position information corresponding to the target node as the ACK position corresponding to the event linked list; the ACK position is used to indicate that the node position indicated by the ACK position and all the message events corresponding to the node position before the node position have been processed;
[0019] When a processing status inquiry request about the event link list is detected, ACK response information corresponding to the processing status inquiry request is generated according to the ACK position, and the ACK response information is fed back to the initiator of the processing status inquiry request.
[0020] As an optional implementation, in the first aspect of the present invention, the step of performing an advertising attribution operation on each of the consumption tasks based on a preset thread processing mechanism to obtain an advertising attribution result corresponding to each of the consumption tasks includes:
[0021] Based on the task scheduling mechanism corresponding to the advertising analysis system, each of the consumption tasks is respectively scheduled to a thread pool matching the consumption task;
[0022] For each of the thread pools, determine the event processing logic corresponding to each of the message events in the consumer tasks that the thread pool needs to process;
[0023] For each of the thread pools, according to the event processing logic corresponding to each of the message events in the consumption task that the thread pool needs to process, an advertising attribution operation is performed on the consumption task to obtain an advertising attribution result corresponding to the consumption task.
[0024] As an optional implementation, in the first aspect of the present invention, the task scheduling mechanism corresponding to the advertising analysis system is based on which each of the consumption tasks is respectively scheduled to a thread pool matching the consumption task, including:
[0025] Obtaining a scheduling identification type preset by a task scheduler corresponding to the advertisement analysis system;
[0026] According to the scheduling identifier type, obtaining the scheduling identifier corresponding to each of the consumption tasks;
[0027] According to the scheduling identifier corresponding to each of the consumption tasks, each of the consumption tasks is hashed and distributed, so as to schedule each of the consumption tasks to a thread pool that matches the scheduling identifier corresponding to the consumption task.
[0028] As an optional implementation, in the first aspect of the present invention, for each of the thread pools, the event processing logic corresponding to each of the message events in the consumer tasks to be processed by the thread pool is determined, including:
[0029] Parse each of the message events in the consumption tasks that the thread pool needs to process, and obtain an event type identifier corresponding to each of the message events;
[0030] According to the event type identifier corresponding to each of the message events, determine the event processing logic corresponding to the message event by the thread pool;
[0031] And, for each of the thread pools, the event processing logic corresponding to each of the message events in the consumption task to be processed by the thread pool performs an advertising attribution operation on the consumption task to obtain an advertising attribution result corresponding to the consumption task, including:
[0032] According to the event processing logic corresponding to each of the message events in the consumption task to be processed by the thread pool, obtaining attribution analysis information corresponding to the consumption task; the attribution analysis information includes one or more combinations of reporting device information corresponding to each of the message events, reporting account information corresponding to each of the message events, and advertising information corresponding to each of the message events;
[0033] According to the event processing logic and the attribution analysis information, an advertising attribution operation is performed on each of the message events in the consumption task to obtain an event attribution result corresponding to each of the message events in the consumption task; wherein each of the consumption tasks includes the event attribution results corresponding to all of the message events included in the consumption task.
[0034] As an optional implementation, in the first aspect of the present invention, the preset batching service stores all the advertising attribution results in a target database corresponding to the advertising analysis system, including:
[0035] Based on the preset batch collection service, each of the advertising attribution results is temporarily stored in the system memory corresponding to the advertising analysis system;
[0036] Detecting whether the amount of data of the advertising attribution results temporarily stored in the system memory is greater than or equal to a preset batch processing amount;
[0037] When it is detected that the data quantity of the advertising attribution results temporarily stored in the system memory is greater than or equal to the batch processing quantity, all the advertising attribution results temporarily stored in the system memory are written to the target database corresponding to the advertising analysis system.
[0038] A second aspect of the present invention discloses an advertising attribution device, which is applied to an advertising analysis system and includes:
[0039] A receiving module, configured to receive real-time event data reported through an advertising attribution service interface; the real-time event data includes a plurality of message events;
[0040] A partitioning module, used to perform a partitioning operation on the real-time event data based on a preset partitioning condition to obtain a plurality of consumption tasks; each of the consumption tasks includes at least one of the message events;
[0041] An attribution module, configured to perform an advertising attribution operation on each of the consumption tasks based on a preset thread processing mechanism, and obtain an advertising attribution result corresponding to each of the consumption tasks;
[0042] The storage module is used to store all the advertising attribution results in the target database corresponding to the advertising analysis system based on the preset batch collection service.
[0043] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0044] A node creation module, used for, in the attribution module, performing an advertising attribution operation on each of the consumption tasks based on a preset thread processing mechanism, and before obtaining the advertising attribution result corresponding to each of the consumption tasks, creating a linked list node corresponding to each of the message events in the real-time event data in sequence based on the reporting time sequence of each of the message events;
[0045] A data insertion module, used to insert the linked list nodes corresponding to each of the message events into the event linked list corresponding to the advertisement analysis system in sequence;
[0046] Wherein, the linked list node corresponding to each of the message events includes each of the message events and a processing status identifier corresponding to the message event; and, when each of the linked list nodes is recorded in the event linked list, the processing status identifier of each of the message events is an unprocessed status identifier;
[0047] And, the device also includes:
[0048] A modification module is used to perform an advertising attribution operation on each of the consumption tasks based on a preset thread processing mechanism in the attribution module, and in the process of obtaining the advertising attribution results corresponding to each of the consumption tasks, after detecting that the advertising attribution operation is completed for any of the message events, modify the processing status identifier corresponding to the message event in the event chain list to a processed status identifier.
[0049] As an optional implementation manner, in the second aspect of the present invention, the event chain table is provided with an ACK position; and the device further includes:
[0050] A reading module, configured to read the processing status identifier of each of the linked list nodes in the event linked list in sequence based on the determined scanning order corresponding to the event linked list, until the processing status identifier of the linked list node currently read is the unprocessed status identifier, and determine the linked list node corresponding to the linked list node with the first reading order as the target node;
[0051] A determination module, used to determine the node position information corresponding to the target node as the ACK position corresponding to the event linked list; the ACK position is used to indicate that the node position indicated by the ACK position and all the message events corresponding to the node position before the node position have been processed;
[0052] The response module is used to generate ACK response information corresponding to the processing status inquiry request according to the ACK position when detecting the existence of a processing status inquiry request about the event link list, and feed back the ACK response information to the initiator of the processing status inquiry request.
[0053] As an optional implementation, in the second aspect of the present invention, the attribution module performs an advertising attribution operation on each of the consumption tasks based on a preset thread processing mechanism, and the specific manner of obtaining the advertising attribution result corresponding to each of the consumption tasks includes:
[0054] Based on the task scheduling mechanism corresponding to the advertising analysis system, each of the consumption tasks is respectively scheduled to a thread pool matching the consumption task;
[0055] For each of the thread pools, determine the event processing logic corresponding to each of the message events in the consumer tasks that the thread pool needs to process;
[0056] For each of the thread pools, according to the event processing logic corresponding to each of the message events in the consumption task that the thread pool needs to process, an advertising attribution operation is performed on the consumption task to obtain an advertising attribution result corresponding to the consumption task.
[0057] As an optional implementation, in the second aspect of the present invention, the attribution module schedules each of the consumption tasks to a thread pool matching the consumption task based on the task scheduling mechanism corresponding to the advertising analysis system, including:
[0058] Obtaining a scheduling identification type preset by a task scheduler corresponding to the advertisement analysis system;
[0059] According to the scheduling identifier type, obtaining the scheduling identifier corresponding to each of the consumption tasks;
[0060] According to the scheduling identifier corresponding to each of the consumption tasks, each of the consumption tasks is hashed and distributed, so as to schedule each of the consumption tasks to a thread pool that matches the scheduling identifier corresponding to the consumption task.
[0061] As an optional implementation, in the second aspect of the present invention, for each of the thread pools, the attribution module determines the specific manner in which the event processing logic corresponding to each of the message events in the consumer task to be processed by the thread pool includes:
[0062] Parse each of the message events in the consumption tasks that the thread pool needs to process, and obtain an event type identifier corresponding to each of the message events;
[0063] According to the event type identifier corresponding to each of the message events, determine the event processing logic corresponding to the message event by the thread pool;
[0064] And, for each of the thread pools, the attribution module performs an advertising attribution operation on the consumption task according to the event processing logic corresponding to each of the message events in the consumption task that the thread pool needs to process, and the specific method of obtaining the advertising attribution result corresponding to the consumption task includes:
[0065] According to the event processing logic corresponding to each of the message events in the consumption task to be processed by the thread pool, obtaining attribution analysis information corresponding to the consumption task; the attribution analysis information includes one or more combinations of reporting device information corresponding to each of the message events, reporting account information corresponding to each of the message events, and advertising information corresponding to each of the message events;
[0066] According to the event processing logic and the attribution analysis information, an advertising attribution operation is performed on each of the message events in the consumption task to obtain an event attribution result corresponding to each of the message events in the consumption task; wherein each of the consumption tasks includes the event attribution results corresponding to all of the message events included in the consumption task.
[0067] As an optional implementation, in the second aspect of the present invention, the storage module stores all the advertising attribution results in the target database corresponding to the advertising analysis system based on the preset batch collection service, and the specific manner includes:
[0068] Based on the preset batch collection service, each of the advertising attribution results is temporarily stored in the system memory corresponding to the advertising analysis system;
[0069] Detecting whether the amount of data of the advertising attribution results temporarily stored in the system memory is greater than or equal to a preset batch processing amount;
[0070] When it is detected that the data quantity of the advertising attribution results temporarily stored in the system memory is greater than or equal to the batch processing quantity, all the advertising attribution results temporarily stored in the system memory are written to the target database corresponding to the advertising analysis system.
[0071] A third aspect of the present invention discloses another advertising attribution device, the device comprising:
[0072] A memory storing executable program code;
[0073] a processor coupled to the memory;
[0074] The processor calls the executable program code stored in the memory to execute part or all of the steps of the advertising attribution method disclosed in the first aspect of the present invention.
[0075] A fourth aspect of the present invention discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute part or all of the steps of the advertising attribution method disclosed in the first aspect of the present invention.
[0076] Compared with the prior art, the present invention has the following beneficial effects:
[0077] In the present invention, real-time event data reported through an advertising attribution service interface is received; the real-time event data includes multiple message events; based on preset partitioning conditions, a partitioning operation is performed on the real-time event data to obtain multiple consumption tasks; each consumption task includes at least one message event; based on a preset thread processing mechanism, an advertising attribution operation is performed on each consumption task to obtain an advertising attribution result corresponding to each consumption task; based on a preset batching service, all advertising attribution results are stored in a target database corresponding to the advertising analysis system. It can be seen that the implementation of the present invention can first receive the real-time event data reported through the advertising attribution service interface, and then partition the real-time event data based on the partitioning conditions, divide multiple consumption tasks, and then based on the thread processing mechanism, perform advertising attribution on each consumption task to obtain the corresponding advertising attribution result, and then store the advertising attribution result in the corresponding database through the batch service. It can achieve load balancing through partitioning operations, effectively divert message events, and process message events through a multi-threaded processing mode, which can improve the utilization rate of CPU performance, thereby improving throughput, so that the advertising analysis system can efficiently respond to large traffic impacts, which is beneficial to improving the stability and reliability of the advertising analysis system. At the same time, it can also improve the processing efficiency of consumption events by orderly processing consumption events, thereby improving the efficiency and accuracy of advertising attribution, which is beneficial to improving the analysis efficiency and accuracy of advertising delivery effects, and thus is beneficial to helping enterprises optimize advertising delivery strategies. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0079] Figure 1 It is a flowchart of an advertising attribution method disclosed in an embodiment of the present invention;
[0080] Figure 2It is a flowchart of another advertising attribution method disclosed in an embodiment of the present invention;
[0081] Figure 3 It is a flowchart of another advertising attribution method disclosed in an embodiment of the present invention;
[0082] Figure 4 It is a structural schematic diagram of an advertising attribution device disclosed in an embodiment of the present invention;
[0083] Figure 5 is a structural schematic diagram of another advertising attribution device disclosed in an embodiment of the present invention;
[0084] Figure 6 It is a structural schematic diagram of another advertising attribution device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0085] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0086] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.
[0087] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0088] The present invention discloses an advertising attribution method and device, which can first receive the real-time event data reported by the advertising attribution service interface, and then partition the real-time event data based on the partition condition, divide the mentor into multiple consumption tasks, and then perform advertising attribution on each consumption task based on the thread processing mechanism to obtain the corresponding advertising attribution result, and then store the advertising attribution result in the corresponding database through the batch service, and can realize load balancing through partition operation, effectively divert message events, and process message events through multi-threaded processing mode, which can improve the utilization rate of CPU performance, thereby improving throughput, so that the advertising analysis system can efficiently respond to large traffic impacts, thereby helping to improve the stability and reliability of the advertising analysis system, and at the same time, it can also improve the processing efficiency of consumption events by orderly processing consumption events, thereby improving the efficiency and accuracy of advertising attribution, thereby helping to improve the analysis efficiency and accuracy of advertising delivery effects, thereby helping to help enterprises optimize advertising delivery strategies. The following are detailed descriptions.
[0089] Embodiment 1
[0090] See also Figure 1 , Figure 1 : is a flow chart of an advertising attribution method disclosed in an embodiment of the present invention. Figure 1 The described advertising attribution method can be applied to an advertising attribution device, which may include an advertising attribution terminal, an advertising attribution device, an advertising attribution system, and a server, wherein the server may include a local server or a cloud server, which is not limited in the embodiments of the present invention; the method can also be applied to an advertising analysis system, and further, the advertising analysis system can be used to analyze advertising services, which is not limited in the embodiments of the present invention. Figure 1 As shown, the advertising attribution method may include the following operations:
[0091] 101. Receive real-time event data reported through an advertising attribution service interface.
[0092] In an embodiment of the present invention, real-time event data may include multiple message events; further, the real-time event data reported by the advertising attribution service interface may include message events reported by multiple terminals through the above-mentioned advertising attribution service interface, which is not limited in the embodiment of the present invention; further optionally, when the terminal reports the message event, a corresponding event type identifier may be set for each message event, and further optionally, the event type identifier may include a combination of one or more of a registration event type identifier, a login event type identifier, a click event type identifier, a browsing event type identifier, a close event type identifier, and a purchase event type identifier, and may also include other event type identifiers related to advertising services, which is not limited in the embodiment of the present invention; illustratively, Figure 3is a flow chart of another advertising attribution method disclosed in an embodiment of the present invention, such as Figure 3 As shown, the real-time event data may include message events from terminal A and terminal B (eg, registration event A, login event A), which is not limited in the embodiment of the present invention.
[0093] 102. Based on a preset partitioning condition, a partitioning operation is performed on the real-time event data to obtain multiple consumption tasks.
[0094] In an embodiment of the present invention, each consumption task includes at least one message event. The above partitioning operation may belong to a load balancing technology; optionally, step 102 may be specifically as follows: obtaining the real-time usage of multiple processing units in the advertising analysis system, and balancing the real-time event data to different processing units according to the real-time usage of the processing units, so as to partition the real-time event data, obtain the grouped data corresponding to the multiple processing units, and determine each group of partitioned data as a consumption task, which is not limited by the embodiment of the present invention; wherein the processing unit may be a computing unit capable of attributing advertising to message events, such as a server, which is not limited by the embodiment of the present invention.
[0095] In the embodiment of the present invention, as another optional implementation, optionally, a partition operation can be performed on the real-time event data through a message delivery system corresponding to the advertising analysis system to obtain multiple consumption tasks, where, for example, Figure 5 As shown, the message transmission system may be a Kafka system, which is not limited in the embodiment of the present invention.
[0096] 103. Based on the preset thread processing mechanism, an advertising attribution operation is performed on each consumption task to obtain an advertising attribution result corresponding to each consumption task.
[0097] In an embodiment of the present invention, the advertising attribution result may be an analysis result of the advertising business of the user of the reporting terminal corresponding to each message event in each consumption task; wherein, optionally, the advertising attribution result corresponding to each consumption task may include a combination of one or more of the advertising attribution attribute corresponding to each message event, advertising delivery data, user behavior data and conversion data, which is not limited in the embodiment of the present invention.
[0098] 104. Based on the preset batch collection service, all advertising attribution results are stored in the target database corresponding to the advertising analysis system.
[0099] In the embodiment of the present invention, the target database corresponding to the advertising analysis system can be used to record advertising attribution results, and can also be used to record preset advertising information (such as advertising channel information), which is not limited in the embodiment of the present invention.
[0100] It can be seen that the method described in the embodiment of the present invention can first receive the real-time event data reported by the advertising attribution service interface, and then partition the real-time event data based on the partitioning conditions, divide multiple consumption tasks, and then perform advertising attribution on each consumption task based on the thread processing mechanism to obtain the corresponding advertising attribution result, and then store the advertising attribution result in the corresponding database through the batch service. It can achieve load balancing through partitioning operations, effectively divert message events, and process message events through a multi-threaded processing mode, which can improve the utilization of CPU performance and thus improve throughput, so that the advertising analysis system can efficiently respond to large traffic impacts, thereby helping to improve the stability and reliability of the advertising analysis system. At the same time, it can also improve the processing efficiency of consumption events by orderly processing consumption events, thereby improving the efficiency and accuracy of advertising attribution, which is conducive to improving the analysis efficiency and accuracy of advertising delivery effects, and thus helping to help enterprises optimize advertising delivery strategies.
[0101] In an optional embodiment, before performing the advertising attribution operation on each consumption task based on a preset thread processing mechanism to obtain the advertising attribution result corresponding to each consumption task, the method may further include the following operations:
[0102] Based on the reporting time sequence of each message event in the real-time event data, a linked list node corresponding to each message event is created in sequence, and the linked list node corresponding to each message event is inserted into the event linked list corresponding to the advertising analysis system in sequence;
[0103] The linked list node corresponding to each message event includes each message event and a processing status identifier corresponding to the message event; and when each linked list node is recorded in the event linked list, the processing status identifier of each message event is an unprocessed status identifier.
[0104] Among them, optionally, the event linked list corresponding to the advertising analysis system can be an event linked list corresponding to the current advertising business in the advertising analysis system, which is not limited in the embodiments of the present invention; further, the event linked list can be a linear linked list, which is not limited in the embodiments of the present invention.
[0105] For example, Figure 5 As shown, before the message event enters the thread pool, the message event can be first added to the linked list, where Figure 5 The event chain table shown may include events 1-5 and five chain table nodes corresponding to the processing status identifiers of each event, wherein the processing status identifiers may be as follows: Figure 5 "Processing Y" or "Processing N" is shown, "Processing Y" is a processed state identifier, and "Processing N" is an unprocessed state identifier; when a linked list node is inserted into an event linked list, the processing state identifier of the linked list node is defaulted to "Processing N", which is not limited in the embodiment of the present invention.
[0106] It can be seen that this optional embodiment can create a linked list node corresponding to each message event based on the event reporting time order and insert the linked list node containing the message event and the corresponding processing status identifier into the event linked list. By setting the event linked list and recording the processing status of the event, it is possible to record the message events in an orderly manner while ensuring that all received message events in the multi-threaded processing mode will not be lost or omitted during the processing process, thereby improving the recording accuracy and reliability of the message events, and further facilitating improving the reliability of the attribution processing process for each message event.
[0107] In this optional embodiment, optionally, in the process of performing the advertising attribution operation on each consumption task based on the preset thread processing mechanism to obtain the advertising attribution result corresponding to each consumption task, the method may further include the following operations:
[0108] After detecting that the advertisement attribution operation for any message event is completed, in the event chain list, the processing status identifier corresponding to the message event is modified to a processed status identifier.
[0109] For example, Figure 5 As shown, if it is detected that the advertising attribution operation for event 4 has been completed, the processing status identifier of event 4 is modified to "processing Y", which is not limited in this embodiment of the present invention.
[0110] It can be seen that this optional embodiment can also modify the processing status identifier corresponding to any message event to a processed status identifier after detecting that the advertising attribution operation for any message event has been executed, and can timely update the processing status of the message event in the event chain list, thereby further improving the recording accuracy and timeliness of the message event, and facilitating more efficient management of the message event processing through the event chain list.
[0111] In this optional embodiment, optionally, the event list is provided with an ACK position; and the method may further include the following operations:
[0112] Based on the determined scanning order corresponding to the event linked list, the processing status identifier of each linked list node in the event linked list is read in sequence until the processing status identifier of the currently read linked list node is an unprocessed status identifier, and the linked list node corresponding to the linked list node with the first reading order is determined as the target node;
[0113] The node position information corresponding to the target node is determined as the ACK position corresponding to the event linked list; the ACK position is used to indicate that the node position indicated by the ACK position and all message events corresponding to the node position before the node position have been processed;
[0114] When it is detected that there is a processing status inquiry request about the event link list, ACK response information corresponding to the processing status inquiry request is generated according to the ACK position, and the ACK response information is fed back to the initiator of the processing status inquiry request.
[0115] Among them, illustratively, when the event linked list is a linear linked list, the above scanning order can be scanned from the head to the end of the table; when the event linked list is a non-linear linked list, the above scanning order can be determined by the developer, and the embodiment of the present invention does not limit it.
[0116] The ACK (Acknowledge character) response information at least includes the above-mentioned ACK position, and may also include other information that needs to be responded to, which is not limited in the embodiment of the present invention.
[0117] It should be noted that, since the advertising attribution method adopts a multi-threaded processing mode, multiple message events may be processed at the same time, but the time to complete the advertising attribution operation for each message event may be different and in a certain order. In this case, for example, the following may occur: Figure 5 The event chain status shown is: the processing status identifiers of event 1 to event 5 are YYNYN in sequence, then Figure 5 The linked list node corresponding to event 2 in is the target node, not the linked list node corresponding to event 4. That is, the ACK position of the event linked list at this time points to the linked list node corresponding to event 2, that is, the ACK position is equivalent to Figure 5 The ACK position in the event 2 can be used to indicate that all events before event 2 and including event 2 itself have been processed, thereby performing an ACK response to ensure that the reported message event will not be lost / omitted.
[0118] It can be seen that this optional embodiment can also read the processing status identifier of each linked list node in the event linked list in sequence based on the scanning order, until the currently read processing status identifier is an unprocessed status identifier, and determine the linked list node corresponding to the linked list node with a previous reading order as the target node, and then determine the ACK position based on the node position information of the target node to indicate that the node position indicated by the ACK position and all message events corresponding to the node position before the node position have been processed. If a processing status inquiry request is detected, ACK response information is generated according to the ACK position to feed back the response information to the request initiator. By recording the ACK position, the recording accuracy and flexibility of the event processing status in the event linked list can be improved, which is beneficial to improving the feedback efficiency and feedback accuracy of the inquiry request, and can further ensure that the message event will not be lost or omitted during the processing process, which is beneficial to improving the reliability of the process of attribution processing for each message event.
[0119] In another optional embodiment, the advertising analysis system can be deployed based on k8s (Kubernetes) containerization technology. In this way, based on containerization technology, rapid horizontal expansion in seconds can be achieved in practice, enabling the advertising analysis system to more efficiently cope with large traffic shocks, thereby improving advertising attribution efficiency.
[0120] In another optional embodiment, the advertisement analysis system can be developed based on the Golang language, which is not limited in the embodiment of the present invention. This enables the advertisement analysis system to have high performance, easy to read, and easy to use.
[0121] Embodiment 2
[0122] See also Figure 2 , Figure 2 : is a flow chart of an advertising attribution method disclosed in an embodiment of the present invention. Figure 2 The described advertising attribution method can be applied to an advertising attribution device, which may include an advertising attribution terminal, an advertising attribution device, an advertising attribution system, and a server, wherein the server may include a local server or a cloud server, which is not limited in the embodiments of the present invention; the method can also be applied to an advertising analysis system, and further, the advertising analysis system can be used to analyze advertising services, which is not limited in the embodiments of the present invention. Figure 2 As shown, the advertising attribution method may include the following operations:
[0123] 201. Receive real-time event data reported through an advertising attribution service interface.
[0124] In the embodiment of the present invention, the real-time event data includes a plurality of message events.
[0125] 202. Based on a preset partitioning condition, a partitioning operation is performed on the real-time event data to obtain a plurality of consumption tasks.
[0126] In the embodiment of the present invention, each consumption task includes at least one message event.
[0127] 203. Based on the task scheduling mechanism corresponding to the advertising analysis system, each consumption task is scheduled to a thread pool matching the consumption task.
[0128] In the embodiment of the present invention, Figure 5 As shown, each thread pool can process multiple threads, that is, can process multiple consumption tasks, which is not limited in the embodiment of the present invention.
[0129] 204. For each thread pool, determine the event processing logic corresponding to each message event in the consumption task that the thread pool needs to process.
[0130] In the embodiment of the present invention, illustratively, the event processing logic may be code logic or event processing flow logic, which is not limited in the embodiment of the present invention.
[0131] 205. For each thread pool, according to the event processing logic corresponding to each message event in the consumption task that needs to be processed by the thread pool, an advertising attribution operation is performed on the consumption task to obtain the advertising attribution result corresponding to the consumption task.
[0132] 206. Based on the preset batching service, all advertising attribution results are stored in the target database corresponding to the advertising analysis system.
[0133] In the embodiment of the present invention, for other detailed descriptions of step 201-step 202 and step 206, please refer to the detailed description of step 101-step 102 and step 104 in the first embodiment, and the embodiment of the present invention will not be repeated here.
[0134] It can be seen that the method described in the embodiment of the present invention can first receive the real-time event data reported by the advertising attribution service interface, and then partition the real-time event data based on the partitioning conditions, divide multiple consumption tasks, and then perform advertising attribution on each consumption task based on the thread processing mechanism to obtain the corresponding advertising attribution result, and then store the advertising attribution result in the corresponding database through the batch service. It can achieve load balancing through partitioning operations, effectively divert message events, and process message events through a multi-threaded processing mode, which can improve the utilization of CPU performance and thus improve throughput, so that the advertising analysis system can efficiently respond to large traffic impacts, thereby helping to improve the stability and reliability of the advertising analysis system. At the same time, it can also improve the processing efficiency of consumption events by orderly processing consumption events, thereby improving the efficiency and accuracy of advertising attribution, which is conducive to improving the analysis efficiency and accuracy of advertising delivery effects, and thus helping to help enterprises optimize advertising delivery strategies. In addition, based on the task scheduling mechanism, each consumption task can be scheduled to a thread pool that matches the task, and then the event processing logic corresponding to each message event can be determined respectively. Then, based on the event processing logic corresponding to each message event, the advertising attribution operation is performed on the consumption task to obtain the advertising attribution result. On the basis of improving the scheduling accuracy of consumption tasks, the multi-threaded processing efficiency and processing accuracy for message events can be improved, which is conducive to further improving the advertising attribution efficiency and accuracy for consumption events.
[0135] In an optional embodiment, based on the task scheduling mechanism corresponding to the advertisement analysis system, each consumption task is respectively scheduled to a thread pool matching the consumption task, which may include the following operations:
[0136] Obtaining the scheduling identification type preset by the task scheduler corresponding to the advertising analysis system;
[0137] According to the scheduling identifier type, obtain the scheduling identifier corresponding to each consumer task;
[0138] According to the scheduling identifier corresponding to each consumption task, each consumption task is hashed and distributed, so as to schedule each consumption task to a thread pool matching the scheduling identifier corresponding to the consumption task.
[0139] Among them, optionally, the scheduling identification type may include a combination of one or more of the device identification type of the reporting device corresponding to the message event (such as: device code), the user identification type of the account logged in by the reporting device corresponding to the message event (such as: user ID), and the advertising channel identification type corresponding to the message event. It may also include other identification types that can be used to distinguish message events in consumption tasks, which is not limited by the embodiments of the present invention.
[0140] It can be seen that this optional embodiment can obtain the scheduling identifier corresponding to each consumption task according to the scheduling identifier type preset by the acquired task scheduler, and then hash distribute each consumption task according to the scheduling identifier corresponding to each consumption task, so as to schedule each consumption task to the thread pool that matches the scheduling identifier corresponding to the consumption task, which can improve the scheduling accuracy of consumption tasks and message events, thereby facilitating the allocation of message events to a more suitable thread pool, and further facilitating more targeted processing of message events, and facilitating further improving the advertising attribution efficiency and accuracy for consumption events.
[0141] In another optional embodiment, for each thread pool, determining the event processing logic corresponding to each message event in the consumer task that the thread pool needs to process may include the following operations:
[0142] Parse each message event in the consumption task that the thread pool needs to process, and obtain the event type identifier corresponding to each message event;
[0143] According to the event type identifier corresponding to each message event, the event processing logic corresponding to the message event of the thread pool is determined.
[0144] For example, Figure 5 As shown, the event type identifier corresponding to each message event obtained by parsing each message event may be a registration event type identifier or a login event type identifier, and then the corresponding event processing logic is determined according to the above event type identifier.
[0145] It can be seen that this optional embodiment can determine the event processing logic corresponding to the message event based on the event type identifier corresponding to each message event obtained through analysis, which can improve the accuracy of the analysis of the message event, thereby improving the accuracy of determining the event processing logic corresponding to the message event, and further facilitating the accuracy of advertising attribution for consumption events.
[0146] In this optional embodiment, optionally, for each thread pool, according to the event processing logic corresponding to each message event in the consumption task that needs to be processed by the thread pool, an advertising attribution operation is performed on the consumption task to obtain the advertising attribution result corresponding to the consumption task, which may include the following operations:
[0147] According to the event processing logic corresponding to each message event in the consumption task to be processed by the thread pool, the attribution analysis information corresponding to the consumption task is obtained; the attribution analysis information includes one or more combinations of reporting device information corresponding to each message event, reporting account information corresponding to each message event, and advertising information corresponding to each message event;
[0148] According to the event processing logic and attribution analysis information, an advertising attribution operation is performed on each message event in the consumption task to obtain an event attribution result corresponding to each message event in the consumption task; wherein each consumption task includes the event attribution results corresponding to all message events included in the consumption task.
[0149] It can be seen that this optional embodiment can also obtain attribution analysis information according to the event processing logic, and then perform advertising attribution on the message event according to the event processing logic and the attribution analysis information, which can further improve the accuracy of advertising attribution for consumption events, thereby helping to improve the accuracy of advertising attribution results.
[0150] In this optional embodiment, optionally, for each thread pool, according to the event processing logic and attribution analysis information, an advertising attribution operation is performed on each message event in the consumption task to obtain an event attribution result corresponding to each message event in the consumption task, which may include the following operations:
[0151] Obtain reference analysis information required by the thread pool from the target database corresponding to the advertising analysis system;
[0152] Compare the attribution analysis information and the reference analysis information to obtain information comparison results;
[0153] According to the event processing logic and the information comparison result, an advertising attribution operation is performed on each message event in the consumption task to obtain an event attribution result corresponding to each message event in the consumption task.
[0154] It can be seen that this optional embodiment can also obtain reference analysis information to compare the attribution analysis information with the reference analysis information to obtain information comparison results, and then combine the information comparison results to attribute advertising to message events, thereby further improving the accuracy of advertising attribution for consumer events.
[0155] Optionally, the method may further include the following operations:
[0156] Based on all event processing logic, determine the key reference information commonly needed for advertising attribution operations in the advertising analysis system for the current advertising business;
[0157] Based on the preset thread processing mechanism, the advertising attribution operation is performed on each consumption task. Before obtaining the advertising attribution result corresponding to each consumption task, all key reference information is obtained from the target data corresponding to the advertising analysis system, and all the above key reference information is cached locally.
[0158] Among them, there may be an intersection between the above-mentioned reference analysis information and the key reference information. When there is an intersection, the corresponding key reference information can be directly read from the local cache as the reference analysis information without accessing the database multiple times. For example, if each message event in the current advertising business needs to obtain the advertising channel information in the target database for advertising attribution processing, the advertising channel information can be cached locally in advance, which is not limited in the embodiment of the present invention.
[0159] It can be seen that this optional embodiment can also process the key reference information required for the current advertising business by pre-caching locally, so that there is no need to frequently obtain this necessary information from the database, thereby reducing the network bandwidth usage and database access frequency, which is beneficial to improving the efficiency of consumer event processing.
[0160] In another optional embodiment, based on a preset batch collection service, storing all advertising attribution results in a target database corresponding to the advertising analysis system may include the following operations:
[0161] Based on the preset batch collection service, each advertisement attribution result is temporarily stored in the system memory corresponding to the advertisement analysis system;
[0162] Check whether the amount of advertising attribution result data temporarily stored in the system memory is greater than or equal to the preset batch processing amount;
[0163] When it is detected that the data quantity of the advertising attribution results temporarily stored in the system memory is greater than or equal to the batch processing quantity, all the advertising attribution results temporarily stored in the system memory are written to the target database corresponding to the advertising analysis system.
[0164] It can be seen that this optional embodiment can temporarily store multiple advertising attribution results in the system memory based on the batch service. When the amount of data temporarily stored in the system memory is greater than or equal to the preset batch processing quantity, the temporarily stored advertising attribution results are written in batches to the target database. This can reduce the frequency of database access, reduce the database burden, and help improve the efficiency of storing advertising attribution results, thereby helping to improve the operating efficiency of the advertising analysis system.
[0165] Embodiment 3
[0166] See also Figure 4 , Figure 4 is a schematic diagram of the structure of an advertising attribution device disclosed in an embodiment of the present invention. Figure 4 The described advertising attribution device may include one of an advertising attribution terminal, an advertising attribution device, an advertising attribution system and a server, wherein the server may include a local server or a cloud server, which is not limited in the embodiments of the present invention; the device may be applied to an advertising analysis system, and further, the advertising analysis system may be used to analyze advertising services, which is not limited in the embodiments of the present invention. Figure 4 As shown, the advertising attribution device may include:
[0167] The receiving module 301 is used to receive real-time event data reported through the advertising attribution service interface; the real-time event data includes multiple message events;
[0168] A partitioning module 302 is used to perform a partitioning operation on the real-time event data based on a preset partitioning condition to obtain a plurality of consumption tasks; each consumption task includes at least one message event;
[0169] The attribution module 303 is used to perform an advertising attribution operation on each consumption task based on a preset thread processing mechanism to obtain an advertising attribution result corresponding to each consumption task;
[0170] The storage module 304 is used to store all the advertising attribution results into the target database corresponding to the advertising analysis system based on the preset batch collection service.
[0171] It can be seen that the device described in the embodiment of the present invention can first receive the real-time event data reported by the advertising attribution service interface, and then partition the real-time event data based on the partitioning conditions, divide the multiple consumption tasks, and then perform advertising attribution on each consumption task based on the thread processing mechanism to obtain the corresponding advertising attribution result, and then store the advertising attribution result in the corresponding database through the batch service. It can achieve load balancing through partitioning operations, effectively divert message events, and process message events through a multi-threaded processing mode, which can improve the utilization of CPU performance and thus improve throughput, so that the advertising analysis system can efficiently respond to large traffic impacts, thereby helping to improve the stability and reliability of the advertising analysis system. At the same time, it can also improve the processing efficiency of consumption events by orderly processing consumption events, thereby improving the efficiency and accuracy of advertising attribution, which is conducive to improving the analysis efficiency and accuracy of advertising delivery effects, and thus helping to help enterprises optimize advertising delivery strategies.
[0172] In an optional embodiment, if Figure 5 As shown, the device may also include:
[0173] The node creation module 305 is used to create a linked list node corresponding to each message event in sequence based on the reporting time sequence of each message event in the real-time event data before the attribution module 303 performs the advertising attribution operation on each consumption task based on the preset thread processing mechanism and obtains the advertising attribution result corresponding to each consumption task;
[0174] A data insertion module 306 is used to sequentially insert the linked list node corresponding to each message event into the event linked list corresponding to the advertisement analysis system;
[0175] The linked list node corresponding to each message event includes each message event and a processing status identifier corresponding to the message event; and when each linked list node is recorded in the event linked list, the processing status identifier of each message event is an unprocessed status identifier;
[0176] And, if Figure 5 As shown, the device may also include:
[0177] The modification module 307 is used to perform an advertising attribution operation on each consumption task based on a preset thread processing mechanism in the attribution module 303, and obtain the advertising attribution result corresponding to each consumption task. After detecting that the advertising attribution operation is completed for any message event, in the event chain list, the processing status identifier corresponding to the message event is modified to a processed status identifier.
[0178] It can be seen that the device described in the implementation of this optional embodiment can create a linked list node corresponding to each message event based on the event reporting time order and insert the linked list node containing the message event and the corresponding processing status identifier into the event linked list. By setting the event linked list and recording the processing status of the event, it is possible to record the message events in an orderly manner while ensuring that all received message events in the multi-threaded processing mode will not be lost or omitted during the processing process, thereby improving the recording accuracy and reliability of the message events, and further facilitating the improvement of the reliability of the attribution processing process for each message event; and, after detecting that the advertising attribution operation for any message event has been executed, it is possible to modify the processing status identifier corresponding to the message event to a processed status identifier, and the processing status of the message event can be updated in the event linked list in a timely manner, further improving the recording accuracy and timeliness of the message events, and facilitating more efficient management of the message event processing through the event linked list.
[0179] In this optional embodiment, optionally, the event list is provided with an ACK position; and, as Figure 5 As shown, the device may also include:
[0180] The reading module 308 is used to read the processing status identifier of each link list node in the event link list in sequence based on the determined scanning order corresponding to the event link list, until the processing status identifier of the currently read link list node is an unprocessed status identifier, and determine the link list node corresponding to the link list node with the first reading order as the target node;
[0181] The determination module 309 is used to determine the node position information corresponding to the target node as the ACK position corresponding to the event linked list; the ACK position is used to indicate that the node position indicated by the ACK position and all message events corresponding to the node position before the node position have been processed;
[0182] The response module 310 is used to generate ACK response information corresponding to the processing status inquiry request according to the ACK position when detecting the existence of a processing status inquiry request about the event link list, and feed back the ACK response information to the initiator of the processing status inquiry request.
[0183] It can be seen that the device described in the implementation of this optional embodiment can also read the processing status identifier of each linked list node in the event linked list in sequence based on the scanning order, until the currently read processing status identifier is an unprocessed status identifier, and determine the linked list node corresponding to the linked list node with a previous reading order as the target node, and then determine the ACK position based on the node position information of the target node to indicate that the node position indicated by the ACK position and all message events corresponding to the node position before the node position have been processed. If a processing status inquiry request is detected, ACK response information is generated according to the ACK position to feed back the response information to the request initiator. By recording the ACK position, the recording accuracy and flexibility of the event processing status in the event linked list can be improved, thereby facilitating the improvement of the feedback efficiency and feedback accuracy of the inquiry request, and further ensuring that the message event will not be lost or omitted during the processing process, thereby facilitating the improvement of the reliability of the process of attribution processing for each message event.
[0184] In another optional embodiment, the attribution module 303 performs an advertising attribution operation on each consumption task based on a preset thread processing mechanism, and a specific method of obtaining the advertising attribution result corresponding to each consumption task may include:
[0185] Based on the task scheduling mechanism corresponding to the advertising analysis system, each consumption task is scheduled to a thread pool that matches the consumption task;
[0186] For each thread pool, determine the event processing logic corresponding to each message event in the consumer task that the thread pool needs to process;
[0187] For each thread pool, according to the event processing logic corresponding to each message event in the consumption task that the thread pool needs to process, the advertising attribution operation is performed on the consumption task to obtain the advertising attribution result corresponding to the consumption task.
[0188] It can be seen that the device described in the implementation of this optional embodiment can first schedule each consumption task to a thread pool matching the task based on the task scheduling mechanism, and then determine the event processing logic corresponding to each message event respectively, and then perform advertising attribution operations on the consumption task based on the event processing logic corresponding to each message event to obtain advertising attribution results. This can improve the multi-threaded processing efficiency and processing accuracy for message events on the basis of improving the scheduling accuracy of consumption tasks, thereby facilitating further improving the advertising attribution efficiency and advertising attribution accuracy for consumption events.
[0189] In this optional embodiment, the attribution module 303 may optionally schedule each consumption task to a thread pool matching the consumption task based on the task scheduling mechanism corresponding to the advertising analysis system, and the specific manner may include:
[0190] Obtaining the scheduling identification type preset by the task scheduler corresponding to the advertising analysis system;
[0191] According to the scheduling identifier type, obtain the scheduling identifier corresponding to each consumer task;
[0192] According to the scheduling identifier corresponding to each consumption task, each consumption task is hashed and distributed, so as to schedule each consumption task to a thread pool matching the scheduling identifier corresponding to the consumption task.
[0193] It can be seen that the device described in the implementation of this optional embodiment can also obtain the scheduling identifier corresponding to each consumption task according to the scheduling identifier type preset by the acquired task scheduler, and then hash distribute each consumption task according to the scheduling identifier corresponding to each consumption task, so as to schedule each consumption task to the thread pool that matches the scheduling identifier corresponding to the consumption task, which can improve the scheduling accuracy of consumption tasks and message events, thereby facilitating the allocation of message events to a more suitable thread pool, and then facilitating more targeted processing of message events, and further facilitating further improving the advertising attribution efficiency and accuracy for consumption events.
[0194] In this optional embodiment, optionally, for each thread pool, the specific manner in which the attribution module 303 determines the event processing logic corresponding to each message event in the consumption task that the thread pool needs to process may include:
[0195] Parse each message event in the consumption task that the thread pool needs to process, and obtain the event type identifier corresponding to each message event;
[0196] According to the event type identifier corresponding to each message event, determine the event processing logic corresponding to the message event by the thread pool;
[0197] And, for each thread pool, the attribution module 303 performs an advertising attribution operation on the consumption task according to the event processing logic corresponding to each message event in the consumption task to be processed by the thread pool, and the specific method of obtaining the advertising attribution result corresponding to the consumption task may include:
[0198] According to the event processing logic corresponding to each message event in the consumption task to be processed by the thread pool, the attribution analysis information corresponding to the consumption task is obtained; the attribution analysis information includes one or more combinations of reporting device information corresponding to each message event, reporting account information corresponding to each message event, and advertising information corresponding to each message event;
[0199] According to the event processing logic and attribution analysis information, an advertising attribution operation is performed on each message event in the consumption task to obtain an event attribution result corresponding to each message event in the consumption task; wherein each consumption task includes the event attribution results corresponding to all message events included in the consumption task.
[0200] It can be seen that the device described in the implementation of this optional embodiment can also determine the event processing logic corresponding to the message event based on the event type identifier corresponding to each message event obtained by analysis, which can improve the analysis accuracy of the message event, thereby improving the accuracy of determining the event processing logic corresponding to the message event, and thus facilitating the accuracy of advertising attribution for consumption events; and, it can also obtain attribution analysis information based on the event processing logic, and then perform advertising attribution on the message event based on the event processing logic and the attribution analysis information, which can further improve the accuracy of advertising attribution for consumption events, thereby facilitating improving the accuracy of advertising attribution results.
[0201] In another optional embodiment, the storage module 304 stores all the advertising attribution results in the target database corresponding to the advertising analysis system based on the preset batch collection service, and the specific method may include:
[0202] Based on the preset batch collection service, each advertisement attribution result is temporarily stored in the system memory corresponding to the advertisement analysis system;
[0203] Check whether the amount of advertising attribution result data temporarily stored in the system memory is greater than or equal to the preset batch processing amount;
[0204] When it is detected that the data quantity of the advertising attribution results temporarily stored in the system memory is greater than or equal to the batch processing quantity, all the advertising attribution results temporarily stored in the system memory are written to the target database corresponding to the advertising analysis system.
[0205] It can be seen that the device described in the implementation of this optional embodiment can temporarily store multiple advertising attribution results in the system memory based on the batch service. When the amount of data temporarily stored in the system memory is greater than or equal to the preset batch processing quantity, the temporarily stored advertising attribution results are written in batches to the target database. This can reduce the frequency of database access, reduce the database burden, and help improve the efficiency of storing advertising attribution results, thereby helping to improve the operating efficiency of the advertising analysis system.
[0206] Embodiment 4
[0207] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of the structure of another advertising attribution device disclosed in an embodiment of the present invention. Figure 6 As shown, the advertising attribution device may include:
[0208] A memory 401 storing executable program codes;
[0209] a processor 402 coupled to the memory 401;
[0210] The processor 402 calls the executable program code stored in the memory 401 to execute part or all of the steps in the advertising attribution method described in the first embodiment of the present invention or the second embodiment of the present invention.
[0211] Embodiment 5
[0212] An embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute part or all of the steps in the advertising attribution method described in Embodiment 1 or Embodiment 2 of the present invention.
[0213] Embodiment 6
[0214] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the advertising attribution method described in Embodiment 1 or Embodiment 2.
[0215] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0216] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0217] Finally, it should be noted that the advertising attribution method and device disclosed in the embodiments of the present invention disclose only the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An advertising attribution method, characterized in that: The method is applied to an advertisement analysis system, and the method comprises: Receiving real-time event data reported through an advertising attribution service interface; the real-time event data includes a plurality of message events; Based on a preset partitioning condition, a partitioning operation is performed on the real-time event data to obtain a plurality of consumption tasks; each of the consumption tasks includes at least one of the message events; Based on a preset thread processing mechanism, an advertising attribution operation is performed on each of the consumption tasks to obtain an advertising attribution result corresponding to each of the consumption tasks; Based on the preset batch collection service, all the advertising attribution results are stored in the target database corresponding to the advertising analysis system.
2. The advertising attribution method according to claim 1, characterized in that: Before performing the advertising attribution operation on each of the consumption tasks based on the preset thread processing mechanism to obtain the advertising attribution result corresponding to each of the consumption tasks, the method further includes: Based on the reporting time sequence of each of the message events in the real-time event data, sequentially create a linked list node corresponding to each of the message events, and sequentially insert the linked list node corresponding to each of the message events into the event linked list corresponding to the advertising analysis system; Wherein, the linked list node corresponding to each of the message events includes each of the message events and a processing status identifier corresponding to the message event; and, when each of the linked list nodes is recorded in the event linked list, the processing status identifier of each of the message events is an unprocessed status identifier; Furthermore, in the process of performing an advertising attribution operation on each of the consumption tasks based on the preset thread processing mechanism to obtain an advertising attribution result corresponding to each of the consumption tasks, the method further includes: After detecting that the advertisement attribution operation is completed for any of the message events, in the event chain list, the processing status identifier corresponding to the message event is modified to a processed status identifier.
3. The advertising attribution method according to claim 2, characterized in that: The event linked list is provided with an ACK position; and the method further comprises: Based on the determined scanning order corresponding to the event linked list, sequentially read the processing status identifier of each linked list node in the event linked list until the processing status identifier of the linked list node currently read is the unprocessed status identifier, and determine the linked list node corresponding to the linked list node with the first reading order as the target node; Determine the node position information corresponding to the target node as the ACK position corresponding to the event linked list; the ACK position is used to indicate that the node position indicated by the ACK position and all the message events corresponding to the node position before the node position have been processed; When a processing status inquiry request about the event link list is detected, ACK response information corresponding to the processing status inquiry request is generated according to the ACK position, and the ACK response information is fed back to the initiator of the processing status inquiry request.
4. The advertising attribution method according to any one of claims 1 to 3, characterized in that: The step of performing an advertising attribution operation on each of the consumption tasks based on a preset thread processing mechanism to obtain an advertising attribution result corresponding to each of the consumption tasks includes: Based on the task scheduling mechanism corresponding to the advertising analysis system, each of the consumption tasks is respectively scheduled to a thread pool matching the consumption task; For each of the thread pools, determine the event processing logic corresponding to each of the message events in the consumer tasks that the thread pool needs to process; For each of the thread pools, according to the event processing logic corresponding to each of the message events in the consumption task that the thread pool needs to process, an advertising attribution operation is performed on the consumption task to obtain an advertising attribution result corresponding to the consumption task.
5. The advertising attribution method according to claim 4, characterized in that: The task scheduling mechanism corresponding to the advertising analysis system is based on which each of the consumption tasks is respectively scheduled to a thread pool matching the consumption task, including: Obtaining a scheduling identification type preset by a task scheduler corresponding to the advertisement analysis system; According to the scheduling identifier type, obtaining the scheduling identifier corresponding to each of the consumption tasks; According to the scheduling identifier corresponding to each of the consumption tasks, each of the consumption tasks is hashed and distributed, so as to schedule each of the consumption tasks to a thread pool that matches the scheduling identifier corresponding to the consumption task.
6. The advertising attribution method according to claim 4, characterized in that: For each of the thread pools, determining the event processing logic corresponding to each of the message events in the consumer tasks that the thread pool needs to process includes: Parse each of the message events in the consumption tasks that the thread pool needs to process, and obtain an event type identifier corresponding to each of the message events; According to the event type identifier corresponding to each of the message events, determine the event processing logic corresponding to the message event by the thread pool; And, for each of the thread pools, the event processing logic corresponding to each of the message events in the consumption task to be processed by the thread pool performs an advertising attribution operation on the consumption task to obtain an advertising attribution result corresponding to the consumption task, including: According to the event processing logic corresponding to each of the message events in the consumption task to be processed by the thread pool, obtaining attribution analysis information corresponding to the consumption task; the attribution analysis information includes one or more combinations of reporting device information corresponding to each of the message events, reporting account information corresponding to each of the message events, and advertising information corresponding to each of the message events; According to the event processing logic and the attribution analysis information, an advertising attribution operation is performed on each of the message events in the consumption task to obtain an event attribution result corresponding to each of the message events in the consumption task; wherein each of the consumption tasks includes the event attribution results corresponding to all of the message events included in the consumption task.
7. The advertising attribution method according to any one of claims 1, 2, 3, 5 and 6, characterized in that: The preset batch collection service stores all the advertising attribution results in a target database corresponding to the advertising analysis system, including: Based on the preset batch collection service, each of the advertising attribution results is temporarily stored in the system memory corresponding to the advertising analysis system; Detecting whether the amount of data of the advertising attribution results temporarily stored in the system memory is greater than or equal to a preset batch processing amount; When it is detected that the data quantity of the advertising attribution results temporarily stored in the system memory is greater than or equal to the batch processing quantity, all the advertising attribution results temporarily stored in the system memory are written to the target database corresponding to the advertising analysis system.
8. An advertising attribution device, characterized in that: The device is applied to an advertisement analysis system, and comprises: A receiving module, configured to receive real-time event data reported through an advertising attribution service interface; the real-time event data includes a plurality of message events; A partitioning module, used to perform a partitioning operation on the real-time event data based on a preset partitioning condition to obtain a plurality of consumption tasks; each of the consumption tasks includes at least one of the message events; An attribution module, configured to perform an advertising attribution operation on each of the consumption tasks based on a preset thread processing mechanism, and obtain an advertising attribution result corresponding to each of the consumption tasks; The storage module is used to store all the advertising attribution results in the target database corresponding to the advertising analysis system based on the preset batch collection service.
9. An advertising attribution device, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the advertising attribution method as described in any one of claims 1-7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the advertising attribution method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for confirming message multi-thread consumption sequence based on double linked list
CN113312187A
Method and system for processing attribution data
CN117215805A
Efficient processing method for alarm event and computer readable storage medium
CN117539665A
Method and system for recording and replaying the execution of distributed java programs
US6832367B1