WO2020232878A1 - 基于Spring MVC的定时任务处理方法、装置和计算机设备 - Google Patents

基于Spring MVC的定时任务处理方法、装置和计算机设备 Download PDF

Info

Publication number
WO2020232878A1
WO2020232878A1 PCT/CN2019/102926 CN2019102926W WO2020232878A1 WO 2020232878 A1 WO2020232878 A1 WO 2020232878A1 CN 2019102926 W CN2019102926 W CN 2019102926W WO 2020232878 A1 WO2020232878 A1 WO 2020232878A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
timing
timed
path
identifier
Prior art date
Application number
PCT/CN2019/102926
Other languages
English (en)
French (fr)
Inventor
许永夫
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020232878A1 publication Critical patent/WO2020232878A1/zh

Links

Images

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • 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
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • 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/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • 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/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to a Spring MVC-based timing task processing method, device, computer equipment, and storage medium.
  • Timed tasks are tasks that need to be executed regularly by the system, and timed tasks will be triggered to execute under certain trigger conditions.
  • Spring MVC is a web-layer "model-view-controller" framework. The existing Spring MVC triggers the execution of timed tasks by adding configuration timed tasks to the Spring MVC configuration file, which is read when the system starts. After obtaining the configuration file, the information of the timing task is directly read out at one time and saved in the memory to execute the timing task when the trigger condition is met.
  • the inventor realizes that in the above method, the system will no longer execute the step of obtaining timed tasks according to the configuration file. This causes the problem that if the timed tasks are modified through the configuration file, the modified timed tasks will not be read. Until the system is restarted, the modified timed task can be executed by reading the configuration file. However, every time the configuration file of the timed task is modified, the system needs to be restarted, which will affect the normal use of the system.
  • a Spring MVC-based timing task processing method includes:
  • the attributes including the triggering condition, task identifier and task path of the timing task;
  • the task identifier and the task path are transferred to the task scheduler, so that the task scheduler executes the timing task when inquiring about the timing task corresponding to the task identifier according to the task path.
  • a timing task processing device based on Spring MVC including:
  • An acquiring module configured to acquire the latest attributes configured for a timed task in a database table, the attributes including the triggering condition, task identifier and task path of the timed task;
  • the event object creation module is used to create an event object inherited from the event interface class according to the attribute, and publish the event object when the trigger condition is met;
  • the listener object creation module is used to create a listener object used to monitor whether the event object is published and inherited from the listener interface class;
  • the timing task acquisition module is used to acquire the task identifier and task path of the timing task corresponding to the event object when the event object is monitored through the listener object;
  • the timing task execution module is used to transmit the task identifier and the task path to the task scheduler, so that the task scheduler executes the timing task corresponding to the task identifier according to the task path.
  • the timing task is used to transmit the task identifier and the task path to the task scheduler, so that the task scheduler executes the timing task corresponding to the task identifier according to the task path. The timing task.
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
  • the attributes including the triggering condition, task identifier and task path of the timing task;
  • the task identifier and the task path are transferred to the task scheduler, so that the task scheduler executes the timing task when inquiring about the timing task corresponding to the task identifier according to the task path.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the one or more processors execute the following steps:
  • the attributes including the triggering condition, task identifier and task path of the timing task;
  • the task identifier and the task path are transferred to the task scheduler, so that the task scheduler executes the timing task when inquiring about the timing task corresponding to the task identifier according to the task path.
  • Fig. 1 is an application scenario diagram of a Spring MVC-based timing task processing method according to one or more embodiments.
  • Fig. 2 is a schematic flow chart of a method for processing timed tasks based on Spring MVC according to one or more embodiments.
  • Fig. 3 is a block diagram of a device for processing timed tasks based on Spring MVC according to one or more embodiments.
  • Figure 4 is a block diagram of a computer device according to one or more embodiments.
  • the timed task processing method based on Spring MVC provided in this application can be applied to the application environment shown in FIG. 1.
  • the timed task server 102 communicates with the database server 104 via the network.
  • the timed task server 102 can obtain the latest attributes configured for the timed task in the database table of the database server 104, the attributes including the triggering condition of the timed task, the task identifier and the task path; and create inherited events based on the attributes
  • a method for processing timed tasks based on Spring MVC is provided. Taking the method applied to the timed task server 102 in FIG. 1 as an example for description, the method includes the following steps:
  • Step S202 Obtain the latest attributes configured for the timed task in the database table.
  • the attributes include the triggering condition of the timed task, the task identifier and the task path.
  • the database table is a data table used to configure timing tasks in the database server.
  • the timed task server can read the latest attributes configured for the timed task in the database table from the database server in real time, including the triggering condition, task identification and task path of the timed task.
  • the trigger condition of the timed task is a condition used to trigger the execution of the timed task, such as a certain time node on a certain day, and the execution of the timed task is triggered when the time node is reached.
  • the task identifier is used to uniquely identify the timing task, and the corresponding timing task can be determined according to the task identifier.
  • the task path is a path for storing processing classes used to process timed tasks.
  • the task path can correspond to multiple processing classes, that is, multiple processing functions.
  • the database table may be a database table in the Quartz framework.
  • the timed task server can read the parameter value of each field used to configure the timed task in the database table in real time, and obtain the attribute configured for the timed task after analyzing the parameter value according to the description rule of each field.
  • the following are the fields included in the database table in some embodiments:
  • CLASS_PATH indicates the task path
  • METHOD_NAME Represents the processing class name of the processing class
  • CORN_EXPRESSION indicates the trigger condition
  • LOCK_MINUTES indicates the locked time of the timing task after the lock operation is executed
  • UPDATEE_BY The person who modified the configuration information
  • step S202 namely obtaining the latest attributes configured for the timed task in the database table, specifically includes: reading the database table in the database in real time; parsing the value corresponding to the field in the database table used to indicate the status of the timed task; When the value corresponding to the field indicates that the timed task has taken effect, the field used to identify the timed task in the database table is parsed to obtain the task identifier; the field used to indicate the timed task path in the database table is parsed to obtain the task path.
  • a large number of timed tasks can be configured in the database through the database table.
  • Each piece of configuration information corresponds to a timed task. Only when the corresponding value of the field used to indicate the status of the timed task in the database table indicates that the configuration information has taken effect, Steps after step S202 are performed.
  • the field used to identify the timed task in the database table can be further analyzed to obtain the task identifier, and the database table used to indicate the timed task path is analyzed Field to get the task path. That is, the timed task status is used to determine whether the timed task corresponding to the configuration information is valid, and then whether to process it is determined.
  • Step S204 Create an event object inherited from the event interface class according to the attributes, and publish the event object when the trigger condition is met.
  • the event object records the specific information of the timing task. After the properties of the timed task in the database table are obtained, an event object including these properties can be created according to the properties of the timed task.
  • the event interface class can be the interface class ApplicationEvent in the Spring MVC framework, and an event object QuartzEvent that inherits from the interface class ApplicationEvent in the Spring MVC framework can be created.
  • the event object inherits the characteristics of the event interface class.
  • the event object QuartzEvent is the implementation class of ApplicationEvent.
  • the implementation class is the concrete realization method or object of the interface class. Specifically, creating an event object based on the properties of a timed task essentially means that the properties of the created event object include the task ID of the timed task, task path, processing class name, trigger condition, task status, etc., that is, to pass the acquired properties To the created event object.
  • publishing the event object refers to registering the event object in the system, that is, when the system is started, the event object will call the ApplicationEventPublisher class when the trigger condition of the timing task is met
  • publishEvent the event is published through the event broadcaster, and the event object corresponding to the timing task is delivered to the listener object in the system.
  • Step S206 Create a listener object that is used to monitor whether the event object is published and inherited from the listener interface class.
  • the listener object is the listener of the event object, and can also be called the receiver of the event object. Specifically, after the event object corresponding to the timing task is created, a listener object for monitoring the event object can also be created.
  • the listener interface class can be the ApplicationListener interface class in the Spring MVC framework.
  • a listener object QuartzListenerEnhance inherited from the ApplicationListener interface class in the Spring MVC framework is created.
  • the listener object QuartzListenerEnhance is a specific implementation class.
  • Step S208 When the release of the event object is monitored through the listener object, the task identifier and task path of the timing task corresponding to the event object are obtained.
  • the event object in the system when the event object in the system is released through the event broadcaster, it will be received by the listener object.
  • the listener object listens to the release of an event object, it obtains the task ID and the task ID of the timing task corresponding to the event object.
  • the task path can use the created event object QuartzEvent as the function parameter of the created listener object QuartzListenerEnhance.
  • QuartzListenerEnhance When the QuartzEvent is released, QuartzListenerEnhance will obtain all the properties of the timed task in QuartzEvent, including the task ID and task path of the timed task.
  • sample code of the created event object is as follows:
  • the sample code of the created listener object is as follows:
  • QuartzListenerEnhance implements ApplicationListener ⁇ QuartzEvent>
  • step S210 the task identifier and the task path are passed to the task scheduler, so that the task scheduler executes the timed task when the task scheduler finds the timed task corresponding to the task identifier according to the task path.
  • the task scheduler can store a large number of timed tasks.
  • the listener object receives the attributes of the timed task, The attribute will be passed to the task scheduler, and the task scheduler can search for the timed task corresponding to the task identifier according to the task path, and execute the timed task through the processing class corresponding to the timed task in the task path.
  • the timing task is: send a short message every five minutes.
  • the event object can perform the task according to the latest trigger condition of the timed task after obtaining the updated configuration information When the event is released, the updated timing task can be executed directly when the event is monitored, without restarting the system.
  • the configuration of the timing task is realized through the database table, so that the properties of the timing task can be modified in the database table at any time, and the modification of the timing task can be directly based on the latest properties after the modification. No need to restart the system when performing scheduled tasks.
  • You only need to get the latest properties configured for timing tasks in the database table create event objects inherited from the event interface class and create listener objects inherited from the listener interface class according to the latest properties; when the event is monitored through the listener object
  • the task ID and task path of the timed task corresponding to the event object are obtained, and the task ID and task path are passed to the task scheduler.
  • the task scheduler can query the task according to the task path. Identify the corresponding timing task and execute it.
  • the above method further includes: displaying the page for configuring the timed task; obtaining the modification operation for the attribute of the timed task triggered in the page; obtaining the latest attribute of the timed task according to the modification operation;
  • the attributes are passed to the event object so that the event object is published according to the updated attributes.
  • the database server can display the page for configuring the timed task.
  • the database server can obtain the modification operation triggered by the user, and obtain the latest attributes of the timed task according to the modification operation. To pass the latest properties to the created event object.
  • the timed task server obtains the latest trigger condition and passes it to the event object. After the system is started, the event object is released according to the latest trigger condition.
  • the timed task server obtains the latest task path, queries the timed task corresponding to the task identifier from the latest task path, and calls the latest task path when the trigger condition is met.
  • the processing class in the task path executes timing tasks.
  • the timed task server will not receive the registration of the created event object corresponding to the timed task when the system is started. In this way, even if the trigger condition is met, The event object will not be released, so it is impossible to perform timing tasks.
  • the configuration information of the timed task can be modified at any time, and the event object can publish events according to the modified attributes, so that the system can be executed directly according to the latest modified attributes without restarting the system.
  • the attribute further includes the name of the processing class used to execute the timed task
  • Obtaining the task identification and task path of the timing task corresponding to the event object in step S208 specifically includes: acquiring the task identification, task path, and processing class name of the timing task corresponding to the event object;
  • step S210 the task identifier and the task path are transferred to the task scheduler, so that when the task scheduler finds the timed task corresponding to the task identifier according to the task path, the execution of the timed task specifically includes: the task identification, task path, and processing class
  • the name is passed to the task scheduler, so that when the task scheduler finds the timed task corresponding to the task identifier according to the task path, it calls the processing function corresponding to the processing class name to execute the timed task.
  • the name of the processing class corresponds to the function that specifically executes the timing task.
  • the task scheduler follows The task path queries the timing task corresponding to the task identifier, and calls and transfers the processing class name to execute the timing task.
  • the timing task includes a first timing task and a second timing task; the attributes of the first timing task are configured by the first server and then stored in the database table, and the attributes of the second timing task are configured by the second server.
  • the first timed task and the second timed task correspond to the same processing class; the method further includes: receiving a request initiated by the first server to execute the first timed task; and processing the class corresponding to the first timed task Perform a lock operation; when a request for executing a second timing task initiated by a second server is received during the execution of the first timing task, the second timing task is added to the message queue; when the first timing task is After the execution of the task is finished, perform the lock release operation on the processing class of the first timed task; perform the lock operation on the processing class of the second timed task in the message queue; when the execution of the second timed task ends, process the second timed task
  • the class performs a lock release operation.
  • the timed task server After receiving the request for executing the first timed task sent by the first server, the timed task server will execute the first timed task according to the request when the trigger condition of the first timed task is met, and upon receiving the first timed task
  • the timed task server executes the second timed task according to the request when the trigger condition of the second timed task is met, but because the first timed task corresponds to the second timed task
  • the timed task server executes the second timed task according to the request when the trigger condition of the second timed task is met, but because the first timed task corresponds to the second timed task
  • the timed task server executes the second timed task according to the request when the trigger condition of the second timed task is met, but because the first timed task corresponds to the second timed task
  • the configuration information of each timing task also includes the time LOCK_MINUTES for locking the processing class corresponding to the timing task, that is, the processing class is only used for the period of time when the processing class is locked To process the current timing task, when the lock time arrives, the lock release operation is performed on the processing class.
  • the timing task processing method based on Spring MVC specifically includes the following steps:
  • the task ID, processing class name and task path of the timing task corresponding to the event object are obtained;
  • the processing class name, task identifier and task path are passed to the task scheduler, so that when the task scheduler finds the timed task corresponding to the task identifier according to the task path, it will call the processing function corresponding to the processing class name to execute the timed task.
  • the other timed task is added to the message queue
  • steps in the flowchart of FIG. 2 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • a Spring MVC-based timing task processing device 300 including: an acquisition module 302, an event object creation module 304, a listener object creation module 306, and a timing task acquisition module 308 And the timing task execution module 310:
  • the obtaining module 302 is used to obtain the latest attributes configured for the timed task in the database table, the attributes include the triggering condition of the timed task, the task identifier and the task path;
  • the event object creation module 304 is configured to create an event object inherited from the event interface class according to attributes, and publish the event object when the trigger condition is met;
  • the listener object creation module 306 is used to create a listener object that is used to monitor whether the event object is published and inherits from the listener interface class;
  • the timing task acquisition module 308 is used for acquiring the task identification and task path of the timing task corresponding to the event object when the event object is monitored through the listener object;
  • the timing task execution module 310 is configured to transmit the task identifier and the task path to the task scheduler, so that the task scheduler executes the timing task when the task scheduler finds the timing task corresponding to the task identifier according to the task path.
  • the acquiring module 302 is also used to read the database table in the database in real time; to parse the value corresponding to the field in the database table used to indicate the status of the timed task; when the value corresponding to the field indicates that the timed task has taken effect, Then, the field used to identify the timed task in the database table is parsed to obtain the task identifier; the field used to indicate the timed task path in the database table is parsed to obtain the task path.
  • the above-mentioned device further includes a timed task update module, the timed task update module is used to display the page for configuring the timed task; obtain the modification operation of the attribute of the timed task triggered in the page; obtain according to the modification operation The latest attribute of the timed task; the latest attribute is passed to the event object, so that the event object is published according to the updated attribute.
  • the timed task update module is used to display the page for configuring the timed task; obtain the modification operation of the attribute of the timed task triggered in the page; obtain according to the modification operation The latest attribute of the timed task; the latest attribute is passed to the event object, so that the event object is published according to the updated attribute.
  • the attribute further includes the name of the processing class used to execute the timing task;
  • the timing task acquisition module 308 is also used to acquire the task identifier, task path, and processing class name of the timing task corresponding to the event object;
  • the timing task execution module 310 is also used to pass the task identifier, task path, and processing class name to the task scheduler, so that when the task scheduler finds the timing task corresponding to the task identifier according to the task path, it will call the processing function corresponding to the processing class name to execute the timing task.
  • the timing task includes a first timing task and a second timing task; the attributes of the first timing task are configured by the first server and then stored in the database table, and the attributes of the second timing task are configured by the second server.
  • the first timed task and the second timed task correspond to the same processing class; the above-mentioned device also includes a request receiving module, a locking module, an adding module, and a lock releasing module.
  • the request receiving module is used to receive the request initiated by the first server.
  • the request for executing the first timed task the lock module is used to perform the lock operation on the processing class corresponding to the first timed task; the add module is used to receive the second server during the execution of the first timed task
  • the second timing task is added to the message queue;
  • the release lock module is used to release the lock on the processing class of the first timing task after the execution of the first timing task is completed Operation;
  • the lock module is also used to perform lock operations on the processing class of the second timed task in the message queue;
  • the release lock module is also used to release the lock on the processing class of the second timed task after the execution of the second timed task ends operating.
  • the above-mentioned Spring MVC-based timing task processing device realizes the configuration of timing tasks through the database table, so that the properties of the timing tasks can be modified in the database table at any time, and the modification of the timing tasks can be implemented directly according to the latest properties after modification. No need to restart the system when timing tasks.
  • You only need to get the latest properties configured for timing tasks in the database table create event objects inherited from the event interface class and create listener objects inherited from the listener interface class according to the latest properties; when the event is monitored through the listener object
  • the task ID and task path of the timed task corresponding to the event object are obtained, and the task ID and task path are passed to the task scheduler.
  • the task scheduler can query the task according to the task path. Identify the corresponding timing task and execute it.
  • Each module in the above-mentioned Spring MVC-based timing task processing device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 4.
  • the computer equipment includes a processor, a memory, and a network interface connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and computer readable instructions.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the computer-readable instructions are executed by the processor to implement a Spring MVC-based timing task processing method.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the Spring MVC timing task processing apparatus may be implemented in a form of computer-readable instructions, and the computer-readable instructions may run on the computer device as shown in FIG. 4.
  • the memory of the computer device can store various program modules that make up the Spring MVC timing task processing device, for example, the acquisition module 302, the event object creation module 304, the listener object creation module 306, and the timing task acquisition module 308 shown in FIG. 3 And the timing task execution module 310.
  • the computer-readable instructions formed by each program module cause the processor to execute the steps in the Spring MVC timing task processing method of each embodiment of the application described in this specification.
  • the computer device shown in FIG. 4 may execute step S202 through the acquisition module 302 in the Spring MVC timing task processing apparatus shown in FIG. 3.
  • the computer device may execute step S204 through the event object creation module 304.
  • the computer device may execute step S206 through the listener object creation module 306.
  • the computer device can execute step S208 through the timing task acquisition module 308.
  • the computer device may execute step S210 through the timing task execution module 310.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors implement the methods provided in any of the embodiments of the present application. The steps of the timed task processing method based on Spring MVC.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the one or more processors implement any one of the embodiments of the present application. Provides the steps of the timed task processing method based on Spring MVC.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Channel
  • memory bus Radbus direct RAM
  • RDRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种基于Spring MVC的定时任务处理方法,包括:获取在数据库表中为定时任务配置的最新的属性,属性包括定时任务的触发条件、任务标识和任务路径;根据属性创建继承自事件接口类的事件对象并在满足所述触发条件时,发布所述事件对象;创建用于监听事件对象是否发布的、且继承自监听器接口类的监听器对象;当通过监听器对象监听到事件对象发布时,则获取事件对象所对应定时任务的任务标识和任务路径;将任务标识和任务路径传递至任务调度器,以使任务调度器在按照任务路径查询到与任务标识对应的定时任务时,执行定时任务。

