Transaction processing method and device and electronic equipment

Through the screening of the target application system architecture and the allocation of transaction units, the problem of database performance bottlenecks and high operation and maintenance costs in stand-alone applications is solved, large transaction disassembly and database pressure are reduced, and system response capabilities and operation and maintenance efficiency are improved. .

CN119493632APending Publication Date: 2025-02-21ULTRAPOWER SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311036442.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-16
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In stand-alone applications, database performance bottlenecks lead to insufficient database overhead in high concurrency and slow resource release, which in turn causes request blockage and affects the normal operation of the system. Existing solutions such as improving database performance or scaling capacity are not effective in non-high concurrency environments, and operation and maintenance personnel manually correct abnormal data inadequate timeliness, wasting labor costs and subjective factors made mistakes.

Method used

By obtaining the system architecture of the target application, filtering the system architecture according to the preset transaction filtering principle, determining functional modules that meet the transaction filtering principle, and assigning transaction units to them to realize the functions of the functional module. The transaction filtering principle can include transaction association filtering principle and transaction time-consuming filtering principle.

Benefits of technology

This method can disassemble large transactions into smaller transaction units, reduce database pressure, improve database response capabilities, simplify operation and maintenance costs, and facilitate maintenance of each functional module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493632A_ABST
    Figure CN119493632A_ABST
Patent Text Reader

Abstract

The invention provides a transaction processing method and device and electronic equipment, and relates to the technical field of computer application, and the method comprises the steps: obtaining a system architecture corresponding to a target application; wherein the system architecture comprises each function module of the target application and a dependency relationship between the function modules; screening the system architecture according to a preset transaction screening principle to determine a first function module meeting the transaction screening principle in the function modules; and allocating a transaction unit to the first function module to realize the function of the first function module through the transaction unit. According to the transaction processing method and device and the electronic equipment, the functions of the first function modules can be achieved through the transaction units, the pressure of a database can be reduced, meanwhile, certain isolation exists between the transaction units, maintenance of each first function module is facilitated, the operation and maintenance cost can be reduced, and the operation and maintenance efficiency is improved. And research and development cost is reduced for enterprises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer applications, and in particular to a transaction processing method, device and electronic equipment. Background Art

[0002] In stand-alone applications, there are often certain bottlenecks in the database. For example, if there are a large number of large transactions in the project, when the concurrency is high, it is easy to cause insufficient database overhead and slow resource release, which will cause a large number of requests to be blocked, thus affecting the normal operation of the system. In addition, due to database performance issues, it is also easy to cause data processing failures and exceptions.

[0003] In response to the above problems, the main solutions currently include improving database performance or expanding database capacity, and when abnormal data occurs, operation and maintenance personnel need to rely on scripts to make corrections.

[0004] However, simply improving database performance or expanding capacity is not very effective for applications in non-high-concurrency stand-alone environments. The correction process of operation and maintenance personnel is often not timely enough, which affects the timely response of production data and thus causes losses. It also wastes manpower costs and has problems such as errors due to subjective factors. Summary of the invention

[0005] In view of this, an object of the present invention is to provide a transaction processing method, device and electronic device to alleviate the above technical problems.

[0006] In a first aspect, an embodiment of the present invention provides a transaction processing method, the method comprising: obtaining a system architecture corresponding to a target application; wherein the system architecture comprises each functional module of the target application and the dependency relationship between each functional module; screening the system architecture according to a preset transaction screening principle to determine a first functional module among the functional modules that complies with the transaction screening principle; and allocating a transaction unit to the first functional module to implement the function of the first functional module through the transaction unit.

[0007] In combination with the first aspect, an embodiment of the present invention provides a first possible implementation scheme of the first aspect, wherein the above-mentioned transaction screening principle includes at least one of the following: a transaction association screening principle and a transaction time consumption screening principle; wherein the transaction association screening principle is used to characterize the degree of association between each of the functional modules and the main business of the target application; the transaction time consumption screening principle is used to characterize the operation time generated by the transaction unit to implement the function of each of the functional modules.

