Live broadcast material processing method and device
By using a combination of message queues and priority queues in live material processing, the communication problems between material status and feature update tasks are solved, efficient and accurate live material updates are achieved, and user experience and retention rates are improved.
Patent Information
- Application Number
- CN202411020145.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-12-03
AI Technical Summary
The material status update task of live broadcast materials and the material feature update task do not communicate independently and do not communicate with each other, resulting in the impact of the update accuracy, which in turn affects the user experience and retention rate.
Receive live data and material feature update data through the first message queue, and write them to the corresponding priority queue respectively, and consume through the same process to ensure that the material status update data and material feature update data collection processing to avoid data conflicts .
It ensures the accuracy and orderliness of live broadcast material updates, improves user experience and retention rates, and avoids data loss and coverage.
Smart Images

Figure CN119065805A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for processing live broadcast materials. Background Art
[0002] The live broadcast recommendation material pool plays a key role in the live broadcast scene, and is used to store and manage the live broadcast materials generated by the anchor. After the live broadcast materials enter the pool, the material status and material characteristics of the live broadcast materials need to be updated in a timely and accurate manner to recommend high-quality live broadcast content to users and improve user experience and retention rate.
[0003] However, in the related art, the material status update task and the material feature update task of the live broadcast material are independent of each other and do not communicate with each other, and there are conflicts between them, which affects the update accuracy and further affects the user experience and retention rate. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a live material processing method and device, which is used to solve the problem that the material status update task and the material feature update task are independent of each other and do not communicate with each other when the live material is updated, and there are conflicts with each other, which affects the update accuracy and further affects the user experience and retention rate.
[0005] In order to achieve the above objectives, the present application embodiment adopts the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a live material processing method, comprising:
[0007] receiving live broadcast data through a first message queue, and receiving material feature update data through a second message queue;
[0008] Through the first process, the first message queue is consumed, material status update data is obtained from the live broadcast data and written into the first priority queue corresponding to the live broadcast material, and the second message queue is consumed, and the material feature update data is written into the first priority queue corresponding to the live broadcast material, wherein each live broadcast material corresponds to a unique first priority queue;
[0009] The first priority queue is consumed by the first process, and the material data of the live broadcast material recorded in the material pool is updated based on the acquired material status update data or material feature update data.
[0010] In a second aspect, an embodiment of the present application provides a live material processing device, comprising:
[0011] A receiving unit, configured to receive live broadcast data through a first message queue, and receive material feature update data through a second message queue;
[0012] a first consumption unit, configured to consume the first message queue through a first process, obtain material status update data from the live broadcast data and write the data into a first priority queue corresponding to the live broadcast material, and consume the second message queue, write the material feature update data into the first priority queue corresponding to the live broadcast material, wherein each live broadcast material corresponds to a unique first priority queue;
[0013] The second consumption unit is used to consume the first priority queue through the first process, and update the material data of the live broadcast material recorded in the material pool based on the acquired material status update data or material feature update data.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method described in the first aspect.
[0016] At least one of the above-mentioned technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: by consuming the first message queue and the second message queue through the first process, the acquired material status update data and material feature update data are written into the first priority queue corresponding to the corresponding live broadcast material, and then the first priority queue is consumed by the first process, and based on the acquired material status update data or material feature update data, the material data of the live broadcast material recorded in the material pool is updated, and the material status update data and the material feature update data are aggregated into the same process for processing, and then the material data of the live broadcast material in the material pool is updated, so as to avoid data conflicts caused by the lack of communication between the status update and the feature update, ensure the accuracy of the update, and improve the user experience and retention rate. In addition, each live broadcast material corresponds to a unique first priority queue, and the material status update data and the material feature update data are written into the first priority queue corresponding to the corresponding live broadcast material through the first process, and then the first priority queue is consumed by the first process, so as to ensure the orderliness of the update of the same live broadcast material, avoid concurrent processing of different update tasks of the same live broadcast material, and then avoid data loss and overwriting, ensure the accuracy of the update, and improve the user experience and retention rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A schematic flow chart of a live material processing method provided for one embodiment of the present application;
[0019] Figure 2A A schematic diagram of a material storage process provided for an embodiment of the present application;
[0020] Figure 2B A schematic diagram of a process for generating feature data provided for an embodiment of the present application;
[0021] Figure 2C A schematic diagram of a material update process provided for an embodiment of the present application;
[0022] Figure 2D A schematic diagram of a material outbound process provided for an embodiment of the present application;
[0023] Figure 3 A schematic diagram of a live broadcast material processing architecture provided for one embodiment of the present application;
[0024] Figure 4 A schematic structural diagram of a live material processing device provided for one embodiment of the present application;
[0025] Figure 5 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0027] The terms "first", "second", etc. in this specification and claims are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the terms used in this way can be interchanged where appropriate so that the embodiments of the present application are implemented in a sequence other than those illustrated or described herein. In addition, "and / or" in this specification and claims means at least one of the connected objects, and the character " / " generally means that the objects associated with each other are in an "or" relationship.
[0028] The live broadcast recommendation material pool plays a key role in the live broadcast scene, and is used to store and manage the live broadcast materials generated by the anchor. After the live broadcast materials enter the pool, the material status and material characteristics of the live broadcast materials need to be updated in a timely and accurate manner to recommend high-quality live broadcast content to users and improve user experience and retention rate.
[0029] However, in the related art, the material status update task and the material feature update task of the live broadcast material are independent of each other and do not communicate with each other, and there are conflicts between them, which affects the update accuracy and further affects the user experience and retention rate.
[0030] In view of this, an embodiment of the present application provides a live material processing method, which consumes the first message queue and the second message queue through a first process, writes the acquired material status update data and material feature update data into the first priority queue corresponding to the live material, and then consumes the first priority queue through the first process. Based on the acquired material status update data or material feature update data, the material data of the live material recorded in the material pool is updated, and the material status update data and the material feature update data are aggregated into the same process for processing, and then the material data of the live material in the material pool is updated, so as to avoid data conflicts caused by the lack of communication between the status update and the feature update, ensure the accuracy of the update, and improve the user experience and retention rate. In addition, each live material corresponds to a unique first priority queue, and the material status update data and the material feature update data are written into the first priority queue corresponding to the live material through the first process, and then the first priority queue is consumed by the first process, which can ensure the orderliness of the update of the same live material, avoid concurrent processing of different update tasks of the same live material, and then avoid data loss and overwriting, ensure the accuracy of the update, and improve the user experience and retention rate.
[0031] Specifically, see Figure 1 , is a flow chart of a live material processing method provided by an embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides a live material processing method, which may include the following steps:
[0032] S102, receiving live broadcast data through the first message queue, and receiving material feature update data through the second message queue.
[0033] Among them, the message queue is a structure for storing and processing data, which can be implemented by a queue, such as Apache Kafka, Redis Streams, etc. In the embodiment of the present application, the message queue for receiving live data is the first message queue, and the message queue for receiving material feature update data is the second message queue.
[0034] Among them, live broadcast data refers to data generated in real time during the live broadcast process, including but not limited to live broadcast materials and their material status, number of views, number of likes, number of clicks, number of exposures, etc., as well as the number of online users in the live broadcast room, the anchor's reward amount, material ID, anchor ID, material creation time, etc. Live broadcast materials are materials generated by the anchor when broadcasting in the live broadcast room, such as text, pictures, videos, audio, etc. Material feature update data is data used to update the material features of live broadcast materials in the material pool. Material features include material statistical features and content attribute features.
[0035] In another embodiment, before receiving the material feature update data through the second message queue, the method may further include the following steps: monitoring the live data received by the first message queue, and performing statistical analysis based on the monitored live data through a distributed stream processing tool to determine the material statistical features;
[0036] Based on a content recognition algorithm that matches the data type of the live data, the live data is subjected to content recognition to obtain content attribute features;
[0037] Generate material feature update data based on material statistical features and content attribute features;
[0038] Write the material feature update data into the second message queue.
[0039] Among them, the distributed stream processing tool is a tool used to process real-time data streams in a distributed computing environment. Common distributed stream processing tools include: Apache Flink, Apache Storm, etc. The first message queue is monitored by a listener. When the first message queue is monitored to receive new live broadcast data, the distributed stream processing tool is used to perform statistical analysis on the monitored live broadcast data to obtain material statistical features. The material statistical features include but are not limited to the number of views, likes, clicks, etc. of the live broadcast material within a preset time, as well as the number of exposures of the live broadcast material, the amount of reward given by the anchor, and the number of online people in the live broadcast room.
[0040] Among them, data types include text, pictures, audio, video and other types. Content recognition algorithms are algorithms used to identify and analyze data content, including: Natural Language Processing (NLP) for text processing, Computer Vision (CV) for image processing and other algorithms. Content attribute features include keywords of text, color distribution of images, frequency of sounds and so on. According to the data type of the live material in the live data, the corresponding content recognition algorithm is matched, and the content of the live material is recognized to obtain content attribute features such as keywords of text type live materials or color distribution of image type live materials. In order to ensure the accuracy and quality of the content attribute features, the content attribute features obtained by the content recognition algorithm need to be manually reviewed for correction or supplementation.
[0041] Based on the material statistical features obtained by statistical analysis and the content attribute features obtained by content identification, material feature update data is generated and written into the second message queue. As an example, the material feature update data can be written into the second message queue by first writing the material feature data into the Redis database, and then periodically pulling the material feature update data from Redis and writing it into the second message queue. Because the Redis database has high availability and durability, it can avoid the loss of material feature data or processing failure due to the availability problem of the second message queue, thereby improving the reliability of the data; secondly, the operation of writing to Redis is usually relatively lightweight, and the scheduled task can be executed during off-peak hours, especially when the amount of data is large, which can share the load of writing to the queue and avoid causing a large load pressure on the queue service; at the same time, data can be quickly read from Redis to ensure the timeliness of the update.
[0042] The embodiment of the present application monitors the live broadcast data received by the first message queue, and through a distributed stream processing tool, performs statistical analysis based on the monitored live broadcast data to determine the statistical characteristics of the materials, so as to quickly process the live broadcast data and ensure the real-time and efficient data update; at the same time, based on a content recognition algorithm that matches the data type of the live broadcast data, content recognition is performed on the live broadcast data to obtain content attribute characteristics, so as to automatically extract content characteristics and statistical information from the live broadcast data, thereby improving the accuracy and precision of data processing and the efficiency of data processing; finally, based on the material statistical characteristics and content attribute characteristics, material characteristic update data is generated, so as to realize the intelligent management and update of the live broadcast materials, thereby improving the quality of the live broadcast content and the audience experience, improving the operational efficiency of the live broadcast platform, and enhancing user stickiness and satisfaction.
[0043] S104, through the first process, consume the first message queue, obtain the material status update data from the live broadcast data and write it into the first priority queue corresponding to the live broadcast material, and consume the second message queue, write the material feature update data into the first priority queue corresponding to the live broadcast material.
[0044] Among them, a process refers to an instance of a program running in a computer system or the execution process of a program. In an embodiment of the present application, a process for consuming the first message queue and the second message queue and writing material status update data and material feature update data into the first priority queue corresponding to the live broadcast material is the first process. Material status data is data used to describe the status of the live broadcast material, including: reservation, broadcast, broadcast, playback and other states. Material status update data refers to the material status data after the status of the live broadcast material is changed. For example: Assuming that the live broadcast data currently obtained contains the material status data (reservation status) of live broadcast material A (newly generated live broadcast material), the material data of live broadcast material A, including material status data (reservation status) is added to the material pool, and the next live broadcast data obtained contains material data for live broadcast material A, including material status data (on-broadcast status). It can be seen that the status of live broadcast material A has changed from reservation status to on-broadcast status. At this time, the material status data (on-broadcast status) of live broadcast material A obtained from the live broadcast data is the material status update data.
[0045] Among them, the priority queue refers to a data structure, and the elements in the priority queue are sorted according to priority. In the embodiment of the present application, the priority queue for storing and processing material status update data and material feature update data is the first priority queue. The priority order of the elements in the first priority queue is that the priority of the material feature update data is higher than the priority of the material status update data. When the first priority queue is consumed by the first process later, the consumption order of the data in the first priority queue is determined according to the priority to ensure the orderliness of the live material update, and avoid concurrent processing of the status update and feature update of the same live material, thereby avoiding data conflicts, ensuring update accuracy, and improving user experience and retention rate.
[0046] As an example, the first process obtains material status update data and material feature update data carrying material identification. The material identification is a unique identifier of the live broadcast material, such as anchor ID, material ID, etc. ID (Identification Document) is usually an identifier obtained by combining numbers, letters, etc. When the first process obtains the target data, that is, material status update data or material feature update data, it first determines the target first priority queue based on the material identification carried in the target data, and writes the obtained target data into the target first priority queue.
[0047] As an example, the data generated in real time in the live broadcast room is sent to the first message queue in the form of log messages. Before the above-mentioned first process writes the acquired material status update data into the first priority queue corresponding to the live broadcast material, it is also necessary to parse the log message, filter the parsed data to obtain the required live broadcast data, obtain the material status update data from the live broadcast data, and then write the acquired material status update data into the first priority queue corresponding to the live broadcast material. This can optimize the data processing process, improve the system's maintainability, performance and fault tolerance, and make data flow more efficient and reliable.
[0048] As an optional implementation, the above S104 may include the following steps: creating a first thread and a second thread in the first process, and running the first thread and the second thread in parallel;
[0049] Through the first thread, the first message queue is consumed, and the material status update data is obtained from the live broadcast data and written into the first priority queue corresponding to the live broadcast material; and,
[0050] Through the second thread, the second message queue is consumed, and the material feature update data is written into the first priority queue corresponding to the live broadcast material.
[0051] Among them, a thread is the smallest unit of a process. In an embodiment of the present application, the thread used to consume the first message queue and obtain material status update data from the live broadcast data and write it into the first priority queue corresponding to the live broadcast material is the first thread; the thread used to consume the second message queue and write material feature update data into the first priority queue corresponding to the live broadcast material is the second thread. As an example, the number of first threads and second threads can be multiple. By running multiple first threads and multiple second threads in parallel, the update speed of live broadcast materials can be improved, thereby improving user experience and retention rate.
[0052] The embodiment of the present application creates a first thread and a second thread in a first process, which are used to consume the first message queue and the second message queue respectively, and writes the acquired target data, namely the material status update data or the material feature update data, into the first priority queue corresponding to the corresponding live broadcast material. By running the first thread and the second thread in parallel, multi-threaded parallel processing of the data in the first message queue and the second message queue is implemented, so as to achieve the effect of efficient consumption and processing of live broadcast data, improve the speed and efficiency of data processing, and ensure the timeliness and accuracy of the live broadcast material status update data and feature update data at the same time, thereby ensuring the timeliness and effectiveness of the update, and improving the performance and user experience of the live broadcast platform.
[0053] As an optional implementation, when writing the acquired material status update data and material feature update data into the first priority queue corresponding to the live broadcast material, the following steps may be included: performing a hash calculation on the material identifier carried by the material status update data to obtain a first hash value, and writing the material status update data into the first priority queue corresponding to the first hash value;
[0054] A hash calculation is performed on the material identification carried by the material feature update data to obtain a second hash value, and the material feature update data is written into the first priority queue corresponding to the second hash value; wherein the material identification is a unique identifier of the live broadcast material, and the same hash value corresponds to the same first priority queue.
[0055] Among them, hash calculation is a process of mapping data of any size to a fixed-size hash value, which is usually used in encryption, data integrity verification, data indexing and other fields. The material identification is used as input, and a fixed-length hash value is generated after being processed by a hash algorithm, such as MD5, SHA-1 and SHA-256. The hash value is the result of the hash calculation and is a string of fixed length. In an embodiment of the present application, the hash value obtained by hashing the material identification carried by the material status update data is the first hash value; the hash value obtained by hashing the material identification carried by the material feature update data is the second hash value.
[0056] When the first process obtains the target data, that is, material status update data or material feature update data, based on the preset hash algorithm, it first performs hash calculation on the material identification carried in the target data to obtain the target hash value, and then determines the target first priority queue according to the target hash value, and maps the target data to the target first priority queue.
[0057] The embodiment of the present application maps material status update data and material feature update data to corresponding priority queues through hash calculation, thereby realizing orderly storage and efficient access to data, enabling the live broadcast platform to process large amounts of data more efficiently, and ensuring rapid response and accurate processing of the status and feature update information of live broadcast materials, thereby improving the performance of the live broadcast platform and user experience. At the same time, the hash value is irreversible, which can ensure the security and stability of the data.
[0058] In another embodiment, before consuming the first message queue through the first process, the method may further include the following steps: consuming the first message queue through the second process, obtaining the original material data from the live broadcast data and writing it into the second priority queue corresponding to the live broadcast material;
[0059] Create a material object, which represents the data structure of material data;
[0060] The second priority queue is consumed by the second process, and the material object is assigned a value based on the acquired original material data, so as to obtain the material data of the live broadcast material to which the original material data belongs and write it into the material pool.
[0061] In the embodiment of the present application, the process for consuming the first message queue and obtaining the original material data from the live broadcast data is the second process. Before the first process consumes the first message queue, the first message queue is consumed by a process different from the first process, namely the second process, to extract the original material data from the live broadcast data, and the obtained original material data is written into the second priority queue corresponding to the live broadcast material to which it belongs, and then the material data of the live broadcast material to which the original material data belongs is written into the material pool. For example, if the material identifier is the anchor ID, the original material data of the live broadcast material generated by the same anchor should be placed in the same second priority queue.
[0062] The original material data refers to the original data extracted from the live broadcast data without being processed or converted, including material ID, anchor ID, material creation time, live broadcast material and its material status data, etc. In the embodiment of the present application, the priority queue for storing and processing the original material data is the second priority queue.
[0063] Among them, the material object contains multiple fields, including but not limited to material ID, anchor ID, material creation time, material content, material status, material characteristics, etc. Based on the acquired original material data, relevant information is extracted from the original material data to assign values to the fields in the material object. As an example, the material object can also include fields such as anchor gender, based on the anchor ID in the original material data, query user information, and assign values to each field in the material object based on the queried user information and the original material data.
[0064] The embodiment of the present application introduces a second process. Before the first process consumes the first message queue, the second process extracts the original material data from the live broadcast data and stores it in the second priority queue. Then, the second process consumes the second priority queue, creates and assigns a material object based on the acquired original material data, obtains the material data of the live broadcast material to which the original material data belongs, and finally writes the material data, i.e., the assigned material object, into the material pool, so that the live broadcast platform can process the live broadcast data more efficiently, effectively manage the live broadcast materials, improve the speed and quality of data processing, and enhance the scalability and flexibility of the platform.
[0065] As an example, multiple fourth threads can be created in the second process, and multiple fourth threads can be run in parallel to consume the first message queue, obtain the original material data from the live broadcast data and write it into the second priority queue to increase the speed of writing the material data into the material pool. Among them, the thread used to consume the first message queue and obtain the original material data from the live broadcast data is the fourth thread. As an example, the data generated in real time in the live broadcast room is sent to the first message queue in the form of log messages. Before the fourth thread writes the obtained original material data into the second priority queue, it is also necessary to parse the log message, filter the parsed data to obtain the required live broadcast data, obtain the material ID, anchor ID, material creation time, live broadcast material and its material status data from the live broadcast data and combine them to obtain the original material data, and then write the original material data into the second priority queue, which can optimize the data processing process, improve the maintainability, performance and fault tolerance of the system, and make the data flow more efficient and reliable.
[0066] As an optional implementation, when there are multiple second priority queues, the above-mentioned consumption of the second priority queue by the second process, assigning a value to the material object based on the acquired original material data, obtaining the material data of the live broadcast material to which the original material data belongs and writing it into the material pool may include the following steps: creating multiple third threads in the second process, running the multiple third threads in parallel, and the multiple third threads corresponding to the multiple second priority queues one by one;
[0067] The third thread is used to consume the corresponding second priority queue, and based on the obtained original material data, the material object is assigned a value, and the material data of the live broadcast material to which the original material data belongs is obtained and written into the material pool.
[0068] Among them, in the embodiment of the present application, the thread used to consume the second priority queue is the third thread. The third thread corresponds to the second priority queue one by one, and each third thread is responsible for consuming a specific second priority queue. For each third thread, that is, the target third thread, the target original material data is taken out from the second priority queue corresponding to the target third thread, and the created material object is assigned based on the target original material data to obtain the material data of the live broadcast material to which the target original material data belongs, that is, the assigned material object and write it into the material pool.
[0069] The embodiment of the present application achieves efficient processing and management of original material data by creating multiple third threads in the second process to process multiple second priority queues in parallel, so that the live broadcast platform can construct material objects more quickly and accurately and write material data into the material pool, thereby improving the parallelism and overall efficiency of data processing, enhancing the performance and scalability of the live broadcast platform, and thereby improving the user experience.
[0070] In another embodiment, after the material data is written into the material pool, the method may further include the following steps: monitoring the live broadcast status of the live broadcast room in real time, and if the live broadcast status is the offline state, deleting the material data generated based on the live broadcast data of the live broadcast room from the material pool; and / or,
[0071] Traverse the material data in the material pool. If the currently traversed material data meets the preset outbound conditions, the material data will be deleted from the material pool. The preset outbound conditions include at least one of the following conditions: the material data is in the blacklist, and the storage time of the material data in the material pool exceeds the preset storage time.
[0072] Among them, the live broadcast status includes reservation, broadcast, offline, playback and other states. The live broadcast status of the live broadcast room can be monitored through the listener. If the live broadcast room is monitored to be in the offline state, the corresponding material data will be deleted from the material pool. For example: monitor the live broadcast room A and the live broadcast room B through the listener. When the live broadcast room A is monitored to be in the offline state, the material data generated based on the live broadcast data of the live broadcast room A will be deleted from the material pool; if the live broadcast room B is monitored to be in the offline state, the material data generated based on the live broadcast data of the live broadcast room B will be deleted from the material pool.
[0073] In addition to monitoring the live broadcast status of the live broadcast room, you can also traverse the material data in the material pool by polling, check each material data stored in the material pool one by one, determine whether the material data of each live broadcast material recorded in the material pool meets the preset outbound conditions, and delete the material data that meets the preset outbound conditions from the material pool.
[0074] The blacklist is a list or database containing identification or information of material data marked as inappropriate or unwelcome. If the target material data is in the blacklist, the target material data is deleted from the material pool. The preset storage duration is usually the same as the duration of the live playback. For material data with the material status of playback, it is necessary to determine whether the storage duration of the target material data in the material pool exceeds the preset storage duration. If so, the target material data is deleted from the material pool.
[0075] The embodiment of the present application realizes timely cleaning and management of material data in the material pool by real-time monitoring of the live broadcast status of the live broadcast room, and managing the material data in the material pool in real time according to preset conditions, so that the live broadcast platform can automatically clean up expired or inappropriate material data, keep the material pool clean and efficient, improve the data management ability of the live broadcast platform, ensure the accuracy of live broadcast recommendations, and improve user experience and retention rate.
[0076] S106, consuming the first priority queue through the first process, and updating the material data of the live broadcast material recorded in the material pool based on the acquired material status update data or material feature update data.
[0077] The material pool refers to a collection or storage space for storing live materials and their material data. The material status and material characteristics of the live materials in the material pool are updated according to the acquired material status update data and material characteristic update data.
[0078] It should be understood that the first priority queues corresponding to the live broadcast materials recorded in the material pool are usually different, and the correspondence between the live broadcast materials and the first priority queues is usually one-to-one. As an example, when the number of first priority queues is multiple, multiple fifth threads can be created in the first process, and the number of multiple fifth threads is the same as that of multiple first priority queues and corresponds one-to-one. Each fifth thread independently processes a first priority queue, and for the acquired target data, that is, the material status update data or the material feature update data, the target live broadcast material is determined from the material pool according to the material identifier carried by the target data, and the material status or material features of the target live broadcast material are updated based on the target data, which can ensure the orderliness of the update of the same live broadcast material, avoid concurrent processing of different update tasks for the same live broadcast material, and thus avoid data loss and overwriting, ensure the accuracy of the update, improve user experience and retention rate, and at the same time, update the material data of different live broadcast materials at the same time, and improve the processing efficiency of live broadcast material updates.
[0079] In an embodiment of the present application, a first process consumes a first message queue and a second message queue, writes the acquired material status update data and material feature update data into a first priority queue corresponding to the corresponding live broadcast material, and then consumes the first priority queue through the first process. Based on the acquired material status update data and material feature update data, the material data of the live broadcast material recorded in the material pool is updated. The material status update data and the material feature update data are aggregated and processed in the same process, and then the material data of the live broadcast material in the material pool is updated, so as to avoid data conflicts caused by the lack of communication between the status update and the feature update, ensure the accuracy of the update, and improve the user experience and retention rate. In addition, each live broadcast material corresponds to a unique first priority queue. The material status update data and the material feature update data are written into the first priority queue corresponding to the corresponding live broadcast material through the first process, and then the first priority queue is consumed through the first process. This can ensure the orderliness of the update of the same live broadcast material, avoid concurrent processing of different update tasks of the same live broadcast material, and then avoid data loss and overwriting, ensure the accuracy of the update, and improve the user experience and retention rate.
[0080] In another embodiment, after the material data of the live material recorded in the material pool is updated, the method may further include: receiving an access operation instruction input through a user interface;
[0081] Based on the access operation instruction, determine the target live broadcast material to be accessed from the material pool;
[0082] Perform the access operation indicated by the access operation instruction on the material data of the target live broadcast material, and display the execution result of the access operation through the user interface.
[0083] Among them, the user interface is the interface for users to interact with software or systems. Access operation instructions are commands or instructions input by users through the user interface to instruct the system to perform specific access operations, which may include but are not limited to access operation commands such as material query, material deletion, configuration item query, configuration item deletion, configuration item addition, material tag query, material tag deletion, and material tag addition. Access operations are operations performed according to access operation instructions input through the user interface, which may include but are not limited to querying or deleting live materials in the material pool, querying configuration item information, deleting configuration items of live materials in the material pool, adding configuration items to live materials in the material pool, querying or deleting material tags of live materials in the material pool, and adding material tags to live materials in the material pool. Execution results refer to the results or feedback generated after executing the access operation, including but not limited to prompt information on whether the operation is successful or not, changes in material data after the operation, and other information, which are displayed to users through the user interface to let users understand the execution status and results of the operation.
[0084] As an example, the access operation instruction carries a material identifier. When the access operation instruction is received, the target live material to be accessed is determined from the material pool according to the material identifier carried in the access operation instruction, and then the access operation indicated by the access operation instruction is performed on the material data of the target live material, and the execution result of the access operation is displayed through the user interface.
[0085] As an example, when the access operation instruction received through the user interface is a material query, the target live material is queried according to the material identification carried in the access operation instruction, and the query results are summarized in the form of a table and displayed through the user interface. The query results include the material data of the target live material, which is convenient for users to more intuitively understand the specific information of the current queried material in the material pool. As an example, when the access operation instruction received through the user interface is a material deletion, the target live material is determined from the material pool according to the material identification carried in the access operation instruction, and the material data of the target live material is deleted from the material pool. It should be understood that the access operations corresponding to material query and material deletion can be two independent operations or operations with a certain execution order, such as: query first and then delete.
[0086] As an example, when the access operation instruction received through the user interface is a configuration item query, the target live material is determined from the material pool according to the material identifier carried in the access operation instruction, the configuration item information of the target live material is queried, and the queried configuration item information is summarized in the form of a table and displayed through the user interface, wherein the configuration items include but are not limited to the anchor whitelist, anchor blacklist, material copywriting configuration, etc. As an example, when the access operation instruction received through the user interface is a configuration item deletion, the target live material is first determined from the material pool according to the material identifier carried in the access operation instruction, and then the target configuration item of the target live material is deleted according to the target configuration item selected by the access operation instruction, and the execution result of successful deletion is displayed through the user interface. As an example, when the access operation instruction received through the user interface is a configuration item addition, the target live material is first determined from the material pool according to the material identifier carried in the access operation instruction, and then the target configuration item is added to the target live material according to the target configuration item selected by the access operation instruction, and the execution result of successful addition is displayed through the user interface. It should be understood that the access operations corresponding to configuration item query, configuration item deletion, and configuration item addition can be independent operations, or operations with a certain execution order, such as: query first and then delete, or query first and then add, etc. The modification of the configuration item can affect the recommendation behavior of the material in the recommendation system, thereby realizing flexible adjustment of the material recommendation strategy.
[0087] As an example, when the access operation instruction received through the user interface is a material tag query, the target live material is determined from the material pool according to the material identifier carried in the access operation instruction, the material tag information of the target live material is queried, and the queried material tag information is summarized in the form of a table and displayed through the user interface, wherein the material tag information includes but is not limited to tag identifier, name, type, weight and other information. As an example, when the access operation instruction received through the user interface is a material tag deletion, the target live material is first determined from the material pool according to the material identifier carried in the access operation instruction, and then the target material tag of the target live material is deleted according to the target material tag selected by the access operation instruction, and the execution result of the successful deletion is displayed through the user interface. As an example, when the access operation instruction received through the user interface is a material tag addition, the target live material is first determined from the material pool according to the material identifier carried in the access operation instruction, and then the target material tag is added to the target live material according to the target material tag selected by the access operation instruction, and the execution result of the successful addition is displayed through the user interface. As an example, the target material tag selected by the access operation instruction can be obtained through the tag id, name, type, weight and other information of the custom material tag. The material tag is information used to describe the attributes of the live material, for example: whether the live material is a text or video material, or whether the live material is a pet material or a beauty material, etc., and the live material can be classified or grouped according to the material tag. It should be understood that the access operations corresponding to material tag query, material tag deletion and material tag addition can be independent operations, or operations with a certain execution order, such as: query first and then delete, or query first and then add, etc. By receiving the access operation instructions input by the user interface, the operator can quickly modify the material tag, thereby realizing the dynamic management of the live materials in the material pool.
[0088] The embodiment of the present application receives the user's operation instructions through the user interface, determines the target live broadcast material from the material pool according to the instructions, and then performs the corresponding access operation on the material, and finally displays the execution result of the operation through the user interface, so that the user can easily manage and operate the live broadcast material, thereby improving the user stickiness and operation convenience of the live broadcast platform.
[0089] In another embodiment, after the material data of the live broadcast material recorded in the material pool is updated, the method may further include: determining the index data of the live broadcast material in the material pool in multiple recommended indexes based on the material data of the live broadcast material in the material pool;
[0090] Determine material recommendation strategy based on indicator data;
[0091] Based on the material recommendation strategy, recommend live broadcast materials in the live broadcast pool to the live broadcast operator.
[0092] Among them, recommendation indicators are standards or indicators used to evaluate the performance of live broadcast materials in various aspects, such as the number of views, the number of likes, the number of comments, the audience interaction, etc. Recommendation indicators can help determine the popularity and influence of live broadcast materials. Index data refers to the data obtained by evaluating and counting the live broadcast materials in the material pool according to the recommendation indicators, reflecting the performance of each live broadcast material on different indicators, which can be used to quantify the quality and effect of the live broadcast materials. Material recommendation strategy is a set of strategies or algorithms determined based on indicator data, which is used to select and recommend live broadcast materials that perform well under multiple recommendation indicators. Material recommendation strategies can include weight-based scoring, collaborative filtering, machine learning and other methods. Live broadcast operators refer to entities or organizations responsible for managing and operating live broadcast platforms. They are responsible for formulating and implementing live broadcast content strategies, promoting live broadcast activities, managing live broadcast materials, etc.
[0093] The system will select live broadcast materials with better performance based on their performance under multiple recommendation indicators, and provide recommendations or push notifications to live broadcast operators so that they can choose suitable live broadcast materials for live broadcast activities, thereby improving the content quality and user experience of the live broadcast platform.
[0094] As an example, the material data in the live material pool can be analyzed in multiple dimensions at regular intervals, including but not limited to multiple key dimensions such as live field, live type, anchor fan level, and real-time popularity. The live materials in the material pool can be classified, for example, the live materials in the same live field can be grouped together, the live materials of the same live type can be grouped together, etc., and the number of materials in each group of live materials and the popularity, number of views, number of likes, number of comments, audience interaction, etc. of different types of live materials can be counted and analyzed. Based on the indicator data of different dimensions and subdivided dimensions in the material pool, the material recommendation strategy is determined, and then the live operator recommends the corresponding live materials in the live pool. Ensure that the status of the material pool can be fully understood in different time periods, and potential problems and optimization directions can be discovered in a timely manner.
[0095] For example, for the analysis of the live broadcast field, the materials in the material pool can be classified according to the field labels, and the data distribution of each live broadcast field can be counted and analyzed. The live broadcast fields include but are not limited to food, beauty, sports, pets, etc. The number, popularity, number of views, number of likes, number of comments, audience interaction, etc. of live broadcast materials in different fields are further analyzed, such as the number, popularity, number of views, number of likes, number of comments, audience interaction, etc. of live broadcast materials in the field of food. Based on the detailed information about different live broadcast fields in the material pool, the material recommendation strategy is determined, and the live broadcast operator recommends the corresponding live broadcast materials in the live broadcast pool.
[0096] The embodiment of the present application analyzes the performance data of live broadcast materials under multiple recommendation indicators, determines the material recommendation strategy, and recommends suitable live broadcast materials to the live broadcast operator, thereby optimizing the content recommendation and operation management of the live broadcast platform, improving the user experience and the effect of the live broadcast activities, and enabling the live broadcast platform to recommend content more accurately, increase users' viewing time and interactivity, and improve the activity and attractiveness of the live broadcast platform.
[0097] As an example, when the first message queue and the second message queue are consumed, the first message queue and the second message queue can be monitored. When it is detected that the number of accumulated messages in the message queue is greater than a preset threshold, the management personnel is notified to intervene manually to increase the number of first threads, second threads and third threads to ensure the timeliness and effectiveness of material data writing and updating, avoid message accumulation and affect the speed of receiving and processing messages.
[0098] The following is a complete example to illustrate the live broadcast material processing method provided by the embodiment of the present application. Another live broadcast material processing method provided by the present application may include the following steps:
[0099] S202, write the material data of the live broadcast material into the material pool. Figure 2A The process of material warehousing shown in the figure receives the live data of the live broadcast room through the first message queue, that is, the switch broadcast Kafka stream, and the first message queue is consumed by multiple third threads of the second process to obtain the original material data from the live broadcast data, and the obtained original material data is written into multiple second priority queues. The second priority queue is consumed by multiple fourth threads of the second process, that is, data pulling, and each fourth thread processes a second priority queue separately, and creates a material object at the same time. The material object is assigned a value based on the obtained original material data, and the assigned material object, that is, the material data of the live broadcast material to which the original material data belongs, is written into the material pool, that is, the warehousing process; at the same time, the assigned material object is backed up to the MySQL database to prevent the loss of material data and ensure the stability of the data; and for the material data of the live broadcast material that has just been added to the material pool, the corresponding first priority queue is added to the first priority queue set for storing and processing the subsequently obtained material feature update data and material status update data.
[0100] S204, generate material feature update data. Figure 2BThe feature generation process shown in the figure performs statistical analysis on the number of material views, likes, clicks, exposures, reward amount given by the anchor, number of people online in the live broadcast room, etc. in the monitored live broadcast data by monitoring the first message queue, that is, the live broadcast data received by the switch broadcast Kafka stream, and determines the material statistical features based on the distributed stream processing tool, that is, Flink; in addition, based on the content recognition algorithm matching the data type of the live broadcast material in the monitored live broadcast data, the monitored live broadcast data is identified, and the identified content is manually reviewed to obtain content attribute features; then, based on the material statistical features and content attribute features, material feature update data is generated, and the material feature update data is written into the second message queue, that is, the feature update Kafka stream;
[0101] S206, updating the material data of the live broadcast material in the material pool. Figure 2C The update process shown in the figure consumes the first message queue, that is, the switch broadcast Kafka stream, through multiple first threads of the first process, obtains material status update data from the live broadcast data, and based on the obtained material status update data, performs hash processing on the material identifier carried by the material status update data to obtain a first hash value, and writes the obtained material status update data into the first priority queue corresponding to the first hash value; at the same time, the second message queue, that is, the feature update Kafka stream, is consumed through multiple second threads of the first process, and based on the obtained material feature update data, performs hash processing on the material identifier carried by the material feature update data to obtain a second hash value, and writes the obtained material feature update data into The first priority queue corresponds to the second hash value; the first priority queue is consumed by multiple fifth threads of the first process, and each fifth thread processes a first priority queue separately, and based on the acquired target data, that is, material feature update data or material status update data, the status or characteristics of the corresponding live broadcast material in the material pool are updated. When material feature update data and material status update data exist in the first priority queue at the same time, the update data with high priority, that is, material feature update data, should be pulled first, and the characteristics of the corresponding live broadcast material in the material pool should be updated, and then the update data with lower priority, that is, material status update data, should be pulled and the status of the corresponding live broadcast material in the material pool should be updated.
[0102] S208, deleting the material data of the live broadcast material from the material pool. Figure 2DThe outbound delivery process shown monitors the live broadcast status of the live broadcast room in real time. When it is detected that the live broadcast status of the live broadcast room is in the offline state, the material data generated by the live broadcast data of the live broadcast room in the offline state is determined from the material pool and deleted from the material pool, that is, the live broadcast material is delivered in real time; at the same time, the material objects in the material pool are traversed in a polling manner to determine whether the currently traversed material object is in the blacklist. If it is in the blacklist, the currently traversed material object is deleted from the material pool, that is, the blacklist material is delivered; or for the live broadcast material whose material status is playback, it is determined whether the storage time of the currently traversed material object in the material pool exceeds the preset storage time. If it exceeds the preset storage time, the currently traversed material object is deleted from the material pool, that is, expired delivery.
[0103] S210, according to the received access operation instruction, perform corresponding access operations on the live broadcast materials in the material pool. Receive access operation instructions input through the user interface, such as: material query, material deletion, configuration item query, configuration item deletion, configuration item addition, material tag query, material tag deletion, material tag addition and other access operation commands; based on the material identification carried in the access operation instruction, determine the target live broadcast material from the material pool, and perform the access operation indicated by the access operation instruction on the material data of the target live broadcast material, such as: query or delete the live broadcast material in the material pool, query configuration item information, delete the configuration item of the live broadcast material in the material pool, add configuration items to the live broadcast material in the material pool, query or delete the material tag of the live broadcast material in the material pool, add material tag to the live broadcast material in the material pool and other access operations, and display the execution result of the access operation through the user interface, such as prompt information on whether the operation is successful or not, changes in material data after the operation, and other information.
[0104] S212, perform data analysis on the live broadcast materials in the material pool. Regularly perform multi-dimensional analysis on the material data of the live broadcast materials in the material pool, including but not limited to multiple key dimensions such as live broadcast field, live broadcast type, anchor fan level, and real-time popularity, determine the indicator data of the live broadcast materials in the material pool in multiple recommendation indicators, such as the number of views, the number of likes, the number of comments, the audience interaction, etc., determine the material recommendation strategy based on the indicator data, and recommend the live broadcast materials in the live broadcast pool to the live broadcast operator based on the material recommendation strategy.
[0105] S214, monitor the first message queue, i.e., the switch broadcast Kafka stream, and the second message queue, i.e., the feature update Kafka stream. When it is detected that the number of accumulated messages in the message queue is greater than the preset threshold, the management personnel are notified to perform manual intervention to ensure the timeliness and effectiveness of the writing and updating of live broadcast materials, avoid message accumulation, and affect the speed of receiving and processing messages.
[0106] Corresponding to the above-mentioned another live material processing method, an embodiment of the present application also provides a structural diagram of a live material processing architecture, such as Figure 3 As shown, the architecture 300 includes: an inbound module 310 , an outbound module 320 , a generation module 330 , an update module 340 , a monitoring module 350 , an interaction module 360 and an analysis module 370 .
[0107] The warehousing module 310 is used to write the material data of the live broadcast material into the material pool, which corresponds to the execution of the above-mentioned step S202; the outbound module 320 is used to delete the material data of the live broadcast material from the material pool, which corresponds to the execution of the above-mentioned step S208; the generation module 330 is used to generate material feature update data, which corresponds to the execution of the above-mentioned step S204; the update module 340 is used to update the material data of the live broadcast material in the material pool, which corresponds to the execution of the above-mentioned step S206; the monitoring module 350 is used to monitor the first message queue and the second message queue. When it is detected that the number of accumulated messages in the message queue is greater than the preset threshold, the management personnel is notified to perform manual intervention, which corresponds to the execution of the above-mentioned step S214; the interaction module 360 is used to perform corresponding access operations on the live broadcast materials in the material pool according to the received access operation instructions, which corresponds to the execution of the above-mentioned step S210; the analysis module 370 is used to perform data analysis on the live broadcast materials in the material pool, which corresponds to the execution of the above-mentioned step S212.
[0108] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0109] With the above Figure 1 Corresponding to the live material processing method shown, the present application embodiment also provides a live material processing device. Figure 4 , which is a structural diagram of a live broadcast material processing device 400 provided in one embodiment of the present application, wherein the device 400 includes: a receiving unit 410, a first consumption unit 420 and a second consumption unit 430.
[0110] The receiving unit 410 is used to receive live broadcast data through the first message queue and receive material feature update data through the second message queue.
[0111] The first consumption unit 420 is used to consume the first message queue through a first process, obtain material status update data from the live broadcast data and write it into the first priority queue corresponding to the live broadcast material, and consume the second message queue, write the material feature update data into the first priority queue corresponding to the live broadcast material, wherein each live broadcast material corresponds to a unique first priority queue.
[0112] The second consumption unit 430 is used to consume the first priority queue through the first process, and update the material data of the live broadcast material recorded in the material pool based on the acquired material status update data or material feature update data.
[0113] Optionally, when the first consumption unit 420 consumes the first message queue through the first process, obtains the material status update data from the live broadcast data and writes the material status update data into the first priority queue corresponding to the live broadcast material, and consumes the second message queue and writes the material feature update data into the first priority queue corresponding to the live broadcast material, the following steps may be performed: creating a first thread and a second thread in the first process, and running the first thread and the second thread in parallel;
[0114] Through the first thread, the first message queue is consumed, and material status update data is obtained from the live broadcast data and written into the first priority queue corresponding to the live broadcast material; and,
[0115] The second message queue is consumed through the second thread, and the material feature update data is written into the first priority queue corresponding to the live broadcast material.
[0116] Optionally, when writing the material status update data and the material feature update data into the first priority queue corresponding to the live broadcast material, the first consumption unit 420 may perform the following steps: performing a hash calculation on the material identifier carried by the material status update data to obtain a first hash value, and writing the material status update data into the first priority queue corresponding to the first hash value;
[0117] A hash calculation is performed on the material identification carried by the material feature update data to obtain a second hash value, and the material feature update data is written into the first priority queue corresponding to the second hash value; wherein the material identification is a unique identifier of the live broadcast material, and the same hash value corresponds to the same first priority queue.
[0118] Optionally, the live broadcast material processing device 400 may further include: a third consumption unit;
[0119] The third consumption unit is used to perform the following steps before the second consumption unit 430 consumes the first message queue through the first process: consume the first message queue through the second process, obtain the original material data from the live broadcast data, and write it into the second priority queue corresponding to the live broadcast material;
[0120] Creating a material object, wherein the material object represents a data structure of material data;
[0121] The second priority queue is consumed by the second process, and based on the acquired original material data, the material object is assigned a value, and the material data of the live broadcast material to which the original material data belongs is obtained and written into the material pool.
[0122] Optionally, in the case where there are multiple second priority queues, when the third consumer unit consumes the second priority queue through the second process, assigns a value to the material object based on the acquired original material data, obtains the material data of the live broadcast material to which the original material data belongs, and writes the material data into the material pool, the following steps may be performed: creating multiple third threads in the second process, running the multiple third threads in parallel, and the multiple third threads correspond one-to-one to the multiple second priority queues;
[0123] The corresponding second priority queue is consumed through the third thread, and based on the acquired original material data, the material object is assigned a value, and the material data of the live broadcast material to which the original material data belongs is obtained and written into the material pool.
[0124] Optionally, the live broadcast material processing device 400 may further include: a deletion unit;
[0125] The deleting unit is used to perform the following steps after the third consumption unit writes the material data into the material pool: monitor the live broadcast status of the live broadcast room in real time, and if the live broadcast status is the offline state, delete the material data generated based on the live broadcast data of the live broadcast room from the material pool; and / or,
[0126] Traverse the material data in the material pool, and if the currently traversed material data meets the preset outbound conditions, delete the material data from the material pool, and the preset outbound conditions include at least one of the following conditions: the material data is in the blacklist, and the storage time of the material data in the material pool exceeds the preset storage time.
[0127] Optionally, the live broadcast material processing device 400 may further include: a generating unit;
[0128] The generating unit is configured to perform the following steps before the receiving unit 410 receives the material feature update data through the second message queue: monitoring the live broadcast data received by the first message queue, and performing statistical analysis on the monitored live broadcast data through a distributed stream processing tool to determine the material statistical features;
[0129] Based on a content recognition algorithm that matches the data type of the live broadcast data, content recognition is performed on the live broadcast data to obtain content attribute features;
[0130] Based on the material statistical characteristics and the content attribute characteristics, generating the material characteristic update data;
[0131] The material characteristic update data is written into the second message queue.
[0132] Optionally, the live broadcast material processing device 400 may further include: a user unit;
[0133] The user unit is configured to perform the following steps after the second consumption unit 430 updates the material data of the live broadcast material recorded in the material pool: receiving an access operation instruction input through a user interface;
[0134] Based on the access operation instruction, determining the target live broadcast material to be accessed from the material pool;
[0135] Perform the access operation indicated by the access operation instruction on the material data of the target live broadcast material, and display the execution result of the access operation through the user interface.
[0136] Optionally, the live broadcast processing device 400 may further include: an analysis unit;
[0137] The analysis unit is configured to perform the following steps after the second consumption unit 430 updates the material data of the live broadcast material recorded in the material pool: based on the material data of the live broadcast material in the material pool, determine the index data of the live broadcast material in the material pool in multiple recommended indicators;
[0138] Determine a material recommendation strategy based on the indicator data;
[0139] Based on the material recommendation strategy, the live broadcast materials in the live broadcast pool are recommended to the live broadcast operator.
[0140] Obviously, the live material processing device provided in the embodiment of the present application can be used as Figure 1 The execution body of the live material processing method shown is, for example Figure 1 In the live material processing method shown, step S102 can be performed by Figure 4The receiving unit 410 in the live material processing device shown in FIG. 1 is executed, and step S104 can be performed by Figure 4 The first consumption unit 420 in the live material processing device shown in FIG. 1 is executed, and step S106 can be performed by Figure 4 The second consumption unit 430 in the live material processing device shown is executed.
[0141] According to another embodiment of the present application, Figure 4 The various units in the live material processing device shown can be separately or completely combined into one or several other units to constitute, or one (some) of the units can be further divided into multiple functionally smaller units to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the live material processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0142] According to another embodiment of the present application, the program can be executed on a general computing device such as a computer including a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM), and other processing elements and storage elements. Figure 1 A computer program (including program code) for each step involved in the corresponding method shown in FIG. Figure 4 The live material processing device shown in the embodiment of the present application is used to implement the live material processing method of the embodiment of the present application. The computer program can be recorded on a computer-readable storage medium, for example, and transferred to an electronic device through a computer-readable storage medium and run therein.
[0143] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 5 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0144] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0145] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0146] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a data processing device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0147] receiving live broadcast data through a first message queue, and receiving material feature update data through a second message queue;
[0148] Through the first process, the first message queue is consumed, material status update data is obtained from the live broadcast data and written into the first priority queue corresponding to the live broadcast material, and the second message queue is consumed, and the material feature update data is written into the first priority queue corresponding to the live broadcast material, wherein each live broadcast material corresponds to a unique first priority queue;
[0149] The first priority queue is consumed by the first process, and the material data of the live broadcast material recorded in the material pool is updated based on the acquired material status update data or material feature update data.
[0150] The above application Figure 4The method performed by the live material processing device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in software form. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0151] The electronic device may also perform Figure 1 The method is implemented in the live material processing device. Figure 1 , Figure 4 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0152] Of course, in addition to software implementation methods, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0153] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 1 The method of the embodiment shown is specifically used to perform the following operations:
[0154] receiving live broadcast data through a first message queue, and receiving material feature update data through a second message queue;
[0155] Through the first process, the first message queue is consumed, material status update data is obtained from the live broadcast data and written into the first priority queue corresponding to the live broadcast material, and the second message queue is consumed, and the material feature update data is written into the first priority queue corresponding to the live broadcast material, wherein each live broadcast material corresponds to a unique first priority queue;
[0156] The first priority queue is consumed by the first process, and the material data of the live broadcast material recorded in the material pool is updated based on the acquired material status update data or material feature update data.
[0157] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0158] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0159] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0160] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0161] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A live material processing method, characterized in that: include: receiving live broadcast data through a first message queue, and receiving material feature update data through a second message queue; Through the first process, the first message queue is consumed, material status update data is obtained from the live broadcast data and written into the first priority queue corresponding to the live broadcast material, and the second message queue is consumed, and the material feature update data is written into the first priority queue corresponding to the live broadcast material, wherein each live broadcast material corresponds to a unique first priority queue; The first priority queue is consumed by the first process, and the material data of the live broadcast material recorded in the material pool is updated based on the acquired material status update data or material feature update data.
2. The method according to claim 1, characterized in that The first process consumes the first message queue, obtains material status update data from the live broadcast data and writes the data into the first priority queue corresponding to the live broadcast material, and consumes the second message queue and writes the material feature update data into the first priority queue corresponding to the live broadcast material, including: Creating a first thread and a second thread in the first process, and running the first thread and the second thread in parallel; Through the first thread, the first message queue is consumed, and material status update data is obtained from the live broadcast data and written into the first priority queue corresponding to the live broadcast material; and, The second message queue is consumed through the second thread, and the material feature update data is written into the first priority queue corresponding to the live broadcast material.
3. The method according to claim 1, characterized in that The material status update data and the material feature update data are written into the first priority queue corresponding to the live broadcast material in the following manner: Performing a hash calculation on the material identifier carried by the material status update data to obtain a first hash value, and writing the material status update data into a first priority queue corresponding to the first hash value; A hash calculation is performed on the material identification carried by the material feature update data to obtain a second hash value, and the material feature update data is written into the first priority queue corresponding to the second hash value; wherein the material identification is a unique identifier of the live broadcast material, and the same hash value corresponds to the same first priority queue.
4. The method according to claim 1, characterized in that: Before consuming the first message queue through the first process, the method further includes: The first message queue is consumed by a second process, original material data is obtained from the live broadcast data, and the original material data is written into a second priority queue corresponding to the live broadcast material; Creating a material object, wherein the material object represents a data structure of material data; The second priority queue is consumed by the second process, and based on the acquired original material data, the material object is assigned a value, and the material data of the live broadcast material to which the original material data belongs is obtained and written into the material pool.
5. The method according to claim 4, characterized in that The number of the second priority queues is multiple; The consuming of the second priority queue by the second process, assigning a value to the material object based on the acquired original material data, obtaining the material data of the live broadcast material to which the original material data belongs and writing the material data into the material pool, includes: Creating a plurality of third threads in the second process, and running the plurality of third threads in parallel, wherein the plurality of third threads correspond one-to-one to the plurality of second priority queues; The corresponding second priority queue is consumed through the third thread, and based on the acquired original material data, the material object is assigned a value, and the material data of the live broadcast material to which the original material data belongs is obtained and written into the material pool.
6. The method according to claim 4, characterized in that After the material data is written into the material pool, the method further includes: Monitor the live broadcast status of the live broadcast room in real time, and if the live broadcast status is in an offline state, delete the material data generated based on the live broadcast data of the live broadcast room from the material pool; and / or, Traverse the material data in the material pool, and if the currently traversed material data meets the preset outbound conditions, delete the material data from the material pool, and the preset outbound conditions include at least one of the following conditions: the material data is in the blacklist, and the storage time of the material data in the material pool exceeds the preset storage time.
7. The method according to claim 1, characterized in that Before receiving material feature update data through the second message queue, the method further includes: Monitor the live broadcast data received by the first message queue, and perform statistical analysis on the monitored live broadcast data through a distributed stream processing tool to determine material statistical features; Based on a content recognition algorithm that matches the data type of the live broadcast data, content recognition is performed on the live broadcast data to obtain content attribute features; Based on the material statistical characteristics and the content attribute characteristics, generating the material characteristic update data; The material characteristic update data is written into the second message queue.
8. The method according to claim 1, characterized in that After the material data of the live material recorded in the material pool is updated, the method further includes: Receiving an access operation instruction input through a user interface; Based on the access operation instruction, determining the target live broadcast material to be accessed from the material pool; Perform the access operation indicated by the access operation instruction on the material data of the target live broadcast material, and display the execution result of the access operation through the user interface.
9. The method according to claim 1, characterized in that: After the material data of the live material recorded in the material pool is updated, the method further includes: Based on the material data of the live broadcast materials in the material pool, determine the index data of the live broadcast materials in the material pool in multiple recommended indicators; Determine a material recommendation strategy based on the indicator data; Based on the material recommendation strategy, the live broadcast materials in the live broadcast pool are recommended to the live broadcast operator.
10. A live material processing device, characterized in that: include: A receiving unit, configured to receive live broadcast data through a first message queue, and receive material feature update data through a second message queue; a first consumption unit, configured to consume the first message queue through a first process, obtain material status update data from the live broadcast data and write the data into a first priority queue corresponding to the live broadcast material, and consume the second message queue, write the material feature update data into the first priority queue corresponding to the live broadcast material, wherein each live broadcast material corresponds to a unique first priority queue; The second consumption unit is used to consume the first priority queue through the first process, and update the material data of the live broadcast material recorded in the material pool based on the acquired material status update data or material feature update data.
