CN113934731A - Task execution method and device, storage medium and electronic equipment - Google Patents

Task execution method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113934731A
CN113934731A CN202111306892.4A CN202111306892A CN113934731A CN 113934731 A CN113934731 A CN 113934731A CN 202111306892 A CN202111306892 A CN 202111306892A CN 113934731 A CN113934731 A CN 113934731A
Authority
CN
China
Prior art keywords
data
task
executed
queue
primary key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111306892.4A
Other languages
Chinese (zh)
Inventor
杨锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yancheng Tianyanchawei Technology Co ltd
Original Assignee
Yancheng Jindi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yancheng Jindi Technology Co Ltd filed Critical Yancheng Jindi Technology Co Ltd
Priority to CN202111306892.4A priority Critical patent/CN113934731A/en
Publication of CN113934731A publication Critical patent/CN113934731A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2272Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to a task execution method, a task execution device, a storage medium and electronic equipment, and solves the technical problem that in the related technology, the database is crashed due to the fact that data information is called to cause large database pressure. The method comprises the following steps: polling a data queue of a first database according to a task to be executed to acquire a data primary key corresponding to the task to be executed; inquiring a second database according to the data main key to acquire data information corresponding to the task to be executed, wherein the second database is used for storing the data main key of the task and the data information corresponding to each data main key; and calling the data information to execute the task logic of the task to be executed. The data queues in the method are a plurality of queues with different priorities, each queue is used for storing a data primary key corresponding to a task corresponding to the priority of the queue, the tasks are divided according to the priority and stored according to the priority of the tasks, and pressure of the database is reduced when the database is polled conveniently.

Description