[0008] In combination with the first possible implementation of the first aspect, an embodiment of the present invention provides a second possible implementation of the first aspect, wherein the step of screening the system architecture according to a pre-set transaction screening principle to determine the first functional module in the functional modules that complies with the transaction screening principle includes: obtaining each screening principle included in the transaction screening principle in turn; determining whether the functional modules satisfy each of the screening principles; if so, determining that the functional module complies with the transaction screening principle, and determining the functional module as the first functional module.

[0009] In combination with the second possible implementation of the first aspect, an embodiment of the present invention provides a third possible implementation of the first aspect, wherein the above-mentioned step of determining whether the functional modules all satisfy each of the screening principles comprises: if the screening principles include transaction association screening principles, obtaining the degree of association between each of the functional modules and the main business processing flow of the target application that is recorded in advance; determining whether the degree of association is greater than a preset association threshold; if so, determining that the functional module satisfies the transaction association screening principle.

[0010] In combination with the second possible implementation of the first aspect, an embodiment of the present invention provides a fourth possible implementation of the first aspect, wherein the above-mentioned step of determining whether the functional modules all satisfy each of the filtering principles further includes: if the filtering principles include transaction time filtering principles, obtaining the pre-recorded operation time generated by the transaction unit implementing the function of each of the functional modules; determining whether the operation time is less than a preset time threshold; if so, determining that the functional module satisfies the transaction time filtering principles.

[0011] In combination with the first possible implementation of the first aspect, an embodiment of the present invention provides a fifth possible implementation of the first aspect, wherein the above method also includes: if the functional module does not satisfy any of the screening principles, determining that the functional module does not comply with the transaction screening principle, and determining the functional module as a second functional module; obtaining a pre-configured task execution system, and assigning the corresponding task execution system to the second functional module.

[0012] In combination with the first aspect, and the first to fifth possible implementations of the first aspect, an embodiment of the present invention provides a sixth possible implementation of the first aspect, wherein the above method also includes: controlling the transaction units allocated to each of the first functional modules according to pre-set programmatic transactions.

[0013] In a second aspect, an embodiment of the present invention further provides a transaction processing device, comprising: an acquisition module, used to acquire a system architecture corresponding to a target application; wherein the system architecture includes each functional module of the target application and the dependency relationship between each functional module; a screening module, used to screen the system architecture according to a preset transaction screening principle to determine a first functional module among the functional modules that meets the transaction screening principle; and an allocation module, used to allocate a transaction unit to the first functional module to implement the function of the first functional module through the transaction unit.

[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.

[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the method described in the first aspect.

[0016] The embodiments of the present invention bring the following beneficial effects:

[0017] A transaction processing method, device and electronic device provided by an embodiment of the present invention can obtain a system architecture corresponding to a target application; and screen the system architecture according to a preset transaction screening principle to determine a first functional module in the functional modules of the system architecture that meets the transaction screening principle; then a transaction unit is allocated to the first functional module, and a large transaction corresponding to the system architecture of the target application can be disassembled into transaction units corresponding to each first functional module, so that the function of the first functional module can be implemented through the transaction unit, which can not only reduce the pressure on the database, but also have a certain degree of isolation between the transaction units, which is convenient for maintenance of each first functional module, and can also reduce the cost of operation and maintenance, thereby reducing the R&D cost for the enterprise.

[0018] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0019] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 A flowchart of a transaction processing method provided by an embodiment of the present invention;

[0022] Figure 2 A flowchart of another transaction processing method provided by an embodiment of the present invention;

[0023] Figure 3 A structural diagram of a transaction processing device provided by an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] At present, in stand-alone applications, due to database performance issues, data processing often fails and exceptions occur. To address this problem, the main solutions are as follows:

[0027] (1) Improve database performance or expand database capacity. The following solutions can be used to improve performance: create indexes, optimize SQL statements, optimize table structures, split tables, and split databases.

[0028] (2) When abnormal data appears, the operation and maintenance personnel need to rely on scripts to make corrections. For example, in daily operation and maintenance, the operation and maintenance personnel generally generate database scripts for abnormal data and use the scripts to solve subsequent problems.

