CN112347256A - Method, device, equipment and storage medium for running task - Google Patents

Method, device, equipment and storage medium for running task Download PDF

Info

Publication number
CN112347256A
CN112347256A CN202011233414.0A CN202011233414A CN112347256A CN 112347256 A CN112347256 A CN 112347256A CN 202011233414 A CN202011233414 A CN 202011233414A CN 112347256 A CN112347256 A CN 112347256A
Authority
CN
China
Prior art keywords
task
component
flow
data
components
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
CN202011233414.0A
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202011233414.0A priority Critical patent/CN112347256A/en
Publication of CN112347256A publication Critical patent/CN112347256A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the field of block chains, and discloses a method for running tasks, which comprises the following steps: acquiring a first flow and a component configuration table corresponding to a first task; determining each component in the first flow and a calling order corresponding to each component according to the first flow and the component configuration table; sequentially calling the data preparation components to acquire data respectively required by the components in operation from the database according to the components included in the first flow and calling orders respectively corresponding to the components; caching data respectively needed by the operation of each component in a designated storage area of an application system; judging whether an operation instruction for operating the first task is received; if yes, data respectively needed by the operation of each component is called from the designated storage area, and the first task is operated. The components are split according to functions in the task processing flow, the data processing component is set, the data of all the components are called from the database at one time and cached, and the access frequency of the database in the task operation process is reduced.

Description

