Movatterモバイル変換


[0]ホーム

URL:


CN116501376A - Decoupling method, system and device based on configuration instant trigger task - Google Patents

Decoupling method, system and device based on configuration instant trigger task
Download PDF

Info

Publication number
CN116501376A
CN116501376ACN202310756091.0ACN202310756091ACN116501376ACN 116501376 ACN116501376 ACN 116501376ACN 202310756091 ACN202310756091 ACN 202310756091ACN 116501376 ACN116501376 ACN 116501376A
Authority
CN
China
Prior art keywords
task
data
action
message
dao
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
CN202310756091.0A
Other languages
Chinese (zh)
Other versions
CN116501376B (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.)
Hecom Beijing Technology Co ltd
Original Assignee
Hecom Beijing Technology 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 Hecom Beijing Technology Co ltdfiledCriticalHecom Beijing Technology Co ltd
Priority to CN202310756091.0ApriorityCriticalpatent/CN116501376B/en
Publication of CN116501376ApublicationCriticalpatent/CN116501376A/en
Application grantedgrantedCritical
Publication of CN116501376BpublicationCriticalpatent/CN116501376B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a decoupling method, a system and a device based on configuration instant triggering task, comprising the following steps: adding an entity metadata table and a field metadata table, and performing addition, deletion and modification operations on the database according to the mapping relation stored in the entity metadata table and the field metadata table based on DAO to obtain modified data; the DAO sends the message with the same format as the modified data to a message queue; abstracting different business behaviors into general actions, and adding an action table; adding a task table, when the message is consumed, finding a plurality of pieces of data in a corresponding action table in the task table, and sequentially executing the pieces of data according to the sequence; and adding a message queue consumption service, triggering a task list according to the content of the message, acquiring a task list, sequentially judging whether the current service data accords with screening conditions configured on the task, and acquiring a corresponding implementation class from the action list according to the action type to execute the action if the current service data accords with the screening conditions. The invention can realize the decoupling of the instant trigger task based on configuration.

Description

Decoupling method, system and device based on configuration instant trigger task
Technical Field
The present invention relates to the field of trigger task decoupling, and in particular, to a method, system, and apparatus for decoupling a trigger task based on configuration.
Background
With the continuous change of customer business, customers have different requirements for the change of the same business document, for example: after generating a piece of contract data, the A customer hopes that the contract amount is more than 10W and can automatically submit approval, and the B customer hopes that the contract amount is more than 10W and automatically transfer to XX for charge. For this kind of scene, only through customizing to accomplish, cut two branches from the code trunk, write two sets of different codes to two different parts of customer respectively, as long as the business of customer changes, need to modify corresponding branch code, increased research and development and maintenance cost.
Disclosure of Invention
The invention aims to provide a decoupling method based on configuration of an instant trigger task, and aims to solve the problem of decoupling method, system and device based on configuration of the instant trigger task.
The embodiment of the invention provides a decoupling method based on configuration instant trigger tasks, which comprises the following steps:
s1, adding an entity metadata table and a field metadata table, and performing addition, deletion and modification operations on a database based on unified DAO according to mapping relations stored in the entity metadata table and the field metadata table to obtain modified data;
s2, the DAO sends the information with the same format as the modified data to an information queue;
s3, abstracting different business behaviors into general actions, and adding an action table, wherein the action table comprises a plurality of action types and implementation classes corresponding to the action types;
s4, adding a task table, wherein the data of the trigger task accords with the columns of screening conditions, executing actions, starting and stopping, serial numbers and the like, and when the message is consumed, finding a plurality of pieces of data in the corresponding action table in the task table, and sequentially executing the data according to the sequence;
s5, adding message queue consumption service, triggering a task list according to the content of the message, acquiring a corresponding task list, sequentially judging whether the current service data accords with screening conditions configured on the task, and acquiring a corresponding implementation class from the task list according to the action type to execute the action if the current service data accords with the screening conditions.
The invention also provides a decoupling system based on the configuration instant triggering task, which comprises:
the adding, deleting and modifying module is used for adding the entity metadata table and the field metadata table, and based on unified DAO, adding, deleting and modifying the database according to the mapping relation stored in the entity metadata table and the field metadata table to obtain modified data;
the sending module is used for sending the message with the same format as the modified data to the message queue by the DAO;
the action table module: the method comprises the steps of abstracting different business behaviors into general actions, and adding an action table, wherein the action table comprises a plurality of action types and implementation classes corresponding to the action types;
the task table module: the data used for adding the task list and triggering the task accords with the columns of screening conditions, executing actions, starting and stopping, serial numbers and the like, and when the message is consumed, a plurality of pieces of data in the corresponding action list are found in the task list and are sequentially executed according to the sequence;
message queue consumption service module: and the message queue consumption service is used for adding a message, triggering a task list according to the content of the message, acquiring a corresponding task list, sequentially judging whether the current service data accords with screening conditions configured on the task, and acquiring a corresponding implementation class from the action list according to the action type to execute the action if the current service data accords with the screening conditions.
The embodiment of the invention also provides a decoupling device based on configuration instant triggering task, which comprises: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method described above.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores an information transmission implementation program, and the program realizes the steps of the method when being executed by a processor.
By adopting the embodiment of the invention, the decoupling of the task is triggered immediately based on configuration.
The foregoing description is only an overview of the present invention, and is intended to provide a more clear understanding of the technical means of the present invention, as it is embodied in accordance with the present invention, and to make the above and other objects, features and advantages of the present invention more apparent, as it is embodied in the following detailed description of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a decoupling method based on configuring an instant trigger task in accordance with an embodiment of the present invention;
FIG. 2 is a specific flow chart of a decoupling method based on configuring an instant trigger task according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a decoupling system based on configuration of an instant trigger task according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a decoupling device based on configuration of an instant trigger task according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be clearly and completely described in connection with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Method embodiment
According to an embodiment of the present invention, a decoupling method based on configuration of an instant trigger task is provided, and fig. 1 is a flowchart of a decoupling method based on configuration of an instant trigger task according to an embodiment of the present invention, as shown in fig. 1, and specifically includes:
s1, adding an entity metadata table and a field metadata table, and performing addition, deletion and modification operations on a database based on unified DAO according to mapping relations stored in the entity metadata table and the field metadata table to obtain modified data;
s1 specifically comprises: the entity metadata table is used for defining the mapping relation between different service entities and the database table, the field metadata table is used for defining the types of fields, the basic attributes of the fields and the mapping relation between the fields and the database column, unified service object classes are added, the entity names and the key value pair sets of the fields are contained, and based on unified DAO, the database is subjected to adding, deleting and modifying operations through the mapping relation stored in the two metadata tables.
S2, the DAO sends the information with the same format as the modified data to an information queue;
s2 specifically comprises: after the DAO adds and deletes the service data, the message with the same format is sent to the same message queue, and the message content comprises: operator, operation time, operation end, operation type, operation object, operation data, and other information.
S3, abstracting different business behaviors into general actions, and adding an action table, wherein the action table comprises a plurality of action types and implementation classes corresponding to the action types;
s4, adding a task table, wherein the data of the trigger task accords with the columns of screening conditions, executing actions, starting and stopping, serial numbers and the like, and when the message is consumed, finding a plurality of pieces of data in the corresponding action table in the task table, and sequentially executing the data according to the sequence;
s4 specifically comprises the following steps: adding a task list, including task names, execution objects and trigger occasions, wherein the execution data need to meet the screening conditions, execution actions, start and stop, serial numbers and other columns, and finding out a plurality of pieces of data in the corresponding action list in the task list when the data operation message is consumed, and sequentially executing the data according to the sequence.
S5, adding message queue consumption service, triggering a task list according to the content of the message, acquiring a corresponding task list, sequentially judging whether the current service data accords with screening conditions configured on the task, and acquiring a corresponding implementation class from the task list according to the action type to execute the action if the current service data accords with the screening conditions.
The specific implementation method is as follows:
FIG. 2 is a specific flow chart of a decoupling method based on configuring an instant trigger task according to an embodiment of the present invention;
1. two metadata definition tables are added: the entity metadata table is used for defining the mapping relation between different business entities and the database table, and the field metadata table is used for defining the types of the fields, the basic attributes of the fields and the mapping relation between the fields and the database column. And adding unified BO, wherein the unified BO comprises a key value pair set of entity names and fields, and adding, deleting and modifying the database by using the unified DAO through the mapping relation stored in the two metadata tables.
2. After the DAO adds and deletes the service data, the message with the same format is sent to the same message queue, and the message content comprises: the operator, the operation time, the operation end (app, web), the operation type (add, delete, change), the operation object (order, contract, etc.), the operation data (newly added data, deleted data, changed field value), other information (operation trigger, prevent loop triggering).
3. Adding an action table abstracts different business behaviors into actions, for example: business actions such as sending notification, field change, data locking, submitting approval and the like are abstracted into general actions, and special business logic of a client is abstracted into special actions. All types of actions implement a unified interface, registering all types of actions for invocation at the start of the queue consumption service.
4. The instant trigger task list is added, which comprises the task name, the execution object, the trigger time (adding, deleting and changing), the screening condition which the execution data needs to meet, the execution action, the start and stop, the serial number and the like. When the data manipulation message is consumed, a corresponding action list can be found in the table, which is sequentially executed in order.
5. And adding a message queue consumption service, namely immediately triggering a task list according to the operation type and the operation object acquired by analyzing the message content to acquire a corresponding task list, sequentially judging whether the current service data accords with screening conditions configured on the task, and acquiring a corresponding action executor from an action execution pool according to the action type to execute the action if the current service data accords with the screening conditions.
The beneficial effects are that: the invention does not need customized software, modifies the corresponding branch code without changing the business of the customer, and reduces the research, development and maintenance cost.
System embodiment
According to an embodiment of the present invention, a decoupling system based on configuration of an instant trigger task is provided, and fig. 3 is a schematic diagram of a decoupling system based on configuration of an instant trigger task according to an embodiment of the present invention, as shown in fig. 3, and specifically includes:
the adding, deleting and modifying module is used for adding the entity metadata table and the field metadata table, and based on unified DAO, adding, deleting and modifying the database according to the mapping relation stored in the entity metadata table and the field metadata table to obtain modified data;
the adding and deleting module is specifically used for: the entity metadata table is used for defining the mapping relation between different service entities and the database table, the field metadata table is used for defining the types of fields, the basic attributes of the fields and the mapping relation between the fields and the database column, unified service object classes are added, the entity names and the key value pair sets of the fields are contained, and based on unified DAO, the database is subjected to adding, deleting and modifying operations through the mapping relation stored in the two metadata tables.
The sending module is used for sending the message with the same format as the modified data to the message queue by the DAO;
the sending module is specifically used for: after the DAO adds and deletes the service data, the message with the same format is sent to the same message queue, and the message content comprises: operator, operation time, operation end, operation type, operation object, operation data, and other information.
The action table module: the method comprises the steps of abstracting different business behaviors into general actions, and adding an action table, wherein the action table comprises a plurality of action types and implementation classes corresponding to the action types;
the task table module: the data used for adding the task list and triggering the task accords with the columns of screening conditions, executing actions, starting and stopping, serial numbers and the like, and when the message is consumed, a plurality of pieces of data in the corresponding action list are found in the task list and are sequentially executed according to the sequence;
the task table module is specifically used for: adding a task list, including task names, execution objects and trigger occasions, wherein the execution data need to meet the screening conditions, execution actions, start and stop, serial numbers and other columns, and finding out a plurality of pieces of data in the corresponding action list in the task list when the data operation message is consumed, and sequentially executing the data according to the sequence.
Message queue consumption service module: and the message queue consumption service is used for adding a message, triggering a task list according to the content of the message, acquiring a corresponding task list, sequentially judging whether the current service data accords with screening conditions configured on the task, and acquiring a corresponding implementation class from the action list according to the action type to execute the action if the current service data accords with the screening conditions.
The embodiment of the present invention is a system embodiment corresponding to the above method embodiment, and specific operations of each module may be understood by referring to the description of the method embodiment, which is not repeated herein.
Device embodiment 1
An embodiment of the present invention provides a decoupling device based on configuration of an instant trigger task, as shown in fig. 4, including: memory 40, processor 42, and a computer program stored on memory 40 and executable on processor 42, which when executed by the processor, performs the steps of the method embodiments described above.
Device example two
The embodiment of the present invention provides a computer readable storage medium, on which a program for implementing information transmission is stored, which when executed by the processor 42 implements the steps in the above-described method embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; and these modifications or substitutions may be made to the technical solutions of the embodiments of the present invention without departing from the spirit of the corresponding technical solutions.

