Scheduling method, apparatus, server and computer storage medium

By using a scheduling server to uniformly schedule the full data transmission of edge servers, the problems of resource waste and high load when edge servers are processing full data tasks are solved, and efficient and accurate data transmission and task execution are achieved.

CN114816708BActive Publication Date: 2026-01-02SHANGHAI BILIBILI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210493588.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-07
Publication Date
2026-01-02
Estimated Expiration
2042-05-07

AI Technical Summary

Technical Problem

In existing technologies, edge servers suffer from problems such as wasted transmission resources, high interface overhead, and high short-term load when handling periodic tasks that rely on full data.

Method used

The scheduling server uniformly acquires data according to the full data scheduling cycle and distributes it to the target task. The full data scheduling cycle is determined to be the greatest common divisor or fine-grained unit time of the full data acquisition cycle of the preset task. The data sending speed is controlled by combining status information, and the callback address and parameters of the task are recorded for data transmission.

Benefits of technology

It saves transmission resources and edge server interface overhead, reduces short-term load, and ensures the normal execution of preset tasks and the accuracy of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816708B_ABST
    Figure CN114816708B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a scheduling method, device, server and computer storage medium. The method comprises the following steps: obtaining a full-amount data acquisition period of at least one preset task, determining a full-amount data scheduling period according to each full-amount data acquisition period, acquiring data in each edge server according to the full-amount data scheduling period, identifying a target task from the preset task in the process of acquiring data in each edge server each time, and sending the acquired data in the edge server to the target task. The embodiment of the application can save transmission resources and reduce transmission overhead, reduce interface overhead of the edge server, and reduce short-time load of the edge server. Moreover, the full-amount data scheduling period is determined according to the full-amount data acquisition period of the preset task in the embodiment of the application, so that the full-amount data acquisition requirement of the preset task can be met, and normal execution of the preset task can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of data processing, in particular to a scheduling method and device, a server and a computer storage medium. BACKGROUND

[0002] With the continuous development of science and technology and society, the emergence of various Internet services has greatly enriched people's work and life. Among them, in order to shorten the service delay and improve the service quality, some Internet services adopt the service deployment mode of edge servers. The service deployment mode is specifically that each edge server provides or manages part of the business services. Taking live streaming services as an example, each edge server is responsible for the live streaming services in its corresponding region.

[0003] In actual service process, there are usually many periodic tasks that depend on full data. At present, each periodic task that depends on full data is executed by each task from each edge server to collect data according to its own execution period. However, using this method, it will cause waste of more transmission resources; and the edge server needs to be configured with a data interface for each task, thereby increasing the interface overhead of the edge server, and when there are many business tasks, it will increase the short-time load of the edge server, affecting the normal operation of the edge server. SUMMARY

[0004] In view of the technical problems of transmission resource waste, large interface overhead of edge server and high short-time load of edge server in the prior art, embodiments of the present application are proposed in order to provide a scheduling method, device, server and computer storage medium which overcome the above problems or at least partially solve the above problems.

[0005] According to a first aspect of embodiments of the present application, a scheduling method is provided, comprising:

[0006] obtaining a full data acquisition period of at least one preset task; wherein the preset task is a task that has a periodic requirement for acquiring full data;

[0007] determining a full data scheduling period according to each full data acquisition period;

[0008] acquiring data in each edge server according to the full data scheduling period;

[0009] In each process of acquiring data in each edge server, a target task is identified from the preset tasks, and the acquired data in the edge server is sent to the target task; wherein the time interval between the last data receiving time corresponding to the target task and the current time matches the full data acquisition period of the target task.

[0010] In an alternative embodiment, the determining the total data scheduling period according to the respective total data acquisition periods further comprises: calculating the greatest common divisor of the total data acquisition periods; and determining the greatest common divisor as the total data scheduling period.

[0011] In an alternative embodiment, the method further comprises: updating the total data scheduling times after each acquisition of data in the respective edge servers;

[0012] For any preset task, recording a first ratio of the total data acquisition period to the total data scheduling period of the preset task, and recording the total data scheduling times of the preset task at the time of registration;

[0013] The identifying the target task from the preset tasks further comprises: for any preset task, calculating a second ratio of the preset task; and if the second ratio of the preset task is an integer, determining the preset task as the target task.

[0014] The second ratio of the preset task = (the difference between the current total data scheduling times and the total data scheduling times of the preset task at the time of registration) / the first ratio of the preset task.

[0015] In an alternative embodiment, the method further comprises: receiving state information of the target task feedback during the process of acquiring data in the respective edge servers;

[0016] Controlling the speed of sending data to the target task according to the state information.

[0017] In an alternative embodiment, the controlling the speed of sending data to the target task according to the state information further comprises:

[0018] If the state information is a first state, controlling the speed of sending data to the target task to be zero;

[0019] If the state information is a second state, keeping the speed of sending data to the target task unchanged;

[0020] If the state information is a third state, increasing the speed of sending data to the target task;

[0021] If the state information is a fourth state, decreasing the speed of sending data to the target task.

[0022] In an alternative embodiment, the method further comprises: receiving a registration request of at least one preset task, registering the at least one preset task; and recording the total data acquisition period of the at least one preset task based on the registration request.

[0023] The obtaining the full-amount data obtaining period of the at least one preset task further comprises: obtaining the recorded full-amount data obtaining period of the at least one preset task.

