CN111124547B - Task processing method and device - Google Patents

Task processing method and device Download PDF

Info

Publication number
CN111124547B
CN111124547B CN201911368192.0A CN201911368192A CN111124547B CN 111124547 B CN111124547 B CN 111124547B CN 201911368192 A CN201911368192 A CN 201911368192A CN 111124547 B CN111124547 B CN 111124547B
Authority
CN
China
Prior art keywords
target
task
behavior event
handle
configuration 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.)
Active
Application number
CN201911368192.0A
Other languages
Chinese (zh)
Other versions
CN111124547A (en
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 Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201911368192.0A priority Critical patent/CN111124547B/en
Publication of CN111124547A publication Critical patent/CN111124547A/en
Application granted granted Critical
Publication of CN111124547B publication Critical patent/CN111124547B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a task processing method and device, which are applied to a server, wherein the method comprises the following steps: if the server monitors a target behavior event, a target registry corresponding to the target behavior event is obtained, whether a target task corresponding to the target behavior event is configured in the target registry is queried, if yes, whether a handle is configured in a target configuration table corresponding to the target task is queried, the handle comprises configuration information, if the handle is configured in the target configuration table, the configuration information corresponding to the handle is executed, if the configuration information is configured to be completed, the target task is determined to be completed, if the handle is not configured in the target configuration table, the target task is determined to be completed, so that the configuration information corresponding to the target task can be configured through the handle, the whole business process does not need to be reconfigured, the development timeliness and the task processing efficiency are improved, and the development pressure is reduced.

Description

Task processing method and device
Technical Field
The present application relates to the field of data processing, and in particular, to a task processing method and device.
Background
The microcommunity is a forum community based on a mobile terminal, can support and bind a microcommunity public account number, a mobile phone QQ living account number and the like, and the microcommunity platform is actually a mobile interaction platform, so that in order to mobilize the enthusiasm of users, the interaction interestingness is increased, background configurators can unscheduled activities such as focus on point sending activities, topic voting sun sending value activities and the like, and because the activity items are various, each time the activity items are changed, the background configurators need to be developed again, the timeliness is low, the development pressure is increased, and the manpower is wasted.
Disclosure of Invention
The embodiment of the application provides a task processing method and device, which are beneficial to improving task processing efficiency.
A first aspect of an embodiment of the present application provides a task processing method, applied to a server, where the method includes:
if the server monitors a target behavior event, acquiring a target registry corresponding to the target behavior event;
inquiring whether a target task corresponding to the target behavior event is configured in the target registry or not;
if yes, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information;
If the handle is configured in the target configuration table, executing configuration information corresponding to the handle;
if the configuration information is configured to be completed, determining that the target task is completed;
and if the handle is not configured in the target configuration table, determining that the target task is completed. A second aspect of an embodiment of the present application provides a task processing device, including: an acquisition unit, a query unit, an execution unit and a determination unit, wherein,
the acquisition unit is used for acquiring a target registry corresponding to the target behavior event if the server monitors the target behavior event;
the inquiring unit is used for inquiring whether the target registry is configured with a target task corresponding to the target behavior event or not;
the query unit is further configured to query whether a handle is configured in a target configuration table corresponding to the target task, if yes, where the handle includes configuration information;
the execution unit is used for executing configuration information corresponding to the handle if the handle is configured in the target configuration table;
the determining unit is used for determining that the target task is completed if the configuration information is configured to be completed;
The determining unit is further configured to determine that the target task is completed if the handle is not configured in the target configuration table.
A third aspect of the embodiments of the present application provides a server, the server including a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being connected to each other, wherein the memory is configured to store a computer program, the computer program including program instructions, the processor being configured to invoke the program instructions to perform the method according to the first aspect of the embodiments of the present application.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform part or all of the steps described in the first aspect of the embodiments of the present application.
A fifth aspect of the embodiments of the present application provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The implementation of the embodiment of the application has at least the following beneficial effects:
through the embodiment of the application, the method applied to the server comprises the following steps: if the server monitors a target behavior event, a target registry corresponding to the target behavior event is obtained, whether a target task corresponding to the target behavior event is configured in the target registry is queried, if yes, whether a handle is configured in a target configuration table corresponding to the target task is queried, the handle comprises configuration information, if the handle is configured in the target configuration table, the configuration information corresponding to the handle is executed, if the configuration information is configured to be completed, the target task is determined to be completed, if the handle is not configured in the target configuration table, the target task is determined to be completed, so that the configuration information corresponding to the target task can be configured through the handle, the whole business process does not need to be reconfigured, the development timeliness and the task processing efficiency are improved, and the development pressure is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a task processing method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a task processing method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a task processing method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a task processing device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
In order to better understand the embodiments of the present application, a method for applying the embodiments of the present application will be described below.
The servers referred to in the embodiments of the present application may include, but are not limited to, background servers, component servers, cloud servers, task processing system servers, task processing software servers, and the like, which are merely examples, but are not exhaustive, including but not limited to the devices described above.
Referring to fig. 1, fig. 1 is a flow chart of a task processing method provided in an embodiment of the present application, applied to a server, where the method includes the following steps:
101. if the server monitors a target behavior event, acquiring a target registry corresponding to the target behavior event;
Wherein the target behavioral event may include at least one of: browsing behavior, collection behavior, praise behavior, comment behavior, attention behavior, etc., without limitation; the target acting as an event can be understood as a behavior event triggered by a target user during operation, the operation behavior of the user can be packaged into a behavior event, the behavior event is sent to a Message Queue (MQ), the message queue is sent to a task processor for processing, if the user triggers a plurality of target behavior events, the target behavior events can be processed in parallel, in addition, a plurality of registries can be configured in the server, and any behavior event triggered by the user can be monitored through the registries.
Alternatively, multiple listening ports may be created in the server, each listening port may correspond to one type of behavioral event, and multiple listening ports may be utilized to listen for multiple types of behavioral events.
Optionally, in step 101, the obtaining the target registry corresponding to the target behavior event may include the following steps:
11. acquiring behavior data carried in the target behavior event;
12. determining an activity type corresponding to the behavior data;
13. And acquiring a preset registry corresponding to the activity type as the target registry.
The server may preset a plurality of registries, and may preset a plurality of activity types for the plurality of preset registries, each preset registry may correspond to a type of preset activity, and the activity types may include at least one of the following: shopping promotions, microcommunity recommendations, and the like, are not limited herein.
Specifically, if the server monitors a target behavior event, behavior data carried in the target behavior event can be obtained, the behavior data can be understood as log data generated by a user through some behaviors, and the like, the activity type corresponding to the target behavior event is judged through the behavior data, a preset registry corresponding to the activity type is obtained as a target registry, and the preset registry corresponding to the activity type is the target registry.
102. Inquiring whether a target task corresponding to the target behavior event is configured in the target registry or not;
the server may preset different tasks for different behavior events, and each behavior event may correspond to at least one task, for example, a task may be preset for a collection behavior, where the task may include 3 times if the user completes the collection behavior, and so on. After the server monitors the target behavior event, the server can also directly inquire whether a preset registry corresponding to the target behavior event exists in the database, if so, the server can determine that the target behavior event is the target registry, and inquire whether a target task preset for the target behavior event is configured in the target registry.
Optionally, in the step 102, querying whether the target registry is configured with a target task corresponding to the target behavior event may include the following steps:
21. inquiring whether a task in the target registry monitors the target behavior event or not in the server aiming at the target behavior event;
22. if the task monitors the target behavior event, determining that the target task is configured in the target registry;
23. and if the task monitors the target behavior event, controlling the server to end monitoring the target behavior event.
The server monitors the target behavior event through at least one task in the registry, can preset a plurality of task types for a plurality of tasks, can monitor the same type of behavior event by the tasks of the same task type, when a user triggers the target behavior event, the corresponding target task can respond, if the target task is monitored by the task, the target task is determined to be configured in the target registry, if no task monitors the target behavior event, the target behavior event is not in accordance with the behavior event preset in the server, the subsequent steps can be ended, and the control server ends the monitoring step.
103. If yes, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information;
the target configuration table can be set by a user or default by a system, a plurality of target configuration tables can be preset in a server, the plurality of target configuration tables can correspond to a plurality of handles, each target configuration table can be configured with a handle, the handle can be understood as a message mechanism in a message queue, if the handle is configured with configuration information, whether the target task is completed or not can be judged through the configuration information, if a background manager needs to configure new configuration information, new configuration information can be added through the handle at any time, the configuration information corresponding to the target task can be configured through the handle, the whole business process does not need to be reconfigured, and the pressure of a developer is reduced.
For example, the administrator may set a praise handle for the praise action event, and the configuration information corresponding to the praise handle may be configured as a preset prize, and when the user triggers the praise action event, the preset prize in the praise handle may be obtained, and a preset prize may be issued to the user triggering the praise action event, where the preset prize may be set as a gift event lottery, a gift coupon, or the like, and is not limited herein.
Optionally, after step 103, before querying whether the handle is configured in the target configuration table corresponding to the target task, the method may further include the following steps:
a1, judging whether the target behavior event is effective;
a2, if the target task is effective, storing the behavior data corresponding to the target behavior event in a database, and executing the step of inquiring whether the target task is configured with a handle.
In order to prevent some users from maliciously completing the target task by hopeing to obtain rewards, before inquiring whether the target task is configured with handles, whether the target behavior event is valid or not can be determined, if so, behavior data corresponding to the target behavior event is stored in a database so as to facilitate the next inquiry, and the step of inquiring whether the target task is configured with handles or not is executed.
Optionally, the step A1 of determining whether the target behavior event is valid may include the following steps:
a11, acquiring a preset rule corresponding to the target task;
a12, verifying whether the target behavior event accords with a preset rule;
a13, if the target task is matched with the target task, acquiring the historical completion times corresponding to the target task;
a14, if the historical completion times are smaller than a preset threshold, determining that the target behavior event is valid;
A15, if the historical completion times are greater than or equal to the preset threshold, determining that the target behavior event is invalid.
The preset rule may be set by the user or default, for example, if the target behavior event is a comment event, the preset rule may be set as: the number of comment words exceeds 10 words, pictures are needed to be included in comment, data carried in the target behavior event can be obtained, if the data does not accord with the preset rule, the target event is considered invalid, and a target task corresponding to the target behavior event is not processed.
In addition, the preset threshold may be set by the user or default by the system, if the historical completion times corresponding to the target task exceeds the preset threshold, it is determined that the target behavior event is invalid, and the server does not process the target task corresponding to the target behavior event.
104. If the handle is configured in the target configuration table, executing configuration information corresponding to the handle;
when determining that the target configuration table has the configuration handle, the server may determine that the configuration information corresponds to the target behavior event, for example, if the configuration information is bonus information, the server may indicate that after the target behavior event triggered by the user, the target behavior event corresponds to bonus information, and may feed back the bonus information to the user.
Optionally, in step 104, performing configuration of the configuration information corresponding to the handle may include the following steps:
41. acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class;
42. obtaining a target class corresponding to the handle in the preset dynamic library;
43. obtaining a target agent class corresponding to the target class;
44. and loading the configuration information based on the target agent class.
At least one class can be stored in the preset dynamic library in advance, each class can be correspondingly provided with an interface, one interface can correspond to at least one proxy class, specifically, a target interface corresponding to the handle can be obtained, a target proxy class corresponding to the target class can be obtained through the target interface, the target proxy class can be a character string or other types, and the dynamic loading of the configuration information through the target proxy class is realized through loading the target proxy class.
In addition, the target class can be created in real time, the target function corresponding to the target interface can be acquired, the target class is created through the target function, and the target function corresponding to the target interface can be updated in real time.
Optionally, after the step 104, after executing the configuration information corresponding to the handle, the method may further include the following steps:
B1, acquiring a preset period corresponding to the target behavior event;
and B2, in the preset period, if the configuration information is configured to be completed, determining that the target task is completed.
The preset period may be set by a user or default by the system, different preset periods may be set for different target tasks, the preset period may be set for five times a day, ten times a week, etc., which is not limited herein, and the server may be configured to trigger the target behavior event only in the preset period to be effective, so that, in the preset period, if the configuration information is configured to be completed, that is, the target behavior event has authority to configure the configuration information correspondingly, the completion of the target task may be determined.
105. And if the configuration information is configured to be completed, determining that the target task is completed.
If the configuration information is configured to be completed, it may be determined that the target task is completed, and in one message queue, multiple target behavior events may occur at the same time, then the target task corresponding to the target behavior event may be processed in parallel, if the target task corresponding to the user is processed to be completed, it is determined that the target behavior event corresponding to the user is in an invalid state at the moment, then the target behavior corresponding to the user is generated into a log information and stored in a database, so that the historical behavior event corresponding to the user may be conveniently checked.
In addition, the target task corresponding to the target registry is still effective, and the manager does not need to reset, and the target registry can wait for processing the next target behavior event corresponding to the user or other users, so that the task processing efficiency is improved, the development is simplified, and the labor is saved.
Optionally, some users may intend to obtain rewards and maliciously trigger some user behaviors, in order to prevent such things from happening, an early warning mechanism may be formulated, for example, the server may set trigger thresholds of different levels for various behavior events in advance, where the trigger threshold of each level corresponds to a different early warning level, the higher the level is, the stronger the early warning is, for example, 3 levels of early warning levels may be set, if an abnormal situation occurs in the behavior event corresponding to the user a (the number of times of triggering the behavior event exceeds the first trigger threshold), the first level early warning may be performed for the user a, the first level early warning may be a popup warning, and if the number of times of triggering corresponding to the behavior event B exceeds the third trigger threshold, the third level early warning may be performed for the user B, and the third level early warning may be a sign-sealing process, so that the user may be prevented from maliciously completing the task.
106. And if the handle is not configured in the target configuration table, determining that the target task is completed.
If the handle is not configured in the target configuration table, it indicates that the behavior event has no corresponding configuration information, for example, if the configuration information is the preset reward, if the handle is not configured in the target configuration table corresponding to the target task, it indicates that after the user triggers the target behavior event, no corresponding preset reward is fed back to the user, but the target task may still be considered to be completed.
It can be seen that the task processing method described in the embodiments of the present application is applied to a server, and the method includes: if the server monitors a target behavior event, a target registry corresponding to the target behavior event is obtained, whether a target task corresponding to the target behavior event is configured in the target registry is queried, if yes, whether a handle is configured in a target configuration table corresponding to the target task is queried, the handle comprises configuration information, if the handle is configured in the target configuration table, the configuration information corresponding to the handle is executed, if the configuration information is configured to be completed, the target task is determined to be completed, if the handle is not configured in the target configuration table, the completion of the target task is determined, so that the configuration information corresponding to the target task can be configured through the handle without reconfiguring the whole business flow, the development timeliness and the task processing efficiency are improved, and meanwhile the development pressure is reduced.
In accordance with the foregoing, referring to fig. 2, fig. 2 is a flowchart illustrating a task processing method disclosed in an embodiment of the present application, applied to a server, the task processing method may include the following steps:
201. and if the server monitors the target behavior event, acquiring a target registry corresponding to the target behavior event.
202. And inquiring whether the target behavior event is monitored by a task in the target registry in the server aiming at the target behavior event.
203. And if the task monitors the target behavior event, determining that the target task is configured in the target registry.
204. And if the task monitors the target behavior event, controlling the server to end monitoring the target behavior event.
205. Inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information.
206. If the handle exists in the target configuration table, judging whether the target behavior event is valid or not.
207. And if so, storing the behavior data corresponding to the target behavior event in a database.
208. And acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class.
209. And obtaining a target class corresponding to the handle in the preset dynamic library.
210. Obtaining a target agent class corresponding to the target class;
211. and loading the configuration information based on the target agent class.
The specific description of the steps 201 to 211 may refer to the corresponding steps of the data processing method described in fig. 1, and will not be repeated herein.
It can be seen that the task processing method described in the embodiments of the present application includes: if the server monitors the target behavior event, a target registry corresponding to the target behavior event is acquired, if the target behavior event is monitored by the task in the target registry, the server is queried whether the target behavior event is monitored by the task in the target registry, if the target behavior event is monitored by the task, the target task is configured in the target registry, if the target behavior event is not monitored by the task, the control server finishes monitoring the target behavior event, queries whether a handle is configured in a target configuration table corresponding to the target task, if the handle is included in the handle, judges whether the target behavior event is effective, if the handle is included in the target configuration table, behavior data corresponding to the target behavior event is stored in a database, a preset dynamic library is acquired, the preset dynamic library comprises at least one class, a target class corresponding to the handle in the preset dynamic library is acquired, and a target proxy class corresponding to the target class is acquired.
In accordance with the foregoing, referring to fig. 3, fig. 3 is a flowchart illustrating a task processing method disclosed in an embodiment of the present application, applied to a server, the task processing method may include the following steps:
301. and if the server monitors the target behavior event, acquiring behavior data carried in the target behavior event.
302. And determining the activity type corresponding to the behavior data.
303. And acquiring a preset registry corresponding to the activity type as the target registry.
304. And inquiring whether a target task corresponding to the target behavior event is configured in the target registry.
305. If yes, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information.
306. If yes, acquiring a preset rule corresponding to the target task.
307. And verifying whether the target behavior event accords with a preset rule.
308. And if yes, acquiring the historical completion times corresponding to the target task.
309. And if the historical completion times are smaller than a preset threshold value, determining that the target behavior event is effective.
310. And if the historical completion times are greater than or equal to the preset threshold, determining that the target behavior event is invalid.
311. And if the configuration information is configured to be completed, determining that the target task is completed.
The specific description of the steps 301 to 311 may refer to the corresponding steps of the data processing method described in fig. 1, and will not be repeated herein.
It can be seen that the task processing method described in the embodiments of the present application includes: if the server monitors a target behavior event, acquiring behavior data carried in the target behavior event, determining an activity type corresponding to the behavior data, acquiring a preset registry corresponding to the activity type as the target registry, inquiring whether a target task corresponding to the target behavior event is configured in the target registry, if yes, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information, if yes, acquiring a preset rule corresponding to the target task, verifying whether the target behavior event accords with the preset rule, if yes, acquiring a historical completion number corresponding to the target task, if the historical completion number is smaller than a preset threshold, determining that the target behavior event is valid, if the historical completion number is larger than or equal to the preset threshold, determining that the target behavior event is invalid, if the configuration information is configured to be completed, determining that the target task is completed, and thus, configuring configuration information corresponding to the target task through the handle is not needed, and the whole business process does not need to be reconfigured, and the development efficiency of the task is reduced.
In line with the foregoing, referring to fig. 4, fig. 4 is a schematic structural diagram of a server provided in an embodiment of the present application, as shown in fig. 4, including a processor, a communication interface, a memory, and one or more programs, where the processor, the communication interface, and the memory are connected to each other, and the memory is configured to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the one or more program programs include instructions for performing the following steps:
if the server monitors a target behavior event, acquiring a target registry corresponding to the target behavior event;
inquiring whether a target task corresponding to the target behavior event is configured in the target registry or not;
if yes, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information;
if the handle is configured in the target configuration table, executing configuration information corresponding to the handle;
if the configuration information is configured to be completed, determining that the target task is completed;
and if the handle is not configured in the target configuration table, determining that the target task is completed.
It can be seen that, in the server described in the embodiments of the present application, if the server monitors a target behavior event, a target registry corresponding to the target behavior event is obtained, whether a target task corresponding to the target behavior event is configured in the target registry is queried, if yes, whether a handle is configured in a target configuration table corresponding to the target task is queried, the handle includes configuration information, if the handle is configured in the target configuration table, the configuration information corresponding to the handle is executed, if the configuration information is configured to be completed, the target task is determined to be completed, and if the handle is not configured in the target configuration table, the target task is determined to be completed, so that the configuration information corresponding to the target task can be configured through the handle, the whole business process does not need to be reconfigured, the timeliness of development and the task processing efficiency are improved, and the development pressure is reduced.
In one possible example, in acquiring a target registry corresponding to the target behavioral event, the program is configured to execute instructions for:
acquiring behavior data carried in the target behavior event;
determining an activity type corresponding to the behavior data;
And acquiring a preset registry corresponding to the activity type as the target registry.
In one possible example, in querying whether the target registry is configured with a target task corresponding to the target behavioral event, the program is configured to execute instructions for:
inquiring whether a task in the target registry monitors the target behavior event or not in the server aiming at the target behavior event;
if the task monitors the target behavior event, determining that the target task is configured in the target registry;
and if the task monitors the target behavior event, controlling the server to end monitoring the target behavior event.
In one possible example, after executing the configuration information corresponding to the handle, the program is configured to execute instructions for:
acquiring a preset period corresponding to the target behavior event;
and in the preset period, if the configuration information is configured to be completed, determining that the target task is completed.
In one possible example, before the querying whether the handle is configured in the target configuration table corresponding to the target task, the program is configured to execute the following instructions:
Judging whether the target behavior event is valid or not;
if so, storing the behavior data corresponding to the target behavior event in a database, and executing the step of inquiring whether the target task is configured with a handle.
In one possible example, in determining whether the target behavioral event is valid, the program is configured to execute instructions for:
acquiring a preset rule corresponding to the target task;
verifying whether the target behavior event accords with a preset rule;
if yes, acquiring the historical completion times corresponding to the target task;
if the historical completion times are smaller than a preset threshold value, determining that the target behavior event is effective;
and if the historical completion times are greater than or equal to the preset threshold, determining that the target behavior event is invalid.
In one possible example, in executing configuration information corresponding to the handle, the program is configured to execute instructions for:
acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class;
obtaining a target class corresponding to the handle in the preset dynamic library;
obtaining a target agent class corresponding to the target class;
And loading the configuration information based on the target agent class.
The foregoing description of the embodiments of the present application has been presented primarily in terms of a method-side implementation. It will be appreciated that the server, in order to implement the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied as hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional units of the server according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units. It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice.
In accordance with the foregoing, referring to fig. 5, fig. 5 is a schematic structural diagram of a task processing device disclosed in an embodiment of the present application, which is applied to a server, and the device includes: an acquisition unit 501, a query unit 502, an execution unit 503, and a determination unit 504, wherein,
the obtaining unit 501 is configured to obtain a target registry corresponding to a target behavior event if the server monitors the target behavior event;
the querying unit 502 is configured to query whether a target task corresponding to the target behavior event is configured in the target registry;
the query unit 502 is further configured to query whether a handle is configured in a target configuration table corresponding to the target task, where the handle includes configuration information;
the executing unit 503 is configured to execute configuration information corresponding to the handle if the handle is configured in the target configuration table;
the determining unit 504 is configured to determine that the target task is completed if the configuration information is configured to be completed;
the determining unit 504 is further configured to determine that the target task is completed if the handle is not configured in the target configuration table.
It can be seen that, the task processing device described in the embodiments of the present application is applied to a server, if the device monitors a target behavior event, a target registry corresponding to the target behavior event is obtained, whether a target task corresponding to the target behavior event is configured in the target registry is queried, if yes, whether a handle is configured in a target configuration table corresponding to the target task is queried, the handle includes configuration information, if the handle is configured in the target configuration table, the configuration information corresponding to the handle is executed, if the configuration information is configured to be completed, the target task is determined to be completed, and if the handle is not configured in the target configuration table, the target task is determined to be completed, so that the configuration information corresponding to the target task can be configured through the handle, the whole business process does not need to be reconfigured, the timeliness of development and the task processing efficiency are improved, and the development pressure is reduced.
In one possible example, in terms of acquiring the target registry corresponding to the target behavior event, the acquiring unit 501 is specifically configured to:
acquiring behavior data carried in the target behavior event;
determining an activity type corresponding to the behavior data;
and acquiring a preset registry corresponding to the activity type as the target registry.
In one possible example, in querying whether the target registry is configured with a target task corresponding to the target behavior event, the querying unit 502 is specifically configured to:
inquiring whether a task in the target registry monitors the target behavior event or not in the server aiming at the target behavior event;
if the task monitors the target behavior event, determining that the target task is configured in the target registry;
and if the task monitors the target behavior event, controlling the server to end monitoring the target behavior event.
In one possible example, after executing the configuration information corresponding to the handle, the executing unit 503 is specifically further configured to:
acquiring a preset period corresponding to the target behavior event;
And in the preset period, if the configuration information is configured to be completed, determining that the target task is completed.
In one possible example, before the querying whether the handle is configured in the target configuration table corresponding to the target task, the querying unit 502 is specifically further configured to:
judging whether the target behavior event is valid or not;
if so, storing the behavior data corresponding to the target behavior event in a database, and executing the step of inquiring whether the target task is configured with a handle.
In one possible example, in determining whether the target behavior event is valid, the query unit 502 is specifically further configured to:
acquiring a preset rule corresponding to the target task;
verifying whether the target behavior event accords with a preset rule;
if yes, acquiring the historical completion times corresponding to the target task;
if the historical completion times are smaller than a preset threshold value, determining that the target behavior event is effective;
and if the historical completion times are greater than or equal to the preset threshold, determining that the target behavior event is invalid.
In one possible example, in terms of executing configuration information corresponding to the handle, the executing unit 503 is specifically configured to:
Acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class;
obtaining a target class corresponding to the handle in the preset dynamic library;
obtaining a target agent class corresponding to the target class;
and loading the configuration information based on the target agent class.
The present application also provides a computer-readable storage medium storing a computer program for electronic data exchange, the computer program causing a computer to execute some or all of the steps of any one of the task processing methods described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the task processing methods as set forth in the method embodiments above.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional manners of dividing the actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units described above may be implemented either in hardware or in software program modules.
The integrated units, if implemented in the form of software program modules, may be stored in a computer-readable memory for sale or use as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory includes: a U-disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be implemented by a program that instructs associated hardware, and the program may be stored in a computer readable memory, which may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
The foregoing has outlined rather broadly the more detailed description of embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided solely to assist in the understanding of the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (8)

1. A method for processing tasks, applied to a server, the method comprising:
if the server monitors a target behavior event, acquiring behavior data carried in the target behavior event, determining an activity type corresponding to the behavior data, and acquiring a preset registry corresponding to the activity type as a target registry;
Inquiring whether a target task corresponding to the target behavior event is configured in the target registry or not;
if yes, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information;
if the handle is configured in the target configuration table, executing configuration information corresponding to the handle;
if the configuration information is configured to be completed, determining that the target task is completed;
if the handle is not configured in the target configuration table, determining that the corresponding configuration information does not exist in the target behavior event, and determining that the target task is completed;
the querying whether the target registry is configured with the target task corresponding to the target behavior event includes: inquiring whether a task in the target registry monitors the target behavior event or not in the server aiming at the target behavior event; if the task monitors the target behavior event, determining that the target task is configured in the target registry; and if the task monitors the target behavior event, controlling the server to end monitoring the target behavior event.
2. The method of claim 1, wherein after the performing configures configuration information corresponding to the handle, the method further comprises:
acquiring a preset period corresponding to the target behavior event;
and in the preset period, if the configuration information is configured to be completed, determining that the target task is completed.
3. The method according to claim 1 or 2, wherein before said querying whether a handle is configured in a target configuration table corresponding to the target task, the method further comprises:
judging whether the target behavior event is valid or not;
if so, storing the behavior data corresponding to the target behavior event in a database, and executing the step of inquiring whether the target task is configured with a handle.
4. The method of claim 3, wherein said determining whether said target behavioral event is valid comprises:
acquiring a preset rule corresponding to the target task;
verifying whether the target behavior event accords with a preset rule;
if yes, acquiring the historical completion times corresponding to the target task;
if the historical completion times are smaller than a preset threshold value, determining that the target behavior event is effective;
And if the historical completion times are greater than or equal to the preset threshold, determining that the target behavior event is invalid.
5. The method of claim 1, wherein the performing configuration information corresponding to the handle comprises:
acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class;
obtaining a target class corresponding to the handle in the preset dynamic library;
obtaining a target agent class corresponding to the target class;
and loading the configuration information based on the target agent class.
6. A task processing device, characterized by being applied to a server, the device comprising: an acquisition unit, a query unit, an execution unit and a determination unit, wherein,
the acquisition unit is used for acquiring behavior data carried in a target behavior event if the server monitors the target behavior event, determining an activity type corresponding to the behavior data, and acquiring a preset registry corresponding to the activity type as a target registry;
the inquiring unit is used for inquiring whether the target registry is configured with a target task corresponding to the target behavior event or not;
the query unit is further configured to query whether a handle is configured in a target configuration table corresponding to the target task, where the handle includes configuration information, and if yes, the query unit is specifically configured to query whether a target task aspect corresponding to the target behavior event is configured in the target registry: inquiring whether a task in the target registry monitors the target behavior event or not in the server aiming at the target behavior event; if the task monitors the target behavior event, determining that the target task is configured in the target registry; if the task monitors the target behavior event, controlling the server to end monitoring the target behavior event;
The execution unit is used for executing configuration information corresponding to the handle if the handle is configured in the target configuration table;
the determining unit is used for determining that the target task is completed if the configuration information is configured to be completed;
the determining unit is further configured to determine that the corresponding configuration information does not exist in the target behavior event and determine that the target task is completed if the handle is not configured in the target configuration table.
7. A server comprising a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory being interconnected, wherein the memory is adapted to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-5.
8. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-5.
CN201911368192.0A 2019-12-26 2019-12-26 Task processing method and device Active CN111124547B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911368192.0A CN111124547B (en) 2019-12-26 2019-12-26 Task processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911368192.0A CN111124547B (en) 2019-12-26 2019-12-26 Task processing method and device

Publications (2)

Publication Number Publication Date
CN111124547A CN111124547A (en) 2020-05-08
CN111124547B true CN111124547B (en) 2024-03-19

Family

ID=70503190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911368192.0A Active CN111124547B (en) 2019-12-26 2019-12-26 Task processing method and device

Country Status (1)

Country Link
CN (1) CN111124547B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111753229A (en) * 2020-06-10 2020-10-09 支付宝(杭州)信息技术有限公司 Page configuration method, device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598454A (en) * 2016-10-31 2017-04-26 北京奇虎科技有限公司 Multi-task display control method and device, and mobile terminal
CN107665245A (en) * 2017-09-12 2018-02-06 平安科技(深圳)有限公司 A kind of triggering method based on event, terminal, equipment and readable storage medium storing program for executing
CN108563493A (en) * 2018-04-12 2018-09-21 郑州云海信息技术有限公司 A kind of event-driven method, device, equipment and readable storage medium storing program for executing
CN108921407A (en) * 2018-06-20 2018-11-30 北京密境和风科技有限公司 A kind of task processing system and method
CN109597678A (en) * 2018-10-09 2019-04-09 阿里巴巴集团控股有限公司 Task processing method and device
CN110471780A (en) * 2019-08-21 2019-11-19 北京百佑科技有限公司 Distributed event processing unit, terminal and computer storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8789059B2 (en) * 2007-11-02 2014-07-22 International Business Machines Corporation Dynamic scheduling feasibility analysis of event-driven applications based on reducing tasks of overlapping events
US20110072442A1 (en) * 2009-09-22 2011-03-24 International Business Machines Corporation Event-handler for selecting responsive actions

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598454A (en) * 2016-10-31 2017-04-26 北京奇虎科技有限公司 Multi-task display control method and device, and mobile terminal
CN107665245A (en) * 2017-09-12 2018-02-06 平安科技(深圳)有限公司 A kind of triggering method based on event, terminal, equipment and readable storage medium storing program for executing
CN108563493A (en) * 2018-04-12 2018-09-21 郑州云海信息技术有限公司 A kind of event-driven method, device, equipment and readable storage medium storing program for executing
CN108921407A (en) * 2018-06-20 2018-11-30 北京密境和风科技有限公司 A kind of task processing system and method
CN109597678A (en) * 2018-10-09 2019-04-09 阿里巴巴集团控股有限公司 Task processing method and device
CN110471780A (en) * 2019-08-21 2019-11-19 北京百佑科技有限公司 Distributed event processing unit, terminal and computer storage medium

Also Published As

Publication number Publication date
CN111124547A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
US20100153482A1 (en) Cloud-Based Automation of Resources
CN110730136B (en) Method, device, server and storage medium for realizing flow control
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
CN105282047A (en) Access request processing method and device
US20150154046A1 (en) Interdependent virtual machine management
CN108696399B (en) Business service test method and device
CN109669835B (en) MySQL database monitoring method, device, equipment and readable storage medium
CN105844146B (en) Method and device for protecting driver and electronic equipment
CN105847367A (en) Service request processing method and apparatus
RU2010128545A (en) MOBILE MANAGEMENT PLANNING
CN104601666B (en) Log services method and cloud platform
CN110247857B (en) Current limiting method and device
CN108600034A (en) Traffic pressure management method, device, equipment, system and storage medium
US20120210306A1 (en) System and Method for Application Testing
CN111124547B (en) Task processing method and device
EP3289455A1 (en) Automatic task tracking
CN104519069A (en) Method and device for intercepting resource requests
CN102023997B (en) Data query system, construction method thereof and corresponding data query method
CN111294377A (en) Network request sending method of dependency relationship, terminal device and storage medium
CN113905091A (en) Method and device for processing access request
CN107704734A (en) A kind of recognition methods of user account and its equipment
CN113988559B (en) Disturbance-free method and device for questionnaire delivery
CN112764837B (en) Data reporting method, device, storage medium and terminal
CN112631577B (en) Model scheduling method, model scheduler and model safety test platform
CN111913732A (en) Service updating method and device, management server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant