CN117724815A - Task processing method and device, storage medium and processor - Google Patents

Task processing method and device, storage medium and processor Download PDF

Info

Publication number
CN117724815A
CN117724815A CN202311737543.7A CN202311737543A CN117724815A CN 117724815 A CN117724815 A CN 117724815A CN 202311737543 A CN202311737543 A CN 202311737543A CN 117724815 A CN117724815 A CN 117724815A
Authority
CN
China
Prior art keywords
task
data
executed
variable
data variable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311737543.7A
Other languages
Chinese (zh)
Inventor
周全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Electronic Commerce Co Ltd
Original Assignee
Tianyi Electronic Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Electronic Commerce Co Ltd filed Critical Tianyi Electronic Commerce Co Ltd
Priority to CN202311737543.7A priority Critical patent/CN117724815A/en
Publication of CN117724815A publication Critical patent/CN117724815A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a task processing method, a task processing device, a storage medium and a processor. The method comprises the following steps: acquiring event data of a business event, determining a task to be executed of the business event, and judging whether task data of the task to be executed contains a target data variable, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed; judging whether task data of the task to be executed meet the data variable conditions associated with the target data variables or not under the condition that the task data of the task to be executed contains the target data variables; and determining the task to be executed as a task which is allowed to be executed when the task data of the task to be executed meets the data variable condition, and controlling the task to be executed to execute when the matched execution condition of the configured task is met. The method solves the problems of low development efficiency of event-driven instructions of the service and inflexible task execution mode based on the event-driven instructions.

Description

