Cloud transaction processing method and device, equipment and storage medium

By executing long and short transactions in different container spaces on the cloud platform and adopting an automatic expansion mechanism, the impact of long transactions on short transactions is solved, and the stability and processing efficiency of cloud applications are improved.

CN119473555APending Publication Date: 2025-02-18AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411713887.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The impact of medium- and long transactions on short transactions in cloud applications has restricted system performance and stability. It is difficult for traditional methods to effectively isolate the impact of long transactions on short transactions and cannot cope with resource peaks.

Method used

By executing long and short transactions in different container spaces on the cloud platform, a resource isolation mechanism is adopted, and an automatic expansion mechanism is triggered in the long transaction container space, and computing resources are added to deal with resource peaks.

Benefits of technology

Effectively isolate the impact of long transactions on short transactions, ensure that short transactions operate normally in independent container space, improve the stability and fault tolerance of the system, and improve the success rate and processing efficiency of long transactions through dynamic capacity expansion mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473555A_ABST
    Figure CN119473555A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud transaction processing method and device, equipment and a storage medium, and the method comprises the steps: obtaining a transaction request, and obtaining a pre-stored long transaction list from a cache; and the transaction type is judged by comparing the transaction request information with the long transaction list. If the transaction is a short transaction, the transaction is assigned to a short transaction container space for execution; if the transaction is a long transaction, the transaction is dispatched to a long transaction container space for execution, the long transaction container space and the short transaction container space are subjected to resource isolation, an automatic capacity expansion mechanism is triggered when memory overflow occurs in the execution process, and computing resources are dynamically increased. The method monitors the execution condition of the transaction request in real time. And if one transaction meets the preset long transaction condition, the information of the transaction is updated to the long transaction list. According to the method, long transactions and short transactions are distinguished, execution of different types of transactions is effectively guaranteed, and the overall transaction processing efficiency and stability are improved through an automatic capacity expansion mechanism and a monitoring mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and more specifically, to a method, device, equipment and storage medium for processing transactions on the cloud. Background Art

[0002] With the rapid development of cloud computing technology, more and more applications are deployed on cloud platforms to improve resource efficiency and reduce operating costs. Container technology, as the core of cloud platform application deployment and management, effectively realizes the lightweight and portability of applications. However, the long transaction problem is still a major challenge facing cloud applications, restricting system performance and stability.

[0003] Long transactions usually refer to operations that take a long time to execute and consume a lot of resources, such as complex business processes, big data analysis, and batch data processing. These operations will occupy valuable resources such as CPU, memory, network bandwidth, and I / O for a long time, which will affect the response speed of other short transactions and even cause service interruptions or crashes. In addition, the resource requirements of long transactions often fluctuate greatly. The traditional method of simply increasing server resources is not only costly, but also unable to effectively isolate the impact of long transactions on short transactions, and it is difficult to cope with sudden resource peaks. When the resources consumed by long transactions exceed the system capacity, the system stability will face severe tests, and may even cause the entire application to crash. In this case, a more refined and flexible resource management strategy is needed to cope with the challenges brought by long transactions, so as to ensure the stability and performance of cloud applications. Summary of the invention

[0004] In view of the above problems, this application is proposed to provide a method, device, equipment and storage medium for processing transactions on the cloud, so as to achieve the isolation of long transactions and short transactions by cloud applications and ensure the stability of transaction processing. The specific solution is as follows:

[0005] In a first aspect, a method for processing a cloud transaction is provided, comprising:

[0006] Get transaction request;

[0007] Acquire a long transaction list configured in a cache, and determine the type of the transaction request according to the long transaction list, wherein the long transaction list includes information of transaction requests of the long transaction type;

[0008] When the type of the transaction request is a short transaction, the transaction request is dispatched to the short transaction container space for execution;

[0009] When the type of the transaction request is a long transaction, the transaction request is dispatched to the long transaction container space for execution. If a memory overflow occurs during the execution of the transaction request, an automatic capacity expansion mechanism is triggered to increase the computing resources of the long transaction container space. The long transaction container space is isolated from the short transaction container space resources.

[0010] The execution of the transaction request is monitored, and if the execution process of the transaction request meets the matching condition of the long transaction, the transaction request is updated to the long transaction list.

[0011] Preferably, before obtaining the transaction request, the method further includes:

[0012] Deploy the same image of the application into two sets of resource-isolated container spaces, where the two sets of resource-isolated space containers are respectively a short transaction container space and a long transaction container space, and the application is used to process the transaction request;

[0013] Allocate computing resources to the short transaction container space and the long transaction container space respectively.

[0014] Preferably, before obtaining the transaction request, the method further includes:

[0015] Create a long list of empty transactions in the cache;

[0016] The long transaction information is added to the long transaction list by manually marking the long transaction information and / or marking the long transaction information through a configuration file or an environment variable, wherein the long transaction information includes an identifier of the long transaction.

[0017] Preferably, the long transaction information further includes: a multi-thread processing identifier, which is used to indicate whether the long transaction requires multi-thread processing.

[0018] Preferably, when the transaction request type is a long transaction, dispatching the transaction request to a long transaction container space for execution includes:

[0019] When the transaction request type is a long transaction, it is determined whether the long transaction requires multi-thread processing according to the long transaction information. If so, the transaction request is assigned to a long transaction container space and the transaction request is marked for multi-thread execution.

[0020] Preferably, the matching conditions of the long transaction include:

[0021] The transaction time of the transaction request exceeds a first time threshold, and / or the resource consumption of the transaction request exceeds a second resource consumption threshold.

[0022] Preferably, the computing resources include: container instances or external storage.

[0023] In a second aspect, a cloud transaction processing device is provided, including:

[0024] A transaction request acquisition unit, used for acquiring a transaction request;

[0025] a long transaction list acquisition unit, configured to acquire a long transaction list configured in a cache, and determine the type of the transaction request according to the long transaction list, wherein the long transaction list contains information of transaction requests of the long transaction type;

[0026] A short transaction request processing unit, configured to dispatch the transaction request to a short transaction container space for execution when the transaction request is a short transaction;

[0027] A long transaction request processing unit, for dispatching the transaction request to the long transaction container space for execution when the transaction request is a long transaction, and triggering an automatic capacity expansion mechanism to increase computing resources of the long transaction container space if a memory overflow occurs during the execution of the transaction request, so that the long transaction container space is isolated from the short transaction container space resources;

[0028] The transaction request monitoring unit is used to monitor the execution of the transaction request, and if the execution process of the transaction request meets the matching condition of the long transaction, update the transaction request to the long transaction list.

[0029] In a third aspect, a cloud transaction processing device is provided, comprising: a memory and a processor;

[0030] The memory is used to store programs;

[0031] The processor is used to execute the program to implement each step of the method for processing cloud transactions described in any one of the first aspects of the present application.

[0032] In a fourth aspect, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the method for processing cloud transactions described in any one of the first aspects of the present application are implemented.

[0033] By means of the above technical solution, the present application isolates long transactions and short transactions in different container spaces for execution. This resource isolation mechanism effectively prevents the impact of long transactions on short transactions. Even if long transactions occupy a large amount of resources or even cause the container space in which they are located to crash, short transactions can still run normally in their independent container space, thereby ensuring the stability and continuity of the core business. In addition, when long transactions consume too many resources, such as when memory overflow occurs, the computing resources of the long transaction container space are automatically increased. This dynamic expansion mechanism can flexibly adjust resource allocation according to the actual load conditions to ensure that long transactions can be completed smoothly. At the same time, the dynamic expansion mechanism also avoids the failure or crash of long transactions due to insufficient resources, and improves fault tolerance and robustness.

[0034] In addition, the present application adopts a real-time monitoring mechanism to continuously track the execution of transaction requests. If the execution process of a transaction request meets the preset long transaction conditions, it will be automatically updated to the long transaction list. This dynamic update mechanism can continuously improve the identification and classification of long transactions, improve the accuracy of determination, and can adaptively handle new long transaction types. Use cache to store long transaction lists to speed up the determination of transaction types. Every time a transaction request arrives, the long transaction list can be directly obtained from the cache, the transaction type can be quickly determined, and the request can be dispatched to the corresponding container space, which significantly improves the efficiency of transaction processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0036] Figure 1 A flowchart of a method for processing cloud transactions provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of a scenario illustrating a method for processing transactions on the cloud;

[0038] Figure 3 A schematic diagram of the structure of a processing device for cloud transactions provided in an embodiment of the present application;

[0039] Figure 4 A schematic diagram of the structure of a cloud transaction processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The method provided in this application involves concepts related to cloud services. For ease of understanding, the relevant concepts of the cloud services involved are introduced below.