Claims (10)

CN202310756091.0A2023-06-262023-06-26Decoupling method, system and device based on configuration instant trigger taskActiveCN116501376B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202310756091.0ACN116501376B (en)2023-06-262023-06-26Decoupling method, system and device based on configuration instant trigger task

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310756091.0ACN116501376B (en)2023-06-262023-06-26Decoupling method, system and device based on configuration instant trigger task

Publications (2)

Publication NumberPublication Date
CN116501376Atrue CN116501376A (en)2023-07-28
CN116501376B CN116501376B (en)2023-09-12

Family

ID=87326987

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310756091.0AActiveCN116501376B (en)2023-06-262023-06-26Decoupling method, system and device based on configuration instant trigger task

Country Status (1)

CountryLink
CN (1)CN116501376B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105117220A (en)*2015-08-142015-12-02浪潮通用软件有限公司Business entity operation management and automatic execution method based on metadata description
CN106713018A (en)*2016-12-082017-05-24中国电信股份有限公司物联网分公司Message queue business data scheduling method and message queue implementation method
CN109739473A (en)*2018-12-142019-05-10广州优态科技有限公司The development approach of business interface
CN109799974A (en)*2018-12-142019-05-24广州优态科技有限公司The development approach of data and logic
CN110428216A (en)*2019-07-032019-11-08平安科技(深圳)有限公司Operation flow management-control method, device, computer equipment and storage medium
US20200099655A1 (en)*2018-09-202020-03-26Palo Alto Research Center IncorporatedCloud-based device manager based on message queues
CN111124636A (en)*2019-12-072020-05-08杭州安恒信息技术股份有限公司Process arrangement engine and control method thereof
CN111625535A (en)*2020-04-172020-09-04贝壳技术有限公司Method, device and storage medium for realizing business data association
CN113672357A (en)*2020-05-152021-11-19北京沃东天骏信息技术有限公司Task scheduling method, device and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105117220A (en)*2015-08-142015-12-02浪潮通用软件有限公司Business entity operation management and automatic execution method based on metadata description
CN106713018A (en)*2016-12-082017-05-24中国电信股份有限公司物联网分公司Message queue business data scheduling method and message queue implementation method
US20200099655A1 (en)*2018-09-202020-03-26Palo Alto Research Center IncorporatedCloud-based device manager based on message queues
CN109739473A (en)*2018-12-142019-05-10广州优态科技有限公司The development approach of business interface
CN109799974A (en)*2018-12-142019-05-24广州优态科技有限公司The development approach of data and logic
CN110428216A (en)*2019-07-032019-11-08平安科技(深圳)有限公司Operation flow management-control method, device, computer equipment and storage medium
CN111124636A (en)*2019-12-072020-05-08杭州安恒信息技术股份有限公司Process arrangement engine and control method thereof
CN111625535A (en)*2020-04-172020-09-04贝壳技术有限公司Method, device and storage medium for realizing business data association
CN113672357A (en)*2020-05-152021-11-19北京沃东天骏信息技术有限公司Task scheduling method, device and system

Also Published As

Publication numberPublication date
CN116501376B (en)2023-09-12

Similar Documents

PublicationPublication DateTitle
US8762408B2 (en)Optimizing software applications
CN108874558B (en)Message subscription method of distributed transaction, electronic device and readable storage medium
US20160098293A1 (en)System, method, and software for controlled interruption of batch job processing
US10725774B2 (en)Issue tracking system
US20170351989A1 (en)Providing supply chain information extracted from an order management system
US20050283667A1 (en)System and method for building full batch test environments
CN109684057A (en)Task processing method and device and storage medium
CN106371973A (en)Data processing method, equipment and system
CN112765166A (en)Data processing method, device and computer readable storage medium
CN106371984A (en)Data monitoring method, equipment and system
CN111651296A (en) Intercept backup method, device, device and storage medium for data deletion operation
WO2020015170A1 (en)Interface invoking method and apparatus, and computer-readable storage medium
CN112801546A (en)Task scheduling method, device and storage medium
CN114218258A (en) A user label management method, system, device and storage medium
US20140114916A1 (en)Code generation and implementation method, system, and storage medium for delivering bidirectional data aggregation and updates
CN113687882B (en)Activiti-based flow rollback method, activiti-based flow rollback device and storage medium
CN115203260A (en)Abnormal data determination method and device, electronic equipment and storage medium
CN116501376B (en)Decoupling method, system and device based on configuration instant trigger task
CN113448570A (en)Data processing method and device, electronic equipment and storage medium
CN113504898B (en)Front-end assembly rapid processing method, system and computer storage medium for realizing business arrangement
CN110990643A (en)GoJS-based complex task visualization method, terminal device and storage medium
US7433875B2 (en)Web store events
US20220100740A1 (en)Systems and methods for automatically creating and/or managing electronic data tables
CN114385952A (en)Page function item management method and device, computer equipment and readable storage medium
US20060074936A1 (en)Method and system for generating a report using an object-oriented approach

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp