Task scheduling system and method for content delivery network, medium, equipment and product
By setting up an exclusive task queue for each domain name in the content distribution network and scheduling tasks according to the domain name priority, the problem of unfair task scheduling in the content distribution network is solved, improving user experience and system stability.
Patent Information
- Application Number
- CN202411814884.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-02-28
AI Technical Summary
How to reasonably schedule the domain name configuration tasks of users in the content distribution network, avoid the long-term accumulation of tasks of individual users, and ensure the fairness of task scheduling and user experience.
The domain name configuration task is stored in the exclusive task queue of the corresponding domain name through the task storage module, and the target task queue is determined according to the priority of each domain name through the task scheduling module, and the target configuration task is issued to the content distribution network system.
It realizes reasonable scheduling of domain name configuration tasks for the content distribution network, ensures the fairness of task scheduling, avoids long-term accumulation of tasks for individual users, and improves user experience.
Smart Images

Figure CN119544664A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a task scheduling system, method, medium, device and product for a content distribution network. Background Art
[0002] Content Delivery Network (CDN) deploys cache servers in multiple geographic locations and uses scheduling algorithms to dispatch requests to the optimal cache server, thereby shortening links, accelerating distribution, and optimizing access experience. As more and more users access content delivery networks, how to reasonably schedule domain name configuration tasks for all users has become an urgent problem to be solved. Summary of the invention
[0003] This section is provided to introduce the concepts in a brief form, which will be described in detail in the detailed implementation section below. This section is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to be used to limit the scope of the technical solution claimed for protection.
[0004] In a first aspect, the present disclosure provides a task scheduling system for a content distribution network, the task scheduling system comprising: A task storage module, used to store the domain name configuration task into a domain name task queue according to the domain name in the domain name configuration task, wherein a domain name task queue is used to store domain name configuration tasks corresponding to the same domain name; The task scheduling module is used to determine the target task queue according to the priority of the domain name corresponding to each domain name task queue, and send the target configuration task in the target task queue to the content distribution network system, and the content distribution network system is used to perform domain name configuration according to the sent domain name configuration task.
[0005] In a second aspect, the present disclosure provides a task scheduling method for a content distribution network, the task scheduling method comprising: The task storage module stores the domain name configuration task into a domain name task queue according to the domain name in the domain name configuration task, wherein a domain name task queue is used to store domain name configuration tasks corresponding to the same domain name; The task scheduling module determines the target task queue according to the priority of the domain name corresponding to each domain name task queue, and sends the target configuration task in the target task queue to the content distribution network system, which is used to perform domain name configuration according to the sent domain name configuration task.
[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps performed by any module in the first aspect or the steps of the method described in the second aspect.
[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps performed by any module in the first aspect or the steps of the method in the second aspect.
[0008] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps performed by any module in the first aspect or the steps of the method described in the second aspect.
[0009] Through the above technical solution, the domain name configuration task can be stored in the exclusive task queue of the corresponding domain name through the task storage module, and the target task queue can be determined according to the priority of each domain name through the task scheduling module, and then the target configuration task in the target task queue can be sent to the content distribution network system. Thus, by setting up exclusive task queues for domain names of different users, a basis is provided for reasonable scheduling of domain name configuration tasks of the content distribution network, fairness of scheduling of domain name configuration tasks of the content distribution network is guaranteed, and domain name configuration tasks of the content distribution network of individual users are avoided from being piled up for a long time. A certain priority scheduling can also be achieved based on the priority of each domain name task queue, further improving the user experience.
[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a schematic diagram of a task scheduling system for a content distribution network according to an exemplary embodiment of the present disclosure; Figure 2 It is a schematic diagram of a processing flow of a task scheduling system of a content distribution network according to an exemplary embodiment of the present disclosure; Figure 3 is a schematic diagram of a processing flow of a task scheduling module according to an exemplary embodiment of the present disclosure; Figure 4It is a flowchart of a task scheduling method of a content distribution network according to an exemplary embodiment of the present disclosure; Figure 5 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0012] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0013] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0014] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0015] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0016] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0017] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0018] All actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0021] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0022] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0023] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0024] The task scheduling system of the content distribution network is used to schedule and issue the domain name configuration tasks requested by users for the content distribution network system. The users here can be understood as the domain name owners or the requesters of the domain name configuration tasks, such as corporate users, group users, institutional users, etc., and the present disclosure does not restrict this. The rhythm of the task scheduling system for issuing domain name configuration tasks and the fairness of task scheduling will affect the user experience and the stability of the content distribution network system. For users, the faster the domain name configuration tasks are issued, the better, which can avoid long waiting times. For the content distribution network system, issuing domain name configuration tasks too quickly may exceed the tolerance of the content distribution network system. In order to avoid the collapse of the content distribution network system, the task scheduling system needs to control the frequency of task issuance.
[0025] In the related art, the domain name configuration tasks of the content distribution network are issued in the order of the domain name configuration requests submitted by the users, which may cause the domain name configuration requests of individual users for the content distribution network to pile up for a long time, resulting in poor user experience. In addition, when the overall frequency control is limited, how to reasonably schedule the domain name configuration tasks of all users has become an urgent problem to be solved.
[0026] In view of this, the present disclosure provides a task scheduling system, method, medium, device and product for a content distribution network to solve the above technical problems.
[0027] The embodiments of the present disclosure are further explained below with reference to the accompanying drawings.
[0028] Figure 1 is a schematic diagram of a task scheduling system for a content distribution network according to an exemplary embodiment of the present disclosure, with reference to Figure 1 The task scheduling system 10 of the content distribution network may include a task storage module 101 and a task scheduling module 102 .
[0029] The task storage module 101 is used to store the domain name configuration task into the domain name task queue according to the domain name in the domain name configuration task, and a domain name task queue is used to store the domain name configuration tasks corresponding to the same domain name. The task scheduling module 102 is used to determine the target task queue according to the priority of the domain name corresponding to each domain name task queue, and send the target configuration task in the target task queue to the content distribution network system, and the content distribution network system is used to perform domain name configuration according to the sent domain name configuration task.
[0030] For example, the same user can have multiple domain names, and different domain names correspond to different domain name task queues. After determining the target task queue, the target configuration task is obtained from the head of the target task queue, that is, the domain name configuration information configured first takes effect first, and the domain name configuration information configured later takes effect later, to avoid disordered consumption.
[0031] It is worth noting that the above-mentioned task scheduling system of the content delivery network can be applied not only to CDN, but also to other content delivery networks such as DCDN (Dynamic Route for Content Delivery Network), and the present disclosure does not limit this.
[0032] Through the task scheduling system of the content distribution network, the domain name configuration task can be stored in the exclusive task queue of the corresponding domain name through the task storage module, and the target task queue can be determined according to the priority of each domain name through the task scheduling module, and then the target configuration task in the target task queue can be sent to the content distribution network system. Thus, by setting up exclusive task queues for domain names of different users, a basis is provided for reasonable scheduling of domain name configuration tasks of the content distribution network, fairness of scheduling of domain name configuration tasks of the content distribution network is guaranteed, and domain name configuration tasks of the content distribution network of individual users are avoided from being piled up for a long time. A certain priority scheduling can also be achieved based on the priority of each domain name task queue, further improving the user experience.
[0033] In possible ways, such as Figure 2 As shown, the task scheduling system of the content distribution network also includes a task generation module; the task generation module is used to generate a domain name configuration task according to the domain name configuration request in response to the received domain name configuration request, and store each generated domain name configuration task in the candidate task queue. The task storage module is used to store the domain name configuration task in the domain name task queue according to the domain name in the domain name configuration task for each domain name configuration task in the candidate task queue. Among them, the domain name configuration task may include the user identifier, domain name and domain name configuration information carried by the domain name configuration request, which can be determined according to the needs, and the present disclosure does not limit this.
[0034] It should be noted that the user ID is a unique identifier used to distinguish different users and does not involve user privacy data. It can be a serial ID in digital form, where ID 1 represents user 1 and ID 2 represents user 2. It can also be directly represented by the user's registered account name, and the present disclosure does not impose any restrictions on this.
[0035] For example, after configuring the domain name configuration information on the user side, a domain name configuration request is generated. The task generation module responds to the received domain name configuration request and verifies the legitimacy of the domain name configuration request. For details, reference may be made to related technologies, which are not described in detail in this disclosure. A domain name configuration task of the content distribution network is generated for the domain name configuration request that passes the verification, and each generated domain name configuration task is stored in the candidate task queue.
[0036] For example, the candidate task queue can be any message queue, and the present disclosure does not limit this. In addition, the task generation module can be deployed in multiple instances, that is, the task generation module can include multiple task generation submodules, and the multiple task generation submodules can concurrently process multiple domain name configuration requests, thereby improving the interface throughput.
[0037] Furthermore, in a first-in-first-out order, for each domain name configuration task in the candidate task queue, the domain name configuration task is stored in the exclusive task queue of the corresponding domain name, ensuring that the domain name configuration tasks generated by the same domain name are temporarily stored in the same queue, and the domain name configuration tasks of different domain names do not share the same queue. If the exclusive task queue for the domain name does not exist, an exclusive task queue for the domain name can be dynamically created. In this way, the domain name configuration tasks of each domain name are stored independently in a dedicated task queue, thereby avoiding the head-of-line blocking problem caused by the shared queue, and thus avoiding the long-term accumulation of domain name configuration tasks generated by the domain name configuration requests submitted by subsequent users.
[0038] In a possible manner, the task storage module includes a plurality of task storage submodules, and the plurality of task storage submodules are used to store the plurality of domain name configuration tasks in corresponding domain name task queues in parallel according to the domain names in the plurality of domain name configuration tasks.
[0039] For example, the task storage module may also be deployed in multiple instances, that is, the task storage module may include multiple task storage sub-modules, and the multiple task storage sub-modules may concurrently obtain multiple domain name configuration tasks from the candidate task queue for processing.
[0040] It should be noted that the task generation module and the task storage module can be implemented using one module, that is, after generating the domain name configuration task of the content distribution network according to the domain name configuration request, the domain name configuration task can be directly stored in the exclusive task queue of the corresponding domain name. The specific setting can be based on demand, and the present disclosure does not impose any restrictions on this.
[0041] In addition, the candidate task queue can support queue partitioning, where the partition key is the domain name. The domain name configuration tasks generated by the domain name configuration requests submitted continuously by the same user are stored in the same partition to avoid disordered consumption. The candidate task queue can also support consumer group subscriptions, so all instances should be in the same consumer group and evenly distribute queue partitions for task processing.
[0042] In a possible manner, the task storage module is further used to determine domain name identification data according to the domain name and user identification in the domain name configuration task, and the domain name identification data is used to characterize the corresponding relationship between the domain name and the user identification. The task scheduling module is used to: determine the target user identification according to the first preset priority corresponding to each user identification in the domain name identification data; determine the target domain name according to the second preset priority of the domain name corresponding to the target user identification in the domain name identification data, and determine the domain name task queue corresponding to the target domain name as the target task queue.
[0043] For example, Figure 2 As shown, the task storage module can extract the domain name and user ID in the domain name configuration task of the content distribution network, and store them in the domain name identification data. The domain name identification data can be a multi-level tree structure or other storage structures such as a list. The present disclosure does not limit this. Taking the multi-level tree structure as an example, the first level is the user ID, and the second level is the domain name under the user ID.
[0044] It is worth noting that the same user ID can correspond to multiple domain names, and there is no duplicate correspondence in the domain name ID data, that is, the domain name configuration task with the same domain name and user ID only stores one correspondence. In addition, the domain name ID data stores the domain name and user ID of the domain name configuration task to be issued. For example, the domain name configuration task 1 to be issued corresponds to the domain name A1 and the user ID B1. After the domain name configuration task 1 is issued, the domain name task queue corresponding to the domain name A1 is empty, indicating that there is no domain name configuration task to be issued for the domain name A1. If the user ID B1 also corresponds to other domain names, the domain name A1 can be deleted. If the user ID B1 does not correspond to other domain names, the user ID B1 and the domain name A1 can be deleted.
[0045] For example, the domain name scheduling module can execute a scheduling algorithm. Figure 2 As shown, the domain name scheduling module obtains the user ID list from the domain name identification data, obtains the weight value of each user ID from the weight module, and can use the default user weight if the weight value is empty. Based on the weighted random selection algorithm, a user ID is randomly selected. Then all domain names corresponding to the user ID are obtained from the domain name identification data, and the weight value of each domain name is obtained from the weight module. If the weight value is empty, the default domain name weight can be used. Based on the weighted random selection algorithm, a domain name corresponding to the user ID is randomly selected, and the domain name task queue corresponding to the domain name is determined as the target task queue.
[0046] It should be noted that the domain name identification data can be used by the task scheduling module to scan the domain names where tasks are to be issued, and provide sample space for the weighted random selection algorithm. Based on the multi-level weighted random selection algorithm of the domain-level exclusive queue, each domain name has the opportunity to participate in the scheduling at any time, which can ensure the fairness of task scheduling and prevent the head-of-line blocking problem caused by individual users or individual domain names submitting a large number of tasks due to first-in-first-out consumption when the queue is shared. Of course, other selection algorithms can also be selected, such as random selection algorithms, etc., and the present disclosure does not limit this.
[0047] It should be understood that the weight module supports configuration and query of user identification weight and domain name weight. User identification weight can represent user priority, and domain name weight can represent domain name priority. The higher the weight value, the higher the probability of random selection. Priority task scheduling is achieved by dynamically adjusting the weight. Among them, the default user weight and the default domain name weight can be the same or different, and the present disclosure does not limit this.
[0048] In a possible manner, the task scheduling module includes multiple task scheduling sub-modules, which are used to determine multiple target task queues in parallel according to the priority of the domain names corresponding to each domain name task queue, and send the target configuration tasks in the multiple target task queues to the content distribution network system in parallel.
[0049] For example, the task scheduling module can be deployed in multiple instances, and each instance independently and cyclically executes the scheduling algorithm. That is, the task scheduling module can include multiple task scheduling submodules, and the multiple task scheduling submodules can concurrently determine multiple target task queues according to the priority of the domain name corresponding to each domain name task queue, and respectively send the target configuration tasks in the multiple target task queues to the content distribution network system in parallel.
[0050] In a possible manner, the task scheduling module is used to: lock the target task queue; when the target task queue is locked successfully, send the target configuration task in the target task queue to the content distribution network system; when the target task queue fails to be locked, determine a new target task queue based on the priority of the domain name corresponding to each domain name task queue, and lock the new target task queue until the new target task queue is locked successfully.
[0051] For example, after determining the target task queue, the target task queue is locked, so that other instances can avoid competing to consume the task queue and causing system errors. For example, after the task scheduling submodule determines task queue 1, task queue 1 is locked. After the lock is successful, other task scheduling submodules determine the target task queue in other task queues except task queue 1.
[0052] For example, Figure 3 As shown, the task scheduling module locks the target task queue after determining the target task queue. If the lock is successful, the target configuration task is queried from the head of the target task queue to perform the subsequent task distribution process. If the lock fails, the target domain name determination process is repeated.
[0053] In a possible manner, the task scheduling module is used to: when the preset frequency control restriction conditions are met, send the target configuration tasks in the target task queue to the content distribution network system; when the preset frequency control restriction conditions are not met, determine a new target task queue based on the priority of the domain name corresponding to each domain name task queue until the preset frequency control restriction conditions are met.
[0054] For example, in order to avoid the crash of the content distribution network system, the task scheduling system usually controls the frequency of sending domain name configuration tasks. Figure 3 As shown in the figure, based on the frequency control algorithm with a fixed time window, the task delivery count is accumulated, and the task is delivered without triggering the frequency limit. After the target task queue is unlocked when the frequency limit is triggered, a new target task queue is re-determined. It should be noted that the cumulative task delivery count includes both successful and failed delivery.
[0055] In a possible manner, the domain name configuration task also includes a user identifier, and the preset frequency control restriction conditions include at least one of the following: within a first time window, the number of task issuances corresponding to the target domain name does not exceed a first preset number of times; within a second time window, the number of task issuances corresponding to the user identifier of the target configuration task does not exceed a second preset number of times; within a third time window, the total number of task issuances does not exceed a third preset number of times.
[0056] For example, Figure 2As shown, the task scheduling module can obtain different levels of frequency limiting conditions from the frequency limiting module. The frequency limiting module is used to configure and query global, user-level and domain-level frequency limiting conditions, which is convenient for controlling the frequency of task issuance and protecting the backend system. If the frequency limiting condition is empty, the default frequency limiting condition can be used, and this disclosure does not limit this.
[0057] For example, frequency limiting conditions of different levels may correspond to different ranges of task delivery limit times. For example, the number of task delivery times for the same domain name in the first time window may be controlled not to exceed the first preset number, the number of task delivery times for the same user ID in the second time window may not exceed the second preset number, and the total number of global task delivery times in the third time window may not exceed the third preset number. Generally speaking, the larger the range, the greater the number of restrictions, that is, when the duration of the first time window, the second time window, and the third time window is equal, the first preset number is less than the second preset number, and the second preset number is less than the third preset number. Of course, the duration of the first time window, the second time window, and the third time window may also be different, and the present disclosure does not limit this.
[0058] For example, assuming that the target task queue is the task queue corresponding to the domain name B under the user identifier A, the issuance count X1 of the domain name B in the first time window, the issuance count X2 of the user identifier A in the second time window, and the global issuance count X3 in the third time window are accumulated. Determine whether X1 exceeds the first preset number of times. If X1 exceeds the first preset number of times, unlock the target task queue and redefine a new target task queue. Otherwise, continue to determine whether X2 exceeds the second preset number of times. If X2 exceeds the second preset number of times, unlock the target task queue and redefine a new target task queue. Otherwise, continue to determine whether X3 exceeds the third preset number of times. If X3 exceeds the third preset number of times, unlock the target task queue and redefine a new target task queue. Otherwise, issue the task.
[0059] It should be noted that specific frequency control restriction conditions can be set according to needs, for example, global frequency control conditions can be set, and the present disclosure does not limit this.
[0060] In a possible manner, the task scheduling system of the content distribution network also includes a task issuing module; the task scheduling module is used to send a task issuing request to the task issuing module, and the task issuing request includes a target configuration task; the task issuing module is used to issue the target configuration task to the content distribution network system according to the task issuing request.
[0061] For example, Figure 2As shown, the task scheduling module can call the task issuing module to execute the issuing of the domain name configuration task of the content distribution network. The task issuing module receives the task issuing request triggered by the task scheduling module, executes the issuing action, and issues the domain name configuration task to the corresponding module. For example, the domain name configuration task is issued to the configuration pulling module of the content distribution network system. The configuration pulling module stores the domain name configuration task, and then each cache server pulls the domain name configuration task to perform domain name configuration. The configuration pulling module can be understood as the central server of the content distribution network system, which is used to manage each cache server, receive the domain name configuration task issued by the task scheduling system, and issue the domain name configuration task to the cache server. The scheduling task corresponding to the domain name configuration task can also be issued to the scheduling module of the content distribution network system. The scheduling task includes domain name configuration information and cache server information, which facilitates the scheduling center to schedule the user's access request to the optimal cache server according to the domain name configuration information and cache server information. The user here is the domain name access user.
[0062] For example, the task delivery module returns the task delivery result to the task scheduling module. When the task delivery is successful, the configuration status of the domain name corresponding to the target task queue can be updated to a successful status, and the target task queue can be unlocked to facilitate the delivery of the next domain name configuration task. When the task delivery fails, the task delivery result also includes delivery failure feedback information, such as the failure reason or corresponding failure flag of the delivery failure due to a network failure, etc., which is not limited in the present disclosure.
[0063] In a possible manner, the task scheduling module is also used to: respond to the received delivery failure feedback information, determine whether to re-issue the target configuration task according to the delivery failure feedback information; re-issue the target configuration task to the content distribution network system when it is determined to re-issue the target configuration task according to the delivery failure feedback information and the number of retries of the target configuration task is less than a preset number of times; mark the configuration status of the domain name corresponding to the target task queue as a failed status, and delete the target configuration task from the target task queue when it is determined not to re-issue the target configuration task or the number of retries of the target configuration task is greater than or equal to the preset number of times according to the delivery failure feedback information.
[0064] For example, Figure 3 As shown, whether to re-issue the target configuration task is determined based on the feedback information of the failed issuance. For example, if the task issuance fails due to a repairable fault, the task can be re-issued. If the task issuance fails due to an unrepairable fault or a fault that is difficult to repair in a short period of time, the task will not be re-issued. The number of retries of the target configuration task can also be recorded. If the number of retries does not exceed the limit, the task can be re-issued. Otherwise, the task will not be re-issued. The specific number can be determined according to the needs, and the present disclosure does not limit this.
[0065] For example, if it is determined that the task should be re-issued, the task can be re-issued directly, or the task can be re-issued after waiting for a period of time. For example, an exponential backoff algorithm can be executed, and as the number of retries increases, the waiting time also increases exponentially. The domain name queue can also be unlocked and wait for the next time the domain name queue is determined as the target domain name queue to re-issue the task, and so on. The present disclosure does not limit this. If it is determined not to re-issue the task, the configuration state of the domain name corresponding to the target task queue is updated to a failed state, and the target configuration task is deleted from the target task queue, and the target domain name queue is unlocked.
[0066] It is worth noting that a failure in task delivery may trigger an alarm to prompt the user or operator of the task scheduling system that the domain name configuration has failed.
[0067] In possible ways, such as Figure 2 As shown, the task scheduling system of the content distribution network also includes a status detection module, which is used to: obtain status information, the status information includes at least one of the generation status information of each domain name configuration task, the issuance status information, the queue status information of each domain name task queue and the resource occupancy information of each module, and the status information is used for visual display.
[0068] For example, the status detection module can receive the reported data generated by all other modules in the task scheduling system of the content distribution network, such as the generation status information of each domain name configuration task in the task generation module, the queuing status of each domain name configuration task in the domain name queue in the task storage module, the scheduling status of each domain name configuration task in the task scheduling module, the issuing status of each domain name configuration task in the task issuing module, and the resource occupancy information of each module, etc. The specific settings can be made according to the needs, and the present disclosure is not limited to this.
[0069] For example, the status detection module can also aggregate and analyze the reported data, store it, and visualize the reported data, and set alarm logic, such as displaying trend graphs such as task submission, processing, and queuing status, and triggering alarm prompts when abnormalities occur, so that operators can timely perceive the operating status and abnormal problems of the task scheduling system. In addition, the resource occupancy information of each module can provide a reference for capacity expansion, etc., which can be set according to needs, and the present disclosure does not limit this.
[0070] By adopting the above technical solution, under the condition of limited overall frequency control, the distributed decentralized execution scheduling algorithm can flexibly control multi-level fine-grained frequency limiting to protect the back-end system, realize priority scheduling of different users and different domain names, and relatively fairly schedule the domain name configuration tasks of all users to avoid starvation of a single user, thus ensuring good availability and performance of the system. In addition, each module in the task scheduling system of the content distribution network disclosed in the present invention can be deployed in multiple instances, and the modules are driven by messages, thereby improving the response speed and processing throughput of the system. In addition, the perfect status reporting logic also makes the system status observable, and the alarm facilitates timely detection of problems, and manual intervention can be introduced when necessary. Therefore, the task scheduling system of the content distribution network provided by the embodiment of the present disclosure has good reliability, scalability and task observability.
[0071] Based on the same inventive concept, the embodiment of the present disclosure provides a task scheduling method for a content distribution network, such as Figure 4 As shown, the task scheduling method includes: S401: storing the domain name configuration task into a domain name task queue according to the domain name in the domain name configuration task through a task storage module, wherein a domain name task queue is used to store domain name configuration tasks corresponding to the same domain name.
[0072] S402: The task scheduling module determines the target task queue according to the priority of the domain name corresponding to each domain name task queue, and sends the target configuration task in the target task queue to the content distribution network system, which is used to perform domain name configuration according to the sent domain name configuration task.
[0073] Optionally, the method further comprises: Determine domain name identification data according to the domain name and user identification in the domain name configuration task, wherein the domain name identification data is used to characterize the corresponding relationship between the domain name and the user identification; The task scheduling module determines the target task queue according to the priority of the domain name corresponding to each domain name task queue, including: Determining a target user identifier according to a first preset priority corresponding to each user identifier in the domain name identifier data; According to the second preset priority of the domain name corresponding to the target user identifier in the domain name identification data, a target domain name is determined, and the domain name task queue corresponding to the target domain name is determined as the target task queue.
[0074] Optionally, sending the target configuration task in the target task queue to a content distribution network system includes: When a preset frequency control restriction condition is met, sending the target configuration task in the target task queue to the content distribution network system; In the case where the preset frequency control restriction condition is not met, a new target task queue is determined according to the priority of the domain name corresponding to each domain name task queue until the preset frequency control restriction condition is met.
[0075] Optionally, the domain name configuration task further includes a user identifier, and the preset frequency control restriction condition includes at least one of the following: In the first time window, the number of times the task corresponding to the target domain name is issued does not exceed a first preset number; In the second time window, the number of task issuances corresponding to the user identifier of the target configuration task does not exceed a second preset number of times; In the third time window, the total number of task issuances does not exceed a third preset number of times.
[0076] Optionally, sending the target configuration task in the target task queue to a content distribution network system includes: Locking the target task queue; When the target task queue is locked successfully, the target configuration task in the target task queue is sent to the content distribution network system; In the case where the target task queue fails to be locked, a new target task queue is determined according to the priority of the domain name corresponding to each domain name task queue, and the new target task queue is locked until the new target task queue is successfully locked.
[0077] Optionally, the method further comprises: In response to the received delivery failure feedback information, judging whether to re-deliver the target configuration task according to the delivery failure feedback information; When it is determined to re-issue the target configuration task according to the feedback information of the failure to issue, and the number of retries of the target configuration task is less than a preset number, re-issuing the target configuration task to the content distribution network system; When it is determined according to the delivery failure feedback information that the target configuration task will not be re-issued or the number of retries of the target configuration task is greater than or equal to the preset number of times, the configuration status of the domain name corresponding to the target task queue is marked as a failure status, and the target configuration task is deleted from the target task queue.
[0078] Optionally, the method further comprises: In response to the received domain name configuration request, the task generation module generates the domain name configuration task according to the domain name configuration request, and stores each generated domain name configuration task in the candidate task queue; The task storage module stores the domain name configuration task into a domain name task queue according to the domain name in the domain name configuration task, including: For each domain name configuration task in the candidate task queue, the domain name configuration task is stored in the domain name task queue according to the domain name in the domain name configuration task.
[0079] Optionally, sending the target configuration task in the target task queue to a content distribution network system includes: Sending a task issuing request to the task issuing module through a task scheduling module, wherein the task issuing request includes the target configuration task; The target configuration task is sent to the content distribution network system through a task sending module according to the task sending request.
[0080] Optionally, the method further comprises: The status information is obtained through the status detection module, and the status information includes at least one of the generation status information and the delivery status information of each domain name configuration task, the queue status information of each domain name task queue, and the resource occupancy information of each module. The status information is used for visual display.
[0081] Optionally, the task storage module includes a plurality of task storage submodules, and the task storage module stores the domain name configuration task into a domain name task queue according to the domain name in the domain name configuration task, including: The multiple domain name configuration tasks are stored in corresponding domain name task queues respectively according to the domain names in the multiple domain name configuration tasks in parallel through multiple task storage submodules.
[0082] The task scheduling module includes a plurality of task scheduling submodules, and the task scheduling module determines the target task queue according to the priority of the domain name corresponding to each domain name task queue, and sends the target configuration task in the target task queue to the content distribution network system, including: The multiple task scheduling submodules determine multiple target task queues in parallel according to the priority of the domain name corresponding to each domain name task queue, and respectively send the target configuration tasks in the multiple target task queues in parallel to the content distribution network system.
[0083] By adopting the above method, under the condition of limited overall frequency control, the distributed decentralized execution scheduling algorithm can flexibly control multi-level fine-grained frequency limiting to protect the back-end system, realize priority scheduling of different users and different domain names, and relatively fairly schedule the domain name configuration tasks of all users to avoid starvation of a single user, thus ensuring good availability and performance of the system. In addition, each module in the task scheduling system disclosed in the present invention can be deployed in multiple instances, and the modules are driven by messages, thereby improving the response speed and processing throughput of the system. In addition, the perfect status reporting logic also makes the system status observable, and the alarm facilitates timely detection of problems, and manual intervention can be introduced when necessary. Therefore, the task scheduling system of the content distribution network provided by the embodiment of the present invention has good reliability, scalability and task observability.
[0084] Based on the same concept, the embodiment of the present disclosure also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processing device, it implements the steps executed by each module of the task scheduling system of the above-mentioned content distribution network or the steps of the task scheduling method of the content distribution network.
[0085] Based on the same concept, the present disclosure also provides an electronic device, which may include: a storage device having a computer program stored thereon; The processing device is used to execute the computer program in the storage device to implement the steps performed by each module of the task scheduling system of the content distribution network or the steps of the task scheduling method of the content distribution network.
[0086] Based on the same concept, an embodiment of the present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps executed by each module of the task scheduling system of the above-mentioned content distribution network or the steps of the task scheduling method of the content distribution network.
[0087] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0088] like Figure 5As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0089] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0090] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0091] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0092] In some embodiments, any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) can be used for communication, and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0093] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0094] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: stores the domain name configuration task into a domain name task queue according to the domain name in the domain name configuration task through a task storage module, wherein a domain name task queue is used to store domain name configuration tasks corresponding to the same domain name; determines a target task queue according to the priority of the domain name corresponding to each domain name task queue through a task scheduling module, and sends the target configuration task in the target task queue to a content distribution network system, wherein the content distribution network system is used to perform domain name configuration according to the sent domain name configuration task.
[0095] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0096] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.
[0098] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0099] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0100] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0101] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0102] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A task scheduling system for a content distribution network, characterized in that: The task scheduling system comprises: A task storage module, used to store the domain name configuration task into a domain name task queue according to the domain name in the domain name configuration task, wherein a domain name task queue is used to store domain name configuration tasks corresponding to the same domain name; The task scheduling module is used to determine the target task queue according to the priority of the domain name corresponding to each domain name task queue, and send the target configuration task in the target task queue to the content distribution network system, and the content distribution network system is used to perform domain name configuration according to the sent domain name configuration task.
2. The task scheduling system for a content distribution network according to claim 1, characterized in that: The task storage module is also used for: Determine domain name identification data according to the domain name and user identification in the domain name configuration task, wherein the domain name identification data is used to characterize the corresponding relationship between the domain name and the user identification; The task scheduling module is used to: Determining a target user identifier according to a first preset priority corresponding to each user identifier in the domain name identifier data; According to the second preset priority of the domain name corresponding to the target user identifier in the domain name identification data, a target domain name is determined, and the domain name task queue corresponding to the target domain name is determined as the target task queue.
3. The task scheduling system for a content distribution network according to claim 1, characterized in that: The task scheduling module is used to: When a preset frequency control restriction condition is met, sending the target configuration task in the target task queue to the content distribution network system; In the case where the preset frequency control restriction condition is not met, a new target task queue is determined according to the priority of the domain name corresponding to each domain name task queue until the preset frequency control restriction condition is met.
4. The task scheduling system for a content distribution network according to claim 3, characterized in that: The domain name configuration task also includes a user identifier, and the preset frequency control restriction condition includes at least one of the following: In the first time window, the number of times the task corresponding to the target domain name is issued does not exceed a first preset number; In the second time window, the number of task issuances corresponding to the user identifier of the target configuration task does not exceed a second preset number of times; In the third time window, the total number of task issuances does not exceed a third preset number of times.
5. The task scheduling system for a content distribution network according to claim 1, characterized in that: The task scheduling module is used to: Locking the target task queue; When the target task queue is locked successfully, the target configuration task in the target task queue is sent to the content distribution network system; In the case where the target task queue fails to be locked, a new target task queue is determined according to the priority of the domain name corresponding to each domain name task queue, and the new target task queue is locked until the new target task queue is successfully locked.
6. The task scheduling system for a content distribution network according to any one of claims 1 to 5, characterized in that: The task scheduling module is also used for: In response to the received delivery failure feedback information, judging whether to re-deliver the target configuration task according to the delivery failure feedback information; When it is determined to re-issue the target configuration task according to the feedback information of the failure to issue, and the number of retries of the target configuration task is less than a preset number, re-issuing the target configuration task to the content distribution network system; When it is determined according to the delivery failure feedback information that the target configuration task will not be re-issued or the number of retries of the target configuration task is greater than or equal to the preset number of times, the configuration status of the domain name corresponding to the target task queue is marked as a failure status, and the target configuration task is deleted from the target task queue.
7. The task scheduling system for a content distribution network according to any one of claims 1 to 5, characterized in that: The task scheduling system also includes a task generation module; The task generation module is used to respond to the received domain name configuration request, generate the domain name configuration task according to the domain name configuration request, and store each generated domain name configuration task in the candidate task queue; The task storage module is used for: For each domain name configuration task in the candidate task queue, the domain name configuration task is stored in the domain name task queue according to the domain name in the domain name configuration task.
8. The task scheduling system for a content distribution network according to any one of claims 1 to 5, characterized in that: The task scheduling system also includes a task issuing module; The task scheduling module is used to send a task issuing request to the task issuing module, wherein the task issuing request includes the target configuration task; The task issuing module is used to issue the target configuration task to the content distribution network system according to the task issuing request.
9. The task scheduling system for a content distribution network according to any one of claims 1 to 5, characterized in that: The task scheduling system further includes a state detection module, which is used to: State information is obtained, wherein the state information includes at least one of generation state information of each domain name configuration task, delivery state information, queue state information of each domain name task queue, and resource occupancy information of each module, and the state information is used for visual display.
10. The task scheduling system for a content distribution network according to any one of claims 1 to 5, characterized in that: The task storage module includes a plurality of task storage submodules, and the plurality of task storage submodules are used to store the plurality of domain name configuration tasks in parallel into corresponding domain name task queues according to the domain names in the plurality of domain name configuration tasks; The task scheduling module includes multiple task scheduling submodules, which are used to determine multiple target task queues in parallel according to the priority of the domain name corresponding to each domain name task queue, and respectively send the target configuration tasks in the multiple target task queues to the content distribution network system in parallel.
11. A task scheduling method for a content distribution network, characterized in that: The task scheduling method comprises: The task storage module stores the domain name configuration task into a domain name task queue according to the domain name in the domain name configuration task, wherein a domain name task queue is used to store domain name configuration tasks corresponding to the same domain name; The task scheduling module determines the target task queue according to the priority of the domain name corresponding to each domain name task queue, and sends the target configuration task in the target task queue to the content distribution network system, which is used to perform domain name configuration according to the sent domain name configuration task.
12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the program implements the steps performed by any module in the task scheduling system of the content distribution network described in any one of claims 1 to 10 or the steps of the task scheduling method of the content distribution network described in claim 11.
13. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, used to execute the computer program in the storage device to implement the steps performed by any module in the task scheduling system of the content distribution network described in any one of claims 1-10 or the steps of the task scheduling method of the content distribution network described in claim 11.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps performed by any module in the task scheduling system of the content distribution network described in any one of claims 1 to 10 or the steps of the task scheduling method of the content distribution network described in claim 11 are implemented.
Citation Information
Cited By
Prefetch task distribution method and device, computer equipment, readable storage medium and program product
CN121567662A