Method and device for executing pull advertisement plan task, equipment and storage medium
The method and device optimize advertising plan task distribution by using historical data to calculate minimum task entities and group plans, preventing machine overload and bandwidth peaks, thus ensuring efficient and resource-effective task execution.
Patent Information
- Application Number
- CN202411362865.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-17
AI Technical Summary
Existing timed-triggered task runners cause machine overload and bandwidth peak overlap when executing multiple advertising plan report data pulls, leading to resource wastage and abnormal machine operations.
A method and device that distribute advertising plan tasks across multiple task subjects, using historical data to calculate the minimum number of task entities and group plans based on average durations and bandwidth loads, ensuring even distribution and avoiding peak overlaps.
Prevents machine overload and bandwidth peaks by optimizing task distribution, reducing resource waste and ensuring timely task completion without machine abnormalities.
Smart Images

Figure CN119151603A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of dynamic task execution, and in particular to a method, device, computer equipment and storage medium for executing a task of pulling an advertisement plan. Background Art
[0002] Currently, a timed-triggered task runner is used to execute tasks. However, once a task is triggered, it will only be executed on a certain machine. The specific usage scenario is to pull back all the report data of the advertising plan from the media side. For example, the frequency of pulling back is once every 10 minutes, and an advertising plan needs to pull report data of multiple different dimensions.
[0003] In this way, when pulling media report data, multiple tasks will run at the same time. If multiple tasks happen to run on the same machine, the machine load may be too high, and eventually cause abnormal machine operation such as memory overflow (OOM), thus affecting the normal execution of tasks. Another approach is to increase the configuration of the machine, such as increasing the number of cores, expanding the memory, etc., but because the running of tasks is not fixed on a certain machine, it may happen that one machine has a high load, but other machines have no load or a very low load, which will greatly waste resources.
[0004] When multiple tasks are running at the same time, another situation may occur: bandwidth peaks will overlap during the running period, resulting in a large bandwidth peak. This will also result in having to purchase a larger bandwidth due to this high peak, but it will be wasted when no tasks are running. Summary of the invention
[0005] Based on this, a method, device, computer equipment and storage medium for executing advertising plan pulling tasks are provided to solve the technical problems that when using a task runner to trigger timing to pull back all advertising plan report data from the media side, multiple tasks running at the same time on the same machine will cause machine abnormalities, and multiple tasks running at the same time will also cause the peaks of the outgoing network bandwidth to overlap.
[0006] On the one hand, a method for executing a pull advertisement plan task is provided, the method comprising:
[0007] In response to executing the task of pulling advertisement plans from the media server, obtaining the total number of advertisement plans that need to be pulled back and the limited total duration for pulling back the advertisement plans;
[0008] Obtain the average duration of pulling back each advertising plan according to historical data, and multiply the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans;
[0009] Obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans;
[0010] Divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subjects in sequence;
[0011] The task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received.
[0012] In one embodiment, the step of obtaining the average duration of pulling back each advertising plan according to historical data includes:
[0013] Record the time required for each execution subject to execute the pull advertisement plan task each time and the bandwidth load of the corresponding time period, so as to form the time required for the historical pull advertisement plan task and the bandwidth load of each historical time period;
[0014] According to the required time of the historical advertising pull task and the bandwidth load of each period in the history, a time-consuming relationship model of pulling in different periods is formed;
[0015] The time required for pulling the advertising plan in each time period is obtained by using the time-consuming relationship model for pulling in different time periods and saved;
[0016] According to the allocated time of all the tasks for executing the advertisement plan pull-back, the required time for pulling the advertisement plan in each time period is retrieved within the total time required to pull back the advertisement plan;
[0017] The average duration of pulling back each advertisement plan in each time period is calculated according to the duration required for pulling back the advertisement plan in each time period within the total duration of the advertisement plan required to be pulled back.
[0018] In one embodiment, the training of forming a time-consuming relationship model for pulling advertisements in different time periods according to the required time of the historical advertising pulling task and the bandwidth load of each time period in the history includes:
[0019] According to the bandwidth load of each period of history, the proportion of network bandwidth occupied in each period is obtained as network utilization;
[0020] Define the original network bandwidth as Mb1, the current network utilization as UF, and the actual available network bandwidth as Mb2, then Mb2 = Mb1*times(1-UF), where 0≤UF≤1, times(1-UF) represents the bandwidth utilization rate;
[0021] The calculation formula for constructing the data download time Td is: Td = frac{D}{Mb2} = frac{D}{Mb1*times(1-UF)}, where D represents the amount of data downloaded and frac{D} represents the actual file size that needs to be downloaded;
[0022] A time-consuming relationship model for pulling advertisements in different time periods is formed based on the time required for pulling advertisements in the history and the data download time corresponding to the bandwidth load in each time period in the history.
[0023] In one embodiment, the obtaining of the minimum number of task entities for executing the task of pulling the advertisement plan according to the limited total duration of pulling back the advertisement plan and the total duration of pulling all advertisement plans includes:
[0024] Define the total number of advertising plans that need to be pulled back as n, and the average duration of pulling back each advertising plan as m+w, where m is the duration required to pull the advertising plan, and w is the current network delay time, then the total duration of pulling all advertising plans is n(m+w);
[0025] The total duration required to pull back the advertising plan is defined as t1, and the minimum number of task entities used to execute the task of pulling back the advertising plan is n(m+w) / t1.
[0026] In one embodiment, dividing the advertising plan into multiple groups according to the minimum number of task entities includes:
[0027] Setting the number of groups of the advertising plan to be greater than or equal to the minimum number of task entities;
[0028] All advertising plans are divided into multiple groups according to the number of groups of the advertising plans, and each group of advertising plans is associated with a task body.
[0029] In one embodiment, sending the corresponding task body of each group of advertising plans in sequence includes:
[0030] Get the average duration of pulling back each advertising plan in the current period;
[0031] Send each group of advertising plans to the corresponding task subject in sequence according to the average duration of pulling back each advertising plan within the current time period;
[0032] In response to the task subject executing all the advertisement plans pulled from the media server, determining whether there are any remaining advertisement plans in the corresponding set of advertisement plans;
[0033] If there are remaining advertising plans in the set of advertising plans corresponding to the task subject, the next advertising plan will be sent to the corresponding task subject; if there are no remaining advertising plans in the set of advertising plans corresponding to the task subject, feedback is given to the task subject that the task of pulling advertising plans is completed.
[0034] In one embodiment, the method for executing the task of pulling advertisement plan further includes:
[0035] Set the task runner to trigger the execution of the scheduled task of pulling advertisements at a scheduled time;
[0036] When executing the planned advertising task, obtain and record the real-time duration required for each execution subject to execute the planned advertising task each time, as well as the real-time bandwidth load of each time period;
[0037] Input the acquired real-time required time for each execution subject to execute the advertising plan pulling task each time and the real-time bandwidth load of each time period into the time-divided pulling time-consuming relationship model, and modify the time-divided pulling time-consuming relationship model in real time;
[0038] The time required for pulling the advertisement plan in each time period is updated according to the revised time-consuming relationship model for pulling in different time periods.
[0039] On the other hand, a device for executing a pull advertisement plan task is provided, the device comprising:
[0040] The task quantity acquisition module is used to obtain the total number of advertisement plans that need to be pulled back and the limited total duration of the advertisement plans required to be pulled back in response to executing the task of pulling advertisement plans from the media server;
[0041] The total task completion time estimation module is used to obtain the average time of pulling back each advertising plan based on historical data, and multiply the total number of advertising plans that need to be pulled back by the average time of pulling back each advertising plan to obtain the total time of pulling all advertising plans;
[0042] A task subject number calculation module, used to obtain the minimum number of task subjects for executing the task of pulling the advertising plan according to the limited total time of pulling back the advertising plan and the total time of pulling all the advertising plans;
[0043] A task allocation module, used to divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subjects in sequence;
[0044] The pulling task execution module is used for the task subject to execute the pulling advertisement plan task according to the order in which the advertisement plans are received.
[0045] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0046] In response to executing the task of pulling advertisement plans from the media server, obtaining the total number of advertisement plans that need to be pulled back and the limited total duration for pulling back the advertisement plans;
[0047] Obtain the average duration of pulling back each advertising plan according to historical data, and multiply the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans;
[0048] Obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans;
[0049] Divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subjects in sequence;
[0050] The task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received.
[0051] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0052] In response to executing the task of pulling advertisement plans from the media server, obtaining the total number of advertisement plans that need to be pulled back and the limited total duration for pulling back the advertisement plans;
[0053] Obtain the average duration of pulling back each advertising plan according to historical data, and multiply the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans;
[0054] Obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans;
[0055] Divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subjects in sequence;
[0056] The task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received.
[0057] The above-mentioned method, device, computer equipment and storage medium for executing the task of pulling advertising plan obtain the minimum number of task subjects that can complete the task on time when executing the task of pulling advertising plan. The task subjects are scattered in the media server, and each task subject processes a group of advertising plans. There will be no machine abnormalities caused by multiple tasks running on the same machine, so that the machine will not be overloaded, and the bandwidth can be evenly distributed, so that there will be no peak superposition, reducing the waste of resources caused by increased configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0059] Figure 1 This is an application environment diagram of a method for executing a task of pulling advertisement plans in one embodiment of the present application;
[0060] Figure 2 A flowchart of a method for executing a task of pulling advertisement plans in one embodiment of the present application;
[0061] Figure 3 A logic diagram of a method for executing a task of pulling advertisement plans in one embodiment of the present application;
[0062] Figure 4 This is a flow chart of the step of obtaining the average duration of pulling back each advertising plan according to historical data in one embodiment of the present application;
[0063] Figure 5 A flowchart of the steps of obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans in one embodiment of the present application;
[0064] Figure 6 A flowchart of sending the corresponding task main steps of each group of advertising plans in sequence in one embodiment of the present application;
[0065] Figure 7 This is a structural block diagram of a device for executing a pull advertisement plan task in one embodiment of the present application;
[0066] Figure 8 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0068] As described in the background technology, when using a timed-trigger task runner to pull back all the report data of the advertising plan from the media side, multiple tasks are running at the same time. Running multiple tasks on the same machine will cause machine abnormalities, and running multiple tasks at the same time will also cause the peaks of the outbound bandwidth to overlap. The reason for the above two situations is that multiple tasks are running at the same time, and the task runners commonly used now are all timed-trigger, and there is no way to customize and adjust according to different usage scenarios, so that they run differently according to the running time of a single task.
[0069] To solve the above problems, the embodiment of the present invention creatively proposes a method for executing a pull advertising plan task, which evenly distributes the main body of the task operation to all machines, so that the machine will not be overloaded, and the bandwidth can be evenly distributed to avoid peaks of overlapping peaks.
[0070] The method for executing the pull advertisement plan task provided in this application can be applied to Figure 1 In the application environment shown. Among them, the task runner is installed on the terminal 102, and the task runner is triggered to execute the pull advertising plan task at a fixed time. The terminal 102 communicates with the media server 104 through the network. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the media server 104 can be implemented with an independent server or a server cluster composed of multiple servers. The media server 104 includes multiple nodes, each of which can serve as a task subject for executing the pull advertising plan task.
[0071] In one embodiment, Figure 2 , Figure 3 As shown, a method for executing a pull advertisement plan task is provided, and the method is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:
[0072] Step S1, in response to executing the task of pulling advertisement plans from the media server, obtaining the total number of advertisement plans that need to be pulled back and the limited total duration of the advertisement plans required to be pulled back;
[0073] Step S2, obtaining the average duration of pulling back each advertising plan according to historical data, and multiplying the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans;
[0074] Step S3, obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans;
[0075] Step S4, dividing the advertising plan into multiple groups according to the minimum number of task subjects, and sending the corresponding task subjects to each group of advertising plans in sequence;
[0076] Step S5, the task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received.
[0077] Among them, by obtaining the minimum number of task subjects that can complete the task on time when executing the task of pulling the advertising plan, and the task subjects are scattered in the media server, and each task subject processes a group of advertising plans, there will be no multiple tasks running on the same machine causing machine abnormalities, so that the machine will not be overloaded, and the bandwidth can be evenly distributed, so that there will be no peak superposition, reducing resource waste.
[0078] like Figure 4 As shown, in this embodiment, the step of obtaining the average duration of pulling back each advertising plan according to historical data includes:
[0079] Step S21, recording the time required for each execution subject to execute the pull advertisement plan task each time and the bandwidth load of the corresponding time period, forming the time required for the historical pull advertisement plan task and the bandwidth load of each historical time period;
[0080] Step S22, forming a time-consuming relationship model for pulling advertisements by time period according to the required time of pulling advertisements in history and the bandwidth load of each time period in history;
[0081] Step S23, using the time-consuming relationship model for pulling the advertisement plan in different time periods to obtain the time required for pulling the advertisement plan in each time period and save the time;
[0082] Step S24, according to the allocated time of all the tasks of executing the pulling advertisement plan, the required time for pulling the advertisement plan in each time period is retrieved within the total time required to pull back the advertisement plan;
[0083] Step S25, calculating the average duration of pulling back each advertisement plan in each time period according to the duration required for pulling back the advertisement plan in each time period within the total duration of the advertisement plan required to be pulled back.
[0084] It is understandable that the average time to pull back each advertising plan is equal to the sum of the time required to pull the advertising plan and the network delay time of the corresponding period. The network delay time is related to the bandwidth load. Although the relationship between network delay and network bandwidth is not a direct dependency, there is a certain connection between them. First of all, it should be made clear that delay and bandwidth are two different concepts, each of which has its own independent role and influence. Delay mainly involves the speed of data transmission, that is, the time required for data to reach the destination from the source, while bandwidth refers to the amount of data that the network can transmit per unit time. Despite this, there is still a certain connection between the two.
[0085] In this embodiment, the time-based pull-advertisement planning task and the bandwidth load training of each period in history to form a time-based pull-advertisement time-consuming relationship model include:
[0086] According to the bandwidth load of each period of history, the proportion of network bandwidth occupied in each period is obtained as network utilization;
[0087] Define the original network bandwidth as Mb1, the current network utilization as UF, and the actual available network bandwidth as Mb2, then Mb2 = Mb1*times(1-UF), where 0≤UF≤1, times(1-UF) represents the bandwidth utilization rate;
[0088] The calculation formula for constructing the data download time Td is: Td = frac{D}{Mb2} = frac{D}{Mb1*times(1-UF)}, where D represents the amount of data downloaded and frac{D} represents the actual file size that needs to be downloaded;
[0089] A time-consuming relationship model for pulling advertisements in different time periods is formed based on the time required for pulling advertisements in the history and the data download time corresponding to the bandwidth load in each time period in the history.
[0090] For example, if the original bandwidth Mb1 = 100Mbps, the data volume D = 50MB, i.e. 400Mb, and the network utilization rate is UF = 0.5, i.e. half of the bandwidth is occupied, then the data download time Td = frac{400Mb}{100Mbps*times(1-0.5)} = frac{400Mb}{50Mbps} = 8s. This means that at 50% network utilization, it takes 8 seconds to download 50MB of data. Please note that this time-division pull-down time-consuming relationship model ignores other potential delays in the network, such as packet loss and retransmission during transmission, protocol overhead, etc., so the actual download time may be longer. This embodiment forms a more accurate time-division pull-down time-consuming relationship model by associating the bandwidth load and the amount of data downloaded, and aligning the time axis, thereby improving the accuracy of obtaining the average duration of each advertising plan pulled back.
[0091] like Figure 5 As shown, in this embodiment, the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all advertising plans includes:
[0092] Step S31, define the total number of advertising plans that need to be pulled back as n, and the average duration of pulling back each advertising plan as m+w, where m is the duration required to pull the advertising plan, and w is the current network delay time, then the total duration of pulling all advertising plans is n(m+w);
[0093] Step S32, define the total time limit for pulling back the advertising plan as t1, then the minimum number of task entities for executing the task of pulling back the advertising plan is n(m+w) / t1.
[0094] Among them, when obtaining the minimum number of task entities for executing the task of pulling advertising plans, the current network delay time is taken into consideration, so that it is closer to the actual situation, and the minimum number of task entities for executing the task of pulling advertising plans can be accurately calculated, and then multiple task entities are dispersed in the media server, and each task entity processes a group of advertising plans. There will be no machine abnormalities caused by multiple tasks running on the same machine, so that the machine will not be overloaded, and the bandwidth can be evenly distributed, so that there will be no peak superposition.
[0095] Among them, the minimum number of task entities is n(m+w) / t1, and rounding up can ensure that there are enough task entities to complete the task of pulling the advertising plan within the specified total time of the required advertising plan.
[0096] In this embodiment, dividing the advertising plan into multiple groups according to the minimum number of task entities includes:
[0097] Setting the number of groups of the advertising plan to be greater than or equal to the minimum number of task entities;
[0098] All advertising plans are divided into multiple groups according to the number of groups of the advertising plans, and each group of advertising plans is associated with a task body.
[0099] Among them, the number of groups of the advertising plan is set to be greater than or equal to the minimum number of task entities. The current network delay time must be taken into consideration. If the current network delay time is difficult to determine, historical data can be referred to for analysis. The uncertainty of the current network delay time can be eliminated by increasing the number of task entities. Therefore, the number of groups of the advertising plan is set to be greater than the minimum number of task entities.
[0100] like Figure 6As shown, in this embodiment, the task of sending the corresponding task body of each group of advertising plans in sequence includes:
[0101] Step S41, obtaining the average duration of pulling back each advertisement plan in the current period;
[0102] Step S42, sending each group of advertising plans to the corresponding task subject in sequence according to the average duration of pulling back each advertising plan within the current time period;
[0103] Step S43, in response to the task subject executing all the advertisement plans pulled from the media server, determining whether there are any remaining advertisement plans in the corresponding set of advertisement plans;
[0104] Step S44, if there are remaining advertising plans in the group of advertising plans corresponding to the task subject, the next advertising plan is sent to the corresponding task subject; if there are no remaining advertising plans in the group of advertising plans corresponding to the task subject, feedback is given to the task subject that the task of pulling advertising plans is completed.
[0105] It can be understood that the present application sets up to send each group of advertising plans to the corresponding task body in sequence according to the average duration of pulling back each advertising plan within the current time period, which can make the bandwidth evenly distributed and significantly improve the situation of peak peaks superimposed. The duration of the actual execution of the advertising plan pulling task is not fixed to the average duration value of pulling back each advertising plan within the current time period. Therefore, after executing all the advertising plan pulling tasks from the media server in the task queue, it is possible to determine whether there are remaining advertising plans in the corresponding group of advertising plans, so as to improve processing efficiency and ensure that all tasks are completed within the specified total duration required to pull back the advertising plan.
[0106] In this embodiment, the task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received, including:
[0107] The task subject obtains the bandwidth load of the current period, and uses the proportion of network bandwidth occupied in the current period as the network utilization rate of the current period;
[0108] Define the original network bandwidth as Mb1, the current network utilization as UF, and the actual available network bandwidth as Mb2, then Mb2 = Mb1*times(1-UF), where 0≤UF≤1, times(1-UF) represents the bandwidth utilization rate;
[0109] The calculation formula for constructing the data download time Td is: Td = frac{D}{Mb2} = frac{D}{Mb1*times(1-UF)}, where D represents the amount of data downloaded and frac{D} represents the actual file size that needs to be downloaded;
[0110] The difference between the time to download the file size frac{D} when the network original bandwidth is used and the data download time Td is used as the current network delay time w;
[0111] Obtain the time m required to pull the advertisement plan when the bandwidth load is in the current period, then the average time to pull an advertisement plan in the current period is m+w, and the execution subject obtains the next advertisement plan after the interval of m+w;
[0112] Obtain and record the real-time duration required for the execution subject to execute each task of pulling advertisement plan, and the real-time bandwidth load in each time period;
[0113] The acquired real-time required time for the execution subject to execute the advertisement pulling plan task each time and the real-time bandwidth load of each time period are input into the time-divided pulling time-consuming relationship model.
[0114] Among them, when executing the task of pulling the planned advertisement, the task subject fully considers the influence of the current network utilization rate and the current network delay time, so that it is closer to the actual situation, and the bandwidth can be evenly distributed, so as not to cause the situation of peak superposition. And timely input the real-time required time for the execution subject to execute the planned advertisement pulling task each time and the real-time bandwidth load of each time period into the time-divided pulling time-consuming relationship model, which can optimize the model, further improve the model and improve the accuracy of the model.
[0115] See also Figure 3 In this embodiment, the method for executing the task of pulling advertisement plan further includes:
[0116] Set the task runner to trigger the execution of the scheduled task of pulling advertisements at a scheduled time;
[0117] When executing the planned advertising task, obtain and record the real-time duration required for each execution subject to execute the planned advertising task each time, as well as the real-time bandwidth load of each time period;
[0118] Input the acquired real-time required time for each execution subject to execute the advertising plan pulling task each time and the real-time bandwidth load of each time period into the time-divided pulling time-consuming relationship model, and modify the time-divided pulling time-consuming relationship model in real time;
[0119] The time required for pulling the advertisement plan in each time period is updated according to the revised time-consuming relationship model for pulling in different time periods.
[0120] Among them, by correcting the time-consuming relationship model of pulling advertisements in different time periods in real time, the model can be further improved and its accuracy can be enhanced, so that the execution status of the task runner when it triggers the execution of the planned advertising pulling task next time is better than the execution status of the last time it triggered the execution of the planned advertising pulling task.
[0121] In the above-mentioned method for executing the task of pulling the advertising plan, the minimum number of task subjects that can complete the task on time is obtained when executing the task of pulling the advertising plan, and the task subjects are scattered in the media server, and each task subject processes a group of advertising plans. There will be no machine abnormalities caused by multiple tasks running on the same machine, so that the machine will not be overloaded, and the bandwidth can be evenly distributed, so that there will be no peak superposition, reducing the waste of resources caused by increased configuration.
[0122] It should be understood that although Figure 2-Figure 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 6 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0123] In one embodiment, Figure 7 As shown, a device 10 for executing a pull advertising plan task is provided, comprising: a task quantity acquisition module 1, a task completion total time estimation module 2, a task subject number calculation module 3, a task allocation module 4, and a pull task execution module 5.
[0124] The task quantity acquisition module 1 is used for obtaining the total number of advertisement plans that need to be pulled back and the limited total duration of the advertisement plans required to be pulled back in response to executing the advertisement plan pulling task to pull the advertisement plans from the media server.
[0125] The task completion total duration estimation module 2 is used to obtain the average duration of pulling back each advertising plan based on historical data, and multiply the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans.
[0126] The task subject number calculation module 3 is used to obtain the minimum number of task subjects for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all advertising plans.
[0127] The task allocation module 4 is used to divide the advertising plan into multiple groups according to the minimum number of task subjects, and send the corresponding task subjects to each group of advertising plans in sequence.
[0128] The pulling task execution module 5 is used for the task subject to execute the pulling advertisement plan task according to the order in which the advertisement plans are received.
[0129] In this embodiment, the step of obtaining the average duration of pulling back each advertising plan according to historical data includes:
[0130] Record the time required for each execution subject to execute the pull advertisement plan task each time and the bandwidth load of the corresponding time period, so as to form the time required for the historical pull advertisement plan task and the bandwidth load of each historical time period;
[0131] According to the required time of the historical advertising pull task and the bandwidth load of each period in the history, a time-consuming relationship model of pulling in different periods is formed;
[0132] The time required for pulling the advertising plan in each time period is obtained by using the time-consuming relationship model for pulling in different time periods and saved;
[0133] According to the allocated time of all the tasks for executing the advertisement plan pull-back, the required time for pulling the advertisement plan in each time period is retrieved within the total time required to pull back the advertisement plan;
[0134] The average duration of pulling back each advertisement plan in each time period is calculated according to the duration required for pulling back the advertisement plan in each time period within the total duration of the advertisement plan required to be pulled back.
[0135] In this embodiment, the time-based pull-advertisement planning task and the bandwidth load training of each period in history to form a time-based pull-advertisement time-consuming relationship model include:
[0136] According to the bandwidth load of each period of history, the proportion of network bandwidth occupied in each period is obtained as network utilization;
[0137] Define the original network bandwidth as Mb1, the current network utilization as UF, and the actual available network bandwidth as Mb2, then Mb2 = Mb1*times(1-UF), where 0≤UF≤1, times(1-UF) represents the bandwidth utilization rate;
[0138] The calculation formula for constructing the data download time Td is: Td = frac{D}{Mb2} = frac{D}{Mb1*times(1-UF)}, where D represents the amount of data downloaded and frac{D} represents the actual file size that needs to be downloaded;
[0139] A time-consuming relationship model for pulling advertisements in different time periods is formed based on the time required for pulling advertisements in the history and the data download time corresponding to the bandwidth load in each time period in the history.
[0140] In this embodiment, the step of obtaining the minimum number of task entities for executing the task of pulling the advertisement plan according to the limited total duration of pulling back the advertisement plan and the total duration of pulling all advertisement plans includes:
[0141] Define the total number of advertising plans that need to be pulled back as n, and the average duration of pulling back each advertising plan as m+w, where m is the duration required to pull the advertising plan, and w is the current network delay time, then the total duration of pulling all advertising plans is n(m+w);
[0142] The total duration required to pull back the advertising plan is defined as t1, and the minimum number of task entities used to execute the task of pulling back the advertising plan is n(m+w) / t1.
[0143] In this embodiment, dividing the advertising plan into multiple groups according to the minimum number of task entities includes:
[0144] Setting the number of groups of the advertising plan to be greater than or equal to the minimum number of task entities;
[0145] All advertising plans are divided into multiple groups according to the number of groups of the advertising plans, and each group of advertising plans is associated with a task body.
[0146] In this embodiment, the task of sending the corresponding task body of each group of advertising plans in sequence includes:
[0147] Get the average duration of pulling back each advertising plan in the current period;
[0148] Send each group of advertising plans to the corresponding task subject in sequence according to the average duration of pulling back each advertising plan within the current time period;
[0149] In response to the task subject executing all the advertisement plans pulled from the media server, determining whether there are any remaining advertisement plans in the corresponding set of advertisement plans;
[0150] If there are remaining advertising plans in the set of advertising plans corresponding to the task subject, the next advertising plan will be sent to the corresponding task subject; if there are no remaining advertising plans in the set of advertising plans corresponding to the task subject, feedback is given to the task subject that the task of pulling advertising plans is completed.
[0151] like Figure 7 As shown, in this embodiment, the device 10 for executing the pull advertisement plan task also includes: a task runner 6 and a model optimization module 7.
[0152] The task runner 6 is used to trigger the execution of the planned advertising pull task at a regular time.
[0153] The model optimization module 7 is used to obtain and record the real-time required time for each execution subject to execute the task of pulling the advertising plan each time, and the real-time bandwidth load of each time period when the task of pulling the advertising plan is currently executed; the real-time required time for each execution subject to execute the task of pulling the advertising plan each time and the real-time bandwidth load of each time period are input into the time-divided pulling time-consuming relationship model, and the time-divided pulling time-consuming relationship model is corrected in real time; the time required for pulling the advertising plan in each time period is updated according to the corrected time-divided pulling time-consuming relationship model.
[0154] In the above-mentioned device for executing the task of pulling the advertising plan, the minimum number of task subjects that can complete the task on time is obtained when executing the task of pulling the advertising plan, and the task subjects are scattered in the media server, and each task subject processes a group of advertising plans. There will be no machine abnormalities caused by multiple tasks running on the same machine, so that the machine will not be overloaded, and the bandwidth can be evenly distributed, so that there will be no peak superposition, reducing the waste of resources caused by increased configuration.
[0155] For the specific limitations of the device for executing the pull advertising plan task, please refer to the limitations of the method for executing the pull advertising plan task above, which will not be repeated here. The various modules in the above-mentioned device for executing the pull advertising plan task can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0156] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0157] In response to executing the task of pulling advertisement plans from the media server, obtaining the total number of advertisement plans that need to be pulled back and the limited total duration for pulling back the advertisement plans;
[0158] Obtain the average duration of pulling back each advertising plan according to historical data, and multiply the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans;
[0159] Obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans;
[0160] Divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subjects in sequence;
[0161] The task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received.
[0162] In one embodiment, the computer program further implements the following steps when executed by a processor:
[0163] The step of obtaining the average duration of pulling back each advertising plan based on historical data includes:
[0164] Record the time required for each execution subject to execute the pull advertisement plan task each time and the bandwidth load of the corresponding time period, so as to form the time required for the historical pull advertisement plan task and the bandwidth load of each historical time period;
[0165] According to the required time of the historical advertising pull task and the bandwidth load of each period in the history, a time-consuming relationship model of pulling in different periods is formed;
[0166] The time required for pulling the advertising plan in each time period is obtained by using the time-consuming relationship model for pulling in different time periods and saved;
[0167] According to the allocated time of all the tasks for executing the advertisement plan pull-back, the required time for pulling the advertisement plan in each time period is retrieved within the total time required to pull back the advertisement plan;
[0168] The average duration of pulling back each advertisement plan in each time period is calculated according to the duration required for pulling back the advertisement plan in each time period within the total duration of the advertisement plan required to be pulled back.
[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0170] The time-consuming relationship model of pulling advertisements by time period is formed according to the required time of pulling advertisements in history and the bandwidth load training of each time period in history, including:
[0171] According to the bandwidth load of each period of history, the proportion of network bandwidth occupied in each period is obtained as network utilization;
[0172] Define the original network bandwidth as Mb1, the current network utilization as UF, and the actual available network bandwidth as Mb2, then Mb2 = Mb1*times(1-UF), where 0≤UF≤1, times(1-UF) represents the bandwidth utilization rate;
[0173] The calculation formula for constructing the data download time Td is: Td = frac{D}{Mb2} = frac{D}{Mb1*times(1-UF)}, where D represents the amount of data downloaded and frac{D} represents the actual file size that needs to be downloaded;
[0174] A time-consuming relationship model for pulling advertisements in different time periods is formed based on the time required for pulling advertisements in the history and the data download time corresponding to the bandwidth load in each time period in the history.
[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0176] The step of obtaining the minimum number of task entities for executing the task of pulling the advertisement plan according to the limited total duration of pulling back the advertisement plan as required and the total duration of pulling all advertisement plans comprises:
[0177] Define the total number of advertising plans that need to be pulled back as n, and the average duration of pulling back each advertising plan as m+w, where m is the duration required to pull the advertising plan, and w is the current network delay time, then the total duration of pulling all advertising plans is n(m+w);
[0178] The total duration required to pull back the advertising plan is defined as t1, and the minimum number of task entities used to execute the task of pulling back the advertising plan is n(m+w) / t1.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0180] The dividing the advertising plan into multiple groups according to the minimum number of task entities comprises:
[0181] Setting the number of groups of the advertising plan to be greater than or equal to the minimum number of task entities;
[0182] All advertising plans are divided into multiple groups according to the number of groups of the advertising plans, and each group of advertising plans is associated with a task body.
[0183] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0184] The task of sending each group of advertising plans in sequence to the corresponding subject includes:
[0185] Get the average duration of pulling back each advertising plan in the current period;
[0186] Send each group of advertising plans to the corresponding task subject in sequence according to the average duration of pulling back each advertising plan within the current time period;
[0187] In response to the task subject executing all the advertisement plans pulled from the media server, determining whether there are any remaining advertisement plans in the corresponding set of advertisement plans;
[0188] If there are remaining advertising plans in the set of advertising plans corresponding to the task subject, the next advertising plan will be sent to the corresponding task subject; if there are no remaining advertising plans in the set of advertising plans corresponding to the task subject, feedback is given to the task subject that the task of pulling advertising plans is completed.
[0189] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0190] Set the task runner to trigger the execution of the scheduled task of pulling advertisements at a scheduled time;
[0191] When executing the planned advertising task, obtain and record the real-time duration required for each execution subject to execute the planned advertising task each time, as well as the real-time bandwidth load of each time period;
[0192] Input the acquired real-time required time for each execution subject to execute the advertising plan pulling task each time and the real-time bandwidth load of each time period into the time-divided pulling time-consuming relationship model, and modify the time-divided pulling time-consuming relationship model in real time;
[0193] The time required for pulling the advertisement plan in each time period is updated according to the revised time-consuming relationship model for pulling in different time periods.
[0194] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method for executing the task of pulling advertising plans in the above text, which will not be repeated here.
[0195] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for executing a pull advertising plan task is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0196] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0197] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0198] In response to executing the task of pulling advertisement plans from the media server, obtaining the total number of advertisement plans that need to be pulled back and the limited total duration for pulling back the advertisement plans;
[0199] Obtain the average duration of pulling back each advertising plan according to historical data, and multiply the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans;
[0200] Obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans;
[0201] Divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subjects in sequence;
[0202] The task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received.
[0203] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0204] The step of obtaining the average duration of pulling back each advertising plan based on historical data includes:
[0205] Record the time required for each execution subject to execute the pull advertisement plan task each time and the bandwidth load of the corresponding time period, so as to form the time required for the historical pull advertisement plan task and the bandwidth load of each historical time period;
[0206] According to the required time of the historical advertising pull task and the bandwidth load of each period in the history, a time-consuming relationship model of pulling in different periods is formed;
[0207] The time required for pulling the advertising plan in each time period is obtained by using the time-consuming relationship model for pulling in different time periods and saved;
[0208] According to the allocated time of all the tasks for executing the advertisement plan pull-back, the required time for pulling the advertisement plan in each time period is retrieved within the total time required to pull back the advertisement plan;
[0209] The average duration of pulling back each advertisement plan in each time period is calculated according to the duration required for pulling back the advertisement plan in each time period within the total duration of the advertisement plan required to be pulled back.
[0210] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0211] The time-consuming relationship model of pulling advertisements by time period is formed according to the required time of pulling advertisements in history and the bandwidth load training of each time period in history, including:
[0212] According to the bandwidth load of each period of history, the proportion of network bandwidth occupied in each period is obtained as network utilization;
[0213] Define the original network bandwidth as Mb1, the current network utilization as UF, and the actual available network bandwidth as Mb2, then Mb2 = Mb1*times(1-UF), where 0≤UF≤1, times(1-UF) represents the bandwidth utilization rate;
[0214] The calculation formula for constructing the data download time Td is: Td = frac{D}{Mb2} = frac{D}{Mb1*times(1-UF)}, where D represents the amount of data downloaded and frac{D} represents the actual file size that needs to be downloaded;
[0215] A time-consuming relationship model for pulling advertisements in different time periods is formed based on the time required for pulling advertisements in the history and the data download time corresponding to the bandwidth load in each time period in the history.
[0216] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0217] The step of obtaining the minimum number of task entities for executing the task of pulling the advertisement plan according to the limited total duration of pulling back the advertisement plan as required and the total duration of pulling all advertisement plans comprises:
[0218] Define the total number of advertising plans that need to be pulled back as n, and the average duration of pulling back each advertising plan as m+w, where m is the duration required to pull the advertising plan, and w is the current network delay time, then the total duration of pulling all advertising plans is n(m+w);
[0219] The total duration required to pull back the advertising plan is defined as t1, and the minimum number of task entities used to execute the task of pulling back the advertising plan is n(m+w) / t1.
[0220] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0221] The dividing the advertising plan into multiple groups according to the minimum number of task entities comprises:
[0222] Setting the number of groups of the advertising plan to be greater than or equal to the minimum number of task entities;
[0223] All advertising plans are divided into multiple groups according to the number of groups of the advertising plans, and each group of advertising plans is associated with a task body.
[0224] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0225] The task of sending each group of advertising plans in sequence to the corresponding subject includes:
[0226] Get the average duration of pulling back each advertising plan in the current period;
[0227] Send each group of advertising plans to the corresponding task subject in sequence according to the average duration of pulling back each advertising plan within the current time period;
[0228] In response to the task subject executing all the advertisement plans pulled from the media server, determining whether there are any remaining advertisement plans in the corresponding set of advertisement plans;
[0229] If there are remaining advertising plans in the set of advertising plans corresponding to the task subject, the next advertising plan will be sent to the corresponding task subject; if there are no remaining advertising plans in the set of advertising plans corresponding to the task subject, feedback is given to the task subject that the task of pulling advertising plans is completed.
[0230] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0231] Set the task runner to trigger the execution of the scheduled task of pulling advertisements at a scheduled time;
[0232] When executing the planned advertising task, obtain and record the real-time duration required for each execution subject to execute the planned advertising task each time, as well as the real-time bandwidth load of each time period;
[0233] Input the acquired real-time required time for each execution subject to execute the advertising plan pulling task each time and the real-time bandwidth load of each time period into the time-divided pulling time-consuming relationship model, and modify the time-divided pulling time-consuming relationship model in real time;
[0234] The time required for pulling the advertisement plan in each time period is updated according to the revised time-consuming relationship model for pulling in different time periods.
[0235] For the specific limitations on the steps implemented when the processor executes the computer program, please refer to the limitations on the method for executing the task of pulling advertising plans in the above text, which will not be repeated here.
[0236] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0237] In response to executing the task of pulling advertisement plans from the media server, obtaining the total number of advertisement plans that need to be pulled back and the limited total duration for pulling back the advertisement plans;
[0238] Obtain the average duration of pulling back each advertising plan according to historical data, and multiply the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans;
[0239] Obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans;
[0240] Divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subjects in sequence;
[0241] The task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received.
[0242] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0243] The step of obtaining the average duration of pulling back each advertising plan based on historical data includes:
[0244] Record the time required for each execution subject to execute the pull advertisement plan task each time and the bandwidth load of the corresponding time period, so as to form the time required for the historical pull advertisement plan task and the bandwidth load of each historical time period;
[0245] According to the required time of the historical advertising pull task and the bandwidth load of each period in the history, a time-consuming relationship model of pulling in different periods is formed;
[0246] The time required for pulling the advertising plan in each time period is obtained by using the time-consuming relationship model for pulling in different time periods and saved;
[0247] According to the allocated time of all the tasks for executing the advertisement plan pull-back, the required time for pulling the advertisement plan in each time period is retrieved within the total time required to pull back the advertisement plan;
[0248] The average duration of pulling back each advertisement plan in each time period is calculated according to the duration required for pulling back the advertisement plan in each time period within the total duration of the advertisement plan required to be pulled back.
[0249] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0250] The time-consuming relationship model of pulling advertisements by time period is formed according to the required time of pulling advertisements in history and the bandwidth load training of each time period in history, including:
[0251] According to the bandwidth load of each period of history, the proportion of network bandwidth occupied in each period is obtained as network utilization;
[0252] Define the original network bandwidth as Mb1, the current network utilization as UF, and the actual available network bandwidth as Mb2, then Mb2 = Mb1*times(1-UF), where 0≤UF≤1, times(1-UF) represents the bandwidth utilization rate;
[0253] The calculation formula for constructing the data download time Td is: Td = frac{D}{Mb2} = frac{D}{Mb1*times(1-UF)}, where D represents the amount of data downloaded and frac{D} represents the actual file size that needs to be downloaded;
[0254] A time-consuming relationship model for pulling advertisements in different time periods is formed based on the time required for pulling advertisements in the history and the data download time corresponding to the bandwidth load in each time period in the history.
[0255] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0256] The step of obtaining the minimum number of task entities for executing the task of pulling the advertisement plan according to the limited total duration of pulling back the advertisement plan as required and the total duration of pulling all advertisement plans comprises:
[0257] Define the total number of advertising plans that need to be pulled back as n, and the average duration of pulling back each advertising plan as m+w, where m is the duration required to pull the advertising plan, and w is the current network delay time, then the total duration of pulling all advertising plans is n(m+w);
[0258] The total duration required to pull back the advertising plan is defined as t1, and the minimum number of task entities used to execute the task of pulling back the advertising plan is n(m+w) / t1.
[0259] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0260] The dividing the advertising plan into multiple groups according to the minimum number of task entities comprises:
[0261] Setting the number of groups of the advertising plan to be greater than or equal to the minimum number of task entities;
[0262] All advertising plans are divided into multiple groups according to the number of groups of the advertising plans, and each group of advertising plans is associated with a task body.
[0263] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0264] The task of sending each group of advertising plans in sequence to the corresponding subject includes:
[0265] Get the average duration of pulling back each advertising plan in the current period;
[0266] Send each group of advertising plans to the corresponding task subject in sequence according to the average duration of pulling back each advertising plan within the current time period;
[0267] In response to the task subject executing all the advertisement plans pulled from the media server, determining whether there are any remaining advertisement plans in the corresponding set of advertisement plans;
[0268] If there are remaining advertising plans in the set of advertising plans corresponding to the task subject, the next advertising plan will be sent to the corresponding task subject; if there are no remaining advertising plans in the set of advertising plans corresponding to the task subject, feedback is given to the task subject that the task of pulling advertising plans is completed.
[0269] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0270] Set the task runner to trigger the execution of the scheduled task of pulling advertisements at a scheduled time;
[0271] When executing the planned advertising task, obtain and record the real-time duration required for each execution subject to execute the planned advertising task each time, as well as the real-time bandwidth load of each time period;
[0272] Input the acquired real-time required time for each execution subject to execute the advertising plan pulling task each time and the real-time bandwidth load of each time period into the time-divided pulling time-consuming relationship model, and modify the time-divided pulling time-consuming relationship model in real time;
[0273] The time required for pulling the advertisement plan in each time period is updated according to the revised time-consuming relationship model for pulling in different time periods.
[0274] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method for executing the task of pulling advertising plans in the above text, which will not be repeated here.
[0275] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0276] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0277] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for executing a pull advertisement plan task, It is characterized in that include: In response to executing the task of pulling advertisement plans from the media server, obtaining the total number of advertisement plans that need to be pulled back and the limited total duration for pulling back the advertisement plans; Obtain the average duration of pulling back each advertising plan according to historical data, and multiply the total number of advertising plans that need to be pulled back by the average duration of pulling back each advertising plan to obtain the total duration of pulling all advertising plans; Obtaining the minimum number of task entities for executing the task of pulling the advertising plan according to the limited total duration of pulling back the advertising plan and the total duration of pulling all the advertising plans; Divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subjects in sequence; The task subject executes the task of pulling the advertisement plan according to the order in which the advertisement plans are received.
2. The method for executing a pull advertisement plan task according to claim 1, It is characterized in that The step of obtaining the average duration of pulling back each advertising plan based on historical data includes: Record the time required for each execution subject to execute the pull advertisement plan task each time and the bandwidth load of the corresponding time period, so as to form the time required for the historical pull advertisement plan task and the bandwidth load of each historical time period; According to the required time of the historical advertising pull task and the bandwidth load of each period in the history, a time-consuming relationship model of pulling in different periods is formed; The time required for pulling the advertising plan in each time period is obtained by using the time-consuming relationship model for pulling in different time periods and saved; According to the allocated time of all the tasks for executing the advertisement plan pull-back, the required time for pulling the advertisement plan in each time period is retrieved within the total time required to pull back the advertisement plan; The average duration of pulling back each advertisement plan in each time period is calculated according to the duration required for pulling back the advertisement plan in each time period within the total duration of the advertisement plan required to be pulled back.
3. The method for executing a pull advertisement plan task according to claim 2, It is characterized in that The time-consuming relationship model of pulling advertisements by time period is formed according to the required time of pulling advertisements in history and the bandwidth load training of each time period in history, including: According to the bandwidth load of each period of history, the proportion of network bandwidth occupied in each period is obtained as network utilization; Define the original network bandwidth as Mb1, the current network utilization as UF, and the actual available network bandwidth as Mb2, then Mb2 = Mb1*times(1-UF), where 0≤UF≤1, times(1-UF) represents the bandwidth utilization rate; The calculation formula for constructing the data download time Td is: Td = frac{D}{Mb2} = frac{D}{Mb1*times(1-UF)}, where D represents the amount of data downloaded and frac{D} represents the actual file size that needs to be downloaded; A time-consuming relationship model for pulling advertisements in different time periods is formed based on the time required for pulling advertisements in the history and the data download time corresponding to the bandwidth load in each time period in the history.
4. The method for executing a pull advertisement plan task according to claim 1, It is characterized in that The step of obtaining the minimum number of task entities for executing the task of pulling the advertisement plan according to the limited total duration of pulling back the advertisement plan as required and the total duration of pulling all advertisement plans comprises: Define the total number of advertising plans that need to be pulled back as n, and the average duration of pulling back each advertising plan as m+w, where m is the duration required to pull the advertising plan, and w is the current network delay time, then the total duration of pulling all advertising plans is n(m+w); The total duration required to pull back the advertising plan is defined as t1, and the minimum number of task entities used to execute the task of pulling back the advertising plan is n(m+w) / t1.
5. The method for executing a pull advertisement plan task according to claim 4, It is characterized in that The dividing the advertising plan into multiple groups according to the minimum number of task entities comprises: Setting the number of groups of the advertising plan to be greater than or equal to the minimum number of task entities; All advertising plans are divided into multiple groups according to the number of groups of the advertising plans, and each group of advertising plans is associated with a task body.
6. The method for executing a pull advertisement plan task according to claim 4, It is characterized in that The task of sending each group of advertising plans in sequence to the corresponding subject includes: Get the average duration of pulling back each advertising plan in the current period; Send each group of advertising plans to the corresponding task subject in sequence according to the average duration of pulling back each advertising plan within the current time period; In response to the task subject executing all the advertisement plans pulled from the media server, determining whether there are any remaining advertisement plans in the corresponding set of advertisement plans; If there are remaining advertising plans in the set of advertising plans corresponding to the task subject, the next advertising plan will be sent to the corresponding task subject; if there are no remaining advertising plans in the set of advertising plans corresponding to the task subject, the completion of the task of pulling advertising plans will be fed back to the task subject.
7. The method for executing a pull advertisement plan task according to claim 2, It is characterized in that The method further comprises: Set the task runner to trigger the execution of the scheduled task of pulling advertisements at a scheduled time; When executing the planned advertising task, obtain and record the real-time duration required for each execution subject to execute the planned advertising task each time, as well as the real-time bandwidth load of each time period; Input the acquired real-time required time for each execution subject to execute the advertising plan pulling task each time and the real-time bandwidth load of each time period into the time-divided pulling time-consuming relationship model, and modify the time-divided pulling time-consuming relationship model in real time; The time required for pulling the advertising plan in each time period is updated according to the revised time-consuming relationship model for pulling in different time periods.
8. A device for executing a pull advertisement plan task, It is characterized in that The device comprises: The task quantity acquisition module is used to obtain the total number of advertisement plans that need to be pulled back and the limited total duration of the advertisement plans required to be pulled back in response to executing the task of pulling advertisement plans from the media server; The total task completion time estimation module is used to obtain the average time of pulling back each advertising plan based on historical data, and multiply the total number of advertising plans that need to be pulled back by the average time of pulling back each advertising plan to obtain the total time of pulling all advertising plans; A task subject number calculation module, used to obtain the minimum number of task subjects for executing the task of pulling the advertising plan according to the limited total time of pulling back the advertising plan and the total time of pulling all the advertising plans; A task allocation module, used to divide the advertising plan into multiple groups according to the minimum number of task subjects, and send each group of advertising plans to the corresponding task subject in sequence; The pulling task execution module is used for the task subject to execute the pulling advertisement plan task according to the order in which the advertisement plans are received.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