[0041] Cloud services is a broad category that covers any service delivered over the Internet, rather than provided locally or on-premises. These services are typically provided on a pay-per-use or subscription basis, allowing users to access and use resources without owning or managing the underlying infrastructure.

[0042] Cloud services can be divided into three main models:

[0043] Software as a Service (SaaS): These are ready-to-use applications that are accessible over the internet. Examples include Gmail, Salesforce, and Microsoft Office 365. Users don’t have to manage anything, they just use the software.

[0044] Platform as a Service (PaaS): These services provide developers with a platform to build, deploy, and manage applications without having to manage the underlying infrastructure. Examples include Google App Engine, AWS Elastic Beanstalk, and Heroku. Developers focus on the code, and the platform handles the rest.

[0045] Infrastructure as a Service (IaaS): These services provide access to basic computing resources, such as virtual machines, storage, and networking. Examples include Amazon Web Services (AWS) EC2, Microsoft Azure Virtual Machines, and Google Compute Engine. Users have the most control here and can manage operating systems and applications.

[0046] Cloud computing: Cloud computing refers to the on-demand delivery of IT resources—everything from applications to data centers—over the Internet. It is the underlying technology and infrastructure that makes cloud services possible. It involves utilizing a network of remote servers hosted on the Internet to store, manage, and process data, rather than a local server or personal computer.

[0047] Key features of cloud computing: On-demand self-service: Users can provision resources as needed without manually interacting with each service provider. Broad network access: Resources are available over the network and accessed through standard mechanisms, facilitating the use of heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations). Resource pooling: Providers’ computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically allocated and reallocated based on consumer demand. Rapid elasticity: Capabilities can be provisioned elastically, and in some cases automatically, to scale out and in quickly based on demand. To consumers, the capabilities available for provisioning often appear unlimited and can be taken up at any time and in any quantity. Measured services: Cloud systems automatically control and optimize resource usage by leveraging metering capabilities at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency to both providers and consumers of the services being used.

[0048] Cloud storage: Cloud storage is a specific type of cloud service that allows users to store data on remote servers that are accessible via the internet. It is an integral part of cloud computing and falls under the category of IaaS. Instead of storing files on a local hard drive or storage device, users can save them to a remote data center managed by a third-party provider.

[0049] Advantages of cloud storage: Accessibility: Data can be accessed from anywhere with an internet connection. Scalability: Storage capacity can be easily increased or decreased as needed. Cost-effectiveness: Only pay for the storage you use, avoiding upfront hardware investments. Data backup and recovery: Data is often replicated on multiple servers, providing redundancy and preventing data loss. Collaboration: Files can be easily shared with others and collaborate on projects.

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] This application provides a solution for processing transactions on the cloud. By executing long transactions and short transactions in different containers, resource isolation is achieved to protect short transactions from being affected by long transactions. Even if long transactions exhaust resources and cause the container to crash, short transactions can still run normally to ensure business stability. It can also automatically expand capacity when long transaction resources are overloaded to improve fault tolerance and robustness. In addition, transactions are monitored in real time, long transaction lists are dynamically updated, and cache storage is used to speed up judgment, improve processing efficiency and reduce latency.

[0052] The present application solution can be implemented based on a terminal with transaction processing capabilities, which can be a mobile phone, computer, server, etc.

[0053] Next, combine Figure 1 The method for processing cloud transactions of the present application may include the following steps:

[0054] Step S100: Obtain a transaction request.

[0055] Specifically, a transaction request is received from a client or other system. The request may contain various information, such as transaction type, transaction data, user identity, etc. The receiving method may be HTTP request, message queue, etc.

[0056] Step S110: Acquire a long transaction list configured in the cache, and determine the type of the transaction request according to the long transaction list, wherein the long transaction list contains information of transaction requests of the long transaction type.

[0057] Specifically, obtain the long transaction list from the cache (such as Redis or Memcached). The cache can improve the access speed and avoid frequent access to the database. A hash table or other efficient data structure can be used to store the long transaction list. Compare the information of the current transaction request with the long transaction list. If a match is found in the long transaction list, the transaction request is determined to be a long transaction; otherwise, it is determined to be a short transaction.

[0058] Step S120: When the type of the transaction request is a short transaction, the transaction request is dispatched to a short transaction container space for execution.

