CN111124547A - Task processing method and device - Google Patents

Task processing method and device Download PDF

Info

Publication number
CN111124547A
CN111124547A CN201911368192.0A CN201911368192A CN111124547A CN 111124547 A CN111124547 A CN 111124547A CN 201911368192 A CN201911368192 A CN 201911368192A CN 111124547 A CN111124547 A CN 111124547A
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.)
Granted
Application number
CN201911368192.0A
Other languages
Chinese (zh)
Other versions
CN111124547B (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

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/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

Abstract

The embodiment of the application discloses a task processing method and a task processing device, which are applied to a server, wherein the method comprises 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, if so, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information, if a handle is configured in the target configuration table, executing configuration of the configuration information corresponding to the handle, if the configuration information is configured, determining that the target task is completed, and if no handle is configured in the target configuration table, determining that the target task is completed.

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 apparatus.
Background
The micro community is a forum community based on a mobile terminal, can support binding of a micro-letter public account, a mobile phone QQ life account and the like, the micro community platform is actually a mobile interaction platform, in order to mobilize the enthusiasm of a user and increase interaction interest, background configuration personnel can irregularly go to customize activities, for example, attention is paid to point sending activities, topic voting is carried out to sunshine value activities and the like, activity projects are various, activity projects are changed every time, the background configuration personnel need to develop again, timeliness is low, development pressure is increased, and 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, which is applied to a server, and 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;
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, 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 the embodiments of the present application provides a task processing apparatus, where the apparatus includes: an acquisition unit, a query unit, an execution unit and a determination unit, wherein,
the acquiring unit is used for acquiring a target registry corresponding to a target behavior event if the server monitors the target behavior event;
the query unit is configured to query whether a target task corresponding to the target behavior event is configured in the target registry;
the query unit is further configured to query whether a handle is configured in a target configuration table corresponding to the target task if the target task exists, where the handle includes configuration information;
the execution unit is configured to execute configuration information corresponding to the handle if the handle is configured in the target configuration table;
the determining unit is configured to determine that the target task is completed if the configuration information is configured;
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 embodiments of the present application provides a server, where the server includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to the first aspect of embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps as described in the first aspect of embodiments of the present application.
A fifth aspect of 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 as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has at least the following beneficial effects:
through the embodiment of the application, the method is applied to the server, and comprises 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, if so, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information, if a handle is configured in the target configuration table, executing configuration of the configuration information corresponding to the handle, if the configuration information is configured, determining that the target task is completed, and if no handle is configured in the target configuration table, determining that the target task is completed.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a task processing method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a task processing method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating 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 technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively 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 can be included in at least one embodiment of the specification. The appearances of the phrase 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. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to better understand the embodiments of the present application, methods of applying the embodiments of the present application will be described below.
The servers mentioned in the embodiments of the present application may include, but are not limited to, a background server, a component server, a cloud server, a task processing system server, or a task processing software server, which are merely examples, and are not exhaustive, and include, but are not limited to, the above devices.
Referring to fig. 1, fig. 1 is a schematic flowchart of a task processing method provided in an embodiment of the present application, and the method is applied to a server, and 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 behavior event may include at least one of: browsing behavior, collecting behavior, like behavior, commenting behavior, paying attention to behavior, etc., which are not limited herein; the target is used as an event, which can be understood as a behavior event triggered by a target user during operation, the operation behavior of the user can be packaged into one 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, parallel processing can be performed on the plurality of target behavior events, and 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.
Optionally, a plurality of listening ports may be created in the server, each listening port may correspond to one type of behavior event, and the plurality of listening ports may be used to listen to a plurality of types of behavior events.
Optionally, in the step 101, 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 be preset with a plurality of registries, and may preset a plurality of activity types for the plurality of registries, each preset registry may correspond to one type of preset activity, and the activity types may include at least one of the following: shopping promotions, micro-community recommendations, etc., without limitation.
Specifically, if the server monitors a target behavior event, the server may obtain behavior data carried in the target behavior event, where the behavior data may be understood as log data and the like generated by some behaviors by a user, determine an activity type corresponding to the target behavior event according to the behavior data, obtain a preset registry corresponding to the activity type as a target registry, and obtain the preset registry corresponding to the activity type as the target registry.
102. Inquiring whether a target task corresponding to the target behavior event is configured in the target registry;
the server may preset different tasks for different behavior events, where each behavior event may correspond to at least one task, for example, a task may be preset for a favorite behavior, and the task may include if the user completes the favorite behavior 3 times, and so on. After monitoring the target behavior event, the server may also directly query whether a preset registry corresponding to the target behavior event exists in the database, and if so, may determine that the preset registry is the target registry, and query whether a preset target task for the target behavior event is configured in the target registry.
Optionally, in the step 102, querying whether the target registry is configured with the target task corresponding to the target behavior event may include the following steps:
21. aiming at the target behavior event, inquiring whether a task in the target registry in the server monitors the target behavior event;
22. if the target behavior event is monitored by the task, determining that the target task is configured in the target registry;
23. and if the target behavior event is not monitored by the task, controlling the server to stop monitoring the target behavior event.
The server can monitor the target behavior event through at least one task in the registry, a plurality of task types can be preset for the tasks, the tasks of the same task type can be used for monitoring the behavior event of the same type, when a user triggers the target behavior event, the corresponding target task can generate a response, if the target task is monitored by the tasks, the target task is determined to be configured in the target registry, if any task does not monitor the target behavior event, the target behavior event is represented to be not in accordance with the preset behavior event in the server, the subsequent steps can be ended, and the server is controlled to end the monitoring steps.
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 defaulted by a system, a plurality of target configuration tables can be preset in the server, the target configuration tables can correspond to the handles, each target configuration table can be configured with a handle, the handles can be understood as a message mechanism in a message queue, if configuration information is configured in the handles, whether the target task is completed or not can be judged through the configuration information, if a backstage manager needs to configure new configuration information, new configuration information can be added through the handles at any time, the configuration information corresponding to the target task can be configured through the handles, 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 like handle for the behavior event of like a petition, the configuration information corresponding to the like handle may be configured as a preset reward, when the user triggers the behavior event of like a petition, the preset reward in the like handle may be acquired, the preset reward is issued to the user triggering the behavior event of like a petition, and the preset reward may be set as a gift drawing coupon, a gift coupon, or the like, which is not limited herein.
Optionally, after the step 103, before querying whether a handle is configured in the target configuration table corresponding to the target task, the method may further include the following step:
a1, judging whether the target behavior event is effective or not;
and A2, if the behavior data corresponding to the target behavior event is valid, storing the behavior data in a database, and executing a 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 obtaining the reward, before inquiring whether the target task is configured with the handle, whether the target behavior event is valid or not can be determined, if yes, 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 the handle or not can be executed.
Optionally, the step a1, 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 meets a preset rule;
a13, if yes, acquiring the historical completion times corresponding to the target task;
a14, if the historical completion times are smaller than a preset threshold value, determining that the target behavior event is valid;
and A15, if the historical completion times are larger than or equal to the preset threshold, determining that the target behavior event is invalid.
For example, if the target behavior event is a comment event, the preset rule may be set as: and if the data does not accord with the preset regulation, the target event is considered to be invalid, and the target task corresponding to the target behavior event is not processed.
In addition, the preset threshold may be set by a user or default by a system, and if the historical completion times corresponding to the target task exceed 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;
the server may determine that the target behavior event corresponds to configuration information when determining that the configuration handle exists in the target configuration table, and may feed back the reward information to the user when, for example, the configuration information is reward information indicating that the target behavior event is triggered by the user and then corresponds to the reward information.
Optionally, in the step 104, executing configuration information corresponding to configuring the handle may include the following steps:
41. acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class;
42. acquiring a target class corresponding to the handle in the preset dynamic library;
43. acquiring a target agent class corresponding to the target class;
44. loading the configuration information based on the target agent class.
The preset dynamic library may store at least one class in advance, each class may be provided with an interface corresponding to the at least one agent class, specifically, a target interface corresponding to the handle may be acquired, a target agent class corresponding to the target class may be acquired through the target interface, the target agent class may be a character string or another type, and the configuration information may be dynamically loaded through the target agent class by loading the target agent class.
In addition, the target class may be created in real time, a target function corresponding to the target interface may be acquired, and the target function corresponding to the target interface may be updated in real time by creating the target class through the target function.
Optionally, after the step 104, after the configuration information corresponding to the handle is configured, the method may further include the following step:
b1, acquiring a preset time period corresponding to the target behavior event;
and B2, in the preset time period, if the configuration information is configured to be completed, determining that the target task is completed.
The preset time period may be set by a user or default by a system, different preset time periods may be set for different target tasks, the preset time period may be set to five times a day, ten times a week, and the like, and the server may set that it is valid to trigger the target behavior event only within the preset time period, so that, within the preset time period, if the configuration information is configured, that is, the target behavior event has a right to configure the configuration information correspondingly, it may be determined that the target task is completed.
105. And if the configuration information is configured to be completed, determining that the target task is completed.
If the configuration information is configured, it is determined that the target task is completed, a plurality of target behavior events can occur in a message queue at the same time, the target task corresponding to the target behavior event can be processed in parallel, if the target task corresponding to the user is processed, it is determined that the target behavior event corresponding to the user is in an invalid state at the moment, log information is generated from the target behavior corresponding to the user and stored in a database, and thus, the historical behavior event corresponding to the user can be conveniently viewed.
In addition, the target task corresponding to the target registry is still valid, and the next target behavior event corresponding to the user or other users can be waited for processing without resetting by an administrator, so that the task processing efficiency is improved, the development is simplified, and the labor is saved.
Alternatively, some users may maliciously trigger some user actions by wanting to receive a reward, and, to prevent such occurrences, the pre-warning mechanism may be formulated, for example, the server may set different levels of trigger thresholds for various behavior events in advance, each level of trigger threshold corresponding to a different pre-warning level, and the higher the level is, the stronger the pre-warning is, for example, early warning levels of 3 levels can be set, if the behavior event corresponding to the user A is abnormal (the frequency of triggering the behavior event exceeds a first triggering threshold), the user A can be early warned at one level, the first-level warning may be a pop-up warning, if the triggering frequency corresponding to the behavior event B corresponding to the user exceeds a third triggering threshold, then, a third-level early warning can be performed on the user B, and the third-level early warning can be a number sealing treatment, so that the user can 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 no handle is 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 no handle is 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 can still be considered to be completed.
It can be seen that, the task processing method described in the embodiment of the present application is applied to a server, and 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, if so, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information, if a handle is configured in the target configuration table, executing configuration of the configuration information corresponding to the handle, if the configuration information is configured, determining that the target task is completed, and if no handle is configured in the target configuration table, determining that the target task is completed.
In accordance with the above, please refer to fig. 2, fig. 2 is a flowchart illustrating a task processing method disclosed in an embodiment of the present application, and the task processing method is applied to a server and may include the following steps:
201. and if the server monitors a target behavior event, acquiring a target registry corresponding to the target behavior event.
202. And inquiring whether a task in the target registry in the server monitors the target behavior event or not according to the target behavior event.
203. And if the target behavior event is monitored by the task, determining that the target task is configured in the target registry.
204. And if the target behavior event is not monitored by the task, controlling the server to stop monitoring the target behavior event.
205. And inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information.
206. And if the handle exists in the target configuration table, judging whether the target behavior event is effective.
207. And if the target behavior event is valid, 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 acquiring a target class corresponding to the handle in the preset dynamic library.
210. Acquiring a target agent class corresponding to the target class;
211. loading the configuration information based on the target agent class.
For the detailed description of the steps 201 to 211, reference may be made to corresponding steps of the data processing method described in fig. 1, and details are not repeated here.
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, a target registry corresponding to the target behavior event is obtained, whether a task in the target registry monitors the target behavior event is queried for the target behavior event, if the task monitors the target behavior event, the target task is determined to be configured in the target registry, if the task does not monitor the target behavior event, the server is controlled to end monitoring the target behavior event, whether a handle is configured in the target configuration table corresponding to the target task or not is queried, the handle comprises configuration information, if the handle is arranged in the target configuration table, whether the target behavior event is effective or not is judged, if the target behavior event is effective, behavior data corresponding to the target behavior event is stored in a database, a preset dynamic library is obtained, the preset dynamic library comprises at least one class, a target class corresponding to the handle in the dynamic library is obtained, and a target agent class corresponding to the target class is obtained, and loading configuration information based on the target agent class, so that the configuration information can be configured through handle when the target behavior event is effective, 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.
In accordance with the above, please refer to fig. 3, fig. 3 is a flowchart illustrating a task processing method disclosed in an embodiment of the present application, and the task processing method is applied to a server, and the task processing method may include the following steps:
301. and if the server monitors a 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. And if so, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information.
306. And if so, acquiring a preset rule corresponding to the target task.
307. And verifying whether the target behavior event meets a preset rule or not.
308. And if so, 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 valid.
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.
For the detailed description of steps 301 to 311, reference may be made to corresponding steps of the data processing method described in fig. 1, and details are not repeated here.
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 so, inquiring whether a handle is configured in a target configuration table corresponding to the target task, wherein the handle comprises configuration information, if so, acquiring a preset rule corresponding to the target task, verifying whether the target behavior event meets the preset rule, if so, acquiring historical completion times corresponding to the target task, if so, determining that the target behavior event is valid, and if so, determining that the historical completion times are greater than or equal to a preset threshold, and determining that the target behavior event is invalid, and if the configuration information is configured, determining that the target task is completed, so that the configuration information corresponding to the target task can be configured through handle without reconfiguring the whole business process, thereby improving the development timeliness and the task processing efficiency, and reducing the development pressure.
In accordance with the above, please refer to fig. 4, fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application, and as shown in fig. 4, the server includes 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, the memory is used for storing 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;
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, 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 this embodiment 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, where the handle includes configuration information, if a handle is configured in the target configuration table, configuring the configuration information corresponding to the handle is executed, if the configuration information is configured, the target task is determined to be completed, and if no handle is 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 service flow does not need to be reconfigured, and development timeliness and task processing efficiency are improved, while reducing development pressure.
In one possible example, in obtaining the target registry corresponding to the target behavior event, the program is configured to execute the following steps:
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 a target task corresponding to the target behavior event is configured in the target registry, the program is configured to execute the following instructions:
aiming at the target behavior event, inquiring whether a task in the target registry in the server monitors the target behavior event;
if the target behavior event is monitored by the task, determining that the target task is configured in the target registry;
and if the target behavior event is not monitored by the task, controlling the server to stop monitoring the target behavior event.
In one possible example, after executing the instructions to configure the configuration information corresponding to the handle, the program is configured to:
acquiring a preset time period corresponding to the target behavior event;
and in the preset time 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 a handle is configured in a target configuration table corresponding to the target task, the program is configured to execute the following steps:
judging whether the target behavior event is effective or not;
and if so, storing the behavior data corresponding to the target behavior event in a database, and executing a step of inquiring whether the target task is configured with handle.
In one possible example, in determining whether the target behavioral event is valid, the program is for instructions to:
acquiring a preset rule corresponding to the target task;
verifying whether the target behavior event conforms to a preset rule;
if yes, acquiring 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 valid;
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 performing the configuring of the configuration information corresponding to the handle, the program is configured to execute the instructions of:
acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class;
acquiring a target class corresponding to the handle in the preset dynamic library;
acquiring a target agent class corresponding to the target class;
loading the configuration information based on the target agent class.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the server includes hardware structures and/or software modules for performing the respective functions in order to implement the above-described functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives 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.
In the embodiment of the present application, the server may be divided into the functional units 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 into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In accordance with the above, please refer to fig. 5, fig. 5 is a schematic structural diagram of a task processing device disclosed in the embodiment of the present application, applied to a server, the device including: an obtaining unit 501, a querying unit 502, an executing unit 503 and a determining 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 if the handle is configured, 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;
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 this embodiment of the present application is applied to a server, and if the device monitors a target behavior event, obtains a target registry corresponding to the target behavior event, queries whether a target task corresponding to the target behavior event is configured in the target registry, and if so, queries whether a handle is configured in a target configuration table corresponding to the target task, where the handle includes configuration information, and if a handle is configured in the target configuration table, performs configuration of configuration information corresponding to the handle, and if the configuration information is configured completely, determines that the target task is completed, and if no handle is configured in the target configuration table, determines that the target task is completed, so that the configuration information corresponding to the target task can be configured by the handle without reconfiguring the whole service flow, thereby improving development timeliness and task processing efficiency, while reducing development pressure.
In a 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 a possible example, in terms of querying whether a target task corresponding to the target behavior event is configured in the target registry, the querying unit 502 is specifically configured to:
aiming at the target behavior event, inquiring whether a task in the target registry in the server monitors the target behavior event;
if the target behavior event is monitored by the task, determining that the target task is configured in the target registry;
and if the target behavior event is not monitored by the task, controlling the server to stop monitoring the target behavior event.
In a possible example, after executing configuring the configuration information corresponding to the handle, the execution unit 503 is further specifically configured to:
acquiring a preset time period corresponding to the target behavior event;
and in the preset time period, if the configuration information is configured to be completed, determining that the target task is completed.
In a possible example, before the querying whether a handle is configured in the target configuration table corresponding to the target task, the querying unit 502 is further specifically configured to:
judging whether the target behavior event is effective or not;
and if so, storing the behavior data corresponding to the target behavior event in a database, and executing a step of inquiring whether the target task is configured with handle.
In a possible example, in terms of determining whether the target behavior event is valid, the querying unit 502 is further specifically configured to:
acquiring a preset rule corresponding to the target task;
verifying whether the target behavior event conforms to a preset rule;
if yes, acquiring 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 valid;
and if the historical completion times are greater than or equal to the preset threshold, determining that the target behavior event is invalid.
In a possible example, in terms of executing configuration information corresponding to configuring the handle, the execution unit 503 is specifically configured to:
acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class;
acquiring a target class corresponding to the handle in the preset dynamic library;
acquiring a target agent class corresponding to the target class;
loading the configuration information based on the target agent class.
Embodiments of the present application also provide a computer-readable storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the task processing methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the task processing methods as described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A task processing method is applied to a server, and the method comprises 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;
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, 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.
2. The method according to claim 1, wherein the obtaining of the target registry corresponding to the target behavior event includes:
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.
3. The method of claim 1, wherein the querying whether the target registry is configured with the target task corresponding to the target behavior event comprises:
aiming at the target behavior event, inquiring whether a task in the target registry in the server monitors the target behavior event;
if the target behavior event is monitored by the task, determining that the target task is configured in the target registry;
and if the target behavior event is not monitored by the task, controlling the server to stop monitoring the target behavior event.
4. The method as claimed in claim 1, wherein after the performing configures the configuration information corresponding to the handle, the method further comprises:
acquiring a preset time period corresponding to the target behavior event;
and in the preset time period, if the configuration information is configured to be completed, determining that the target task is completed.
5. The method according to any one of claims 1 to 3, wherein before the querying whether a handle is configured in a target configuration table corresponding to the target task, the method further includes:
judging whether the target behavior event is effective or not;
and if so, storing the behavior data corresponding to the target behavior event in a database, and executing a step of inquiring whether the target task is configured with handle.
6. The method of claim 5, wherein the determining whether the target behavior event is valid comprises:
acquiring a preset rule corresponding to the target task;
verifying whether the target behavior event conforms to a preset rule;
if yes, acquiring 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 valid;
and if the historical completion times are greater than or equal to the preset threshold, determining that the target behavior event is invalid.
7. The method of claim 1, wherein the executing the configuration information corresponding to the handle comprises:
acquiring a preset dynamic library, wherein the preset dynamic library comprises at least one class;
acquiring a target class corresponding to the handle in the preset dynamic library;
acquiring a target agent class corresponding to the target class;
loading the configuration information based on the target agent class.
8. A task processing apparatus applied to a server, the apparatus comprising: an acquisition unit, a query unit, an execution unit and a determination unit, wherein,
the acquiring unit is used for acquiring a target registry corresponding to a target behavior event if the server monitors the target behavior event;
the query unit is configured to query whether a target task corresponding to the target behavior event is configured in the target registry;
the query unit is further configured to query whether a handle is configured in a target configuration table corresponding to the target task if the target task exists, where the handle includes configuration information;
the execution unit is configured to execute configuration information corresponding to the handle if the handle is configured in the target configuration table;
the determining unit is configured to determine that the target task is completed if the configuration information is configured;
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.
9. 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 configured 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-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
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 true CN111124547A (en) 2020-05-08
CN111124547B 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)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090119668A1 (en) * 2007-11-02 2009-05-07 International Business Machines Corporation Dynamic feasibility analysis for event based programming
US20110072442A1 (en) * 2009-09-22 2011-03-24 International Business Machines Corporation Event-handler for selecting responsive actions
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090119668A1 (en) * 2007-11-02 2009-05-07 International Business Machines Corporation Dynamic feasibility analysis for event based programming
US20110072442A1 (en) * 2009-09-22 2011-03-24 International Business Machines Corporation Event-handler for selecting responsive actions
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
CN111124547B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN109672580B (en) Full link monitoring method, device, terminal equipment and storage medium
CN112653618B (en) Gateway registration method and device of micro-service application API (application program interface) endpoint
CN105844146B (en) Method and device for protecting driver and electronic equipment
CN108200180B (en) Method and device for limiting request frequency and computer equipment
CN111045893B (en) Method, device and system for executing monitoring task, storage medium and electronic device
US20170147368A1 (en) Dynamic Agent Delivery
CN106980442B (en) Icon management method and electronic equipment
CN114257551A (en) Distributed current limiting method and system and storage medium
CN109284267A (en) Blog management method and terminal device based on abnormal monitoring
CN104866296A (en) Data processing method and device
CN110677475A (en) Micro-service processing method, device, equipment and storage medium
CN107066536B (en) Comment determining method and device
CN113905091B (en) Method and device for processing access request
CN105843675B (en) Thread exit method and device
CN112153146B (en) Operation notification method and apparatus, storage medium, and electronic apparatus
CN109343944A (en) Data processing method, device, terminal and the storage medium of eSIM card
CN111124547A (en) Task processing method and device
CN116431344A (en) Configuration method and device of financial service resource degradation strategy and electronic equipment
CN115454576B (en) Virtual machine process management method and system and electronic equipment
CN110933070A (en) User identification method, system, equipment and computer readable storage medium
CN110619541B (en) Application program management method, device, computer equipment and storage medium
CN113656378A (en) Server management method, device and medium
CN112860636A (en) Storage method and device of operation data, electronic equipment and storage medium
CN114448739B (en) Group member management method, device, terminal equipment and storage medium
CN110602187A (en) Terminal sharing method, device and equipment

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