[0029] However, in (1) above, the method of improving database performance or expanding capacity is not very effective for applications in non-high-concurrency stand-alone environments, and the input and output are not proportional. Simply improving performance cannot guarantee the data responsiveness of large transactions, and for staff who are not familiar with databases, blindly transforming the database is likely to cause problems such as dirty data and historical data anomalies. In (2) above, relying on manual screening and correction of abnormal data is not only insufficient in timeliness, affecting the timely response of production data and causing losses, but also wastes labor costs and has certain subjective factors and errors.

[0030] Based on this, the embodiments of the present invention provide a transaction processing method, device and electronic device, which decompose transactions to relieve database pressure. At the same time, they can also reduce operation and maintenance costs and facilitate maintenance.

[0031] To facilitate understanding of this embodiment, a transaction processing method disclosed in an embodiment of the present invention is first introduced in detail.

[0032] In a possible implementation, the embodiment of the present invention provides a transaction processing method, such as Figure 1 A flow chart of a transaction processing method is shown, the method comprising the following steps:

[0033] Step S102, obtaining the system architecture corresponding to the target application;

[0034] The system architecture in the embodiment of the present invention includes each functional module of the target application and the dependency relationship between each functional module;

[0035] In specific implementation, the system architecture in the embodiments of the present invention refers to the system architecture of a certain application. For example, stand-alone games, shopping systems, online education websites, etc. can all be used as target applications in the embodiments of the present invention. The functional module refers to multiple sub-functions designed to achieve the overall function of the target application, that is, each functional module is used to achieve a sub-function, and there is generally a certain dependency between multiple functional modules, and multiple functional modules are combined together to form the overall system architecture of the target application. Taking an online education website as an example, users can purchase courses, learn courses, and make evaluations on the website. Among them, purchasing courses, learning courses and evaluation functions can all be regarded as a functional module. The combination of these functional modules constitutes the overall system architecture of the online education website, and there is also a certain dependency between purchasing courses and learning courses. For example, users must first purchase courses before they can learn.

[0036] For the embodiment of the present invention, the entire online education website is a target application, which is equivalent to a large transaction, referred to as a transaction. Functions such as purchasing courses, learning courses and evaluation functions constitute the various functional modules of the large transaction. In addition, the settings of the functional modules and the dependencies between the functional modules are generally set in the design and development stage, that is, before executing the transaction processing method provided by the embodiment of the present invention, they are all known, and which specific functional module is assigned a separate transaction unit can be achieved through the transaction processing method provided by the embodiment of the present invention.

[0037] Step S104, screening the system architecture according to the preset transaction screening principle to determine the first functional module in the functional modules that meets the transaction screening principle;

[0038] The transaction screening principle may specifically include one screening principle or multiple screening principles, which depends on actual usage and is not limited in the embodiment of the present invention.

[0039] In the embodiment of the present invention, the functional modules of the system architecture are actually screened to split large transactions. Through the screening process of the above step S104, the large transactions of the target application can be split, and the transaction screening principle is equivalent to the principle followed by splitting large transactions, so that the large transaction splitting process is more reasonable.

[0040] Step S106: Allocate a transaction unit to the first functional module, so as to implement the function of the first functional module through the transaction unit.

[0041] A transaction processing method provided by an embodiment of the present invention can obtain a system architecture corresponding to a target application; and screen the system architecture according to a preset transaction screening principle to determine a first functional module in the functional modules of the system architecture that meets the transaction screening principle; and then allocate a transaction unit to the first functional module, so that a large transaction corresponding to the system architecture of the target application can be decomposed into transaction units corresponding to each first functional module, so that the function of the first functional module can be implemented through the transaction unit, which can not only reduce the pressure on the database, but also have a certain degree of isolation between the transaction units, which is convenient for maintenance of each first functional module, and can also reduce the cost of operation and maintenance, thereby reducing the R&D cost for the enterprise.