Task processing method and device, storage medium and processor
Technical Field
The present invention relates to the field of task management technologies, and in particular, to a task processing method, device, storage medium, and processor.
Background
In recent years, with the rapid development of internet financial services, higher requirements are being placed on the traffic patterns and operation specifications, and customer-centric, product event-driven service architecture design patterns are being increasingly used by internet financial companies.
On the one hand, many business products in the related art are driven based on product events at the beginning of design, but repeated development occurs when similar driving instructions are realized under different business scenes, so that the development efficiency is low, and more manpower cost is consumed. On the other hand, in the actual iteration process of the service product, the adjustment requirement on the execution content of the instruction is often met, and the project developer needs to frequently change the project code and frequently perform project deployment to meet the requirement of rapid iteration of the service product, so that the code logic is complicated, and the project maintenance is not facilitated. On the other hand, most of operation of service products is performed by operators and customer service staff, and the service products have the characteristics of high personnel mobility and high service response speed, and users cannot directly operate the execution content of the instruction to meet the service operation requirements.
Aiming at the problems of low development efficiency of event-driven instructions of services in the related art and inflexible way of executing tasks based on the event-driven instructions, no effective solution is proposed at present.
Disclosure of Invention
The application provides a task processing method, a device, a storage medium and a processor, which are used for solving the problems of low development efficiency of event-driven instructions of services and inflexible task execution mode based on the event-driven instructions in the related art.
According to one aspect of the present application, a method of processing a task is provided. The application is in a business application, and the business application calls a processing program of a software development kit to execute the following tasks: acquiring event data of a business event, determining a task to be executed of the business event, and judging whether task data of the task to be executed contains a target data variable, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed; judging whether task data of the task to be executed meet the data variable conditions associated with the target data variables or not under the condition that the task data of the task to be executed contains the target data variables; and determining the task to be executed as a task which is allowed to be executed when the task data of the task to be executed meets the data variable condition, and controlling the task to be executed to execute when the matched execution condition of the configured task is met.
Optionally, determining the task to be executed of the service event, and determining whether the task data of the task to be executed includes the target data variable includes: acquiring a service tag from event data, determining a task group according to the service tag, and determining tasks in the task group as tasks to be executed, wherein the task group at least comprises one task; and under the condition that the task to be executed exists in a task list of the configured tasks, determining the data variable of the configured task matched with the task to be executed from the task list to obtain a target data variable, and judging whether the task data of the task to be executed contains the target data variable, wherein the task list contains a plurality of configured tasks, and each configured task is associated with at least one data variable.
Optionally, the data variable condition includes a preset data type, a preset operator, and a preset value, and the judging whether the task data of the task to be executed meets the data variable condition associated with the target data variable includes: analyzing the data types in task data of the task to be executed, and judging whether the analyzed data types cover preset data types of all data variable conditions or not; if the analyzed data types cover the preset data types of all the data variable conditions, for each preset type, acquiring the numerical value under the preset type from the task data, judging whether the numerical value meets the judgment conditions consisting of the preset operator and the preset numerical value, and determining that the task data of the task to be executed meets the data variable conditions corresponding to the preset type under the condition that the numerical value meets the judgment conditions.
Optionally, in the case that the software development tool is deployed in the service application, the configuration data and the processing program of the task are queried from the database by locally calling the software development tool, and the processing program of the task is executed based on the configuration data and the event data of the service event, wherein the configuration data comprises a plurality of data of the configured task, and in the case that the software development tool is deployed in the task center, the configuration data is queried from the database by remotely calling the software development tool, and the processing program of the task is executed based on the configuration data and the event data of the service event.
Optionally, the configuration data is obtained by: newly adding tasks in a visual page of an operation management platform; for each newly added task, selecting a data variable to be screened from a candidate data variable set in an operation management platform, selecting a task executor from a candidate task executor set in the operation management platform, and configuring the selected data variable and the selected task executor on the newly added task to obtain a configured task; and determining the data of all the configured tasks as the configured data.
Alternatively, the candidate set of data variables is obtained by: newly adding data variables in a visual page of an operation management platform, and forming a candidate data variable set by all configured data variables; configuring metadata information for each newly added data variable, and determining a data variable condition associated with the data variable by the metadata information, wherein the metadata information at least comprises: preset data type, preset operator and preset value.
Optionally, the candidate set of task executors is obtained by: the method comprises the steps that task executors are newly added in a visual page of an operation management platform, execution condition information is configured for each newly added task executor, and a configured task executor is obtained, wherein the execution condition information at least comprises: effective time, actuator switch; a set of candidate task executors is formed from all of the configured task executors.
According to another aspect of the present application, a task processing device is provided. The device comprises: the system comprises an acquisition unit, a configuration unit and a configuration unit, wherein the acquisition unit is used for acquiring event data of a service event, determining a task to be executed of the service event, and judging whether task data of the task to be executed contains a target data variable, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed; the judging unit is used for judging whether the task data of the task to be executed meet the data variable condition associated with the target data variable or not under the condition that the task data of the task to be executed contains the target data variable; and the control unit is used for determining the task to be executed as a task which is allowed to be executed when the task data of the task to be executed meets the data variable condition, and controlling the task to be executed to execute when the matched execution condition of the configured task is met.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium for storing a program, where the program runs to control a device in which the nonvolatile storage medium is located to execute a processing method of a task.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device including a processor and a memory; the memory has stored therein computer readable instructions for execution by the processor, wherein the computer readable instructions when executed perform a method of processing a task.
Through the application, the business application invokes a software development kit to execute a processing program of the following tasks: acquiring event data of a business event, determining a task to be executed of the business event, and judging whether task data of the task to be executed contains a target data variable, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed; judging whether task data of the task to be executed meet the data variable conditions associated with the target data variables or not under the condition that the task data of the task to be executed contains the target data variables; when task data of a task to be executed meets the condition of data variables, the task to be executed is determined to be a task which is allowed to be executed, and the task to be executed is controlled to be executed under the condition that the execution condition of the matched configured task is met, so that the problems that in the related art, the development efficiency of event-driven instructions of services is low and the mode of executing the task based on the event-driven instructions is inflexible are solved. By configuring the data variable and the data variable condition of the task in advance, judging whether the task to be executed of the business event contains the target data variable of the configured task or not and whether the task to be executed meets the data variable condition of the target data variable or not, determining whether the task to be executed is allowed to be executed or not, and further achieving the effects of flexibly screening the task allowed to be executed from the task to be executed and flexibly executing the task.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
FIG. 1 is a flow chart of a method of processing tasks provided in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of an alternative task processing method provided in accordance with an embodiment of the present application;
FIG. 3 is a schematic diagram of a processing device for tasks provided in accordance with an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device provided according to an embodiment of the present application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party.
It should be noted that, there is a requirement of popularization in the scenes of credit, marketing, etc., for example, in the credit scene, both credit giving and borrowing need to be performed with short message popularization, in the related art, a popularization task execution script is written for each different event, and then the popularization task is executed according to the script, so that the code logic is complex, and the project maintenance is not facilitated.
In this embodiment, the short message promotion may be extracted into a task, and data variables and variable conditions may be configured for the task, different events in different scenarios may be matched with the configured task, for example, which short message the credit should be matched with, which short message the debit should be matched with, the data variable may be screened by parameters in the event message body, and the data variable conditions may be screened, parameters such as amount, product type, etc. and conditions that these parameters need to satisfy may be specified, the promotion task that needs to be executed when matching with the configured task may be screened out, the configured task is general, and the counterpart only needs to submit service events of credit and debit, and then the corresponding promotion task may be filtered out, and then the external interface may be called to promote the short message, thereby greatly improving flexibility of promotion.
Fig. 1 is a flowchart of a method for processing tasks according to an embodiment of the present application. As shown in fig. 1, the application is in a business application that invokes a process program of a software development kit to perform the following tasks:
step S102, acquiring event data of a business event, determining a task to be executed of the business event, and judging whether task data of the task to be executed contains a target data variable, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed.
Specifically, based on a service event triggering service instruction, submitting a data packet of the service event to a service application, uniformly converting data in the data packet into a specific data format by the service application to obtain event data, and determining a task to be executed and task data of the task to be executed from the event data. For example, the business event may be a credit business event (credit business event and loan business event), and the task to be performed is a promotion task.
Further, whether the task to be executed is a task allowed to be executed is judged, specifically, whether task data of the task to be executed contains a target data variable is judged, and the target data variable is determined according to the data variable of the configured task matched with the task to be executed. For example, in the case where the task to be executed is a promotion task, the configured task to which the task to be executed matches is also a promotion task, and the target data variable may include a loan amount, a loan time, and the like.
Step S104, judging whether the task data of the task to be executed meets the data variable condition associated with the target data variable or not under the condition that the task data of the task to be executed contains the target data variable.
For example, the business event is a loan business event, the task to be executed and the matched configured task are short message popularization tasks, the target data variable comprises a loan amount and a loan time, the data variable condition associated with the loan amount can be "the loan amount is larger than a preset amount", and the data variable condition associated with the loan time can be "the loan time is larger than the preset time". And under the condition that the task data of the task to be executed contains the loan amount and the loan time, further judging whether the task data meets the data variable condition associated with the target data variable, namely, whether the loan amount is larger than the preset amount and whether the loan time is larger than the preset time.
Step S106, in the case that the task data of the task to be executed meets the data variable condition, determining the task to be executed as a task which is allowed to be executed, and in the case that the execution condition of the matched configured task is reached, controlling the task to be executed to execute.
And under the condition that the loan amount is larger than the preset amount and the loan time is larger than the preset time, the task data of the task to be executed is stated to meet the target data variable condition, the task to be executed is the task allowed to be executed, the execution condition of the matched configured task can be the preset execution time, and the task to be executed is controlled to be executed after the preset execution time is reached.
According to the task processing method provided by the embodiment of the application, the service application calls a software development kit to execute a processing program of the following tasks: acquiring event data of a business event, determining a task to be executed of the business event, and judging whether task data of the task to be executed contains a target data variable, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed; judging whether task data of the task to be executed meet the data variable conditions associated with the target data variables or not under the condition that the task data of the task to be executed contains the target data variables; when task data of a task to be executed meets the condition of data variables, the task to be executed is determined to be a task which is allowed to be executed, and the task to be executed is controlled to be executed under the condition that the execution condition of the matched configured task is met, so that the problems that in the related art, the development efficiency of event-driven instructions of services is low and the mode of executing the task based on the event-driven instructions is inflexible are solved. By configuring the data variable and the data variable condition of the task in advance, judging whether the task to be executed of the business event contains the target data variable of the configured task or not and whether the task to be executed meets the data variable condition of the target data variable or not, determining whether the task to be executed is allowed to be executed or not, and further achieving the effects of flexibly screening the task allowed to be executed from the task to be executed and flexibly executing the task.
In order to improve the efficiency of determining whether the task to be executed is a task that allows execution, optionally, in the task processing method provided in the embodiment of the present application, determining the task to be executed of the service event and determining whether the task data of the task to be executed includes a target data variable includes: acquiring a service tag from event data, determining a task group according to the service tag, and determining tasks in the task group as tasks to be executed, wherein the task group at least comprises one task; and under the condition that the task to be executed exists in a task list of the configured tasks, determining the data variable of the configured task matched with the task to be executed from the task list to obtain a target data variable, and judging whether the task data of the task to be executed contains the target data variable, wherein the task list contains a plurality of configured tasks, and each configured task is associated with at least one data variable.
Specifically, the event is provided with a service tag, and task groups to be screened and filtered of the current event are selected according to the service tag. The service label is used for minimizing which tasks need to be screened, for example, more than 20 tasks exist in a borrowing event, when task grouping is filtered, the first group only has short message tasks, the second group has marketing tasks and short message tasks, the third group has short message tasks and data synchronization tasks, if the task grouping determined according to the service label is the third group, the tasks to be executed of the borrowing event only have short message tasks and data synchronization tasks, if the configured short message tasks have 2 data variables (borrowing amount and borrowing time), and the configured data synchronization tasks have 1 data variable (data synchronization amount), only the configured short message tasks and the data synchronization tasks need to be filtered, namely, whether the task data of the short message tasks contain borrowing amount and borrowing time is judged, and whether the data synchronization tasks contain data synchronization amount is judged.
If the number of data variables of all the 20 tasks is 100, the number of data variables of the 20 tasks is 100, the number of tasks and variables in the group corresponding to the grouped events is limited, and only 3 data variables of the 2 tasks need to be filtered, so that the efficiency of judging whether the task data of the task to be executed contains the target data variables is greatly reduced.
Optionally, in the task processing method provided in the embodiment of the present application, the data variable condition includes a preset data type, a preset operator, and a preset value, and determining whether task data of a task to be executed meets a data variable condition associated with a target data variable includes: analyzing the data types in task data of the task to be executed, and judging whether the analyzed data types cover preset data types of all data variable conditions or not; if the analyzed data types cover the preset data types of all the data variable conditions, for each preset type, acquiring the numerical value under the preset type from the task data, judging whether the numerical value meets the judgment conditions consisting of the preset operator and the preset numerical value, and determining that the task data of the task to be executed meets the data variable conditions corresponding to the preset type under the condition that the numerical value meets the judgment conditions.
Specifically, task data submitted by the business event is compared with data variable conditions associated with the data variables of the configured task to see if the data variable conditions of the configured task can be hit. For example, the business event is a borrowing event, the task to be executed is a short message promotion task, the promotion content of the configured short message promotion task is a coupon for sending 100 blocks, the data variable condition of the configured short message promotion task is that the borrowing amount is more than 5 kilos, the data variable of the numerical value type is extracted from the short message promotion task to be executed, 6 kilos are obtained, whether 6 kilos meet the data variable condition of the borrowing amount is more than 5 kilos is judged, if yes, the short message promotion task to be executed meets the data variable condition of the configured short message promotion task.
Optionally, in the task processing method provided in the embodiment of the present application, in a case where a software development tool is deployed in a service application, by querying configuration data from a database in a manner of locally calling the software development tool, a task processing program is executed based on the configuration data and event data of a service event, where the configuration data includes a plurality of data of configured tasks, in a case where the software development tool is deployed in a task center, the configuration data is queried from the database in a manner of remotely calling the software development tool, and the task processing program is executed based on the configuration data and the event data of the service event.
It should be noted that, in the credit scenario, the service application may be a trust center, the software development tool may be deployed in the trust center, invoking the software development tool is equivalent to invoking a local method class, executing the processing program of the task through the local method class, and the task screening and task executing functions may also be independent to form a task center.
Specifically, the software development tool encapsulates a process of querying a database that stores configuration data, obtains event data for a loan event, invokes the software development tool to query the configuration data from the database, and executes a process of tasks based on the configuration data, the event data for the business event.
Through the embodiment, the software development tool can realize plug-in type use of the component, and is integrated into the project to carry out local calling, so that the use scene is enriched, the project deployment frequency is effectively reduced, and the product stability is further ensured.
The operation management platform is a back-end platform and is used for configuring data and submitting the data to a database for storage, and optionally, in the task processing method provided by the embodiment of the application, the configuration data is obtained by the following modes: newly adding tasks in a visual page of an operation management platform; for each newly added task, selecting a data variable to be screened from a candidate data variable set in an operation management platform, selecting a task executor from a candidate task executor set in the operation management platform, and configuring the selected data variable and the selected task executor on the newly added task to obtain a configured task; and determining the data of all the configured tasks as the configured data.
It should be noted that, all tasks need background management, a candidate data variable set and a candidate executor set may be configured on an operation management platform, then a task is newly added in an operation visualization page, a task is selected from the candidate data variable set to trigger a data variable to be screened, for example, a short message promotion task is newly added, a money is selected from the candidate data variable set, a rule hit screening condition of the task is formed in time, and a task executor is further selected from the candidate task executor set for the task, so as to obtain a configured task, wherein the data variable to be screened may be flexibly modified, deleted and added, and correspondingly, the task executor may also be flexibly modified, deleted and added.
According to the embodiment, different service scenes can be distinguished through configuration data variables, configuration tasks and associated task executors, multi-dimensional data variable cleaning is supported, executable tasks based on the service scenes are selected, multi-scene service processing requirements are met, the readability and maintainability of task codes are enhanced, the development period is effectively shortened, and product iteration is rapidly met.
Optionally, in the task processing method provided in the embodiment of the present application, the candidate data variable set is obtained by: newly adding data variables in a visual page of an operation management platform, and forming a candidate data variable set by all configured data variables; configuring metadata information for each newly added data variable, and determining a data variable condition associated with the data variable by the metadata information, wherein the metadata information at least comprises: preset data type, preset operator and preset value.
Specifically, a data variable is newly added in an operation management platform page, the data variable supports corresponding adding, modifying and deleting capabilities, a plurality of data variables form a candidate data variable set, each data variable needs to define conditions supported by a digital type, for example, service metadata information such as operators (">", "<", "=") is supported, the data variable conditions associated with the data variable are determined by the metadata information, and the metadata information supports the corresponding adding, modifying and deleting capabilities, so that visual management of the metadata information is realized.
For example, if the short message promotion task is to issue 100 pass with a borrowing amount greater than 5 thousand, the data variable of the short message promotion task includes an amount, and the metadata of the amount includes a value type, a greater than number, and 5 thousand. The method comprises the steps of receiving a borrowing event, judging whether the borrowing event contains a target data variable of money or not, including a rule hit screening condition, comparing event data with the data variable condition of money, and looking up what the data type in a message body is, wherein the money is numerical value type data, the data type in the data variable condition is the same, the specific numerical value is 6 kilos, the data variable condition of money is more than 5 kilos, the data variable condition of a short message popularization task is met, the short message popularization task is hit, and the task is processed according to an executor.
Optionally, in the task processing method provided in the embodiment of the present application, the candidate task executor set is obtained by: the method comprises the steps that task executors are newly added in a visual page of an operation management platform, execution condition information is configured for each newly added task executor, and a configured task executor is obtained, wherein the execution condition information at least comprises: effective time, actuator switch; a set of candidate task executors is formed from all of the configured task executors.
Specifically, task executors are newly added in an operation platform, effective time, an executor switch and other execution conditions of a processor set according to service requirements are configured, and new adding, modifying and deleting capabilities of the task executors and the execution conditions are supported, so that a candidate task executor set is obtained, and different executors can be selected from the set in different scenes to be configured for corresponding tasks. The executor is a realization class of tasks and is a code logic block, and the executor switch is used for making decisions on the tasks, for example, if a ticket issuing task is not issued, the executor switch is turned off, the ticket issuing task can be reserved or multiplexed, and the free online and offline switching of the task actions is realized through the executor switch.
The embodiment of the application also provides another task processing method, which comprises the following steps: and setting triggering conditions of executable tasks through configuration of data variables on an operation visual interface, and flexibly processing the tasks meeting the triggering conditions based on event driving.
First, a data operator dictionary supported by a new data variable is added in an operation visualization interface, which includes but is not limited to "=", "> =", "<=", and a plurality of types of data operators, and supports operations such as adding, modifying, deleting, and the like. And a data variable dictionary is newly added in an operation visual interface, variable parameter sources in actual business are calculated through products, channels and business data, and operations such as addition, modification and deletion are supported. The task executor is newly added in the operation visual interface, which can be a business logic or method to be executed such as sending a short message, replacing a button and the like, and simultaneously supports operations such as newly adding, modifying, deleting and the like, and the relevant configuration of the newly added executor can comprise a task processing system, a task on-off switch, a task priority, a task validity period and task expansion parameters, and the relevant configuration can be flexibly set according to business requirements.
And then, newly adding a task in the operation visual interface, selecting a data variable which triggers cleaning required by task execution from a data variable dictionary, and selecting a task executor for the task to obtain the configured task.
It should be noted that, the task processing program is integrated into engineering projects in the form of SDK, and can be flexibly integrated into each business application, so as to meet the local call of each module and meet the requirement of improving performance. And when the event occurs, calling the SDK package to process the event data into tasks. Fig. 2 is a flowchart of an alternative task processing method provided according to an embodiment of the present application. As shown in fig. 2, the method includes: and asynchronously sending an event instruction, packaging the event instruction into executable service parameters of a task executor, screening out task groups to be executed according to event service labels, then searching for an online task which accords with the project execution, screening out the executable task according to the event parameters and parameter variables, searching out a task executor corresponding to the executable task, and submitting the task executor to asynchronous processing of a thread pool.
In this embodiment, a visual operation page with independent data variables, variable cleaning operators and task management metadata information is provided, and the visual operation page has operation management capability configured based on the data variables, tasks and the like, and can be adjusted arbitrarily by adjusting triggering conditions of variable screening conditions, so that operators can conveniently realize visual effective control of task execution. The visual operation management platform can check, add, modify and delete variables which need to be cleaned when the task is executed, and screen the necessary conditions when the task is executed so as to achieve the purpose of task execution filtering. The data variable cleaning and gathering device is applied to the task processor, the processor is provided in the form of a project dependent package, can be rapidly integrated, is built in different project projects, can realize configurable management and configurable screening of task execution, saves labor and time cost to the greatest extent, and improves working efficiency.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a task processing device, and the task processing device of the embodiment of the application can be used for executing the task processing method provided by the embodiment of the application. The following describes a task processing device provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of a processing device for tasks provided according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: an acquisition unit 302, a judgment unit 304, and a control unit 306.
Specifically, the acquiring unit 302 is configured to acquire event data of a service event, determine a task to be executed of the service event, and determine whether task data of the task to be executed includes a target data variable, where the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed;
A judging unit 304, configured to judge whether task data of a task to be executed meets a data variable condition associated with a target data variable if the task data of the task to be executed includes the target data variable;
and a control unit 306, configured to determine the task to be executed as a task that is allowed to be executed if the task data of the task to be executed satisfies the data variable condition, and control the task to be executed to execute if the execution condition of the matched configured task is reached.
According to the task processing device provided by the embodiment of the application, the event data of the service event is acquired through the acquisition unit 302, the task to be executed of the service event is determined, and whether the task data of the task to be executed contains a target data variable is judged, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed; a judging unit 304 that judges whether task data of a task to be executed satisfies a data variable condition associated with a target data variable in a case where the task data of the task to be executed includes the target data variable; the control unit 306 determines the task to be executed as a task allowed to be executed when the task data of the task to be executed meets the data variable condition, and controls the task to be executed to execute when the matched execution condition of the configured task is reached, so that the problems of low development efficiency of event-driven instructions of the service and inflexible task execution mode based on the event-driven instructions in the related art are solved.
Optionally, in the processing apparatus for a task provided in the embodiment of the present application, the obtaining unit 302 includes: the acquisition module is used for acquiring the service tag from the event data, determining a task group according to the service tag, and determining the task in the task group as a task to be executed, wherein the task group at least comprises one task; the first determining module is used for determining the data variable of the configured task matched with the task to be executed from the task list to obtain a target data variable and judging whether the task data of the task to be executed contains the target data variable or not under the condition that the task to be executed exists in the task list of the configured task, wherein the task list contains a plurality of configured tasks, and each configured task is associated with at least one data variable.
Optionally, in the processing device for a task provided in the embodiment of the present application, the data variable condition includes a preset data type, a preset operator, and a preset value, and the determining unit 304 includes: the analysis module is used for analyzing the data types in the task data of the task to be executed and judging whether the analyzed data types cover the preset data types of all data variable conditions or not; the second determining module is configured to, if the parsed data types cover preset data types of all the data variable conditions, obtain, for each preset type, a value of the preset type from the task data, determine whether the value meets a judgment condition composed of a preset operator and a preset value, and determine that the task data of the task to be executed meets the data variable condition corresponding to the preset type if the value meets the judgment condition.
Optionally, in the task processing device provided in the embodiment of the present application, in a case where a software development tool is deployed in a service application, by querying configuration data from a database in a manner of locally calling the software development tool, a task processing program is executed based on the configuration data and event data of a service event, where the configuration data includes a plurality of data of configured tasks, in a case where the software development tool is deployed in a task center, the configuration data is queried from the database in a manner of remotely calling the software development tool, and the task processing program is executed based on the configuration data and the event data of the service event.
Optionally, in the processing device for a task provided in the embodiment of the present application, the configuration data is obtained by: newly adding tasks in a visual page of an operation management platform; for each newly added task, selecting a data variable to be screened from a candidate data variable set in an operation management platform, selecting a task executor from a candidate task executor set in the operation management platform, and configuring the selected data variable and the selected task executor on the newly added task to obtain a configured task; and determining the data of all the configured tasks as the configured data.
Optionally, in the processing device for a task provided in the embodiment of the present application, the candidate data variable set is obtained by: newly adding data variables in a visual page of an operation management platform, and forming a candidate data variable set by all configured data variables; configuring metadata information for each newly added data variable, and determining a data variable condition associated with the data variable by the metadata information, wherein the metadata information at least comprises: preset data type, preset operator and preset value.
Optionally, in the task processing device provided in the embodiment of the present application, the candidate task executor set is obtained by: the method comprises the steps that task executors are newly added in a visual page of an operation management platform, execution condition information is configured for each newly added task executor, and a configured task executor is obtained, wherein the execution condition information at least comprises: effective time, actuator switch; a set of candidate task executors is formed from all of the configured task executors.
The processing device for the tasks includes a processor and a memory, where the acquiring unit 302, the judging unit 304, the control unit 306, and the like are stored as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problems of low development efficiency of event-driven instructions of services and inflexible task execution mode based on the event-driven instructions in the related art are solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the application also provides a computer storage medium, which is used for storing the program, wherein the program runs to control the equipment where the nonvolatile storage medium is located to execute a task processing method.
The embodiment of the application further provides an electronic device, fig. 4 is a schematic diagram of the electronic device provided according to the embodiment of the application, and as shown in fig. 4, the electronic device 40 includes a processor and a memory; the memory has stored therein computer readable instructions for execution by the processor, wherein the computer readable instructions when executed perform a method of processing a task. The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. The task processing method is characterized in that the task processing method is applied to a business application, and the business application calls a software development kit to execute a processing program of the following tasks:
acquiring event data of a business event, determining a task to be executed of the business event, and judging whether task data of the task to be executed contains a target data variable, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed;
judging whether task data of the task to be executed meet the data variable condition associated with the target data variable or not under the condition that the task data of the task to be executed contains the target data variable;
and determining the task to be executed as a task which is allowed to be executed when the task data of the task to be executed meets the data variable condition, and controlling the task to be executed to execute when the execution condition of the matched configured task is met.
2. The method of claim 1, wherein determining a task to be performed of the business event and determining whether task data of the task to be performed includes a target data variable comprises:
acquiring a service tag from the event data, determining a task group according to the service tag, and determining the task in the task group as the task to be executed, wherein the task group at least comprises one task;
and under the condition that the task to be executed exists in a task list of the configured tasks, determining data variables of the configured tasks matched with the task to be executed from the task list to obtain the target data variable, and judging whether task data of the task to be executed contain the target data variable, wherein the task list contains a plurality of configured tasks, and each configured task is associated with at least one data variable.
3. The method of claim 1, wherein the data variable condition comprises a preset data type, a preset operator, and a preset value, and wherein determining whether the task data of the task to be performed meets the data variable condition associated with the target data variable comprises:
Analyzing the data types in the task data of the task to be executed, and judging whether the analyzed data types cover the preset data types of all data variable conditions or not;
if the analyzed data types cover preset data types of all data variable conditions, for each preset type, acquiring a numerical value under the preset type from the task data, judging whether the numerical value meets the judgment conditions composed of the preset operator and the preset numerical value, and determining that the task data of the task to be executed meets the data variable conditions corresponding to the preset type under the condition that the numerical value meets the judgment conditions.
4. The method of claim 1, wherein, in the case where the software development tool is deployed in the business application, the configuration data is queried from a database by locally invoking the software development tool, the process of the task is performed based on the configuration data, event data of the business event, wherein the configuration data comprises data of a plurality of configured tasks;
and under the condition that the software development tool is deployed in a task center, inquiring configuration data from the database in a mode of remotely calling the software development tool, and executing a processing program of the task based on the configuration data and event data of the business event.
5. The method of claim 4, wherein the configuration data is obtained by:
newly adding tasks in a visual page of an operation management platform;
for each newly added task, selecting a data variable to be screened from a candidate data variable set in the operation management platform, selecting a task executor from a candidate task executor set in the operation management platform, and configuring the selected data variable and the selected task executor on the newly added task to obtain a configured task;
and determining the data of all the configured tasks as the configured data.
6. The method of claim 5, wherein the set of candidate data variables is obtained by:
newly adding data variables in a visual page of the operation management platform, and forming the candidate data variable set by all configured data variables;
configuring metadata information for each newly added data variable, and determining a data variable condition associated with the data variable by the metadata information, wherein the metadata information at least comprises: preset data type, preset operator and preset value.
7. The method of claim 5, wherein the set of candidate task executors is obtained by:
the method comprises the steps that task executors are newly added in a visual page of an operation management platform, execution condition information is configured for each newly added task executor, and a configured task executor is obtained, wherein the execution condition information at least comprises: effective time, actuator switch;
the candidate task executor set is formed by all the configured task executors.
8. A task processing device, comprising:
the system comprises an acquisition unit, a configuration unit and a configuration unit, wherein the acquisition unit is used for acquiring event data of a business event, determining a task to be executed of the business event, and judging whether task data of the task to be executed contains a target data variable, wherein the task data is acquired from the event data, and the target data variable is a data variable of a configured task matched with the task to be executed;
the judging unit is used for judging whether the task data of the task to be executed meets the data variable condition associated with the target data variable or not under the condition that the task data of the task to be executed contains the target data variable;
And the control unit is used for determining the task to be executed as a task which is allowed to be executed when the task data of the task to be executed meets the data variable condition, and controlling the task to be executed to execute when the execution condition of the matched configured task is met.
9. A computer storage medium for storing a program, wherein the program when run controls a device in which the computer storage medium is located to perform the method of processing a task according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute a processing method of a task according to any of claims 1 to 7 by means of the computer program.
CN202311737543.7A 2023-12-17 2023-12-17 Task processing method and device, storage medium and processor Pending CN117724815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311737543.7A CN117724815A (en) 2023-12-17 2023-12-17 Task processing method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311737543.7A CN117724815A (en) 2023-12-17 2023-12-17 Task processing method and device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN117724815A true CN117724815A (en) 2024-03-19

