CN113672409A - Method for executing multiple different service events based on one timing task - Google Patents

Method for executing multiple different service events based on one timing task Download PDF

Info

Publication number
CN113672409A
CN113672409A CN202110976264.0A CN202110976264A CN113672409A CN 113672409 A CN113672409 A CN 113672409A CN 202110976264 A CN202110976264 A CN 202110976264A CN 113672409 A CN113672409 A CN 113672409A
Authority
CN
China
Prior art keywords
event
data
business
service
database table
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
CN202110976264.0A
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.)
Guizhou Electronic Commerce Cloud Operation Co ltd
Original Assignee
Guizhou Electronic Commerce Cloud Operation 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 Guizhou Electronic Commerce Cloud Operation Co ltd filed Critical Guizhou Electronic Commerce Cloud Operation Co ltd
Priority to CN202110976264.0A priority Critical patent/CN113672409A/en
Publication of CN113672409A publication Critical patent/CN113672409A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • 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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2477Temporal data queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for executing a plurality of different business events based on a timing task, which comprises a database table part and an execution flow part; the database table part comprises event types, execution time, execution or not and service event data fields; the execution flow part comprises seven steps. The invention creates a method for executing a plurality of different business events based on one timing task, and solves the problem that the more business development and the more timing tasks are needed because one timing task executes one business event. Different types of service event data to be executed are put into a table and classified by using a service type field, and the original service event needing to be completed by a plurality of timing tasks can be completed by one timing task.

Description

Method for executing multiple different service events based on one timing task
Technical Field
The invention belongs to the technical field of computer processing methods, particularly relates to the technical field of timing task execution, and particularly relates to the technical field of methods for executing various different business events by a timing task.
Background
The existing timing task is basically a timing task to execute a business event, which causes that a timing task needs to be added when each business type is increased, the more the timing tasks are when the business types are too many, and finally the timing tasks become difficult to maintain, and the method is not suitable for being applied to the internet technology under the condition that the business types of the internet are developed at a high speed. Therefore, there is a need for a method of performing a variety of different business events using only one timing task.
Disclosure of Invention
The present invention provides a method for executing a plurality of different service events based on a timing task, which aims to solve the above problem and defect.
The invention is realized by adopting the following technical scheme.
The invention relates to a method for executing various different business events based on a timing task, which comprises a database table part and an execution flow part;
the database table part comprises event types, execution time, execution or not and service event data fields;
the execution flow part comprises the following steps:
s1, establishing a database table, wherein fields in the database table comprise event types, execution time, whether to execute and business event data;
s2, storing a service event to be executed in a database table, wherein:
the event type in the table is a traffic event category,
the execution time in the table is the time point at which the business event needs to be executed,
whether the filling in is performed in the table is no,
the business event data in the table is data required by the execution of the business event;
s3, starting a timing task executed every second, wherein the task acquires whether data with a field value of no is executed in a database table through database query;
s4, inquiring the acquired data in the previous step, and inquiring the database table of the data again to compare the execution time field value with the data of the current time;
s5, inquiring the acquired data in the last step, and reading the event type and the service event data field of each piece of data through the database by the timing task;
s6, the timing task executes different service events according to the event types and transmits service event data to the service events;
and S7, after the timing task completes the service event of the corresponding data, setting whether the data is executed to be yes through the database.
Further, in step S6, the timing task executes different service events according to the event type, specifically, executes different service events according to the event type through a computer language.
Further, the computer language of the invention is java language.
Further, the step S6 of transferring the service event data to the service event setting in the present invention is specifically to transfer the service event data to the service event through the computer language.
Further, the computer language of the present invention is java language.
Further, the timing task of the invention executes different service events according to the event types and transmits the service event data to the service events to be arranged in parallel, and the service events are carried out simultaneously.
Further, in step S4, the step of comparing the execution time field value in the database table with the data at the current time is to query the database again for the data with the execution time field value being greater than or equal to the data at the current time.
The invention has the advantages that the invention creates a method for executing a plurality of different business events based on a timing task, the invention comprises a database table and an execution process, the database table is established to contain business types, execution time, whether to execute and business event data fields, the execution process is controlled by a timing task, the data in the database table is read, and codes of different businesses are executed according to the type fields in the table. Different types of service event data to be executed are put into a table and classified by using a service type field, and the original service event needing to be completed by a plurality of timing tasks can be completed by one timing task.
The invention is further explained below with reference to specific embodiments.
Detailed Description
The specific working process of the invention is as follows:
the invention relates to a method for executing various different business events based on a timing task, which comprises a database table part and an execution flow part;
the database table part comprises event types, execution time, execution or not and service event data fields;
the execution flow part comprises the following steps:
s1, establishing a database table, wherein fields in the database table comprise event types, execution time, whether to execute and business event data;
s2, storing a service event to be executed in a database table, wherein:
the event type in the table is a traffic event category,
the execution time in the table is the time point at which the business event needs to be executed,
whether the filling in is performed in the table is no,
the business event data in the table is data required by the execution of the business event;
s3, starting a timing task executed every second, wherein the task acquires whether data with a field value of no is executed in a database table through database query;
s4, inquiring the acquired data in the previous step, and inquiring the database table of the data again to compare the execution time field value with the data of the current time;
s5, inquiring the acquired data in the last step, and reading the event type and the service event data field of each piece of data through the database by the timing task;
s6, the timing task executes different service events according to the event types and transmits service event data to the service events;
and S7, after the timing task completes the service event of the corresponding data, setting whether the data is executed to be yes through the database.
Further, in step S6, the timing task executes different service events according to the event type, specifically, executes different service events according to the event type through a computer language.
Further, the computer language of the invention is java language.
Further, the step S6 of transferring the service event data to the service event setting in the present invention is specifically to transfer the service event data to the service event through the computer language.
Further, the computer language of the present invention is java language.
Further, the timing task of the invention executes different service events according to the event types and transmits the service event data to the service events to be arranged in parallel, and the service events are carried out simultaneously.
Further, in step S4, the step of comparing the execution time field value in the database table with the data at the current time is to query the database again for the data with the execution time field value being greater than or equal to the data at the current time.
The foregoing is only a part of the specific embodiments of the present invention and specific details or common general knowledge in the schemes have not been described herein in more detail. It should be noted that the above-mentioned embodiments do not limit the present invention in any way, and all technical solutions obtained by means of equivalent substitution or equivalent transformation for those skilled in the art are within the protection scope of the present invention. The scope of the claims of the present application shall be determined by the contents of the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims.