[0042] In actual use, the key to solving database bottlenecks is to split large transactions. In short, large transactions mean that database transactions take too long to run. When the database connection is insufficient, subsequent error requests will be blocked, which greatly reduces the response capability. The following are the factors that generally lead to large transactions:

[0043] 1. A large number of insert and update operations are organized together to form a large transaction.

[0044] 2. The transaction contains non-DB time-consuming operations, such as RPC requests. The RPC request itself is an unstable factor and is affected by many factors, such as network instability and slow response of downstream services. This will extend the transaction processing time and even cause a database avalanche.

[0045] In order to avoid the above-mentioned factors that lead to large transactions, in an embodiment of the present invention, the transaction screening principle includes at least one of the following: a transaction association screening principle and a transaction time-consuming screening principle; wherein the transaction association screening principle is used to characterize the degree of association between each functional module and the main business of the target application; this screening principle is aimed at the above-mentioned factor 1; the transaction time-consuming screening principle is used to characterize the operation time generated by the transaction unit to implement the function of each functional module, and this screening principle is mainly aimed at the above-mentioned factor 2.

[0046] Specifically, based on the above screening principles, Figure 1 On the basis of Figure 2 A flowchart of another transaction processing method is also provided, such as Figure 2 As shown, the following steps are included:

[0047] Step S202, obtaining the system architecture corresponding to the target application;

[0048] The system architecture in the embodiment of the present invention includes each functional module of the target application and the dependency relationship between each functional module;

[0049] In specific implementation, in an embodiment of the present invention, the system architecture of the target application is equivalent to a large transaction. Through the transaction processing method provided in an embodiment of the present invention, the system architecture of the target application can be split to obtain a first functional module, and then a transaction unit is allocated to the first functional module to perform transaction management on the first functional module through the transaction unit.

[0050] Furthermore, in the embodiment of the present invention, the transaction unit allocated to each first functional module is controlled according to the pre-set programmatic transaction to avoid the global use of @Transactional management transactions with a coarse control granularity for the sake of development efficiency. Specifically, the programmatic transaction used in the embodiment of the present invention is a transactionTemplate-compiled transaction, which can perform more refined and flexible control to reduce the transaction granularity.

[0051] Step S204, sequentially obtaining each screening principle included in the transaction screening principle;

[0052] Step S206, determining whether all functional modules satisfy each screening principle; if yes, executing step S208, if no, executing step S212;

[0053] Step S208, determining that the function module complies with the transaction screening principle, and determining the function module as the first function module;

[0054] Step S210: Allocate a transaction unit to the first functional module, so as to implement the function of the first functional module through the transaction unit.

[0055] Specifically, in an embodiment of the present invention, the transaction screening principle includes at least one of the following: a transaction association screening principle and a transaction time consumption screening principle; wherein the transaction association screening principle is used to characterize the degree of association between each functional module and the main business of the target application; the transaction time consumption screening principle is used to characterize the operation time generated by the transaction unit to implement the function of each functional module.

[0056] In actual use, the above-mentioned degree of association is determined by developers during the development phase based on the degree of association between the main business processing flow and each functional module. Also, taking the online education website as the target application as an example, the functional module of purchasing courses is a relatively important functional module for the main business processing flow of the entire online education website. Therefore, the degree of association between this functional module and the main business of the target application is relatively high. In addition, in order to perform quantitative operations, a certain numerical value can be set to characterize the degree of association, such as a numerical value between 0 and 1 to represent the degree of association between each functional module and the main business. In this way, when filtering the functional modules, if the filtering principle includes the transaction association filtering principle, the degree of association between each pre-recorded functional module and the main business processing flow of the target application can be obtained, and it can be determined whether the degree of association is greater than the preset association threshold; if so, it is determined that the functional module meets the transaction association filtering principle.

[0057] For operations that are not related to the main business process, that is, functional modules with a correlation degree less than or equal to the preset correlation threshold, such as query operations, they can be executed outside the transaction to reduce the pressure on the transaction unit. Alternatively, insert or update operations that are less relevant to the main business process, such as logging, can also be processed in a non-transactional manner, such as calling the log processing system to collaborate with the transaction unit specifically for tasks such as logging.