Description

基于Spring MVC的定时任务处理方法、装置和计算机设备
本申请要求于2019年05月23日提交中国专利局,申请号为201910433920.5,申请名称为“基于Spring MVC的定时任务处理方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种基于Spring MVC的定时任务处理方法、装置、计算机设备和存储介质。
背景技术
定时任务是需要系统定时执行的任务,定时任务会在一定的触发条件下触发执行。Spring MVC是一种Web层的“模型-视图-控制器”框架,现有的Spring MVC中触发执行定时任务的方式是通过在Spring MVC配置文件中添加配置定时任务实现的,在系统启动时读取配置文件从而将定时任务的信息直接一次性读取出来后,保存在内存中,以在满足触发条件时执行该定时任务。
但是,发明人意识到,在上述方式中,系统不会再执行根据配置文件获取定时任务的步骤,这样导致的问题是若通过配置文件修改了定时任务,修改后的定时任务不会被读取到,只能通过重新启动系统后,再通过读取配置文件执行修改后的定时任务,但是这样每修改一次定时任务的配置文件都需要重启系统,就会影响系统的正常使用。
发明内容
根据本申请公开的各种实施例,提供一种基于Spring MVC的定时任务处理方法,所述方法包括:
获取在数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;
根据所述属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;
创建继承自监听器接口类的监听器对象;
当通过所述监听器对象监听到所述事件对象发布时,则获取所述事件对象所对应定时任务的任务标识和任务路径;及
将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。
一种基于Spring MVC的定时任务处理装置,包括:
获取模块,用于获取在数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;
事件对象创建模块,用于根据所述属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;
监听器对象创建模块,用于创建用于监听所述事件对象是否发布的、且继承自监听器接口类的监听器对象;
定时任务获取模块,用于当通过所述监听器对象监听到所述事件对象发布时,则获取所述事件对象所对应定时任务的任务标识和任务路径;及
定时任务执行模块,用于将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取在数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;
根据所述属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;
创建用于监听所述事件对象是否发布的、且继承自监听器接口类的监听器对象;
当通过所述监听器对象监听到所述事件对象发布时,则获取所述事件对象所对应定时任务的任务标识和任务路径;及
将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
获取在数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;
根据所述属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;
创建用于监听所述事件对象是否发布的、且继承自监听器接口类的监听器对象;
当通过所述监听器对象监听到所述事件对象发布时,则获取所述事件对象所对应定时任务的任务标识和任务路径;及
将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中基于Spring MVC的定时任务处理方法的应用场景图。
图2为根据一个或多个实施例中基于Spring MVC的定时任务处理方法的流程示意图。
图3为根据一个或多个实施例中基于Spring MVC的定时任务处理装置的框图。
图4为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的基于Spring MVC的定时任务处理方法,可以应用于如图1所示的应用环境中。定时任务服务器102通过网络与数据库服务器104进行通信。定时任务服务器102可以获取在数据库服务器104的数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;并根据所述属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;定时任务服务器102还创建用于监听事件对象是否发布的、且继承自监听器接口类的监听器对象;当通过所述监听器对象监听到所述事件对象发布时,则监听器对象可以获取到所述事件对象所对应定时任务的任务标识和任务路径;定时任务服务器102就可以将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。定时任务服务器以及数据库服务器都可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一些实施例中,如图2所示,提供了一种基于Spring MVC的定时任务处理方法,以该方法应用于图1中的定时任务服务器102为例进行说明,包括以下步骤:
步骤S202,获取在数据库表中为定时任务配置的最新的属性,属性包括定时任务的触发条件、任务标识和任务路径。
数据库表是数据库服务器中用于配置定时任务的数据表。当系统启动时,定时任务服务器可以从数据库服务器中实时地读取数据库表中为定时任务配置的最新的属性,包括定时任务的触发条件、任务标识和任务路径。定时任务的触发条件是用于触发执行定时任务的条件,比如某一天的某个时间节点,当到达该时间节点时触发执行定时任务。任务标识用于唯一标识定时任务,可以根据任务标识确定与之对应的定时任务。任务路径是存放用于处理定时任务的处理类的路径,任务路径可以对应多个处理类,即多个处理函数。在一些实施例中,数据库表可以是Quartz框架中的数据库表。
定时任务服务器可以实时读取数据库表中用于配置定时任务的每个字段的参数值,按照各个字段的描述规则解析参数值后得到为该定时任务配置的属性。以下为一些实施例中数据库表所包括的字段有:
ID:表示任务标识;
CLASS_PATH:表示任务路径;
METHOD_NAME:表示处理类的处理类名;
CORN_EXPRESSION:表示触发条件;
LOCK_MINUTES:表示定时任务在被执行加锁操作后的被锁时间;
IS_ENABLE:是否生效;
CREATED_BY:该条配置信息的创建人;
CREATED_DATE:创建时间;
UPDATEE_BY:配置信息的修改人;
UPDATED_DATE:修改时间。
在需要配置某一个条定时任务时,就可以在数据库表中设置BEAN_ID、CLASS_PATH、METHOD_NAME,并按照规则设置作为触发条件的时间表达式CORN-EXPRESSION,将IS_ENABLE设置为启用,则任务调度器会在系统启动后按照触发条件调用定时任务的处理类自动执行该定时任务。
在一些实施例中,步骤S202即获取在数据库表中为定时任务配置的最新的属性具体包括:实时读取数据库中的数据库表;解析数据库表中用于表示定时任务状态的字段对应的值;当字段对应的值表示定时任务已生效时,则解析数据库表中用于标识定时任务的字段,得到任务标识;解析数据库表中用于表示定时任务路径的字段,得到任务路径。
数据库中可通过数据库表对大量的定时任务进行配置,每条配置信息对应了一个定时任务,当数据库表中用于表示定时任务状态的字段对应的值表示该条配置信息已经生效时,才会执行步骤S202之后的步骤。定时任务状态可以用字段IS_ENABLE来表示,可以根据该字段对应的值确定定时任务的配置信息是否生效,比如若IS_ENABLE=1则代表该配置信息生效,若IS_ENABLE=0则代表该配置信息未生效。
具体地,当根据表示定时任务状态的字段对应的值确定定时任务已经生效时,可以进一步解析该数据库表中用于标识定时任务的字段得到任务标识,解析该数据库表中用于表示定时任务路径的字段,得到任务路径。也就是,通过定时任务状态确定配置信息对应的定时任务是否生效再决定是否对其进行处理。
步骤S204,根据属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象。
事件对象记录了定时任务的具体信息。当获取到数据库表中定时任务的属性后,可以根据定时任务的属性创建包括这些属性的事件对象。
事件接口类可以是Spring MVC框架中的接口类ApplicationEvent,可以创建继承自 Spring MVC框架中的接口类ApplicationEvent的事件对象QuartzEvent,事件对象继承了该事件接口类的特性,事件对象QuartzEvent是ApplicationEvent的实现类,实现类是接口类的具体实现方法或对象。具体地,根据定时任务的属性创建事件对象实质上就是创建的事件对象的属性包括定时任务的任务标识、任务路径、处理类名、触发条件、任务状态等等,也就是将获取的这些属性传递给创建的事件对象。
由于事件对象的属性包括定时任务的触发条件,将事件对象发布指的是将该事件对象注册到系统中,也就是当系统启动后,该事件对象会在满足定时任务的触发条件时调用ApplicationEventPublisher类中的publishEvent,通过事件广播器将事件发布出去,将与定时任务对应的该事件对象传递给系统内的监听器对象。
步骤S206,创建用于监听事件对象是否发布的、且继承自监听器接口类的监听器对象。
监听器对象是事件对象的监听者,也可以称之为事件对象的接收者。具体地,在创建了与定时任务对应的事件对象后,还可以创建用于对该事件对象进行监听的监听器对象。监听器接口类可以是Spring MVC框架中的接口类ApplicationListener,创建继承自Spring MVC框架中的接口类ApplicationListener的监听器对象QuartzListenerEnhance,监听器对象QuartzListenerEnhance是具体的实现类。当将某个事件对象作为监听器对象的传递参数时,监听器对象就可以监听该事件对象的发布。
步骤S208,当通过监听器对象监听到事件对象发布时,则获取事件对象所对应定时任务的任务标识和任务路径。
具体地,当系统中的事件对象通过事件广播器发布之后,就会被监听器对象接收到,监听器对象在监听到某个事件对象发布时,就获取事件对象所对应定时任务的任务标识和任务路径可以将创建的事件对象QuartzEvent作为创建的监听器对象QuartzListenerEnhance的函数参数,当QuartzEvent发布时,QuartzListenerEnhance就会获取QuartzEvent中定时任务的所有属性,包括定时任务的任务标识和任务路径。
比如,创建的事件对象的示例代码如下:
public class QuartzEvent extends ApplicationEvent{
private Long id;
private String corn;
private Bool isenable;
private String classpath;
private String methodname;
}
创建的监听器对象的示例代码如下:
public class QuartzListenerEnhance implements ApplicationListener<QuartzEvent>
{
public void onApplicationEvent(EventTest event)
{
}
}
步骤S210,将任务标识和任务路径传递至任务调度器,以使任务调度器在按照任务路径查询到与任务标识对应的定时任务时,执行定时任务。
具体地,可以通过任务调度器的工厂类创建任务调度器实例并初始化后启动该任务调度器,任务调度器中可以存放大量的定时任务,在监听器对象接收到关于定时任务的属性时,就会将该属性传递至任务调度器,任务调度器可以根据任务路径查找与任务标识对应的定时任务,并通过该任务路径中与该定时任务对应的处理类执行该定时任务。
在一些具体的应用场景中,定时任务为:每五分钟外发一条短信。就可以在数据库表中配置一个短信外发的定时任务,设置BEAN_ID、CLASS_PATH、METHOD_NAME,并设置好触发条件CORN-EXPRESSION(每五分钟执行),将IS_ENABLE设置为启用,则系统会自动创建与该定时任务相关的事件对象和事件监听器,并通过任务调度器按照时间表达式执行该定时任务。若用户对该定时任务进行修改以实现每10分钟外发一条短信,则修改CORN-EXPRESSION对应的值即可,事件对象可以在获取到更新后的配置信息后,根据定时任务最新的触发条件进行事件发布,就可以直接在监测到该事件时执行更新后的定时任务,而不需要重启系统。
上述基于Spring MVC的定时任务处理方法中,通过数据库表实现对定时任务的配置,这样可以随时在数据库表中修改定时任务的属性,实现对定时任务的修改,可以直接根据修改后的最新的属性执行定时任务时而不需要重启系统。只需要获取在数据库表中为定时任务配置的最新的属性,根据最新的属性创建继承自事件接口类的事件对象以及创建继承自监听器接口类的监听器对象;当通过监听器对象监听到事件对象根据定时任务的触发条件发布时,则获取事件对象所对应定时任务的任务标识和任务路径,并将任务标识和任务路径传递至任务调度器,任务调度器就可以按照任务路径查询到与任务标识对应的定时任务并执行。
在其中一个实施例中,上述方法还包括:展示对定时任务进行配置的页面;获取在页面中触发的针对定时任务的属性的修改操作;根据修改操作获取定时任务的最新的属性;将最新的属性传递至事件对象,以使事件对象按照更新后的属性进行发布。
具体地,数据库服务器可以展示对定时任务进行配置的页面,当用户修改了定时任务的配置信息并保存后,数据库服务器就可以获取到用户触发的修改操作,根据修改操作获取定时任务的最新的属性,将最新的属性传递至创建的事件对象。
在其中一个实施例中,修改操作针对的属性是触发条件,则定时任务服务器获取到最新的触发条件并传递给事件对象,在系统启动后,事件对象就根据最新的触发条件进行发布。
在其中一个实施例中,修改操作针对的属性是任务路径,则定时任务服务器获取最新的任务路径,从最新的任务路径中查询与任务标识对应的定时任务,并在满足触发条件时,调用最新的任务路径中的处理类执行定时任务。
在其中一个实施例中,修改操作针对的属性是任务状态,则定时任务服务器将会在系统启动时,不接收已创建的与该定时任务对应的事件对象的注册,这样,即便满足触发条件,事件对象也不会发布,从而无法执行定时任务。
上述实施例中,可以随时对定时任务的配置信息进行修改,事件对象可以按照修改后的属性发布事件,就可以实现直接根据修改后的最新的属性执行定时任务时而不需要重启系统。
在其中一个实施例中,属性还包括用于执行定时任务的处理类名;
步骤S208中的获取事件对象所对应定时任务的任务标识和任务路径具体包括:获取事件对象所对应定时任务的任务标识、任务路径和处理类名;
步骤S210,即将任务标识和任务路径传递至任务调度器,以使任务调度器在按照任务路径查询到与任务标识对应的定时任务时,执行定时任务具体包括:将任务标识、任务路径和处理类名传递至任务调度器,以使任务调度器在按照任务路径查询到与任务标识对应的定时任务时,调用处理类名对应的处理函数执行定时任务。
处理类名对应了具体执行定时任务的函数。当通过监听器对象监听到事件对象的发布时,就获取该事件对象所包括的定时任务的属性,并将获取的任务标识、任务路径和处理类名传递给任务调度器时,任务调度器按照任务路径查询到与任务标识对应的定时任务,并调用与传递的处理类名执行该定时任务。
在其中一个实施例中,定时任务包括第一定时任务和第二定时任务;第一定时任务的属性由第一服务器配置后存储到数据库表中,第二定时任务的属性由第二服务器配置后存储到数据库表中;第一定时任务和第二定时任务对应了同一处理类;方法还包括:接收第一服务器发起的用于执行第一定时任务的请求;对第一定时任务对应的处理类执行加锁操作;当在执行第一定时任务的过程中,接收到第二服务器发起的用于执行第二定时任务的请求时,则将第二定时任务添加至消息队列中;当第一定时任务执行结束后,对第一定时任务的处理类执行释放锁操作;对消息队列中的第二定时任务的处理类执行加锁操作;当第二定时任务执行结束后,对二定时任务的处理类执行释放锁操作。
具体地,在接收到第一服务器发送的用于执行第一定时任务的请求后,定时任务服务器根据该请求,在满足第一定时任务的触发条件时会执行第一定时任务,在接收到第二服务器发送的用于执行第二定时任务的请求后,定时任务服务器根据该请求,在满足第二定时任务的触发条件时执行第二定时任务,但是由于第一定时任务和第二定时任务对应了同一处理类,如果这两个请求同时提交则只能保证最先到来的请求对应的操作可以执行,也就是在先到来的请求获得了该处理类的锁,而在后到来的需要等待,会被添加至定时任务消息队列中。因此,在执行第一定时任务之前,需要对根据第一定时任务的锁时间对处理 类执行加锁操作,并将在后到来的第二定时任务添加至定时任务消息队列中,在第一定时任务执行结束之后,对第一定时任务的处理类执行释放锁操作,然后再按照第二定时任务的加锁时间对在后的第二定时任务的处理类执行加锁操作,直至第二定时任务执行结束后对其处理类执行释放锁操作。
在其中一个实施例中,在每个定时任务的配置信息中,还包括对该定时任务对应的处理类进行锁定的时间LOCK_MINUTES,也就是在处理类被锁的该段时间内该处理类仅用于处理当前的定时任务,当锁定时间到达时,则对该处理类执行释放锁操作。
在一个具体的实施例中,基于Spring MVC的定时任务处理方法具体包括以下步骤:
实时读取数据库中的数据库表;
解析数据库表中用于表示定时任务状态的字段对应的值;
当字段对应的值表示定时任务已生效时,则
解析数据库表中用于标识定时任务的字段,得到任务标识;
解析数据库表中用于表示定时任务路径的字段,得到任务路径;
解析数据库表中用于表示定时任务的触发条件的字段,得到触发条件;
根据任务标识、任务路径、触发条件创建继承自事件接口类的事件对象,并在满足触发条件时,发布所述事件对象;
当获取到针对定时任务的属性的修改操作时,则根据修改操作获取定时任务的最新的属性;
将最新的属性传递至事件对象,以使事件对象按照更新后的属性进行发布;
创建用于监听事件对象是否发布的、且继承自监听器接口类的监听器对象;
当通过监听器对象监听到事件对象发布时,则获取事件对象所对应定时任务的任务标识、处理类名和任务路径;
将处理类名、任务标识和任务路径传递至任务调度器,以使任务调度器在按照任务路径查询到与任务标识对应的定时任务时,调用处理类名对应的处理函数执行定时任务。
在执行定时任务之前,对定时任务对应的处理类执行加锁操作;
当在执行第一定时任务的过程中,接收到根据该处理类执行另一定时任务的请求时,则将该另一定时任务添加至消息队列中;
当定时任务执行结束后,对定时任务的处理类执行释放锁操作;
对消息队列中的该另一定时任务的处理类执行加锁操作;
当该另一定时任务执行结束后,对对应的处理类执行释放锁操作。
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进 行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图3所示,提供了一种基于Spring MVC的定时任务处理装置300,包括:获取模块302、事件对象创建模块304、监听器对象创建模块306、定时任务获取模块308和定时任务执行模块310:
获取模块302,用于获取在数据库表中为定时任务配置的最新的属性,属性包括定时任务的触发条件、任务标识和任务路径;
事件对象创建模块304,用于根据属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;
监听器对象创建模块306,用于创建用于监听事件对象是否发布的、且继承自监听器接口类的监听器对象;
定时任务获取模块308,用于当通过监听器对象监听到事件对象发布时,则获取事件对象所对应定时任务的任务标识和任务路径;
定时任务执行模块310,用于将任务标识和任务路径传递至任务调度器,以使任务调度器在按照任务路径查询到与任务标识对应的定时任务时,执行定时任务。
在其中一个实施例中,获取模块302还用于实时读取数据库中的数据库表;解析数据库表中用于表示定时任务状态的字段对应的值;当字段对应的值表示定时任务已生效时,则解析数据库表中用于标识定时任务的字段,得到任务标识;解析数据库表中用于表示定时任务路径的字段,得到任务路径。
在其中一个实施例中,上述装置还包括定时任务更新模块,定时任务更新模块用于展示对定时任务进行配置的页面;获取在页面中触发的针对定时任务的属性的修改操作;根据修改操作获取定时任务的最新的属性;将最新的属性传递至事件对象,以使事件对象按照更新后的属性进行发布。
在其中一个实施例中,属性还包括用于执行定时任务的处理类名;定时任务获取模块308还用于获取事件对象所对应定时任务的任务标识、任务路径和处理类名;定时任务执行模块310还用于将任务标识、任务路径和处理类名传递至任务调度器,以使任务调度器在按照任务路径查询到与任务标识对应的定时任务时,调用处理类名对应的处理函数执行定时任务。
在其中一个实施例中,定时任务包括第一定时任务和第二定时任务;第一定时任务的属性由第一服务器配置后存储到数据库表中,第二定时任务的属性由第二服务器配置后存储到数据库表中,第一定时任务和第二定时任务对应了同一处理类;上述装置还包括请求接收模块、加锁模块、添加模块和释放锁模块,请求接收模块用于接收第一服务器发起的用于执行第一定时任务的请求;加锁模块用于对第一定时任务对应的处理类执行加锁操作;添加模块用于当在执行第一定时任务的过程中,接收到第二服务器发起的用于执行第 二定时任务的请求时,则将第二定时任务添加至消息队列中;释放锁模块用于当第一定时任务执行结束后,对第一定时任务的处理类执行释放锁操作;加锁模块还用于对消息队列中的第二定时任务的处理类执行加锁操作;释放锁模块还用于当第二定时任务执行结束后,对二定时任务的处理类执行释放锁操作。
上述基于Spring MVC的定时任务处理装置,通过数据库表实现对定时任务的配置,这样可以随时在数据库表中修改定时任务的属性,实现对定时任务的修改,可以直接根据修改后的最新的属性执行定时任务时而不需要重启系统。只需要获取在数据库表中为定时任务配置的最新的属性,根据最新的属性创建继承自事件接口类的事件对象以及创建继承自监听器接口类的监听器对象;当通过监听器对象监听到事件对象根据定时任务的触发条件发布时,则获取事件对象所对应定时任务的任务标识和任务路径,并将任务标识和任务路径传递至任务调度器,任务调度器就可以按照任务路径查询到与任务标识对应的定时任务并执行。
关于基于Spring MVC的定时任务处理装置的具体限定可以参见上文中对于基于Spring MVC的定时任务处理方法的限定,在此不再赘述。上述基于Spring MVC的定时任务处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口。该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机可读指令被处理器执行时以实现一种基于Spring MVC的定时任务处理方法。
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,本申请提供的Spring MVC的定时任务处理装置可以实现为一种计算机可读指令的形式,计算机可读指令可在如图4所示的计算机设备上运行。计算机设备的存储器中可存储组成该Spring MVC的定时任务处理装置的各个程序模块,比如,图3所示的获取模块302、事件对象创建模块304、监听器对象创建模块306、定时任务获取模块308和定时任务执行模块310。各个程序模块构成的计算机可读指令使得处理器执行本说明书中描述的本申请各个实施例的Spring MVC的定时任务处理方法中的步骤。
例如,图4所示的计算机设备可以通过如图3所示的Spring MVC的定时任务处理装置中的获取模块302执行步骤S202。计算机设备可通过事件对象创建模块304执行步骤S204。计算机设备可通过监听器对象创建模块306执行步骤S206。计算机设备可通过定 时任务获取模块308执行步骤S208。计算机设备可通过定时任务执行模块310执行步骤S210。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的基于Spring MVC的定时任务处理方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的基于Spring MVC的定时任务处理方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种基于Spring MVC的定时任务处理方法,包括:
    获取在数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;
    根据所述属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;
    创建用于监听所述事件对象是否发布的、且继承自监听器接口类的监听器对象;
    当通过所述监听器对象监听到所述事件对象发布时,则获取所述事件对象所对应定时任务的任务标识和任务路径;及
    将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。
  2. 根据权利要求1所述的方法,其特征在于,所述获取在数据库表中为定时任务配置的最新的属性,包括:
    实时读取数据库中的数据库表;
    解析所述数据库表中用于表示定时任务状态的字段对应的值;
    当所述字段对应的值表示所述定时任务已生效时,则
    解析所述数据库表中用于标识定时任务的字段,得到任务标识;及
    解析所述数据库表中用于表示定时任务路径的字段,得到任务路径。
  3. 根据权利要求1所述的方法,其特征在于,还包括:
    展示对定时任务进行配置的页面;
    获取在所述页面中触发的针对所述定时任务的属性的修改操作;
    根据所述修改操作获取所述定时任务的最新的属性;及
    将最新的属性传递至所述事件对象,以使所述事件对象按照所述更新后的属性进行发布。
  4. 根据权利要求1所述的方法,其特征在于,所述属性还包括用于执行所述定时任务的处理类名;
    所述获取所述事件对象所对应定时任务的任务标识和任务路径,包括:
    获取所述事件对象所对应定时任务的任务标识、任务路径和处理类名;
    所述将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务,包括:
    将所述任务标识、任务路径和处理类名传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,调用所述处理类名对应的处理函数执行所述定时任务。
  5. 根据权利要求1所述的方法,其特征在于,所述定时任务包括第一定时任务和第二定时任务;所述第一定时任务的属性由第一服务器配置后存储到数据库表中,所述第二 定时任务的属性由第二服务器配置后存储到数据库表中;所述第一定时任务和所述第二定时任务对应了同一处理类;还包括:
    接收第一服务器发起的用于执行所述第一定时任务的请求;
    对所述第一定时任务对应的处理类执行加锁操作;
    当在执行所述第一定时任务的过程中,接收到第二服务器发起的用于执行所述第二定时任务的请求时,则将所述第二定时任务添加至消息队列中;
    当所述第一定时任务执行结束后,对所述第一定时任务的处理类执行释放锁操作;
    对所述消息队列中的第二定时任务的处理类执行加锁操作;及
    当所述第二定时任务执行结束后,对所述二定时任务的处理类执行释放锁操作。
  6. 一种基于Spring MVC的定时任务处理装置,包括:
    获取模块,用于获取在数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;
    事件对象创建模块,用于根据所述属性创建继承自事件接口类的事件对象并在满足所述触发条件时,发布所述事件对象;
    监听器对象创建模块,用于创建用于监听所述事件对象是否发布的、且继承自监听器接口类的监听器对象;
    定时任务获取模块,用于当通过所述监听器对象监听到所述事件对象发布时,则获取所述事件对象所对应定时任务的任务标识和任务路径;及
    定时任务执行模块,用于将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。
  7. 根据权利要求6所述的装置,其特征在于,所述获取模块具体还用于:
    实时读取数据库中的数据库表;
    解析所述数据库表中用于表示定时任务状态的字段对应的值;
    当所述字段对应的值表示所述定时任务已生效时,则
    解析所述数据库表中用于标识定时任务的字段,得到任务标识;及
    解析所述数据库表中用于表示定时任务路径的字段,得到任务路径。
  8. 根据权利要求6所述的装置,其特征在于,还包括定时任务更新模块,所述定时任务更新模块用于:
    展示对定时任务进行配置的页面;
    获取在所述页面中触发的针对所述定时任务的属性的修改操作;
    根据所述修改操作获取所述定时任务的最新的属性;
    将最新的属性传递至所述事件对象,以使所述事件对象按照所述更新后的属性进行发布。
  9. 根据权利要求6所述的装置,其特征在于,所述定时任务获取模块还用于:
    获取所述事件对象所对应定时任务的任务标识、任务路径和处理类名;
    所述定时任务执行模块还用于:
    将所述任务标识、任务路径和处理类名传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,调用所述处理类名对应的处理函数执行所述定时任务。
  10. 根据权利要求6所述的装置,其特征在于,所述定时任务包括第一定时任务和第二定时任务;所述第一定时任务的属性由第一服务器配置后存储到数据库表中,所述第二定时任务的属性由第二服务器配置后存储到数据库表中;所述第一定时任务和所述第二定时任务对应了同一处理类;
    所述装置还包括加锁操作模块,具体用于:
    接收第一服务器发起的用于执行所述第一定时任务的请求;
    对所述第一定时任务对应的处理类执行加锁操作;
    当在执行所述第一定时任务的过程中,接收到第二服务器发起的用于执行所述第二定时任务的请求时,则将所述第二定时任务添加至消息队列中;
    当所述第一定时任务执行结束后,对所述第一定时任务的处理类执行释放锁操作;
    对所述消息队列中的第二定时任务的处理类执行加锁操作;及
    当所述第二定时任务执行结束后,对所述二定时任务的处理类执行释放锁操作。
  11. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取在数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;
    根据所述属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;
    创建用于监听所述事件对象是否发布的、且继承自监听器接口类的监听器对象;
    当通过所述监听器对象监听到所述事件对象发布时,则获取所述事件对象所对应定时任务的任务标识和任务路径;及
    将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述获取在数据库表中为定时任务配置的最新的属性时,所述计算机可读指令还被所述处理器执行以下步骤:
    实时读取数据库中的数据库表;
    解析所述数据库表中用于表示定时任务状态的字段对应的值;
    当所述字段对应的值表示所述定时任务已生效时,则
    解析所述数据库表中用于标识定时任务的字段,得到任务标识;及
    解析所述数据库表中用于表示定时任务路径的字段,得到任务路径。
  13. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    展示对定时任务进行配置的页面;
    获取在所述页面中触发的针对所述定时任务的属性的修改操作;
    根据所述修改操作获取所述定时任务的最新的属性;及
    将最新的属性传递至所述事件对象,以使所述事件对象按照所述更新后的属性进行发布。
  14. 根据权利要求11所述的计算机设备,其特征在于,所述属性还包括用于执行所述定时任务的处理类名;所述处理器执行所述获取所述事件对象所对应定时任务的任务标识和任务路径时,所述计算机可读指令时还被所述处理器执行以下步骤:
    获取所述事件对象所对应定时任务的任务标识、任务路径和处理类名;
    所述处理器执行所述将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务时,所述计算机可读指令时还执行以下步骤:
    将所述任务标识、任务路径和处理类名传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,调用所述处理类名对应的处理函数执行所述定时任务。
  15. 根据权利要求11所述的计算机设备,其特征在于,所述定时任务包括第一定时任务和第二定时任务;所述第一定时任务的属性由第一服务器配置后存储到数据库表中,所述第二定时任务的属性由第二服务器配置后存储到数据库表中;所述第一定时任务和所述第二定时任务对应了同一处理类;
    所述处理器执行所述计算机可读指令时还执行以下步骤:
    接收第一服务器发起的用于执行所述第一定时任务的请求;
    对所述第一定时任务对应的处理类执行加锁操作;
    当在执行所述第一定时任务的过程中,接收到第二服务器发起的用于执行所述第二定时任务的请求时,则将所述第二定时任务添加至消息队列中;
    当所述第一定时任务执行结束后,对所述第一定时任务的处理类执行释放锁操作;
    对所述消息队列中的第二定时任务的处理类执行加锁操作;及
    当所述第二定时任务执行结束后,对所述二定时任务的处理类执行释放锁操作。
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机 可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取在数据库表中为定时任务配置的最新的属性,所述属性包括所述定时任务的触发条件、任务标识和任务路径;
    根据所述属性创建继承自事件接口类的事件对象,并在满足所述触发条件时,发布所述事件对象;
    创建用于监听所述事件对象是否发布的、且继承自监听器接口类的监听器对象;
    当通过所述监听器对象监听到所述事件对象发布时,则获取所述事件对象所对应定时任务的任务标识和任务路径;及
    将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务。
  17. 根据权利要求16所述的存储介质,其特征在于,所述处理器执行所述获取在数据库表中为定时任务配置的最新的属性时,所述计算机可读指令还被所述处理器执行以下步骤:
    实时读取数据库中的数据库表;
    解析所述数据库表中用于表示定时任务状态的字段对应的值;
    当所述字段对应的值表示所述定时任务已生效时,则
    解析所述数据库表中用于标识定时任务的字段,得到任务标识;及
    解析所述数据库表中用于表示定时任务路径的字段,得到任务路径。
  18. 根据权利要求16所述的存储介质,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    展示对定时任务进行配置的页面;
    获取在所述页面中触发的针对所述定时任务的属性的修改操作;
    根据所述修改操作获取所述定时任务的最新的属性;及
    将最新的属性传递至所述事件对象,以使所述事件对象按照所述更新后的属性进行发布。
  19. 根据权利要求16所述的存储介质,其特征在于,所述属性还包括用于执行所述定时任务的处理类名;所述处理器执行所述获取所述事件对象所对应定时任务的任务标识和任务路径时,所述计算机可读指令时还被所述处理器执行以下步骤:
    获取所述事件对象所对应定时任务的任务标识、任务路径和处理类名;
    所述处理器执行所述将所述任务标识和所述任务路径传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,执行所述定时任务时,所述计算机可读指令时还执行以下步骤:
    将所述任务标识、任务路径和处理类名传递至任务调度器,以使所述任务调度器在按照所述任务路径查询到与所述任务标识对应的定时任务时,调用所述处理类名对应的处理函数执行所述定时任务。
  20. 根据权利要求16所述的存储介质,其特征在于,所述定时任务包括第一定时任务和第二定时任务;所述第一定时任务的属性由第一服务器配置后存储到数据库表中,所述第二定时任务的属性由第二服务器配置后存储到数据库表中;所述第一定时任务和所述第二定时任务对应了同一处理类;
    所述处理器执行所述计算机可读指令时还执行以下步骤:
    接收第一服务器发起的用于执行所述第一定时任务的请求;
    对所述第一定时任务对应的处理类执行加锁操作;
    当在执行所述第一定时任务的过程中,接收到第二服务器发起的用于执行所述第二定时任务的请求时,则将所述第二定时任务添加至消息队列中;
    当所述第一定时任务执行结束后,对所述第一定时任务的处理类执行释放锁操作;
    对所述消息队列中的第二定时任务的处理类执行加锁操作;及
    当所述第二定时任务执行结束后,对所述二定时任务的处理类执行释放锁操作。