[0024] In an optional implementation, the method further comprises: recording a callback address of the at least one preset task based on the registration request; and the sending the obtained data in the edge server to the target task further comprises: sending the obtained data in the edge server to the target task based on the callback address of the target task.

[0025] And / or, the method further comprises: recording a callback parameter of the at least one preset task based on the registration request; and the sending the obtained data in the edge server to the target task further comprises: extracting target data matching the callback parameter of the target task from the obtained data in each edge server, and sending the target data to the target task.

[0026] According to a second aspect of the present application, a scheduling device is provided, comprising:

[0027] a first period obtaining module, configured to obtain a full-amount data obtaining period of at least one preset task; wherein the preset task is a task having a requirement of obtaining full-amount data periodically;

[0028] a second period obtaining module, configured to determine a full-amount data scheduling period according to each full-amount data obtaining period;

[0029] a data obtaining module, configured to obtain data in each edge server according to the full-amount data scheduling period;

[0030] a data sending module, configured to identify a target task from the preset tasks in each process of obtaining data in each edge server, and send the obtained data in the edge server to the target task; wherein a time interval between a last data receiving time corresponding to the target task and a current time matches the full-amount data obtaining period of the target task.

[0031] In an optional implementation, the second period obtaining module is further configured to: calculate a greatest common divisor of the full-amount data obtaining periods; and determine the greatest common divisor as the full-amount data scheduling period.

[0032] In an optional implementation, the device further comprises: a recording module, configured to update a full-amount data scheduling number after obtaining data in each edge server each time; and for any preset task, record a first ratio of the full-amount data obtaining period of the preset task to the full-amount data scheduling period, and record a full-amount data scheduling number of the preset task at the time of registration.

[0033] The data sending module is further configured to: for any preset task, calculate a second ratio of the preset task; if the second ratio of the preset task is an integer, determine the preset task as the target task; wherein the second ratio of the preset task = (a difference between a current full-data scheduling number and a full-data scheduling number of the preset task at registration time) / the first ratio of the preset task.

[0034] In an optional implementation, the apparatus further comprises a state receiving module configured to receive state information fed back by the target task in each process of acquiring data in the edge server.

[0035] A speed control module configured to control a speed of sending data to the target task according to the state information.

[0036] In an optional implementation, the speed control module is further configured to: if the state information is a first state, control the speed of sending data to the target task as zero.

[0037] If the state information is a second state, keep the speed of sending data to the target task unchanged.

[0038] If the state information is a third state, increase the speed of sending data to the target task.

[0039] If the state information is a fourth state, decrease the speed of sending data to the target task.

[0040] In an optional implementation, the apparatus further comprises a registration module configured to receive a registration request of at least one preset task, register the at least one preset task, and record a full-data acquisition period of the at least one preset task based on the registration request.

[0041] The first period acquiring module is further configured to acquire the recorded full-data acquisition period of the at least one preset task.

[0042] In an optional implementation, the apparatus further comprises a recording module configured to record a callback address of the at least one preset task based on the registration request; and the data sending module is further configured to send the acquired data in the edge server to the target task based on the callback address of the target task.

[0043] And / or, the apparatus further comprises a recording module configured to record callback parameters of the at least one preset task based on the registration request; and the data sending module is further configured to: extract target data matching the callback parameters of the target task from the obtained data of each edge server, and send the target data to the target task.

[0044] According to a third aspect of the embodiments of the present application, a scheduling server is provided, comprising: a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface communicate with each other through the communication bus;

[0045] The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform the operations corresponding to the above scheduling method.

[0046] According to a fourth aspect of the embodiments of the present application, a scheduling system is provided, comprising: a scheduling server, a plurality of edge servers, and at least one task execution device configured to execute a preset task.

[0047] According to a fifth aspect of the embodiments of the present application, a computer storage medium is provided, the storage medium stores at least one executable instruction, and the executable instruction causes the processor to perform the operations corresponding to the above scheduling method.

[0048] The embodiments of the present application can schedule full data from the edge server according to the full data scheduling period, and forward the full data to the target task which reaches the full data acquisition period, so that the embodiments of the present application can save transmission resources and reduce transmission overhead, reduce the interface overhead of the edge server, and reduce the short-time load of the edge server; moreover, the full data scheduling period in the embodiments of the present application is determined according to the full data acquisition period of the preset task, so that the full data acquisition demand of the preset task can be met, and the normal execution of the preset task is guaranteed.

[0049] The embodiments of the present application calculate the greatest common divisor of the full data acquisition period, and determine the greatest common divisor as the full data scheduling period, so that the number of full data acquisition can be reduced on the basis of meeting the demand of the preset task for periodically acquiring full data, and transmission and system resources are saved.

[0050] The embodiments of the present application update the full data scheduling number after acquiring the data in each edge server each time, record the first ratio of the full data acquisition period of the preset task to the full data scheduling period, and record the full data scheduling number of the preset task when the preset task is registered; for any preset task, the second ratio of the preset task is calculated; if the second ratio of the preset task is an integer, the preset task is determined as the target task, so that the identification efficiency of the target task can be improved.

[0051] In the embodiment of the present application, the state information of the target task feedback is received in each process of acquiring data in each edge server, and the speed of sending data to the target task is controlled according to the state information, so that the speed of sending data to the target task can be adapted to the actual situation of the target task, the computing resources are saved, and the efficient execution of the target task is ensured.