[0058] Furthermore, for the above-mentioned transaction time-consuming screening principle, it is necessary to obtain the time consumption of the functional modules, among which the time consumption of each functional module can be obtained in a test environment, that is, in a test environment, developers can complete each functional module through a transaction unit, and at the same time, start a timing task to record the time consumption of the transaction unit to complete the operation of each functional module, and record it, so that when the target application is actually deployed, the functional modules can be screened according to the transaction time-consuming screening principle.

[0059] Specifically, if the screening principle includes the transaction time screening principle, then in the above step S206, the operation time generated by the pre-recorded transaction unit to implement the function of each functional module can be obtained; then it is determined whether the operation time is less than the preset time threshold; if so, it is determined that the functional module meets the transaction time screening principle.

[0060] The transaction time-consuming screening principle can be used to screen out functional modules that take a long time to operate, such as complex calculations, remote interface calls, etc. For these functional modules, asynchronous processing can be used to avoid blocking of the transaction processing unit. That is, in the transaction unit, it is generally necessary to avoid processing too much data at one time to avoid causing the database connection to take too long and cause blocking.

[0061] Furthermore, if the transaction screening principles include both transaction association screening principles and transaction time-consuming screening principles, it is necessary to ensure that the functional module satisfies both screening principles at the same time, that is, it is necessary to ensure that the degree of association of the functional module is greater than the association threshold, and that the operation time of the functional module is less than the time threshold. This can avoid data anomalies caused by functional modules with greater time consumption when processing transaction functions.

[0062] If the function module does not meet any of the above screening principles, it is determined that the function module does not meet the transaction screening principle, that is, the process of the following step S212 is performed, and the function module is determined as the second function module;

[0063] Step S212, determining that the function module does not comply with the transaction screening principle, and determining the function module as a second function module;

[0064] Step S214: obtaining a pre-configured task execution system and assigning a corresponding task execution system to the second functional module.

[0065] Also, taking the online education website as the target application as an example, assuming that the functional module of the above-mentioned query operation and log recording is determined in the above-mentioned judgment step to be not in compliance with the transaction screening principle, it can be determined as the second functional module. At this time, other task execution systems, such as query system, log processing system, etc., can be called to specifically handle the above-mentioned query operations and log records, and these task execution systems can be processed synchronously or asynchronously with the transaction unit to realize the overall function of the online education website.

[0066] Furthermore, for data processing failures and exceptions, you can use abnormal data polling combined with database retry. The specific solution is as follows:

[0067] Build an exception data queue and a scheduling thread pool, intercept data processing results through custom aspects, insert exception data into the queue, and notify the scheduling thread pool to process it. The scheduling thread pool continuously monitors the queue, and when there is data in the queue, it starts the exception handler and executes relevant compensation strategies according to the exception type.

[0068] To facilitate understanding, the following example illustrates the specific splitting process of large transactions. Taking an online education website as an example, it is assumed that users can purchase courses, study courses, and make evaluations on the website.

[0069] For the convenience of users, the website also provides some preferential activities, such as discounts for purchases over a certain amount, coupons, etc. Now, it is necessary to split the large transaction of placing an order to purchase a course. The functional modules of placing an order to purchase a course generally include: creating an order record, deducting the inventory of goods, deducting the balance of the user account, recording transaction flow, using coupons, using discount conditions, distinguishing VIP users, user evaluation, and user querying courses, etc. These functional modules can all be screened by the transaction processing method of the embodiment of the present invention. After screening, the final transaction splitting process is as follows:

[0070] (1) Creating an order record is a separate transaction unit. This transaction is only responsible for creating the order record. If the creation fails, the transaction is rolled back.

[0071] (2) Deducting the inventory of goods becomes a separate transaction unit. This transaction is only responsible for deducting the inventory of goods. If the deduction fails, the transaction is rolled back.

[0072] (3) Deducting the user account balance and recording the transaction flow are combined into one transaction unit. This transaction is only responsible for deducting the user account balance and recording the transaction flow. If the deduction fails, the transaction is rolled back.

