Content distribution method and device, storage medium and electronic equipment
By using smooth weighted polling model and dynamic weight adjustment in the content distribution method, the load imbalance and uncertain response time caused by different node processing capabilities are solved, and the balanced allocation of content data and the stability of the system are achieved.
Patent Information
- Application Number
- CN202310542991.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2024-11-12
AI Technical Summary
Existing content distribution methods cannot achieve balanced allocation of requests when processing nodes have different processing capabilities, resulting in unbalanced load and uncertain response time, and cannot handle content distribution requests normally when nodes crash or network failure.
By obtaining the performance detection data of the content data to be distributed and the content container, setting the initial weight parameters and inputting the smooth weighted polling model, determining the distribution sequence, distributing the content data to the corresponding container round by round, and dynamically adjusting the weight parameters to achieve load balancing and error tolerance .
It improves the efficiency of content distribution and task processing speed, ensures balanced allocation of content data and system stability, and avoids the impact of node overload and failure on the system.
Smart Images

Figure CN118945167A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a content distribution method and device, a storage medium, and an electronic device. Background Art
[0002] Objective: Related technologies usually use a polling algorithm to distribute requests to different nodes in a fixed order when processing content distribution. However, when the processing capabilities of the nodes are different, the polling algorithm cannot achieve balanced distribution of requests, resulting in load imbalance. Due to the different processing capabilities of the nodes, the processing time of the same request on different nodes is also different, which will also lead to uncertain response time of the request. In addition, in the event of node crash or network failure, the content distribution request cannot be processed normally.
[0003] Currently, no effective solution has been proposed to address the problem of low efficiency in content distribution. Summary of the invention
[0004] The embodiments of the present application provide a content distribution method and device, a storage medium, and an electronic device to at least solve the technical problem of low efficiency of content distribution.
[0005] According to one aspect of an embodiment of the present application, a content distribution method is provided, including: obtaining content data to be distributed and a first group of content containers allowed to receive the content data; setting a first group of initial weight parameters for the first group of content containers according to performance detection data of the first group of content containers, wherein the first group of content containers and the first group of initial weight parameters have a one-to-one correspondence; inputting the first group of initial weight parameters into a smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of the content data; and distributing the content data to the first group of content containers round by round according to the first distribution sequence.
[0006] According to another aspect of an embodiment of the present application, a content distribution device is also provided, including: an acquisition module, used to acquire content data to be distributed and a first group of content containers allowed to receive the content data; a processing module, used to set a first group of initial weight parameters for the first group of content containers according to performance detection data of the first group of content containers, wherein the first group of content containers corresponds one-to-one to the first group of initial weight parameters; a determination module, used to input the first group of initial weight parameters into a smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of the content data; a distribution module, used to distribute the content data to the first group of content containers round by round according to the first distribution sequence.
[0007] Optionally, the device is also used to set a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers in the following manner: obtaining a first performance parameter of the first content container; when the first performance parameter satisfies a preset parameter condition, determining the first content container as a container in the first group of content containers, wherein the preset parameter condition is used to measure whether the first content container has the ability to receive the content data; when the first performance parameter satisfies a first preset sub-condition, setting a first initial weight parameter for the first content container, wherein the first group of initial weight parameters includes the first initial weight parameter, and the first preset sub-condition is used to measure the ability of the first content container to process the content data; when the first performance parameter does not meet the first preset sub-condition, setting a second initial weight parameter for the first content container, wherein the first group of initial weight parameters includes the second initial weight parameter, and the value of the second initial weight parameter is less than the first initial weight parameter.
[0008] Optionally, the device is also used to: obtain a second performance parameter of a second content container, wherein the second content container is a content container pre-set to perform a preset task together with the first content container; when the second performance parameter satisfies the preset parameter condition, determine the second content container as a container in the first group of content containers; when the second performance parameter satisfies a second preset sub-condition, set a third initial weight parameter for the first content container, wherein the first group of initial weight parameters includes the third initial weight parameter, and the second preset sub-condition is used to measure the ability of the second content container to process the content data, and when the value of the second preset sub-condition is less than the value of the first preset sub-condition, the third initial weight parameter is less than the first initial weight parameter; when the second performance parameter does not meet the second preset sub-condition, set a fourth initial weight parameter for the second content container, wherein the first group of initial weight parameters includes the fourth initial weight parameter, the value of the fourth initial weight parameter is less than the third initial weight parameter, and when the value of the second preset sub-condition is less than the value of the first preset sub-condition, the fourth initial weight parameter is less than the second initial weight parameter.
[0009] Optionally, the device is also used to: obtain a first processing request delay and a second processing request delay of the first content container, wherein the first processing request delay and the second processing request delay both represent the time consumed for processing the content data in the first content container, and the first processing request delay occurs before the second processing request delay; when the first processing request delay is greater than the second processing request delay, increase the initial weight parameter set for the first content container; when the first processing request delay is less than the second processing request delay, reduce the initial weight parameter set for the first content container.
[0010] Optionally, the device is also used to: cancel the initial weight parameters allocated to the first content container when it is detected that the first content container cannot process the content data normally; and allocate the initial weight parameters allocated to the first content container to a third content container in the first group of content containers other than the first content container.
[0011] Optionally, the device is also used to: obtain media information content data to be distributed and the first group of content containers that receive the media information content data; distribute the media information content data to the first group of content containers in rounds according to the first distribution sequence; or obtain content data to be reviewed to be distributed and the first group of content containers that receive the content data to be reviewed; distribute the content data to be reviewed to the first group of content containers in rounds according to the first distribution sequence; or obtain content data to be marked to be distributed and the first group of content containers that receive the content data to be marked; distribute the content data to be marked to the first group of content containers in rounds according to the first distribution sequence.
[0012] Optionally, the device is also used to obtain the media information content data to be distributed and the first group of content containers for receiving the media information content data in the following manner; distribute the media information content data to the first group of content containers round by round according to the first distribution sequence: obtain the media information content data to be distributed and the first group of content containers for receiving the media information content data, wherein one content container in the first group of content containers corresponds to a media information publishing account; obtain a consumption parameter set corresponding to the group of media information publishing accounts; set the first group of initial weight parameters for the group of media information publishing accounts according to the consumption parameter set; input the first group of initial weight parameters into the smooth weighted polling model to determine the first distribution sequence, wherein the first distribution sequence is used to indicate the media information publishing account selection order corresponding to the distribution of a round of the media information content data; distribute the media information content data to the group of media information publishing accounts round by round according to the first distribution sequence.
[0013] Optionally, the device is also used to input the first group of initial weight parameters into a smooth weighted polling model in the following manner to determine a first distribution sequence, including: obtaining the weights and parameters of the first group of initial weight parameters; determining the content container corresponding to the first sub-weight parameter as the first target content container, wherein the first target content container is located in the first order of the first distribution sequence, and the first sub-weight parameter is the initial weight parameter with the largest value in the first group of initial weight parameters; updating the weight parameter of the first target content container to a first update parameter, wherein the first update parameter is the difference between the first sub-weight parameter and the weights and parameters; jointly determining a first group of target weight parameters based on the first update parameter and the first group of initial weight parameters, and determining the first distribution sequence based on the first group of target weight parameters.
[0014] Optionally, the device is further configured to jointly determine a first group of target weight parameters based on the first update parameter and the first group of initial weight parameters in the following manner, and determine the first distribution sequence based on the first group of target weight parameters: determine the first distribution sequence N-1 times in the following manner, wherein N is the value of the weight sum parameter, and N is a positive integer greater than 1, and the manner of determining the first distribution sequence each time is as follows: add the first update parameter to the first sub-weight parameter, and add each initial weight parameter in the first group of initial weight parameters to itself to generate the first group of target weight parameters; determine the content container corresponding to the second sub-weight parameter as the second target content container, wherein the second target content container is located in the next order of the first target content container in the first distribution sequence, and the second sub-weight parameter is the weight parameter with the largest value in the first group of target weight parameters; update the weight parameter of the second target content container to the second update parameter, wherein the second update parameter is the difference between the second sub-weight parameter and the second weight sum, and the second weight sum is the sum of the values of the first group of target weight parameters; jointly determine the second group of target weight parameters based on the second update parameter and the first group of initial weight parameters, and determine the first distribution sequence based on the second group of target weight parameters.
[0015] Optionally, the device is also used to: obtain a second group of content containers that are allowed to receive target content data distributed from the first group of content containers, wherein the second group of content containers and the first group of content containers are content containers of different levels; set a second group of initial weight parameters for the second group of content containers according to performance detection data of the second group of content containers, wherein the second group of content containers and the second group of initial weight parameters have a one-to-one correspondence; input the second group of initial weight parameters into the smooth weighted polling model to determine a second distribution sequence, wherein the second distribution sequence is used to indicate a container selection order corresponding to a distribution round of the target content data; and distribute the target content data to the second group of content containers round by round according to the second distribution sequence.
[0016] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned content distribution method when running.
[0017] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above content distribution method.
[0018] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the content distribution method through the computer program.
[0019] In an embodiment of the present application, a method is adopted in which content data to be distributed and a first group of content containers that are allowed to receive content data are obtained, a first group of initial weight parameters are set for the first group of content containers based on performance detection data of the first group of content containers, and the first group of initial weight parameters are input into a smooth weighted polling model to determine a first distribution sequence, and then the content data is distributed to the first group of content containers in rounds according to the first distribution sequence. By setting a first group of initial weight parameters associated with the performance detection data of the first group of content containers, and then determining the first distribution sequence based on the first group of initial weight parameters, the purpose of evenly distributing content data is achieved, thereby improving the distribution efficiency of content data and the speed of task processing, and thereby solving the problem of low efficiency of content distribution existing in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 is a schematic diagram of an application environment of an optional content distribution method according to an embodiment of the present application;
[0022] Figure 2 is a flowchart of an optional content distribution method according to an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of an optional content distribution method according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of another optional content distribution method according to an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of another optional content distribution method according to an embodiment of the present application;
[0026] Figure 6 is a schematic diagram of another optional content distribution method according to an embodiment of the present application;
[0027] Figure 7 is a schematic diagram of another optional content distribution method according to an embodiment of the present application;
[0028] Figure 8 is a schematic diagram of another optional content distribution method according to an embodiment of the present application;
[0029] Fig. 9 is a schematic diagram of another optional content distribution method according to an embodiment of the present application;
[0030] Fig.10 is a schematic structural diagram of an optional content distribution device according to an embodiment of the present application;
[0031] Fig.11 is a schematic diagram of the structure of an optional content distribution product according to an embodiment of the present application;
[0032] Fig.12 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:
[0036] Smooth Weighted Round-Robin Algorithm: (Smooth Weighted Round-Robin Algorithm) is a weight-based load balancing algorithm.
[0037] SWRR: Smooth Weighted Round-Robin Algorithm.
[0038] The present application is described below in conjunction with embodiments:
[0039] According to one aspect of an embodiment of the present application, a content distribution method is provided. Optionally, in this embodiment, the above content distribution method can be applied to Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1As shown, the server 101 is connected to the terminal 103 via a network, and can be used to provide services for the terminal device or the application installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include, but is not limited to, a wired network and a wireless network, wherein the wired network includes, for example, a local area network, a metropolitan area network, and a wide area network; the wireless network includes, for example, Bluetooth, WIFI, and other networks that implement wireless communication; the terminal device 103 may be a terminal configured with an application program, and may include, but is not limited to, at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal, and other computer devices; the above-mentioned server may be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0040] Combination Figure 1 As shown, the above content distribution method can be implemented in the terminal device 103 through the following steps:
[0041] S1, obtaining content data to be distributed and a first group of content containers that are allowed to receive the content data on the terminal device 103;
[0042] S2, setting a first group of initial weight parameters for the first group of content containers on the terminal device 103 according to the performance detection data of the first group of content containers, wherein the first group of content containers corresponds to the first group of initial weight parameters in a one-to-one manner;
[0043] S3, inputting the first set of initial weight parameters into the smooth weighted polling model on the terminal device 103 to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of content data;
[0044] S4, distributing the content data to the first group of content containers on the terminal device 103 in rounds according to the first distribution sequence.
[0045] Optionally, in this embodiment, the above content distribution method can also be implemented by a server, for example, Figure 1It is implemented in the server 101 shown; or it is implemented by the terminal device and the server together.
[0046] The above is only an example and is not specifically limited in this embodiment.
[0047] Optionally, as an optional implementation, as Figure 2 As shown, the above content distribution method includes:
[0048] S202, obtaining content data to be distributed and a first group of content containers that are allowed to receive the content data;
[0049] S204, setting a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers, wherein the first group of content containers and the first group of initial weight parameters correspond one to one;
[0050] Optionally, in this embodiment, the above-mentioned content data may include but is not limited to advertisement data, game request data, live broadcast traffic data and other data that can be distributed during the course of the business.
[0051] Optionally, in this embodiment, the above-mentioned content container may include but is not limited to a container in the form of a server, an advertising publishing account, a live broadcast room, etc. that allows receiving content data in the content distribution process.
[0052] Optionally, in this embodiment, the performance detection data may include but is not limited to consumption data, load data, latency data, and other data of the content container that can be used to indicate that the content container is allowed to receive content data shares.
[0053] Optionally, in this embodiment, the above-mentioned first group of initial weight parameters include but are not limited to parameters in the form of 4, 3, 5; 20%, 30%, 50%, etc. It should be noted that the first group of initial weight parameters can be used to indicate the share of content data that each content container in the first group of content containers is allowed to receive.
[0054] S206, inputting the first group of initial weight parameters into the smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of content data;
[0055] S208 , distributing the content data to the first group of content containers round by round according to the first distribution sequence.
[0056] Optionally, in this embodiment, the smooth weighted polling model may include but is not limited to a distribution sequence (i.e., a first distribution sequence) for allocating content data to each content container in a first group of content containers according to an input first set of initial weight parameters.
[0057] In an exemplary embodiment, taking a game scenario as an example, a method for matching game users to enter a game may include but is not limited to the following steps:
[0058] S1, obtaining a game user matching request to be distributed and a group of game servers allowed to receive the game user matching request;
[0059] S2, setting a set of initial weight parameters for the group of game servers according to the processing speed of the group of game servers, wherein the group of game servers corresponds to the set of initial weight parameters one by one;
[0060] S3, inputting the first group of initial weight parameters into the smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate the order in which the matching requests of game users in a round are distributed to the corresponding game servers;
[0061] S4, distributing the game user matching requests to a group of game servers round by round according to the first distribution sequence.
[0062] For example, Figure 3 is a schematic diagram of an optional content distribution method according to an embodiment of the present application, such as Figure 3 As shown, taking the game scenario as an example, by obtaining the game user matching requests to be distributed and a group of game servers (server A, server B, server C) that are allowed to receive the game user matching requests, a group of initial weight parameters are set for the group of game servers according to the processing speed of the group of game servers, and the group of initial weight parameters are input into the smooth weighted polling model to obtain a distribution sequence (server A, server B, server C, server A, server C), and then all the game user matching requests to be distributed are distributed to each server.
[0063] In an exemplary embodiment, taking live broadcast room traffic distribution (i.e. live broadcast room traffic diversion) as an example, the method for live broadcast room traffic distribution may include but is not limited to the following steps:
[0064] S1, obtaining the online user traffic of the platform to be distributed and a group of live broadcast room accounts allowed to receive user traffic;
[0065] S2, setting a group of initial weight parameters for a group of live broadcast room accounts according to the traffic delivery amount consumed by the group of live broadcast room accounts, wherein a group of live broadcast room accounts corresponds to a group of initial weight parameters one by one;
[0066] S3, inputting the first set of initial weight parameters into the smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate the order in which a round of user traffic is distributed to the corresponding live broadcast room account;
[0067] S4, distributing user traffic to a group of live broadcast room accounts in rounds according to the first distribution sequence.
[0068] For example, Figure 4 is a schematic diagram of another optional content distribution method according to an embodiment of the present application, such as Figure 4 As shown, taking the live broadcast room traffic diversion scenario as an example, the platform online user traffic to be distributed and a group of live broadcast room accounts (live broadcast room account A, live broadcast room account B, live broadcast room account C) that are allowed to receive user traffic are obtained, and a group of initial weight parameters are set for a group of live broadcast room accounts according to the amount of traffic consumed by a group of live broadcast room accounts. The group of initial weight parameters are input into the smooth weighted polling model to determine the first distribution sequence (live broadcast room account A, live broadcast room account B, live broadcast room account A, live broadcast room account C, live broadcast room account A), and the user traffic is distributed to a group of live broadcast room accounts in rounds according to the first distribution sequence.
[0069] In an exemplary embodiment, taking the allocation of tasks to different servers to achieve the purpose of network load balancing as an example, the following steps may be included but are not limited to:
[0070] S1, obtains the tasks to be distributed and the first set of servers allowed to process the tasks;
[0071] S2, setting a first group of initial weight parameters for the first group of servers according to the performance detection data of the first group of servers, wherein the first group of servers corresponds to the first group of initial weight parameters one by one;
[0072] S3, inputting the first group of initial weight parameters into the smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of content data;
[0073] S4, distributing the content data to the first group of servers round by round according to the first distribution sequence.
[0074] Through this embodiment, the content data to be distributed and the first group of content containers allowed to receive the content data are obtained, and then a first group of initial weight parameters are set for the first group of content containers according to the performance detection data of the first group of content containers, and then the first group of initial weight parameters are input into a smooth weighted polling model to determine a first distribution sequence, and then the content data is distributed to the first group of content containers in rounds according to the first distribution sequence. By setting the first group of initial weight parameters associated with the performance detection data of the first group of content containers, and then determining the first distribution sequence according to the first group of initial weight parameters, the purpose of evenly distributing the content data is achieved, thereby improving the distribution efficiency of the content data and the speed of task processing, and thus solving the problem of low efficiency of content distribution existing in the related art.
[0075] As an optional scheme, a first group of initial weight parameters is set for the first group of content containers according to performance detection data of the first group of content containers, including: obtaining a first performance parameter of the first content container; when the first performance parameter satisfies a preset parameter condition, determining the first content container as a container in the first group of content containers, wherein the preset parameter condition is used to measure whether the first content container has the ability to receive content data; when the first performance parameter satisfies a first preset sub-condition, setting a first initial weight parameter for the first content container, wherein the first group of initial weight parameters includes a first initial weight parameter, and the first preset sub-condition is used to measure the ability of the first content container to process content data; when the first performance parameter does not meet the first preset sub-condition, setting a second initial weight parameter for the first content container, wherein the first group of initial weight parameters includes a second initial weight parameter, and the value of the second initial weight parameter is less than the first initial weight parameter.
[0076] Optionally, in this embodiment, the first content container may include but is not limited to a server, an advertising publishing account, a live broadcast room, and other forms of containers that allow content data to be received during the content distribution process.
[0077] Optionally, in this embodiment, the first performance parameter may include but is not limited to a consumption amount parameter, computing power, server processing speed, and other performance parameters that may be used to indicate the ability of the first content container to receive content data.
[0078] Optionally, in this embodiment, the above-mentioned preset parameter conditions may include but are not limited to the consumption amount threshold being greater than or equal to the preset amount, the computing power being greater than or equal to the preset value, the server processing speed being greater than or equal to the preset speed, and other parameter conditions flexibly set by relevant technical personnel according to actual application scenarios. The above-mentioned first preset sub-condition may include but is not limited to one of the conditions that the consumption amount threshold is greater than or equal to the preset amount, the computing power is greater than or equal to the preset value, and the server processing speed is greater than or equal to the preset speed, or any combination of the above conditions.
[0079] It should be noted that the above-mentioned first initial weight parameter and the above-mentioned second initial weight parameter are set according to the first performance parameter of the first content container. Specifically, when the first performance parameter of the first content container satisfies the first preset sub-condition, the first initial weight parameter can be set to a higher value, and when the first performance parameter of the first content container does not satisfy the first preset sub-condition, the second initial weight parameter can be set to a lower value, wherein the value of the first initial weight parameter is greater than the value of the second initial weight parameter.
[0080] It should be noted that the above initial weight parameters are dynamic and can be flexibly set by relevant technical personnel according to the needs of actual application scenarios.
[0081] As an optional solution, the above method also includes: obtaining a second performance parameter of a second content container, wherein the second content container is a content container pre-set to perform a preset task together with the first content container; when the second performance parameter meets the preset parameter condition, determining the second content container as a container in the first group of content containers; when the second performance parameter meets the second preset sub-condition, setting a third initial weight parameter for the first content container, wherein the first group of initial weight parameters includes the third initial weight parameter, and the second preset sub-condition is used to measure the ability of the second content container to process content data, and when the value of the second preset sub-condition is less than the value of the first preset sub-condition, the third initial weight parameter is less than the first initial weight parameter; when the second performance parameter does not meet the second preset sub-condition, setting a fourth initial weight parameter for the second content container, wherein the first group of initial weight parameters includes the fourth initial weight parameter, the value of the fourth initial weight parameter is less than the third initial weight parameter, and when the value of the second preset sub-condition is less than the value of the first preset sub-condition, the fourth initial weight parameter is less than the second initial weight parameter.
[0082] Optionally, in this embodiment, the second content container may include but is not limited to a server, an advertising publishing account, a live broadcast room, etc., which are containers that allow receiving content data in the content distribution process.
[0083] It should be noted that the above-mentioned second content container is a content container pre-set to perform preset tasks together with the first content container. It can be understood that, in the advertising delivery scenario, when the user advertising request is content data, the first content container can be understood as different advertising publishing accounts; in the application scenario of video content review, when the content data is video data to be reviewed, the first content container and the second content container can be understood as different video content review accounts.
[0084] Optionally, in this embodiment, the second performance parameter may include but is not limited to a consumption amount parameter, computing power, server processing speed, and other performance parameters that may be used to indicate the ability of the second content container to receive content data.
[0085] Optionally, in this embodiment, the above-mentioned preset parameter conditions may include but are not limited to the consumption amount threshold being greater than or equal to the preset amount, the computing power being greater than or equal to the preset value, the server processing speed being greater than or equal to the preset speed, and other parameter conditions flexibly set by relevant technical personnel according to actual application scenarios. The above-mentioned second preset sub-condition may include but is not limited to one of the conditions that the consumption amount threshold is greater than or equal to the preset amount, the computing power is greater than or equal to the preset value, and the server processing speed is greater than or equal to the preset speed, or any combination of the above conditions.
[0086] It should be noted that the third initial weight parameter and the fourth initial weight parameter are set according to the second performance parameter of the second content container. Specifically, when the second performance parameter of the second content container satisfies the second preset sub-condition, the third initial weight parameter can be set to a larger value. When the second performance parameter of the second content container does not satisfy the second preset sub-condition, the fourth initial weight parameter can be set to a smaller value. The value of the third initial weight parameter is greater than the value of the fourth initial weight parameter.
[0087] In an exemplary embodiment, when the value of the second preset sub-condition is less than the value of the first preset sub-condition, the third initial weight parameter is less than the first initial weight parameter. It can be understood that, taking the allocation of videos to be reviewed to a video content review account as an example, if the review speed of review account A (corresponding to the first content container) is 40 / hour (corresponding to the above-mentioned first performance parameter), and the review speed of review account B (corresponding to the second content container) is 20 / hour (corresponding to the above-mentioned second performance parameter), the first preset sub-condition is greater than or equal to 40 / hour, the initial weight of review account A is 4, and the second preset sub-condition is 20 / hour, then the initial weight parameter of review account B will be set to a value less than the first initial weight parameter, such as setting the initial weight parameter of review account B to 2.
[0088] It should be noted that the above second initial weight parameter is dynamic and can be flexibly set by relevant technical personnel according to the needs of actual application scenarios.
[0089] As an optional scheme, the above method also includes: obtaining a first processing request delay and a second processing request delay of the first content container, wherein the first processing request delay and the second processing request delay both represent the time consumed for processing the content data in the first content container, and the first processing request delay occurs before the second processing request delay; when the first processing request delay is greater than the second processing request delay, increasing the initial weight parameter set for the first content container; when the first processing request delay is less than the second processing request delay, reducing the initial weight parameter set for the first content container.
[0090] Optionally, in this embodiment, the above-mentioned first processing request delay may include but is not limited to content review speed, server processing speed, computing power, etc., which can be used to identify the time consumed for processing the content data in the first content container.
[0091] It should be noted that the above-mentioned first processing request delay occurs before the second processing request delay. It can be understood that the time taken by the first content container to process the content data corresponding to the first processing request delay is longer than the time taken to process the content data corresponding to the second processing request delay. In other words, the efficiency of the first content container in processing content data is improved. Therefore, the initial weight parameter of the first content container can be increased, so that within the same time, the first content container can receive more content data processing tasks, thereby improving the efficiency of content distribution and content processing.
[0092] Similarly, in the case where the first processing request delay is less than the second processing request delay, reducing the initial weight parameter set for the first content container can be understood as the time taken by the first content container to process the content data corresponding to the second processing request delay is longer than the time taken to process the content data corresponding to the first processing request delay. In other words, the efficiency of the first content container in processing content data is reduced. Therefore, in order to achieve the purpose of balanced distribution of content data, the initial weight parameter of the first content container can be reduced, so that within the same time, the first content container can receive fewer content data processing tasks, thereby avoiding overloading of the first content container.
[0093] As an optional solution, the above method also includes: when it is detected that the first content container cannot process content data normally, canceling the initial weight parameters allocated to the first content container; and allocating the initial weight parameters allocated to the first content container to a third content container in the first group of content containers other than the first content container.
[0094] It should be noted that the above detection that the first content container cannot normally process content data can be understood as the first content container being down or having a network failure, thereby causing the first content container to be unable to normally process content data.
[0095] Optionally, in this embodiment, detectors such as computing speed and content processing speed may be used but are not limited to perform real-time detection on the process of the first content container processing the content container, and the detection results may be uploaded in real time.
[0096] Optionally, in this embodiment, the third content container may include but is not limited to other content containers in a group of content containers that allow normal processing of content data.
[0097] Through this embodiment, when it is detected that the first content container cannot process content data normally, the initial weight parameters allocated to the first content container are canceled, and the initial weight parameters allocated to the first content container are allocated to the third content container in the first group of content containers except the first content container. By setting a fault-tolerant mechanism, the purpose of improving the fault tolerance rate of content distribution and processing is achieved, thereby achieving the technical effect of improving the stability and reliability of the system.
[0098] As an optional solution, the above method also includes: obtaining media information content data to be distributed and a first group of content containers that receive the media information content data; distributing the media information content data to the first group of content containers in rounds according to the first distribution sequence; or obtaining content data to be reviewed to be distributed and a first group of content containers that receive the content data to be reviewed; distributing the content data to be reviewed to the first group of content containers in rounds according to the first distribution sequence; or obtaining content data to be marked to be distributed and a first group of content containers that receive the content data to be marked; distributing the content data to be marked to the first group of content containers in rounds according to the first distribution sequence.
[0099] Optionally, in this embodiment, the above-mentioned media information content data may include but is not limited to advertisements, game request information, platform online user information, etc.
[0100] In an exemplary embodiment, taking an advertisement delivery scenario as an example, the method for distributing advertisement requests may include but is not limited to the following steps:
[0101] S1, obtaining the user advertising request to be distributed and a group of advertising publishing accounts allowed to receive the user advertising request;
[0102] S2, distributing the user advertisement request to a group of advertisement publishing accounts in rounds according to the first distribution sequence.
[0103] Optionally, in this embodiment, the above-mentioned content data to be reviewed may include but is not limited to videos, articles, pictures and other data that need to be reviewed to see whether their content data conforms to mainstream values.
[0104] It should be noted that, in the case where the content data is content data to be reviewed, the first group of content containers can be understood as a group of staff who review the content data.
[0105] Optionally, in this embodiment, the above-mentioned content data to be annotated may include but is not limited to content data such as videos, pictures, text information, etc., and the first group of content containers corresponding to the above-mentioned content data to be annotated can be understood as a group of AI devices that can be used for intelligent annotation.
[0106] As an optional solution, media information content data to be distributed and a first group of content containers for receiving the media information content data are obtained; and the media information content data are distributed to the first group of content containers in rounds according to a first distribution sequence, including: obtaining the media information content data to be distributed and a first group of content containers for receiving the media information content data, wherein one content container in the first group of content containers corresponds to a media information publishing account; obtaining a set of consumption parameters corresponding to a group of media information publishing accounts; setting a first group of initial weight parameters for a group of media information publishing accounts according to the set of consumption parameters; inputting the first group of initial weight parameters into a smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate an order of selecting media information publishing accounts corresponding to distributing a round of media information content data; and distributing the media information content data to a group of media information publishing accounts in rounds according to the first distribution sequence.
[0107] Optionally, in this embodiment, the above-mentioned media information publishing account may include but is not limited to an advertising publishing account, a live broadcast room account, etc.
[0108] In an exemplary embodiment, taking an advertisement delivery scenario as an example, the method for distributing advertisement requests may include but is not limited to the following steps:
[0109] S1, obtaining the user advertising request to be distributed and a group of advertising publishing accounts allowed to receive the user advertising request;
[0110] S2, setting a set of initial weight parameters for a group of advertising publishing accounts according to the advertising amount consumed by the group of advertising publishing accounts, wherein the group of advertising publishing accounts corresponds to the set of initial weight parameters one by one;
[0111] S3, inputting the first group of initial weight parameters into the smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate the order in which a round of user advertising requests is distributed to the corresponding advertising publishing accounts;
[0112] S4, distributing the user advertisement request to a group of advertisement publishing accounts in rounds according to the first distribution sequence.
[0113] For example, Figure 5 is a schematic diagram of an optional content distribution method according to an embodiment of the present application, such as Figure 5As shown, taking the advertising delivery scenario as an example, user advertising requests to be distributed (user advertising request 1, user advertising request 2, user advertising request 3, user advertising request 4, user advertising request 5) and a group of advertising publishing accounts allowed to receive user advertising requests (advertising publishing account A, advertising publishing account B, advertising publishing account C) are obtained, and then a group of initial weight parameters are set for the group of advertising publishing accounts according to the advertising delivery amount consumed by the group of advertising publishing accounts, and the group of initial weight parameters are input into the smooth weighted polling model to obtain a distribution sequence (advertising publishing account B, advertising publishing account A, advertising publishing account B, advertising publishing account C, advertising publishing account B), and the user advertising requests are distributed to the group of advertising publishing accounts according to the distribution sequence.
[0114] As an optional scheme, the first group of initial weight parameters is input into a smooth weighted polling model to determine a first distribution sequence, including: obtaining weights and parameters of the first group of initial weight parameters; determining the content container corresponding to the first sub-weight parameter as the first target content container, wherein the first target content container is located at the first position in the first distribution sequence, and the first sub-weight parameter is the initial weight parameter with the largest value in the first group of initial weight parameters; updating the weight parameter of the first target content container to the first update parameter, wherein the first update parameter is the difference between the first sub-weight parameter and the weight and parameter; jointly determining the first group of initial weight parameters based on the first update parameter and the first group of initial weight parameters, and determining the first distribution sequence based on the first group of initial weight parameters.
[0115] Optionally, in this embodiment, the weight and parameter of the first set of initial weight parameters is the sum of the first set of initial weight parameters. For example, the first set of initial weight parameters is: 4, 2, 1, then the weight and parameter of the first set of initial weight parameters is 7.
[0116] Optionally, in this embodiment, the first target content container is a content container at the first order in the first distribution sequence, that is, a content container of the first backup content data.
[0117] Optionally, in this embodiment, the first sub-weight parameter is 4 in the aforementioned example (the first group of initial weight parameters is: 4, 2, 1).
[0118] Optionally, in this embodiment, the weight parameter for updating the first target content container is the first update parameter, wherein the first update parameter is the difference between the first sub-weight parameter and the weight sum parameter, which can be understood as, for example, a group of content containers are A, B, and C, and the initial weight parameters of a group of content containers are 4, 2, and 1, respectively. Then, the weight sum parameter of the first group of initial weight parameters is 7, and the first sub-weight parameter is 4. Then, the content container A corresponding to the first sub-weight parameter is used as the first target content container, and the weight parameter of the content container A is updated, and -3 (4-7=-3) is used as the first update parameter.
[0119] As an optional solution, a first group of target weight parameters is jointly determined based on a first update parameter and a first group of initial weight parameters, and a first distribution sequence is determined based on the first group of target weight parameters, including: determining the first distribution sequence N-1 times in the following manner, wherein N is the value of the weight sum parameter, and N is a positive integer greater than 1, and each determination of the first distribution sequence is performed in the following manner: adding the first update parameter to the first sub-weight parameter, and adding each initial weight parameter in the first group of initial weight parameters to itself to generate a first group of target weight parameters; determining the content container corresponding to the second sub-weight parameter as the second target content container, wherein the second target content container is located in the next order of the first target content container in the first distribution sequence, and the second sub-weight parameter is the weight parameter with the largest value in the first group of target weight parameters; updating the weight parameter of the second target content container to the second update parameter, wherein the second update parameter is the difference between the second sub-weight parameter and the second weight sum, and the second weight sum is the sum of the values of the first group of target weight parameters; jointly determining the second group of target weight parameters based on the second update parameter and the first group of initial weight parameters, and determining the first distribution sequence based on the second group of target weight parameters.
[0120] Optionally, in this embodiment, the first update parameter is added to the first sub-weight parameter, and each initial weight parameter in the first group of initial weight parameters is added to itself to generate a first group of target weight parameters. It can be understood that, for example, a group of content containers are A, B, and C, and the initial weight parameters of a group of content containers are 4, 2, and 1, respectively. Then, the weight and parameter of the first group of initial weight parameters is 7, and the first sub-weight parameter is 4. Then, the content container A corresponding to the first sub-weight parameter is used as the first target content container, and the weight parameter of content container A is updated. -3 (4-7=-3) is used as the first update parameter, and the updated first group of target weights are: 1, 4, 2.
[0121] Optionally, in this embodiment, the content container corresponding to the second sub-weight parameter is determined as the second target content container, wherein the second target content container is located after the first target content container in the first distribution sequence, and the second sub-weight parameter is the weight parameter with the largest value in the first group of target weight parameters. It can be understood that, for example, a group of content containers are A, B, and C, and the initial weight parameters of a group of content containers are: 4, 2, and 1, respectively. Then the weight and parameter of the above-mentioned first group of initial weight parameters is 7, and the first sub-weight parameter is 4. Then the content container A corresponding to the first sub-weight parameter is used as the first target content container, and the weight parameter of content container A is updated, and -3 (4-7=-3) is used as the first updated parameter. The updated first group of target weights are: 1, 4, 2, then content container B is the second target content container, and the second updated parameter is -3 (second sub-weight parameter 4-initial weight and parameter 7=-3).
[0122] As an optional solution, the above method also includes: obtaining a second group of content containers that are allowed to receive target content data distributed from the first group of content containers, wherein the second group of content containers and the first group of content containers are content containers of different levels; setting a second group of initial weight parameters for the second group of content containers according to performance detection data of the second group of content containers, wherein the second group of content containers and the second group of initial weight parameters have a one-to-one correspondence; inputting the second group of initial weight parameters into a smooth weighted polling model to determine a second distribution sequence, wherein the second distribution sequence is used to indicate a container selection order corresponding to the distribution of a round of target content data; and distributing the target content data to the second group of content containers round by round according to the second distribution sequence.
[0123] Optionally, in this embodiment, the second group of content containers and the first group of content containers are content containers of different levels, which can be understood as the first group of content containers and the second group of content containers have different businesses and different work objectives. Specifically, the first group of content containers can be used to perform video review services on received video contents, and the second group of content containers can be used to perform annotation processing services on videos that have passed the review.
[0124] Optionally, in this embodiment, the performance detection data of the second group of content containers may include but are not limited to processing speed, storage capacity and other data used to indicate the ability of the second group of content containers to process content data.
[0125] Optionally, in this embodiment, the above-mentioned second group of initial weight parameters include but are not limited to parameters in the form of 4, 3, 5; 20%, 30%, 50%, etc. It should be noted that the second group of initial weight parameters can be used to indicate the share of content data that each content container in the second group of content containers is allowed to receive.
[0126] The following is a further explanation of this application with reference to specific examples:
[0127] like Figure 6 As shown, the present application is applicable to the scenario of content diversion (bucketing), and the content to be processed can be evenly distributed to multiple buckets to improve the performance of the system and user experience. In the content diversion scenario, it is often necessary to distribute user requests to multiple buckets in order to achieve load balancing and fault tolerance.
[0128] Taking online advertising as an example, when the advertising platform needs to distribute users' advertising requests to multiple advertisers' accounts, this solution can be used to achieve content diversion. Advertising requests can be distributed to different buckets according to different tags, and each bucket corresponds to an advertiser's account. The weight value of each bucket can be set according to the advertiser's consumption to achieve load balancing and maximize revenue. When an advertising request arrives, the system can use a smooth weighted polling algorithm to distribute the request to the corresponding bucket and then process it.
[0129] In other content distribution scenarios, such as live video and music playback, this solution can also be used to achieve load balancing and fault tolerance. By distributing the content to be processed into multiple buckets, the impact of overload and failure of a single bucket on the system can be avoided, improving the availability and stability of the system. At the same time, the weight values of different buckets can be set according to the characteristics and needs of the business to achieve optimal resource utilization and user experience.
[0130] In order to conduct different experiments on different contents, select several buckets with less content for experiments to avoid affecting most of the content. Now it is necessary to divide the content into different buckets. You can consider content diversion method based on smooth weighted polling algorithm to divert content. The following is a design of the implementation scheme of this application:
[0131] 1. Determine the stratification strategy: stratify according to the content dimensions that need to be experimented, such as subject classification, release time, source channel, etc.
[0132] 2. Determine the weight and allocation rules of the buckets: For each layer, determine the weights and allocation rules of different buckets. Here, taking the weights of 4, 2, and 1 as an example, a smooth weighted round-robin algorithm can be used for allocation. That is, each allocation is made according to the weight of the bucket. The allocation rules can refer to the following process:
[0133] (1) First, record the current weight and cumulative weight of each bucket;
[0134] (2) Every time new content enters the experiment, it is divided according to the weight of the current bucket;
[0135] (3) After being diverted to a certain bucket, the cumulative weight of the bucket is added to the current weight, while the cumulative weights of other buckets remain unchanged;
[0136] (4) The next time traffic is diverted, it is diverted according to the updated cumulative weight.
[0137] 3. Content diversion: In each layer, the content is randomly distributed to different buckets and diverted according to the smooth weighted polling algorithm.
[0138] 4. Select the experimental bucket: Select the experimental bucket according to your needs. Usually, you can choose a bucket with a higher weight as the experimental bucket.
[0139] 5. Collect and analyze data: During the experiment, you need to collect data from each bucket and analyze the data to determine which bucket performs better. Based on the experimental results, you can determine whether you need to adjust the weight of the bucket or reset the number and capacity of the bucket.
[0140] The working principle and correctness proof of this application are as follows Figure 7 shown.
[0141] like Figure 8 As shown in the figure, taking the three buckets a, b, and c with weights of 4, 2, and 1 respectively as an example, the content diversion process based on the smooth weighted polling algorithm can be divided into the following steps:
[0142] S1, calculate the weight sum of all buckets;
[0143] First, we need to calculate the weight sum of all buckets, that is, add up the weights of all buckets. In this example, the weight sum is 4+2+1=7.
[0144] S2, initialize the weight value and the index of the current bucket;
[0145] Initialize the weight value and the index of the current bucket, and set the index of the current bucket to 0. In this example, the index of the current bucket is 0, that is, bucket A.
[0146] S3, calculates the weighted polling value of each bucket according to the weight value;
[0147] Calculate the weighted polling value of each bucket based on the weight value. The specific calculation formula is: weighted polling value = weight value of the current bucket / sum of weights of all buckets. In this example, the weighted polling value of bucket A is 4 / 7 = 0.57, the weighted polling value of bucket B is 2 / 7 = 0.29, and the weighted polling value of bucket C is 1 / 7 = 0.14.
[0148] S4, select the bucket currently polled;
[0149] Select the bucket currently polled, that is, select the bucket with the largest weighted polling value. In this example, the bucket currently polled is bucket A.
[0150] S5, update the weight value and the index of the current bucket;
[0151] Update the weight value and the index of the current bucket, subtract the weight value of the current bucket from the sum of the weights of all buckets, and add 1 to the index of the current bucket. In this example, the bucket currently polled is bucket A, and the weight value of bucket A is subtracted from the sum of the weights of all buckets, that is, 4-7=-3. At this time, you need to add 1 to the index of the current bucket and update the index of the current bucket to 1, that is, bucket B.
[0152] S6, repeat steps 3 to 5 until all requests are processed;
[0153] Repeat steps 3 to 5 until all requests are processed. Each time, the bucket with the largest weighted polling value is selected to process the request. In this example, the next bucket selected is bucket B, whose weighted polling value is 0.29. After all buckets are selected, the weighted polling value of each bucket is recalculated and a new round of polling begins. In this way, requests can be smoothly distributed to each bucket, improving system performance and stability.
[0154] The specific steps of the content distribution method of this application are as follows Fig. 9 shown.
[0155] The generated label sequence is generated according to the weight ratio of each bucket according to the smooth weighted polling algorithm. Assuming there are three buckets A, B, and C, and their weight ratio is 4:2:1, then the generated label sequence may be: 1.A, 2.B, 3.A, 4.A, 5.C, 6.A, 7.B, 8.A, 9.A, 10.B, 11.A, 12.A, 13.C, 14.A, 15.B, 16.A, 17.A, 18.B, 19.A, 20.C.
[0156] In the above example, bucket A is selected first, then bucket B, then bucket A, then bucket A, C, A, B, A, A, C, A, B, A, A, B, A, A, B, A, C, A, B, A. The number of selections for each bucket is consistent with its weight ratio, and the fluctuations in the selection sequence are relatively smooth, which can reduce the load and pressure of the system and improve the performance and stability of the system.
[0157] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0158] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0159] According to another aspect of the embodiments of the present application, a content distribution device for implementing the above content distribution method is also provided. Fig.10 As shown, the device comprises:
[0160] An acquisition module 1002 is used to acquire content data to be distributed and a first group of content containers that are allowed to receive the content data;
[0161] The processing module 1004 is used to set a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers, wherein the first group of content containers corresponds to the first group of initial weight parameters one by one;
[0162] A determination module 1006 is used to input the first set of initial weight parameters into the smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of content data;
[0163] The distribution module 1008 is configured to distribute the content data to the first group of content containers in rounds according to a first distribution sequence.
[0164] As an optional scheme, the device is also used to set a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers in the following manner: obtaining a first performance parameter of the first content container; determining the first content container as a container in the first group of content containers when the first performance parameter satisfies a preset parameter condition, wherein the preset parameter condition is used to measure whether the first content container has the ability to receive content data; setting a first initial weight parameter for the first content container when the first performance parameter satisfies a first preset sub-condition, wherein the first group of initial weight parameters includes the first initial weight parameter, and the first preset sub-condition is used to measure the ability of the first content container to process content data; and setting a second initial weight parameter for the first content container when the first performance parameter does not meet the first preset sub-condition, wherein the first group of initial weight parameters includes the second initial weight parameter, and the value of the second initial weight parameter is less than the first initial weight parameter.
[0165] As an optional solution, the device is also used to: obtain a second performance parameter of a second content container, wherein the second content container is a content container pre-set to perform a preset task together with the first content container; when the second performance parameter meets the preset parameter condition, determine the second content container as a container in the first group of content containers; when the second performance parameter meets the second preset sub-condition, set a third initial weight parameter for the first content container, wherein the first group of initial weight parameters includes the third initial weight parameter, and the second preset sub-condition is used to measure the ability of the second content container to process content data, and when the value of the second preset sub-condition is less than the value of the first preset sub-condition, the third initial weight parameter is less than the first initial weight parameter; when the second performance parameter does not meet the second preset sub-condition, set a fourth initial weight parameter for the second content container, wherein the first group of initial weight parameters includes the fourth initial weight parameter, the value of the fourth initial weight parameter is less than the third initial weight parameter, and when the value of the second preset sub-condition is less than the value of the first preset sub-condition, the fourth initial weight parameter is less than the second initial weight parameter.
[0166] As an optional scheme, the device is also used to: obtain a first processing request delay and a second processing request delay of a first content container, wherein the first processing request delay and the second processing request delay both represent the time consumed for processing content data in the first content container, and the first processing request delay occurs before the second processing request delay; and when the first processing request delay is greater than the second processing request delay, increase the initial weight parameter set for the first content container.
[0167] As an optional solution, the device is also used to: cancel the initial weight parameters allocated to the first content container when it is detected that the first content container cannot process content data normally; and allocate the initial weight parameters allocated to the first content container to content containers in the first group of content containers other than the first content container.
[0168] As an optional scheme, the device is also used to: obtain media information content data to be distributed and a first group of content containers that receive the media information content data; distribute the media information content data to the first group of content containers in rounds according to the first distribution sequence; or obtain content data to be reviewed to be distributed and a first group of content containers that receive the content data to be reviewed; distribute the content data to be reviewed to the first group of content containers in rounds according to the first distribution sequence; or obtain content data to be marked to be distributed and a first group of content containers that receive the content data to be marked; distribute the content data to be marked to the first group of content containers in rounds according to the first distribution sequence.
[0169] As an optional solution, the device is also used to obtain media information content data to be distributed and a first group of content containers for receiving the media information content data in the following manner; distribute the media information content data to the first group of content containers in rounds according to a first distribution sequence: obtain the media information content data to be distributed and a first group of content containers for receiving the media information content data, wherein one content container in the first group of content containers corresponds to a media information publishing account; obtain a set of consumption parameters corresponding to a group of media information publishing accounts; set a first group of initial weight parameters for a group of media information publishing accounts according to the set of consumption parameters; input the first group of initial weight parameters into a smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate an order of selecting media information publishing accounts corresponding to distributing a round of media information content data; distribute the media information content data to a group of media information publishing accounts in rounds according to the first distribution sequence.
[0170] As an optional scheme, the device is also used to input the first group of initial weight parameters into the smooth weighted polling model in the following manner to determine the first distribution sequence, including: obtaining the first weight sum of the first group of initial weight parameters; determining the content container corresponding to the first sub-weight parameter as the first target content container, wherein the first target content container is located at the first position of the first distribution sequence, and the first sub-weight parameter is the initial weight parameter with the largest value in the first group of initial weight parameters; updating the weight parameter of the first target content container to the first update parameter, wherein the first update parameter is the difference between the first sub-weight parameter and the first weight sum; determining the second group of initial weight parameters based on the first update parameter and the first group of initial weight parameters, and determining the first distribution sequence based on the second group of initial weight parameters.
[0171] As an optional scheme, the device is also used to jointly determine the first distribution sequence based on the first update parameter and the first group of initial weight parameters in the following manner, including: adding the first update parameter to the first sub-weight parameter, and adding each initial weight parameter in the first group of initial weight parameters to itself to generate a second group of initial weight parameters; obtaining a second weight sum of the second group of initial weight parameters; determining the content container corresponding to the second sub-weight parameter as the second target content container, wherein the second target content container is located in the second order of the first distribution sequence, and the second sub-weight parameter is the initial weight parameter with the largest value in the second group of initial weight parameters; updating the weight parameter of the second target content container to the second update parameter, wherein the second update parameter is the difference between the second sub-weight parameter and the second weight sum, and the second weight sum is the sum of the values of the first group of target weight parameters; jointly determining the second group of target weight parameters based on the second update parameter and the first group of initial weight parameters, and determining the first distribution sequence based on the second group of target weight parameters.
[0172] As an optional solution, the above-mentioned device is also used to: obtain a second group of content containers allowed to receive target content data distributed from the first group of content containers, wherein the second group of content containers and the first group of content containers are content containers of different levels; set a second group of initial weight parameters for the second group of content containers according to performance detection data of the second group of content containers, wherein the second group of content containers and the second group of initial weight parameters have a one-to-one correspondence; input the second group of initial weight parameters into the smooth weighted polling model to determine a second distribution sequence, wherein the second distribution sequence is used to indicate the container selection order corresponding to the distribution of a round of the target content data; and distribute the target content data to the second group of content containers round by round according to the second distribution sequence.
[0173] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0174] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1109, and / or installed from a removable medium 1111. When the computer program is executed by the central processor 1101, various functions provided in the embodiments of the present application are executed.
[0175] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0176] Fig.11 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0177] It should be noted that Fig.11 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0178] like Fig.11As shown, the computer system 1100 includes a central processing unit 1101 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1102 (ROM) or the program loaded from the storage part 1108 to the random access memory 1103 (RAM). Various programs and data required for system operation are also stored in the random access memory 1103. The central processing unit 1101, the read-only memory 1102 and the random access memory 1103 are connected to each other through a bus 1104. An input / output interface 1105 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1104.
[0179] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0180] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the central processor 1101, various functions defined in the system of the present application are executed.
[0181] According to another aspect of the embodiment of the present application, an electronic device for implementing the above content distribution method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Fig.12As shown, the electronic device includes a memory 1202 and a processor 1204. The memory 1202 stores a computer program, and the processor 1204 is configured to execute the steps in any of the above method embodiments through the computer program.
[0182] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0183] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0184] S1, obtaining content data to be distributed and a first group of content containers that are allowed to receive the content data;
[0185] S2, setting a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers, wherein the first group of content containers has a one-to-one correspondence with the first group of initial weight parameters;
[0186] S3, inputting the first group of initial weight parameters into the smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of content data;
[0187] S4, distributing the content data to the first group of content containers round by round according to the first distribution sequence.
[0188] Alternatively, a person skilled in the art may understand that: Fig.12 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig.12 The electronic device and the electronic equipment described above are not limited in structure. Fig.12 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.12 Different configurations are shown.
[0189] Among them, the memory 1202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the content distribution method and device in the embodiments of the present application. The processor 1204 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202, that is, to implement the above-mentioned content distribution method. The memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1202 may further include a memory remotely located relative to the processor 1204, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1202 may be specifically used, but not limited to, to store information such as media account information, detection performance parameters, and so on. As an example, if Fig.12 As shown, the memory 1202 may include but is not limited to the acquisition module 1002, processing module 1004, determination module 1006 and distribution module 1008 in the content distribution device. In addition, it may also include but is not limited to other module units in the content distribution device, which will not be repeated in this example.
[0190] Optionally, the transmission device 1206 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1206 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1206 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0191] In addition, the electronic device further includes: a display 1208 for displaying media content data; and a connection bus 1310 for connecting various module components in the electronic device.
[0192] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.
[0193] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the content distribution method provided in various optional implementations of the above-mentioned content distribution aspects.
[0194] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0195] S1, obtaining content data to be distributed and a first group of content containers that are allowed to receive the content data;
[0196] S2, setting a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers, wherein the first group of content containers has a one-to-one correspondence with the first group of initial weight parameters;
[0197] S3, inputting the first group of initial weight parameters into the smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of content data;
[0198] S4, distributing the content data to the first group of content containers round by round according to the first distribution sequence.
[0199] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0200] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0201] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0202] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0203] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0204] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0206] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A content distribution method, It is characterized in that include: Acquire content data to be distributed and a first set of content containers that are allowed to receive the content data; Setting a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers, wherein the first group of content containers corresponds to the first group of initial weight parameters in a one-to-one manner; Inputting the first group of initial weight parameters into a smooth weighted polling model to determine a first distribution sequence, wherein the first distribution sequence is used to indicate a container selection order corresponding to distributing a round of the content data; The content data is distributed to the first group of content containers in rounds according to the first distribution sequence.
2. The method according to claim 1, It is characterized in that The step of setting a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers includes: Obtaining a first performance parameter of a first content container; In a case where the first performance parameter satisfies a preset parameter condition, determining the first content container as a container in the first group of content containers, wherein the preset parameter condition is used to measure whether the first content container has the ability to receive the content data; In a case where the first performance parameter satisfies a first preset sub-condition, setting a first initial weight parameter for the first content container, wherein the first group of initial weight parameters includes the first initial weight parameter, and the first preset sub-condition is used to measure the ability of the first content container to process the content data; When the first performance parameter does not satisfy the first preset sub-condition, a second initial weight parameter is set for the first content container, wherein the first group of initial weight parameters includes the second initial weight parameter, and a value of the second initial weight parameter is smaller than the first initial weight parameter.
3. The method according to claim 2, It is characterized in that The method further comprises: Acquiring a second performance parameter of a second content container, wherein the second content container is a content container pre-set to perform a preset task together with the first content container; In a case where the second performance parameter satisfies the preset parameter condition, determining the second content container as a container in the first group of content containers; When the second performance parameter satisfies a second preset sub-condition, setting a third initial weight parameter for the first content container, wherein the first group of initial weight parameters includes the third initial weight parameter, and the second preset sub-condition is used to measure the ability of the second content container to process the content data, and when the value of the second preset sub-condition is less than the value of the first preset sub-condition, the third initial weight parameter is less than the first initial weight parameter; In case the second performance parameter does not satisfy the second preset sub-condition, a fourth initial weight parameter is set for the second content container, wherein the first group of initial weight parameters includes the fourth initial weight parameter, the value of the fourth initial weight parameter is smaller than the third initial weight parameter, and in case the value of the second preset sub-condition is smaller than the value of the first preset sub-condition, the fourth initial weight parameter is smaller than the second initial weight parameter.
4. The method according to claim 2, It is characterized in that The method further comprises: Obtaining a first processing request delay and a second processing request delay for the first content container, wherein the first processing request delay and the second processing request delay both represent the time consumed for processing content data in the first content container, and the first processing request delay occurs before the second processing request delay; In a case where the first processing request delay is greater than the second processing request delay, increasing an initial weight parameter set for the first content container; When the first processing request delay is less than the second processing request delay, an initial weight parameter set for the first content container is reduced.
5. The method according to claim 2, It is characterized in that The method further comprises: In the case where it is detected that the first content container cannot normally process the content data, canceling the initial weight parameter allocated to the first content container; The initial weight parameter assigned to the first content container is assigned to a third content container other than the first content container in the first group of content containers.
6. The method according to claim 1, It is characterized in that The method further comprises: Acquire the media information content data to be distributed and receive the first group of content containers of the media information content data; distribute the media information content data to the first group of content containers in rounds according to the first distribution sequence; or Acquire the content data to be distributed and reviewed and receive the first group of content containers of the content data to be reviewed; distribute the content data to be reviewed to the first group of content containers in rounds according to the first distribution sequence; or Acquire the content data to be distributed and marked and receive the first group of content containers for the content data to be marked; distribute the content data to be marked to the first group of content containers in rounds according to the first distribution sequence.
7. The method according to claim 6, It is characterized in that The acquiring of the media information content data to be distributed and receiving the first group of content containers of the media information content data; Distributing the media information content data to the first group of content containers round by round according to the first distribution sequence includes: Acquire media information content data to be distributed and receive the first group of content containers of the media information content data, wherein one content container in the first group of content containers corresponds to a media information publishing account; Obtaining a set of consumption parameters corresponding to the set of media information publishing accounts; Setting the first group of initial weight parameters for the group of media information publishing accounts according to the consumption parameter set; Inputting the first group of initial weight parameters into the smooth weighted polling model to determine the first distribution sequence, wherein the first distribution sequence is used to indicate the order of selecting media information publishing accounts corresponding to distributing a round of the media information content data; The media information content data is distributed to the group of media information publishing accounts in rounds according to the first distribution sequence.
8. The method according to claim 1, It is characterized in that The step of inputting the first group of initial weight parameters into a smooth weighted round-robin model to determine a first distribution sequence comprises: Obtaining weights and parameters of the first set of initial weight parameters; Determine the content container corresponding to the first sub-weight parameter as a first target content container, wherein the first target content container is located at the first position of the first distribution sequence, and the first sub-weight parameter is the initial weight parameter with the largest value in the first group of initial weight parameters; Updating the weight parameter of the first target content container to a first update parameter, wherein the first update parameter is a difference between the first sub-weight parameter and the weight sum parameter; A first set of target weight parameters is jointly determined based on the first update parameters and the first set of initial weight parameters, and the first distribution sequence is determined based on the first set of target weight parameters.
9. The method according to claim 8, It is characterized in that The determining a first group of target weight parameters based on the first update parameter and the first group of initial weight parameters, and determining the first distribution sequence based on the first group of target weight parameters, comprises: The first distribution sequence is determined N-1 times in the following manner, wherein N is the value of the weight and parameter, and N is a positive integer greater than 1, and the manner of determining the first distribution sequence each time is as follows: Adding the first update parameter to the first sub-weight parameter, and adding each initial weight parameter in the first group of initial weight parameters to itself, to generate the first group of target weight parameters; Determine the content container corresponding to the second sub-weight parameter as a second target content container, wherein the second target content container is located after the first target content container in the first distribution sequence, and the second sub-weight parameter is an initial weight parameter with the largest value in the first group of target weight parameters; Updating the weight parameter of the second target content container to a second update parameter, wherein the second update parameter is a difference between the second sub-weight parameter and a second weight sum, and the second weight sum is a sum of the values of the first group of target weight parameters; A second set of target weight parameters is jointly determined based on the second update parameters and the first set of initial weight parameters, and the first distribution sequence is determined based on the second set of target weight parameters.
10. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: Acquire a second group of content containers that are allowed to receive the target content data distributed from the first group of content containers, wherein the second group of content containers and the first group of content containers are content containers of different levels; Setting a second set of initial weight parameters for the second set of content containers according to the performance detection data of the second set of content containers, wherein the second set of content containers corresponds to the second set of initial weight parameters in a one-to-one manner; Inputting the second group of initial weight parameters into the smooth weighted polling model to determine a second distribution sequence, wherein the second distribution sequence is used to indicate a container selection order corresponding to distributing a round of the target content data; The target content data is distributed to the second group of content containers in rounds according to the second distribution sequence.
11. A content distribution device, It is characterized in that include: An acquisition module, used for acquiring content data to be distributed and a first group of content containers that are allowed to receive the content data; A processing module, configured to set a first group of initial weight parameters for the first group of content containers according to the performance detection data of the first group of content containers, wherein the first group of content containers corresponds to the first group of initial weight parameters in a one-to-one manner; A determination module, used for inputting a first set of initial weight parameters into a smooth weighted polling model to determine a target distribution sequence, wherein the target distribution sequence is used to indicate a container selection order corresponding to distributing a round of content data; The distribution module is used to distribute the content data to the first group of content containers in rounds according to the target distribution sequence.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 10.
13. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
14. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.
Citation Information
Patent Citations
Wafer detection task processing method, device and system and storage medium
CN114168310A
Gateway load balancing control method, device and equipment and readable storage medium
CN115842828A
Dynamic placement of advertisements in a video streaming platform
US11223864B1
Entity based content distribution
WO2015168938A1
Method and apparatus for obtaining identifier, storage medium, and electronic device
WO2018196553A1
Cited By
Large file distribution method and device, equipment, medium and product
CN120935160A
Large file distribution method, apparatus, device, medium, and product
CN120935160B