[0052] When the state information is the first state, the speed of sending data to the target task is controlled to be zero, so that the sending of the full amount of data is terminated when the target task no longer needs the full amount of data, thereby saving transmission resources; when the state information is the second state, the speed of sending data to the target task is kept unchanged to maintain the current sending speed and improve the matching degree of the data sending speed and the actual processing situation of the target task; if the state information is the third state, the speed of sending data to the target task is increased, so that the sending speed of the target task is increased in the case that the processing efficiency of the task execution device of the target task is high, and the efficient execution of the target task is ensured; if the state information is the fourth state, the speed of sending data to the target task is reduced, so as to avoid excessive data accumulation in the task execution device of the target task and avoid affecting the normal execution of the target task.

[0053] In the embodiment of the present application, the registration request of at least one preset task is received in advance, the at least one preset task is registered, the full amount of data acquisition period of the at least one preset task is recorded based on the registration request, and the recorded full amount of data acquisition period of the at least one preset task is acquired, so as to facilitate centralized management of the preset task.

[0054] In the embodiment of the present application, the callback address of the at least one preset task is recorded based on the registration request, the data in the edge server is sent to the target task based on the callback address of the target task, so as to ensure the accuracy of data sending; and / or, in the embodiment of the present application, the callback parameter of the at least one preset task is recorded based on the registration request, the target data matching the callback parameter of the target task is extracted from the data acquired from each edge server, and the target data is sent to the target task, so as to ensure that the type of the sent data is adapted to the demand of the target task.

[0055] The above description is only a summary of the technical scheme of the embodiment of the present application, in order to more clearly understand the technical means of the embodiment of the present application, the content of the specification can be implemented, and in order to make the above and other purposes, characteristics and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation manner of the embodiment of the present application is described below. BRIEF DESCRIPTION OF DRAWINGS

[0056] Various other advantages and benefits will become apparent to those of ordinary skill in the art, upon reading the following detailed description of the preferred embodiment. The accompanying drawings are included to provide a better understanding of the preferred embodiment, and are not intended to limit the scope of the application. Moreover, in the drawings, like reference numerals refer to similar components, and:

[0057] Figure 1 A flow diagram of a scheduling method provided by an embodiment of the application is shown;

[0058] Figure 2 A data scheduling diagram provided by an embodiment of the application is shown;

[0059] Figure 3 Another data scheduling diagram provided by an embodiment of the application is shown;

[0060] Figure 4 A flow diagram of another scheduling method provided by an embodiment of the application is shown;

[0061] Figure 5 A flow diagram of yet another scheduling method provided by an embodiment of the application is shown;

[0062] Figure 6 A flow diagram of still another scheduling method provided by an embodiment of the application is shown;

[0063] Figure 7 A structure diagram of a scheduling device provided by an embodiment of the application is shown;

[0064] Figure 8 A structure diagram of a scheduling server provided by an embodiment of the application is shown;

[0065] Figure 9 A structure diagram of a scheduling system provided by an embodiment of the application is shown; DETAILED DESCRIPTION

[0066] Exemplary embodiments of the present application will be described herein below with reference to the accompanying drawings. While exemplary embodiments of the present application are illustrated, it is to be understood that the present application is not limited to the embodiments described herein, but can be practiced with variations that will occur to those of ordinary skill in the art upon reading the present description. Rather, the present embodiments are presented by way of example to enable a full and complete understanding of the present application.

[0067] Figure 1 A flow diagram of a scheduling method provided by an embodiment of the application is shown. The scheduling method provided by the present embodiment can be performed by a predetermined scheduling server, etc.

[0068] Specifically, asFigure 1 As shown, the method comprises the following steps:

[0069] In step S110, the full-amount data acquisition period of at least one preset task is acquired; wherein the preset task is a task with a requirement of periodically acquiring full-amount data.

[0070] In the target service deployment mode using edge servers, the target service is provided by multiple edge servers, each of which can be responsible for part of the functions of the target service, or each of which can be responsible for the target service of users in a part of an area. Each edge server usually acquires, generates and / or manages corresponding service data in the process of providing the target service. However, since the edge server is only responsible for part of the functions of the target service, or the edge server is only responsible for the target service of users in a part of an area, for a certain data dimension of the target service, each edge server is only responsible for part of the data in this dimension of the target service, and then the sum of the data in this dimension in all edge servers is the full-amount data in this dimension of the target service. Taking the target service as a live service for example, each edge server is responsible for the live streaming service of users in a corresponding area, so each edge server can only obtain data of part of the live streams. For the current stream code rate dimension of the live service, the code rate data of all currently running live streams corresponding to the live service is the full-amount data in the current stream code rate dimension of the live service, in other words, the sum of the code rate data of the currently running live streams in all edge servers corresponding to the live service is the full-amount data in the current stream code rate dimension of the live service.

[0071] In actual application, there are usually many tasks with a requirement of periodically acquiring full-amount data. Taking the live service for example, there are usually tasks of periodically modifying attributes in full-amount live streams, or tasks of periodically performing data statistics on full-amount live streams, or tasks of periodically identifying abnormal live streams, etc. Such tasks with a requirement of periodically acquiring full-amount data are preset tasks. In addition, the embodiments of the present application do not limit the specific type of the task, for example, the task can be a script task, or a service task or other task, etc.