[0073] (4) If the user uses a coupon, operations such as coupon verification and coupon deduction need to be performed. Therefore, the coupon operation can be made into a separate transaction unit, which is only responsible for operations such as coupon verification and deduction. If the operation fails, the transaction is rolled back.

[0074] (5) If the user meets the full discount conditions, the full discount operation needs to be performed. Therefore, the full discount operation can be made into a separate transaction unit, which is only responsible for calculating the full discount amount, recording the full discount flow, etc. If the operation fails, the transaction is rolled back.

[0075] (6) If the course purchased by the user is a VIP course, a VIP discount operation is required. Therefore, the VIP discount operation can also be made into a separate transaction unit, which is only responsible for calculating the VIP discount amount, recording the VIP discount flow, etc. If the operation fails, the transaction is rolled back.

[0076] (7) After completing the course, the user can evaluate the course. Therefore, the course evaluation can be made into a separate transaction unit, which is only responsible for recording the user's evaluation and rolling back the transaction if the operation fails.

[0077] Through the above split, each transaction unit can be relatively small, easy to maintain and debug, and can be executed concurrently, improving performance. Moreover, if a transaction fails, only the corresponding transaction unit will be rolled back, which will not affect the execution of other transaction units.

[0078] At the same time, according to the specific business scenario, transaction units can be added or deleted as needed to adapt to different business needs.

[0079] In addition, please note the following:

[0080] (1) The dependencies between transaction units should be considered during splitting to ensure that each transaction unit can be executed independently after splitting.

[0081] (2) When splitting, you need to pay attention to the boundaries of the transaction units, that is, to ensure that the operations in each transaction unit are atomic, either all executed successfully or all rolled back.

[0082] (3) After splitting, it is necessary to consider the issue of concurrent execution and try to avoid mutual interference between transaction units.

[0083] (4) After splitting, each transaction unit needs to be tested and optimized individually to ensure performance and reliability.

[0084] In summary, the transaction processing method provided by the embodiment of the present invention can reduce database pressure and facilitate maintenance. At the same time, it can also reduce operation and maintenance costs, reduce R&D costs for enterprises, and improve the responsiveness of the database.

[0085] Further, based on the above embodiment, the embodiment of the present invention also provides a transaction processing device, such as Figure 3 The structure diagram of a transaction processing device shown in FIG. 1 includes:

[0086] An acquisition module 30 is used to acquire a system architecture corresponding to a target application; wherein the system architecture includes each functional module of the target application and the dependency relationship between each functional module;

[0087] A screening module 32, configured to screen the system architecture according to a preset transaction screening principle to determine a first functional module among the functional modules that meets the transaction screening principle;

[0088] The allocation module 34 is used to allocate a transaction unit to the first functional module, so as to implement the function of the first functional module through the transaction unit.

[0089] Further, in the embodiment of the present invention, the transaction screening principle includes at least one of the following: a transaction association screening principle and a transaction time-consuming screening principle;

[0090] The transaction association screening principle is used to characterize the degree of association between each of the functional modules and the main business of the target application; the transaction time consumption screening principle is used to characterize the operation time consumption generated by the transaction unit to implement the function of each of the functional modules.

[0091] The above-mentioned screening module is also used to: obtain each screening principle included in the transaction screening principle in turn; determine whether the functional modules meet each of the screening principles; if so, determine that the functional module meets the transaction screening principle, and determine the functional module as the first functional module.

[0092] Further, the step of determining whether the functional modules all meet each of the screening principles includes:

[0093] If the screening principle includes a transaction association screening principle, obtaining a pre-recorded association degree between each of the functional modules and the main business processing flow of the target application; determining whether the association degree is greater than a preset association threshold; if so, determining that the functional module satisfies the transaction association screening principle;

[0094] If the screening principle includes a transaction time screening principle, obtain the pre-recorded operation time generated by the transaction unit implementing the function of each functional module; determine whether the operation time is less than a preset time threshold; if so, determine that the functional module meets the transaction time screening principle.