Method, device, equipment and storage medium for running task
Technical Field
The present application relates to the field of blockchain, and more particularly, to a method, apparatus, device, and storage medium for executing tasks.
Background
The insurance business process can be divided into insurance withdrawing, hesitation insurance withdrawing, insurance reducing, insurance adding, customer information changing, policy loan and the like according to functions. The system can quickly and accurately provide the services for the customers, and can help the companies to improve the service quality and the customer satisfaction. However, the existing security system is implemented in a database layer in the handling process, that is, the database needs to be accessed in real time in the handling process, when the insurance business traffic is large, the database provides basic data reading and writing, which is laborious and stuttered, and then bears a large amount of logic calculation, which directly results in the operation barrier of the database, has obvious performance bottleneck, and cannot respond to business requirements quickly, thereby affecting the customer experience and reducing the customer satisfaction.
Disclosure of Invention
The method and the device mainly aim to solve the technical problems that when the service volume is large, the database is in obstacle to operation and cannot respond to service requirements quickly.
The application provides a method for running tasks, which comprises the following steps:
acquiring a first flow corresponding to a first task and a component configuration table corresponding to the first flow;
determining each component included in the first flow and a calling order respectively corresponding to each component according to the first flow and a component configuration table corresponding to the first flow;
sequentially calling data preparation components to obtain data respectively needed by the components when the components run from a database according to the components included in the first flow and calling orders respectively corresponding to the components;
caching data respectively needed by the operation of each component in a designated storage area of an application system;
judging whether an operation instruction for operating the first task is received;
if yes, data respectively needed by the operation of each component is called from the designated storage area, and the first task is operated.
Preferably, the step of acquiring the first flow corresponding to the first task and the component configuration table corresponding to the first flow includes:
acquiring running logic texts corresponding to all tasks respectively;
according to the function classification in the operation logic text, decoupling and dividing operation flows corresponding to all tasks respectively to obtain flow nodes included by each task respectively;
encapsulating an operation process between two adjacent process nodes into a designated component, wherein the two adjacent process nodes are any two adjacent process nodes in all process nodes corresponding to a designated task, and the designated task is any one of all tasks;
naming the designated component according to the function corresponding to the designated component;
packaging all components in the specified task according to the packaging process of the specified components;
and according to the running process corresponding to the specified task, counting all the components in the specified task to form a component configuration table corresponding to the specified task.
Preferably, the step of performing decoupling division on the operation flows respectively corresponding to all the tasks according to the function classification in the operation logic text to obtain the flow nodes respectively included in each task includes:
according to
Figure BDA0002765954880000021
Respectively calculating process node association coefficients between two adjacent moments in an operation process, wherein x is a vector corresponding to a process node keyword corresponding to a previous moment in the two adjacent moments, y is a vector corresponding to a process node keyword corresponding to a subsequent moment in the two adjacent moments, r represents an association coefficient, n is the number of pairs of (x, y), x and y are positive numbers respectively, and n is a natural number greater than 1;
judging whether a process node association coefficient between two adjacent moments in an operation process is smaller than a preset threshold value or not;
and if so, dividing the flow node corresponding to the previous moment and the flow node corresponding to the later moment in the two adjacent moments into two operation assemblies.
Preferably, the step of retrieving, from the designated storage area, data respectively required by the components during the operation, and executing the first task includes:
judging whether the operation scene corresponding to the first task at the current moment is a trial operation scene or not;
if not, judging that the operation scene is accepted, and starting a data rollback component;
and rolling back the running data of the first task to a database for data updating through the data rollback component.
Preferably, the step of retrieving, from the specified storage area, data respectively required by the components when running, and running the first task, includes:
judging whether an updating instruction of the first task is received, wherein the updating instruction carries updated component information;
if yes, calling the data preparation component to acquire data respectively required by the updated components in operation from the database according to the updated component information, and taking the data as operation data corresponding to the updated first task;
and caching the updated running data corresponding to the first task in the specified storage area of the application system.
Preferably, after the step of retrieving data respectively needed by each of the components when running from the designated storage area, the step of running the first task includes:
judging whether the first task is operated completely;
if yes, acquiring a second flow corresponding to a second task to be operated in the task sequence and a component configuration table corresponding to the second flow;
determining a calling order corresponding to each component in the second flow according to the second flow and a component configuration table corresponding to the second flow;
sequentially calling data preparation components to acquire data respectively required by the components in the second flow when the components run from a database according to the calling sequence respectively corresponding to the components in the second flow;
and covering the data which are respectively needed by the running of each component in the second flow and are respectively needed by the running of each component in the first flow, and caching the data in a designated storage area of an application system.
The present application further provides a device for running a task, comprising:
the system comprises a first acquisition module, a second acquisition module and a component configuration table, wherein the first acquisition module is used for acquiring a first flow corresponding to a first task and the component configuration table corresponding to the first flow;
a first determining module, configured to determine, according to the first flow and a component configuration table corresponding to the first flow, each component included in the first flow and a call order respectively corresponding to each component;
the first calling module is used for sequentially calling the data preparation components to acquire data respectively needed by the running of each component from a database according to each component in the first flow and the calling sequence respectively corresponding to each component;
the first cache module is used for caching data respectively needed by the running of each component in a specified storage area of an application system;
the first judgment module is used for judging whether an operation instruction for operating the first task is received or not;
and the operation module is used for calling data respectively required by the operation of each component from the specified storage area and operating the first task if an operation instruction for operating the first task is received.
The present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as described above.
According to the task processing method and device, the task process is divided into the components according to functions, the independent data processing components are set, the data used by all the components in the current task are called from the database at one time and cached, the task process is supported by using the cached data in the task running process, the access frequency to the database is reduced, and the smoothness of the task processing process is improved.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a method for executing tasks according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an apparatus for task execution according to an embodiment of the present application;
fig. 3 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, the method for running tasks of the present embodiment includes:
s1: acquiring a first flow corresponding to a first task and a component configuration table corresponding to the first flow;
s2: determining each component included in the first flow and a calling order respectively corresponding to each component according to the first flow and a component configuration table corresponding to the first flow;
s3: sequentially calling data preparation components to obtain data respectively needed by the components when the components run from a database according to the components included in the first flow and calling orders respectively corresponding to the components;
s4: caching data respectively needed by the operation of each component in a designated storage area of an application system;
s5: judging whether an operation instruction for operating the first task is received;
s6: if yes, data respectively needed by the operation of each component is called from the designated storage area, and the first task is operated.
According to the embodiment of the application, the process corresponding to the task is split into different functional components according to different functions, and the component configuration table corresponding to each task is formed. The component configuration table includes names of functional components, functional descriptions of the functional components, execution orders of the functional components, and the like. And forming an executive program corresponding to the task by connecting the functional components sequentially through the code logic language. And by arranging an additional data preparation component, data respectively needed by each functional component is called from the database once before the task is executed and cached at the application system end, so that frequent access to the database in the task execution process is reduced. And the called data is cached in the application layer, the business logic realized by the database language is rewritten by java language, the decoupling of the task execution program and the database is realized, the database only carries out basic query and storage, and the performance space of the database is released. The database includes, but is not limited to, an Oracle database. According to the method and the system, the task execution program and the database are decoupled, and technical conditions are provided for going to an Oracle database, replacing other databases and the like. The task of the application includes but is not limited to insurance business, components are split according to functions in the process of dealing with insurance business, an independent data preparation component is set up, and data used by all components in the current business are called from a database at one time and cached. In the service processing process, the cache data is used for supporting the service process, the access frequency to the database is reduced, the smoothness of the service processing process is improved, different assemblies can share the current service cache data in the same service request, and the performance of a handling interface is improved. For example, in the process of security management, policy information, client information, base table data and the like are used for multiple times, and the data preparation component queries the database for one time to call out and performs data caching at an application layer.
Further, before the step S1 of acquiring the first procedure corresponding to the first task and the component configuration table corresponding to the first procedure, the method includes:
s11: acquiring running logic texts corresponding to all tasks respectively;
s12: according to the function classification in the operation logic text, decoupling and dividing operation flows corresponding to all tasks respectively to obtain flow nodes included by each task respectively;
s13: encapsulating an operation process between two adjacent process nodes into a designated component, wherein the two adjacent process nodes are any two adjacent process nodes in all process nodes corresponding to a designated task, and the designated task is any one of all tasks;
s14: naming the designated component according to the function corresponding to the designated component;
s15: packaging all components in the specified task according to the packaging process of the specified components;
s16: and according to the running process corresponding to the specified task, counting all the components in the specified task to form a component configuration table corresponding to the specified task.
According to the method and the device, the operation flows corresponding to all tasks are decoupled and divided according to function classification in the operation logic text, and the operation logic text comprises a code text which is pre-written according to a time sequence in the task execution process. The node splitting is carried out by identifying the function descriptions corresponding to different moments, namely different functions are positioned on two sides of one split node, the running file between two adjacent nodes corresponds to one component, and each component corresponds to one independent running file without mutual interference. And then sequencing the split running logic texts according to the original time, sequentially forming running orders of the connection of the components and the like, and obtaining a component configuration table corresponding to the specified task. For example, the operation flows of rule checking, amount calculation, batch document generation and the like in the process of handling the original insurance business are all coupled together and directly associated with the background database. By splitting different functional modules in the process of handling into independent functional components which are not directly associated with the background database according to the service function, for example, the split functional components include: parameter verification, data preparation, preposition rule verification, security project differentiation components, postposition rule verification, invoice redrush, public batch text addition, payment mode limitation, supervision submission and the like, so that decoupling of a task running program and a database and association decoupling between functional components are realized, each component is an independent file and does not influence each other, the capability of expanding the components at any time is realized, the newly added components do not influence the existing components, and the decoupling effect is achieved.
Further, the step S12, where the decoupling division is performed on the operation flows corresponding to all the tasks respectively according to the function classification in the operation logic text, to obtain the flow nodes included in each task, includes:
s121: according to
Figure BDA0002765954880000061
Respectively calculating process node association coefficients between two adjacent moments in an operation process, wherein x is a vector corresponding to a process node keyword corresponding to a previous moment in the two adjacent moments, y is a vector corresponding to a process node keyword corresponding to a subsequent moment in the two adjacent moments, r represents an association coefficient, n is the number of pairs of (x, y), x and y are positive numbers respectively, and n is a natural number greater than 1;
s122: judging whether a process node association coefficient between two adjacent moments in an operation process is smaller than a preset threshold value or not;
s123: and if so, dividing the flow node corresponding to the previous moment and the flow node corresponding to the later moment in the two adjacent moments into two operation assemblies.
In the association decoupling process between the functional components, the decoupled flow nodes are analyzed and determined through the flow node association coefficients between adjacent moments, when the flow node association coefficients between two adjacent moments are smaller than a preset threshold value, the flow nodes between the two adjacent moments are considered to have different functions, the original running logic text is blocked and split according to the determined flow nodes, and files between the two adjacent flow nodes playing a role in blocking and splitting are packaged into one functional component, namely, the functional component has the same function. The preset threshold value can be determined through experiments according to different service fields. After the task operation process is subjected to componentization splitting, decoupling is realized on different functions, the maintenance is easy, the speed of responding to the requirement is increased, the influence on the newly added component is controllable, and the task operation system is more flexible.
Further, step S6, which is to retrieve data respectively needed by the components during the operation from the designated storage area and execute the first task, includes:
s61: judging whether the operation scene corresponding to the first task at the current moment is a trial operation scene or not;
s62: if not, judging that the operation scene is accepted, and starting a data rollback component;
s63: and rolling back the running data of the first task to a database for data updating through the data rollback component.
In the embodiment of the application, the operation scene comprises a trial operation scene and a reception operation scene, and the two operation scenes are different in data processing process. The trial calculation operation scene is to show the result of the acceptance to the client in advance, and the trial calculation is completed without any influence on the database. And if an operation scene is accepted, the selection of the client needs to be converted into system data to be stored in the database, and the database is influenced, such as a new policy is generated. According to the embodiment of the application, the independent data rollback component is arranged, and whether the data rollback component is called for data rollback or not is determined by distinguishing different operation scenes, so that the data rollback component is called for data rollback in an accepted operation scene, and the database data is updated; the trial operation scene does not call the differentiated configuration of the data rollback component, and the service requirements of different operation scenes in the same service process are met. Compared with the existing operation mode, the method avoids the situation that the database data is restored through other ways after the database data is updated according to the accepted operation scene in order to meet the trial operation scene. According to the embodiment of the application, different components are separated from the task operation process, different business processes are configured according to different operation scenes through the configuration mode of the database configuration table, the full applicability of different operation scenes is realized, and the frequent calling of the database is avoided. The above configuration is as follows, and the functional elements and the execution sequence (SEQ _ NO) of the functional elements are determined according to three conditions of POS _ TYPE (security item), ATTEMP _ FLAG (trial mark), CHANNEL _ MODE (policy sales CHANNEL).
POS_TYPE ATTEMP_FLAG CHANNEL_MODE SEQ_NO COMPONENT_NAME
1 B007 Y 0 B007GenText
2 B007 Y 1 B007GetArticle
3 B007 N 0 B007GenText
4 B007 N 1 B007GetArticle
5 B007 N 2 B007SaveProcessDate
Further, after step S6 of retrieving data respectively needed by the operation of each of the components from the designated storage area, the method includes:
s601: judging whether an updating instruction of the first task is received, wherein the updating instruction carries updated component information;
s602: if yes, calling the data preparation component to acquire data respectively required by the updated components in operation from the database according to the updated component information, and taking the data as operation data corresponding to the updated first task;
s603: and caching the updated running data corresponding to the first task in the specified storage area of the application system.
According to the method and the device, through componentization and splitting in the operation process, the task operation program can be rapidly updated by adding new components, the operation files corresponding to the functional components are mutually independent, and the newly added functional components are serially connected in the component sequence of the existing task only through the operation logic codes, so that the task operation program can be updated. The updated component information includes, but is not limited to, names of functional components that need to be modified, added, or deleted, an operation order of the functional components, and the like. After each update, the data preparation component needs to be called again to obtain the data respectively needed by the updated components in the running process from the database, so as to ensure the correctness of the data use in the task execution process. In other embodiments of the present application, if it is identified that the updated component information is only to delete a certain functional component, the data preparation component is not called again to obtain data from the database, so as to further reduce the usage loss of the database.
Further, after step S6 of retrieving data respectively needed by the operation of each of the components from the designated storage area, the method includes:
s611: judging whether the first task is operated completely;
s612: if yes, acquiring a second flow corresponding to a second task to be operated in the task sequence and a component configuration table corresponding to the second flow;
s613: determining a calling order corresponding to each component in the second flow according to the second flow and a component configuration table corresponding to the second flow;
s614: sequentially calling data preparation components to acquire data respectively required by the components in the second flow when the components run from a database according to the calling sequence respectively corresponding to the components in the second flow;
s615: and covering the data which are respectively needed by the running of each component in the second flow and are respectively needed by the running of each component in the first flow, and caching the data in a designated storage area of an application system.
In the embodiment of the application, the execution process of each task is a service request, and the data sharing among different functional components can be realized only by calling the database once in the same service request when the task corresponding to the service request is executed. The data called by different service requests are stored in a mode of sequentially covering the cache, so that the data cache interval is recycled, and the data among different service requests are not interfered with each other.
Data in the task running process is stored in a block chain, and the block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
Referring to fig. 2, an apparatus for executing a task according to an embodiment of the present application includes:
a first obtaining module 1, configured to obtain a first flow corresponding to a first task and a component configuration table corresponding to the first flow;
a first determining module 2, configured to determine, according to the first flow and a component configuration table corresponding to the first flow, each component included in the first flow and a call order respectively corresponding to each component;
the first calling module 3 is configured to sequentially call the data preparation components to obtain data respectively needed by each component when the component runs from the database according to each component included in the first flow and a calling order respectively corresponding to each component;
the first cache module 4 is used for caching data respectively needed by the running of each component in a specified storage area of the application system;
the first judging module 5 is used for judging whether an operation instruction for operating the first task is received or not;
and the operation module 6 is configured to, if an operation instruction for operating the first task is received, retrieve data that is respectively required when each component operates from the specified storage area, and operate the first task.
Further, an apparatus for executing a task, comprising:
the second acquisition module is used for acquiring the running logic texts corresponding to all the tasks respectively;
the decoupling module is used for decoupling and dividing the operation flows respectively corresponding to all the tasks according to the function classification in the operation logic text to obtain the flow nodes respectively included by each task;
the first encapsulation module is used for encapsulating the operation process between two adjacent process nodes into a designated component, wherein the two adjacent process nodes are any two adjacent nodes in all the process nodes corresponding to a designated task, and the designated task is any one of all the tasks;
the naming module is used for naming the appointed component according to the function corresponding to the appointed component;
the second packaging module is used for packaging all the components in the specified task according to the packaging process of the specified components;
and the forming module is used for counting all the components in the specified task according to the running process corresponding to the specified task and forming a component configuration table corresponding to the specified task.
Further, a decoupling module comprising:
a computing unit for computing based on
Figure BDA0002765954880000111
Respectively calculating process node association coefficients between two adjacent moments in an operation process, wherein x is a vector corresponding to a process node keyword corresponding to a previous moment in the two adjacent moments, y is a vector corresponding to a process node keyword corresponding to a subsequent moment in the two adjacent moments, r represents an association coefficient, n is the number of pairs of (x, y), x and y are positive numbers respectively, and n is a natural number greater than 1;
the first judgment unit is used for judging whether the process node association coefficient between two adjacent moments in the operation process is smaller than a preset threshold value or not;
and the dividing unit is used for dividing the process node corresponding to the previous moment and the process node corresponding to the later moment in the two adjacent moments into two operation assemblies if the number of the process nodes is smaller than the preset threshold.
Further, the operation module 6 includes:
a second judging unit, configured to judge whether an operation scene corresponding to the first task at the current time is a trial operation scene;
the starting unit is used for judging that the operation scene is accepted if the operation scene is not a trial operation scene, and starting the data rollback component;
and the rollback unit is used for rolling back the running data of the first task to a database for data updating through the data rollback component.
Further, an apparatus for executing a task, comprising:
the second judging module is used for judging whether an updating instruction of the first task is received or not, wherein the updating instruction carries updated component information;
the second calling module is used for calling the data preparation component to acquire data respectively required by the updated components in running from the database according to the updated component information if an update instruction of the first task is received, and the data are used as running data corresponding to the updated first task;
and the second cache module is used for caching the updated running data corresponding to the first task in the specified storage area of the application system.
Further, an apparatus for executing a task, comprising:
the third judging module is used for judging whether the first task is operated completely;
the third obtaining module is used for obtaining a second process corresponding to a second task to be operated in the task sequence and a component configuration table corresponding to the second process if the operation is finished;
a second determining module, configured to determine, according to the second flow and the component configuration table corresponding to the second flow, a call order corresponding to each component included in the second flow;
the third calling module is used for sequentially calling the data preparation components to acquire data respectively needed by the components in the second flow when the components run from the database according to the calling sequence respectively corresponding to the components in the second flow;
and the third cache module is used for caching data respectively needed by the running of each component in the second flow in a specified storage area of the application system by covering the data respectively needed by the running of each component in the first flow.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store all data required for the process of running the task. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of executing a task.
The method for executing the running task by the processor comprises the following steps: acquiring a first flow corresponding to a first task and a component configuration table corresponding to the first flow; determining each component included in the first flow and a calling order respectively corresponding to each component according to the first flow and a component configuration table corresponding to the first flow; sequentially calling data preparation components to obtain data respectively needed by the components when the components run from a database according to the components included in the first flow and calling orders respectively corresponding to the components; caching data respectively needed by the operation of each component in a designated storage area of an application system; judging whether an operation instruction for operating the first task is received; if yes, data respectively needed by the operation of each component is called from the designated storage area, and the first task is operated.
According to the computer equipment, the components are split according to the functions of the task process, the independent data processing component is set, the data used by all the components in the current task are called from the database at one time and cached, the task process is supported by using the cached data in the task running process, the access frequency to the database is reduced, and the smoothness of the task processing process is improved.
In an embodiment, before the step of acquiring, by the processor, a first process corresponding to a first task and a component configuration table corresponding to the first process, the method includes: acquiring running logic texts corresponding to all tasks respectively; according to the function classification in the operation logic text, decoupling and dividing operation flows corresponding to all tasks respectively to obtain flow nodes included by each task respectively; encapsulating an operation process between two adjacent process nodes into a designated component, wherein the two adjacent process nodes are any two adjacent process nodes in all process nodes corresponding to a designated task, and the designated task is any one of all tasks; naming the designated component according to the function corresponding to the designated component; packaging all components in the specified task according to the packaging process of the specified components; and according to the running process corresponding to the specified task, counting all the components in the specified task to form a component configuration table corresponding to the specified task.
In an embodiment, the step of performing, by the processor, decoupling and dividing the operation flows corresponding to all the tasks respectively according to the function classifications in the operation logic text to obtain the flow nodes included in each task respectively includes: according to
Figure BDA0002765954880000131
Respectively calculating process node association coefficients between two adjacent moments in an operation process, wherein x is a vector corresponding to a process node keyword corresponding to a previous moment in the two adjacent moments, y is a vector corresponding to a process node keyword corresponding to a subsequent moment in the two adjacent moments, r represents an association coefficient, n is the number of pairs of (x, y), x and y are positive numbers respectively, and n is a natural number greater than 1; judging whether a process node association coefficient between two adjacent moments in an operation process is smaller than a preset threshold value or not; and if so, dividing the flow node corresponding to the previous moment and the flow node corresponding to the later moment in the two adjacent moments into two operation assemblies.
In one embodiment, the step of the processor retrieving, from the designated storage area, data respectively required by each of the components when running, and running the first task includes: judging whether the operation scene corresponding to the first task at the current moment is a trial operation scene or not; if not, judging that the operation scene is accepted, and starting a data rollback component; and rolling back the running data of the first task to a database for data updating through the data rollback component.
In one embodiment, the step of the processor retrieving, from the designated storage area, data respectively required by each of the components when running, and running the first task, includes: judging whether an updating instruction of the first task is received, wherein the updating instruction carries updated component information; if yes, calling the data preparation component to acquire data respectively required by the updated components in operation from the database according to the updated component information, and taking the data as operation data corresponding to the updated first task; and caching the updated running data corresponding to the first task in the specified storage area of the application system.
In one embodiment, the step of the processor retrieving, from the designated storage area, data respectively required by each of the components when running, and running the first task, includes: judging whether the first task is operated completely; if yes, acquiring a second flow corresponding to a second task to be operated in the task sequence and a component configuration table corresponding to the second flow; determining a calling order corresponding to each component in the second flow according to the second flow and a component configuration table corresponding to the second flow; sequentially calling data preparation components to acquire data respectively required by the components in the second flow when the components run from a database according to the calling sequence respectively corresponding to the components in the second flow; and covering the data which are respectively needed by the running of each component in the second flow and are respectively needed by the running of each component in the first flow, and caching the data in a designated storage area of an application system.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is only a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects may be applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing a method for executing a task, including: acquiring a first flow corresponding to a first task and a component configuration table corresponding to the first flow; determining each component included in the first flow and a calling order respectively corresponding to each component according to the first flow and a component configuration table corresponding to the first flow; sequentially calling data preparation components to obtain data respectively needed by the components when the components run from a database according to the components included in the first flow and calling orders respectively corresponding to the components; caching data respectively needed by the operation of each component in a designated storage area of an application system; judging whether an operation instruction for operating the first task is received; if yes, data respectively needed by the operation of each component is called from the designated storage area, and the first task is operated.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A method of running a task, comprising:
acquiring a first flow corresponding to a first task and a component configuration table corresponding to the first flow;
determining each component included in the first flow and a calling order respectively corresponding to each component according to the first flow and a component configuration table corresponding to the first flow;
sequentially calling data preparation components to obtain data respectively needed by the components when the components run from a database according to the components included in the first flow and calling orders respectively corresponding to the components;
caching data respectively needed by the operation of each component in a designated storage area of an application system;
judging whether an operation instruction for operating the first task is received;
if yes, data respectively needed by the operation of each component is called from the designated storage area, and the first task is operated.
2. The method according to claim 1, wherein the step of obtaining the first flow corresponding to the first task and the component configuration table corresponding to the first flow is preceded by the steps of:
acquiring running logic texts corresponding to all tasks respectively;
according to the function classification in the operation logic text, decoupling and dividing operation flows corresponding to all tasks respectively to obtain flow nodes included by each task respectively;
encapsulating an operation process between two adjacent process nodes into a designated component, wherein the two adjacent process nodes are any two adjacent process nodes in all process nodes corresponding to a designated task, and the designated task is any one of all tasks;
naming the designated component according to the function corresponding to the designated component;
packaging all components in the specified task according to the packaging process of the specified components;
and according to the running process corresponding to the specified task, counting all the components in the specified task to form a component configuration table corresponding to the specified task.
3. The method for running tasks according to claim 2, wherein the step of performing decoupled division on the running flows respectively corresponding to all the tasks according to the function classification in the running logic text to obtain the flow nodes respectively included in each task comprises:
according to
Figure FDA0002765954870000021
Respectively calculating process node association coefficients between two adjacent moments in an operation process, wherein x is a vector corresponding to a process node keyword corresponding to a previous moment in the two adjacent moments, y is a vector corresponding to a process node keyword corresponding to a subsequent moment in the two adjacent moments, r represents an association coefficient, n is the number of pairs of (x, y), x and y are positive numbers respectively, and n is a natural number greater than 1;
judging whether a process node association coefficient between two adjacent moments in an operation process is smaller than a preset threshold value or not;
and if so, dividing the flow node corresponding to the previous moment and the flow node corresponding to the later moment in the two adjacent moments into two operation assemblies.
4. The method for executing tasks according to claim 1, wherein the step of retrieving data respectively needed by each component when running from the specified storage area and executing the first task comprises:
judging whether the operation scene corresponding to the first task at the current moment is a trial operation scene or not;
if not, judging that the operation scene is accepted, and starting a data rollback component;
and rolling back the running data of the first task to a database for data updating through the data rollback component.
5. The method for executing tasks according to claim 1, wherein the step of retrieving data respectively needed by each component when the component runs from the specified storage area comprises the following steps:
judging whether an updating instruction of the first task is received, wherein the updating instruction carries updated component information;
if yes, calling the data preparation component to acquire data respectively required by the updated components in operation from the database according to the updated component information, and taking the data as operation data corresponding to the updated first task;
and caching the updated running data corresponding to the first task in the specified storage area of the application system.
6. The method for executing tasks according to claim 1, wherein the step of retrieving data respectively needed by each component when the component runs from the specified storage area comprises the following steps:
judging whether the first task is operated completely;
if yes, acquiring a second flow corresponding to a second task to be operated in the task sequence and a component configuration table corresponding to the second flow;
determining a calling order corresponding to each component in the second flow according to the second flow and a component configuration table corresponding to the second flow;
sequentially calling data preparation components to acquire data respectively required by the components in the second flow when the components run from a database according to the calling sequence respectively corresponding to the components in the second flow;
and covering the data which are respectively needed by the running of each component in the second flow and are respectively needed by the running of each component in the first flow, and caching the data in a designated storage area of an application system.
7. An apparatus for executing a task, comprising:
the system comprises a first acquisition module, a second acquisition module and a component configuration table, wherein the first acquisition module is used for acquiring a first flow corresponding to a first task and the component configuration table corresponding to the first flow;
a first determining module, configured to determine, according to the first flow and a component configuration table corresponding to the first flow, each component included in the first flow and a call order respectively corresponding to each component;
the first calling module is used for sequentially calling the data preparation components to acquire data respectively needed by the running of each component from a database according to each component in the first flow and the calling sequence respectively corresponding to each component;
the first cache module is used for caching data respectively needed by the running of each component in a specified storage area of an application system;
the first judgment module is used for judging whether an operation instruction for operating the first task is received or not;
and the operation module is used for calling data respectively required by the operation of each component from the specified storage area and operating the first task if an operation instruction for operating the first task is received.
8. The task execution apparatus of claim 7, comprising:
the second acquisition module is used for acquiring the running logic texts corresponding to all the tasks respectively;
the decoupling module is used for decoupling and dividing the operation flows respectively corresponding to all the tasks according to the function classification in the operation logic text to obtain the flow nodes respectively included by each task;
the first encapsulation module is used for encapsulating the operation process between two adjacent process nodes into a designated component, wherein the two adjacent process nodes are any two adjacent nodes in all the process nodes corresponding to a designated task, and the designated task is any one of all the tasks;
the naming module is used for naming the appointed component according to the function corresponding to the appointed component;
the second packaging module is used for packaging all the components in the specified task according to the packaging process of the specified components;
and the forming module is used for counting all the components in the specified task according to the running process corresponding to the specified task and forming a component configuration table corresponding to the specified task.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202011233414.0A 2020-11-06 2020-11-06 Method, device, equipment and storage medium for running task Pending CN112347256A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011233414.0A CN112347256A (en) 2020-11-06 2020-11-06 Method, device, equipment and storage medium for running task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011233414.0A CN112347256A (en) 2020-11-06 2020-11-06 Method, device, equipment and storage medium for running task

