[go: up one dir, main page]

CN109634726A - Processing method, device, equipment and the storage medium of timed task - Google Patents

Processing method, device, equipment and the storage medium of timed task Download PDF

Info

Publication number
CN109634726A
CN109634726A CN201811254501.7A CN201811254501A CN109634726A CN 109634726 A CN109634726 A CN 109634726A CN 201811254501 A CN201811254501 A CN 201811254501A CN 109634726 A CN109634726 A CN 109634726A
Authority
CN
China
Prior art keywords
task
timed task
database
current
information
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
CN201811254501.7A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811254501.7A priority Critical patent/CN109634726A/en
Priority to PCT/CN2018/122834 priority patent/WO2020082563A1/en
Publication of CN109634726A publication Critical patent/CN109634726A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4825Interrupt from clock, e.g. time of day

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses processing method, device, equipment and the storage mediums of a kind of timed task based on big data processing, the described method includes: obtaining the call request of the current timed task when detecting that current timed task calls the business datum in presetting database;The call request is parsed, recalls information is obtained, the task type of the current timed task is judged according to the recalls information;When the task type is preset kind, the Database lock prestored in the presetting database is obtained, and inquire the currently used state of the Database lock;When the currently used state is open state, the call request is put into and lines up to wait.The present invention is directed to the Database lock of preset task type by laying in the database that timed task needs to call, current timed task is performed corresponding processing by the use state of the Database lock, to guarantee the orderly execution of task, effective management to timed task is improved.

Description

Processing method, device, equipment and the storage medium of timed task
Technical field
The present invention relates to technical field of data processing more particularly to a kind of processing method of timed task, device, equipment and Storage medium.
Background technique
Currently, when project is deployed on server, in the configuration file of the entitled server.xml of file one it is entitled One container of representation of file of Host, the inside may include several scene applications, such as: it is configured in tomcat server Two containers, a container are named as localhost file, and the root of application is webapps, and can decompress war automatically The compressed package and automatic deployment of format, if without given scenario, can under root it is all based on the page application all into Row is disposed, and after deployment success, outer net can pass through the server network agreement address (Internet Protocol, IP) and project Name accesses, another container can be accessed by network address that title form is www.xxx.com and first container is different It is, second container is configured with homepage page application, and does not need entry name and can access, and can pass through after deployment success Domain name and entry name access, and can also directly pass through project where root domain name access homepage.
But when the project comprising timed task is deployed under webapps catalogue, in tomcat server two it is independent Container can all be disposed, and the project that is equivalent to deploys twice on tomcat server, both sides while meeting run timing task, and Specified is the same database, at this moment will appear same time timed task and performs repeatedly, when executing multitask, due to Multitask executes in same database simultaneously, be easy to cause the logical miss of data processing.
Summary of the invention
It is a primary object of the present invention to propose a kind of processing method of timed task, device, equipment and storage medium, purport Timed task is effectively managed improving.
To achieve the above object, the present invention provides a kind of processing method of timed task, the processing side of the timed task Method the following steps are included:
When detecting that current timed task calls the business datum in presetting database, the current timed task is obtained Call request;
The call request is parsed, the recalls information of the current timed task after obtaining parsing, according to institute State the task type that recalls information judges the current timed task;
When the task type of the current timed task is preset kind, the number prestored in the presetting database is obtained It is locked according to library, and inquires the currently used state of the Database lock;
When the currently used state is open state, the call request is put into and lines up to wait.
Preferably, when the task type in the current timed task is preset kind, the preset data is obtained The Database lock prestored in library, and inquire after the currently used state of the Database lock, the method also includes:
When the currently used state is in off state, the call request of the current timed task is responded, executes institute The business datum in current timed task calling presetting database is stated, and the currently used state of the Database lock is switched to Open state.
Preferably, described that the call request is parsed, the calling of the current timed task after obtaining parsing Information judges the task type of the current timed task according to the recalls information, comprising:
The call request is compared with default label information, the call request is obtained according to the comparison result In target labels information, the attribute information in the target labels information is extracted, using the attribute information as described current The recalls information of timed task;
Corresponding task type is searched in preset relation mapping table according to the recalls information, the task class that will be found Task type of the type as the current timed task.
Preferably, described that corresponding task type is searched in preset relation mapping table according to the recalls information, it will look into Before task type of the task type found as the current timed task, the method also includes:
The corresponding relationship for obtaining history recalls information and historic task type is established described default according to the corresponding relationship Relation mapping table.
Preferably, when the task type in the current timed task is preset kind, the preset data is obtained Before the Database lock prestored in library, the method also includes:
Obtain Database lock write instruction, extract Database lock to be written in the Database lock write instruction and Address information;
Corresponding location information is found in the presetting database according to the address information, is believed according to the position The Database lock is written in the presetting database and is saved by breath.
Preferably, the Database lock is the configuration file or program in machine code in the presetting database, described default Type is type of message;
When the task type in the current timed task is preset kind, obtains and prestored in the presetting database Database lock, and inquire the currently used state of the Database lock, comprising:
When the task type of the current timed task is type of message, the number prestored in the presetting database is obtained It is locked according to library;
Search the label letter that currently used state is represented in configuration file described in the Database lock or program in machine code Breath, searches corresponding status information according to the label information, using the status information found as institute in preset state table State currently used state.
Preferably, described when the currently used state is open state, the call request is put into and lines up to wait Later, the method also includes:
The currently used state for monitoring the Database lock in real time is in off state in the currently used state switching When, the calling grade of the waiting task in waiting is lined up in judgement;
The calling grade be it is default call grade when, it is excellent to the corresponding waiting task progress of default the callings grade First handle.
In addition, to achieve the above object, the present invention also proposes a kind of processing unit of timed task, the timed task Processing unit includes:
Module is obtained, for obtaining institute when detecting that current timed task calls the business datum in presetting database State the call request of current timed task;
Parsing module, for being parsed to the call request, the tune of the current timed task after obtaining parsing With information, the task type of the current timed task is judged according to the recalls information;
Enquiry module, for the task type in the current timed task be preset kind when, obtain the present count According to the Database lock prestored in library, and inquire the currently used state of the Database lock;
Processing module, for the call request being put into and is lined up when the currently used state being open state It waits.
In addition, to achieve the above object, the present invention also proposes a kind of equipment, the equipment include: memory, processor and It is stored in the processing routine for the timed task that can be run on the memory and on the processor, the place of the timed task The step of reason program is arranged for carrying out the processing method of timed task as described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, timing is stored on the storage medium The processing routine of the processing routine of task, the timed task realizes timed task as described above when being executed by processor The step of processing method.
The processing method of timed task proposed by the present invention, by needing to lay needle in the database called in timed task To the Database lock of preset task type, current timed task is located accordingly by the use state of the Database lock Reason, when Database lock is in the open state, shows that the database is being in use state, in this case will be current Timed task carries out lining up to wait, to guarantee the orderly execution of task, improves effective management to timed task.
Detailed description of the invention
Fig. 1 is the device structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of the processing method first embodiment of timed task of the present invention;
Fig. 3 is the flow diagram of the processing method second embodiment of timed task of the present invention;
Fig. 4 is the flow diagram of the processing method 3rd embodiment of timed task of the present invention;
Fig. 5 is the functional block diagram of the processing unit first embodiment of timed task of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the device structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
As shown in Figure 1, the equipment may include: processor 1001, such as CPU, communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components. User interface 1003 may include display screen (Display), input unit such as key, and optional user interface 1003 can also wrap Include standard wireline interface and wireless interface.Network interface 1004 optionally may include standard wireline interface and wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory (non-volatile ), such as magnetic disk storage memory.Memory 1005 optionally can also be the storage dress independently of aforementioned processor 1001 It sets.
It will be understood by those skilled in the art that device structure shown in Fig. 1 does not constitute the restriction to equipment, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include operating system, network communication mould in a kind of memory 1005 of storage medium The processing routine of block, Subscriber Interface Module SIM and timed task.
In equipment shown in Fig. 1, network interface 1004 is mainly used for connecting outer net, carries out data with other network equipments Communication;User interface 1003 is mainly used for connecting user equipment, carries out data communication with equipment;Present device passes through processor The processing routine of the timed task stored in 1001 calling memories 1005, and execute timed task provided in an embodiment of the present invention Processing implementation method.
Based on above-mentioned hardware configuration, the processing method embodiment of timed task of the present invention is proposed.
It is the flow diagram of the processing method first embodiment of timed task of the present invention referring to Fig. 2, Fig. 2.
In the first embodiment, the timed task processing method the following steps are included:
Step S10 is obtained described current when detecting that current timed task calls the business datum in presetting database The call request of timed task.
It should be noted that the type of the timed task can be message task, it can be also other kinds of task, at this Embodiment with no restriction, in the present embodiment, is illustrated, since business datum is stored in data this by taking message task as an example In library, the timed task needs to call the business datum in the presetting database when being executed, to realize task Normal to execute, the presetting database be the data that pre-selection saves each business execution, such as pre-stored a large number of users Use data.
In the concrete realization, when the timed task needs to call the business datum in the presetting database, first Need to send call request, the call request includes the data information of the timed task, such as times of the timed task Service type and major parameter information etc. can effectively analyze current timed task according to the call request.
Step S20 parses the call request, the calling letter of the current timed task after obtaining parsing Breath, the task type of the current timed task is judged according to the recalls information.
It should be noted that, in order to guarantee the safety of data, can will generally execute task when timed task executes Data are encrypted, to guarantee the safety of data transmission, in order to obtain the type of timed task, need first to appoint timing The call request of business is parsed, to obtain the details of timed task.
In the concrete realization, in order to distinguish different task, generally when carrying out data transmission, to each different types of Business would generally stamp specific label, or upper specific parameter information is set on label, to realize to current timed task Identification, and be packaged, such as message task, the value of the TypeID of default label can be set as 1, to realize Identification to current task.
In the present embodiment, the call request of timed task is parsed, so that the label information of timed task is obtained, That is TypeID judges the type of timed task according to TypeID, belongs to message task or other tasks.
Step S30 is obtained in the presetting database when the task type of the current timed task is preset kind The Database lock prestored, and inquire the currently used state of the Database lock.
It should be noted that in order to keep the Database lock in database more targeted, in the present embodiment, the data Database lock in library is only effective to message task, when the task type for detecting current timed task is message task, institute The Database lock stated in database just comes into force.
It is understood that the Database lock is configuration file in database or is located at a string of database entry Program in machine code form, can also be other forms, the present embodiment to this with no restriction, the Database lock be configuration file when, It can modify to the configuration file, thus meet the needs of different business, the Database lock in the specially described database It can carry out flexible configuration according to the demand of user, such as when user needs the Database lock to come into force other tasks, it can basis The demand of user is adjusted, such as receives the edit instruction of user, is carried out according to the edit instruction to the Database lock Adjustment, to meet the needs of business, realizes the flexibility of Database lock.
The call request is put into when the currently used state is open state and lines up to wait by step S40.
It should be noted that showing currently there is task to exist when the state for inquiring Database lock is open state Processing, and database has been in the state of calling, in this case, avoid multiple tasks execute the calling of database from And logical miss is caused, the timed task for currently needing to call database is carried out lining up to handle, to realize to timed task Orderly management.
In the concrete realization, the call request of current timed task can directly be returned, or once periodically appointed before waiting The calling of business is completed, to avoid multiple timed tasks while call database to the logical miss of data processing occur.
Further, after the step S30, the method also includes:
Step S50, when the currently used state is in off state, the calling for responding the current timed task is asked It asks, executes the current timed task and call business datum in presetting database, and by the currently used of the Database lock State is switched to open state.
In the present embodiment, when inquiring the state of Database lock and being in off state, illustrate that current database is in and do not adjust Can currently it be determined directly in response to the call request of current timed task since database is carrying out in this case with state When task calling, the currently used state of Database lock can be switched to open state, to realize to the reality of Database lock When monitor, guarantee the accurate execution of timed task, realize the order of data processing.
The present embodiment is directed to preset task through the above scheme, by laying in the database that timed task needs to call The Database lock of type performs corresponding processing current timed task by the use state of the Database lock, in data When library lock is in the open state, show that the database is being in use state, in this case by current timed task It carries out lining up to wait, to guarantee the orderly execution of task, improves effective management to timed task.
Further, as shown in figure 3, proposing that the processing method second of timed task of the present invention is implemented based on first embodiment Example, in the present embodiment, the step S20, comprising:
The call request is compared with default label information, obtains institute according to the comparison result by step S201 The target labels information in call request is stated, the attribute information in the target labels information is extracted, the attribute information is made For the recalls information of the current timed task;
It should be noted that the default label information is the Items of all configuration files, such as filename, file Type, the parameter informations such as document color can be obtained the calling and ask by the way that call request to be compared with default label information Show the parameter information of file type in asking, such as the typeID parameter item in the call request can be extracted according to comparison result Mesh.
In the present embodiment, by obtaining typeID Items, and the attribute in the typeID Items is extracted Information, such as parameter value are 1, so as to judge the corresponding current timed task of the call request according to typeID=1 Task type, since the Database lock is set as handling the timed task of type of message, to can realize to each The identification of timed task.
Step S202 searches corresponding task type according to the recalls information in preset relation mapping table, will search Task type of the task type arrived as the current timed task.
It should be noted that by the corresponding relationship for obtaining history recalls information and historic task type, according to described right Should be related to and establish the preset relation mapping table, by recalls information inquire the preset relation mapping table can be obtained it is described current The task type of timed task, such as getting recalls information is 1, to inquire the corresponding task type of recalls information 1 and be Message task improves the accuracy of the identification to current timed task.
Further, before the step S202, the method also includes:
Step S203 obtains the corresponding relationship of history recalls information and historic task type, is built according to the corresponding relationship Found the preset relation mapping table.
In the concrete realization, by obtaining the corresponding relationship of each recalls information and corresponding task type, according to described Corresponding relationship establishes the preset relation mapping table, thus when being identified to current timed task, it is described pre- by inquiring If the corresponding task type of current timed task can be obtained in relation mapping table, achieve the purpose that improve data-handling efficiency.
Scheme provided in this embodiment is closed the label information default by obtaining the label information of call request It is that corresponding task type is inquired in mapping table, to realize the identification to current timed task, and by way of tabling look-up The corresponding task type of current timed task is obtained, data-handling efficiency is improved.
Further, as shown in figure 4, proposing the processing of timed task of the present invention based on the first embodiment or the second embodiment Method 3rd embodiment is illustrated based on first embodiment in the present embodiment, and before the step S30, the method is also Include:
Step S301 obtains Database lock write instruction, extracts the number to be written in the Database lock write instruction According to library lock and address information.
In the present embodiment, it needs to write before the state of predeterminable area Database lock in inquiring the presetting database Enter the Database lock, specifically by the write instruction for receiving user, is instructed according to said write and write the Database lock Enter predeterminable area in the presetting database, thus when getting the timed task of trigger data library lock type, described in starting Database lock realizes the management to timed task in the processing of multithreading task.
Step S302 finds corresponding location information according to the address information in the presetting database, according to The Database lock is written in the presetting database and is saved by the location information.
In the concrete realization, described by obtaining the address information of the Database lock to be written in write instruction Address information is the location information that the Database lock to be written is written in database, by the address information to it is described to The Database lock of write-in is written, to guarantee the correctness of Database lock write-in.
Further, the Database lock is the configuration file or program in machine code in the presetting database, described pre- If type is type of message, the step S30, comprising:
When the task type of the current timed task is type of message, the number prestored in the presetting database is obtained It is locked according to library.
It should be noted that the task type in order to identify current timed task, by will be in the current timed task Parameter information is compared with parameter preset information, obtains the letter of the type parameter in the current timed task according to comparison result Breath.
It should be noted that it is the corresponding parameter information of type of message that the parameter preset information, which is task type, such as TypeID=1 believes parameter information in the current timed task such as parameter name, parameter size equal to the parameter preset Breath is compared, and judges whether the current timed task is message task.
In the concrete realization, by obtaining the preset kind relation mapping table of historical parameter information and historic task type, When obtaining type parameter information, obtained by the type parameter information inquiry preset kind relation mapping table corresponding Task type.
Further, it searches and represents currently used state in configuration file described in the Database lock or program in machine code Label information, corresponding status information is searched in preset state table according to the label information, by the state found believe Breath is used as the currently used state.
It should be noted that having label information and corresponding status information in the preset state table, by obtaining number The state of the Database lock can be inquired in the preset state table according to the label information that library is locked, such as in currently used shape When the label information of state is 1, the state of corresponding Database lock is open state, is 0 in the label information of currently used state When, the state of corresponding Database lock is in off state, to be realized by label information to the use state of Database lock Identification.
Further, after the step S40, the method also includes:
Step S401 monitors the currently used state of the Database lock in real time, is switched in the currently used state When closed state, the calling grade of the waiting task in waiting is lined up in judgement.
In the present embodiment, after the state of the Database lock inquired is open state, data described in real-time monitoring The state of library lock executes the call request when the state is in off state, and when the state is in off state, says Bright data base call has been completed, and current database is in never call state, can execute the lining up to wait of the task.
In the concrete realization, when will line up waiting task and be executed, the waiting task for lining up waiting can be obtained Grade is called, the calling grade is the priority degree for showing currently to wait task, such as calling grade is 1, is illustrated currently The priority level highest of waiting task needs to carry out override processing in waiting task, to realize the fining to data Processing.
Step S402, the calling grade be it is default call grade when, waiting corresponding to the default calling grade Task carries out priority processing.
It should be noted that the default calling grade is that highest calls grade, such as priority level is 1 grade, this In the case of, the waiting task of grade will be called to carry out priority processing, to guarantee the efficiency of data processing.
Current timed task is identified outgoing packet task according to label information, for message by scheme provided in this embodiment Task start Database lock is handled, to realize the data processing of flexibility, meets the needs of each business, and will wait It is arranged to task and calls rank, the waiting task of grade will be called to carry out preferentially, to guarantee the efficiency of data processing.
The present invention further provides a kind of processing units of timed task.
It is the functional block diagram of the processing unit first embodiment of timed task of the present invention referring to Fig. 5, Fig. 5.
In the processing unit first embodiment of timed task of the present invention, the processing unit of the timed task includes:
Module 10 is obtained, for obtaining when detecting that current timed task calls the business datum in presetting database The call request of the current timed task.
It should be noted that the type of the timed task can be message task, it can be also other kinds of task, at this Embodiment with no restriction, in the present embodiment, is illustrated, since business datum is stored in data this by taking message task as an example In library, the timed task needs to call the business datum in the presetting database when being executed, to realize task Normal to execute, the presetting database be the data that pre-selection saves each business execution, such as pre-stored a large number of users Use data.
In the concrete realization, when the timed task needs to call the business datum in the presetting database, first Need to send call request, the call request includes the data information of the timed task, such as times of the timed task Service type and major parameter information etc. can effectively analyze current timed task according to the call request.
Parsing module 20, for being parsed to the call request, the current timed task after obtaining parsing Recalls information judges the task type of the current timed task according to the recalls information.
It should be noted that, in order to guarantee the safety of data, can will generally execute task when timed task executes Data are encrypted, to guarantee the safety of data transmission, in order to obtain the type of timed task, need first to appoint timing The call request of business is parsed, to obtain the details of timed task.
In the concrete realization, in order to distinguish different task, generally when carrying out data transmission, to each different types of Business would generally stamp specific label, or upper specific parameter information is set on label, to realize to current timed task Identification, and be packaged, such as message task, the value of the TypeID of default label can be set as 1, to realize Identification to current task.
In the present embodiment, the call request of timed task is parsed, so that the label information of timed task is obtained, That is TypeID judges the type of timed task according to TypeID, belongs to message task or other tasks.
When enquiry module 30 for the task type in the current timed task is preset kind, obtain described default The Database lock prestored in database, and inquire the currently used state of the Database lock.
It should be noted that in order to keep the Database lock in database more targeted, in the present embodiment, the data Database lock in library is only effective to message task, when the task type for detecting current timed task is message task, institute The Database lock stated in database just comes into force.
It is understood that the Database lock is configuration file in database or is located at a string of database entry Program in machine code form, can also be other forms, the present embodiment to this with no restriction, the Database lock be configuration file when, It can modify to the configuration file, thus meet the needs of different business, the Database lock in the specially described database It can carry out flexible configuration according to the demand of user, such as when user needs the Database lock to come into force other tasks, it can basis The demand of user is adjusted, such as receives the edit instruction of user, is carried out according to the edit instruction to the Database lock Adjustment, to meet the needs of business, realizes the flexibility of Database lock.
Processing module 40, for the call request being put into and is lined up when the currently used state being open state Waiting.
It should be noted that showing currently there is task to exist when the state for inquiring Database lock is open state Processing, and database has been in the state of calling, in this case, avoid multiple tasks execute the calling of database from And logical miss is caused, the timed task for currently needing to call database is carried out lining up to handle, to realize to timed task Orderly management.
In the concrete realization, the call request of current timed task can directly be returned, or once periodically appointed before waiting The calling of business is completed, to avoid multiple timed tasks while call database to the logical miss of data processing occur.
Further, it in the processing module 40, is also used to when the currently used state is in off state, responds institute The call request of current timed task is stated, executes the business datum in the current timed task calling presetting database, and will The currently used state of the Database lock is switched to open state.
In the present embodiment, when inquiring the state of Database lock and being in off state, illustrate that current database is in and do not adjust Can currently it be determined directly in response to the call request of current timed task since database is carrying out in this case with state When task calling, the currently used state of Database lock can be switched to open state, to realize to the reality of Database lock When monitor, guarantee the accurate execution of timed task, realize the order of data processing.
The present embodiment is directed to preset task through the above scheme, by laying in the database that timed task needs to call The Database lock of type performs corresponding processing current timed task by the use state of the Database lock, in data When library lock is in the open state, show that the database is being in use state, in this case by current timed task It carries out lining up to wait, to guarantee the orderly execution of task, improves effective management to timed task.
In addition, to achieve the above object, the present invention also proposes a kind of equipment, the equipment include: memory, processor and It is stored in the processing routine for the timed task that can be run on the memory and on the processor, the place of the timed task The step of reason program is arranged for carrying out the processing method of timed task as described above.
In addition, the embodiment of the present invention also proposes a kind of storage medium, the place of timed task is stored on the storage medium Program is managed, the processing routine of the timed task is executed by processor the step of the processing method of timed task as described above Suddenly.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In computer readable storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are with so that an intelligent terminal is set Standby (can be mobile phone, computer, terminal device, air conditioner or network-termination device etc.) executes each embodiment of the present invention The method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of processing method of timed task, which is characterized in that the processing method of the timed task includes:
When detecting that current timed task calls the business datum in presetting database, the tune of the current timed task is obtained With request;
The call request is parsed, the recalls information of the current timed task after obtaining parsing, according to the tune The task type of the current timed task is judged with information;
When the task type of the current timed task is preset kind, the database prestored in the presetting database is obtained Lock, and inquire the currently used state of the Database lock;
When the currently used state is open state, the call request is put into and lines up to wait.
2. the processing method of timed task as described in claim 1, which is characterized in that described in the current timed task When task type is preset kind, the Database lock prestored in the presetting database is obtained, and inquire the Database lock After currently used state, the method also includes:
When the currently used state is in off state, the call request of the current timed task is responded, is worked as described in execution Preceding timed task calls the business datum in presetting database, and the currently used state of the Database lock is switched to unlatching State.
3. the processing method of timed task as described in claim 1, which is characterized in that described to be solved to the call request Analysis, the recalls information of the current timed task after obtaining parsing judge that the current timing is appointed according to the recalls information The step of task type of business includes:
The call request is compared with default label information, is obtained in the call request according to the comparison result Target labels information extracts the attribute information in the target labels information, using the attribute information as the current timing The recalls information of task;
Corresponding task type is searched in preset relation mapping table according to the recalls information, and the task type found is made For the task type of the current timed task.
4. the processing method of timed task as claimed in claim 3, which is characterized in that it is described according to the recalls information pre- If searching corresponding task type in relation mapping table, using the task type found as the task of the current timed task Before type, the method also includes:
The corresponding relationship for obtaining history recalls information and historic task type, establishes the preset relation according to the corresponding relationship Mapping table.
5. the processing method of timed task according to any one of claims 1 to 4, which is characterized in that described to work as described It is described before obtaining the Database lock prestored in the presetting database when the task type of preceding timed task is preset kind Method further include:
Database lock write instruction is obtained, the Database lock and address to be written in the Database lock write instruction is extracted Information;
Corresponding location information is found in the presetting database according to the address information, according to the positional information will The Database lock is written in the presetting database and is saved.
6. the processing method of timed task according to any one of claims 1 to 4, which is characterized in that the Database lock For the configuration file or program in machine code in the presetting database, the preset kind is type of message;
When the task type in the current timed task is preset kind, the number prestored in the presetting database is obtained It is locked according to library, and inquires the currently used state of the Database lock, comprising:
When the task type of the current timed task is type of message, the database prestored in the presetting database is obtained Lock;
Search the label information that currently used state is represented in configuration file described in the Database lock or program in machine code, root Corresponding status information is searched in preset state table according to the label information, using the status information found as described current Use state.
7. the processing method of timed task according to any one of claims 1 to 4, which is characterized in that described to work as described When preceding use state is open state, the call request is put into after lining up waiting, the method also includes:
The currently used state for monitoring the Database lock in real time is sentenced when the currently used state switching is in off state The disconnected calling grade for lining up the waiting task in waiting;
The calling grade be it is default call grade when, the corresponding waiting task of the default calling grade is preferentially located Reason.
8. a kind of processing unit of timed task, which is characterized in that the processing unit of the timed task includes:
Module is obtained, for working as described in acquisition when detecting that current timed task calls the business datum in presetting database The call request of preceding timed task;
Parsing module, for being parsed to the call request, the calling letter of the current timed task after obtaining parsing Breath, the task type of the current timed task is judged according to the recalls information;
Enquiry module, for the task type in the current timed task be preset kind when, obtain the presetting database In the Database lock that prestores, and inquire the currently used state of the Database lock;
Processing module, for the call request being put into and lines up to wait when the currently used state being open state.
9. a kind of equipment, which is characterized in that the equipment includes: memory, processor and is stored on the memory and can The processing routine of the processing routine of the timed task run on the processor, the timed task is arranged for carrying out such as right It is required that the step of processing method of timed task described in any one of 1 to 7.
10. a kind of storage medium, which is characterized in that the processing routine of timed task is stored on the storage medium, it is described fixed When task processing routine the processing of the timed task as described in any one of claims 1 to 7 is realized when being executed by processor The step of method.
CN201811254501.7A 2018-10-25 2018-10-25 Processing method, device, equipment and the storage medium of timed task Pending CN109634726A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811254501.7A CN109634726A (en) 2018-10-25 2018-10-25 Processing method, device, equipment and the storage medium of timed task
PCT/CN2018/122834 WO2020082563A1 (en) 2018-10-25 2018-12-21 Scheduled task processing method, apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811254501.7A CN109634726A (en) 2018-10-25 2018-10-25 Processing method, device, equipment and the storage medium of timed task

