Task starting optimization method and server
By setting task types and identifying special processing identifiers, priority processing and pulling startup dependent data files is solved, and the problem of long loading time for massive file data is improved, and task startup speed and execution efficiency are improved.
Patent Information
- Application Number
- CN202410926547.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-11
AI Technical Summary
When the system starts a task, it takes a long time to load massive file data from a remote data source, resulting in slow task startup speed and significantly reduce execution efficiency and responsiveness.
By setting the task type and configuring the startup dependent data file, receiving and identifying special processing identifiers in the task execution file, we can create and pull the startup dependent data file to reduce data loading time and improve task startup speed.
Significantly reduce the data loading time when task starts, improve task startup speed and execution efficiency, optimize resource allocation, and avoid delaying system startup.
Smart Images

Figure CN118897700A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to an optimization method and a server for task initiation. Background Art
[0002] At present, the startup tasks of many systems generally rely on obtaining the data required for startup from external data sources. After all the data required for the startup task is pulled, the startup task is started for subsequent processing. However, this method has certain disadvantages. Specifically, when the system needs to load massive file data from a remote data source, data transmission takes a long time, and subsequent task processing can only be performed after all data transmission is completed, which greatly delays the startup speed of the task and significantly reduces the execution efficiency and responsiveness of the task. Therefore, there is an urgent need for an optimization method and server for task startup that can solve the above problems. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a task startup optimization method and a server, which can reduce the data loading time when the task is started, increase the task startup speed, and thus improve the overall task execution efficiency.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0005] A method for optimizing task startup includes the following steps:
[0006] S1. Set the task type and configure the startup dependent data file according to the task type;
[0007] S2, receiving and checking the task execution file, and if the task execution file carries a special processing identifier, generating a corresponding startup dependency data file according to the task type corresponding to the task execution file;
[0008] S3. In response to the execution instruction of the task corresponding to the task execution file, the startup dependent data file is preferentially pulled, and the task is started after the pulling is completed.
[0009] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0010] A task startup optimization server includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step of the above-mentioned task startup optimization method is implemented.
[0011] The beneficial effects of the present invention are as follows: the present invention provides an optimization method and a server for task startup, which accurately reflects actual needs, stores information necessary for execution, reduces storage costs, and lays a foundation for subsequent generation of startup dependency data files by setting task types and configuring startup dependency data files for them; receives and checks task execution files, and if the task execution files carry special processing identifiers, generates corresponding startup dependency data files according to the task types corresponding to the task execution files, thereby giving priority to processing task startup data files, improving overall processing efficiency, understanding basic data and resources required for task startup, optimizing resource allocation, and avoiding delays in system startup; responds to execution instructions of tasks corresponding to the task execution files, gives priority to pulling the startup dependency data files, and starts the task after the pulling is completed, and by giving priority to pulling startup data in this way, speeds up task startup items, significantly reduces data loading time when the task is started, and improves task startup speed, thereby improving task execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A flowchart of a method for optimizing task startup according to an embodiment of the present invention;
[0013] Figure 2 A schematic diagram of an optimization server for task initiation according to an embodiment of the present invention;
[0014] Description of labels:
[0015] 1. An optimized server for launching a task; 2. Memory; 3. Processor. DETAILED DESCRIPTION
[0016] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0017] Please refer to Figure 1 , an embodiment of the present invention provides a method for optimizing task startup, comprising the steps of:
[0018] S1. Set the task type and configure the startup dependent data file according to the task type;
[0019] S2, receiving and checking the task execution file, and if the task execution file carries a special processing identifier, generating a corresponding startup dependency data file according to the task type corresponding to the task execution file;
[0020] S3. In response to the execution instruction of the task corresponding to the task execution file, the startup dependent data file is preferentially pulled, and the task is started after the pulling is completed.
[0021] From the above description, it can be seen that the beneficial effects of the present invention are: by setting the task type and configuring the startup dependency data file for it, the actual needs are accurately reflected, the information necessary for execution is stored, the storage cost is reduced, and the foundation is laid for the subsequent generation of the startup dependency data file; receiving and viewing the task execution file, if the task execution file carries a special processing identifier, a corresponding startup dependency data file is generated according to the task type corresponding to the task execution file, thereby giving priority to processing the task startup data file, improving the overall processing efficiency, understanding the basic data and resources required for task startup, optimizing resource allocation, and avoiding delays in system startup; responding to the execution instruction of the task corresponding to the task execution file, giving priority to pulling the startup dependency data file, and starting the task after the pulling is completed. By this method of giving priority to pulling the startup data, the task startup item is accelerated, the data loading time when the task is started is significantly reduced, the task startup speed is increased, and the task execution efficiency is improved.
[0022] Furthermore, the receiving task execution file includes:
[0023] A task execution file generated by a client is received, wherein the client adds a special processing identifier to the task execution file.
[0024] From the above description, it can be seen that the client adds a special processing identifier to the task execution file, and the server quickly identifies and prioritizes the special processing identifier, generates a startup dependency data file, and improves processing efficiency.
[0025] Furthermore, the step of generating the corresponding startup dependency data file is specifically as follows:
[0026] Receive the task execution file and the special processing identifier, and based on the task type of the task execution file, preferentially query the startup dependency data file configured for the task type, and synchronously generate the startup dependency data file of the task corresponding to the task execution file by combining the information of the startup dependency data file and the task execution file.
[0027] From the above description, it can be seen that by preferentially querying the startup dependency data file configured for the task type and synchronously generating the startup dependency file, it can be ensured that all necessary dependency data for task startup are ready, thereby reducing the waiting time when the task starts and speeding up the task startup. At the same time, the startup dependency file is configured according to the task type to ensure the rational use of resources and avoid resource waste.
[0028] Furthermore, the startup dependent data file includes minimum metadata and data sets, and the minimum metadata and data sets are initialization parameters and a small part of business data required when the task is started.
[0029] From the above description, we can see that by preparing the initialization parameters and a small amount of business data required for task startup in advance, the task can quickly obtain the required information and avoid waiting and blocking at startup, thereby speeding up the task startup. In addition, resources are reasonably allocated according to the preset initialization parameters to ensure that the task receives the necessary support and improve resource utilization efficiency.
[0030] Furthermore, after the task is started, it also includes: executing an independent asynchronous thread to obtain a complete data file required to execute the task.
[0031] From the above description, it can be seen that by executing an independent asynchronous thread to obtain the complete data file required to execute the task, it can not only make full use of system resources and reduce the time overhead of thread switching and scheduling, thereby improving the throughput of task execution, but also avoid long waiting times, thereby reducing the use of CPU and memory, reducing system resource consumption, and thus improving task execution efficiency.
[0032] Please refer to Figure 2 Another embodiment of the present invention provides an optimization server for task initiation, including 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 initiation optimization method when executing the computer program.
[0033] The above-mentioned task startup optimization method and server of the present invention are suitable for reducing the data loading time of task startup, improving the task startup speed, and improving the overall task execution efficiency when the task is started. The following is an explanation through specific implementation methods:
[0034] Embodiment 1
[0035] Please refer to Figure 1 , a task start optimization method, comprising the steps of:
[0036] S1. Set the task type and configure the startup dependent data file according to the task type.
[0037] In this embodiment, task types are divided according to major task items, such as: counting personnel, counting the number of business on the day, counting the number of business on the month, etc. Each major task item has various sub-task items, and each major task item type has some common startup dependency data files. Configuring the corresponding startup dependency data files according to the task type can accurately reflect actual needs, store the information necessary for task execution, reduce storage costs, and lay the foundation for subsequent generation of startup dependency data files.
[0038] Furthermore, in this embodiment, the startup dependency data file is the minimum metadata and data set, which includes the initialization parameters required for task startup and a small amount of business data. By preparing the startup dependency data file in advance, the information required for task startup can be quickly obtained, avoiding waiting and blocking during startup, thereby speeding up the task startup. At the same time, resources are reasonably allocated according to the preset initialization parameters to ensure that the task receives the necessary support and improve resource utilization efficiency.
[0039] S2, receiving and checking the task execution file, and if the task execution file carries a special processing identifier, generating a corresponding startup dependency data file according to the task type corresponding to the task execution file;
[0040] In this 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 task execution file based on the special processing identifier, gives priority to the task startup data file, generates the corresponding startup dependency data file, and improves the processing efficiency.
[0041] Furthermore, the step of generating the corresponding startup dependency data file is specifically as follows: receiving the task execution file and the special processing identifier, and according to the task type of the task execution file, preferentially querying the startup dependency data file configured for the task type, and synchronously generating the startup dependency data file of the task corresponding to the task execution file based on the information of the startup dependency data file and the task execution file, ensuring that all necessary dependency data for task startup are ready, thereby reducing the waiting time when the task is started and speeding up the task startup.
[0042] S3. In response to the execution instruction of the task corresponding to the task execution file, the startup dependent data file is preferentially pulled, and the task is started after the pulling is completed.
[0043] In this embodiment, by giving priority to pulling startup dependent data files, the task startup items are accelerated, the data loading time when the task is started is significantly reduced, the task startup speed is increased, and thus the task execution efficiency is improved. After the task is successfully started, further, an independent asynchronous thread is executed to obtain the complete data files required to execute the task.
[0044] For example, to count the number of clicks of a group of people in a week, after the task is started, it is necessary to execute an asynchronous thread to obtain the user number list information and original click information of this group of people, ensure the real-time reception of the data file stream, and perform subsequent task processing. By using asynchronous threads to obtain the complete data file required to execute the task, it can fully utilize system resources, reduce the time overhead of thread switching and scheduling, thereby improving the throughput of task execution, and avoid long waiting times, thereby reducing the use of CPU and memory, reducing system resource consumption, and thus improving task execution efficiency.
[0045] In this way, when the task has been successfully started, since there is another asynchronous thread that synchronously pulls the real data file, it can receive the data file stream in real time for subsequent task processing. Therefore, when the task is started, there is no need to wait for the entire file to be downloaded, which greatly improves the overall task execution efficiency.
[0046] Embodiment 2
[0047] Please refer to Figure 2 A task startup optimization server 1 includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, each step of a task startup optimization method of embodiment 1 is implemented.
[0048] In summary, the present invention provides an optimization method and server for task startup, which accurately reflects actual needs, stores information necessary for execution, reduces storage costs, and lays a foundation for subsequent generation of startup dependency data files by setting task types and configuring startup dependency data files for them; the startup dependency data files are minimum metadata and data sets, which include initialization parameters required for task startup and a small portion of business data, and can quickly obtain information required for task execution, avoid waiting and blocking at startup, and speed up task startup; receive and view task execution files, if the task execution file carries a special processing identifier, then according to the task type of the task execution file, give priority to querying the startup dependency data file configured for the task type, and combine the startup dependency data file and the information of the task execution file to query the startup dependency data file. The task execution file is used to synchronously generate the startup dependent data file of the task corresponding to the task, and by identifying the special processing identifier, the data file for task startup is processed preferentially, thereby improving the overall processing efficiency, understanding the basic data and resources required for task startup, optimizing resource allocation, and avoiding delaying system startup; in response to the execution instruction of the task corresponding to the task execution file, the startup dependent data file is pulled preferentially, and the task is started after the pulling is completed. By pulling the startup data preferentially in this way, the task startup items are accelerated, the data loading time at task startup is significantly reduced, the task startup speed is increased, and thus the task execution efficiency is improved; after the task is started, an independent asynchronous thread is executed to obtain the complete data file required to execute the task, thereby avoiding long waiting times, thereby reducing the use of CPU and memory, reducing system resource consumption, and thus improving the task execution efficiency.
[0049] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A task startup optimization method, characterized in that: Includes steps: S1. Set the task type and configure the startup dependent data file according to the task type; S2, receiving and checking the task execution file, and if the task execution file carries a special processing identifier, generating a corresponding startup dependency data file according to the task type corresponding to the task execution file; S3. In response to the execution instruction of the task corresponding to the task execution file, the startup dependent data file is preferentially pulled, and the task is started after the pulling is completed.
2. The method for optimizing task startup according to claim 1, characterized in that: The receiving task execution file includes: A task execution file generated by a client is received, wherein the client adds a special processing identifier to the task execution file.
3. The method for optimizing task startup according to claim 1, characterized in that: The steps of generating the corresponding startup dependency data file are specifically as follows: Receive the task execution file and the special processing identifier, and based on the task type of the task execution file, preferentially query the startup dependency data file configured for the task type, and synchronously generate the startup dependency data file of the task corresponding to the task execution file by combining the information of the startup dependency data file and the task execution file.
4. The method for optimizing task startup according to claim 1, characterized in that: The startup dependent data file includes minimum metadata and data sets, and the minimum metadata and data sets are initialization parameters and a small part of business data required when the task is started.
5. The method for optimizing task startup according to claim 1, characterized in that: After the task is started, the process also includes: executing an independent asynchronous thread to obtain a complete data file required to execute the task.
6. A task-initiated optimization server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: S1. Set the task type and configure the startup dependent data file according to the task type; S2, receiving and checking the task execution file, and if the task execution file carries a special processing identifier, generating a corresponding startup dependency data file according to the task type corresponding to the task execution file; S3. In response to the execution instruction of the task corresponding to the task execution file, the startup dependent data file is preferentially pulled, and the task is started after the pulling is completed.
7. The task start optimization server according to claim 6, characterized in that: The receiving task execution file includes: A task execution file generated by a client is received, wherein the client adds a special processing identifier to the task execution file.
8. The task start optimization server according to claim 6, characterized in that: The steps of generating the corresponding startup dependency data file are specifically as follows: Receive the task execution file and the special processing identifier, and based on the task type of the task execution file, preferentially query the startup dependency data file configured for the task type, and synchronously generate the startup dependency data file of the task corresponding to the task execution file by combining the information of the startup dependency data file and the task execution file.
9. The task start optimization server according to claim 6, characterized in that: The startup dependent data file includes minimum metadata and data sets, and the minimum metadata and data sets are initialization parameters and a small part of business data required when the task is started.
10. The task start optimization server according to claim 6, characterized in that: After the task is started, the process also includes: executing an independent asynchronous thread to obtain a complete data file required to execute the task.
Citation Information
Patent Citations
Version releasing method and device based on multi-environment offline task
CA3159788A1
Data synchronization method and device, electronic equipment and computer readable storage medium
CN116150236A
Container group template dynamic generation method and device, electronic equipment and storage medium
CN117331645A
Application cold start task management method, device and system
CN117648165A
Big data platform task management method and system
CN118034887A
Cited By
Data transmission order preserving method and device, chip and medium
CN120104380A