[0059] Specifically, the short transaction container space is a resource pool dedicated to processing short transactions. The design of the short transaction container space can ensure that short transactions can be executed quickly.

[0060] Dispatching mechanism: A routing distribution device can be used to distribute short transactions to computing resources in the short transaction container space. The routing distribution device can apply a load balancing algorithm, such as common polling, random, least connection and other algorithms.

[0061] Step S130: When the transaction request is a long transaction, the transaction request is dispatched to the long transaction container space for execution. If a memory overflow occurs during the execution of the transaction request, an automatic expansion mechanism is triggered to increase the computing resources of the long transaction container space. The long transaction container space is isolated from the short transaction container space resources.

[0062] Specifically, similar to the short transaction container space, the long transaction container space is a resource pool dedicated to processing long transactions. Since long transactions usually require more resources and longer execution time, the design of the long transaction container space needs to consider the elastic scaling of resources. The resources of the long transaction container space and the short transaction container space are isolated to prevent long transactions from occupying too many resources and affecting the execution efficiency of short transactions. When memory overflow or other resource bottlenecks occur during the execution of long transactions, the automatic expansion mechanism can be triggered to dynamically increase the computing resources of the long transaction container space. The expansion mechanism can be based on preset thresholds or monitoring indicators.

[0063] Dispatch mechanism: Similar to short transactions, long transactions can be dispatched to different computing resources using a routing distribution device. Computing resources can include container instances or external storage.

[0064] One possible scenario is that in the actual transaction processing process, there may be a high concurrency scenario where multiple transaction requests are generated in a short period of time. When the type of transaction request is determined using the preset transaction request list, the determined transaction request can be stored in the message queue or cache to effectively buffer the transaction request and avoid overloading the routing distribution device. The message queue can ensure the reliable delivery of the transaction request even if the routing distribution device is temporarily unavailable. The routing distribution device can take out the determined transaction request from the message queue and dispatch it according to its own processing capacity to achieve flow control and load balancing.

[0065] Step S140: monitor the execution of the transaction request, and if the execution process of the transaction request meets the matching condition of the long transaction, update the transaction request to the long transaction list.

[0066] Specifically, the execution status of the transaction request is monitored in real time, such as execution time, resource consumption, etc. Matching conditions for long transactions can be defined, such as execution time exceeding a certain time threshold, involving a specific type of operation, and resource consumption exceeding a certain resource threshold. If the execution process of the transaction request meets the matching conditions of the long transaction, its information is updated to the long transaction list in the cache. This can ensure the timeliness and accuracy of the long transaction list. The update operation can consider concurrency control to avoid data inconsistency.

[0067] By efficiently acquiring and classifying transaction requests, the long transaction list in the cache is used to quickly determine the type of transaction, and the transaction request is dispatched to the corresponding resource isolation container space for execution according to the transaction type. For long transactions, the capacity is automatically expanded when resources are insufficient to ensure the smooth completion of the transaction. At the same time, the transaction execution is monitored in real time, and the long transaction list is dynamically updated to improve processing efficiency and stability.

[0068] The following embodiment of the present application introduces another implementation of the method for processing cloud transactions. Compared with the above embodiment, the following processing steps may be added before obtaining the transaction request in step 100:

[0069] Step S200: deploy the same image of the application into two sets of resource-isolated container spaces, where the two sets of resource-isolated space containers are respectively a short transaction container space and a long transaction container space, and the application is used to process the transaction request.

[0070] Specifically, two sets of resource-isolated container spaces are used to process short transactions and long transactions respectively. This can be achieved through container orchestration platforms (such as Kubernetes) or container runtimes (such as Docker). Resource isolation ensures that different types of transactions do not interfere with each other.

[0071] The application image contains all the dependencies and configurations required to process transaction requests. The image can be built using tools such as Docker. The same application image is deployed in both the short transaction container space and the long transaction container space, which ensures that the two container spaces run the same application logic. Deployment can be achieved through the deployment function of the container platform.

[0072] Step S210: Allocate computing resources to the short transaction container space and the long transaction container space respectively.

[0073] Specifically, the short transaction container space has computing resources configured according to the estimated short transaction load, including container instances or external storage, etc. The resource allocation strategy can be adjusted according to the actual situation. For example, a certain amount of resource redundancy can be reserved to cope with sudden traffic.