Publications (1)

Publication Number Publication Date
CN109634726A true CN109634726A (en) 2019-04-16

Family

ID=66066682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811254501.7A Pending CN109634726A (en) 2018-10-25 2018-10-25 Processing method, device, equipment and the storage medium of timed task

Country Status (2)

Country Link
CN (1) CN109634726A (en)
WO (1) WO2020082563A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111163145A (en) * 2019-12-23 2020-05-15 北京数衍科技有限公司 Distributed data timing and uniform sending method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5161227A (en) * 1989-11-13 1992-11-03 International Business Machines Corporation Multilevel locking system and method
CN103645909A (en) * 2013-12-30 2014-03-19 中国烟草总公司湖南省公司 Handling method and device for timed task
CN106406993A (en) * 2016-09-06 2017-02-15 努比亚技术有限公司 Timed task management method and system
CN106570027A (en) * 2015-10-10 2017-04-19 阿里巴巴集团控股有限公司 Transactional task processing method and device
CN107092523A (en) * 2017-04-14 2017-08-25 浙江数链科技有限公司 The dispatching method and system of timed task
CN107688500A (en) * 2017-07-26 2018-02-13 阿里巴巴集团控股有限公司 A kind of distributed task scheduling processing method, device, system and equipment
CN108132830A (en) * 2016-12-01 2018-06-08 北京金山云网络技术有限公司 A kind of method for scheduling task, apparatus and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102317913B (en) * 2011-07-30 2016-11-16 华为技术有限公司 A kind of transaction recovery method and transaction recovery device
CN103761148B (en) * 2014-01-26 2017-04-05 北京京东尚科信息技术有限公司 The control method of cluster timer-triggered scheduler task
CN108182108A (en) * 2017-12-19 2018-06-19 山东浪潮商用系统有限公司 A kind of timed task cluster and its execution method
CN108388599B (en) * 2018-02-01 2022-08-02 平安科技(深圳)有限公司 Electronic device, data migration and calling method and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5161227A (en) * 1989-11-13 1992-11-03 International Business Machines Corporation Multilevel locking system and method
CN103645909A (en) * 2013-12-30 2014-03-19 中国烟草总公司湖南省公司 Handling method and device for timed task
CN106570027A (en) * 2015-10-10 2017-04-19 阿里巴巴集团控股有限公司 Transactional task processing method and device
CN106406993A (en) * 2016-09-06 2017-02-15 努比亚技术有限公司 Timed task management method and system
CN108132830A (en) * 2016-12-01 2018-06-08 北京金山云网络技术有限公司 A kind of method for scheduling task, apparatus and system
CN107092523A (en) * 2017-04-14 2017-08-25 浙江数链科技有限公司 The dispatching method and system of timed task
CN107688500A (en) * 2017-07-26 2018-02-13 阿里巴巴集团控股有限公司 A kind of distributed task scheduling processing method, device, system and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111163145A (en) * 2019-12-23 2020-05-15 北京数衍科技有限公司 Distributed data timing and uniform sending method and device and electronic equipment
CN111163145B (en) * 2019-12-23 2022-04-05 北京数衍科技有限公司 Distributed data timing and uniform sending method and device and electronic equipment

