Live streaming distribution methods, equipment, storage media, and software products
By using a common filtering strategy architecture in the unified live room distribution method, the problems of chaotic filtering strategies and repetitive work in live room distribution are solved, and more efficient and flexible live room distribution configuration and expansion are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-17
- Publication Date
- 2026-03-06
AI Technical Summary
Existing live streaming distribution methods may result in chaotic and fragmented filtering strategies when there are many business lines. Each business line has its own filtering strategy configured by different teams, leading to low efficiency, duplication of work, severe coupling of service modules, poor scalability, dependence on downstream servers for filtering strategies, high QPS, long troubleshooting links, and low efficiency in problem localization.
This paper provides a method for distributing live streams. By adopting a unified and common filtering strategy architecture, the target filtering strategy is determined for each live stream entry based on the live stream entry information. Different entry points with the same live stream entry information can use the same filtering strategy. The filtering strategy is reusable and easy to maintain and extend in a unified manner, reducing repetitive work and avoiding confusion and dispersion of filtering strategies.
It improves the configuration flexibility of live streaming room distribution, reduces repetitive work, avoids confusion and fragmentation of filtering strategies, enhances configuration efficiency and scalability, and simplifies the problem localization process.
Smart Images

Figure CN116489412B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer and network communication technology, and in particular to a live streaming distribution method, device, storage medium, and program product. Background Technology
[0002] With the rapid development of the online live streaming industry, different types of live streaming rooms are increasing, allowing viewers to choose the appropriate room to watch live content based on their preferences. Live streaming rooms typically have multiple entry points, with a live streaming platform acting as a business platform to distribute live streaming rooms to multiple business lines. Each business line may also have multiple live streaming entry points, such as profile pictures on personal homepages or breathing circles on short video profile pictures. However, whether these entry points can display the live streaming status and whether live streaming rooms are distributed through these entry points are subject to various restrictions.
[0003] In existing live streaming distribution methods, each entry point is usually configured with various filtering strategies according to its own needs. When there are many business lines, the filtering strategies may be chaotic and scattered. In addition, each business line is configured with different teams, resulting in a lot of duplication of work and low efficiency. Summary of the Invention
[0004] This disclosure provides a live streaming distribution method, device, storage medium, and program product to uniformly adopt a common filtering strategy for various live streaming entry points, avoiding repetitive work and preventing the confusion and fragmentation of filtering strategies.
[0005] In a first aspect, embodiments of this disclosure provide a live streaming room distribution method, applied to a live streaming room distribution device, the method comprising:
[0006] Receive a request from a target object to access a target live stream entry point. The access request includes live stream entry point information, target object information, and information about the live stream room to be accessed.
[0007] Based on the live stream entry information, determine the target filtering strategy and the target data corresponding to the target filtering strategy;
[0008] Based on the target object information, the information of the live stream to be accessed, and the target data, the target filtering strategy determines whether the target live stream entry can distribute the live stream to be accessed.
[0009] If it is determined that the target live streaming portal can distribute the live streaming room to be accessed, then the live streaming room to be accessed is distributed so that the target object can enter the live streaming room to be accessed through the target live streaming portal.
[0010] Secondly, this disclosure provides a live streaming room distribution method, applied to a server that provides live streaming room related data, the method comprising:
[0011] Periodically acquire all currently online live streaming room data;
[0012] Extract relevant data from all currently online live streaming rooms according to preset rules;
[0013] The live stream-related data is sent to at least one database for storage, so that the live stream distribution device can obtain the live stream-related data from the at least one database and store it in the local cache of the live stream distribution device, thereby providing corresponding target data for the target filtering strategy. This allows the live stream distribution device to control the distribution of the target live stream entry to the live stream to be accessed based on the target object information, the information of the live stream to be accessed, and the target data through the target filtering strategy.
[0014] Thirdly, embodiments of this disclosure provide a live streaming distribution device, including:
[0015] The receiving unit is used to receive the access request from the target object to the target live streaming entrance. The access request includes live streaming entrance information, target object information, and information about the live streaming room to be accessed.
[0016] The determining unit is used to determine the target filtering strategy and the target data corresponding to the target filtering strategy based on the live broadcast entry information.
[0017] The processing unit is configured to determine, based on the target object information, the information of the live room to be accessed, and the target data, whether the target live entry can distribute the live room to be accessed through the target filtering strategy.
[0018] The distribution unit is configured to distribute the live room to be accessed if it is determined that the target live entry can distribute the live room to be accessed, so that the target object can enter the live room to be accessed through the target live entry.
[0019] Fourthly, embodiments of this disclosure provide a server that provides live streaming room-related data, including:
[0020] The acquisition unit is used to periodically acquire all currently online live streaming room data;
[0021] The extraction unit is used to extract relevant data from the current online live streaming room data according to preset rules.
[0022] The sending unit is used to send the live room-related data to at least one database for storage, so that the live room distribution device can obtain the live room-related data from the at least one database and store it in the local cache of the live room distribution device, thereby providing corresponding target data for the target filtering strategy. This allows the live room distribution device to control the distribution of the target live room to be accessed through the target filtering strategy based on the target object information, the information of the live room to be accessed, and the target data.
[0023] Fifthly, embodiments of this disclosure provide an electronic device, including: at least one processor and a memory;
[0024] The memory stores computer-executed instructions;
[0025] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the live streaming distribution method as described in the first aspect and various possible designs of the first aspect, or the live streaming distribution method as described in the second aspect and various possible designs of the second aspect.
[0026] Sixthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the live streaming distribution method described in the first aspect and various possible designs of the first aspect, or the live streaming distribution method described in the second aspect and various possible designs of the second aspect.
[0027] In a seventh aspect, embodiments of this disclosure provide a computer program product, including computer execution instructions, which, when executed by a processor, implement the live streaming distribution method described in the first aspect and various possible designs of the first aspect, or the live streaming distribution method described in the second aspect and various possible designs of the second aspect.
[0028] The live streaming room distribution method, device, storage medium, and program product provided in this disclosure are as follows: The method receives an access request from a target object to a target live streaming entry point. The access request includes live streaming entry point information, target object information, and information about the live streaming room to be accessed. Based on the live streaming entry point information, a target filtering strategy and target data corresponding to the target filtering strategy are determined. Based on the target object information, the information about the live streaming room to be accessed, and the target data, the target filtering strategy is used to determine whether the target live streaming entry point can distribute the live streaming room to be accessed. If it is determined that the target live streaming entry point can distribute the live streaming room to be accessed, the live streaming room to be accessed is distributed so that the target object can enter the live streaming room to be accessed through the target live streaming entry point. In this disclosure, a target filtering strategy can be determined separately for each live streaming entry point based on the live streaming entry point information to determine whether the target live streaming entry point can distribute the live streaming room to be accessed. Different live streaming entry points with the same live streaming entry point information can use the same filtering strategy. The filtering strategy is reusable and easy to maintain and extend uniformly, improving the flexibility of configuration. It eliminates the need for each live streaming entry point to write its own filtering strategy, avoiding repetitive work and the confusion and dispersion of filtering strategies. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 A system architecture diagram of a live streaming room distribution method provided in an embodiment of this disclosure;
[0031] Figure 2 This is a schematic diagram of a live streaming room distribution method provided in an embodiment of the present disclosure;
[0032] Figure 3 An example diagram of a plugin for a live streaming room distribution method provided in an embodiment of this disclosure;
[0033] Figure 4 A flowchart illustrating a live streaming room distribution method provided in another embodiment of this disclosure;
[0034] Figure 5 A flowchart illustrating a live streaming room distribution method provided in another embodiment of this disclosure;
[0035] Figure 6 This is a structural block diagram of a live streaming distribution device provided in one embodiment of the present disclosure;
[0036] Figure 7 A structural block diagram of a server providing live streaming room related data provided in an embodiment of this disclosure;
[0037] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0039] With the rapid development of the online live streaming industry, different types of live streaming rooms are increasing, allowing viewers to choose the appropriate room to watch live content based on their preferences. Live streaming rooms typically have multiple entry points, with a live streaming platform acting as a business platform to distribute live streaming rooms to multiple business lines. Each business line may have multiple live streaming entry points, such as the profile picture on a personal homepage, the follow window, or the breathing circle on a short video profile picture. However, whether these entry points can display the live streaming status and whether live streaming rooms are distributed through these entry points are subject to various restrictions.
[0040] In existing live stream distribution methods, each entry point is typically configured with various filtering strategies according to its own needs, which has the following drawbacks and problems:
[0041] 1) When there are many business lines, the filtering strategy may be chaotic and scattered;
[0042] 2) Each business line has a different team configuring the filtering strategy, resulting in a lot of duplication of work and low efficiency;
[0043] 3) The filtering strategy relies on the downstream server to provide live room data, and the downstream server has a high QPS (Query Per Second).
[0044] 4) Service modules are heavily coupled and have poor scalability; new and old filtering strategies may overlap and interfere with each other.
[0045] 5) The troubleshooting process is lengthy, resulting in low efficiency in problem localization and insufficient logs.
[0046] To address at least one of the aforementioned technical problems, this disclosure provides a live streaming room distribution method. This method employs a unified live streaming room distribution filtering architecture for all live streaming entry points. For each live streaming entry point, a target filtering strategy is determined based on the entry point information to determine whether the target live streaming entry point can distribute the desired live streaming room. Different live streaming entry points with the same entry point information can use the same filtering strategy. The filtering strategy is reusable, easy to maintain and extend, improving configuration flexibility. It avoids having different teams configure filtering strategies for different live streaming entry points, eliminating repetitive work. Furthermore, the reusability and extension of filtering strategies for different live streaming entry points enhance configuration flexibility and prevent the confusion, fragmentation, and misalignment of filtering strategies.
[0047] Specifically, the live streaming distribution device can receive access requests from target objects to target live streaming entrances. These access requests include live streaming entrance information, target object information, and information about the live streaming room to be accessed. Based on the live streaming entrance information, a target filtering strategy and target data corresponding to the target filtering strategy are determined. Based on the target object information, the information about the live streaming room to be accessed, and the target data, the target filtering strategy is used to determine whether the target live streaming entrance can distribute the live streaming room to be accessed. If it is determined that the target live streaming entrance can distribute the live streaming room to be accessed, then the live streaming room to be accessed is distributed, allowing the target object to enter the live streaming room through the target live streaming entrance.
[0048] The live streaming distribution method provided in this disclosure is applicable to, for example, Figure 1 The system shown includes a live streaming room distribution device 101, a database 102, a server 103 that provides live streaming room related data, an online live streaming room server 104, an offline service device 105, and a server 106 that provides non-live streaming room related data.
[0049] Among them, the online live streaming room server 104 is the underlying basic live streaming room service. The online live streaming room server 104 can periodically push the full amount of currently online live streaming room data to the server 103 that provides live streaming room related data. Optionally, the full amount of currently online live streaming room data can be pushed to the message queue 107. The server 103 that provides live streaming room related data can obtain the full amount of currently online live streaming room data from the message queue 107.
[0050] The server 103, which provides live stream-related data, extracts relevant data from all currently online live stream data according to preset rules, and sends the live stream-related data to at least one database 102 for storage. Figure 1 The example uses three databases, 102.
[0051] The live streaming distribution device 101 and the offline service device 105 are business middleware, which can obtain live streaming related data from the database 102 and store it in their respective local caches.
[0052] The live streaming distribution device 101 provides online services, receiving access requests from target objects to target live streaming entrances. The target object is the object sending the access request, which includes live streaming entrance information, target object information, and information about the live streaming room to be accessed. Based on the live streaming entrance information, it determines a target filtering strategy and corresponding target data. Based on the target object information, the information about the live streaming room to be accessed, and the target data, it determines whether the target live streaming entrance can distribute the live streaming room to be accessed through the target filtering strategy. If it is determined that the target live streaming entrance can distribute the live streaming room to be accessed, then the live streaming room to be accessed is distributed, allowing the target object to enter the live streaming room through the target live streaming entrance. If the target data includes live streaming-related data, it is read from the local cache of the live streaming distribution device 101; if it includes non-live streaming-related data, it is obtained from the server 106 providing non-live streaming-related data via an RPC (Remote Procedure Call) request.
[0053] Offline service device 105 can construct index data for search and recommendation based on live stream-related data. Unlike live stream distribution device 101, which needs to receive real-time access requests from target users to the target live stream entry, it provides search and recommendation index data, allowing target users to search for or recommend live streams based on the index data. Furthermore, the server 103, which provides live stream-related data, can compare the currently online full set of live stream data with the previously online full set of live stream data to identify discrepancies. Data for these discrepancies is then directly sent to offline service device 105 to update its local cache of live stream-related data, or it can be directly returned to the offline service.
[0054] The live streaming distribution method provided in this disclosure will be described in detail below with reference to specific embodiments.
[0055] refer to Figure 2 , Figure 2 This is a schematic flowchart of a live streaming room distribution method provided in an embodiment of this disclosure. The method of this embodiment can be applied to a live streaming room distribution device, which can be an electronic device such as a server. The live streaming room distribution method includes:
[0056] S201. Receive the target object's access request to the target live stream entrance. The access request includes live stream entrance information, target object information, and information about the live stream room to be accessed.
[0057] In this embodiment, when the target object accesses the streamer's personal homepage, following page, short video stream (such as feed information stream) through the terminal, when the streamer is currently live, the streamer's homepage avatar, following window, and short video avatar breathing circle can usually serve as live stream entrances. However, for the current target object, whether to distribute the live stream to these live stream entrances, that is, whether these live stream entrances display the live stream status, such as displaying a "live" indicator, or whether the target object can directly enter the live stream room through these live stream entrances, can be determined by sending an access request to the target live stream entrance to the live stream distribution device. The request may include live stream entry information, target object information, and information about the live stream room to be accessed. The live stream entry information may be the identifier of the live stream entry or the type of the live stream entry. The identifier of the live stream entry may be a unique identifier pre-assigned to each live stream entry or a category identifier pre-assigned to various types of live stream entry. The target object information may include, but is not limited to, at least one of the following: target object identifier, app version number, and the live stream entry scenario in which the target object is located. The information about the live stream room to be accessed may be the live stream room identifier, or the information about the live stream room to be accessed may be the streamer identifier, or the corresponding live stream room identifier may be determined based on the live stream room identifier.
[0058] It should be noted that the information involved in this embodiment is information that has been fully authorized by all parties.
[0059] S202. Based on the live stream entry information, determine the target filtering strategy and the target data corresponding to the target filtering strategy.
[0060] In this embodiment, different filtering strategies can be configured for different live streaming entry points. Different filtering strategies require different data. For example, for a live streaming entry point with a streamer's avatar, the target filtering strategy could be to determine whether the live stream is still playing. Similarly, for a feed information stream, the target filtering strategy could be to determine whether the live stream is still playing and whether it is a pushable live stream. More specifically, in some optional embodiments, the target data can be live stream-related data and / or non-live stream-related data. Live stream-related data is data at the live stream level, including but not limited to the mapping relationship between the live stream and the live streaming entry point, live stream attribute information, and other live stream-related information. Non-live stream-related data can be data outside the live stream level, such as data on the accessible / displayable object range of the live streaming entry point.
[0061] S203. Based on the target object information, the information of the live room to be accessed, and the target data, determine whether the target live entrance can distribute the live room to be accessed through the target filtering strategy.
[0062] In this embodiment, after determining the target data corresponding to the target filtering strategy, the target filtering strategy can be executed based on the target object information, the information of the live room to be accessed, and the target data. For example, it can be determined whether the live room is still broadcasting, and the live room can be filtered through the target filtering strategy. It can also be determined whether the target live entrance can distribute the live room to be accessed, that is, whether these live entrances display a live status, or whether the target object can directly enter the live room through these live entrances.
[0063] S204. If it is determined that the target live streaming entrance can distribute the live streaming room to be accessed, then distribute the live streaming room to be accessed so that the target object can enter the live streaming room to be accessed through the target live streaming entrance.
[0064] In this embodiment, as described above, if it is determined that the target live streaming entry can distribute the live streaming room to be accessed, then the live streaming room to be accessed is distributed, and the live streaming status is displayed at the live streaming entry, such as displaying a "Live" icon on the streamer's avatar. The target audience can directly enter the live streaming room by clicking on the streamer's avatar; or directly enter the live streaming room while swiping in the feed. If it is determined that the target live streaming entry cannot distribute the live streaming room to be accessed, the live streaming status can be hidden at the live streaming entry, and the target audience can directly enter the streamer's personal homepage by clicking on the streamer's avatar; or skip the live streaming room while swiping in the feed.
[0065] The live stream distribution method provided in this embodiment receives an access request from a target object to a target live stream entry point. The access request includes live stream entry point information, target object information, and information about the live stream to be accessed. Based on the live stream entry point information, a target filtering strategy and target data corresponding to the target filtering strategy are determined. Based on the target object information, the information about the live stream to be accessed, and the target data, the target filtering strategy is used to determine whether the target live stream entry point can distribute the live stream to be accessed. If it is determined that the target live stream entry point can distribute the live stream to be accessed, then the live stream to be accessed is distributed so that the target object can enter the live stream to be accessed through the target live stream entry point. In this embodiment, a common target filtering strategy can be uniformly applied to determine whether the target live stream entry point can distribute the live stream to be accessed for various live stream entry points based on the live stream entry point information. Different live stream entry points with the same live stream entry point information can use the same filtering strategy. The filtering strategy is reusable and easy to maintain and extend uniformly, improving the flexibility of configuration. It eliminates the need for each live stream entry point to write its own filtering strategy, avoiding repetitive work and the confusion and dispersion of filtering strategies.
[0066] As a further improvement to the above embodiments, the step of determining the target filtering strategy and the target data corresponding to the target filtering strategy based on the live stream entry information in S202 may specifically include:
[0067] From a plurality of preset filtering strategy plugins, at least one preset filtering strategy plugin corresponding to the live stream entry information is selected as the target filtering strategy plugin, and the target filtering strategy plugin is used to run the program of the preset filtering strategy; the preset filtering strategy corresponding to the target filtering strategy plugin is determined as the target filtering strategy.
[0068] From a plurality of preset data loading plugins, at least one preset data loading plugin for obtaining target data corresponding to the target filtering strategy is selected as the target data loading plugin; the data loaded by the target data loading plugin is determined as the target data corresponding to the target filtering strategy.
[0069] In this embodiment, a plugin design pattern can be used for management. Specifically, a data loading plugin group and a filtering strategy plugin group can be provided in advance. Different filtering strategy plugins in the filtering strategy plugin group can be used to run programs with different filtering strategies. For example, the filtering strategy plugin filter1 is used to run a program to determine whether the live room is still playing, and the filtering strategy plugin filter2 is used to run a program to determine whether the live room is a pushable live room. Different data loading plugins in the data loading plugin group can be used to obtain different data. For example, the data loading plugin loader1 is used to load data related to whether the live room is playing, and the data loading plugin loader2 is used to load data related to whether the live room is pushable. Based on this, in this embodiment, when determining the target filtering strategy and the target data corresponding to the target filtering strategy, at least one preset filtering strategy plugin and at least one preset data loading plugin corresponding to the live entry information can be directly selected.
[0070] Optionally, the target data may include data related to the live stream and / or data not related to the live stream.
[0071] The data related to the live streaming room refers to data at the live streaming room level, including but not limited to the mapping relationship between live streaming rooms and live streaming entrances, live streaming room attribute information, and other live streaming room-related information. The mapping relationship between live streaming rooms and live streaming entrances is determined by the server providing the live streaming room-related data based on the preset live streaming room types for each live streaming entrance. This can be the live streaming entrances that are allowed to be distributed to each live streaming room, and / or the live streaming rooms that are allowed to be accessed by each live streaming entrance. Live streaming room attribute information may include, for example, the live streaming room title, type, stream address, cover image, etc. Other live streaming room-related information may include other information that may be involved besides the above. The live streaming room-related data can be pre-stored in the local cache of the live streaming room distribution device and updated periodically.
[0072] Non-livestream related data can be data from dimensions other than the livestream itself, which is massive in volume and may be quite scattered. Therefore, non-livestream related data does not need to be stored in the local cache of the livestream distribution device. Instead, it can be retrieved selectively when certain non-livestream related data is needed, thus avoiding the consumption of a large amount of local cache.
[0073] Optionally, acquiring the target data may specifically include:
[0074] Using the first target data loading plugin in the target data loading plugin, the live room-related data is read from the local cache of the live room distribution device as the target data; and / or
[0075] The second target data loading plugin in the target data loading plugin is used to obtain the non-live room related data from the server that provides non-live room related data through an RPC request, and use it as the target data.
[0076] In this embodiment, for live stream-related data, a data loading plugin capable of loading live stream-related data (denoted as the first target data loading plugin) can be used to read the data from the local cache, which can quickly obtain the required data. For non-live stream-related data, a data loading plugin capable of loading non-live stream-related data (denoted as the second target data loading plugin) can be used to obtain the required non-live stream-related data from the server providing the non-live stream-related data via an RPC request, which can obtain the required data in a targeted manner without occupying a large amount of local cache.
[0077] It should be noted that if more than two target data loading plugins are used in this embodiment, since there is no influence between the target data, the two or more target data loading plugins can be executed in parallel, which can reduce the time consumption.
[0078] Optionally, there are multiple target filtering strategy plugins; S203, which describes determining whether the target live stream entry can distribute the live stream to be accessed based on the target object information, the information of the live stream to be accessed, and the target data, includes:
[0079] Based on the target object information, the information of the live room to be accessed, and the target data, multiple target filtering strategy plugins are used to sequentially determine whether the target live entry can distribute the live room to be accessed; wherein, different target filtering strategy plugins are used to run programs with different filtering strategies.
[0080] In this embodiment, since different preset filtering strategy plugins are used to run programs of different filtering strategies, and in determining the target filtering strategy plugin, different target filtering strategy plugins are used to run programs of different target filtering strategies. When using two or more target filtering strategy plugins, as long as one of the target filtering strategy plugins determines that the condition is not met, there is no need to continue running the other target filtering strategy plugins. Therefore, in this embodiment, two or more target filtering strategy plugins can be executed in a serial manner to avoid unnecessary execution processes and improve the execution efficiency of the filtering strategy plugins.
[0081] Based on any of the above embodiments, log reporting and / or data statistics functions can also be provided, specifically:
[0082] Based on the live stream entry information, a preset log reporting plugin is run to record log data and report it to the management device; and / or
[0083] The preset data statistics plugin is run based on the live stream entry information to collect statistics on relevant data during the live stream distribution process.
[0084] In this embodiment, as Figure 3 As shown, a preset log reporting plugin, LogReporter, can be used to record log data throughout the process and report it to the management device. A preset data statistics plugin, MetricsReporter, can also be used to collect relevant data during the process and report it to the management device. Logs and / or statistical results can be used for troubleshooting, avoiding long troubleshooting steps and improving problem location efficiency. If both preset log reporting and preset data statistics plugins are used simultaneously, they can be executed in parallel. Furthermore, some live streaming entry points require the use of preset log reporting and / or preset data statistics plugins, while others do not. Therefore, the selection and execution can be based on the live streaming entry point information.
[0085] Based on any of the above embodiments, the live streaming room-related data can be pre-stored in the local cache of the live streaming room distribution device and updated periodically. The specific process may include:
[0086] At each first predetermined time interval, relevant data for the live streaming room is retrieved from at least one database and stored in the local cache of the live streaming room distribution device;
[0087] The at least one database is used to receive and store live-stream related data sent by the server that provides live-stream related data at second predetermined intervals.
[0088] In this embodiment, the server providing live stream-related data can periodically acquire all currently online live stream data, such as the all currently online live stream data periodically pushed by the online live stream server. It extracts live stream-related data from this data according to preset rules, such as the mapping relationship between the live stream and the live stream entry point, live stream attribute information, and other live stream-related information. This live stream-related data is then sent to at least one database for storage at second predetermined intervals. For example, the mapping relationship between the live stream and the live stream entry point is sent to a first Redis database, the live stream attribute information is sent to a second Redis database, and other live stream-related information is sent to a third Redis database. This allows the databases to handle the load and provide live stream-related data to the local cache at first predetermined intervals. This eliminates the need for the live stream distribution device to directly retrieve data from the server providing the live stream-related data or the online live stream server, reducing reliance on these servers and lowering QPS. Furthermore, the live stream distribution device can asynchronously pull live stream-related data from at least one database. It should be noted that the predetermined intervals mentioned above can be determined based on actual circumstances.
[0089] refer to Figure 4 , Figure 4 This is a schematic flowchart of a live stream distribution method provided in an embodiment of this disclosure. The method of this embodiment can be applied to a server that provides live stream-related data, and can be an electronic device such as a server. The live stream distribution method includes:
[0090] S401: Periodically acquire all currently online live streaming room data.
[0091] In this embodiment, the current full set of online live stream data can be provided by the online live stream server, which is the underlying basic live stream service. The online live stream server can periodically (every third predetermined time interval) push the current full set of online live stream data to the server providing the live stream data. The third predetermined time interval can be 5 seconds. In this embodiment, the full set of live stream data is pushed instead of pulled to avoid redundant calculations and single points of failure, and to improve horizontal scalability.
[0092] Optionally, the online live streaming server can periodically push all currently online live streaming data to a message queue. The server providing live streaming data can retrieve the currently online full live streaming data pushed to the message queue by the online live streaming server.
[0093] S402. Extract relevant data from the current online live streaming room data according to preset rules.
[0094] In this embodiment, after obtaining all currently online live streaming room data, the server providing the live streaming room data can extract the required live streaming room data and provide it to the database.
[0095] The data related to the live streaming room includes, but is not limited to, at least one of the following: the mapping relationship between the live streaming room and the live streaming entrance, the attribute information of the live streaming room, and other information related to the live streaming room. For details, please refer to the above embodiments.
[0096] Optionally, the mapping relationship between live rooms and live entry points can be extracted from the current online full set of live room data according to preset rules. Specifically, this may include:
[0097] Based on the preset live room types for each live room entry, determine the live room entry that each live room in the currently online full live room data is allowed to distribute, and define it as the mapping relationship between live rooms and live entry; and / or, determine the live room that each live room entry is allowed to enter from the currently online full live room data, and define it as the mapping relationship between live rooms and live entry.
[0098] In this embodiment, the types of live streaming rooms allowed for distribution can be preset for each live streaming entry point. Without target object information, the mapping relationship between live streaming rooms and live streaming entry points can be determined. Specifically, for any live streaming room, its live streaming room type can be determined, and then, based on the preset live streaming room types for each live streaming entry point, it can be determined which live streaming entry points the live streaming room can be distributed through; alternatively, for any live streaming entry point, live streaming rooms that meet its corresponding preset live streaming room type can be filtered from the full set of live streaming room data to determine the live streaming rooms allowed for distribution from that entry point. The result obtained in either of these cases can serve as the mapping relationship between live streaming rooms and live streaming entry points.
[0099] The extraction of live stream attribute information and other related information can be done using conventional data extraction methods, which will not be elaborated here.
[0100] S403. The live room-related data is sent to at least one database for storage, so that the live room distribution device can obtain the live room-related data from the at least one database and store it in the local cache of the live room distribution device, thereby providing corresponding target data for the target filtering strategy, so that the live room distribution device controls the distribution of the target live entry to the live room to be accessed through the target filtering strategy based on the target object information, the information of the live room to be accessed and the target data.
[0101] In this embodiment, after extracting the live room-related data, the live room-related data can be sent to at least one database for storage. The database can provide the live room-related data to the local cache of the live room distribution device, thereby providing corresponding target data for the target filtering strategy. This allows the live room distribution device to determine whether the target live entry can distribute the live room to be accessed based on the target object attribute information, the target object information, the information of the live room to be accessed, and the target data, through the target filtering strategy. If it is determined that the target live entry can distribute the live room to be accessed, then the live room to be accessed is distributed so that the target object can enter the live room to be accessed through the target live entry. The specific process can be found in the above embodiment.
[0102] Furthermore, the database can also provide live stream-related data to offline service devices. These devices can retrieve this data and store it in a local cache to build index data for search and recommendation. Unlike live stream distribution devices, offline service devices do not need to receive real-time access requests from target users to the target live stream entry point. Instead, they provide search and recommendation index data, allowing target users to search for or recommend live streams based on this index data. Additionally, offline service devices can asynchronously retrieve live stream-related data from at least one database.
[0103] It should be noted that offline service devices, after obtaining only the allowed distribution live stream entry points for each live stream room from the database, can convert these allowed entry points into the live stream rooms that each entry point is allowed to access; or, after obtaining only the allowed access live stream rooms for each live stream entry point from the database, they can convert these allowed access live stream rooms into the allowed distribution live stream entry points for each live stream room. Based on the allowed distribution live stream entry points and the allowed access live stream rooms for each entry point, it is convenient to build index data for search and recommendation.
[0104] Optionally, since the time interval between offline service devices retrieving live stream-related data from the database and storing it in the local cache may be relatively long, the server providing the live stream-related data can also, as well as... Figure 5 The process is as follows:
[0105] S501. Compare the current online full live room data with the previous online full live room data to identify the live rooms with discrepancies.
[0106] S502. Send the relevant data of the live streaming rooms that have differences to the offline service device so that the offline service device can update the relevant data of the live streaming rooms in the local cache of the offline service device.
[0107] In this embodiment, the server providing live room-related data can compare the current online full live room data with the previous online full live room data to identify live rooms with discrepancies, including newly added live rooms, closed live rooms, and live rooms with modified attribute information. The server then directly sends the relevant data of the discrepancies to the offline service device, such as the live room entry points that are allowed to be distributed, live room attribute information, and other live room-related information. This allows the offline service device to update the live room-related data in its local cache more quickly, or directly provide it to the offline service to build index data for search and recommendation.
[0108] Based on any of the above embodiments, the periodic acquisition of all currently online live streaming room data described in S401 may further include:
[0109] Obtain multiple data sets of currently online full live room data periodically pushed by the online live room server. The multiple data sets are obtained by dividing the currently online full live room data according to the hash bucket method.
[0110] In this embodiment, to prevent CAS conflicts and avoid old data overwriting new data, storing each live room with a separate key would lead to low read / write and traversal efficiency in the Redis database. Therefore, in this embodiment, the online live room server pushes all currently online live room data to the server providing live room-related data. The data is divided into multiple data sets (buckets) using hash bucketing. Multiple live rooms form one data set, and each data set uses a key to store live room-related data, thereby improving the throughput of live room-related data in individual messages.
[0111] Specifically, the online live streaming server can first determine the total number of data sets, and then take the remainder of each live streaming room identifier in the current online full live streaming data with respect to the total number. The relevant data of each live streaming room is stored in the corresponding data set according to the remainder. For example, if the remainder is 1, it is stored in the first data set; if the remainder is 2, it is stored in the second data set, and so on. The online live streaming server writes the data into the message queue in an ordered manner according to the key hash. The server providing the live streaming data can directly use the key and the total number of data sets sent from the message queue as its own bucketing basis, which minimizes the problem of CAS conflicts and old data overwriting new data, and has a self-healing function.
[0112] Corresponding to the live streaming room distribution method in the above embodiment, Figure 6 This is a structural block diagram of a live streaming distribution device provided in an embodiment of this disclosure. For ease of explanation, only the parts relevant to the embodiments of this disclosure are shown. (Refer to...) Figure 6The live streaming distribution device 600 includes: a receiving unit 601, a determining unit 602, a processing unit 603, and a distribution unit 604.
[0113] The receiving unit 601 is used to receive the access request from the target object to the target live streaming entrance. The access request includes live streaming entrance information, target object information, and information about the live streaming room to be accessed.
[0114] The determining unit 602 is used to determine the target filtering strategy and the target data corresponding to the target filtering strategy based on the live broadcast entry information.
[0115] Processing unit 603 is used to determine whether the target live streaming entry can distribute the live streaming room to be accessed based on the target object information, the information of the live streaming room to be accessed, and the target data, through the target filtering strategy.
[0116] The distribution unit 604 is configured to distribute the live room to be accessed if it is determined that the target live entrance can distribute the live room to be accessed, so that the target object can enter the live room to be accessed through the target live entrance.
[0117] According to one or more embodiments of this disclosure, when the determining unit 602 determines the target filtering strategy and the target data corresponding to the target filtering strategy based on the live stream entry information, it is used to:
[0118] From a plurality of preset filtering strategy plugins, at least one preset filtering strategy plugin corresponding to the live stream entry information is selected as the target filtering strategy plugin, and the target filtering strategy plugin is used to run the program of the preset filtering strategy; the preset filtering strategy corresponding to the target filtering strategy plugin is determined as the target filtering strategy.
[0119] From a plurality of preset data loading plugins, at least one preset data loading plugin for obtaining target data corresponding to the target filtering strategy is selected as the target data loading plugin; the data loaded by the target data loading plugin is determined as the target data corresponding to the target filtering strategy.
[0120] According to one or more embodiments of this disclosure, the target data includes live stream-related data and / or non-live stream-related data; when acquiring the target data, the processing unit 603 is used to:
[0121] Using the first target data loading plugin in the target data loading plugin, the live room-related data is read from the local cache of the live room distribution device as the target data; and / or
[0122] The second target data loading plugin in the target data loading plugin is used to obtain the non-live room related data from the server that provides non-live room related data through an RPC request, and use it as the target data.
[0123] According to one or more embodiments of this disclosure, the processing unit 603 is further configured to:
[0124] At each first predetermined time interval, relevant data for the live streaming room is retrieved from at least one database and stored in the local cache of the live streaming room distribution device;
[0125] The at least one database is used to receive and store live-stream related data sent by the server that provides live-stream related data at second predetermined intervals.
[0126] According to one or more embodiments of this disclosure, the live streaming room related data includes at least one of the following: the mapping relationship between the live streaming room and the live streaming entrance, the live streaming room attribute information, and other live streaming room related information, wherein the mapping relationship between the live streaming room and the live streaming entrance is determined by the server providing the live streaming room related data based on the preset live streaming room type of each live streaming entrance.
[0127] According to one or more embodiments of this disclosure, there are multiple target filtering strategy plugins; when the processing unit 603 determines whether the target live stream entry can distribute the live stream to be accessed based on the target object information, the information of the live stream to be accessed, and the target data, it is used to:
[0128] Based on the target object information, the information of the live room to be accessed, and the target data, multiple target filtering strategy plugins are used to sequentially determine whether the target live entry can distribute the live room to be accessed; wherein, different target filtering strategy plugins are used to run programs with different target filtering strategies.
[0129] According to one or more embodiments of this disclosure, the processing unit 603 is further configured to:
[0130] Based on the live stream entry information, a preset log reporting plugin is run to record log data and report it to the management device; and / or
[0131] The preset data statistics plugin is run based on the live stream entry information to collect statistics on relevant data during the live stream distribution process.
[0132] The live streaming distribution device provided in this embodiment can be used to execute the technical solution of the above-described live streaming distribution device side method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0133] Corresponding to the live streaming room distribution method in the above embodiment, Figure 7 This is a structural block diagram of a server providing live streaming data according to an embodiment of this disclosure. For ease of explanation, only the parts relevant to the embodiment of this disclosure are shown. (Refer to...) Figure 7 The server 700 that provides live streaming data includes: an acquisition unit 701, an extraction unit 702, and a sending unit 703.
[0134] Among them, the acquisition unit 701 is used to periodically acquire all currently online live room data;
[0135] Extraction unit 702 is used to extract relevant data of the live room from the current online full live room data according to preset rules;
[0136] The sending unit 703 is used to send the live room-related data to at least one database for storage, so that the live room distribution device can obtain the live room-related data from the at least one database and store it in the local cache of the live room distribution device, thereby providing corresponding target data for the target filtering strategy. This allows the live room distribution device to control the distribution of the target live room to be accessed through the target filtering strategy based on the target object information, the information of the live room to be accessed, and the target data.
[0137] According to one or more embodiments of this disclosure, the live streaming room related data includes at least one of the following: the mapping relationship between the live streaming room and the live streaming entrance, live streaming room attribute information, and other live streaming room related information.
[0138] According to one or more embodiments of this disclosure, when the acquisition unit 701 extracts live-stream related data from the currently online full live-stream data according to preset rules, it is used to:
[0139] Based on the preset live room types for each live room entry, determine the live room entry that each live room in the currently online full live room data is allowed to distribute, and define it as the mapping relationship between live rooms and live entry; and / or, determine the live room that each live room entry is allowed to enter from the currently online full live room data, and define it as the mapping relationship between live rooms and live entry.
[0140] According to one or more embodiments of this disclosure, when periodically acquiring all currently online live streaming room data, the acquisition unit 701 is used to:
[0141] Retrieve the full data of currently online live streaming rooms that are periodically pushed to the message queue by the online live streaming room server.
[0142] According to one or more embodiments of this disclosure, when periodically acquiring all currently online live streaming room data, the acquisition unit 701 is used to:
[0143] Obtain multiple data sets of currently online full live room data periodically pushed by the online live room server. The multiple data sets are obtained by dividing the currently online full live room data according to the hash bucket method.
[0144] According to one or more embodiments of this disclosure, the at least one database is further configured to allow offline service devices to periodically acquire live stream-related data and store it in the local cache of the offline service devices to construct index data for search and recommendation.
[0145] The extraction unit 702 is further configured to compare the current online full live room data with the previous online full live room data to determine the live rooms with discrepancies.
[0146] The sending unit 703 is further configured to send relevant data of the live streaming rooms that have discrepancies to the offline service device, so that the offline service device can update the relevant data of the live streaming rooms in the local cache of the offline service device.
[0147] The server providing live streaming data provided in this embodiment can be used to execute the technical solution of the above-described method embodiment for providing live streaming data on the server side. Its implementation principle and technical effect are similar, and will not be repeated here.
[0148] The live streaming distribution device and the server providing live streaming data in the above embodiments can both be adopted as follows: Figure 8 The electronic device shown is implemented, referencing Figure 8 The diagram illustrates a structural schematic of an electronic device 800 suitable for implementing embodiments of the present disclosure. The electronic device 800 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0149] like Figure 8As shown, the electronic device 800 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device 800. The processing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0150] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 800 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0151] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by a processing device 801, it performs the functions defined in the methods of embodiments of this disclosure.
[0152] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0153] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0154] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0155] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0156] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0157] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0158] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0159] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0160] In a first aspect, according to one or more embodiments of this disclosure, a live streaming room distribution method is provided, applied to a live streaming room distribution device, the method comprising:
[0161] Receive a request from a target object to access a target live stream entry point. The access request includes live stream entry point information, target object information, and information about the live stream room to be accessed.
[0162] Based on the live stream entry information, determine the target filtering strategy and the target data corresponding to the target filtering strategy;
[0163] Based on the target object information, the information of the live stream to be accessed, and the target data, the target filtering strategy determines whether the target live stream entry can distribute the live stream to be accessed.
[0164] If it is determined that the target live streaming portal can distribute the live streaming room to be accessed, then the live streaming room to be accessed is distributed so that the target object can enter the live streaming room to be accessed through the target live streaming portal.
[0165] According to one or more embodiments of this disclosure, determining the target filtering strategy and the target data corresponding to the target filtering strategy based on the live stream entry information includes:
[0166] From a plurality of preset filtering strategy plugins, at least one preset filtering strategy plugin corresponding to the live stream entry information is selected as the target filtering strategy plugin, and the target filtering strategy plugin is used to run the program of the preset filtering strategy; the preset filtering strategy corresponding to the target filtering strategy plugin is determined as the target filtering strategy.
[0167] From a plurality of preset data loading plugins, at least one preset data loading plugin for obtaining target data corresponding to the target filtering strategy is selected as the target data loading plugin; the data loaded by the target data loading plugin is determined as the target data corresponding to the target filtering strategy.
[0168] According to one or more embodiments of this disclosure, the target data includes live stream-related data and / or non-live stream-related data; determining the data loaded by the target data loading plugin as the target data corresponding to the target filtering strategy includes:
[0169] Using the first target data loading plugin in the target data loading plugin, the live room-related data is read from the local cache of the live room distribution device as the target data; and / or
[0170] The second target data loading plugin in the target data loading plugin is used to obtain the non-live room related data from the server that provides non-live room related data through an RPC request, and use it as the target data.
[0171] According to one or more embodiments of this disclosure, the method further includes:
[0172] At each first predetermined time interval, relevant data for the live streaming room is retrieved from at least one database and stored in the local cache of the live streaming room distribution device;
[0173] The at least one database is used to receive and store live-stream related data sent by the server that provides live-stream related data at second predetermined intervals.
[0174] According to one or more embodiments of this disclosure, the live streaming room related data includes at least one of the following: the mapping relationship between the live streaming room and the live streaming entrance, the live streaming room attribute information, and other live streaming room related information, wherein the mapping relationship between the live streaming room and the live streaming entrance is determined by the server providing the live streaming room related data based on the preset live streaming room type of each live streaming entrance.
[0175] According to one or more embodiments of this disclosure, there are multiple target filtering strategy plugins; the step of determining whether the target live stream entry can distribute the live stream to be accessed based on the target object information, the information of the live stream to be accessed, and the target data, through the target filtering strategy, includes:
[0176] Based on the target object information, the information of the live room to be accessed, and the target data, multiple target filtering strategy plugins are used to sequentially determine whether the target live entry can distribute the live room to be accessed.
[0177] According to one or more embodiments of this disclosure, the method further includes:
[0178] Based on the live stream entry information, a preset log reporting plugin is run to record log data and report it to the management device; and / or
[0179] The preset data statistics plugin is run based on the live stream entry information to collect statistics on relevant data during the live stream distribution process.
[0180] Secondly, according to one or more embodiments of this disclosure, a live streaming room distribution method is provided, applied to a server that provides live streaming room-related data, the method comprising:
[0181] Periodically acquire all currently online live streaming room data;
[0182] Extract relevant data from all currently online live streaming rooms according to preset rules;
[0183] The live stream-related data is sent to at least one database for storage, so that the live stream distribution device can obtain the live stream-related data from the at least one database and store it in the local cache of the live stream distribution device, thereby providing corresponding target data for the target filtering strategy. This allows the live stream distribution device to control the distribution of the target live stream entry to the live stream to be accessed based on the target object information, the information of the live stream to be accessed, and the target data through the target filtering strategy.
[0184] According to one or more embodiments of this disclosure, the live streaming room related data includes at least one of the following: the mapping relationship between the live streaming room and the live streaming entrance, live streaming room attribute information, and other live streaming room related information.
[0185] According to one or more embodiments of this disclosure, the step of extracting live-stream related data from the currently online full volume of live-stream data according to preset rules includes:
[0186] Based on the preset live room types for each live room entry, determine the live room entry that each live room in the currently online full live room data is allowed to distribute, and define it as the mapping relationship between live rooms and live entry; and / or, determine the live room that each live room entry is allowed to enter from the currently online full live room data, and define it as the mapping relationship between live rooms and live entry.
[0187] According to one or more embodiments of this disclosure, the periodic acquisition of all currently online live streaming room data includes:
[0188] Retrieve the full data of currently online live streaming rooms that are periodically pushed to the message queue by the online live streaming room server.
[0189] According to one or more embodiments of this disclosure, the periodic acquisition of all currently online live streaming room data includes:
[0190] Obtain multiple data sets of currently online full live room data periodically pushed by the online live room server. The multiple data sets are obtained by dividing the currently online full live room data according to the hash bucket method.
[0191] According to one or more embodiments of this disclosure, the at least one database is further configured to allow offline service devices to periodically acquire live stream-related data and store it in the local cache of the offline service devices to construct index data for search and recommendation; the method further includes:
[0192] Compare the current online data of all live streaming rooms with the data of all live streaming rooms online at the previous moment to identify the live streaming rooms with discrepancies.
[0193] Data related to live streams that differ from each other is sent to offline service devices so that the offline service devices can update the live stream data in their local cache.
[0194] Thirdly, according to one or more embodiments of this disclosure, a live streaming distribution device is provided, comprising:
[0195] The receiving unit is used to receive the access request from the target object to the target live streaming entrance. The access request includes live streaming entrance information, target object information, and information about the live streaming room to be accessed.
[0196] The determining unit is used to determine the target filtering strategy and the target data corresponding to the target filtering strategy based on the live broadcast entry information.
[0197] The processing unit is configured to determine, based on the target object information, the information of the live room to be accessed, and the target data, whether the target live entry can distribute the live room to be accessed through the target filtering strategy.
[0198] The distribution unit is configured to distribute the live room to be accessed if it is determined that the target live entry can distribute the live room to be accessed, so that the target object can enter the live room to be accessed through the target live entry.
[0199] According to one or more embodiments of this disclosure, when the determining unit determines the target filtering strategy and the target data corresponding to the target filtering strategy based on the live stream entry information, it is configured to:
[0200] From a plurality of preset filtering strategy plugins, at least one preset filtering strategy plugin corresponding to the live stream entry information is selected as the target filtering strategy plugin, and the target filtering strategy plugin is used to run the program of the preset filtering strategy; the preset filtering strategy corresponding to the target filtering strategy plugin is determined as the target filtering strategy.
[0201] From a plurality of preset data loading plugins, at least one preset data loading plugin for obtaining target data corresponding to the target filtering strategy is selected as the target data loading plugin; the data loaded by the target data loading plugin is determined as the target data corresponding to the target filtering strategy.
[0202] According to one or more embodiments of this disclosure, the target data includes live stream-related data and / or non-live stream-related data; when acquiring the target data, the processing unit is used to:
[0203] Using the first target data loading plugin in the target data loading plugin, the live room-related data is read from the local cache of the live room distribution device as the target data; and / or
[0204] The second target data loading plugin in the target data loading plugin is used to obtain the non-live room related data from the server that provides non-live room related data through an RPC request, and use it as the target data.
[0205] According to one or more embodiments of this disclosure, the processing unit is further configured to:
[0206] At each first predetermined time interval, relevant data for the live streaming room is retrieved from at least one database and stored in the local cache of the live streaming room distribution device;
[0207] The at least one database is used to receive and store live-stream related data sent by the server that provides live-stream related data at second predetermined intervals.
[0208] According to one or more embodiments of this disclosure, the live streaming room related data includes at least one of the following: the mapping relationship between the live streaming room and the live streaming entrance, the live streaming room attribute information, and other live streaming room related information, wherein the mapping relationship between the live streaming room and the live streaming entrance is determined by the server providing the live streaming room related data based on the preset live streaming room type of each live streaming entrance.
[0209] According to one or more embodiments of this disclosure, there are multiple target filtering strategy plugins; when the processing unit determines whether the target live streaming entry can distribute the live streaming room to be accessed based on the target object information, the information of the live streaming room to be accessed, and the target data, it is used to:
[0210] Based on the target object information, the information of the live room to be accessed, and the target data, multiple target filtering strategy plugins are used to sequentially determine whether the target live entry can distribute the live room to be accessed.
[0211] According to one or more embodiments of this disclosure, the processing unit is further configured to:
[0212] Based on the live stream entry information, a preset log reporting plugin is run to record log data and report it to the management device; and / or
[0213] The preset data statistics plugin is run based on the live stream entry information to collect statistics on relevant data during the live stream distribution process.
[0214] Fourthly, according to one or more embodiments of this disclosure, a server for providing live streaming room-related data is provided, including:
[0215] The acquisition unit is used to periodically acquire all currently online live streaming room data;
[0216] The extraction unit is used to extract relevant data from the current online live streaming room data according to preset rules.
[0217] The sending unit is used to send the live room-related data to at least one database for storage, so that the live room distribution device can obtain the live room-related data from the at least one database and store it in the local cache of the live room distribution device, thereby providing corresponding target data for the target filtering strategy. This allows the live room distribution device to control the distribution of the target live room to be accessed through the target filtering strategy based on the target object information, the information of the live room to be accessed, and the target data.
[0218] According to one or more embodiments of this disclosure, the live streaming room related data includes at least one of the following: the mapping relationship between the live streaming room and the live streaming entrance, live streaming room attribute information, and other live streaming room related information.
[0219] According to one or more embodiments of this disclosure, when the acquisition unit extracts live-stream related data from the currently online full set of live-stream data according to preset rules, it is used to:
[0220] Based on the preset live room types for each live room entry, determine the live room entry that each live room in the currently online full live room data is allowed to distribute, and define it as the mapping relationship between live rooms and live entry; and / or, determine the live room that each live room entry is allowed to enter from the currently online full live room data, and define it as the mapping relationship between live rooms and live entry.
[0221] According to one or more embodiments of this disclosure, when the acquisition unit periodically acquires all currently online live streaming room data, it is used to:
[0222] Retrieve the full data of currently online live streaming rooms that are periodically pushed to the message queue by the online live streaming room server.
[0223] According to one or more embodiments of this disclosure, when the acquisition unit periodically acquires all currently online live streaming room data, it is used to:
[0224] Obtain multiple data sets of currently online full live room data periodically pushed by the online live room server. The multiple data sets are obtained by dividing the currently online full live room data according to the hash bucket method.
[0225] According to one or more embodiments of this disclosure, the at least one database is further configured to allow offline service devices to periodically acquire data related to the live streaming room and store it in the local cache of the offline service devices to construct index data for search and recommendation; the extraction unit is further configured to compare the currently online full live streaming room data with the previous online full live streaming room data to determine the live streaming rooms with differences.
[0226] The sending unit is further configured to send relevant data of the live streaming rooms that differ to the offline service device, so that the offline service device can update the relevant data of the live streaming rooms in the local cache of the offline service device.
[0227] Fifthly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0228] The memory stores computer-executed instructions;
[0229] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the live streaming distribution method as described in the first aspect and various possible designs of the first aspect.
[0230] In a sixth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, implement the live streaming distribution method described in the first aspect and various possible designs of the first aspect.
[0231] In a seventh aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, the computer program product including computer execution instructions, which, when executed by a processor, implement the live streaming distribution method as described in the first aspect and various possible designs of the first aspect.
[0232] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0233] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0234] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A live room distribution method, characterized in that, The method is applied to a live room distribution device, and comprises the following steps: receiving an access request of a target object to a target live entrance, the access request comprising live entrance information, target object information, and information of a live room to be accessed, the live entrance comprising a host homepage avatar, a follow-up window, and a short video avatar breathing circle; selecting, from a plurality of preset filtering strategy plug-ins, at least one preset filtering strategy plug-in corresponding to the live entrance information as a target filtering strategy plug-in, the target filtering strategy plug-in being used to run a program of a preset filtering strategy; and determining a preset filtering strategy corresponding to the target filtering strategy plug-in as a target filtering strategy; selecting, from a plurality of preset data loading plug-ins, at least one preset data loading plug-in used to acquire target data corresponding to the target filtering strategy as a target data loading plug-in; and determining data loaded by the target data loading plug-in as target data corresponding to the target filtering strategy; the target data comprising live room related data and / or non-live room related data, the live room related data comprising at least one of a mapping relationship between a live room and a live entrance, and live room attribute information, wherein the mapping relationship between the live room and the live entrance is determined by a server providing live room related data according to a preset live room type corresponding to each live entrance; judging, according to the target object information, the information of the live room to be accessed, and the target data, whether the target live entrance can distribute the live room to be accessed through the target filtering strategy; if it is determined that the target live entrance can distribute the live room to be accessed, distributing the live room to be accessed, so that the target object enters the live room to be accessed through the target live entrance.
2. The method of claim 1, wherein, determining the data loaded by the target data loading plug-in as the target data corresponding to the target filtering strategy comprises: reading, by using a first target data loading plug-in in the target data loading plug-in, the live room related data from a local cache of the live room distribution device as the target data; and / or acquiring, by using a second target data loading plug-in in the target data loading plug-in, the non-live room related data from a server providing non-live room related data as the target data through an RPC request.
3. The method of claim 2, wherein, Further comprising: acquiring, every first predetermined time, the live room related data from at least one database and storing the live room related data into the local cache; wherein the at least one database is used to receive and store live room related data sent by a server providing live room related data every second predetermined time.
4. The method of claim 1, wherein, There are a plurality of target filtering strategy plug-ins; judging, according to the target object information, the information of the live room to be accessed, and the target data, whether the target live entrance can distribute the live room to be accessed through the target filtering strategy comprises: judging, according to the target object information, the information of the live room to be accessed, and the target data, whether the target live entrance can distribute the live room to be accessed through a plurality of target filtering strategy plug-ins in series.
5. The method of claim 1, wherein, Further comprising: According to the live entrance information, a preset log reporting plug-in is run, log data is recorded, and the log data is reported; And / or According to the live entrance information, a preset data statistical plug-in is run, and related data of a live room distribution process is counted.
6. A live room distribution method, characterized in that, The application is applied to a server for providing live room related data, and the method comprises: Periodically acquiring full live room data currently online; Extracting live room related data from the full live room data currently online according to a preset rule; The live room related data is sent to at least one database for storage, so that the live room distribution device acquires the live room related data from the at least one database and stores the live room related data in a local cache of the live room distribution device, thereby providing corresponding target data for a target filtering strategy, so that the live room distribution device receives an access request of a target object to a target live entrance, the access request comprises live entrance information, target object information, and information of a live room to be accessed, the live entrance comprises a host homepage avatar, a follow-up window, and a short video avatar breathing circle, from a plurality of preset filtering strategy plug-ins, at least one preset filtering strategy plug-in corresponding to the live entrance information is selected as a target filtering strategy plug-in, a preset filtering strategy corresponding to the target filtering strategy plug-in is determined as a target filtering strategy, from a plurality of preset data loading plug-ins, at least one preset data loading plug-in used to acquire target data corresponding to the target filtering strategy is selected as a target data loading plug-in, data loaded by the target data loading plug-in is determined as target data corresponding to the target filtering strategy, whether the target live entrance can distribute the live room to be accessed is judged by the target filtering strategy according to the target object information, the information of the live room to be accessed, and the target data, if it is determined that the target live entrance can distribute the live room to be accessed, the live room to be accessed is distributed, so that the target object enters the live room to be accessed through the target live entrance; wherein the target filtering strategy plug-in is used to run a program of a preset filtering strategy, the target data comprises live room related data and / or non-live room related data, the live room related data comprises at least one of the following: a mapping relationship between a live room and a live entrance, live room attribute information, wherein the mapping relationship between the live room and the live entrance is determined by a server for providing live room related data according to a preset live room type corresponding to each live entrance.
7. The method of claim 6, wherein, The live room related data is extracted from the full live room data currently online according to a preset rule, which comprises: According to the preset live room type of each live entrance, it is determined that each live room in the full live room data currently online is allowed to distribute the live entrance, and it is determined as the mapping relationship between the live room and the live entrance; and / or, it is determined that each live entrance in the full live room data currently online is allowed to enter the live room, and it is determined as the mapping relationship between the live room and the live entrance.
8. The method of claim 6, wherein, The full live room data currently online is periodically acquired, which comprises: Obtaining current online full live room data periodically pushed by an online live room server to a message queue from the message queue.
9. The method according to claim 6 or 8, characterized in that, The periodically obtaining current online full live room data comprises: Obtaining a plurality of data sets of current online full live room data periodically pushed by an online live room server, the plurality of data sets being obtained by dividing the current online full live room data in a hash bucket manner.
10. The method of claim 6, wherein, The at least one database is also used for periodically obtaining the live room related data by an offline service device and storing the live room related data into a local cache of the offline service device to construct index data for search and recommendation. The method further comprises: Comparing the current online full live room data with the last time online full live room data to determine live rooms with differences; Sending the live room related data of the live rooms with differences to the offline service device to update the live room related data in the local cache of the offline service device.
11. A live room distribution device, comprising: Comprise: A receiving unit is configured to receive an access request of a target object to a target live entry, the access request comprising live entry information, target object information, and information of a live room to be accessed, and the live entry comprising a host homepage avatar, a follow-up window, and a short video avatar breathing circle; A determining unit is configured to select at least one preset filtering strategy plug-in corresponding to the live entry information from a plurality of preset filtering strategy plug-ins as a target filtering strategy plug-in, the target filtering strategy plug-in being used to run a program of a preset filtering strategy; The preset filtering strategy corresponding to the target filtering strategy plug-in is determined as a target filtering strategy; At least one preset data loading plug-in for obtaining target data corresponding to the target filtering strategy is selected from a plurality of preset data loading plug-ins as a target data loading plug-in; Data loaded by the target data loading plug-in is determined as target data corresponding to the target filtering strategy; the target data comprises live room related data and / or non-live room related data, and the live room related data comprises at least one of a mapping relationship between a live room and a live entry and live room attribute information, wherein the mapping relationship between the live room and the live entry is determined by a server providing live room related data according to a preset live room type corresponding to each live entry; A processing unit is configured to determine whether the target live entry can distribute the live room to be accessed by the target object according to the target object information, the information of the live room to be accessed, and the target data through the target filtering strategy. A distribution unit is configured to distribute the live room to be accessed if it is determined that the target live entry can distribute the live room to be accessed, so that the target object enters the live room to be accessed through the target live entry.
12. A server for providing live room related data, the server comprising: Comprise: An obtaining unit is configured to periodically obtain current online full live room data; An extracting unit is configured to extract live room related data from the current online full live room data according to a preset rule. The sending unit is configured to send the live room related data to at least one database for storage, so that the live room distribution device obtains the live room related data from the at least one database and stores the live room related data to a local cache of the live room distribution device, thereby providing corresponding target data for a target filtering strategy, so that the live room distribution device receives an access request of a target object to a target live entry, the access request comprising live entry information, target object information, and information of a live room to be accessed, the live entry comprising a host homepage avatar, a follow-up window, and a short video avatar breathing circle, from a plurality of preset filtering strategy plug-ins, at least one preset filtering strategy plug-in corresponding to the live entry information is selected as a target filtering strategy plug-in, a preset filtering strategy corresponding to the target filtering strategy plug-in is determined as a target filtering strategy, from a plurality of preset data loading plug-ins, at least one preset data loading plug-in used for obtaining target data corresponding to the target filtering strategy is selected as a target data loading plug-in, data loaded by the target data loading plug-in is determined as target data corresponding to the target filtering strategy, whether the target live entry can distribute the live room to be accessed is determined according to the target object information, the information of the live room to be accessed, and the target data through the target filtering strategy, if it is determined that the target live entry can distribute the live room to be accessed, the live room to be accessed is distributed, so that the target object enters the live room to be accessed through the target live entry; wherein the target filtering strategy plug-in is configured to run a program of a preset filtering strategy, the target data comprises live room related data and / or non-live room related data, the live room related data comprises at least one of the following: a mapping relationship between a live room and a live entry, and live room attribute information, wherein the mapping relationship between the live room and the live entry is determined by a server providing live room related data according to a preset live room type corresponding to each live entry.
13. An electronic device, comprising: Comprise: At least one processor and a memory; The memory stores computer execution instructions; The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the method of any one of claims 1-5 or 6-10.
14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the method of any one of claims 1-5 or 6-10 is realized.
15. A computer program product, characterised in that, The computer program product comprises computer execution instructions, and when the processor executes the computer execution instructions, the method of any one of claims 1-5 or 6-10 is realized.
Citation Information
Patent Citations
Method and device for page loading
CN107066545A
Video playing method and device and computer readable storage medium
CN110113625A