[0074] Similarly, the long transaction container space has computing resources allocated according to the estimated long transaction load. Since long transactions usually require more resources and longer execution time, more computing resources can be allocated to ensure the smooth execution of long transactions. Similarly, the resource allocation strategy can be adjusted according to the actual situation, and the elastic scaling mechanism can be considered to dynamically adjust resources.

[0075] This embodiment executes long transactions and short transactions in different container spaces to ensure that they do not interfere with each other, thereby improving stability. The same application image is deployed in two resource-isolated container spaces to process long and short transactions, ensuring consistency in processing logic.

[0076] The following embodiment introduces another implementation of the method for processing cloud transactions. Compared with the above embodiment, the following processing steps may be added before obtaining the transaction request in step 100:

[0077] Step S300: Create a blank long transaction list in the cache.

[0078] Specifically, create an empty list or set in the cache to store long transaction information. This ensures that the long transaction list can be accessed and updated in subsequent steps. You can use data structures such as Redis list, set, or hash, or other cache systems such as Memcached.

[0079] Step S310: manually marking the long transaction information and / or marking the long transaction information through a configuration file or an environment variable, and adding the long transaction information to the long transaction list, wherein the long transaction information includes an identifier of the long transaction.

[0080] Specifically, long transaction information is manually added to the long transaction list through the management interface or other tools. This is suitable for scenarios that require manual intervention, such as the launch of new services or special case handling. Manual marking needs to ensure the accuracy and consistency of operations.

[0081] By defining long transaction information through configuration files (such as YAML, JSON) or environment variables, this information can be loaded into the long transaction list when the application starts. This method is more flexible, easier to automate, and more suitable for version control and management. The identification information of long transactions uniquely identifies different long transactions and is used for subsequent transaction request type determination.

[0082] By creating a long transaction list through manual tagging and configuration files / environment variables, long transaction information can be managed more flexibly and the degree of automation can be increased. This also helps improve maintainability and scalability.

[0083] The following embodiments involve multi-threaded processing of long transactions.

[0084] In addition to the long transaction identifier, the long transaction information also needs to add a multi-threaded processing identifier to indicate whether the long transaction requires multi-threaded processing. For example, a Boolean value of true or false can be used to indicate whether multi-threaded processing is required. This identifier can be set by manual marking, configuration files, or environment variables.

[0085] When the transaction request type is a long transaction, it is determined whether the long transaction requires multi-thread processing according to the long transaction information. If so, the transaction request is assigned to a long transaction container space and the transaction request is marked for multi-thread execution.

[0086] Specifically, the multi-threaded processing flag of the transaction is obtained from the long transaction list. If it is multi-threaded, the transaction request can be dispatched to the long transaction container space, and a flag can be set to indicate that the transaction needs to be multi-threaded. This flag can be passed to the application that executes the transaction, such as through the header of the message queue or the parameters of the request. If it is not multi-threaded, the transaction request can be dispatched to the long transaction container space without setting the multi-threaded flag. The application will process the transaction in the default single-threaded manner. Regardless of whether the long transaction is multi-threaded, the long transaction container space is isolated from the short transaction container space resources and supports automatic expansion.

[0087] Through these extensions, the method can more finely control the execution of long transactions and make full use of the advantages of multi-threading to improve processing efficiency. At the same time, it still maintains the characteristics of resource isolation and automatic expansion, ensuring stability and scalability.

[0088] Further, the present application can be based on the method described in the above embodiment, referring to Figure 2 , a scenario diagram illustrating a method for processing transactions on the cloud.

[0089] like Figure 2 As shown, first, a transaction request is obtained. The transaction request may come from a client or other system and may include information such as transaction type, data, and user identity.

[0090] Next, determine the type of transaction request. The determination result can be divided into two cases. One case is that the type of transaction request is a short transaction, and the other case is that the type of transaction request is a long transaction. During the specific determination process, you can refer to the long transaction list configured in the cache. The long transaction list can be established in advance and stored in the cache.

[0091] If the transaction request type is a short transaction, the transaction request is dispatched to the short transaction container space for execution. If the transaction request type is a long transaction, the transaction request is dispatched to the long transaction container space for execution. In addition, if the long transaction information indicates that the current long transaction requires multi-threaded processing, the long transaction is marked for multi-threaded execution while being dispatched to the long transaction container space. The application will process transactions in a multi-threaded manner based on this mark to improve efficiency. The long transaction container space is isolated from the short transaction container space resources and both are equipped with computing resources. In general, since long transactions consume more computing resources than short transactions, the computing resources equipped in the long transaction container space can be more than those in the short transaction container space.