PCT/CN2019/102926 2019-05-23 2019-08-28 基于Spring MVC的定时任务处理方法、装置和计算机设备 WO2020232878A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910433920.5A CN110334126B (zh) 2019-05-23 2019-05-23 基于Spring MVC的定时任务处理方法、装置和计算机设备
CN201910433920.5 2019-05-23

Publications (1)

Publication Number Publication Date
WO2020232878A1 true WO2020232878A1 (zh) 2020-11-26

Family

ID=68139037

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102926 WO2020232878A1 (zh) 2019-05-23 2019-08-28 基于Spring MVC的定时任务处理方法、装置和计算机设备

Country Status (2)

Country Link
CN (1) CN110334126B (zh)
WO (1) WO2020232878A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076186A (zh) * 2021-05-07 2021-07-06 泰康保险集团股份有限公司 任务处理的方法、装置、电子设备和存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506624A (zh) * 2020-10-29 2021-03-16 望海康信(北京)科技股份公司 定时任务调度系统、方法及相应计算机设备和存储介质
CN112540861B (zh) * 2020-12-08 2023-09-08 北京奇艺世纪科技有限公司 数据采集方法、数据处理方法、装置及电子设备
CN112463348B (zh) * 2021-01-27 2021-06-15 北京搜狐新媒体信息技术有限公司 一种定时任务处理方法及装置
CN113672409A (zh) * 2021-08-24 2021-11-19 贵州电子商务云运营有限责任公司 一种基于一个定时任务执行多种不同业务事件的方法
CN114510282B (zh) * 2021-12-15 2024-02-13 北京达佳互联信息技术有限公司 一种自动化应用的运行方法、装置、设备以及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013167362A (ja) * 2013-06-04 2013-08-29 Tai-Her Yang スプリング装置
CN104156265A (zh) * 2014-08-08 2014-11-19 乐得科技有限公司 定时任务的处理方法和处理装置
CN108287923A (zh) * 2018-02-28 2018-07-17 山东汇贸电子口岸有限公司 一种可视化接口数据智能提取系统及其设计方法
CN108733468A (zh) * 2017-04-20 2018-11-02 北京京东尚科信息技术有限公司 定时任务动态配置方法及装置、存储介质及服务器集群

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105809299A (zh) * 2014-12-27 2016-07-27 华为技术有限公司 业务流程管理的通知服务处理的方法及业务流程管理引擎
US9881265B2 (en) * 2015-01-30 2018-01-30 Oracle International Corporation Method and system for implementing historical trending for business records
CN108399095B (zh) * 2017-02-04 2021-08-10 北京京东尚科信息技术有限公司 支持动态管理定时任务的方法、系统、设备和存储介质
CN109359809A (zh) * 2018-09-03 2019-02-19 中国平安人寿保险股份有限公司 工作任务分配方法、系统、计算机设备和存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013167362A (ja) * 2013-06-04 2013-08-29 Tai-Her Yang スプリング装置
CN104156265A (zh) * 2014-08-08 2014-11-19 乐得科技有限公司 定时任务的处理方法和处理装置
CN108733468A (zh) * 2017-04-20 2018-11-02 北京京东尚科信息技术有限公司 定时任务动态配置方法及装置、存储介质及服务器集群
CN108287923A (zh) * 2018-02-28 2018-07-17 山东汇贸电子口岸有限公司 一种可视化接口数据智能提取系统及其设计方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076186A (zh) * 2021-05-07 2021-07-06 泰康保险集团股份有限公司 任务处理的方法、装置、电子设备和存储介质
CN113076186B (zh) * 2021-05-07 2023-07-28 泰康保险集团股份有限公司 任务处理的方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN110334126B (zh) 2024-02-27
CN110334126A (zh) 2019-10-15

