Data processing method and device, electronic equipment and storage medium
By first aggregating operational data and then aggregating object and content feature data, the resource consumption problem caused by the large amount of data in the information push system is solved, the aggregation stability and efficiency are improved, and the cost is reduced.
Patent Information
- Application Number
- CN202411124993.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2026-03-03
AI Technical Summary
In information push systems, the amount of data processed during the aggregation process is too large, resulting in high resource consumption and reducing aggregation stability, aggregation efficiency, and dataset generation efficiency.
First, the operation data of the target object on the target content is aggregated to generate aggregated operation data. Then, a data set is generated based on the aggregated operation data, object feature data, and content feature data, which reduces the amount of data and resources that need to be processed in each aggregation process.
It improves aggregation stability and efficiency, reduces the probability of crashes during aggregation, reduces the memory resources occupied by the message queue, and lowers aggregation costs.
Smart Images

Figure CN121603552A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a data processing method and apparatus, electronic device, storage medium, and program product. Background Technology
[0002] During the push notification process of an information push system, content of interest to the target audience is pushed based on the characteristics of the target audience and the characteristics of the push content. After receiving the push content, the target audience may click, read, etc. To detect the push effect and optimize the recommendation algorithm, the characteristics of the target audience, the characteristics of the push content, and the target audience's operation data on the push content can be aggregated to generate a corresponding dataset.
[0003] In related technologies, the large amount of data processed during the aggregation process consumes a lot of resources, making the aggregation process prone to crashes and reducing aggregation stability, aggregation efficiency, and dataset generation efficiency. Summary of the Invention
[0004] Embodiments of this application provide a data processing method and apparatus, electronic device, storage medium, and program product that can improve aggregation stability and efficiency, and enhance the stability of data set generation.
[0005] According to one aspect of the embodiments of this application, a data processing method is provided, the method comprising:
[0006] Obtain the object feature data of the target object to which the target content request belongs, and find the target push content of the target content request based on the object feature data and the content feature data of each push content;
[0007] The target push content is pushed to the target object, and the operation data of the target object on the target push content is added to the first message queue;
[0008] The operation data of the target object on the target pushed content contained in the first message queue is aggregated to obtain the aggregated operation data corresponding to the target content request;
[0009] Based on the aggregated operation data, the object feature data, and the content feature data of the target push content, a data set corresponding to the target content request is generated.
[0010] According to one aspect of the embodiments of this application, a data processing apparatus is provided, the apparatus comprising:
[0011] The search module is configured to obtain object feature data of the target object to which the target content request belongs, and search for the target push content of the target content request based on the object feature data and the content feature data of each push content.
[0012] Add a module configured to push the target content to the target object and add the target object's operation data on the target content to the first message queue;
[0013] The aggregation module is configured to aggregate the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request.
[0014] The generation module is configured to generate a data set corresponding to the target content request based on the aggregated operation data, the object feature data, and the content feature data of the target push content.
[0015] In one exemplary embodiment, based on the foregoing solution, the device further includes a storage module configured as follows:
[0016] After obtaining the object feature data of the target object to which the target content request belongs, and finding the target push content of the target content request based on the object feature data and the content feature data of each push content, the content feature data of the target push content and the obtained object feature data are stored in a set storage area.
[0017] The specific configuration of the generation module is as follows:
[0018] Based on the aggregated operation data, retrieve the object feature data and the content feature data of the target push content from the designated storage area;
[0019] Based on the aggregated operation data, as well as the found object feature data and content feature data, a data set corresponding to the target content request is generated.
[0020] In an exemplary embodiment, based on the foregoing scheme, the storage module is specifically configured as follows:
[0021] The acquired object feature data is stored in the first cache area;
[0022] If the target push content is successfully pushed to the target object, the object feature data contained in the first cache area is moved to the set storage area;
[0023] The content feature data of the target push content is retrieved from the second cache area and stored in the designated storage area.
[0024] In an exemplary embodiment, based on the foregoing scheme, the search module is specifically configured as follows:
[0025] Based on the object feature data, a first number of push content items are retrieved, and the content feature data corresponding to the first number of push content items are retrieved from the second cache area;
[0026] If the content feature data of any of the first number of push content items cannot be found in the second cache area, then the content feature data of the push content item is searched in the content feature database and added to the second cache area.
[0027] Based on the content feature data corresponding to the first number of push content items and the object feature data, a second number of target push content items are selected from the first number of push content items; wherein, the second number is less than the first number.
[0028] In an exemplary embodiment, based on the foregoing solution, the device further includes a deletion module, specifically configured as follows:
[0029] The storage duration of each content feature data contained in the second cache area is detected in the second cache area;
[0030] If the storage duration of any content feature data in the second cache area is greater than or equal to the first duration threshold, then the content feature data is deleted from the second cache area.
[0031] In an exemplary embodiment, based on the foregoing scheme, the storage module is specifically configured as follows:
[0032] The content feature data of the target push content is compressed to obtain compressed content feature data, and the compressed content feature data is stored in the designated storage area;
[0033] The acquired object feature data is compressed to obtain compressed object feature data, and the compressed object feature data is stored in the designated storage area.
[0034] In an exemplary embodiment, based on the foregoing scheme, and provided that the aggregated operation data includes a request identifier for the target content request and a content identifier for the target pushed content, the storage module is specifically configured as follows:
[0035] The content feature data and content identifier of the target push content are associated and stored in the designated storage area, and the request identifier of the target content request and the object feature data are associated and stored in the designated storage area.
[0036] The specific configuration of the generation module is as follows:
[0037] The system retrieves object feature data whose associated request identifier matches the request identifier contained in the aggregate operation data, and content feature data whose associated content identifier matches the content identifier contained in the aggregate operation data, from the designated storage area.
[0038] In an exemplary embodiment, based on the foregoing scheme, the aggregation module is specifically configured to: aggregate the operation data of the target object on the target pushed content contained in the first message queue through the aggregation service to obtain the aggregated operation data corresponding to the target content request, and add the aggregated operation data corresponding to the target content request to the second message queue; wherein, the aggregation service includes a streaming service;
[0039] The specific configuration of the generation module is as follows:
[0040] The service extracts the aggregated operation data corresponding to the target content request from the second message queue, and finds the object feature data of the target object to which the target content request belongs and the content feature data of the target pushed content based on the extracted aggregated operation data;
[0041] Based on the extracted aggregation operation data, as well as the found object feature data and content feature data, a data set corresponding to the target content request is generated.
[0042] In an exemplary embodiment, based on the aforementioned scheme, given that each piece of operation data includes the content identifier of the pushed content and the request identifier of the content request, the aggregation module is specifically configured as follows:
[0043] Search the first message queue for multiple operation data entries whose request identifiers match the request identifier of the target content request;
[0044] If there are multiple target push content items, then based on the content identifiers contained in each of the multiple operation data items, the operation data corresponding to each target push content item is retrieved from the multiple operation data items;
[0045] The candidate operation data corresponding to each target push content is aggregated to obtain the aggregated operation data corresponding to each target push content, and the aggregated operation data corresponding to each target push content is used as the aggregated operation data corresponding to the target push content.
[0046] In an exemplary embodiment, based on the foregoing scheme, and provided that each piece of operation data contains a request identifier for the content request to which it belongs, the aggregation module is specifically configured as follows:
[0047] Based on the content identifier of the target content request, a push message for the target content request is generated, and the push message for the target content request is added to the third message queue;
[0048] Extract the push information of the target content request from the third message queue, and search the first message queue for operation data that matches the request identifier contained in the extracted push information.
[0049] The retrieved operation data and extracted push information are aggregated to obtain the aggregated operation data corresponding to the target content request.
[0050] In an exemplary embodiment, based on the foregoing scheme, where the first message queue contains message queues corresponding to various operation types, the adding module is specifically configured as follows:
[0051] Obtain each operation data of the target object on the target pushed content, and add each operation data to the message queue corresponding to the operation type of each operation data;
[0052] The aggregation module is specifically configured as follows:
[0053] From the message queues corresponding to the various operation types, the operation data of the target object on the target push content is retrieved, and the retrieved operation data is aggregated to obtain the aggregated operation data corresponding to the target content request.
[0054] In an exemplary embodiment, based on the foregoing scheme, the aggregation module is specifically configured as follows:
[0055] Obtain the push time when the target content is pushed to the target object, and calculate the time difference between the current time and the push time;
[0056] If the time difference is less than the second duration threshold, then retrieve the operation data of the target object on the target pushed content from the first message queue;
[0057] If the time difference is equal to the second duration threshold, the retrieved operation data is aggregated to obtain the aggregated operation data corresponding to the target content request.
[0058] According to one aspect of the embodiments of this application, an electronic device is provided, comprising:
[0059] One or more processors;
[0060] A storage device for storing one or more computer programs that, when executed by one or more processors, cause the electronic device to perform the method described above.
[0061] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor of an electronic device, causes the electronic device to perform the method described above.
[0062] According to one aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described above.
[0063] In the technical solution provided in the embodiments of this application, object feature data of the target object to which the target content request belongs is first obtained. Based on the object feature data and the content feature data of each pushed content, the target pushed content of the target content request is located, and the target pushed content is pushed to the target object. The operation data of the target object on the target pushed content is added to a first message queue. The operation data of the target object on the target pushed content contained in the first message queue is aggregated to obtain aggregated operation data corresponding to the target content request. Based on the aggregated operation data, object feature data, and content feature data of the target pushed content, a data set corresponding to the target content request is generated, thereby identifying the objects involved in the push process corresponding to the target content request. Compared to related technologies, this approach aggregates feature data, target push content feature data, and operational data. Firstly, it aggregates operational data to obtain aggregated operational data, and then aggregates the aggregated operational data, corresponding object feature data, and content feature data. This reduces the amount of data processed and the resources consumed in each aggregation process, lowers the probability of aggregation crashes, and improves aggregation stability, efficiency, and data set generation efficiency. Secondly, it only needs to aggregate operational data from the message queue, eliminating the need to aggregate operational data, object feature data, and content feature data from multiple message queues simultaneously. This not only ensures efficient aggregation of operational data but also reduces the memory resources consumed by the message queues during aggregation, thus lowering aggregation costs.
[0064] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0065] Figure 1 This is a schematic diagram illustrating an implementation environment as shown in an exemplary embodiment of this application;
[0066] Figure 2This is a flowchart illustrating a data processing method in an exemplary embodiment of this application;
[0067] Figure 3 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application;
[0068] Figure 4 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application;
[0069] Figure 5 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application;
[0070] Figure 6 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application;
[0071] Figure 7 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application;
[0072] Figure 8 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application;
[0073] Figure 9 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application;
[0074] Figure 10 This is a schematic diagram illustrating a data reporting process in an exemplary embodiment of this application;
[0075] Figure 11 This is a schematic diagram illustrating the operational data aggregation process in an exemplary embodiment of this application;
[0076] Figure 12 This is a schematic diagram illustrating the sample generation process in an exemplary embodiment of this application;
[0077] Figure 13 This is a schematic diagram of a data processing apparatus illustrating an exemplary embodiment of this application;
[0078] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0079] Exemplary embodiments will now be described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to these examples; rather, these embodiments are provided so that this application will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0080] Furthermore, the features, structures, or characteristics described in this application can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to provide a full understanding of the embodiments of this application. However, those skilled in the art will recognize that when implementing the technical solutions of this application, not all the detailed features in the embodiments may be used, one or more specific details may be omitted, or other methods, elements, devices, steps, etc., may be employed.
[0081] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0082] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0083] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0084] It should also be noted that "multiple" as mentioned in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0085] The technical solutions of the embodiments of this application are described in detail below:
[0086] In related technologies, during the aggregation of features of the target object, features of the push content, and operation data of the target object on the push content, the features of the target object, features of the push content, and operation data are typically added to corresponding message queues. Simultaneously, these features are consumed from these message queues for aggregation. This results in a large amount of data to be processed during aggregation, significant memory consumption by the message queues, reduced aggregation stability, increased aggregation costs, and consequently, low aggregation efficiency and low dataset generation efficiency. Therefore, embodiments of this application provide a data processing method and apparatus, electronic device, storage medium, and program product that can improve aggregation stability and efficiency, and enhance the stability of data set generation.
[0087] Please see Figure 1 , Figure 1 This is a schematic diagram of an implementation environment related to this application, which includes a terminal device 110 and a server 120. The terminal device 110 and the server 120 communicate with each other via a wired or wireless network. The terminal device 110 can upload its own data to the server 120, and can also retrieve data from the server 120.
[0088] Among them, terminal device 110 may include, but is not limited to, mobile phones, tablets, laptops, computers, voice interaction devices, home appliances, vehicle terminals, aircraft, remote driving terminals, etc.; server 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. This document does not restrict the specific form of terminal devices and servers.
[0089] It should be noted that, Figure 1 The number of terminal devices 110 and servers 120 is merely illustrative; any number of terminal devices 110 and servers 120 can be used as needed.
[0090] In an exemplary embodiment, the data processing method provided in the embodiments of this application can be executed by a terminal device 110. For example, the terminal device 110 can obtain object feature data of the target object to which the target content request belongs, and based on the object feature data and the content feature data of each pushed content, locate the target pushed content of the target content request, push the target pushed content to the target object, add the operation data of the target object on the target pushed content to a first message queue, aggregate the operation data of the target object on the target pushed content contained in the first message queue to obtain aggregated operation data corresponding to the target content request, thereby generating a data set corresponding to the target content request based on the aggregated operation data, object feature data, and content feature data of the target pushed content. On the one hand, by first aggregating the operation data to obtain aggregated operation data, and then aggregating the aggregated operation data, the corresponding object feature data, and content feature data, the amount of data to be processed and the resources occupied in each aggregation process are reduced, the probability of the aggregation process crashing is reduced, and the aggregation stability, aggregation efficiency, and data set generation efficiency are improved. On the other hand, only the operation data needs to be aggregated from the message queue, instead of simultaneously aggregating the operation data, object feature data, and content feature data from multiple message queues. This not only ensures the aggregation efficiency of the operation data, but also reduces the memory resources occupied by the message queue during the aggregation process, thereby reducing the aggregation cost.
[0091] In another exemplary embodiment, server 120 may have functions similar to terminal device 110 to execute the data processing method provided in this application embodiment. For example, server 120 may first obtain object feature data of the target object to which the target content request belongs, and then, based on the object feature data and the content feature data of each pushed content, find the target pushed content of the target content request, push the target pushed content to the target object, add the target object's operation data on the target pushed content to a first message queue, aggregate the target object's operation data on the target pushed content contained in the first message queue to obtain aggregated operation data corresponding to the target content request, and thereby generate a data set corresponding to the target content request based on the aggregated operation data, object feature data, and content feature data of the target pushed content.
[0092] In another exemplary embodiment, the terminal device 110 and the server 120 may also jointly execute the data processing method provided in the embodiments of this application. For example, the terminal device 110 may acquire a target content request and send it to the server 120. The server 120 may acquire object feature data of the target object to which the target content request belongs, and, based on the object feature data and the content feature data of each pushed content, locate the target pushed content of the target content request, and send the target pushed content to the terminal device 110, so that the terminal device 110 pushes the target pushed content to the target object, and transmits the operation data of the target object on the target pushed content to the server 120. The server 120 adds the operation data of the target object on the target pushed content to a first message queue, aggregates the operation data of the target object on the target pushed content contained in the first message queue to obtain aggregated operation data corresponding to the target content request, and generates a data set corresponding to the target content request based on the aggregated operation data, object feature data, and content feature data of the target pushed content.
[0093] The data processing method in this application can be applied to various information push scenarios, such as news push and video push. The embodiments of this application involve user-related data such as operational data. When the method of this application is applied to specific products or technologies, user permission or consent is obtained, and the extraction, use, and processing of related data comply with local security standards and local laws and regulations.
[0094] See Figure 2 , Figure 2 This is a flowchart illustrating a data processing method in an exemplary embodiment of this application. The method can be applied to... Figure 1 The implementation environment shown can be composed of Figure 1 The terminal device 110 in the implementation environment shown can execute this, or it can be performed by... Figure 1 The server 120 in the implementation environment shown can perform the operation, or it can be performed by... Figure 1 The terminal device 110 and server 120 in the implementation environment shown execute together.
[0095] like Figure 2 As shown, in an exemplary embodiment, the data processing method may include steps S210-S240, which are described in detail below:
[0096] Step S210: Obtain the object feature data of the target object to which the target content request belongs, and find the target push content of the target content request based on the object feature data and the content feature data of each push content.
[0097] It's important to note that a content request is used to request and retrieve push content, while a target content request refers to any content request yet to be processed. Push content refers to the content included in the content push system that can be pushed to target objects. The types of push content include, but are not limited to, news, novels, videos, and products. The content feature data of the push content is used to characterize its features. Target push content refers to the push content requested by the target content request; that is, the push content selected based on the object feature data of the target object to which the target content request belongs. Content requests can be triggered by the target object. For example, in the push content presentation interface, the target object can trigger a refresh operation to generate a content request.
[0098] The target audience includes users of the content push system, such as users. Target feature data is used to characterize the features of the target audience, reflecting their preferences. This data can be generated based on at least one of the following: the target audience's attribute information, the target audience's interaction data with the pushed content, etc. The target audience's attribute information describes their own attributes, such as name, hobbies, and age. Interaction data is generated based on the target audience's interactions with the pushed content. Interaction types include, but are not limited to, exposure, viewing, playback, favorites, forwarding, and liking. Correspondingly, the types of operation data include, but are not limited to, exposure data, viewing data, playback data, favorites data, forwarding data, and liking data. Exposure refers to displaying the pushed content to the user. During a single content request, multiple push content items can be selected for the target audience. However, the display area of the push content display interface is limited, so only a portion of the push content may be exposed at a time. The remaining push content needs to be exposed based on the user's exposure actions; for example, the user can swipe to view the remaining push content. View data may include viewing duration and number of views, while playback data may include playback duration and number of plays.
[0099] After obtaining the target content request, in order to select the push content that the target object is interested in, the object feature data of the target object to which the target content request belongs can be searched, and the content feature data that matches the object feature data can be searched from the content feature data of each push content. The push content to which the found content feature data belongs is the push content of the target content request, that is, the target push content.
[0100] In an optional implementation, the target content request may include an object identifier belonging to the target object. Based on this object identifier, corresponding object feature data is retrieved from an object feature database, which contains object feature data for different target objects. The object identifier is used to uniquely identify the object and may be an object's account, identity document (ID), etc.
[0101] Step S220: Push the target content to the target object and add the target object's operation data on the target content to the first message queue.
[0102] The first message queue is used to store operation data. The specific type of the first message queue can be flexibly set according to actual needs. For example, the first message queue can be a Kafka message queue. Kafka is a distributed message queue based on the publish / subscribe pattern, and it is also an open-source distributed event streaming platform.
[0103] The selected target content is pushed to the target object that the target content request belongs to. Then, the target object can perform operations on the pushed content, such as clicking, commenting, forwarding, or favoriting, thereby generating operation data. If the operation data is obtained, it is added to the first message queue.
[0104] In an optional implementation, during the push process, push information for a target content request can be generated. This push information includes a content identifier for the target content and a request identifier for the target content request. Then, the push information for the target content request is sent to the client of the target object to which the target content request belongs. This allows the client to locate the target content based on the content identifier contained in the push information and push the found target content to the target object. The content identifier uniquely identifies the push content and can be an ID of the push content, etc., while the request identifier uniquely identifies the content request and can be an ID of the content request, etc. Optionally, the push information can be represented in the form of a list, etc.
[0105] Step S230: Aggregate the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request.
[0106] The first message queue contains operation data corresponding to push content for different content requests. Furthermore, the target object may perform multiple operations on the target push content, resulting in multiple operation data entries. For example, the push content may be forwarded or saved. To obtain the multiple operation data entries of the target object to which the target content request belongs on the target push content, the multiple operation data entries of the target object on the target push content can be retrieved from the first message queue. In other words, the push content to which these multiple operation data entries belong is the target push content of the target content request. Then, the multiple operation data entries are aggregated to obtain the aggregated operation data corresponding to the target content request. That is, the content request to which the operation data contained in the aggregated operation data of the target content request belongs is the target content request, and the push content to which belongs is the target push content.
[0107] In an optional implementation, when generating operation data, the request identifier of the content request to which the operation data belongs can be added to the operation data. That is, the operation data contains a request identifier, and the operation data of the target content contains the request identifier of the target content request. Under this condition, if the request identifier contained in the operation data is the request identifier of the target content request, it indicates that the operation data is operation data for the target content. Therefore, operation data containing a request identifier that matches the request identifier of the target content request can be searched from the first message queue, and the searched operation data is added to the aggregated operation data of the target content request to obtain the aggregated operation data corresponding to the target content request. In other words, operation data with the same request identifier contained in the first message queue are aggregated, so that the operation data contained in each aggregated operation data corresponds to the same content request.
[0108] In an optional implementation, if there are multiple target push content items, in order to determine whether the target object is interested in the push content based on the target object's operation data for each push content, the operation data may also include the content identifier of the push content. Correspondingly, multiple operation data entries matching the request identifier of the target content request are retrieved from the first message queue. Based on the content identifiers contained in each of the multiple operation data entries, operation data corresponding to each target push content is retrieved from the multiple operation data entries. The operation data corresponding to each target push content is aggregated to obtain aggregated operation data corresponding to each target push content. This aggregated operation data is then used as the aggregated operation data corresponding to the target push content. In other words, the operation data is clustered based on whether the contained request identifiers and the contained content identifiers are the same. This aggregates operation data entries with the same contained request identifiers and the same contained content identifiers into the same aggregated operation data. This allows a data set to be generated based on the aggregated operation data of the same request object for the same target push content. Based on this data set, the interest level of the target object in each push content can be analyzed, thereby achieving fine-grained analysis. Updating the push algorithm based on this data set can improve the accuracy of the push algorithm.
[0109] In an optional implementation, if there are multiple target push content items, the aggregation operation data corresponding to each of these multiple target push content items can be used as the total aggregation operation data corresponding to the target push content.
[0110] It should be understood that operational data is continuously generated. After push content is sent to the target object, the further back in time the push time, the lower the likelihood that the target object will operate on the push content. Moreover, the further back in time the operational data is, the weaker its reference value for calculating the target object's interest in the push content. Therefore, in order to improve the real-time performance and reference value of aggregated operational data and reduce the resource consumption during the aggregation process, a second duration threshold can be set. During the process of obtaining the aggregated operational data corresponding to the target content request, the push time when the target push content was sent to the target object is obtained, and the time difference between the current time and the push time is calculated. If the time difference is less than the second duration threshold, the operation data of the target object to which the target content request belongs is searched from the first message queue. If the time difference is equal to the second duration threshold, the searched operation data is aggregated to obtain the aggregated operational data corresponding to the target content request. In the subsequent process, if the first message queue contains operation data corresponding to the target content request, the operation data is deleted, thereby ensuring that the aggregation of operation data corresponding to the same content request ends in a timely manner, reducing the resource consumption during the operation data aggregation process, and improving the real-time performance and reference value of the operation data contained in the aggregated operation data. The specific value of the second duration threshold can be flexibly set according to actual needs, for example, it can be set to 10 minutes, 30 minutes, etc. The push time can be the time when the push information requesting the target content is sent to the client, or the push time can be the time when the target push content is detected as successfully pushed to the object. The specific method for determining whether the target push content has been successfully pushed can be flexibly set according to actual needs. In an optional example, after sending the push information requesting the target content to the client, if a confirmation message indicating that the push information has been received is received from the client, it can be determined that the target push content has been successfully pushed. Correspondingly, the time of receiving the confirmation message is used as the push time. Optionally, the confirmation message can contain the push information requesting the target content.
[0111] Step S240: Generate a data set corresponding to the target content request based on the aggregated operation data, object feature data, and content feature data of the target push content.
[0112] Based on the aggregated operation data corresponding to the target content request, the object feature data of the target object to which the target content request belongs and the content feature data of the target pushed content are found. Then, based on the aggregated operation data of the target content request, the found object feature data and content feature data, a data set corresponding to the target content request is generated. In other words, this data set contains the object feature data, the content feature data of the target pushed content, and the operation data of the target pushed content involved in a content request process.
[0113] In an optional implementation, if there are multiple target push contents, a data set corresponding to each target push content can be generated based on the aggregated operation data corresponding to each target push content, the object feature data of the target object to which the target content request belongs, and the content feature message of each target push content.
[0114] exist Figure 2 In the illustrated embodiment, after obtaining the object feature data of the target object to which the target content request belongs, and based on the object feature data and the content feature data of each pushed content, the target pushed content of the target content request is found, and the target pushed content is pushed to the target object, the operation data of the target object on the target pushed content is added to the first message queue. The operation data of the target object on the target pushed content contained in the first message queue is first aggregated to obtain the aggregated operation data corresponding to the target content request. In this process, only the operation data contained in the message queue needs to be aggregated; it is not necessary to aggregate the operation data, object feature data, and content feature data simultaneously, reducing the amount of data processed and the resources occupied during the aggregation process, and improving the aggregation stability and efficiency. Then, based on the aggregated operation data and object feature data... The system generates a data set corresponding to the target content request by aggregating the content feature data of the target content. This allows the data set generation process to aggregate only content feature data, object feature data, and already aggregated operation data, without simultaneously aggregating operation data, object feature data, and content feature data. This reduces the amount of data processed and the resources consumed during the data set generation process, further improving aggregation stability, aggregation efficiency, and data set generation efficiency. Furthermore, throughout the entire process, only operation data needs to be aggregated from the message queue corresponding to the operation data, without simultaneously aggregating operation data, object feature data, and content feature data from the message queues corresponding to the operation data, object feature data, and content feature data objects. This reduces the memory resources occupied by the message queues during the aggregation process and lowers the aggregation cost.
[0115] In one exemplary embodiment, see Figure 3 , Figure 3 Is Figure 2 The flowchart illustrates a data processing method proposed based on the given information. This method can be applied to... Figure 1 The implementation environment shown can be composed of Figure 1 The terminal device 110 in the implementation environment shown can execute this, or it can be performed by... Figure 1 The server 120 in the implementation environment shown can perform the operation, or it can be performed by... Figure 1 The terminal device 110 and server 120 in the implementation environment shown execute together.
[0116] like Figure 3As shown, after step S210, the data processing method may further include step S310, which is described in detail below:
[0117] Step S310: Store the content feature data of the target push content and the obtained object feature data in the designated storage area.
[0118] A designated storage area is used to store content feature data of the pushed content and object feature data of the target object, so as to generate a data set corresponding to the content request based on the data stored in the designated storage area. The type of designated storage area can be flexibly set according to actual needs. In order to reduce storage costs, the designated storage area does not have to be a message queue, memory, etc. For example, the designated storage area can be SOS storage, cloud storage, etc., where SOS storage is a hybrid storage engine based on memory and disk.
[0119] It should be noted that the object feature database contains object feature data for different objects. This object feature data changes as object operation data increases and attribute information changes. There is a time difference between the generation time of the dataset corresponding to the target content request and the search time for the target push content. This means that the content feature data for the same push content may differ between the generation and search times. If object feature data is retrieved from the object feature database during the dataset generation process, the object feature data in the dataset may differ from the object feature data referenced during the search for the target push content. For example, if the target object of the content request is object 1, and the object feature data for object 1 during the search for the push content is feature 11, then when the dataset corresponding to the content request is generated, the object feature data for object 1 in the object feature database becomes feature 12. Feature 12 is different from the object feature data 11 referenced during the search. Similarly, the content feature database contains content feature data for different push content. This content feature data changes as object operation data increases and attribute information changes, resulting in the content feature data in the dataset differing from the content feature data referenced during the search for the target push content. Therefore, to avoid this situation, after obtaining the object feature data of the target object to which the target content request belongs, the object feature data can be stored in a designated storage area; and after finding the target push content, the content feature data of the target push content can be stored in a designated storage area, so that during the generation of the data set, the content feature data and object feature data can be obtained from the designated storage area, rather than from the object feature database and the content feature database.
[0120] In an optional implementation, to conserve storage resources in the designated storage area, the content feature data of the target push content can be compressed to obtain compressed content feature data, and this compressed content feature data can be stored in the designated storage area. Similarly, the object feature data of the target object to which the obtained target content request belongs can be compressed to obtain compressed object feature data, and this compressed object feature data can also be stored in the designated storage area. This reduces the storage pressure on the designated storage area and conserves its storage resources. The specific compression method can be flexibly set according to actual needs. In an optional example, the LZ4 algorithm can be used for compression; LZ4 is a highly efficient lossless compression algorithm.
[0121] Under these conditions, step S240 may include steps S320-S330, which are detailed below:
[0122] Step S320: Based on the aggregated operation data, search for object feature data and target push content content feature data in the designated storage area.
[0123] After obtaining the aggregated operation data corresponding to the target content request, the system retrieves the object feature data corresponding to the target content request and the content feature data of the target pushed content from the designated storage area based on the aggregated operation data.
[0124] Step S330: Based on the aggregation operation data, as well as the found object feature data and content feature data, generate the data set corresponding to the target content request.
[0125] The dataset corresponding to the target content request includes the aggregate operation data corresponding to the target content request, as well as the found object feature data and content feature data.
[0126] It should be noted that, Figure 3 The specific implementation details of steps S210-S230 shown can be found in [reference]. Figure 2 Steps S210-S230 shown will not be repeated here.
[0127] exist Figure 3In the illustrated embodiment, after obtaining the object feature data of the target object to which the target content request belongs, and finding the target push content of the target content request based on the object feature data and the content feature data of each push content, the object feature data and the content feature data of the target push content are first stored in a designated storage area, rather than in memory or a message queue, thereby saving memory resources and reducing aggregation costs. Then, during the generation of the target content request's data set, the object feature data and the content feature data of the target push content stored in the designated storage area are added to the data set. Since the object feature data and content feature data stored in the designated storage area are the object feature data and content feature data referenced when searching for the target push content, this data set generation method ensures that the object feature data and the content feature data of the target push content contained in the data set are consistent with the object feature data and the content feature data of the target push content referenced during the search for the target push content. Compared with the method of adding the corresponding object feature data and content feature data from the object feature database and the content feature database to the data set, the accuracy of the data set can be improved.
[0128] In one exemplary embodiment, see Figure 4 , Figure 4 Is Figure 3 The flowchart illustrates a data processing method proposed based on the given information. This method can be applied to... Figure 1 The implementation environment shown can be composed of Figure 1 The terminal device 110 in the implementation environment shown can execute this, or it can be performed by... Figure 1 The server 120 in the implementation environment shown can perform the operation, or it can be performed by... Figure 1 The terminal device 110 and server 120 in the implementation environment shown execute together.
[0129] like Figure 4 As shown, step S310 may include steps S410-S430, which are described in detail below:
[0130] Step S410: Store the acquired object feature data in the first cache area.
[0131] After step S210, if the object feature data and the content feature data of the target push content are directly stored in the designated storage area, the target push content may fail to be pushed due to network issues. Subsequently, the operation data of the target object regarding the target push content cannot be obtained, and the data set corresponding to the target content request will not be generated. The object feature data and the content feature data of the target push content stored in the designated storage area will also be wasted. In other words, the corresponding object feature data and content feature data will only be used to generate the data set if the target push content is successfully pushed.
[0132] Therefore, to avoid wasting storage resources in the designated storage area, the object feature data of the target object to which the target content request belongs can be added to the first cache area first. The first cache area is used to cache object feature data. Within the first cache area, the object feature data of the target object to which the target content request belongs can be associated and stored with the request identifier of the target content request. The specific association method can be found in the description of the foregoing embodiments, and will not be repeated here.
[0133] Step S420: If the target push content is successfully pushed to the target object, the object feature data contained in the first cache area is moved to the set storage area.
[0134] If the target content is successfully pushed to the target object to which the target content request belongs, the object feature data of the target object to which the target content request belongs, contained in the first cache area, will be stored in the designated storage area, and the object feature data of the target object to which the target content request belongs will be deleted from the first cache area.
[0135] The specific method for determining whether the target push content has been successfully pushed can be found in the description of the aforementioned embodiments, and will not be repeated here.
[0136] Step S430: Search for the content feature data of the target push content in the second cache area, and store the found content feature data of the target push content in the set storage area.
[0137] The second cache area is used to cache content feature data, and the first cache area is different from the second cache area.
[0138] If the target content is successfully pushed to the target object to which the target content request belongs, the content feature data of the target content can be retrieved from the second cache area and stored in the designated storage area.
[0139] Optionally, the method of storing the content feature data of the target push content and the object feature data of the target object to the set storage area can refer to the aforementioned step S610, which will not be repeated here.
[0140] It should be noted that, Figure 4 The specific implementation details of steps S210-S230 shown can be found in [reference]. Figure 2 Steps S210-S230 are shown. Figure 4 The specific implementation details of steps S320-S330 shown can be found in [reference]. Figure 3 Steps S320-S330 shown are not repeated here.
[0141] exist Figure 4 In the illustrated embodiment, after obtaining the object feature data of the target object to which the target content request belongs, and finding the target push content of the target content request based on the object feature data and the content feature data of each push content, the object feature data of the target object and the content feature data of the target push content are not directly stored in the designated storage area. Instead, the object feature data and content feature data are first cached. After the successful push of the target content is detected, the cached object feature data and content feature data are then stored in the designated storage area. Since the stored object feature data and content feature data are only used to generate the data set under the condition that the target push content is successfully pushed, the stored object feature data and content feature data are not used to generate the data set under the condition that the target push content fails to push. Feature data will not be used to generate a dataset. Therefore, by first caching object feature data and content feature data, and then storing the cached object feature data and content feature data in a designated storage area after the target push content is successfully detected, the storage resources of the designated storage area can be saved. Furthermore, caching object feature data in the first cache area and content feature data in the second cache area, compared to caching object feature data and content feature data in the same cache area, allows for faster retrieval of object feature data and content feature data from the corresponding cache areas during the process of storing object feature data and content feature data in the designated storage area, thus improving the retrieval speed.
[0142] In one exemplary embodiment, see Figure 5 , Figure 5 Is Figure 4 The flowchart illustrates a data processing method proposed based on the given information. This method can be applied to... Figure 1 The implementation environment shown can be composed of Figure 1 The terminal device 110 in the implementation environment shown can execute this, or it can be performed by... Figure 1 The server 120 in the implementation environment shown can perform the operation, or it can be performed by... Figure 1 The terminal device 110 and server 120 in the implementation environment shown execute together.
[0143] like Figure 5As shown, step S210 may include steps S510-S540, which are described in detail below:
[0144] Step S510: Obtain the object feature data of the target object to which the target content request to be processed belongs.
[0145] Optionally, object feature data can be found based on the object identifier contained in the target content request.
[0146] Step S520: Find the first number of push content based on the object feature data, and find the content feature data corresponding to the first number of push content in the second cache area.
[0147] The specific value of the first quantity can be flexibly set according to actual needs, for example, it can be 100, 200, etc.
[0148] First, based on the target content, request the object feature data of the target object to find the first number of push content items. Optionally, a recall algorithm can be used to recall the first number of content identifiers of interest to the target object from the inverted index database based on the object feature data, and the push content corresponding to the first number of content identifiers is used as the first number of push content items. The inverted index database may contain content feature data and at least one content identifier corresponding to the content feature data.
[0149] To obtain the content feature data corresponding to the first number of push content items, we can first search in the second cache area.
[0150] Step S530: If the content feature data of any push content in the first number of push content items cannot be found in the second cache area, then the content feature data of any push content item is searched from the content feature database and added to the second cache area.
[0151] For any push content in the first number of push content, if the second cache area does not contain the content feature data corresponding to the push content, the content feature data of the push content can be searched from the content feature database and added to the second cache area.
[0152] Optionally, the content feature database may include a forward index database, which may contain each content identifier and the corresponding content feature data. The corresponding content feature data can be retrieved from the forward index database based on the content identifier of the pushed content.
[0153] Step S540: Select a second number of target push content items from the first number of push content items based on the content feature data and object feature data corresponding to the first number of push content items; wherein the second number is less than the first number.
[0154] The second quantity is less than the first quantity. The second quantity can be 10, 20, etc., and the specific value can be flexibly set according to actual needs.
[0155] Based on the content feature data corresponding to the first number of push content items, a second number of push content items that match the object feature data of the target object to which the target content request belongs are searched from the first number of push content items, and the second number of push content items are used as the target push content of the target content request.
[0156] In an optional implementation, for a first number of push content items, the matching degree between the content feature data of each push content item and the object feature data of the target object to which the target content request belongs can be calculated. Then, a second number of push content items are extracted from the first number of push content items in descending order of their corresponding matching degrees to obtain the target push content. The matching degree between the content feature data and the object feature data can be calculated using a push algorithm.
[0157] Optionally, the accuracy of the recall algorithm is lower than that of the push algorithm. The recall algorithm can be implemented using a machine learning model, and so can the push algorithm. After generating the dataset corresponding to the target content request, the recall algorithm and the push algorithm can be updated based on this dataset.
[0158] Optionally, to reduce the storage pressure on the second cache area and ensure timely updates to the content feature data there, the storage duration of each piece of content feature data in the second cache area can be detected. If the storage duration of any content feature data in the second cache area is greater than or equal to a first duration threshold, then that content feature data is deleted from the second cache area. In other words, for any piece of content feature data, if its storage duration in the second cache area reaches the first duration threshold, that content feature data is deleted from the second cache area. This method not only reduces the storage pressure on the second cache area but also ensures timely updates to the cached content feature data, guaranteeing that the content feature data for the same content in the second cache area matches the content feature data in the object feature database, thus improving the real-time performance of the content feature data in the second cache area. The specific value of the first duration threshold can be flexibly set according to actual needs; for example, it could be 1 minute, 2 minutes, etc.
[0159] It should be noted that, Figure 5The specific implementation details of steps S220-S230 shown can be found in [reference]. Figure 2 Steps S220-S230 are shown. Figure 5 The specific implementation details of steps S320-S330 shown can be found in [reference]. Figure 3 Steps S320-S330 shown are not repeated here.
[0160] exist Figure 5 In the illustrated embodiment, a first number of push content items are first retrieved based on the object feature data of the target object. Then, based on the content feature data corresponding to the first number of push content items and the object feature data of the target object, a second number of target push content items are selected from the first number of push content items. This hierarchical search for target push content not only improves the matching degree between the target push content and the object feature data of the target object, but also saves resources by only needing to obtain the content feature data corresponding to the second number of push content items. Furthermore, in the process of selecting the second number of target push content items from the first number of push content items, the content feature data corresponding to the first number of push content items is first searched in the second cache area. If it is not found, the content feature data is then searched in the content feature dataset, which can improve the search speed of content feature data and improve the search efficiency of target push content.
[0161] In one exemplary embodiment, see Figure 6 , Figure 6 Is Figure 3 The flowchart illustrates a data processing method proposed based on the given information. This method can be applied to... Figure 1 The implementation environment shown can be composed of Figure 1 The terminal device 110 in the implementation environment shown can execute this, or it can be performed by... Figure 1 The server 120 in the implementation environment shown can perform the operation, or it can be performed by... Figure 1 The terminal device 110 and server 120 in the implementation environment shown execute together.
[0162] like Figure 6 As shown, given that the aggregation operation data includes the request identifier of the target content request and the content identifier of the target push content, step S310 may include step S610, which is detailed below:
[0163] Step S610: Associate and store the content feature data and content identifier of the target push content in a set storage area, and associate and store the request identifier and object feature data of the target content request in a set storage area.
[0164] Each aggregated operation data entry contains the request identifier of the content request and the content identifier of the pushed content. Correspondingly, the aggregated operation data for the target content request contains the request identifier of the target content request. This request identifier is used to locate the object feature data of the target object to which the target content request belongs. Therefore, during the process of storing the object feature data of the target object to which the target content request belongs in the designated storage area, the request identifier of the target content request can be associated with the object feature data of the target object to which the target content request belongs. The associated data is then stored in the designated storage area. In other words, the designated storage area contains the mapping relationship between the request identifier of each content request and the object feature data of the target object to which the content request belongs. The specific association method can be flexibly set according to actual needs. In one optional example, the request identifier of the target content request can be added to the object feature data of the target object to which the target content request belongs, resulting in updated object feature data, which is then stored in the designated storage area. In another optional example, the designated storage area can use key-value pairs to store the request identifier of the target content request and the corresponding object feature data, where the key is the request identifier of the target content request and the value is the object feature data of the target object.
[0165] The aggregated operation data for the target content request includes the content identifier of the target push content. This content identifier is used to locate the content feature data of the target push content. During the process of storing the content feature data of the target push content in a designated storage area, the content feature data and the content identifier of the target push content can be associated first, and then the associated data can be stored in the designated storage area. In other words, the designated storage area contains the mapping relationship between the content identifier of each push content and its content feature data. The specific association method can be flexibly set according to actual needs. In one optional example, the content identifier of the target push content can be added to the content feature data of the target push content to obtain updated content feature data, which is then stored in the designated storage area. In another optional example, the designated storage area can store the content feature data and content identifier of the target push content in a key-value pair format, where the key is the content identifier of the target push content and the value is the content feature data of the target push content.
[0166] Under these conditions, step S320 may include step S620, which is detailed below:
[0167] Step S620: Locate the object feature data in the designated storage area that matches the request identifier in the aggregate operation data, and the content feature data that matches the content identifier in the aggregate operation data.
[0168] After obtaining the aggregated operation data of the target content request, the corresponding object feature data is searched in the designated storage area according to the request identifier contained in the aggregated operation data. The searched object feature data is the object feature data of the target object to which the target content request belongs. Then, according to the content identifier contained in the aggregated operation data, the corresponding content feature data is searched in the designated storage area. The searched content feature data is the content feature data of the target push content.
[0169] In an optional implementation, different content requests may push the same content, but the generation times of different content requests are different, which may cause the referenced content feature data during the search process to be different. This results in a designated storage area containing different content feature data for the same content. To obtain the correct content feature data during the generation of the content request dataset, in step S610, the request identifier of the target content request, the content feature data of the target push content, and the content identifier of the target push content can be associated and stored in the designated storage area. In step S620, the associated request identifier can be searched in the designated storage area to find content feature data that matches the request identifier contained in the aggregation operation data of the target content request. For example, referring to Table 1 below, both content request 1 and content request 2 contain push content A. During the search for the push content of content request 1, the content feature data of push content A is a1; during the search for the push content of content request 2, the content feature data of push content A is a2. Therefore, in the designated storage area, the content identifier and content feature data of each push content are associated and stored with the corresponding request identifier, so that during the generation of the content request dataset, the correct content feature data can be obtained from the designated storage area based on the request identifier.
[0170] Request identifier Content Identifier Content feature data 1 A a1 1 B b 2 A a2 …… …… ……
[0171] Table 1
[0172] In an optional implementation, to improve search efficiency, in step S610, the content feature data of the target push content, the content identifier of the push content, and the request identifier of the target content request can be associated and stored in a set storage area. That is, the set storage area contains the mapping relationship between the request identifier of the content request, the content identifier of the push content, and the content feature data of the push content. In step S620, the request identifier can be parsed from the aggregation operation data of the target content request, the data associated with the request identifier can be searched in the set storage area, and then the object feature data and content feature data can be obtained from the searched data.
[0173] It should be noted that, Figure 3The specific implementation details of steps S210-S230 shown can be found in [reference]. Figure 2 Steps S210-S230 are shown. Figure 6 For detailed implementation of step S330 shown, please refer to [link / reference]. Figure 3 Step S330 shown will not be repeated here.
[0174] exist Figure 6 In the illustrated embodiment, the content feature data and content identifier of the target pushed content are associated and stored in a designated storage area, and the request identifier and object feature data of the target content request are associated and stored in the designated storage area. The aggregated operation data includes the request identifier of the target content request and the content identifier of the target pushed content. This allows the corresponding content feature data to be retrieved from the designated storage area based on the content identifier contained in the aggregated operation data, and the corresponding object feature data to be retrieved from the designated storage area based on the request identifier contained in the aggregated operation data. This not only improves the speed of retrieving the content feature data and object feature data corresponding to the aggregated operation data from the designated storage area, but also improves the accuracy of the retrieved content feature data and object feature data.
[0175] In one exemplary embodiment, see Figure 7 , Figure 7 Is Figure 2 The flowchart illustrates a data processing method proposed based on the given information. This method can be applied to... Figure 1 The implementation environment shown can be composed of Figure 1 The terminal device 110 in the implementation environment shown can execute this, or it can be performed by... Figure 1 The server 120 in the implementation environment shown can perform the operation, or it can be performed by... Figure 1 The terminal device 110 and server 120 in the implementation environment shown execute together.
[0176] like Figure 7 As shown, if each piece of operation data contains a request identifier for the content request it belongs to, step S230 may include steps S710-S730, which are described in detail below:
[0177] Step S710: Generate push information for the target content request based on the content identifier of the target content request, and add the push information for the target content request to the third message queue.
[0178] The third message queue is used to store push information for content requests, which includes the request identifier. The specific type of the third message queue can be flexibly configured according to actual needs, including but not limited to Kafka message queues.
[0179] To determine which content requests need to be aggregated during the aggregation process, push information for the target content request can be generated based on the request identifier of the target content request. After pushing the target content request to the object, the push information for the target content request is added to the third message queue.
[0180] In an optional implementation, upon receiving a confirmation message, the push information for the target content request can be parsed from the confirmation message and added to a third message queue.
[0181] Step S720: Extract the push information of the target content request from the third message queue, and search the first message queue for operation data whose request identifier matches the request identifier contained in the extracted push information.
[0182] The push information of each content request is extracted from the third message queue, and the operation data is aggregated based on the extracted push information. The aggregation process of the operation data of each content request is the same as the aggregation process of the operation data of the target content request, and will not be described again here.
[0183] After extracting the push information of the target content request, the operation data containing the request identifier that matches the request identifier contained in the push information can be searched from the first message queue. In other words, the request identifier contained in the searched operation data matches the request identifier contained in the push information.
[0184] Step S730: Aggregate the found operation data and the extracted push information to obtain the aggregated operation data corresponding to the target content request.
[0185] The retrieved operation data and extracted push information are aggregated to obtain the aggregated operation data corresponding to the target content request.
[0186] Optionally, the push message for the target content request may also include the content identifier of the target push content. If it contains multiple content identifiers, i.e., there are multiple target push content items, then total aggregated operation data corresponding to the target content request can be created, and aggregated operation data corresponding to each content identifier (i.e., aggregated operation data corresponding to each target push content item) can be created in the total aggregated operation data. Then, for the retrieved operation data, the aggregated operation data to which the operation data belongs can be found from the aggregated operation data corresponding to multiple content identifiers based on the content identifier contained in the operation data, and the operation data can be added to the retrieved aggregated operation data, thereby obtaining the aggregated operation data corresponding to multiple target push content items respectively, and thus obtaining the total aggregated operation data corresponding to the target content request.
[0187] It should be noted that, Figure 7The specific implementation details of steps S210-S220 and S240 shown can be found in [reference]. Figure 2 Steps S210-S220 and S240 shown will not be repeated here.
[0188] exist Figure 7 In the illustrated embodiment, push information for the target content request is generated based on the content identifier of the target content request, and the push information is added to a third message queue. Then, the push information for the target content request is extracted from the third message queue, and operation data matching the request identifier contained in the extracted push information is searched from the first message queue. The searched operation data and the extracted push information are aggregated to obtain the aggregated operation data corresponding to the target content request. Compared with the scheme of aggregating the operation data contained in the first message queue without any reference, this embodiment can determine the content request that needs to be aggregated based on the push information extracted from the third message queue, and aggregate the operation data contained in the first message queue with the request identifier contained in the extracted push information as a reference, which can improve the efficiency and accuracy of operation data aggregation.
[0189] In one exemplary embodiment, see Figure 8 , Figure 8 Is Figure 2 The flowchart illustrates a data processing method proposed based on the given information. This method can be applied to... Figure 1 The implementation environment shown can be composed of Figure 1 The terminal device 110 in the implementation environment shown can execute this, or it can be performed by... Figure 1 The server 120 in the implementation environment shown can perform the operation, or it can be performed by... Figure 1 The terminal device 110 and server 120 in the implementation environment shown execute together.
[0190] like Figure 8 As shown, under the condition that the first message queue contains message queues corresponding to various operation types, step S220 may include steps S810-S820, which are described in detail below:
[0191] Step S810: Push the target content to the target object.
[0192] The specific method for pushing target content to the recipient can be flexibly set according to actual needs.
[0193] Step S820: Obtain each operation data of the target object on the target push content, and add each operation data to the message queue corresponding to the operation type of each operation data.
[0194] There are various operation types, such as likes, shares, and comments. Multiple first message queues can be set up for each operation type. After obtaining each operation data point from the target object's request for push content, the operation type of each data point can be determined. Then, the message queue corresponding to the operation type of each data point is searched from the message queues corresponding to the various operation types, and each data point is added to the searched message queue. For example, like operation data is added to the like message queue, and comment operation data is added to the comment message queue.
[0195] Under these conditions, step S230 may include step S830, which is detailed below:
[0196] Step S830: Search for the operation data of the target object on the target push content from the message queues corresponding to the various operation types, and aggregate the searched operation data to obtain the aggregated operation data corresponding to the target content request.
[0197] Operation data is extracted from the message queues corresponding to various operation types. If the operation data pertains to the operation of the target content request on the target pushed content, it is added to the aggregated operation data of the target content request. Specifically, the operation data can be used to determine whether it pertains to the operation of the target content request on the target pushed content by checking if the request identifier contained within it matches the request identifier of the target content request.
[0198] It should be noted that, Figure 8 The specific implementation details of steps S210 and S240 shown can be found in [reference]. Figure 2 Steps S210 and S240 shown will not be repeated here.
[0199] exist Figure 8 In the illustrated embodiment, considering that the amount of operation data is usually large, adding different types of operation data to the same message queue would increase the storage pressure on the message queue, easily causing operation data congestion and message queue crashes, reducing the efficiency of adding operation data to the message queue, and consequently reducing the efficiency of operation data aggregation and data set generation. Therefore, in this embodiment, message queues corresponding to multiple operation types are set up so that operation data is added to the corresponding message queue according to the operation type, reducing the storage pressure of each message queue, reducing the probability of operation data congestion and message queue crashes, and improving the efficiency of adding operation data to the message queue. Furthermore, searching for operation data from the message queues corresponding to multiple operation types for aggregation can improve the efficiency of operation data aggregation.
[0200] In one exemplary embodiment, see Figure 9 , Figure 9 Is Figure 2 The flowchart illustrates a data processing method proposed based on the given information. This method can be applied to... Figure 1 The implementation environment shown can be composed of Figure 1 The terminal device 110 in the implementation environment shown can execute this, or it can be performed by... Figure 1 The server 120 in the implementation environment shown can perform the operation, or it can be performed by... Figure 1 The terminal device 110 and server 120 in the implementation environment shown execute together.
[0201] like Figure 9 As shown, step S230 may include step S910, which is described in detail below:
[0202] Step S910: The aggregation service aggregates the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request, and adds the aggregated operation data corresponding to the target content request to the second message queue; wherein, the aggregation service includes a streaming service.
[0203] The second message queue is used to store aggregation operation data. Its specific type can be flexibly set according to actual needs, including but not limited to Kafka message queues.
[0204] The aggregation service consumes operation data from the first message queue to aggregate the operation data and obtain aggregated operation data. Specifically, the aggregation service can search the first message queue for multiple operation data entries of the target object to which the target content request belongs to the target content, and aggregate the multiple operation data entries to obtain the aggregated operation data corresponding to the target content request. Then, the obtained aggregated operation data is added to the second message queue.
[0205] Optionally, if a third message queue and message queues corresponding to various operation types are included, the aggregation service extracts the push information of the target content request from the third message queue, and searches for the operation data corresponding to the target content request from the message queues corresponding to the various operation types based on the push information of the target content request, and then aggregates it. In other words, the aggregation service can consume data from the message queues corresponding to the various operation types and the third message queue to complete the aggregation of operation data and push information. To improve processing speed, the aggregation service can be a streaming service. Of course, in other embodiments, the aggregation service can also be other types of services. The streaming service can be FlinkJoiner, which is an operation that can merge two or more data streams based on certain conditions. Streaming services can also be other types of services.
[0206] Correspondingly, step S240 may include steps S920-S930, detailed as follows:
[0207] Step S920: Extract the aggregated operation data corresponding to the target content request from the second message queue through the generation service, and find the object feature data of the target object to which the target content request belongs and the content feature data of the target pushed content based on the extracted aggregated operation data.
[0208] The generation service is used to generate the data set corresponding to the content request. The generation service and the aggregation service are not the same service. Optionally, to save resources, the generation service type does not have to be a streaming service. Of course, the generation service can also be a streaming service.
[0209] The generation service can consume aggregated operation data from the second message queue to generate a corresponding data set based on the aggregated operation data. Specifically, after consuming the aggregated operation data of the target content request, it can look up the object feature data of the target object to which the target content request belongs and the content feature data of the target pushed content based on the aggregated operation data.
[0210] Step S930: Generate a data set corresponding to the target content request based on the extracted aggregation operation data, as well as the found object feature data and content feature data.
[0211] The dataset corresponding to the target content request includes the aggregate operation data corresponding to the target content request, the object feature data of the target object to which the target content request belongs, and the content feature data of the target pushed content.
[0212] It should be noted that, Figure 9 The specific implementation details of steps S210-S220 shown can be found in [reference]. Figure 2 Steps S210-S220 shown will not be repeated here.
[0213] exist Figure 9In the illustrated embodiment, an aggregation service aggregates the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request, and adds the aggregated operation data corresponding to the target content request to the second message queue. A generation service extracts the aggregated operation data corresponding to the target content request from the second message queue, and finds the object feature data of the target object to which the target content request belongs and the content feature data of the target pushed content based on the extracted aggregated operation data. Based on the extracted aggregated operation data and the found object feature data and content feature data, a data set corresponding to the target content request is generated. Thus, the aggregation of operation data and the generation of data sets are achieved through different services, thereby reducing the processing pressure of each service, reducing the possibility of service crashes, and improving aggregation efficiency and stability. Furthermore, for operation data with a large amount of data, a high-throughput, low-latency streaming service is used as the aggregation service to improve the aggregation efficiency of operation data.
[0214] To better understand this invention, a specific example is provided here. The data processing method includes three steps: data reporting, operational data aggregation, and sample generation.
[0215] See Figure 10 As shown, the data reporting process may include steps S1001-S1017, which are described in detail below:
[0216] Step S1001: The proxy server obtains the content request initiated by the target object through the client.
[0217] A content request can include a TraceId and the object identifier of the target object. The TraceId is the request identifier, used to uniquely identify the content request; that is, different content requests will have different TraceIds.
[0218] In step S1002, the proxy server sends the content request to the recommendation system.
[0219] The proxy server sends content requests initiated by the target object to the recommendation system.
[0220] Step S1003: The recommendation system sends a request to the object service to obtain object feature data.
[0221] Optionally, the request may include the object identifier corresponding to the content request. The object service includes an object feature database for managing and maintaining object feature data of different target objects contained in the object feature database, including but not limited to updating object feature data.
[0222] Step S1004: The object service sends object feature data to the recommendation system.
[0223] The object service retrieves the corresponding object feature data from the object feature database based on the object identifier contained in the request for obtaining object feature data, and then sends the object feature data to the recommendation system.
[0224] In step S1005, the recommendation system updates the object feature data to the first cache area.
[0225] After receiving the object feature data, the recommendation system updates the object feature data to the first cache area. The first cache area stores data in the form of key-value pairs, where the key of the object feature data is the TraceId of the corresponding content request.
[0226] Step S1006: The recommendation system searches for content feature data in the second cache area.
[0227] Optionally, the recommendation system can use a recall algorithm to retrieve a first number of content identifiers from the inverted index service, which contains an inverted index database, based on the received object feature data. Then, the recommendation system can search for the content feature data corresponding to these first number of content identifiers in a second cache area.
[0228] Step S1007: If no content feature data is found in the second cache area, request the content feature data from the forward index service.
[0229] Specifically, for any content identifier among the first number of content identifiers, if the content feature data corresponding to that content identifier is not found in the second cache area, a request is made to the forward index service to retrieve the content feature data corresponding to that content identifier. The forward index service includes a forward index database.
[0230] In step S1008, the forward index service sends the content feature data to the recommendation system.
[0231] The forward index service searches for the corresponding content feature data based on the request and sends it to the recommendation system.
[0232] In step S1009, the recommendation system adds the received content feature data to the second cache area.
[0233] After receiving content feature data from the forward indexing service, the content feature data is stored in the second cache area. In the second cache area, the key for the content feature data is ItemId. ItemId is the content identifier of the pushed content, used to uniquely identify the pushed content; different pushed content will have different ItemIds.
[0234] Step S1010: The recommendation system predicts multiple push content items that the target audience likes.
[0235] The recommendation system can calculate the matching degree between the content feature data corresponding to the first number of content identifiers and the object feature data of the target object, and select the second number of content feature data from the content feature data corresponding to the first number of content identifiers in descending order of matching degree. The push content to which the second number of content feature data belongs is the push content of the content request, that is, the push content predicted to be liked by the target object.
[0236] In step S1011, the recommendation system sends the push list to the proxy server.
[0237] The push list contains the TraceId of the content request and the ItemId of multiple predicted push content. Optionally, these ItemIds can be sorted in descending order of matching degree so that the push content corresponding to the ItemId can be obtained and pushed to the target object in that order.
[0238] In step S1012, the proxy server sends the push list to the target client.
[0239] Optionally, the proxy server can send the push list to the client corresponding to the target object, so that the client can obtain the push content according to the push list and push it to the target object.
[0240] In step S1013, the agent server sends a confirmation message to the recommendation system.
[0241] After the proxy server successfully sends the push list to the target audience, it can send a confirmation message to the recommendation system to notify the system that the push list has been successfully sent and trigger data reporting. The confirmation message contains the push list.
[0242] In step S1014, the recommendation system retrieves object feature data from the first cache area and writes it to the designated storage area.
[0243] The recommendation system retrieves the push list from the confirmation message, searches for the corresponding object feature data in the first cache area based on the TraceId contained in the recommendation list, writes the object feature data into the designated storage area, and deletes the object feature data from the first cache area.
[0244] In step S1015, the recommendation system retrieves content feature data from the second cache area and writes it to the designated storage area.
[0245] Based on the ItemId contained in the recommendation list, retrieve the corresponding content feature data from the second cache area and write the content feature data to the designated storage area. The designated storage area is the SOS storage area.
[0246] In the storage area, the key for content feature data is its corresponding ItemId, and the key for object feature data is its corresponding TraceId.
[0247] Optionally, for content feature data in the second cache area, if the storage time of the content feature data reaches 1 minute, the content feature data is deleted from the second cache area.
[0248] In step S1016, the recommendation system adds the push list to the third message queue.
[0249] Add the push list from the confirmation message to the third message queue used to store the push list.
[0250] See Figure 11 As shown, the data aggregation process includes:
[0251] Set up message queues for different operation types, and obtain the operation data of the target object on the pushed content. Add the operation data to the corresponding message queue according to the operation type of the operation data. Each operation data contains the TraceId of the content request and the ItemId of the pushed content. For example, one operation data is a click operation data for ItemId1 and TraceId1, which contains ItemId1 and TraceId1.
[0252] Using a streaming service, based on TraceId and ItemId, operation data from message queues corresponding to different operation types and push lists from message queues corresponding to push lists (i.e., the third message queue) are aggregated to obtain aggregated operation data. Each aggregated operation data entry contains operation data corresponding to one TraceId and one ItemId, thus combining different types of operation data from a single request to a single push content. For example, the aggregated operation data corresponding to ItemId1 and TraceId1 contains operation data for clicks, plays, and comments, respectively. Playback operation data can include playback duration. The streaming service can be FlinkJoiner, an operation that can merge two or more data streams based on certain conditions.
[0253] Then, the obtained aggregation operation data is added to the message queue corresponding to the aggregation operation data.
[0254] See Figure 12 As shown, the sample generation process includes:
[0255] The service consumes aggregated operation data from the message queue corresponding to the aggregated operation data, retrieves the TraceId and ItemId from the aggregated operation data, and searches for object feature data in a designated storage area based on the TraceId and content feature data in the designated storage area based on the ItemId. Then, it generates a data sample containing the aggregated operation data, object feature data, and content feature data. For example, the data sample corresponding to TraceId1 and ItemId1 contains object feature data, content feature data, and aggregated behavior data.
[0256] In this embodiment, the aggregation of operational data and the generation of the data set are separated into two environments. During the aggregation of operational data, object feature data and content feature data are stored in a designated storage area, reducing the load on the streaming service used for aggregating operational data, improving aggregation stability, reducing memory consumption, and lowering costs. Furthermore, the object feature data and the content feature data of the target push content are first stored in the designated storage area. During the generation of the data sample for the target content request, the object feature data and the content feature data of the target push content stored in the designated storage area are then added to the data sample. This ensures that the object feature data and the content feature data of the target push content contained in the data sample are consistent with the object feature data and the content feature data of the target push content referenced during the search for the target push content. This avoids inconsistencies caused by frequent changes in the content feature data and object feature data, thus improving the accuracy of the data sample.
[0257] See Figure 13 , Figure 13 This is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of this application. Figure 13 As shown, the device includes:
[0258] The lookup module 1301 is configured to obtain the object feature data of the target object to which the target content request belongs, and to find the target push content of the target content request based on the object feature data and the content feature data of each push content.
[0259] Add module 1302, configured to push target content to target objects, and add the target object's operation data on the target content to the first message queue;
[0260] The aggregation module 1303 is configured to aggregate the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request.
[0261] The generation module 1304 is configured to generate a data set corresponding to the target content request based on the aggregated operation data, object feature data, and content feature data of the target push content.
[0262] In one exemplary embodiment, based on the foregoing solution, the device further includes a storage module configured as follows:
[0263] After obtaining the object feature data of the target object to which the target content request belongs, and finding the target push content of the target content request based on the object feature data and the content feature data of each push content, the content feature data of the target push content and the obtained object feature data are stored in the set storage area.
[0264] The specific configuration of generation module 1304 is as follows:
[0265] Based on the aggregated operation data, retrieve object feature data and target push content content feature data from the designated storage area;
[0266] Based on the aggregated operation data, as well as the found object feature data and content feature data, a data set corresponding to the target content request is generated.
[0267] In an exemplary embodiment, based on the foregoing scheme, the storage module is specifically configured as follows:
[0268] The acquired object feature data is stored in the first cache area;
[0269] If the target content is successfully pushed to the target object, the object feature data contained in the first cache area will be moved to the designated storage area.
[0270] The content feature data of the target push content is retrieved from the second cache area and stored in the designated storage area.
[0271] In an exemplary embodiment, based on the foregoing scheme, the lookup module 1301 is specifically configured as follows:
[0272] Based on the object feature data, find the first number of push content items and then find the content feature data corresponding to the first number of push content items from the second cache area;
[0273] If the content feature data of any push content in the first number of push content is not found in the second cache area, then the content feature data of any push content is searched in the content feature database and added to the second cache area.
[0274] Based on the content feature data and object feature data corresponding to the first number of push content items, a second number of target push content items are selected from the first number of push content items; wherein, the second number is less than the first number.
[0275] In one exemplary embodiment, based on the foregoing solution, the apparatus further includes a deletion module, specifically configured as follows:
[0276] The storage duration of each content feature data contained in the second cache area is detected in the second cache area;
[0277] If the storage duration of any content feature data in the second cache area is greater than or equal to the first duration threshold, then the content feature data is deleted from the second cache area.
[0278] In an exemplary embodiment, based on the foregoing scheme, the storage module is specifically configured as follows:
[0279] The content feature data of the target push content is compressed to obtain compressed content feature data, and the compressed content feature data is stored in the designated storage area;
[0280] The acquired object feature data is compressed to obtain compressed object feature data, and the compressed object feature data is stored in a designated storage area.
[0281] In an exemplary embodiment, based on the foregoing scheme, given that the aggregated operation data includes a request identifier for the target content request and a content identifier for the target pushed content, the storage module is specifically configured as follows:
[0282] The content feature data and content identifier of the target push content are associated and stored in a designated storage area, and the request identifier and object feature data of the target content request are associated and stored in a designated storage area.
[0283] The specific configuration of generation module 1304 is as follows:
[0284] Find the object feature data in the specified storage area that matches the request identifier in the aggregate operation data, and the content feature data that matches the content identifier in the aggregate operation data.
[0285] In an exemplary embodiment, based on the aforementioned scheme, the aggregation module 1303 is specifically configured to: aggregate the operation data of the target object on the target pushed content contained in the first message queue through the aggregation service to obtain the aggregated operation data corresponding to the target content request, and add the aggregated operation data corresponding to the target content request to the second message queue; wherein, the aggregation service includes a streaming service;
[0286] The specific configuration of generation module 1304 is as follows:
[0287] The service extracts the aggregated operation data corresponding to the target content request from the second message queue, and finds the object feature data of the target object to which the target content request belongs and the content feature data of the target pushed content based on the extracted aggregated operation data.
[0288] Based on the extracted aggregation operation data, as well as the found object feature data and content feature data, a data set corresponding to the target content request is generated.
[0289] In an exemplary embodiment, based on the aforementioned scheme, and provided that each piece of operation data includes the content identifier of the pushed content and the request identifier of the content request, the aggregation module 1303 is specifically configured as follows:
[0290] Search the first message queue for multiple operation data entries whose request identifiers match the request identifier of the target content request;
[0291] If there are multiple target push content items, then based on the content identifier contained in each of the multiple operation data items, find the operation data corresponding to each target push content item from the multiple operation data items;
[0292] The candidate operation data corresponding to each target push content is aggregated to obtain the aggregated operation data corresponding to each target push content, and the aggregated operation data corresponding to each target push content is used as the aggregated operation data corresponding to the target push content.
[0293] In an exemplary embodiment, based on the foregoing scheme, and provided that each piece of operation data contains a request identifier for the content request to which it belongs, the aggregation module 1303 is specifically configured as follows:
[0294] The push information for the target content request is generated based on the content identifier of the target content request, and the push information for the target content request is added to the third message queue;
[0295] Extract the push information of the target content request from the third message queue, and search the first message queue for operation data that matches the request identifier contained in the extracted push information.
[0296] The retrieved operation data and extracted push information are aggregated to obtain the aggregated operation data corresponding to the target content request.
[0297] In an exemplary embodiment, based on the foregoing scheme, and assuming the first message queue contains message queues corresponding to various operation types, the addition module 1302 is specifically configured as follows:
[0298] Retrieve each operation data of the target object on the target push content, and add each operation data to the message queue corresponding to the operation type of each operation data;
[0299] The specific configuration of the aggregation module 1303 is as follows:
[0300] From the message queues corresponding to various operation types, search for the operation data of the target object on the target push content, and aggregate the found operation data to obtain the aggregated operation data corresponding to the target content request.
[0301] In an exemplary embodiment, based on the foregoing scheme, the aggregation module 1303 is specifically configured as follows:
[0302] Get the push time when the target content is pushed to the target object, and calculate the time difference between the current time and the push time;
[0303] If the time difference is less than the second duration threshold, then retrieve the target object's operation data on the target pushed content from the first message queue;
[0304] If the time difference equals the second duration threshold, the retrieved operation data is aggregated to obtain the aggregated operation data corresponding to the target content request.
[0305] It should be noted that, Figure 13 The data processing apparatus provided is based on the same concept as the data processing method provided in the above embodiments. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments and will not be repeated here.
[0306] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more computer programs, which, when executed by one or more processors, cause the electronic device to implement the data processing methods provided in the above embodiments.
[0307] Figure 14 A schematic diagram of a computer system suitable for implementing an electronic device according to embodiments of this application is shown. The electronic device may be... Figure 1 The terminal device 110 or server 120 shown.
[0308] It should be noted that, Figure 14 The computer system 1400 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0309] like Figure 14As shown, the computer system 1400 includes a Central Processing Unit (CPU) 1401, which can perform various appropriate actions and processes based on a computer program stored in Read-Only Memory (ROM) 1402 or a computer program loaded from storage portion 1408 into Random Access Memory (RAM) 1403, such as executing the data processing method described in the above embodiments. Various computer programs and data required for system operation are also stored in RAM 1403. The CPU 1401, ROM 1402, and RAM 1403 are interconnected via bus 1404. An input / output (I / O) interface 1405 is also connected to bus 1404.
[0310] In some embodiments, the following components are connected to the I / O interface 1405: an input section 1406 including a keyboard, mouse, etc.; an output section 1407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1408 including a hard disk, etc.; and a communication section 1409 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as needed. A removable medium 1411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1410 as needed so that computer programs read from it can be installed into the storage section 1408 as needed.
[0311] In particular, according to embodiments of this application, a computer program implementing the data processing method can be carried on a computer-readable medium, which can be downloaded and installed from a network via the communication section 1409, and / or installed from a removable medium 1411.
[0312] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a computer program that can be used by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer program contained in the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0313] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and a computer program.
[0314] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0315] Another aspect of this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor of an electronic device, causes the electronic device to perform the aforementioned data processing method. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0316] Another aspect of this application provides a computer program product, which includes a computer program that, when executed by a processor, implements the data processing methods provided in the various embodiments described above. The computer program can be stored in a computer-readable storage medium. The computer program product can be a computer program as a product, such as an APP (Application), webpage, mini-program, etc.; or, the computer program product can also be a storage medium, device, terminal, virtual machine, etc., containing the computer program.
[0317] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.
Claims
1. A data processing method, characterized in that, The method includes: Obtain the object feature data of the target object to which the target content request belongs, and find the target push content of the target content request based on the object feature data and the content feature data of each push content; The target push content is pushed to the target object, and the operation data of the target object on the target push content is added to the first message queue; The operation data of the target object on the target pushed content contained in the first message queue is aggregated to obtain the aggregated operation data corresponding to the target content request; Based on the aggregated operation data, the object feature data, and the content feature data of the target push content, a data set corresponding to the target content request is generated.
2. The method as described in claim 1, characterized in that, After obtaining the object feature data of the target object to which the target content request belongs, and finding the target push content of the target content request based on the object feature data and the content feature data of each push content, the method further includes: The content feature data of the target push content and the obtained object feature data are stored in a designated storage area; The step of generating a data set corresponding to the target content request based on the aggregated operation data, the object feature data, and the content feature data of the target push content includes: Based on the aggregated operation data, retrieve the object feature data and the content feature data of the target push content from the designated storage area; Based on the aggregated operation data, as well as the found object feature data and content feature data, a data set corresponding to the target content request is generated.
3. The method as described in claim 2, characterized in that, The step of storing the content feature data of the target pushed content and the acquired object feature data in a designated storage area includes: The acquired object feature data is stored in the first cache area; If the target push content is successfully pushed to the target object, the object feature data contained in the first cache area is moved to the set storage area; The content feature data of the target push content is retrieved from the second cache area and stored in the designated storage area.
4. The method as described in claim 3, characterized in that, The step of finding the target push content of the target content request based on the object feature data and the content feature data of each push content includes: Based on the object feature data, a first number of push content items are retrieved, and the content feature data corresponding to the first number of push content items are retrieved from the second cache area; If the content feature data of any of the first number of push content items cannot be found in the second cache area, then the content feature data of the push content item is searched in the content feature database and added to the second cache area. Based on the content feature data corresponding to the first number of push content items and the object feature data, a second number of target push content items are selected from the first number of push content items; wherein, the second number is less than the first number.
5. The method as described in claim 4, characterized in that, The method further includes: The storage duration of each content feature data contained in the second cache area is detected in the second cache area; If the storage duration of any content feature data in the second cache area is greater than or equal to the first duration threshold, then the content feature data is deleted from the second cache area.
6. The method as described in claim 2, characterized in that, The step of storing the content feature data of the target pushed content and the acquired object feature data in a designated storage area includes: The content feature data of the target push content is compressed to obtain compressed content feature data, and the compressed content feature data is stored in the designated storage area; The acquired object feature data is compressed to obtain compressed object feature data, and the compressed object feature data is stored in the designated storage area.
7. The method as described in claim 2, characterized in that, The aggregated operation data includes the request identifier of the target content request and the content identifier of the target pushed content; The step of storing the content feature data of the target pushed content and the acquired object feature data in a designated storage area includes: The content feature data and content identifier of the target push content are associated and stored in the designated storage area, and the request identifier of the target content request and the object feature data are associated and stored in the designated storage area. The step of searching for the object feature data and the content feature data of the target push content from the designated storage area based on the aggregated operation data includes: The system retrieves object feature data whose associated request identifier matches the request identifier contained in the aggregate operation data, and content feature data whose associated content identifier matches the content identifier contained in the aggregate operation data, from the designated storage area.
8. The method as described in claim 1, characterized in that, The aggregation of the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request includes: The aggregation service aggregates the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request, and adds the aggregated operation data corresponding to the target content request to the second message queue; wherein, the aggregation service includes a streaming service; The step of generating a data set corresponding to the target content request based on the aggregated operation data, the object feature data, and the content feature data of the target push content includes: The service extracts the aggregated operation data corresponding to the target content request from the second message queue, and finds the object feature data of the target object to which the target content request belongs and the content feature data of the target pushed content based on the extracted aggregated operation data; Based on the extracted aggregation operation data, as well as the found object feature data and content feature data, a data set corresponding to the target content request is generated.
9. The method as described in claim 1, characterized in that, Each operation data entry includes the content identifier of the push content and the request identifier of the content request; The aggregation of the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request includes: Search the first message queue for multiple operation data entries whose request identifiers match the request identifier of the target content request; If there are multiple target push content items, then based on the content identifiers contained in each of the multiple operation data items, the operation data corresponding to each target push content item is retrieved from the multiple operation data items; The operation data corresponding to each target push content is aggregated to obtain the aggregated operation data corresponding to each target push content, and the aggregated operation data corresponding to each target push content is used as the aggregated operation data corresponding to the target push content.
10. The method as described in claim 1, characterized in that, Each piece of operation data contains the request identifier of the content it belongs to; The aggregation of the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request includes: Based on the content identifier of the target content request, a push message for the target content request is generated, and the push message for the target content request is added to the third message queue; Extract the push information of the target content request from the third message queue, and search the first message queue for operation data that matches the request identifier contained in the extracted push information. The retrieved operation data and extracted push information are aggregated to obtain the aggregated operation data corresponding to the target content request.
11. The method as described in claim 1, characterized in that, The first message queue contains message queues corresponding to various operation types; The step of adding the operation data of the target object on the target pushed content to the first message queue includes: Obtain each operation data of the target object on the target pushed content, and add each operation data to the message queue corresponding to the operation type of each operation data; The aggregation of the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request includes: From the message queues corresponding to the various operation types, the operation data of the target object on the target push content is retrieved, and the retrieved operation data is aggregated to obtain the aggregated operation data corresponding to the target content request.
12. The method as described in claim 1, characterized in that, The aggregation of the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request includes: Obtain the push time when the target content is pushed to the target object, and calculate the time difference between the current time and the push time; If the time difference is less than the second duration threshold, then retrieve the operation data of the target object on the target pushed content from the first message queue; If the time difference is equal to the second duration threshold, the retrieved operation data is aggregated to obtain the aggregated operation data corresponding to the target content request.
13. A data processing apparatus, characterized in that, The device includes: The search module is configured to obtain object feature data of the target object to which the target content request belongs, and search for the target push content of the target content request based on the object feature data and the content feature data of each push content. Add a module configured to push the target content to the target object and add the target object's operation data on the target content to the first message queue; The aggregation module is configured to aggregate the operation data of the target object on the target pushed content contained in the first message queue to obtain the aggregated operation data corresponding to the target content request. The generation module is configured to generate a data set corresponding to the target content request based on the aggregated operation data, the object feature data, and the content feature data of the target push content.
14. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more computer programs that, when executed by one or more processors, cause the electronic device to perform the method of any one of claims 1-12.
15. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the processor of the electronic device, causes the electronic device to perform the method described in any one of claims 1-12.
16. A computer program product, characterized in that, Includes a computer program that, when executed by a processor of an electronic device, causes the electronic device to perform the method described in any one of claims 1-12.