Task execution method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of data call technologies, and in particular, to a task execution method and apparatus, a storage medium, and an electronic device.
Background
With the arrival of the information era, information exponentially increases, asynchronous tasks are often used in actual production and development, and data information of tasks to be executed is obtained in a mode of continuously polling a database in the execution process of the asynchronous tasks, so that the database is high in pressure, and the database is easy to crash.
Disclosure of Invention
The purpose of the disclosure is to provide a task execution method, a task execution device, a storage medium and an electronic device, which solve the technical problem of database crash caused by large database pressure due to data information calling in the related art.
To achieve the above object, in a first aspect, the present disclosure provides a task execution method, including:
polling a data queue of a first database according to a task to be executed to acquire a data primary key corresponding to the task to be executed;
inquiring a second database according to the data main key to acquire data information corresponding to the task to be executed, wherein the second database is used for storing the data main key of the task and the data information corresponding to each data main key;
and calling the data information to execute the task logic of the task to be executed.
Optionally, the data queue is a plurality of queues with different priorities, and each of the queues is used to store a data primary key corresponding to a task corresponding to the priority of the queue.
Optionally, the polling the data queue of the first database according to the task to be executed to obtain the data primary key corresponding to the task to be executed includes:
polling the data queues from high to low according to the priorities of the queues in the data queues, and judging whether the data queues store the data primary keys of the tasks to be executed or not;
and under the condition that the data primary key is stored in the data queue, acquiring the data primary key from the data queue.
Optionally, in a case that the data primary key is stored in the data queue, acquiring the data primary key from the data queue includes:
and under the condition that the data primary key is stored in the data queue, moving the data primary key from the data queue to a work queue, wherein the work queue is a pre-established empty queue.
Optionally, the method further comprises:
after the data primary key corresponding to the task to be executed is obtained, if an abnormal condition interrupting the execution of the task occurs, scanning the work queue, and judging whether the data primary key is stored in the work queue;
and under the condition that the data primary key is stored in the work queue, adding the data primary key into a queue with the highest priority in the data queue, and clearing the data primary key in the work queue.
Optionally, the method further comprises: and deleting the data primary key in the work queue after the task logic of the task to be executed is executed according to the data information.
Optionally, the method further comprises: and after the task logic of the task to be executed is executed according to the data information, changing the state of the task to be executed into the executed state according to the data primary key.
In a second aspect, the present disclosure provides a task execution device, the device comprising:
the acquisition module is configured to poll a data queue of a first database according to a task to be executed so as to acquire a data primary key corresponding to the task to be executed;
the execution module is configured to query a second database according to the data primary keys and acquire data information corresponding to the task to be executed, wherein the second database is used for storing the data primary keys of the task and the data information corresponding to each data primary key;
and the control module is configured to call the data information to execute the task logic of the task to be executed.
In a third aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the task execution method described above
In a fourth aspect, the present disclosure provides an electronic device comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the task execution method described above.
According to the technical scheme, the data main keys of the tasks are independently stored in the first database, the data main keys of the tasks and the data information corresponding to the data main keys are stored in the second database, and the data information corresponding to the task main keys is inquired in the second database through the data main keys of the tasks to be executed, so that the data information is called to execute the task logic of the tasks to be executed, and the tasks are executed. The pressure of the database is effectively reduced, and the database is prevented from being crashed.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow diagram illustrating a method of task execution in accordance with an exemplary embodiment;
FIG. 2 is a block diagram illustrating a method of task execution in accordance with an exemplary embodiment;
FIG. 3 is a block diagram illustrating a compensation mechanism for a method of task execution in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating a task performance device in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure.
It should be noted that in the present disclosure, the terms "S101", "S102" and the like in the description and claims and the drawings are used for distinguishing the steps, and are not necessarily to be construed as performing the method steps in a specific order or sequence.
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
As the background art, in the related art, in the process of executing an asynchronous task, data information of a task to be executed is obtained by continuously polling a database, so that the pressure of the database is increased, and the database is crashed.
In view of this, the present disclosure provides a task execution method, device, storage medium, and electronic device, in which a storage manner of data in a database is changed, a data primary key of a task is separately stored in a first database, the data primary key of the task and data information corresponding to the data primary key are stored in a second database, the first database is polled to obtain the data primary key of the task to be executed, and the data information corresponding to the task to be executed is queried in the second database according to the data primary key, so that a task logic of the task to be executed is executed by calling the data information, thereby completing execution of the task, effectively reducing pressure on the database, and avoiding database crash.
Fig. 1 is a flowchart illustrating a task execution method, which may be implemented by JAVA, C + +, or the like, according to an example embodiment. The method comprises the following steps:
in step S101, the data queue of the first database is polled according to the task to be executed to obtain the data primary key corresponding to the task to be executed.
In step S102, a second database is queried according to the data primary key to obtain data information corresponding to the task to be executed, where the second database is used to store the data primary key of the task and the data information corresponding to each data primary key.
In step S103, the task logic for executing the task to be executed by the data information is called.
Therein, a data Primary Key (Primary Key), also called a Primary code or Primary Key, is used to uniquely determine an attribute or set of attributes of a tuple, and each relationship has one and only one Primary code. The data primary key of the task is a primary code or a primary keyword which is uniquely corresponding to each task, is equivalent to the identity card number of each user, and is uniquely corresponding to the user.
Further, in step S102 and step S103, a new thread is enabled to query the second database according to the data primary key, and the task logic of the task to be executed is executed by calling the data information in the newly enabled thread.
According to the method and the device, the data primary key of the task to be executed is acquired by polling the first database, and the data information corresponding to the task to be executed is inquired in the second database according to the data primary key, so that the task logic of the task to be executed is executed by calling the data information, the pressure of the database is effectively reduced, and the crash of the database is avoided.
The above steps are exemplified in detail below in order to make the communication method provided by the present disclosure more understandable to those skilled in the art.
In one embodiment, the data queue is a plurality of queues with different priorities, and each queue is used for storing a data primary key corresponding to a task corresponding to the priority of the queue.
The data queues in the first database include a plurality of queues with different priorities, such as three queues with different priorities, which are obtained by dividing according to the preset priority of the task.
The preset priority of the task can be preset according to the urgency of the task execution, for example, the urgency of the emergency is higher than the urgency of the task, so the priority of the emergency is higher than the priority of the task. The preset priority of the task can also be preset according to the privilege of the task object, for example, the privilege of the VIP user is higher than that of the ordinary user, so that the priority of the VIP user task is higher than that of the ordinary user task. The preset priority of the task can be preset according to the requirements of the user, and if the user sets the priority of the task one to be high and the priority of the task two to be medium according to the requirements, the priority of the task one is higher than that of the task two.
Further, the second database is a Mysql database, and the second database is used for simultaneously storing the data primary keys of the tasks and the data information corresponding to the data primary keys. The first database is a Redis database, and the data main keys of all tasks in the Mysql database are stored in the data queue of the preset priority of the corresponding task in the first database according to the preset priority of the task.
And if the preset priority of the task three is the middle level, storing the data main key of the task three in a middle level queue in the Redis database data queue.
The task priority division and the task priority storage facilitate pressure reduction of the database when polling the database.
In one embodiment, in step S101, polling the data queue of the first database according to the task to be executed to obtain the data primary key corresponding to the task to be executed includes:
polling a data queue from high to low according to the priority of each queue in the data queue, and judging whether a data primary key of the task to be executed is stored in the data queue;
and acquiring the data primary key from the data queue under the condition that the data primary key is stored in the data queue.
The data queues are polled according to the priority of each queue in the data queues, so that the polling times are shortened, and the pressure of a database is reduced.
In an embodiment, in a case that the data primary key is stored in the data queue, acquiring the data primary key from the data queue includes:
and under the condition that the data primary key is stored in the data queue, moving the data primary key from the data queue to a work queue, wherein the work queue is a pre-established empty queue.
For example, when a data queue of the Redis database is polled from high priority to low priority of each queue in the data queue and the data primary key is stored in the data queue, the data primary key is moved from the data queue to the work queue by using a Redis Rpipe push command.
Furthermore, the Redis database performs write operation by using a Redis Rplalppush command, so that the simultaneous write is successful or failed under the condition that the Mysql database and the Redis database have write operation simultaneously.
The method and the device utilize the characteristic that the Redis Rpipe push command is atomic operation, the phenomenon that when the data main key is obtained, the data main key is interrupted by other threads is avoided, only one thread obtains the data main key at the same time, and the pressure of a database is reduced.
In one embodiment, the method further comprises:
after acquiring a data primary key corresponding to a task to be executed, if an abnormal condition interrupting the execution of the task occurs, scanning the work queue, and judging whether the data primary key is stored in the work queue;
and adding the data primary key into a queue with the highest priority in the data queue under the condition that the data primary key is stored in the work queue, and clearing the data primary key in the work queue.
For example, after a data primary key corresponding to a task to be executed is obtained, the task execution is interrupted due to abnormal conditions such as power failure or a system terminal, and the like, a work queue is scanned after a program is restarted, and the data primary key in the work queue is added to the right side of a high-priority queue in the data queue under the condition that the data primary key is stored in the work queue, so that the task corresponding to the data primary key is guaranteed to be executed preferentially, and the data primary key in the work queue is cleared.
According to the method and the device, through data compensation, after the task execution is interrupted due to an abnormal condition, the last interrupted task is still executed after the program is restarted, and the task which is not executed is avoided.
In one embodiment, the method further comprises:
and deleting the data primary key in the work queue after executing the task logic of the task to be executed according to the data information.
The data primary key of the task in the work queue is deleted after the task logic of the current task is executed, and the task is prevented from being executed repeatedly.
In one embodiment, the method further comprises:
after executing the task logic of the task to be executed according to the data information, changing the state of the task to be executed into the executed state according to the data main key.
After the task logic of the current task is executed, the state of the task is changed into the executed state according to the data primary key of the task, the database is updated, and the task is prevented from being executed repeatedly.
Referring to fig. 2, step 1, saving data: the data of the task is stored in a task data table in a Mysql database, the data of the task comprises data main keys of the task and data information corresponding to the data main keys, the data main keys of the task in the Mysql database are stored in a priority queue in Redis in a Redis database according to the preset priority of the task, and the preset priority of the task is a middle level.
Step 2, continuously polling: and continuously polling each Redis priority queue in the main thread according to the priority of each Redis priority queue in the Redis database from high to low, judging whether each Redis priority queue stores a data main key of a task to be executed, and acquiring the data main key from the Redis priority queue under the condition that the data main key is stored in a certain Redis priority queue.
Step 3, data processing: and when the data primary key is stored in a certain Redis priority queue, moving the data primary key from the Redis priority queue to a pre-established Redis work queue. And starting a new thread to inquire data information corresponding to the data main key in the Mysql database according to the data main key, and calling the data information in the started new thread to execute the task logic of the task to be executed.
Step 4, updating the database and deleting the work queue data: and after executing the task logic of the task to be executed according to the data information, obtaining a task processing result, changing the state of the task to be executed into the executed state according to the data primary key, deleting the data primary key in the work queue, and updating the database according to the task processing result.
Referring to fig. 3, after a data primary key corresponding to a task to be executed is acquired, if the task is interrupted due to an abnormal situation such as power failure or a system terminal, a Redis work queue is scanned after service is started, and when the data primary key is stored in the Redis work queue, the data primary key in the Redis work queue is added to a Redis high-priority queue, so that the task corresponding to the data primary key is preferentially executed, and the data primary key in the work queue is cleared.
Specifically, the general main thread acquires data from the rightmost side of the queue, and therefore, adding the data main key in the Redis work queue to the Redis high-priority queue specifically includes: the data primary key in the Redis work queue is added to the rightmost side of the Redis high priority queue.
Based on the same inventive concept, the present disclosure also provides a task execution device, referring to fig. 4, the device 1300 includes an obtaining module 1301, an executing module 1302, and a control module 1303.
The obtaining module 1301 is configured to poll the data queue of the first database according to the task to be executed to obtain the data primary key corresponding to the task to be executed.
The executing module 1302 is configured to query a second database according to the primary data key, and obtain data information corresponding to the task to be executed, where the second database is used to store the primary data key of the task and the data information corresponding to each primary data key.
The control module 1303 is configured to call the data information to execute task logic of the task to be executed.
The task execution device provided by the disclosure acquires the data primary key of the task to be executed by polling the first database, and queries the data information corresponding to the task to be executed in the second database according to the data primary key, so that the data information is called to execute the task logic of the task to be executed, the pressure of the database is effectively reduced, and the database crash is avoided.
Optionally, the data queue is a plurality of queues with different priorities, and each queue is used for storing a data primary key corresponding to a task corresponding to the priority of the queue.
Optionally, the obtaining module 1301 is configured to poll the data queue from high to low according to the priority of each queue in the data queue, and determine whether a data primary key of a task to be executed is stored in the data queue;
and acquiring the data primary key from the data queue under the condition that the data primary key is stored in the data queue.
Optionally, the obtaining module 1301 is configured to move the data primary key from the data queue to a work queue, wherein the work queue is a pre-established empty queue.
Optionally, the apparatus 1300 further includes a compensation module configured to scan the work queue, and determine whether the data primary key is stored in the work queue;
and adding the data primary key into the queue with the highest priority in the data queue under the condition that the data primary key is stored in the work queue, and clearing the data primary key in the work queue.
Optionally, the apparatus 1300 further comprises an update module configured to delete the primary key of the data in the work queue.
Optionally, the updating module is further configured to change the state of the task to be executed according to the data primary key.
It should be noted that, for convenience and brevity of description, the embodiments described in the specification all belong to the preferred embodiments, and the related parts are not necessarily essential to the present invention, for example, the control module and the control module may be independent devices or may be the same device when being implemented specifically, and the disclosure is not limited thereto.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Based on the same inventive concept, the present disclosure also provides a computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the task execution method provided by the present disclosure.
Specifically, the computer-readable storage medium may be a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, a public cloud server, etc.
With respect to the computer-readable storage medium in the above embodiments, the steps of the method for implementing task execution when the computer program stored thereon is executed will be described in detail in relation to the embodiments of the method, and will not be elaborated herein.
Based on the same inventive concept, the present disclosure also provides an electronic device, including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the task execution method described above.
According to the method and the device, the data primary key of the task to be executed is acquired by polling the first database, and the data information corresponding to the task to be executed is inquired in the second database according to the data primary key, so that the task logic of the task to be executed is executed by calling the data information, the pressure of the database is effectively reduced, and the crash of the database is avoided.
Fig. 5 is a block diagram illustrating an electronic device 700 according to an example embodiment. As shown in fig. 5, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the task execution method. The memory 702 is used to store various types of data to support operations at the electronic device 700, such as instructions for any application or method operating on the electronic device 700 and application-related data, such as data keys for tasks, data information corresponding to data keys, and so forth. The Memory 702 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia components 703 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 702 or transmitted through the communication component 705. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 705 may thus include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the task execution methods described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned task execution method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A method of task execution, the method comprising:
polling a data queue of a first database according to a task to be executed to acquire a data primary key corresponding to the task to be executed;
inquiring a second database according to the data main key to acquire data information corresponding to the task to be executed, wherein the second database is used for storing the data main key of the task and the data information corresponding to each data main key;
and calling the data information to execute the task logic of the task to be executed.
2. The method of claim 1, wherein the data queue is a plurality of queues having different priorities, and each of the queues is configured to store a primary key of data corresponding to a task corresponding to the priority of the queue.
3. The method of claim 2, wherein polling a data queue of a first database according to the task to be executed to obtain a primary key of data corresponding to the task to be executed comprises:
polling the data queues from high to low according to the priorities of the queues in the data queues, and judging whether the data queues store the data primary keys of the tasks to be executed or not;
and under the condition that the data primary key is stored in the data queue, acquiring the data primary key from the data queue.
4. The method according to claim 3, wherein the obtaining the data primary key from the data queue in the case that the data primary key is stored in the data queue comprises:
and under the condition that the data primary key is stored in the data queue, moving the data primary key from the data queue to a work queue, wherein the work queue is a pre-established empty queue.
5. The method of claim 4, further comprising:
after the data primary key corresponding to the task to be executed is obtained, if an abnormal condition interrupting the execution of the task occurs, scanning the work queue, and judging whether the data primary key is stored in the work queue;
and under the condition that the data primary key is stored in the work queue, adding the data primary key into a queue with the highest priority in the data queue, and clearing the data primary key in the work queue.
6. The method of claim 5, further comprising: and deleting the data primary key in the work queue after the task logic of the task to be executed is executed according to the data information.
7. The method of claim 1, further comprising: and after the task logic of the task to be executed is executed according to the data information, changing the state of the task to be executed into the executed state according to the data primary key.
8. A task execution apparatus, characterized in that the apparatus comprises:
the acquisition module is configured to poll a data queue of a first database according to a task to be executed so as to acquire a data primary key corresponding to the task to be executed;
the execution module is configured to query a second database according to the data primary keys and acquire data information corresponding to the task to be executed, wherein the second database is used for storing the data primary keys of the task and the data information corresponding to each data primary key;
and the control module is configured to call the data information to execute the task logic of the task to be executed.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 7.
CN202111306892.4A 2021-11-05 2021-11-05 Task execution method and device, storage medium and electronic equipment Pending CN113934731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111306892.4A CN113934731A (en) 2021-11-05 2021-11-05 Task execution method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111306892.4A CN113934731A (en) 2021-11-05 2021-11-05 Task execution method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113934731A true CN113934731A (en) 2022-01-14

