CN111914010A - Service processing method, device, equipment and storage medium - Google Patents

Service processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111914010A
CN111914010A CN202010771528.4A CN202010771528A CN111914010A CN 111914010 A CN111914010 A CN 111914010A CN 202010771528 A CN202010771528 A CN 202010771528A CN 111914010 A CN111914010 A CN 111914010A
Authority
CN
China
Prior art keywords
execution
service
business
business process
level
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
CN202010771528.4A
Other languages
Chinese (zh)
Other versions
CN111914010B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010771528.4A priority Critical patent/CN111914010B/en
Publication of CN111914010A publication Critical patent/CN111914010A/en
Application granted granted Critical
Publication of CN111914010B publication Critical patent/CN111914010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
    • 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

Abstract

The application discloses a method, a device, equipment and a storage medium for service processing, and relates to the fields of big data, information flow and the like. The specific implementation scheme is as follows: determining a first execution sequence of each service process contained in the target service and a dependency relationship among the service processes; the first execution sequence comprises executing each service process in series; adjusting the first execution sequence according to the dependency relationship to obtain a second execution sequence; the second execution sequence comprises executing the business processes in series and in parallel; and executing the business processes according to the second execution sequence. By the scheme, the dependency relationship among all the business processes in the target business is determined, the execution efficiency is improved by changing the execution sequence of all the business processes, and the method can be used for a cloud computing server.

Description