[0092] The long transaction container space supports automatic expansion. If resource bottlenecks such as memory overflow occur during execution, computing resources will be automatically increased.

[0093] During the execution of a transaction request, it can be monitored whether it meets the matching conditions of a long transaction. If it does, its information is updated to the long transaction list in the cache. This can ensure the timeliness and accuracy of the long transaction list.

[0094] The following is a description of the on-cloud transaction processing device provided in an embodiment of the present application. The on-cloud transaction processing device described below and the on-cloud transaction processing method described above can be referenced to each other.

[0095] See also Figure 3 , Figure 3 A schematic diagram of the structure of a cloud transaction processing device disclosed in an embodiment of the present application.

[0096] like Figure 3 As shown, the device may include:

[0097] A transaction request acquisition unit 11, used to acquire a transaction request;

[0098] A long transaction list acquisition unit 12 is used to acquire a long transaction list configured in a cache, and determine the type of the transaction request according to the long transaction list, wherein the long transaction list contains information of transaction requests of the long transaction type;

[0099] A short transaction request processing unit 13, configured to dispatch the transaction request to a short transaction container space for execution when the transaction request is a short transaction;

[0100] The long transaction request processing unit 14 is used to dispatch the transaction request to the long transaction container space for execution when the transaction request is a long transaction. If a memory overflow occurs during the execution of the transaction request, an automatic expansion mechanism is triggered to increase the computing resources of the long transaction container space. The long transaction container space is isolated from the short transaction container space resources.

[0101] The transaction request monitoring unit 15 is used to monitor the execution of the transaction request, and if the execution process of the transaction request meets the matching condition of the long transaction, update the transaction request to the long transaction list.

[0102] Optionally, the device of the present application may further include:

[0103] An image application deployment unit, used to deploy the same image of the application into two sets of resource-isolated container spaces, wherein the two sets of resource-isolated space containers are respectively a short transaction container space and a long transaction container space, and the application is used to process the transaction request;

[0104] The resource allocation unit is used to allocate computing resources to the short transaction container space and the long transaction container space respectively.

[0105] Optionally, the device further comprises:

[0106] The long transaction list establishing unit is used to establish a blank long transaction list in the cache; by manually marking the long transaction information, and / or marking the long transaction information through a configuration file or an environment variable, the long transaction information is added to the long transaction list, and the long transaction information includes an identifier of the long transaction.

[0107] Optionally, the long transaction information also includes: a multi-threaded processing identifier, used to indicate whether the long transaction requires multi-threaded processing.

[0108] Optionally, when the transaction request type is a long transaction, the long transaction request processing unit 14 dispatches the transaction request to the long transaction container space for execution, including:

[0109] When the transaction request type is a long transaction, it is determined whether the long transaction requires multi-thread processing according to the long transaction information. If so, the transaction request is assigned to a long transaction container space and the transaction request is marked for multi-thread execution.

[0110] Optionally, the matching conditions of the long transaction include:

[0111] The transaction time of the transaction request exceeds a first time threshold, and / or the resource consumption of the transaction request exceeds a second resource consumption threshold.

[0112] Optionally, the matching condition of the long transaction includes: the transaction time of the transaction request exceeds a first time threshold, and / or the resource consumption of the transaction request exceeds a second resource consumption threshold.

[0113] The cloud transaction processing device provided in the embodiment of the present application can be applied to cloud transaction processing devices, such as mobile phones, computers, servers, etc. Optionally, Figure 4The hardware structure diagram of the cloud transaction processing device is shown in FIG. Figure 4 , the hardware structure of the device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0114] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0115] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0116] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;

[0117] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0118] Get transaction request;

[0119] Acquire a long transaction list configured in a cache, and determine the type of the transaction request according to the long transaction list, wherein the long transaction list includes information of transaction requests of the long transaction type;

[0120] When the type of the transaction request is a short transaction, the transaction request is dispatched to the short transaction container space for execution;

[0121] When the type of the transaction request is a long transaction, the transaction request is dispatched to the long transaction container space for execution. If a memory overflow occurs during the execution of the transaction request, an automatic capacity expansion mechanism is triggered to increase the computing resources of the long transaction container space. The long transaction container space is isolated from the short transaction container space resources.