Claims (7)

1. A method for executing multiple different business events based on a timing task is characterized in that the method comprises a database table part and an execution flow part;
the database table part comprises event types, execution time, execution or not and service event data fields;
the execution flow part comprises the following steps:
s1, establishing a database table, wherein fields in the database table comprise event types, execution time, whether to execute and business event data;
s2, storing a service event to be executed in a database table, wherein:
the event type in the table is a traffic event category,
the execution time in the table is the time point at which the business event needs to be executed,
whether the filling in is performed in the table is no,
the business event data in the table is data required by the execution of the business event;
s3, starting a timing task executed every second, wherein the task acquires whether data with a field value of no is executed in a database table through database query;
s4, inquiring the acquired data in the previous step, and inquiring the database table of the data again to compare the execution time field value with the data of the current time;
s5, inquiring the acquired data in the last step, and reading the event type and the service event data field of each piece of data through the database by the timing task;
s6, the timing task executes different service events according to the event types and transmits service event data to the service events;
and S7, after the timing task completes the service event of the corresponding data, setting whether the data is executed to be yes through the database.
2. The method according to claim 1, wherein the timed task in step S6 executes different service events according to event types, specifically, executes different service events according to event types via computer language.
3. The method for performing multiple different business events based on one timed task according to claim 1, wherein the step S6 of transferring the business event data to the business event setting is specifically transferring the business event data to the business event through a computer language.
4. The method of claim 2, wherein the computer language is java.
5. A method for performing multiple different business events based on a timed task according to claim 3, wherein the computer language is java.
6. The method of claim 1, wherein the timed task executes different service events according to event types and transmits service event data to the service events in parallel, and the different service events are executed simultaneously.
7. The method as claimed in claim 1, wherein the step S4 is performed by querying the database table again with the data at the current time, specifically, the data at the database table having the execution time field value greater than or equal to the current time.
CN202110976264.0A 2021-08-24 2021-08-24 Method for executing multiple different service events based on one timing task Pending CN113672409A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110976264.0A CN113672409A (en) 2021-08-24 2021-08-24 Method for executing multiple different service events based on one timing task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110976264.0A CN113672409A (en) 2021-08-24 2021-08-24 Method for executing multiple different service events based on one timing task