[0072] Each preset task needs to periodically acquire full-amount data in a specified dimension of the target service according to its own task configuration, and the period in which the preset task acquires the full-amount data in the specified dimension of the target service is the full-amount data acquisition period of the preset task, that is, each preset task needs to periodically obtain full-amount data according to its respective full-amount data acquisition period. For example, the task configuration of the preset task T1 is to acquire the current stream code rate every 1 hour, the full-amount data acquisition period of the preset task T1 is 1 hour, and the preset task T1 needs to obtain the code rate data of all currently running live streams in all edge servers every 1 hour. This step records the full-amount data acquisition period of each preset task.

[0073] In step S120, the full data scheduling period is determined according to each full data acquisition period.

[0074] Unlike the prior art, the embodiment of the present application is to acquire full data according to the full data scheduling period by the scheduling server, and distribute the full data to each preset task. The full data scheduling period is determined according to the full data acquisition period of the preset task, and the full data scheduling period is less than or equal to the full data acquisition period, that is, the scheduling server can schedule the full data according to the full data scheduling period to meet the full data acquisition period of different preset tasks.

[0075] The embodiment of the present application does not limit the specific way of determining the full data scheduling period: for example, a fine-grained unit time (such as 10 seconds, etc.) less than or equal to each full data acquisition period can be determined as the full data scheduling period; or the greatest common divisor of the full data acquisition period can also be used as the full data scheduling period, etc.

[0076] In step S130, the data in each edge server is acquired according to the full data scheduling period.

[0077] The scheduling server acquires the data in each edge server according to the full data scheduling period determined in step S120, so as to acquire the full data according to the full data scheduling period. For example, the scheduling server can traverse each edge server in turn to obtain the full data; or in live streaming service, a stream state sub-service is usually set, and each edge server will timely report the related information of live streaming, so that the scheduling server can traverse the edge server to obtain the current live streaming identifier when acquiring the full data, and then acquire the corresponding stream state data from the stream state sub-service using the acquired live streaming identifier, etc.

[0078] In step S140, in the process of acquiring the data in each edge server each time, a target task is identified from the preset tasks, and the acquired data in the edge server is sent to the target task; wherein the time interval between the last data receiving time corresponding to the target task and the current time matches the full data acquisition period of the target task.

[0079] At each time when the full data scheduling period is reached, a full data acquisition process is performed, that is, a process of acquiring data in each edge server is performed. In each process of acquiring data in each edge server, the scheduling server identifies a task that currently reaches the full data acquisition period from the preset tasks, and the task is the target task. In other words, in each process of acquiring data in each edge server, if the time interval between the last data receiving time corresponding to a task and the current time matches the full data acquisition period of the task, it is indicated that the full data acquisition period of the task is currently reached, and thus the task is taken as the target task, and the scheduling server sends the data acquired this time to the target task.

[0080] The scheme provided by the embodiment of the present application will be described in detail below in combination with Figure 2 and Figure 3 . In the data scheduling diagram shown in Figure 2 , data is acquired from each edge server by preset task 1 and preset task 2 in turn according to the respective full data acquisition periods. In this way, the edge server needs to maintain interfaces and transmission links between the edge server and multiple preset tasks, which increases transmission overhead and transmission cost, and the interface overhead is large. Moreover, when the data request times of multiple preset tasks are the same, the edge server needs to process the data requests of multiple preset tasks respectively, which easily causes a high short-time load. Figure 3 In the data scheduling diagram shown in , the full data acquisition requests of preset task 1 and preset task 2 are uniformly processed by the scheduling server, and the scheduling server schedules data from each edge server according to the determined full data scheduling period and sends the data to the corresponding preset task. Compared with the data scheduling scheme shown in Figure 2 , the scheduling scheme shown in Figure 3 can save transmission resources and reduce transmission overhead, interface overhead of the edge server, and the phenomenon of high short-time load of the edge server.

[0081] It can be seen that the embodiment of the present application can schedule full data from the edge server according to the full data scheduling period and forward the full data to the target task that currently reaches the full data acquisition period, so that the embodiment of the present application can save transmission resources and reduce transmission overhead, interface overhead of the edge server, and short-time load of the edge server. Moreover, the full data scheduling period in the embodiment of the present application is determined according to the full data acquisition period of the preset task, so that the full data acquisition demand of the preset task can be met and normal execution of the preset task is ensured.

[0082] Figure 4 A flowchart of another scheduling method provided by the embodiment of the present application is shown. The scheduling method provided by the embodiment of the present application can be performed by a preset scheduling server.

[0083] Specifically, as shown in the method comprises the following steps: Figure 4

[0084] Step S410, receiving a registration request of at least one preset task, registering the at least one preset task; based on the registration request, recording a full data acquisition period, a callback address, and / or a callback parameter of the at least one preset task.

[0085] In order to facilitate centralized management of the preset tasks, the at least one preset task requesting access is registered in advance. Specifically, after receiving a registration request of any preset task, the full data acquisition period, the callback address, and / or the callback parameter of the preset task are recorded according to the registration request of the preset task. Optionally, in order to further manage the related data of the preset tasks, a preset task record table can be generated, in which the task identification, the full data acquisition period, the callback address, and / or the callback parameter of each registered preset task are recorded.