Service processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of data processing, and in particular to the field of big data, information flow, and the like.
Background
With the continuous development and application of internet technology, massive data and various data computing engines are generated. A data computation engine is a component used to do computations on data. In order to Extract valuable data from mass data, a large amount of data ETL (Extract-Transform-Load) services need to be developed, and these ETL services are run online according to a certain period. The ETL is used to describe the process of extracting (extract), converting (transform), and loading (load) data from a data source to a destination data source.
Currently, the mainstream ETL service is developed based on SQL, the internal logic of the ETL service is complex and the amount of related data is very large, and one execution may take several hours or even several days, resulting in low service processing efficiency.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for service processing.
According to an aspect of the present application, there is provided a method for service processing, including the following steps:
determining a first execution sequence of each service process contained in the target service and a dependency relationship among the service processes; the first execution sequence comprises executing each service process in series;
adjusting the first execution sequence according to the dependency relationship to obtain a second execution sequence; the second execution sequence comprises executing the business processes in series and in parallel;
and executing the business processes according to the second execution sequence.
According to another aspect of the present application, there is provided an apparatus for service processing, including:
the business process attribute analysis module is used for determining a first execution sequence of each business process contained in the target business and a dependency relationship among the business processes; the first execution sequence comprises executing each service process in series;
the execution sequence adjusting module is used for adjusting the first execution sequence according to the dependency relationship to obtain a second execution sequence; the second execution sequence comprises executing the business processes in series and in parallel;
and the business process execution module is used for executing each business process according to the second execution sequence.
According to a third aspect of the present application, an embodiment of the present application provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform a method provided by any one of the embodiments of the present application.
According to a fourth aspect of the present application, embodiments of the present application provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method provided by any one of the embodiments of the present application.
According to the technology of the application, the problem of low execution efficiency of the business process is solved, the dependency relationship among all the business processes in the target business is determined, and the execution efficiency is improved by changing the execution sequence of all the business processes.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a flow diagram of a method of business processing according to an embodiment of the application;
FIG. 2 is a schematic diagram of a business process according to an embodiment of the application;
FIG. 3 is a flow chart of obtaining a second execution order according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a business process execution matrix according to an embodiment of the present application;
FIG. 5 is a flow chart of obtaining a second execution order according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a business process execution matrix according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a business process execution matrix according to an embodiment of the present application;
FIG. 8 is a flow diagram of a process for performing a business in accordance with an embodiment of the present application;
FIG. 9 is a schematic diagram of an apparatus for traffic processing according to an embodiment of the application;
FIG. 10 is a business processing system architecture diagram according to an embodiment of the application;
FIG. 11 is a flow diagram of business processing according to a business processing system architecture according to an embodiment of the present application;
fig. 12 is a block diagram of an electronic device for implementing a method of business processing according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, in an embodiment of the present application, a method for service processing is provided, which may include the following steps:
s101: determining a first execution sequence of each service process contained in the target service and a dependency relationship among the service processes; the first execution sequence comprises executing each service process in series;
s102: adjusting the first execution sequence according to the dependency relationship to obtain a second execution sequence; the second execution sequence comprises executing the business processes in series and in parallel;
s103: and executing the business processes according to the second execution sequence.
In one example, the target business can be static code consisting of one or more business processes with explicitly performing tasks. For example, the target business may be an xml (extensible markup language) file, and the business process may be an Extract-Transform-Load (ETL) process.
In the case that there is a dependency relationship between business processes, the business processes with dependency relationship may be referred to as business processes with blood-related relationships.
As shown in fig. 2, for example, the target service is a service that acquires information on a winning team. According to the analysis of the target service, the target service can be determined to include four service processes, which are respectively: a first business process (corresponding to jobId:1 in FIG. 2) for obtaining the information of the participating team; a second process (corresponding to jobId:2 in FIG. 2) of obtaining match information; a third business process (corresponding to jobId:3 in FIG. 2), matching the information of the participating team with the competition information; the fourth business process (corresponding jobId:4 in FIG. 2), determines the winner's information.
The execution sequence of the four business processes is serial execution and can be marked by the execution sequence of jobId:1 to jobId:4 respectively. The above execution order may be referred to as a first execution order.
Further, the dependency relationship analysis is performed on the business process, so that it can be determined that: the third business process needs to depend on the data processing results of the first business process and the second process, and the fourth business process needs to depend on the data processing results of the third business process. Based on this, a data dependency tree can be constructed. The data dependency tree can be constructed according to the blood margin of column-level data and can also be constructed according to the blood margin of table-level data.
For example, it may be determined from the data dependency tree that the third business process may be referred to as a parent node of the first business process and the second business process, and the fourth business process may be referred to as a parent node of the third business process.
After determining the dependency relationship from the data dependency tree, the first execution order may be adjusted based on the dependency relationship. For example, a first business process and a second business process may be adapted to execute in parallel, followed by a third business process and a fourth business process executing in series. The adjusted execution order may be the second execution order.
And executing the four business processes according to a second execution sequence.
Through the adjustment, each service process executed in the default serial mode can be adjusted by utilizing the dependency relationship, and a second service process is obtained. The second business process includes serial execution and parallel execution.
Each business process may be parsed by the data computation engine into a plurality of jobs, which are executed serially. The data computation engine may be Spark, Hadoop MR, Flink, Storm, etc.
Each job is split into multiple jobs (jobs) when executed. The actual execution process of each job in the executor (executor) is called a task, and a plurality of tasks can be executed in parallel or executed in series. The executor performs various tasks by means of its logical core (core).
The data computation engine may send the task to an executor where there are free logical cores. Because the total time slice of the logic core consumed by executing each business process is fixed, the utilization rate of the logic core can be improved by reducing the idle rate of the logic core in the executor in the process of the interspersed operation of the tasks corresponding to each parallel business process, so that the total operation time consumption can be reduced.
That is, according to the above-mentioned scheme, the total time consumption for executing each service process by using the second execution sequence is greatly reduced compared with the total time consumption of the first execution sequence, thereby improving the operation performance of the service. In the conventional method, one target service is generally split into a plurality of target sub-services, but in the conventional method, the dependency relationship of the target sub-services and the running sequence of each target sub-service need to be manually combed. Once the business logic is revised, the business logic needs to be combed again, and the operation and maintenance are difficult. The embodiment of the application determines the dependency relationship among the business processes in the target business, and improves the execution efficiency by changing the execution sequence of the business processes.
As shown in fig. 3, in an embodiment, step S102 may include:
s1021: determining a dependency hierarchy among the business processes according to the dependency relationship;
s1022: establishing a business process execution matrix, wherein an execution level in the business process execution matrix corresponds to a dependency level;
s1023: according to the dependency hierarchy and the first execution sequence, placing the business process in an execution hierarchy corresponding to the dependency hierarchy to which the business process belongs;
s1024: the second execution order is determined according to the execution hierarchy.
As shown in fig. 2, the first service process is to obtain the information of the participating team from the external data storage component instead of the information generated in the target service, so the external data storage component can be used as a leaf node. For example, the nodes of jobId:0 in FIG. 2 are all leaf nodes.
The first business process may be a parent node of a leaf node and the first business process may be a first dependency level.
The second business process is also match information obtained from the external data storage component, so the external data storage component can act as a leaf node. The second process may act as a parent of the leaf node. Similarly, the second business process may act as a first dependency level.
The third business process is used as a father node of the nodes corresponding to the first business process and the second business process. The third business process may act as a second dependency level.
The fourth business process is used as a father node of the node corresponding to the third business process. The fourth business process may act as a third dependency level.
As shown in fig. 2 and 4, a business process execution matrix is established, and the execution levels in the business process execution matrix correspond to the dependency levels.
And placing the business process in the execution level corresponding to the dependency level to which the business process belongs according to the dependency level and the first execution sequence. That is, the first service process and the second service process are sequentially placed at the first execution level (depth: 1 in fig. 4) of the service process execution matrix, the third service process is placed at the second execution level (depth: 2 in fig. 4) of the service process execution matrix, and the fourth service process is placed at the third execution level (depth: 3 in fig. 4) of the service process execution matrix.
The first business process and the second business process may be ordered in the first execution level according to the first execution order. In addition, when duplication occurs, the business process also needs to be subjected to deduplication processing. For example, the target service includes five service processes of the first to fifth. Based on the dependency hierarchy, it may be determined that the third business process is a parent node of the first and second business processes and the fifth business process is a parent node of the second and fourth business processes. Then, when the business process execution matrix is established, the first execution hierarchy includes the first business process, the second business process, and the second business process and the fourth business process. Since the second business process occurs twice, it needs to be deduplicated. After the deduplication process, the first execution level includes first, second, and fourth business processes. The second tier of execution hierarchy includes third and fifth business processes.
In the case that all the business processes are already at the execution level, the second execution order may be determined according to the execution level, for example, the execution levels execute serially, and the business processes in the execution levels execute in parallel. The number of the business processes executed in parallel can be determined according to the number of the threads. For example, the thread number may be determined according to the total number of the executor logic cores held during the execution of the target service, and the thread number and the total number of the executor logic cores have a positive correlation.
Through the scheme, the second execution sequence can be determined by utilizing the execution levels in the business process execution matrix, so that each business process is executed based on the second execution sequence, and the execution efficiency can be improved.
As shown in fig. 5, in an embodiment, in the case that the target service includes a service process of a predetermined type, step S102 may further include:
s1025: acquiring an execution sequence number m of a service process of a predetermined type in a first execution sequence and a sequence number of an execution level corresponding to each service process of which the execution sequence number is less than m;
s1026: determining a maximum value n in sequence numbers of each execution level;
s1027: moving a predetermined type of business process from a current execution level to an n +1 th execution level;
s1028: acquiring the arrangement condition of the execution levels of each business process with the execution sequence number larger than m;
s1029: according to the arrangement condition of the execution levels, moving each service process with the execution sequence number larger than m to an execution level behind the n +1 execution level of the service process execution matrix according to the original execution level structure;
the execution sequence number m and the maximum value n are positive integers.
The business process of the predetermined type may be a business process including a plurality of sub-business processes, a business process for changing an execution order of subsequent business processes, or the like.
A predetermined type of service is taken as an example of a service process for changing the execution order of subsequent service processes. Referring to fig. 6, according to the dependency levels determined in steps S1021 to S1024, 16 business processes included in the target business can be respectively placed in four execution levels in the business process execution matrix.
And acquiring an execution sequence number m of the service process of the preset type in the first execution sequence and a sequence number of an execution level corresponding to each service process with the execution sequence number smaller than m. For example, the dashed box consisting of a line segment and a dot shown in fig. 6 may represent a predetermined type of business process, which has a sequence number m in the first execution order.
The solid line box may represent a business process with a sequence number less than m in the first execution order, denoted collectively as m-.
The dashed box consisting of dots may represent a business process with a sequence number greater than m in the first execution sequence, denoted as m + collectively.
In FIG. 6, the sequence numbers of the execution levels corresponding to the business processes with execution sequence numbers smaller than m are depth:1 to depth:3, respectively. Therefore, it can be determined that the maximum value n of the sequence numbers of the execution hierarchies corresponding to the business processes with the execution sequence numbers smaller than m is 3.
As shown in connection with fig. 7, the business process of the predetermined type is moved from the current execution level to the (n + 1) th execution level of the business process execution matrix. I.e. the business process with sequence number m in the first execution order is moved from the first execution level depth:1 to the fourth execution level depth: 4.
Next, the business processes with the first execution sequence number greater than m are moved to the execution level after the n +1 th execution level in their respective hierarchical arrangement in fig. 6.
Namely, each service process with the execution sequence number larger than m in the first execution level depth:1 in fig. 6 is moved to the n +2 th execution level, namely, the fifth execution level depth:5, while keeping the original sequence;
moving each service process with the execution sequence number larger than m in the second execution level depth:2 in the figure 6 to the n +3 execution level keeping the original sequence, namely, the sixth execution level depth: 6;
moving each service process with the execution sequence number larger than m in the third execution level depth:3 in the figure 6 to the (n + 4) th execution level keeping the original sequence, namely, the seventh execution level depth: 7;
and (4) moving each service process with the execution sequence number larger than m in the fourth execution level depth:4 in the graph 6 to the (n + 5) th execution level, namely the eighth execution level depth:8, keeping the original sequence.
The adjusted business process execution matrix shown in fig. 7 can be obtained by adjusting the business process execution matrix in fig. 6.
The above scheme may equivalently record the arrangement of the execution levels of the business processes with the execution sequence number greater than m. And moving the whole business process execution matrix to an execution level after the n +1 execution level of the business process execution matrix according to the arrangement condition of the business process execution matrix.
Through the scheme, each service process can be guaranteed to be executed correctly. This is because, after the business process execution matrix is established according to the dependency hierarchy, in the presence of a predetermined type of business process, erroneous execution of the target business may be caused. For example, the predetermined type of business process is operative to determine whether the current date is a weekend. Under the condition that the current date is weekend, ending the execution of the target service, namely not executing each service process of m +; otherwise, under the condition that the current date is not weekend, each business process of m + is continuously executed until each business process of m + is executed. If the m-business process in the second execution level is not executed after the execution of the first execution level according to the business process execution matrix in fig. 6, and the m + business processes in the first execution level are already executed, it is obvious that the execution manner is wrong.
The business process execution matrix in fig. 6 is adjusted by the above method to obtain the adjusted business process execution matrix in fig. 7, so that each business process can be executed correctly. The method can ensure that each service process of m-is executed first, judges through the service process with the preset type with the sequence number of m, and continues to execute each subsequent service process of m + only under the condition that the judgment result is that the subsequent service process needs to be executed continuously.
As shown in fig. 8, in one embodiment, step S103 may include:
s1031: executing each execution level of the business process execution matrix in series;
s1032: and executing the business processes in each execution hierarchy in parallel.
For each execution level of the business process execution matrix, each execution level of the business process execution matrix may be executed in series. That is, when all the business processes in the first execution hierarchy are completely executed, the business processes in the second execution hierarchy are executed. Similarly, when all the business processes in the second execution level are completely executed, all the business processes in the third execution level are executed. And repeating the steps until all execution levels of the business process execution matrix are completely executed.
Business processes in various execution levels can be executed in parallel. Further, the number of parallel execution of each business process may be determined according to the number of threads.
By the scheme, the execution of each business process can be accelerated by adopting parallel execution and serial execution parallel modes.
In one embodiment, the method for processing the service may further include the following steps:
and according to the first execution sequence, printing the log information of each business process.
Log (log) information may facilitate a user in querying an execution status or execution status, etc. of each business process. For printing of the log information, the first execution order may be followed. That is, the log information of each business process is sequentially printed according to the sequence number of the first execution order.
For example, the target service includes three service processes with a first execution order of 1, 2, and 3. Wherein the business processes with sequence numbers 1 and 3 are at a first execution level and the business process with sequence number 2 is at a second execution level.
In the case that the service process with sequence number 3 is completed before the service process with sequence number 1, the log information of the service process with sequence number 3 may be cached first. And printing the log information of the business process with the sequence number 3 until the business process with the sequence number 2 in the second execution level is executed.
Through the scheme, although the business processes are executed according to the second execution sequence, the log information of the business processes can be printed according to the first execution sequence. The user can conveniently check the information.
As shown in fig. 9, an apparatus for processing a service according to an embodiment of the present application may include the following components:
a service process attribute analysis module 901, configured to determine a first execution order of each service process included in the target service and a dependency relationship between each service process; the first execution sequence comprises executing each service process in series;
an execution sequence adjusting module 902, configured to adjust the first execution sequence according to the dependency relationship to obtain a second execution sequence; the second execution sequence comprises executing the business processes in series and in parallel;
and the service process execution module 903 is configured to execute each service process according to the second execution sequence.
In one embodiment, the execution order adjustment module 902 may include:
the dependency hierarchy analysis submodule 9021 is used for determining a dependency hierarchy among the business processes according to the dependency relationship;
a business process execution matrix establishing submodule 9022, configured to establish a business process execution matrix, where an execution level in the business process execution matrix corresponds to a dependency level;
the business process placement sub-module 9023 is configured to place the business process in an execution level corresponding to the dependency level to which the business process belongs according to the dependency level and the first execution order;
a second execution order determination sub-module 9024 is configured to determine a second execution order according to the execution hierarchy.
In an embodiment, in the case that the target service includes a service process of a predetermined type, the executing the order adjusting module 902 may further include:
the service process information obtaining sub-module 9025 is configured to obtain an execution sequence number m of a service process of a predetermined type in the first execution sequence, and a sequence number of an execution level corresponding to each service process of which the execution sequence number is smaller than m;
a sequence number maximum value determining submodule 9026 configured to determine a maximum value n among sequence numbers of each execution hierarchy;
a first moving submodule 9027, configured to move a predetermined type of business process from a current execution level to an n +1 th execution level;
the execution level arrangement condition obtaining sub-module 9028 is configured to obtain an arrangement condition of an execution level of each service process with an execution sequence number greater than m;
a second moving submodule 9029, configured to move, according to the arrangement of the execution levels, each service process with an execution sequence number greater than m to an execution level after the n +1 th execution level of the service process execution matrix according to the original execution level structure;
the execution sequence number m and the maximum value n are positive integers.
In one embodiment, the business process execution module 903 may include:
a first execution submodule 9031, configured to execute each execution level of the business process execution matrix in series;
and the second execution submodule 9032 is configured to execute the business processes in each execution hierarchy in parallel.
In one embodiment, the apparatus for processing service further includes:
and the log information printing sub-module is used for printing the log information of each service process according to the first execution sequence.
Fig. 10 is a diagram of a business processing system architecture according to an embodiment of the present application, and the present embodiment provides a preferred example based on the foregoing embodiment. As shown in fig. 10, a computing device carrying business processing functions may include an interaction layer, an engine layer, and a data source. Various ways in which a user may interact with a computing device are provided in the interaction layer, which may include, but are not limited to, WebSocket, http/HTTPS, TCP, and CLI ways, for example. The data source comprises various data storage components which can be accessed through SQL, such as MySQL, Hive, elastic search and the like, and also comprises a component which supports SQL access natively, a component which supports SQL access indirectly through a third-party component and the like.
The engine layer comprises a service container, and further the service container comprises a service configuration file, a resource configuration file and an executor; actuators may include, but are not limited to: the system comprises a service operation module, a data blood margin module, a view module, a log module, a monitoring module and other functional modules.
In this embodiment, the user may submit the target service processing request to the computing device (further to the service container) through an interaction mode provided in the interaction layer, such as a Command-Line Interface (CLI) mode.
The service container obtains a target service processing request submitted by a user, and verifies the validity of information included in the target service processing request, such as identifying whether a target service exists according to a target service identifier. And when the validity verification of the information included in the target service abnormal positioning request is passed, the executor executes target service configuration information verification, such as whether a database of the target service exists or not and whether connection can be performed or not. And under the condition that the target service configuration information passes the verification, loading a service configuration file, a resource configuration file and the like is executed, a data consanguinity module is started to analyze the logic code of the target service, and the consanguinity relation of the target service is determined.
And the view module determines a data dependency tree and a business process execution matrix according to the blood relationship.
And the service operation module executes the service process according to the execution level in the service process execution matrix.
The log module is used for printing the execution condition of each business process.
As shown in fig. 11, the method for implementing service processing by the above system may include the following steps:
(1) and the service container carries out parameter verification. And when the parameter verification is passed, the configuration verification is carried out by the executor.
And the service container receives a data processing service operation instruction of a user. And carrying out parameter verification on the received data processing service operation instruction so as to determine the performability of the instruction. The data processing service operation instruction may include user information and/or a service profile.
The parameter check may include checking the user right, or checking the integrity of the configuration information in the service configuration file, and the like.
In the case where the service profile is not included in the data processing service execution instruction, there may be a case where the profile has been previously stored in the service container. The configuration check may check whether the service profile is already stored in the service container, or check whether the resource profile includes a source database or a destination database declared in the service profile.
(2) The executor loads a configuration file.
And under the condition of passing the checking, the executor loads the ETL service configuration file and the resource configuration file.
The loading of the ETL service configuration file by the executor may include: and acquiring an ETL service configuration file corresponding to the data processing service operation instruction in the service container, and reading the ETL service configuration file.
And the executor loads the resource configuration file.
(3) And the service operation module performs preparation work.
(4) The data lineage module parses the SQL level data lineage of all ETL processes within the business.
Because the data sources supported by the embodiments of the present application must be components that can directly or indirectly support access via SQL. Thus, all business logic is expressed in SQL. A logic execution plan corresponding to the ETL service can be parsed by an SQL parser built in the Spark data computing engine, where the logic execution plan includes, for example: fields, input table names, output table names, filter conditions, etc.
(5) And (4) serially connecting SQL level data blood margins to form business internal surface level blood margins.
Through proper data organization, the dependency relationship of SQL level fields and tables can be obtained. That is, the data of the corresponding field or table depends on which tables and fields are generated, i.e., SQL level column level data lineage, table level data lineage. An ETL business is formed by connecting a plurality of SQL in series, and the data blood relationship of each SQL is connected in series, so that the business-level column-level data blood relationship, the table-level data blood relationship and the like of the ETL business can be obtained. The data blood relationship can form a table-level dependency tree, namely, a business inner table-level blood relationship.
(6) And (4) according to the intra-business table blood margin, arranging all ETL processes in the business into an execution matrix.
And analyzing a plurality of ETL processes in one ETL service by utilizing a scheduling algorithm of the ETL processes, and converting each ETL process into an execution matrix according to the table-level data blood relationship.
The data of the leaf nodes of the table-level dependency tree are all stored in the data storage component and are not the data inserted by the current service. For a leaf node, the value of its execution level (depth) is artificially marked as 0 (not as part of the execution matrix).
Setting the execution level value of the parent node of each leaf node to 1; setting an execution level value of 2 for a parent node of a node having an execution level value of 1; setting an execution level value of 3 for a parent node of a node having an execution level value of 2; by analogy, the execution level value of the parent node of each level node is 1 greater than the execution level value of its child node.
And carrying out deduplication on the ETL processes corresponding to the nodes with the same execution level numerical value according to a first execution sequence to form an ETL process execution matrix. The ETL processes within each execution level are ordered sequentially according to a first execution order.
For a special ETL process (e.g., an ETL process including multiple ETL sub-processes therein, an ETL process capable of changing the execution effect of a subsequent ETL process), performing matrix splitting is required. Assume that the first execution order of a particular ETL process is m. m-represents an ETL process with a first execution sequence smaller than m, m + represents an ETL process with a first execution sequence larger than m, and the matrix splitting process is as follows:
and dividing the ETL process in the execution matrix into three parts with the first execution sequence of less than m, m and more than m according to m. The ETL process portions for m and greater than m are removed from the ETL process execution matrix. A special ETL procedure (m) is inserted at the end of the execution matrix. And completely inserting the matrix of the ETL process larger than m to the end of the execution matrix to form a new execution matrix.
(7) According to an execution matrix.
The execution levels of the execution matrix are run serially in turn.
And submitting the ETL processes in the current execution level to Spark one by one through the thread pool. Spark performs the ETL processes on commit in parallel. During execution, log printing requirements of each ETL process are continuously submitted.
(8) The log module judges whether the log of the last ETL process is printed or not, sequentially prints the cache log of the current ETL process under the condition of printing, and continuously prints the log of the subsequent ETL process. In the case where the log of the last ETL process was not printed, the log of the current ETL process is cached in order. The ordered cache may be in a first execution order.
(9) And the service operation module judges whether the ETL processes of the current execution level are executed completely or not, and continues to execute under the condition that the ETL processes are not executed completely.
(10) And under the condition of complete execution, the log module marks the log cache of the ETL process which is completely executed to be complete.
And the log module judges whether the log of the last ETL process is printed or not, and prints and marks the log of the current ETL process according to the log sequence under the condition of printing. In the case that the log of the last ETL process is not printed, it is necessary to continue waiting for the operation result of the service operation module.
In the event that the log cache of the next ETL process is complete, the log of the next ETL process is printed and the print is marked as complete.
(11) And the service operation module judges whether the ETL service is completely executed or not under the condition that all the ETL processes in the current execution level are completely executed, namely judges whether all the ETL processes in the execution level are completely executed or not, and executes the next level under the condition that the ETL processes are not completely executed. And ending the execution process of the ETL service under the condition of finishing the execution.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 12 is a block diagram of an electronic device according to a method of service processing in an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 12, the electronic apparatus includes: one or more processors 1210, a memory 1220, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 12, one processor 1210 is taken as an example.
The memory 1220 is a non-transitory computer readable storage medium provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the method of business processing provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of business processing provided herein.
The memory 1220 is a non-transitory computer readable storage medium, and can be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the business process method in the embodiment of the present application (for example, the business process attribute analysis module 901, the execution sequence adjustment module 902, and the business process execution module 903 shown in fig. 9). The processor 1210 executes various functional applications of the server and data processing, i.e., a method of implementing business processing in the above-described method embodiments, by executing non-transitory software programs, instructions, and modules stored in the memory 1220.
The memory 1220 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device of the method of the business process, and the like. Further, the memory 1220 may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 1220 optionally includes memory located remotely from the processor 1210, and these remote memories may be connected to the electronics of the business process method via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the service processing method may further include: an input device 1230 and an output device 1240. The processor 1210, memory 1220, input device 1230, and output device 1240 may be connected by a bus or other means, such as by a bus connection in fig. 12.
The input device 1230 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the method of business process, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, and the like. The output device 1240 may include a display device, an auxiliary lighting device (e.g., an LED), a haptic feedback device (e.g., a vibration motor), and the like. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, and the present invention is not limited herein.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A method of service processing, comprising:
determining a first execution sequence of each service process contained in a target service and a dependency relationship among the service processes; the first execution sequence comprises executing each service process in series;
adjusting the first execution sequence according to the dependency relationship to obtain a second execution sequence; the second execution sequence comprises executing each business process in series and in parallel;
and executing the business processes according to the second execution sequence.
2. The method of claim 1, wherein the adjusting the first execution order according to the dependency to obtain a second execution order comprises:
determining a dependency hierarchy among the business processes according to the dependency relationship;
establishing a business process execution matrix, wherein execution levels in the business process execution matrix correspond to the dependency levels;
according to the dependency hierarchy and the first execution sequence, placing the business process in an execution hierarchy corresponding to the dependency hierarchy to which the business process belongs;
determining the second execution order according to the execution hierarchy.
3. The method according to claim 2, wherein when the target service includes a predetermined type of service process, the adjusting the first execution order according to the dependency relationship to obtain a second execution order, further includes:
acquiring an execution sequence number m of the service process of the predetermined type in a first execution sequence and a sequence number of an execution level corresponding to each service process with the execution sequence number smaller than m;
determining a maximum value n in the sequence numbers of the execution levels;
moving the predetermined type of business process from a current execution level to an n +1 th execution level;
acquiring the arrangement condition of the execution levels of each business process with the execution sequence number larger than m;
according to the arrangement condition of the execution levels, moving each business process with an execution sequence number larger than m to an execution level behind the n +1 execution level of the business process execution matrix according to the original matrix structure;
the execution sequence number m and the maximum value n are positive integers.
4. The method of claim 2 or 3, said performing the business processes according to the second execution order, comprising:
executing each execution level of the business process execution matrix in series;
and executing the business processes in each execution hierarchy in parallel.
5. The method of any of claims 1 to 3, further comprising:
and printing the log information of each business process according to the first execution sequence.
6. An apparatus for traffic processing, comprising:
the business process attribute analysis module is used for determining a first execution sequence of each business process contained in the target business and a dependency relationship among the business processes; the first execution sequence comprises executing each service process in series;
the execution sequence adjusting module is used for adjusting the first execution sequence according to the dependency relationship to obtain a second execution sequence; the second execution sequence comprises executing each business process in series and in parallel;
and the service process execution module is used for executing each service process according to the second execution sequence.
7. The apparatus of claim 6, wherein the execution order adjustment module comprises:
the dependency hierarchy analysis submodule is used for determining the dependency hierarchy among the business processes according to the dependency relationship;
the business process execution matrix establishing submodule is used for establishing a business process execution matrix, and the execution level in the business process execution matrix corresponds to the dependency level;
the business process placing sub-module is used for placing the business process into an execution level corresponding to the dependency level to which the business process belongs according to the dependency level and the first execution sequence;
a second execution order determination sub-module for determining the second execution order according to the execution hierarchy.
8. The apparatus of claim 7, wherein the execution order adjustment module, in case that a predetermined type of service process is included in the target service, further comprises:
the service process information acquisition submodule is used for acquiring an execution sequence number m of the service process of the preset type in a first execution sequence and a sequence number of an execution level corresponding to each service process of which the execution sequence number is less than m;
a sequence number maximum value determining submodule, configured to determine a maximum value n among the sequence numbers of the execution levels;
the first moving submodule is used for moving the business process of the preset type from the current execution level to the (n + 1) th execution level;
the execution level arrangement condition acquisition submodule is used for acquiring the arrangement condition of the execution level of each service process with the execution sequence number larger than m;
the second moving submodule is used for moving each business process with the execution sequence number larger than m to an execution level behind the n +1 execution level of the business process execution matrix according to the arrangement condition of the execution level;
the execution sequence number m and the maximum value n are positive integers.
9. The apparatus of claim 7 or 8, the business process execution module, comprising:
a first execution submodule, configured to execute each execution level of the business process execution matrix in series;
and the second execution submodule is used for executing the business process in each execution hierarchy in parallel.
10. The apparatus of any of claims 6 to 8, further comprising:
and the log information printing sub-module is used for printing the log information of each service process according to the first execution sequence.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 5.
12. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 5.
CN202010771528.4A 2020-08-04 2020-08-04 Method, device, equipment and storage medium for processing business Active CN111914010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010771528.4A CN111914010B (en) 2020-08-04 2020-08-04 Method, device, equipment and storage medium for processing business

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010771528.4A CN111914010B (en) 2020-08-04 2020-08-04 Method, device, equipment and storage medium for processing business