Also Published As

Publication number Publication date
WO2020082563A1 (en) 2020-04-30

Similar Documents

Publication Publication Date Title
US6847975B2 (en) Proxy processing method
CN103197968B (en) A kind of thread pool disposal route and system merging synchronous asynchronous feature
CN104202360B (en) The method of accessed web page, device and router
CN109002295A (en) A kind of static code scan method, system, server and storage medium
CN109829287A (en) Api interface permission access method, equipment, storage medium and device
CN108717379A (en) Electronic device, distributed task dispatching method and storage medium
CN110851248A (en) Asynchronous task data processing method and device and computer readable storage medium
CN104516885A (en) Implementation method and device of browse program double-kernel assembly
CN114064152A (en) Embedded multi-core debugging system based on dynamic loading and debugging method thereof
CN108959384A (en) Web data acquisition methods, device, computer equipment and storage medium
CN106649640A (en) Instant search method and device
CN110473097A (en) Transaction monitoring method, terminal and computer readable storage medium
CN103701653B (en) The processing method of a kind of interface hot plug configuration data and network configuration server
CN107396423A (en) Method for network access and device, storage medium and electronic installation
CN112217849B (en) Task scheduling method, system and computer equipment in SD-WAN system
CN110515696A (en) Information monitoring method and device
CN109634726A (en) Processing method, device, equipment and the storage medium of timed task
CN110516130A (en) Metadata processing method and device, storage medium, electronic device
CN112199200A (en) Resource scheduling method and device, computer equipment and storage medium
KR100553652B1 (en) Connection information management system which manages connection information used for communication between IC cards
CN114610290A (en) Digital intelligent industrial configuration system
EP1383293A2 (en) Connection information management system for managing connection information used in communications between IC cards
KR101040822B1 (en) Content Management System and Method for Downloading Content to Mobile Communication Terminal
CN116881040A (en) Service operation processing method and device, electronic device and storage medium
JP3950752B2 (en) apparatus

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190416