Similar Documents

Publication Publication Date Title
WO2020232878A1 (zh) 基于Spring MVC的定时任务处理方法、装置和计算机设备
CN110704458B (zh) 数据同步方法、装置、计算机设备及存储介质
AU2016359508B2 (en) Page jumping method and apparatus
WO2021027365A1 (zh) 事件监控方法、装置、计算机设备和存储介质
CN109542529B (zh) 基于函数名称的埋点方法、装置、计算机设备及存储介质
CN108874558B (zh) 分布式事务的消息订阅方法、电子装置及可读存储介质
CN109766253B (zh) 一种性能数据发送方法、装置、计算机设备及存储介质
CN110825420A (zh) 分布式集群的配置参数更新方法、装置、设备及存储介质
CN110597918B (zh) 一种账户管理方法、装置及计算机可读存储介质
WO2020151181A1 (zh) 基于区块链的跨平台数据更新方法、装置和计算机设备
WO2019075774A1 (zh) 设备参数配置方法、装置、计算机设备和存储介质
US20150278057A1 (en) System and method for testing an event processing system with multiple input event streams
CN111159233B (zh) 分布式缓存方法、系统、计算机设备以及存储介质
US10140196B2 (en) System and method for configuring a sliding window for testing an event processing system based on a system time
CN112905323B (zh) 数据处理方法、装置、电子设备及存储介质
CN110764894A (zh) 一种定时任务管理方法、装置、设备及存储介质
CN106941418B (zh) Ssl vpn配置信息的同步方法和装置
CN108399095B (zh) 支持动态管理定时任务的方法、系统、设备和存储介质
CN111580948A (zh) 任务调度方法、装置及计算机设备
CN112235352B (zh) 一种服务依赖梳理方法和装置
CN110955460B (zh) 一种服务进程启动方法、装置、电子设备和存储介质
CN111435356A (zh) 数据特征提取方法、装置、计算机设备以及存储介质
CN112637085B (zh) 流量录制方法、装置、计算机设备和存储介质
WO2021189895A1 (zh) 配置数据的管理方法、装置、设备及存储介质
CN110990054B (zh) 一种开源框架的配置处理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19929760

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19929760

Country of ref document: EP

Kind code of ref document: A1