Publications (2)

Publication Number Publication Date
CN111914010A true CN111914010A (en) 2020-11-10
CN111914010B CN111914010B (en) 2024-02-20

Family

ID=73286504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010771528.4A Active CN111914010B (en) 2020-08-04 2020-08-04 Method, device, equipment and storage medium for processing business

Country Status (1)

Country Link
CN (1) CN111914010B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112766907A (en) * 2021-01-20 2021-05-07 中国工商银行股份有限公司 Service data processing method and device and server
CN113744037A (en) * 2021-08-16 2021-12-03 同盾科技有限公司 Communication method and device for participant in knowledge federation, electronic equipment and storage medium
CN114647464A (en) * 2022-05-19 2022-06-21 恒生电子股份有限公司 Application parallel start processing method and device and electronic equipment
CN115604101A (en) * 2022-09-29 2023-01-13 北京亚控科技发展有限公司(Cn) System management method and related equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567013A (en) * 2009-06-02 2009-10-28 阿里巴巴集团控股有限公司 Method and apparatus for implementing ETL scheduling
US20100145945A1 (en) * 2008-12-10 2010-06-10 International Business Machines Corporation System, method and program product for classifying data elements into different levels of a business hierarchy
CN103793349A (en) * 2013-12-27 2014-05-14 远光软件股份有限公司 Data processing method and data processing device
US20150134589A1 (en) * 2013-11-08 2015-05-14 International Business Machines Corporation Processing data in data migration
US20190050278A1 (en) * 2017-08-10 2019-02-14 Bank Of America Corporation Automatic resource dependency tracking and structure for maintenance of resource fault propagation
CN109661674A (en) * 2016-12-22 2019-04-19 华为技术有限公司 The system and method for Visual calculation workflow
CN110427411A (en) * 2019-08-02 2019-11-08 河南开合软件技术有限公司 Associated data is carried out visualization method by figure layer by one kind
CN110471656A (en) * 2018-05-10 2019-11-19 北京京东尚科信息技术有限公司 The method of adjustment and device of component level
CN110704023A (en) * 2019-09-26 2020-01-17 北京华大九天软件有限公司 Matrix block division method and device based on topological sorting
CN111427943A (en) * 2020-03-27 2020-07-17 北京明略软件***有限公司 Task management method and device in ET L system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100145945A1 (en) * 2008-12-10 2010-06-10 International Business Machines Corporation System, method and program product for classifying data elements into different levels of a business hierarchy
CN101567013A (en) * 2009-06-02 2009-10-28 阿里巴巴集团控股有限公司 Method and apparatus for implementing ETL scheduling
US20150134589A1 (en) * 2013-11-08 2015-05-14 International Business Machines Corporation Processing data in data migration
CN103793349A (en) * 2013-12-27 2014-05-14 远光软件股份有限公司 Data processing method and data processing device
CN109661674A (en) * 2016-12-22 2019-04-19 华为技术有限公司 The system and method for Visual calculation workflow
US20190050278A1 (en) * 2017-08-10 2019-02-14 Bank Of America Corporation Automatic resource dependency tracking and structure for maintenance of resource fault propagation
CN110471656A (en) * 2018-05-10 2019-11-19 北京京东尚科信息技术有限公司 The method of adjustment and device of component level
CN110427411A (en) * 2019-08-02 2019-11-08 河南开合软件技术有限公司 Associated data is carried out visualization method by figure layer by one kind
CN110704023A (en) * 2019-09-26 2020-01-17 北京华大九天软件有限公司 Matrix block division method and device based on topological sorting
CN111427943A (en) * 2020-03-27 2020-07-17 北京明略软件***有限公司 Task management method and device in ET L system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙晋永;闻立杰;匡增雄;李涛;张展;: "基于数据生成―消耗依赖的语义工作流并行化重构方法", 计算机集成制造***, no. 06, 15 June 2020 (2020-06-15) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112766907A (en) * 2021-01-20 2021-05-07 中国工商银行股份有限公司 Service data processing method and device and server
CN113744037A (en) * 2021-08-16 2021-12-03 同盾科技有限公司 Communication method and device for participant in knowledge federation, electronic equipment and storage medium
CN113744037B (en) * 2021-08-16 2023-09-29 同盾科技有限公司 Method and device for communication of participants in knowledge federation, electronic equipment and storage medium
CN114647464A (en) * 2022-05-19 2022-06-21 恒生电子股份有限公司 Application parallel start processing method and device and electronic equipment
CN115604101A (en) * 2022-09-29 2023-01-13 北京亚控科技发展有限公司(Cn) System management method and related equipment
CN115604101B (en) * 2022-09-29 2024-02-02 北京亚控科技发展有限公司 System management method and related equipment