[0095] Further, if the functional module does not meet any of the screening principles, it is determined that the functional module does not meet the transaction screening principle, and the functional module is determined as a second functional module; a pre-configured task execution system is obtained, and the corresponding task execution system is assigned to the second functional module.

[0096] Furthermore, the above-mentioned device is also used to: control the transaction unit allocated to each of the first functional modules according to the preset programmatic transactions.

[0097] The transaction processing device provided in the embodiment of the present invention has the same technical features as the transaction processing method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0098] Furthermore, an embodiment of the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0099] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are executed.

[0100] Furthermore, an embodiment of the present invention also provides a structural diagram of an electronic device, such as Figure 4 As shown, it is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 41 and a memory 40, the memory 40 stores computer executable instructions that can be executed by the processor 41, and the processor 41 executes the computer executable instructions to implement the above method.

[0101] exist Figure 4 In the illustrated embodiment, the electronic device further includes a bus 42 and a communication interface 43 , wherein the processor 41 , the communication interface 43 and the memory 40 are connected via the bus 42 .

[0102] Among them, the memory 40 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 42 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 42 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0103] The processor 41 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 41 or the instruction in the form of software. The above processor 41 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 41 reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0104] The computer program products of the transaction processing methods, devices and electronic devices provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0106] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0107] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0108] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0109] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A transaction processing method, characterized in that: The method comprises: Obtaining a system architecture corresponding to a target application; wherein the system architecture includes each functional module of the target application and dependencies between each functional module; Screening the system architecture according to a preset transaction screening principle to determine a first functional module among the functional modules that meets the transaction screening principle; A transaction unit is allocated to the first functional module, so as to implement the function of the first functional module through the transaction unit.

2. The method according to claim 1, characterized in that: The transaction screening principle includes at least one of the following: transaction association screening principle and transaction time-consuming screening principle; The transaction association screening principle is used to characterize the degree of association between each of the functional modules and the main business of the target application; The transaction time-consuming screening principle is used to characterize the operation time consumed by the transaction unit to implement the function of each functional module.

3. The method according to claim 2, characterized in that The step of screening the system architecture according to a preset transaction screening principle to determine a first functional module among the functional modules that meets the transaction screening principle includes: Obtaining each screening principle included in the transaction screening principle in sequence; Determining whether the functional modules all meet each of the screening principles; If yes, it is determined that the functional module complies with the transaction screening principle, and the functional module is determined as the first functional module.

4. The method according to claim 3, characterized in that The step of determining whether the functional modules all meet each of the screening principles comprises: If the screening principle includes a transaction association screening principle, obtaining a pre-recorded association degree between each of the functional modules and the main business process flow of the target application; Determining whether the correlation degree is greater than a preset correlation threshold; If yes, it is determined that the functional module meets the transaction association screening principle.

5. The method according to claim 3, characterized in that: The step of determining whether the functional modules all meet each of the screening principles further includes: If the screening principle includes a transaction time-consuming screening principle, obtaining the pre-recorded operation time consumed by the transaction unit to implement the function of each functional module; Determine whether the operation time is less than a preset time threshold; If yes, it is determined that the functional module meets the transaction time-consuming screening principle.

6. The method according to claim 2, characterized in that The method further comprises: If the functional module does not satisfy any of the screening principles, determining that the functional module does not satisfy the transaction screening principle, and determining the functional module as a second functional module; Acquire a preconfigured task execution system, and allocate the corresponding task execution system to the second functional module.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The transaction unit allocated to each of the first functional modules is controlled according to a preset programmatic transaction.

8. A transaction processing device, characterized in that: The device comprises: An acquisition module, used to acquire a system architecture corresponding to a target application; wherein the system architecture includes each functional module of the target application and the dependency relationship between each functional module; A screening module, used to screen the system architecture according to a preset transaction screening principle to determine a first functional module among the functional modules that meets the transaction screening principle; The allocation module is used to allocate a transaction unit to the first functional module, so as to implement the function of the first functional module through the transaction unit.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are executed.