Publications (1)

Publication Number Publication Date
CN113672409A true CN113672409A (en) 2021-11-19

Family

ID=78545745

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110976264.0A Pending CN113672409A (en) 2021-08-24 2021-08-24 Method for executing multiple different service events based on one timing task

Country Status (1)

Country Link
CN (1) CN113672409A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733468A (en) * 2017-04-20 2018-11-02 北京京东尚科信息技术有限公司 Timed task Dynamic Configuration and device, storage medium and server cluster
CN110334126A (en) * 2019-05-23 2019-10-15 平安科技(深圳)有限公司 Timed task processing method, device and computer equipment based on Spring MVC
CN111104207A (en) * 2018-10-29 2020-05-05 珠海横琴盛达兆业科技投资有限公司 Method for dynamically configuring timing task based on SpringBoot
CN111142977A (en) * 2019-12-26 2020-05-12 深圳前海环融联易信息科技服务有限公司 Processing method and device of timing task, computer equipment and storage medium
US20200167340A1 (en) * 2018-11-28 2020-05-28 Snowflake Computing, Inc. Task Scheduling In Database Systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733468A (en) * 2017-04-20 2018-11-02 北京京东尚科信息技术有限公司 Timed task Dynamic Configuration and device, storage medium and server cluster
CN111104207A (en) * 2018-10-29 2020-05-05 珠海横琴盛达兆业科技投资有限公司 Method for dynamically configuring timing task based on SpringBoot
US20200167340A1 (en) * 2018-11-28 2020-05-28 Snowflake Computing, Inc. Task Scheduling In Database Systems
CN110334126A (en) * 2019-05-23 2019-10-15 平安科技(深圳)有限公司 Timed task processing method, device and computer equipment based on Spring MVC
CN111142977A (en) * 2019-12-26 2020-05-12 深圳前海环融联易信息科技服务有限公司 Processing method and device of timing task, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US7904488B2 (en) Time stamp methods for unified plant model
CN102521254B (en) Uniform access method of isomeric database
CN103176988A (en) Data migration system based on software-as-a-service (SaaS)
CN107483601A (en) A kind of implementation method and execution system of distributed timing task
CN113420537B (en) Method, device, equipment and storage medium for processing electronic form data
CN105550225A (en) Index construction method and query method and apparatus
CN112468369B (en) Error detection method for CAN communication matrix of automobile
US20110246479A1 (en) Creating Indexes for Databases
US20130086133A1 (en) Method and apparatus for file revision tracking
CN113672409A (en) Method for executing multiple different service events based on one timing task
CN103092955B (en) Checkpointed method, Apparatus and system
CN102521397B (en) Data transmission method
CN112148713A (en) Data migration method and device between heterogeneous databases
CN113791594B (en) Configuration establishing method, system, equipment and medium of distributed control system
CN109636256B (en) MAC address management method of MES system
US20160299820A1 (en) Processing method, device and system for data of distributed storage system
CN111090636A (en) Efficient tracing method based on one-object-one-code
CN111552561B (en) Task processing method and device
CN117633059B (en) Data query method based on distributed database
CN117271459B (en) Data processing method based on shared database
CN111930415B (en) Construction deployment method and device for large-scale software product
CN114780802B (en) Method and device for automatically adapting and extracting chip ECID
CN110309133B (en) Batch data processing method and device
CN108073694A (en) A kind of enterprise attributes standardized system and its implementation based on biradical standard
CN117633024B (en) Database optimization method based on preprocessing optimization join

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