[0086] In an optional embodiment, a deregistration request or a dormancy request of a registered preset task can also be received, and the corresponding registered preset task is deregistered based on the deregistration request, or the corresponding registered preset task is put into dormancy based on the dormancy request. After the registered preset task is deregistered, the record information of the registered preset task is deleted from the preset task record table; or after the registered preset task is put into dormancy, a dormancy marker and a dormancy period of the registered preset task are added in the preset task record table, so that full data is no longer sent to the registered preset task in the dormancy period.

[0087] Step S420, acquiring a full data acquisition period of at least one preset task.

[0088] In an optional embodiment, if there is no preset task assigned with a dormancy marker at present, and / or each preset task corresponds to a full data acquisition period at present, the full data acquisition period of the recorded at least one preset task can be acquired.

[0089] ​In an optional implementation, if there is a preset task currently assigned with the sleep identifier, and / or, the at least one preset task currently corresponds to multiple full-data acquisition periods, the step specifically acquires a currently valid full-data acquisition period, so that the full-data scheduling period can be determined based on the currently valid full-data acquisition period, thereby improving the determination accuracy of the full-data scheduling period. Specifically, if a preset task is assigned with a sleep identifier and the preset task is currently in a sleep period, it is determined that the full-data acquisition period of the preset task is an invalid full-data acquisition period, and the step no longer acquires the full-data acquisition period of the preset task, that is, the full-data acquisition period of the preset task does not participate in the calculation of the subsequent full-data scheduling period; and / or, if a preset task corresponds to multiple full-data acquisition periods, each full-data acquisition period corresponds to an execution period, the step specifically determines an execution period containing the current time, and then acquires the full-data acquisition period corresponding to the execution period, that is, the full-data acquisition period corresponding to the execution period in which the current time is located is a valid full-data acquisition period. For example, the preset task T1 corresponds to a full-data acquisition period of 2 hours (8:00-18:00) and a full-data acquisition period of 1 hour (18:01-7:59), and if the current time is 8:30, it is determined that the full-data acquisition period of 2 hours is a valid full-data acquisition period.

[0090] Step S430, determining a full-data scheduling period according to each full-data acquisition period.

[0091] Step S440, acquiring data in each edge server according to the full-data scheduling period.

[0092] In order to avoid acquiring invalid data, the embodiment of the application acquires callback parameters of each preset task currently registered, adds the callback parameters of each preset task to a callback parameter set, eliminates repeated callback parameters in the callback parameter set, and then acquires data in each edge server matching each callback parameter in the callback parameter set.

[0093] Step S450, in each process of acquiring data in each edge server, identifying a target task from the preset tasks, extracting target data matching the callback parameter of the target task from the acquired data in each edge server, and sending the target data to the target task based on the callback address of the target task.

[0094] In each full-data acquisition process, that is, in each process of acquiring data in each edge server, a target task currently reaching a corresponding full-data acquisition period is identified, and target data matching the callback parameter of the target task is extracted from the acquired data, and the target data is sent to the target task based on the callback address of the target task.

[0095] Therefore, on the basis of saving transmission resources, reducing transmission overhead, reducing interface overhead in the edge server and short-time load of the edge server, meeting the full data acquisition requirement of the preset task to guarantee normal execution of the preset task, the embodiment of the application registers the preset task which requests access in advance, so as to facilitate centralized management of the preset task; moreover, the embodiment of the application records the callback address of the preset task, and feeds back data to the target task based on the callback address, so as to guarantee accuracy of data transmission; furthermore, the embodiment of the application records the callback parameter of the preset task, and feeds back target data matched with the callback parameter of the target task to the target task, so as to guarantee accuracy of data transmission, avoid transmission of invalid data to the target task, and save transmission resources.

[0096] Figure 5 A flowchart of another scheduling method provided by the embodiment of the application is shown. The scheduling method provided by the embodiment can be executed by a preset scheduling server.

[0097] Specifically, as shown in Figure 5 the method comprises the following steps:

[0098] Step S510: full data acquisition periods of at least one preset task are acquired.

[0099] Step S520: a greatest common divisor of the full data acquisition periods is calculated, and the greatest common divisor is determined as a full data scheduling period.

[0100] The greatest common divisor of the currently acquired full data acquisition periods is calculated, and the greatest common divisor is determined as the full data scheduling period, so that each full data acquisition period is an integer multiple of the full data scheduling period, and the scheduling server can send the acquired data to the corresponding preset task every n times to meet the full data periodic acquisition requirement of the preset task. Moreover, the full data scheduling period is the greatest common divisor of the full data acquisition periods, so that the frequency of data acquisition of the scheduling server can be reduced while meeting the full data periodic acquisition requirement of the preset task.

[0101] Step S530: data in each edge server is acquired according to the full data scheduling period.

[0102] Step S540: in the process of acquiring data in each edge server each time, a second ratio of any preset task is calculated, and a target task is identified based on the second ratio of the preset task.

[0103] In order to quickly identify the target task, the embodiment of the present application updates the full data scheduling times after obtaining the data in each edge server each time, and the full data scheduling times are specifically the number of times of obtaining the data from the edge server that has been executed currently. For example, the full data scheduling time is 1:00, the full data scheduling period is 1 hour, and if the current time is 2:30, it indicates that the full data scheduling has been executed twice currently, and the full data scheduling times are 2.