Publications (1)

Publication Number Publication Date
CN112347256A true CN112347256A (en) 2021-02-09

Family

ID=74428570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011233414.0A Pending CN112347256A (en) 2020-11-06 2020-11-06 Method, device, equipment and storage medium for running task

Country Status (1)

Country Link
CN (1) CN112347256A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170286156A1 (en) * 2016-03-30 2017-10-05 Amazon Technologies, Inc. Generating data streams from pre-existing data sets
CN109447411A (en) * 2018-09-26 2019-03-08 平安普惠企业管理有限公司 Business Process Control method, apparatus, computer equipment and storage medium
CN109492017A (en) * 2018-09-18 2019-03-19 平安科技(深圳)有限公司 Business information inquiry processing method, system, computer equipment and storage medium
CN111581155A (en) * 2020-03-30 2020-08-25 平安科技(深圳)有限公司 Method and device for inputting data into database and computer equipment
CN111651285A (en) * 2020-05-27 2020-09-11 平安养老保险股份有限公司 Batch business data processing method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170286156A1 (en) * 2016-03-30 2017-10-05 Amazon Technologies, Inc. Generating data streams from pre-existing data sets
CN109492017A (en) * 2018-09-18 2019-03-19 平安科技(深圳)有限公司 Business information inquiry processing method, system, computer equipment and storage medium
CN109447411A (en) * 2018-09-26 2019-03-08 平安普惠企业管理有限公司 Business Process Control method, apparatus, computer equipment and storage medium
CN111581155A (en) * 2020-03-30 2020-08-25 平安科技(深圳)有限公司 Method and device for inputting data into database and computer equipment
CN111651285A (en) * 2020-05-27 2020-09-11 平安养老保险股份有限公司 Batch business data processing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
AU2018374912B2 (en) Model training system and method, and storage medium
CN112632575A (en) Authority management method and device of business system, computer equipment and storage medium
CN110912712B (en) Service operation risk authentication method and system based on block chain
CN111897673A (en) Operation and maintenance fault root cause identification method and device, computer equipment and storage medium
CN110633963A (en) Electronic bill processing method, electronic bill processing device, computer-readable storage medium and equipment
CN113326081A (en) Static resource processing method and device, computer equipment and storage medium
US11196564B2 (en) Hierarchical distributed ledger
CN112567716B (en) Secure data transmission system and method
CN112380286B (en) Method, device, equipment and medium for generating data object relation map of database
CN110851127B (en) Universal evidence-storing method based on blockchain
CN112364059B (en) Correlation matching method, device, equipment and storage medium under multi-rule scene
CN112464117A (en) Request processing method and device, computer equipment and storage medium
CN112163131A (en) Configuration method and device of business data query platform, computer equipment and medium
CN110378796A (en) Vehicle unique identification generation method, device, computer equipment and medium
CN114218315A (en) Interface generation method and device, computer equipment and storage medium
CN113269639A (en) Business processing method, device, equipment and medium based on block chain intelligent contract
CN112434335A (en) Business problem processing method and device, computer equipment and storage medium
CN113127450A (en) Data maintenance method and device, computer equipment and storage medium
CN115952220A (en) Bill processing method and device based on block chain, electronic equipment and medium
CN112131471A (en) Method, device, equipment and medium for relation recommendation based on unauthorized undirected graph
CN112328285A (en) Method, device, equipment and medium for producing and updating new functions of system
CN110598475A (en) Block chain-based work attribute information acquisition method and device and computer equipment
CN113660229A (en) Multi-system single sign-on method, device, equipment and medium based on RPA
US11362806B2 (en) System and methods for recording codes in a distributed environment
CN112347256A (en) Method, device, equipment and storage medium for running task

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