Family

ID=79285857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111306892.4A Pending CN113934731A (en) 2021-11-05 2021-11-05 Task execution method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113934731A (en)

Similar Documents

Publication Publication Date Title
WO2018186445A1 (en) Dialogue system
CN111970339B (en) Request control method and device and electronic equipment
CN111752960B (en) Data processing method and device
CN112926068A (en) Authority management method, management server, service server and readable storage medium
CN111913793A (en) Distributed task scheduling method, device, node equipment and system
CN107844363B (en) Business transaction processing method, device, storage medium and equipment
CN111124355B (en) Information processing method and device, readable storage medium and electronic equipment
CN111666265B (en) Data management method, device, server and storage medium
CN109101191B (en) Data storage method, data storage device, storage medium and electronic equipment
CN113934731A (en) Task execution method and device, storage medium and electronic equipment
CN110737533B (en) Task scheduling method and device, electronic equipment and storage medium
CN108846041A (en) Processing method, device and the storage medium and electronic equipment of conflict are operated in process
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
CN115756828A (en) Multithreading data file processing method, equipment and medium
CN111080250B (en) Flow backspacing compensation method and device, storage medium and electronic equipment
CN110795242A (en) Storage space management method and device, electronic equipment and storage medium
US11606457B2 (en) Technology and method for selectively providing network function to application of device
CN113326083A (en) State machine processing method, state processing device, electronic equipment and storage medium
CN110609841B (en) Method, device, readable medium and electronic equipment for asynchronously processing messages
CN111176679A (en) Application program updating method and device
CN110825606B (en) Data operation method, device and central station system
CN111179376B (en) Method and device for generating flow node diagram, storage medium and electronic equipment
CN113297002B (en) Database working mode switching method and device
JP7245273B2 (en) COMMUNICATION CONTROL DEVICE, MOBILE, COMMUNICATION CONTROL METHOD, AND PROGRAM
CN116431523B (en) Test data management method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230801

Address after: 224008 Rooms 404-405 and 504, Building B-17-1, Big data Industrial Park, Kecheng Street, Yannan High tech Zone, Yancheng, Jiangsu Province

Applicant after: Yancheng Tianyanchawei Technology Co.,Ltd.

Address before: 224008 room 501-503, building b-17-1, Xuehai road big data Industrial Park, Kecheng street, Yannan high tech Zone, Yancheng City, Jiangsu Province (CNK)

Applicant before: Yancheng Jindi Technology Co.,Ltd.

TA01 Transfer of patent application right