Method and server for optimizing task initiation
By configuring task types and identifying task execution files with special identifiers, priority is given to processing and fetching startup dependency data, and asynchronous threads are used to obtain complete data, thus solving the problem of slow task startup speed and improving task execution efficiency.
Patent Information
- Application Number
- CN202410926547.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-07-11
AI Technical Summary
In existing technologies, when a system loads massive amounts of file data from a remote data source, the data transmission takes a long time, resulting in slow task startup and reduced execution efficiency.
By setting task types and configuring startup dependency data files, the system receives and identifies task execution files with special processing identifiers, prioritizes the generation and retrieval of startup dependency data files, and utilizes asynchronous threads to obtain complete data, thereby reducing task startup waiting time.
Significantly reduces data loading time during task startup, improves task startup speed and overall execution efficiency, optimizes resource allocation, and avoids system latency.
Smart Images

Figure CN118897700B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data transmission, in particular to a task starting optimization method and a server. BACKGROUND
[0002] At present, the starting tasks of many systems generally depend on obtaining the data required for starting from external data sources. After all the data required for starting tasks is pulled, the subsequent processing is started. However, this method has certain disadvantages. Specifically, when the system needs to load massive file data from a remote data source, the data transmission takes a long time, and only after the completion of the data transmission, the subsequent task processing can be performed, which greatly delays the starting speed of the task and significantly reduces the execution efficiency and response ability of the task. Therefore, there is an urgent need for a task starting optimization method and a server that can solve the above problems. SUMMARY
[0003] The technical problem to be solved by the present application is to provide a task starting optimization method and a server, which can reduce the data loading time during task starting, improve the task starting speed, and thus improve the overall task execution efficiency.
[0004] To solve the above technical problems, the technical scheme adopted by the present application is:
[0005] A task starting optimization method, comprising the steps of:
[0006] S1, setting a task type, and configuring a starting dependent data file according to the task type;
[0007] S2, receiving and checking a task execution file, and if the task execution file carries a special processing identifier, generating a corresponding starting dependent data file according to the task type corresponding to the task execution file;
[0008] S3, in response to an execution instruction of the task corresponding to the task execution file, preferentially pulling the starting dependent data file, and starting the task after the pulling is completed.
[0009] To solve the above technical problems, another technical scheme adopted by the present application is:
[0010] A task starting optimization server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements each step of the above-mentioned task starting optimization method when executing the computer program.
[0011] The application has the beneficial effects that: the application provides an optimization method and a server for task starting, sets a task type and configures a starting dependent data file for the task type, accurately reflects actual requirements, stores necessary information for execution, reduces storage cost, lays a foundation for subsequent generation of starting dependent data files, receives and checks a task execution file, if the task execution file carries a special processing identifier, generates a corresponding starting dependent data file according to a task type corresponding to the task execution file, thus preferentially processing data files for task starting, improving overall processing efficiency, understanding basic data and resources required for task starting, optimizing resource allocation, and avoiding delay of system starting, in response to an execution instruction of a task corresponding to the task execution file, preferentially pulling the starting dependent data file, and starting the task after pulling is completed, through the way of preferentially pulling starting data, task starting items are accelerated, data loading time during task starting is significantly reduced, task starting speed is improved, and thus task execution efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 A flowchart of an optimization method for task starting according to an embodiment of the application;
[0013] Figure 2 A schematic diagram of an optimization server for task starting according to an embodiment of the application;
[0014] Label explanation:
[0015] 1. An optimization server for task starting; 2. A memory; 3. A processor. DETAILED DESCRIPTION
[0016] To explain the technical content, the achieved purposes and effects of the application in detail, the following is explained in combination with embodiments and the accompanying drawings.
[0017] Please refer to Figure 1 The embodiment of the application provides an optimization method for task starting, including the following steps:
[0018] S1, setting a task type, and configuring a starting dependent data file according to the task type;
[0019] S2, receiving and checking a task execution file, if the task execution file carries a special processing identifier, generating a corresponding starting dependent data file according to a task type corresponding to the task execution file;
[0020] S3, in response to an execution instruction of a task corresponding to the task execution file, preferentially pulling the starting dependent data file, and starting the task after pulling is completed.
[0021] From the above description, the beneficial effects of the present application are that: by setting the task type and configuring the start dependency data file, the actual demand is accurately reflected, the necessary information for execution is stored, the storage cost is reduced, the foundation for subsequent generation of start dependency data file is laid; receiving and viewing the task execution file, if the task execution file carries a special processing identifier, the corresponding start dependency data file is generated according to the task type corresponding to the task execution file, so as to preferentially process the data file of task start, improve the overall processing efficiency, understand the basic data and resources required for task start, optimize resource allocation, and avoid delay system start; in response to the execution instruction of the task corresponding to the task execution file, the start dependency data file is preferentially pulled, and the task is started after the pulling is completed, by the way of preferentially pulling the start data, the task start item is accelerated, the data loading time during task start is significantly reduced, and the task start speed is improved, so as to improve the task execution efficiency.
[0022] Further, the receiving task execution file comprises:
[0023] Receiving the task execution file generated by the client, wherein the client adds a special processing identifier to the task execution file.
[0024] From the above description, the client adds a special processing identifier to the task execution file, the server quickly identifies according to the special processing identifier, preferentially processes, generates a start dependency data file, and improves the processing efficiency.
[0025] Further, the step of generating the corresponding start dependency data file specifically comprises:
[0026] Receiving the task execution file and the special processing identifier, preferentially querying the start dependency data file configured for the task type according to the task type of the task execution file, and synchronously generating the start dependency data file of the task corresponding to the task execution file in combination with the information of the start dependency data file and the task execution file.
[0027] From the above description, by preferentially querying the start dependency data file configured for the task type and synchronously generating the start dependency file, it can be ensured that all necessary dependency data for task start is ready, so as to reduce the waiting time during task start and accelerate the task start speed, and at the same time, the start dependency file is configured according to the task type, so as to ensure reasonable use of resources and avoid waste of resources.
[0028] Further, the start dependency data file comprises minimum metadata and a data set, and the minimum metadata and the data set are initialization parameters and a small part of business data required for task start.
[0029] As can be seen from the above description, by preparing the initialization parameters and a small amount of business data required when starting the task in advance, the task can quickly obtain the required information, avoid waiting and blocking when starting, thereby accelerating the starting speed of the task, in addition, the resources are reasonably allocated according to the preset initialization parameters, necessary support is ensured for the task, and the resource utilization efficiency is improved.
[0030] Further, the task starting further comprises: executing an independent asynchronous thread to obtain a complete data file required for executing the task.
[0031] As can be seen from the above description, by executing an independent asynchronous thread to obtain a complete data file required for executing the task, system resources can be fully utilized, time overhead of thread switching and scheduling is reduced, thereby improving the throughput of task execution, long waiting time can be avoided, thereby reducing the use of CPU and memory, reducing system resource consumption, and further improving the efficiency of task execution.
[0032] Please refer to Figure 2 The application further provides an optimization server for task starting, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements each step of the above-mentioned optimization method for task starting when executing the computer program.
[0033] The above-mentioned optimization method for task starting and the server are suitable for reducing the data loading time of task starting, improving the starting speed of the task, and improving the overall task execution efficiency, which will be described below through specific embodiments.
[0034] Embodiment one
[0035] Please refer to Figure 1 An optimization method for task starting, comprising the steps of:
[0036] S1, setting a task type, and configuring a starting dependent data file according to the task type.
[0037] In this embodiment, the task type is divided according to the task major, such as tasks of counting personnel, counting the number of businesses on the same day, counting the number of businesses in the same month, etc., and each task major exists various task minors, and each task major type exists a part of common starting dependent data files, the corresponding starting dependent data files are configured according to the task type, the actual demand can be accurately reflected, the information required for task execution is stored, the storage cost is reduced, and a foundation is laid for subsequent generation of starting dependent data files.
[0038] Further, in the embodiment, the start dependent data file is the minimum metadata and data set, which includes initialization parameters and a small amount of business data required when starting the task. By preparing the start dependent data file in advance, the information required for starting the task can be quickly obtained, and waiting and blocking during starting can be avoided, so as to speed up the starting speed of the task. Meanwhile, according to the preset initialization parameters, resources can be reasonably allocated, the task can be ensured to be supported, and the resource utilization efficiency can be improved.
[0039] S2, receiving and viewing the task execution file, if the task execution file carries a special processing identifier, generating a corresponding start dependent data file according to the task type corresponding to the task execution file;
[0040] In the embodiment, the server receives the task execution file generated by the client, the client adds a special processing identifier to the task execution file, the server quickly identifies the special processing identifier, preferentially processes the data file of task starting, generates a corresponding start dependent data file, and improves the processing efficiency.
[0041] Further, the step of generating a corresponding start dependent data file specifically includes the following steps: receiving the task execution file and the special processing identifier, preferentially querying the start dependent data file configured according to the task type of the task execution file, and synchronously generating the start dependent data file of the task corresponding to the task execution file according to the information of the start dependent data file and the task execution file, so as to ensure that all necessary dependent data of the task are ready, thereby reducing the waiting time during task starting and speeding up the starting speed of the task.
[0042] S3, in response to the execution instruction of the task corresponding to the task execution file, preferentially pulling the start dependent data file, and starting the task after the pulling is completed.
[0043] In the embodiment, by preferentially pulling the start dependent data file, the starting speed of the task is accelerated, the data loading time during task starting is significantly reduced, the starting speed of the task is improved, and the execution efficiency of the task is improved. After the task is successfully started, further, an independent asynchronous thread is executed to obtain complete data files required for executing the task.
[0044] For example, to count the click amount of a batch of people in a week, after the task is started, an asynchronous thread is needed to obtain the user number list information and the click original information of the batch of people, to ensure real-time receiving of data file stream for subsequent task processing. The complete data file required for task execution is obtained through the asynchronous thread, which can fully utilize system resources, reduce thread switching and scheduling time overhead, thereby improving the throughput of task execution, and can also avoid long waiting time, thereby reducing the use of CPU and memory, reducing system resource consumption, and further improving the efficiency of task execution.
[0045] In this way, after the task has been successfully started, since there is another asynchronous thread to synchronously pull the real data file, the data file stream can be received in real time for subsequent task processing, so the task does not need to wait for the entire file to be downloaded before starting, which greatly improves the overall task execution efficiency.
[0046] Embodiment Two
[0047] Please refer to Figure 2 An optimized server 1 for task starting, comprising a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, wherein the processor 3 implements each step of the optimized method for task starting of embodiment one when executing the computer program.
[0048] In summary, the application provides an optimization method and a server for task starting, which sets a task type and configures a starting dependent data file for the task type, accurately reflects actual requirements, stores necessary information for execution, reduces storage cost, and lays a foundation for subsequent generation of starting dependent data files; the starting dependent data file is minimum metadata and a data set, the minimum metadata and the data set include initialization parameters and a small part of business data required when starting the task, information required for task execution can be quickly obtained, waiting and blocking during starting are avoided, and the starting speed of the task is accelerated; a task execution file is received and viewed, if the task execution file carries a special processing identifier, starting dependent data files of the task corresponding to the task execution file are synchronously generated according to a task type of the task execution file, the starting dependent data files of the task type that have been configured are preferentially queried, and information of the starting dependent data files and the task execution file are combined, through identification of the special processing identifier, data files for starting the task are preferentially processed, overall processing efficiency is improved, basic data and resources required for starting the task are understood, resource allocation is optimized, and delay of system starting is avoided; in response to an execution instruction of the task corresponding to the task execution file, the starting dependent data files are preferentially pulled, and the task is started after the pulling is completed, through the starting data pulling manner, the starting item of the task is accelerated, data loading time during starting of the task is significantly reduced, the starting speed of the task is improved, and task execution efficiency is improved; after the task is started, an independent asynchronous thread is executed to obtain complete data files required for executing the task, long-time waiting is avoided, and thus use of CPU and memory is reduced, system resource consumption is reduced, and task execution efficiency is further improved.
[0049] The above only describes embodiments of the application, and does not limit the patent scope of the application, any equivalent transformation or direct or indirect application in related technical fields by using the content of the specification and drawings of the application are also included in the patent protection scope of the application.
Claims
1. A method for optimizing task initiation, characterized by, The method comprises the steps of: S1, setting a task type, and configuring a start dependent data file according to the task type; S2, receiving and checking a task execution file, and if the task execution file carries a special processing identifier, generating a corresponding start dependent data file according to a task type corresponding to the task execution file; S3, in response to an execution instruction of a task corresponding to the task execution file, preferentially pulling the start dependent data file, and starting the task after the pulling is completed; The step of generating the corresponding start dependent data file specifically comprises: receiving the task execution file and the special processing identifier, preferentially querying a start dependent data file configured for the task type according to a task type of the task execution file, and synchronously generating a start dependent data file of the task corresponding to the task execution file in combination with the start dependent data file and information of the task execution file; The start dependent data file comprises minimum metadata and a data set, and the minimum metadata and the data set are initialization parameters and a small part of business data required when the task is started; After the task is started, an independent asynchronous thread is further executed to obtain a complete data file required for executing the task.
2. The method of claim 1, wherein, The method for receiving a task execution file comprises: receiving a task execution file generated by a client, wherein the client adds a special processing identifier to the task execution file.
3. An optimized service broker for task initiation, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The processor implements the following steps when executing the computer program: S1, setting a task type, and configuring a start dependent data file according to the task type; S2, receiving and checking a task execution file, and if the task execution file carries a special processing identifier, generating a corresponding start dependent data file according to a task type corresponding to the task execution file; S3, in response to an execution instruction of a task corresponding to the task execution file, preferentially pulling the start dependent data file, and starting the task after the pulling is completed; The step of generating the corresponding start dependent data file specifically comprises: receiving the task execution file and the special processing identifier, preferentially querying a start dependent data file configured for the task type according to a task type of the task execution file, and synchronously generating a start dependent data file of the task corresponding to the task execution file in combination with the start dependent data file and information of the task execution file; The start dependent data file comprises minimum metadata and a data set, and the minimum metadata and the data set are initialization parameters and a small part of business data required when the task is started; After the task is started, an independent asynchronous thread is further executed to obtain a complete data file required for executing the task.
4. The task initiated optimization server of claim 3, wherein, The method for receiving a task execution file comprises: receiving a task execution file generated by a client, wherein the client adds a special processing identifier to the task execution file.
Citation Information
Patent Citations
Version releasing method and device based on multi-environment offline task
CA3159788A1
Application cold start task management method, device and system
CN117648165A