Configuration task distribution method and apparatus, and electronic device and storage medium
By splitting the task process and adopting appropriate issuance strategies according to the task category, the problem of low distribution efficiency of time-consuming tasks and public file tasks in the CDN system is solved, efficient resource utilization and file data security are achieved, and overall Issuing efficiency.
Patent Information
- Application Number
- PCT/CN2023/139636
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-29
- Filing Date
- 2023-12-18
- Publication Date
- 2024-12-05
AI Technical Summary
In CDN systems, the distribution efficiency of time-consuming tasks and public file tasks is low, resulting in insufficient utilization of system resources, and the risk of file data loss caused by rollback strategies when issuing files, affecting the overall efficiency.
Split the general task process into public file task processes, non-public file general task processes and non-public file time-consuming task processes. Use a single-process or multi-process issuance strategy according to the task category, and dynamically adjust the number of processes to optimize resource allocation and task execution. .
It realizes intelligent identification and efficient distribution of different tasks, avoids mutual overwriting and rollback between public files, and improves overall issuance efficiency and system resource utilization.
Smart Images

Figure CN2023139636_05122024_PF_FP_ABST
Abstract
Description
A configuration task distribution method, device, electronic device and storage medium Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a method, device, electronic device, and storage medium for distributing configuration tasks. Background Art
[0002] With the continuous development of CDN systems, the volume of configuration tasks being delivered has increased exponentially. Currently, for each CDN agent node, if there are time-consuming tasks in the queue, subsequent non-time-consuming tasks will remain in a queue and unexecuted. Furthermore, file delivery requires a rollback strategy if any command in the command set fails to execute. To prevent file data loss caused by overwriting or rollback of shared files, all tasks involving file delivery must be executed using a single process, resulting in reduced delivery efficiency. Therefore, the challenge currently being addressed is how to implement different delivery strategies based on different file characteristics to achieve efficient distribution of configuration tasks and efficient execution of command sets.
[0003] Summary of the Invention
[0004] In order to solve the above problems, embodiments of the present application provide a method, device, electronic device and storage medium for distributing configuration tasks.
[0005] In a first aspect, an embodiment of the present application provides a method for distributing configuration tasks, the method comprising:
[0006] Splitting the general task process to obtain at least three target task processes, the target task processes including a first target task process for issuing public files, a second target task process for issuing general tasks in non-public files, and a third target task process for issuing time-consuming tasks in non-public files;
[0007] Acquire a configuration task based on an agent node, and determine a task category of the configuration task, where the task category includes a public file task and a non-public file task;
[0008] For the configuration task whose task category is a public file task, the configuration task is issued to a single process based on the first target task process;
[0009] For the configuration task whose task category is a non-public file task, the configuration task without a time-consuming task tag is issued based on the second target task process, and the configuration task with the time-consuming task tag is issued based on the third target task process. The issuance methods of the second target task process and the third target task process include single-process issuance and multi-process issuance.
[0010] Preferably, the determining of the task category of the configuration task, wherein the task category includes public file tasks and non-public file tasks, includes:
[0011] Determining configuration information of the configuration task, matching the configuration information with preset public file configuration information, and determining a task category of the configuration task based on the matching result, wherein the public file configuration information includes at least one of file path regularization information, absolute path information, and file directory information;
[0012] When the configuration information matches the preset public file configuration information, the task category is a public file task;
[0013] When the configuration information does not match the preset public file configuration information, the task category is a non-public file task. Preferably, the method further includes:
[0014] For the configuration task obtained from the preset upper file path, the configuration task is issued based on multiple processes. Preferably, the default number of processes of the second target task process is at least two, and the default number of processes of the third target task process is at least two.
[0015] Preferably, there are at least four target task processes, and the target task process further includes a fourth target task process for performing task monitoring on the remaining target task processes, and the time-consuming task tag is marked in the path keyword of the configuration task;
[0016] The method further comprises:
[0017] Record the path keyword corresponding to the configuration task based on the fourth target task process;
[0018] For the path keywords without the time-consuming task label, calculate the average execution time of the first preset number of first target configuration tasks obtained next, and mark the time-consuming task label in the path keywords whose average execution time is higher than the preset threshold. The first target configuration task is the configuration task corresponding to the path keyword without the time-consuming task label.
[0019] Preferably, the method further comprises:
[0020] For the path keyword with the time-consuming task label, determine the task execution time of each of the second preset number of second target configuration tasks obtained next, and when the execution time of each task is lower than the preset threshold, remove the time-consuming task label of the path keyword, and the second target configuration task is the configuration task corresponding to the path keyword with the time-consuming task label.
[0021] Preferably, the method further comprises:
[0022] Based on the fourth target task process, the number of tasks issued per unit time of the target task process to be counted is counted respectively, and the real-time process number of the target task process to be counted is adjusted based on the number of tasks issued per unit time. The target task process to be counted includes the second target task process and the third target task process.
[0023] In a second aspect, an embodiment of the present application provides a configuration task distribution device, the device comprising:
[0024] a splitting module for splitting the general task process to obtain at least three target task processes, wherein the target task processes include a first target task process for issuing public files, a second target task process for issuing general tasks in non-public files, and a third target task process for issuing time-consuming tasks in non-public files;
[0025] An acquisition module, configured to acquire a configuration task based on an agent node and determine a task category of the configuration task, wherein the task category includes a public file task and a non-public file task;
[0026] a first distribution module, configured to distribute the configuration task whose task category is a public file task to a single process based on the first target task process;
[0027] The second distribution module is used to issue the configuration task without the time-consuming task tag based on the second target task process for the configuration task whose task category is a non-public file task, and to issue the configuration task with the time-consuming task tag based on the third target task process. The issuance methods of the second target task process and the third target task process include single-process issuance and multi-process issuance.
[0028] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the computer program, the steps of the method provided in the first aspect or any possible implementation of the first aspect are implemented.
[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect or any possible implementation of the first aspect.
[0030] The beneficial effects of the present invention are: 1. It realizes intelligent identification of time-consuming tasks and public file tasks, dynamically identifies public file tasks, time-consuming non-public file tasks and general non-public file tasks, and independently allocates and executes different tasks, so that general non-public file tasks will no longer be affected by the blocking of the previous time-consuming non-public file tasks, and can allocate system resources more efficiently and reasonably.
[0031] 2. Public file tasks are issued in a separate task process in a single-process manner, avoiding the loss of file data due to mutual overwriting or rollback between public files. It also enables non-public file tasks to be issued using multiple processes, further improving the overall issuance efficiency.
[0032] 3. Able to dynamically allocate and adjust the number of task processes for each target task process, maximize the utilization and allocation of system process resources, intelligently schedule, and efficiently execute distribution.
[0033] 4. Business parties can simultaneously set public file configuration information based on their own business, making the distribution method more flexible and free. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0035] FIG1 is a flow chart of a method for distributing configuration tasks provided in an embodiment of the present application;
[0036] FIG2 is a schematic diagram of the structure of a configuration task distribution device provided in an embodiment of the present application;
[0037] FIG3 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. In the following introduction, the terms "first" and "second" are only used for descriptive purposes and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments described. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, even though the embodiment may not be clearly described in the following text.
[0039] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the elements described without departing from the scope of the present application. Various examples may appropriately omit, replace, or add various processes or components. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted, or combined. In addition, features described in some examples may be combined in other examples.
[0040] Referring to Figure 1, Figure 1 is a flow chart of a method for distributing configuration tasks provided in an embodiment of the present application. In an embodiment of the present application, the method includes:
[0041] S101. Split the general task process to obtain at least three target task processes, wherein the target task processes include a first target task process for issuing public files, a second target task process for issuing general tasks in non-public files, and a third target task process for issuing time-consuming tasks in non-public files.
[0042] The execution subject of this application can be a CDN system, specifically, an agent system in a CDN. An agent can be regarded as an autonomous computing entity or program that can perceive the environment in a specific environment and can run flexibly and autonomously to achieve a series of design goals. Multiple agent nodes are set in the agent system.
[0043] In one embodiment of the present application, a conventional agent node uses a general task process when issuing configuration tasks. All configuration tasks will be issued and executed in the general task process according to the queue order. Since public file tasks may involve some public resources, if multiple tasks are issued simultaneously using a multi-process approach, it is possible that multiple tasks may involve the same public resource, thereby causing files to overlap with each other. It can be seen that the general task process can only issue tasks for a single process, which is low for the overall utilization rate of the general task process and is prone to further reducing the overall processing efficiency due to the processing of time-consuming tasks. Therefore, the present application considers splitting the general task process into at least three target task processes, with different target task processes processing different tasks respectively, so that configuration tasks of different categories can be processed simultaneously in each target task process, thereby improving the overall processing efficiency. Among them, the first target task process is used to issue public files, the second target task process is used to issue general tasks (i.e., tasks that are not time-consuming) in non-public files, and the third target task process is used to issue time-consuming tasks in non-public tasks.
[0044] S102: Acquire a configuration task based on an agent node and determine a task category of the configuration task, where the task category includes a public file task and a non-public file task.
[0045] In one embodiment of the present application, the agent system can obtain a configuration task based on the task pull mode of the agent node, and can determine the task category of the configuration task, that is, whether it is a public file task or a non-public file task, by parsing and identifying the task command set of the configuration task.
[0046] In one possible implementation, determining the task category of the configuration task, wherein the task category includes a public file task and a non-public file task, includes:
[0047] Determining configuration information of the configuration task, matching the configuration information with preset public file configuration information, and determining a task category of the configuration task based on the matching result, wherein the public file configuration information includes at least one of file path regularization information, absolute path information, and file directory information;
[0048] When the configuration information matches the preset public file configuration information, the task category is a public file task;
[0049] When the configuration information cannot match the preset public file configuration information, the task category is a non-public file task. In one embodiment of the present application, the configuration information can be parsed in the task command set of the configuration task, and the configuration information can be matched and compared with the preset public file configuration information. Since public files are obtained from public resources, their file directories are known. As long as the file directory corresponding to the configuration task can match the file directory corresponding to the public resource, the configuration task is considered to be a public file task, otherwise the configuration task is considered to be a non-public file task. Among them, the business party can freely choose the method used to judge the public file in the configuration information according to its actual situation and needs, that is, in addition to the file directory information, it can also choose the file path regular information or absolute path information to make a matching judgment, and can also choose a combination of the above multiple information to make multiple matching judgments.
[0050] S103: For the configuration task whose task category is a public file task, the configuration task is issued as a single process based on the first target task process.
[0051] In one embodiment of the present application, after determining that the task category of a configuration task is a public file task, the configuration task is assigned to the first target task process, which then issues the configuration task. Since the first target task process handles public file tasks, to avoid overlapping files, a single process is used for issuance, i.e., only one task is issued at a time.
[0052] S104. For the configuration task whose task category is a non-public file task, the configuration task without a time-consuming task tag is issued based on the second target task process, and the configuration task with the time-consuming task tag is issued based on the third target task process. The issuance method of the second target task process and the third target task process includes single-process issuance and multi-process issuance.
[0053] In one embodiment of the present application, after determining that the task category of the configuration task is a non-public file task, first determine whether the configuration task has a time-consuming task label. If there is a time-consuming task label, it means that this configuration task is a time-consuming task. The time-consuming task will be separated from the non-time-consuming general task and processed in the second target task process and the third target task process respectively, so that the processing of the time-consuming task will not take up the processing time of the general task. In addition, since the second target task process and the third target task process will not process the public file task, the problem of mutual coverage between files will not occur. Therefore, in addition to using a single process to issue, it is also possible to use multiple processes to issue, that is, to issue multiple configuration tasks at the same time, to improve overall processing efficiency. In actual situations, unless the number of tasks is very small, the configuration task will generally be issued in a way that multiple processes are given priority.
[0054] In one embodiment, the method further comprises:
[0055] For the configuration tasks obtained from the preset upper-level file path, the configuration tasks are issued based on multiple processes. In one embodiment of the present application, due to the actual business situation of the business party, the files under certain paths are all separate files, and public tasks will definitely not appear. For these paths, they can be preset as upper-level file paths, and the configuration tasks sent from the upper-level file paths will be directly identified as separate files, and then directly issued tasks to them through multiple processes, without the need for the public file judgment process, thereby improving task processing efficiency. Among them, the second target task process is generally selected to issue multi-process tasks.
[0056] In one possible implementation, the default number of processes of the second target task process is at least two, and the default number of processes of the third target task process is at least two.
[0057] In one embodiment of the present application, in order to enable the second target task process and the third target task process to be delivered in multiple processes, the default number of processes must be at least two, and four is optimal.
[0058] In one embodiment, there are at least four target task processes, and the target task processes further include a fourth target task process for performing task monitoring on the remaining target task processes, and the time-consuming task tag is marked in the path keyword of the configuration task;
[0059] The method further comprises:
[0060] Record the path keyword corresponding to the configuration task based on the fourth target task process;
[0061] For the path keywords without the time-consuming task label, calculate the average execution time of the first preset number of first target configuration tasks obtained next, and mark the time-consuming task label in the path keywords whose average execution time is higher than the preset threshold. The first target configuration task is the configuration task corresponding to the path keyword without the time-consuming task label.
[0062] In one embodiment of the present application, the time-consuming task label of a configuration task is generally set in its corresponding path keyword. If there is no time-consuming task label marked in the path keyword, it is considered that the configuration task is not a time-consuming task. However, due to the change of task data or the adjustment of business in actual conditions, a configuration task without a time-consuming task label may also become time-consuming, so it is necessary to monitor each configuration task through the fourth target task process. Specifically, a preset threshold value (such as 5s) is pre-set. If the execution time of a configuration task is greater than the preset threshold value, it is considered that the configuration task is time-consuming. As the business proceeds, configuration tasks of the same type, i.e., configuration tasks with the same path keyword, will also be obtained. The system will calculate the average value of the time spent on the execution of the first target configuration tasks of the first preset number (for example, 3) obtained next, i.e., the average execution time. If the average execution time is higher than the preset threshold value, it is confirmed that the configuration task corresponding to the path keyword has become a time-consuming task, and the path keyword will be marked with a time-consuming task label. Wherein, the path keyword can be determined according to artificial pre-set rules. For example, if the path of a configuration task is C:\Documents\Newsletters\Summer2018.pdf, you can use the third-level path, Newsletters, as the path keyword, or you can use the second and third-level paths, Documents\Newsletters, as the path keywords.
[0063] In one embodiment, the method further comprises:
[0064] For the path keyword with the time-consuming task label, determine the task execution time of each of the second preset number of second target configuration tasks obtained next, and when the execution time of each task is lower than the preset threshold, remove the time-consuming task label of the path keyword, and the second target configuration task is the configuration task corresponding to the path keyword with the time-consuming task label.
[0065] In one embodiment of the present application, similarly, for the configuration task corresponding to the path keyword with a time-consuming task label, it is also possible that it will become a non-time-consuming task over time. Therefore, the second target configuration tasks of the next second preset number (such as 3) will be obtained to determine their task execution time. If the task execution time of all tasks is lower than the preset threshold, it is considered that the configuration task under the path keyword is no longer time-consuming, and the time-consuming task label is removed for the path keyword.
[0066] In one embodiment, the method further comprises:
[0067] Based on the fourth target task process, the number of tasks issued per unit time of the target task process to be counted is counted respectively, and the real-time process number of the target task process to be counted is adjusted based on the number of tasks issued per unit time. The target task process to be counted includes the second target task process and the third target task process.
[0068] In one embodiment of the present application, based on the change in the number of tasks issued per unit time, the system can also dynamically adjust the real-time process numbers of the second target task process and the third target task process to ensure that the real-time process numbers corresponding to the second target task process and the third target task process can meet the current task allocation requirements, thereby improving the efficiency of task issuance. A comparison table can be pre-set, and each number of tasks issued per unit time is corresponding to a real-time process number. In actual situations, only the comparison table needs to be used to obtain the real-time process number of the target task process to be counted.
[0069] The following will describe in detail the configuration task distribution device provided by the embodiment of the present application in conjunction with Figure 2. It should be noted that the configuration task distribution device shown in Figure 2 is used to execute the method of the embodiment shown in Figure 1 of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the embodiment shown in Figure 1 of the present application.
[0070] Please refer to Figure 2, which is a schematic diagram of the structure of a configuration task distribution device provided in an embodiment of the present application. As shown in Figure 2, the device includes:
[0071] Splitting module 201, for splitting the general task process to obtain at least three target task processes, wherein the target task processes include a first target task process for issuing public files, a second target task process for issuing general tasks in non-public files, and a third target task process for issuing time-consuming tasks in non-public files;
[0072] An acquisition module 202 is configured to acquire a configuration task based on an agent node and determine a task category of the configuration task, where the task category includes a public file task and a non-public file task;
[0073] A first distribution module 203 is configured to distribute the configuration task, whose task category is a public file task, to a single process based on the first target task process;
[0074] The second distribution module 204 is used to distribute the configuration task with no time-consuming task tag based on the second target task process for the configuration task whose task category is a non-public file task, and to distribute the configuration task with the time-consuming task tag based on the third target task process. The distribution methods of the second target task process and the third target task process include single-process distribution and multi-process distribution.
[0075] In one embodiment, the acquisition module 202 includes:
[0076] a first determining unit, configured to determine configuration information of the configuration task, match the configuration information with preset public file configuration information, and determine a task category of the configuration task based on the matching result, wherein the public file configuration information includes at least one of file path regularization information, absolute path information, and file directory information;
[0077] a first judgment unit, configured to determine that, when the configuration information matches the preset public file configuration information, the task category is a public file task;
[0078] The second judgment unit is configured to determine that, when the configuration information does not match the preset public file configuration information, the task category is a non-public file task.
[0079] In one embodiment, the device further comprises:
[0080] The multi-process issuing module is used to issue the configuration task obtained from the preset upper-layer file path based on multiple processes.
[0081] In one possible implementation, the default number of processes of the second target task process is at least two, and the default number of processes of the third target task process is at least two.
[0082] In one embodiment, there are at least four target task processes, and the target task processes further include a fourth target task process for performing task monitoring on the remaining target task processes, and the time-consuming task tag is marked in the path keyword of the configuration task;
[0083] The device further comprises:
[0084] a recording module, configured to record the path keyword corresponding to the configuration task based on the fourth target task process;
[0085] The first statistical module is used to calculate the average execution time of a first preset number of first target configuration tasks obtained next for the path keyword without the time-consuming task label, and mark the time-consuming task label in the path keyword whose average execution time is higher than the preset threshold. The first target configuration task is the configuration task corresponding to the path keyword without the time-consuming task label.
[0086] In one embodiment, the device further comprises:
[0087] The second statistical module is used to determine the task execution time of each of the second preset number of second target configuration tasks obtained next for the path keyword with the time-consuming task label, and when the execution time of each of the tasks is lower than the preset threshold, remove the time-consuming task label of the path keyword. The second target configuration task is the configuration task corresponding to the path keyword with the time-consuming task label.
[0088] In one embodiment, the device further comprises:
[0089] The third statistical module is used to count the number of tasks issued per unit time of the target task process to be counted based on the fourth target task process, and adjust the real-time process number of the target task process to be counted based on the number of tasks issued per unit time. The target task process to be counted includes the second target task process and the third target task process.
[0090] Those skilled in the art will clearly understand that the technical solutions of the embodiments of the present application can be implemented with the help of software and / or hardware. "Unit" and "module" in this specification refer to software and / or hardware that can independently perform or cooperate with other components to perform specific functions, where the hardware can be, for example, a field programmable gate array (FPGA), an integrated circuit (IC), etc.
[0091] Each processing unit and / or module in the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.
[0092] Referring to Figure 3, which shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present application, the electronic device can be used to implement the method in the embodiment shown in Figure 1. As shown in Figure 3, the electronic device 300 may include: at least one central processing unit 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0093] The communication bus 302 is used to implement the connection and communication between these components.
[0094] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0095] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0096] The central processing unit 301 may include one or more processing cores. The central processing unit 301 utilizes various interfaces and circuits to connect various components within the entire electronic device 300. It executes instructions, programs, code sets, or instruction sets stored in the memory 305, and accesses data stored in the memory 305 to perform various functions and process data for the terminal 300. Optionally, the central processing unit 301 may be implemented using at least one hardware form factor selected from the group consisting of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The central processing unit 301 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content displayed on the display; and the modem handles wireless communications. It is understood that the modem may not be integrated into the central processing unit 301 and may be implemented as a separate chip.
[0097] Among them, the memory 305 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may also be at least one storage device located away from the aforementioned central processing unit 301. As shown in Figure 3, the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module and program instructions.
[0098] In the electronic device 300 shown in FIG3 , the user interface 303 is mainly used to provide an input interface for the user and obtain user input data; and the central processing unit 301 can be used to call the distribution application for the configuration task stored in the memory 305 and specifically perform the following operations:
[0099] Splitting the general task process to obtain at least three target task processes, the target task processes including a first target task process for issuing public files, a second target task process for issuing general tasks in non-public files, and a third target task process for issuing time-consuming tasks in non-public files;
[0100] Acquire a configuration task based on an agent node, and determine a task category of the configuration task, where the task category includes a public file task and a non-public file task;
[0101] For the configuration task whose task category is a public file task, the configuration task is issued to a single process based on the first target task process;
[0102] For the configuration task whose task category is a non-public file task, the configuration task without a time-consuming task tag is issued based on the second target task process, and the configuration task with the time-consuming task tag is issued based on the third target task process. The issuance methods of the second target task process and the third target task process include single-process issuance and multi-process issuance.
[0103] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above method. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0104] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0105] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0106] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0107] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0108] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0109] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0110] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0111] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure herein, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art that are not recorded in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for distributing configuration tasks, It is characterized in that The method comprises: Splitting the general task process to obtain at least three target task processes, wherein the target task processes include a first target task process for issuing public files, a second target task process for issuing general tasks in non-public files, and a third target task process for issuing time-consuming tasks in non-public files; Acquire the configuration task based on the agent node, and determine the task category of the configuration task, wherein the task category includes a public file task and a non-public file task; For the configuration task whose task category is a public file task, issuing the configuration task in a single process based on the first target task process; For the configuration task whose task category is a non-public file task, the configuration task without a time-consuming task tag is issued based on the second target task process, and the configuration task with the time-consuming task tag is issued based on the third target task process. The issuance methods of the second target task process and the third target task process include single-process issuance and multi-process issuance.
2. The method according to claim 1, It is characterized in that The determining of the task category of the configuration task, wherein the task category includes a public file task and a non-public file task, comprises: Determine configuration information of the configuration task, match the configuration information with preset public file configuration information, and determine the task category of the configuration task based on the matching result, wherein the public file configuration information includes at least one of file path regularization information, absolute path information, and file directory information; When the configuration information matches the preset public file configuration information, the task category is a public file task; When the configuration information cannot match the preset public file configuration information, the task category is a non-public file task.
3. The method according to claim 1, It is characterized in that The method further comprises: For the configuration task obtained from the preset upper-layer file path, the configuration task is issued based on multiple processes.
4. The method according to claim 1, It is characterized in that The default number of processes of the second target task process is at least two, and the default number of processes of the third target task process is at least two.
5. The method according to claim 1, It is characterized in that There are at least four target task processes, the target task processes further comprising a fourth target task process for performing task monitoring on the remaining target task processes, and the time-consuming task tag is marked in the path keyword of the configuration task; The method further comprises: Record the path keyword corresponding to the configuration task based on the fourth target task process; For the path keywords without the time-consuming task label, calculate the average execution time of each of the first preset number of first target configuration tasks acquired next, and mark the path keywords whose average execution time is higher than the preset threshold. Time-consuming task tag, the first target configuration task is a configuration task corresponding to a path keyword without the time-consuming task tag.
6. The method according to claim 5, It is characterized in that The method further comprises: For the path keyword with the time-consuming task label, determine the task execution time of each of the second preset number of second target configuration tasks to be obtained next, and when the execution time of each of the tasks is lower than the preset threshold, remove the time-consuming task label of the path keyword, and the second target configuration task is the configuration task corresponding to the path keyword with the time-consuming task label.
7. The method according to claim 5, It is characterized in that The method further comprises: Based on the fourth target task process, the number of tasks issued per unit time of the target task process to be counted is counted respectively, and the real-time process number of the target task process to be counted is adjusted based on the number of tasks issued per unit time. The target task process to be counted includes the second target task process and the third target task process.
8. A distribution device for configuring tasks, It is characterized in that The device comprises: A splitting module, used for splitting the general task process to obtain at least three target task processes, wherein the target task processes include a first target task process for issuing public files, a second target task process for issuing general tasks in non-public files, and a third target task process for issuing time-consuming tasks in non-public files; An acquisition module, used for acquiring a configuration task based on an agent node, and determining a task category of the configuration task, wherein the task category includes a public file task and a non-public file task; A first distribution module, configured to distribute the configuration task whose task category is a public file task to a single process based on the first target task process; The second distribution module is used to issue the configuration task without the time-consuming task tag based on the second target task process for the configuration task whose task category is a non-public file task, and to issue the configuration task with the time-consuming task tag based on the third target task process. The issuance methods of the second target task process and the third target task process include single-process issuance and multi-process issuance.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
CDN file distribution method and system
CN105847382A
Task request processing method and device, processor, terminal and server
CN109471710A
Task distribution method and device for financial system, electronic equipment and storage medium
CN109919417A
Configuration task distribution method and device, electronic equipment and storage medium
CN116339956A
Distributed dynamic system configuration
US8949305B1