Family

ID=90204790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311737543.7A Pending CN117724815A (en) 2023-12-17 2023-12-17 Task processing method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN117724815A (en)

Similar Documents

Publication Publication Date Title
CN107038042B (en) Service execution method and device
CN109766142B (en) Method for customizing user interface, self-service terminal equipment, server and storage medium
US9684869B2 (en) Infrastructure and architecture for development and execution of predictive models
US20200134046A1 (en) Compression of Log Data Using Field Types
CN109885624A (en) Data processing method, device, computer equipment and storage medium
CN112162915A (en) Test data generation method, device, equipment and storage medium
CN114911482A (en) Low code application generation system and method in industrial scene
CN111784468A (en) Account association method and device and electronic equipment
CN106055315A (en) Method and system for processing batched tasks
CN114185874A (en) Big data based modeling method and device, development framework and equipment
CN101295382A (en) Method and device for implementing service logical relation between business object properties
CN101894317B (en) System and method for driving business logic through data changes
CN117724815A (en) Task processing method and device, storage medium and processor
CN115292169A (en) UI automation test method and system
CN110221952B (en) Service data processing method and device and service data processing system
CN114756224A (en) Activity execution method and device
CN109992614B (en) Data acquisition method, device and server
CN112925813A (en) Data processing method, device and system based on mixed arrangement and storage medium
CN112579082A (en) Interactive state data establishing method and device, storage medium and electronic equipment
CN112527387B (en) Application processing method and device
CN110942017B (en) Multi-algorithm index comparison method and system based on automation
CN113935301B (en) Report generation method and device, storage medium and electronic equipment
CN113515494B (en) Database processing method based on distributed file system and electronic equipment
CN112650600B (en) Method, device and computer equipment for pushing message content
CN113222084B (en) Block chain-based date labeling and querying method and device

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