Also Published As

Publication number Publication date
CN111914010B (en) 2024-02-20

Similar Documents

Publication Publication Date Title
US11455217B2 (en) Transaction consistency query support for replicated data from recovery log to external data stores
CN111914010A (en) Service processing method, device, equipment and storage medium
US20220224752A1 (en) Automated server workload management using machine learning
US9576036B2 (en) Self-analyzing data processing job to determine data quality issues
CN111639078A (en) Data query method and device, electronic equipment and readable storage medium
EP3828723A1 (en) Transparent discovery of semi-structured data schema
US11520761B2 (en) Cloud-based platform instrumentation and monitoring system for maintenance of user-configured programs
Graur et al. Cachew: Machine learning input data processing as a service
US11615076B2 (en) Monolith database to distributed database transformation
US11442930B2 (en) Method, apparatus, device and storage medium for data aggregation
CN111461343A (en) Model parameter updating method and related equipment thereof
CN111913808A (en) Task allocation method, device, equipment and storage medium
US11182386B2 (en) Offloading statistics collection
CN112395333A (en) Method and device for checking data exception, electronic equipment and storage medium
US10341164B2 (en) Modifying computer configuration to improve performance
Pandey Performance benchmarking and comparison of cloud-based databases MongoDB (NoSQL) vs MySQL (Relational) using YCSB
CN112115113B (en) Data storage system, method, device, equipment and storage medium
US9805091B2 (en) Processing a database table
CN115080607A (en) Method, device, equipment and storage medium for optimizing structured query statement
CN111309795B (en) Business abnormality positioning method and device, electronic equipment and medium
US20120198373A1 (en) Focus-Driven User Interface
US20180189499A1 (en) Dynamic security report generator
CN113760489B (en) Resource allocation method and device
KR101638048B1 (en) Sql query processing method using mapreduce
US20240020405A1 (en) Extracted field generation to filter log messages

Legal Events

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