[0104] Further, each preset task needs to record the first ratio of the full data acquisition period and the full data scheduling period when registering, and record the full data scheduling times of the preset task when registering. In the example in the preceding paragraph, if the registration time of the preset task T1 is 2:35, the full data scheduling times of the preset task T1 recorded when registering is 2, and if the full data acquisition period of the preset task T1 is 3 hours, the first ratio of the preset task T1 is 3.

[0105] In the process of obtaining the data in each edge server each time, for any preset task, the second ratio of the preset task is calculated, if the second ratio of the preset task is an integer, it indicates that the full data acquisition period of the preset task has been reached currently, and the preset task is determined as the target task. The second ratio of the preset task=(the difference between the current full data scheduling times and the full data scheduling times of the preset task when registering) / the first ratio of the preset task. In the example in the preceding paragraph, if the current full data scheduling times is 7, the difference between the current full data scheduling times and the full data scheduling times of the preset task T1 when registering is 7-2=5, the second ratio of the preset task T1 is 5 / 3, the second ratio is not an integer, which indicates that the time interval from the last time of obtaining the full data of the preset task T1 does not reach the full data acquisition period of the preset task T1, and the preset task T1 is not the target task; if the current full data scheduling times is 8, the difference between the current full data scheduling times and the full data scheduling times of the preset task T1 when registering is 8-2=6, the second ratio of the preset task T1 is 6 / 3, the second ratio is an integer, which indicates that the time interval from the last time of obtaining the full data of the preset task T1 reaches the full data acquisition period of the preset task T1, and the preset task T1 is the target task.

[0106] In step S550, the data in the edge server obtained is sent to the target task.

[0107] Therefore, on the basis of being capable of saving transmission resources, reducing transmission overhead, reducing interface overhead in the edge server and short-time load of the edge server, meeting the full-amount data acquisition requirement of the preset task to guarantee normal execution of the preset task, the greatest common divisor of the full-amount data acquisition period is determined as the full-amount data scheduling period, so that the full-amount data acquisition frequency is further reduced, transmission resources are saved, and excessive interference on the edge server is avoided under the condition of meeting the full-amount data acquisition requirement of the preset task. Moreover, the embodiment of the application can quickly identify the target task according to whether the second ratio of the preset task is an integer, and improve the identification efficiency of the target task.

[0108] Figure 6 A flowchart of another scheduling method provided by the embodiment of the application is shown. The scheduling method provided by the embodiment of the application can be executed by a preset scheduling server and the like.

[0109] Specifically, as shown in the figure, the method comprises the following steps: Figure 6

[0110] Step S610: acquiring a full-amount data acquisition period of at least one preset task.

[0111] Step S620: determining a full-amount data scheduling period according to each full-amount data acquisition period.

[0112] Step S630: acquiring data in each edge server according to the full-amount data scheduling period.

[0113] Step S640: identifying a target task from the preset tasks in each time of acquiring data in each edge server, and sending the acquired data in the edge server to the target task; and receiving state information fed back by the target task, and controlling the speed of sending data to the target task according to the state information.

[0114] Specifically, if the state information is a first state, it indicates that the target task currently does not need subsequent full-amount data, and the speed of sending data to the target task is controlled to be zero, so as to save transmission resources; if the state information is a second state, it indicates that the processing state of the target task is the same as that at the last time, and the speed of sending data to the target task is kept unchanged; if the state information is a third state, it indicates that the processing capability of the task execution device where the target task is located is improved, and the speed of sending data to the target task is improved; if the state information is a fourth state, it indicates that the processing capability of the task execution device where the target task is located is reduced, and the speed of sending data to the target task is reduced.

[0115] ​Therefore, on the basis of saving transmission resources, reducing transmission overhead, reducing interface overhead in the edge server and short-time load of the edge server, meeting the full-amount data acquisition requirement of the preset task to guarantee normal execution of the preset task, the embodiment of the application receives the state information fed back by the target task, controls the speed of sending data to the target task according to the state information, and adapts the speed of sending data to the target task to the actual execution situation of the target task.

[0116] Figure 7 A structure diagram of a scheduling device provided by the embodiment of the application is shown. As shown in the figure, Figure 7 The scheduling device 700 comprises a first period obtaining module 710, a second period obtaining module 720, a data obtaining module 730 and a data sending module 740.

[0117] The first period obtaining module 710 is configured to obtain a full-amount data acquisition period of at least one preset task; wherein the preset task is a task having a requirement of acquiring full-amount data periodically.

[0118] The second period obtaining module 720 is configured to determine a full-amount data scheduling period according to each full-amount data acquisition period.

[0119] The data obtaining module 730 is configured to obtain data in each edge server according to the full-amount data scheduling period.

[0120] The data sending module 740 is configured to identify a target task from the preset tasks in each process of obtaining data in each edge server, and send the obtained data in the edge server to the target task; wherein a time interval between a last data receiving time corresponding to the target task and a current time matches the full-amount data acquisition period of the target task.

[0121] In an optional implementation, the second period obtaining module is further configured to: calculate a greatest common divisor of the full-amount data acquisition periods; and determine the greatest common divisor as the full-amount data scheduling period.

[0122] In an optional implementation, the device further comprises a recording module configured to: update a full-amount data scheduling number after obtaining data in each edge server each time; and record a first ratio of the full-amount data acquisition period to the full-amount data scheduling period for any preset task, and record a full-amount data scheduling number of the preset task at the time of registration.

[0123] The data sending module is further configured to: for any preset task, calculate a second ratio of the preset task; if the second ratio of the preset task is an integer, determine the preset task as the target task; wherein the second ratio of the preset task = (a difference between a current full-data scheduling number and a full-data scheduling number of the preset task at registration time) / the first ratio of the preset task.

[0124] In an optional implementation, the apparatus further comprises a state receiving module configured to receive state information fed back by the target task in each process of obtaining data in the edge servers.

[0125] The speed control module is configured to control a speed of sending data to the target task according to the state information.

[0126] In an optional implementation, the speed control module is further configured to: if the state information is the first state, control the speed of sending data to the target task as zero.

[0127] If the state information is the second state, keep the speed of sending data to the target task unchanged.

[0128] If the state information is the third state, increase the speed of sending data to the target task.

[0129] If the state information is the fourth state, decrease the speed of sending data to the target task.

[0130] In an optional implementation, the apparatus further comprises a registration module configured to receive a registration request of at least one preset task, register the at least one preset task, and record a full-data obtaining period of the at least one preset task based on the registration request.

[0131] The first period obtaining module is further configured to obtain the recorded full-data obtaining period of the at least one preset task.

[0132] In an optional implementation, the apparatus further comprises a recording module configured to record a callback address of the at least one preset task based on the registration request; and the data sending module is further configured to send the obtained data in the edge servers to the target task based on the callback address of the target task.

[0133] And / or, the apparatus further comprises a recording module configured to record a callback parameter of the at least one preset task based on the registration request; and the data sending module is further configured to extract target data matching the callback parameter of the target task from the obtained data in the edge servers, and send the target data to the target task.

[0134] The specific implementation process of each module provided by the embodiment can refer to the description in the corresponding method embodiment, which will not be repeated here.

[0135] It can be seen that the embodiment of the present application can schedule full data from the edge server according to the full data scheduling period, and forward the full data to the target task that reaches the full data acquisition period, so that the embodiment of the present application can save transmission resources and reduce transmission overhead, reduce the interface overhead of the edge server, and reduce the phenomenon of short-term overload of the edge server. Moreover, the full data scheduling period in the embodiment of the present application is determined according to the full data acquisition period of the preset task, so as to meet the full data acquisition demand of the preset task and ensure the normal execution of the preset task.

[0136] Figure 8 A structure schematic diagram of a scheduling server provided by the embodiment of the present application is shown. The embodiment of the present application does not limit the specific implementation of the scheduling server.

[0137] As shown in Figure 8 The scheduling server can include a processor 802, a communications interface 804, a memory 806, and a communications bus 808.

[0138] The processor 802, the communications interface 804, and the memory 806 can communicate with each other through the communications bus 808. The communications interface 804 is used to communicate with network elements such as clients or other servers. The processor 802 is used to execute the program 810, and specifically can execute the related steps in the above-mentioned scheduling method embodiment.

[0139] Specifically, the program 810 can include program code, which includes computer operation instructions.

[0140] The processor 802 can be a central processing unit CPU, or an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement the embodiment of the present application. The one or more processors included in the scheduling server can be the same type of processor, such as one or more CPUs; or can be different types of processors, such as one or more CPUs and one or more ASICs.

[0141] A memory 806 for storing a program 810. The memory 806 can include a high-speed RAM memory and can also include a non-volatile memory, such as at least one disk memory. The program 810 can be specifically configured to cause the processor 802 to perform the method in any of the above method embodiments.

[0142] Figure 9 A structure diagram of a scheduling system provided by an embodiment of the present application is shown. As shown in the figure, the scheduling system 900 includes a scheduling server 800, a plurality of edge servers 910, and at least one task execution device 920 for performing a preset task. Figure 9

[0143] An embodiment of the present application provides a non-volatile computer storage medium, which stores at least one executable instruction, and the computer executable instruction can execute the scheduling method in any of the above method embodiments.

[0144] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems can be used with these teachings, based on the description as set forth above. In terms of input / output, the structure required to construct such a system as described above will be apparent to those skilled in the art from the above description. In addition, the embodiments of the present application are not intended to be limited to any particular programming language. It will be appreciated that there are many programming languages that can be used to implement the teachings of the embodiments of the present application described herein, and any such programming language can be used in this regard. The descriptions of specific languages herein are presented solely for purposes of disclosure.

[0145] In the specification provided herein, a large number of specific details are described. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been described in detail in order not to obscure the understanding of the present description.

[0146] Similarly, it should be appreciated that, in the description of the exemplary embodiments of the present application above, the various features of the present application are sometimes grouped together in a single embodiment, figure, or description of a related aspect. This is done for the purpose of clarity in understanding the present application. However, it should be appreciated that the described features can be implemented independently of one another in various embodiments of the present application, and that not all embodiments of the present application necessarily include the described features. It should also be understood that each of the respective features can also be implemented independently of one another in methods that can be provided in accordance with the present application.

[0147] ​Those skilled in the art will appreciate that the modules in the apparatuses in the embodiments can be adapted and placed in one or more apparatuses other than the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and further can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, all combinations of all features disclosed in this specification (including accompanying claims, abstract and drawings) and all processes or units of any methods or apparatuses so disclosed can be adopted in any combination. Unless explicitly stated otherwise, each feature disclosed in this specification (including accompanying claims, abstract and drawings) can be replaced by alternative features providing the same, equivalent or similar functionality.

[0148] Further, those skilled in the art will appreciate that a combination of features of different embodiments means that such combination is within the scope of the embodiments of the present application and forms a different embodiment. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0149] The various component embodiments of the embodiments of the present application can be implemented in hardware, or as software modules running in one or more processors, or in combinations thereof. Those skilled in the art will appreciate that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functionality of some or all of the components according to the embodiments of the present application. The embodiments of the present application can also be implemented as a program of apparatuses or devices (for example, computer programs and computer program products) for performing part or all of the methods described herein. Such program implementing the embodiments of the present application can be stored on a computer readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or in any other form.

[0150] It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that one skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word 'comprising' does not exclude the presence of elements or steps other than those listed in a claim. The word 'a' or 'an' preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of both hardware and software, and any combination thereof. In a unitary claim, several devices, apparatuses or means can be listed, comprising means for carrying out a certain task. The use of the term'means' in a claim is intended to refer to a combination of devices, apparatuses or means for carrying out a task. The word 'first','second', 'third', etc. do not imply any order. The use of these terms is to be construed as an indication of particular embodiments. Steps in the above-described embodiments can be carried out in any order, unless otherwise specified.

Claims

1. A scheduling method, characterized by, The method comprises: acquiring a full-data acquisition period of at least one preset task; wherein the preset task is a task with a requirement of acquiring full data periodically; determining a full-data scheduling period according to each full-data acquisition period; wherein the full-data scheduling period is less than or equal to the full-data acquisition period; acquiring data in each edge server according to the full-data scheduling period; in each process of acquiring data in each edge server, identifying a target task from the preset tasks, and sending the acquired data in the edge server to the target task; wherein a time interval between a last data receiving time corresponding to the target task and a current time matches the full-data acquisition period of the target task; in each process of acquiring data in each edge server, receiving state information fed back by the target task, and controlling a sending speed of data to the target task according to the state information.

2. The method of claim 1, wherein, The method further comprises: calculating a greatest common divisor of the full-data acquisition periods; determining the greatest common divisor as the full-data scheduling period.

3. The method of claim 2, wherein, The method further comprises: updating a full-data scheduling number after acquiring data in each edge server each time; for any preset task, recording a first ratio of the full-data acquisition period of the preset task to the full-data scheduling period, and recording a full-data scheduling number of the preset task when the preset task is registered; The method further comprises: for any preset task, calculating a second ratio of the preset task; if the second ratio of the preset task is an integer, the preset task is determined as the target task; wherein the second ratio of the preset task=(a difference between a current full-data scheduling number and a full-data scheduling number of the preset task when the preset task is registered) / the first ratio of the preset task.

4. The method of claim 1, wherein, The method further comprises: if the state information is a first state, the sending speed of data to the target task is controlled to be zero; if the state information is a second state, the sending speed of data to the target task is kept unchanged; if the state information is a third state, the sending speed of data to the target task is increased; if the state information is a fourth state, the sending speed of data to the target task is decreased.

5. The method according to any one of claims 1-4, characterized in that, The method further comprises: receiving a registration request of at least one preset task, registering the at least one preset task, and recording a full-data acquisition period of the at least one preset task based on the registration request. The method further comprises: acquiring the recorded full-data acquisition period of the at least one preset task.

6. The method of claim 5, wherein The method further comprises: recording a callback address of the at least one preset task based on the registration request; and then the sending of the obtained data in the edge server to the target task further comprises: sending the obtained data in the edge server to the target task based on the callback address of the target task. And / or, the method further comprises: recording a callback parameter of the at least one preset task based on the registration request; and then the sending of the obtained data in the edge server to the target task further comprises: extracting target data matching the callback parameter of the target task from the obtained data in each edge server, and sending the target data to the target task.

7. A scheduling apparatus characterized by comprising: Comprising: The first cycle acquisition module is used for acquiring full data acquisition cycles of at least one preset task; wherein, the preset task is a task with a demand for periodic acquisition of full data; The second cycle acquisition module is used for determining a full data scheduling cycle according to each full data acquisition cycle; wherein, the full data scheduling cycle is less than or equal to the full data acquisition cycle; The data acquisition module is used for acquiring data in each edge server according to the full data scheduling cycle; The data sending module is used for identifying a target task from the preset task in each process of acquiring data in each edge server, and sending the obtained data in the edge server to the target task; wherein, a time interval between a last data receiving time corresponding to the target task and a current time matches a full data acquisition cycle of the target task; in each process of acquiring data in each edge server, state information fed back by the target task is received; and the speed of sending data to the target task is controlled according to the state information.

8. A dispatch server, characterized by Comprising: A processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete communication with each other through the communication bus; The memory is used for storing at least one executable instruction, and the executable instruction makes the processor execute the operation corresponding to the scheduling method in any one of claims 1-6.

9. A dispatch system characterized by, Comprising: The scheduling server, the plurality of edge servers and the at least one task execution device for executing the preset task according to claim 8.

10. A computer storage medium, characterized in that, The storage medium stores at least one executable instruction, and the executable instruction makes the processor execute the operation corresponding to the scheduling method in any one of claims 1-6.

11. A computer program product, characterised in that, The computer program product is used for executing the operation corresponding to the scheduling method in any one of claims 1-6.

Citation Information

Patent Citations

  • Scheduling method of multiple periodic tasks

    CN104699533A

  • HTTP scheduling method and system for cloud distribution network

    CN110830533A