[0122] The execution of the transaction request is monitored, and if the execution process of the transaction request meets the matching condition of the long transaction, the transaction request is updated to the long transaction list.

[0123] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0124] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0125] Get transaction request;

[0126] Acquire a long transaction list configured in a cache, and determine the type of the transaction request according to the long transaction list, wherein the long transaction list includes information of transaction requests of the long transaction type;

[0127] When the type of the transaction request is a short transaction, the transaction request is dispatched to the short transaction container space for execution;

[0128] When the type of the transaction request is a long transaction, the transaction request is dispatched to the long transaction container space for execution. If a memory overflow occurs during the execution of the transaction request, an automatic capacity expansion mechanism is triggered to increase the computing resources of the long transaction container space. The long transaction container space is isolated from the short transaction container space resources.

[0129] The execution of the transaction request is monitored, and if the execution process of the transaction request meets the matching condition of the long transaction, the transaction request is updated to the long transaction list.

[0130] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0131] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0132] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0133] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing transactions on the cloud, characterized in that: include: Get transaction request; Acquire a long transaction list configured in a cache, and determine the type of the transaction request according to the long transaction list, wherein the long transaction list includes information of transaction requests of the long transaction type; When the type of the transaction request is a short transaction, the transaction request is dispatched to the short transaction container space for execution; When the type of the transaction request is a long transaction, the transaction request is dispatched to the long transaction container space for execution. If a memory overflow occurs during the execution of the transaction request, an automatic capacity expansion mechanism is triggered to increase the computing resources of the long transaction container space. The long transaction container space is isolated from the short transaction container space resources. The execution of the transaction request is monitored, and if the execution process of the transaction request meets the matching condition of the long transaction, the transaction request is updated to the long transaction list.

2. The method according to claim 1, characterized in that Before obtaining the transaction request, the method further includes: Deploy the same image of the application into two sets of resource-isolated container spaces, where the two sets of resource-isolated space containers are respectively a short transaction container space and a long transaction container space, and the application is used to process the transaction request; Computing resources are allocated to the short transaction container space and the long transaction container space respectively.

3. The method according to claim 1, characterized in that Before obtaining the transaction request, the method further includes: Create a long list of empty transactions in the cache; The long transaction information is added to the long transaction list by manually marking the long transaction information and / or marking the long transaction information through a configuration file or an environment variable, wherein the long transaction information includes an identifier of the long transaction.

4. The method according to claim 3, characterized in that The long transaction information also includes: The multi-thread processing flag is used to indicate whether the long transaction requires multi-thread processing.

5. The method according to claim 4, characterized in that When the transaction request type is a long transaction, dispatching the transaction request to a long transaction container space for execution includes: When the transaction request type is a long transaction, it is determined whether the long transaction requires multi-thread processing according to the long transaction information. If so, the transaction request is assigned to a long transaction container space and the transaction request is marked for multi-thread execution.

6. The method according to claim 1, characterized in that The matching conditions of the long transaction include: The transaction time of the transaction request exceeds a first time threshold, and / or the resource consumption of the transaction request exceeds a second resource consumption threshold.

7. The method according to any one of claims 1 to 6, characterized in that The computing resources include: Container instance or external storage.

8. A cloud transaction processing device, characterized in that: include: A transaction request acquisition unit, used for acquiring a transaction request; a long transaction list acquisition unit, configured to acquire a long transaction list configured in a cache, and determine the type of the transaction request according to the long transaction list, wherein the long transaction list contains information of transaction requests of the long transaction type; A short transaction request processing unit, configured to dispatch the transaction request to a short transaction container space for execution when the transaction request is a short transaction; A long transaction request processing unit, for dispatching the transaction request to the long transaction container space for execution when the transaction request is a long transaction, and triggering an automatic capacity expansion mechanism to increase computing resources of the long transaction container space if a memory overflow occurs during the execution of the transaction request, so that the long transaction container space is isolated from the short transaction container space resources; The transaction request monitoring unit is used to monitor the execution of the transaction request, and if the execution process of the transaction request meets the matching condition of the long transaction, update the transaction request to the long transaction list.

9. A cloud transaction processing device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the method for processing cloud transactions as described in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method for processing cloud transactions as described in any one of claims 1 to 7 is implemented.