Database generation method, management method and device for distributed objects
By setting up an interceptor to generate the database in a cloud-native environment, the transaction consistency problem caused by microservice link anomalies was solved, the observability and monitoring of the transaction link were realized, and the stability and reliability of transactions were ensured.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2022-03-04
- Publication Date
- 2026-05-01
AI Technical Summary
In cloud-native environments, when microservice links fail, retry mechanisms cannot ensure transaction consistency, and it is difficult to monitor and determine the transaction status.
By setting interceptors in the components of a distributed object, container resource request requests and event data are intercepted, a database is generated, and the database of the distributed object is updated based on this data, thus enabling the observability and monitoring of the transaction chain.
It solves the transaction consistency problem caused by microservice link anomalies in cloud-native environments, realizes the observability and monitoring of transaction links, and ensures the stability and reliability of transactions.
Smart Images

Figure CN114625717B_ABST
Abstract
Description
Database generation method, management method and apparatus for distributed objects Technical Field
[0001] This disclosure relates to the field of cloud computing technology, and can be applied to the field of financial technology. More specifically, it relates to a database generation method, a management method for distributed objects, an apparatus, an electronic device, a storage medium, and a program product. Background Technology
[0002] Currently, the architecture solutions across various industries generally adopt a hybrid cloud approach, namely a stable (private cloud) + agile (public cloud) architecture, to accommodate both core transaction systems and upper-layer applications. The stable technology stack typically deploys monolithic applications on physical machines or virtual machines, achieving high availability through hardware redundancy. Prioritizing stability and security, it gradually and systematically promotes distributed technology transformation, but the use of cloud-native technologies is still in its early stages of exploration.
[0003] In existing cloud-native environments, if anomalies occur in some microservice chains, transaction consistency cannot be ensured through retry mechanisms. Furthermore, due to the second-level creation or destruction of containers, administrators find it difficult to effectively observe microservice chains; from the outside, they appear chaotic, making it impossible to monitor the transaction process or determine the transaction status. Summary of the Invention
[0004] In view of the above problems, this disclosure provides database generation methods, devices, equipment, media and program products to improve the efficiency of government service processing.
[0005] According to a first aspect of this disclosure, a database generation method is provided, comprising: setting an interceptor for at least one component in a distributed object to obtain at least one interceptor; wherein the interceptor is configured to intercept a container resource request sent by an application layer SaaS to a platform layer PaaS and to receive data information of an event corresponding to the container resource request in the platform layer PaaS; and generating a database corresponding to the distributed object in response to the container resource request and the event data information received by the at least one interceptor.
[0006] According to embodiments of this disclosure, the container resource request includes one or more of a container destruction event and a container creation event; the method further includes: responding to received data information corresponding to a container destruction event, and / or data information corresponding to a container creation event; and updating the database corresponding to the distributed object based on the data information corresponding to the container destruction event, and / or data information corresponding to the container creation event.
[0007] A second aspect of this disclosure provides a method for managing distributed objects, comprising: sending a query request to a database; and, in response to receiving data information corresponding to the query request, managing the distributed objects based on the data information; wherein the database is generated according to the method provided in this disclosure.
[0008] According to embodiments of this disclosure, the query request includes: querying the transaction status of a distributed object; wherein, in response to receiving data information corresponding to the query request, managing the distributed object based on the data information includes: determining the event processing progress corresponding to each component based on the data information; determining whether the transaction status of the distributed object is incomplete based on the event processing progress corresponding to each component; and, if the transaction status of the distributed object is incomplete, sending a container resource processing strategy to the application layer SaaS; the container resource processing strategy includes instructing the application layer SaaS to send a container resource request corresponding to rejecting the destruction of the container to the platform layer PaaS.
[0009] A third aspect of this disclosure provides a database generation apparatus, comprising: an interceptor setting module for setting interceptors for at least one component in a distributed object to obtain at least one interceptor; wherein the interceptor is used to intercept container resource request requests sent by an application layer SaaS to a platform layer PaaS and to receive data information of events corresponding to the container resource request in the platform layer PaaS; and a generation module for generating a database corresponding to the distributed object in response to the container resource request and the event data information received by the at least one interceptor.
[0010] According to embodiments of this disclosure, the container resource request includes one or more of a container destruction event and a container creation event; the apparatus further includes: a first receiving module, configured to respond to received data information corresponding to a container destruction event, and / or data information corresponding to a container creation event; and an updating module, configured to update the database corresponding to the distributed object based on the data information corresponding to the container destruction event, and / or data information corresponding to the container creation event.
[0011] A fourth aspect of this disclosure provides a management apparatus for distributed objects, comprising: a sending module for sending a query request to a database; and a second receiving module for managing distributed objects based on data information corresponding to the query request, in response to receiving such data; wherein the database is generated according to the apparatus provided in this disclosure.
[0012] A fifth aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the methods disclosed above.
[0013] A sixth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the methods disclosed above.
[0014] A seventh aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the methods disclosed above. Attached Figure Description
[0015] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0016] Figure 1 schematically illustrates an application scenario of a database generation method, a management method for distributed objects, an apparatus, a device, a medium, and a program product according to embodiments of the present disclosure.
[0017] Figure 2 schematically illustrates a flowchart of a database generation method according to an embodiment of the present disclosure;
[0018] Figure 3 schematically illustrates a diagram of receiving data information of container resource request and event according to an embodiment of the present disclosure;
[0019] Figure 4 schematically illustrates a flowchart of a method for managing distributed objects according to an embodiment of the present disclosure;
[0020] Figure 5 schematically illustrates the execution of output data information according to an embodiment of the present disclosure;
[0021] Figure 6 schematically illustrates a structural block diagram of a database generation apparatus according to an embodiment of the present disclosure;
[0022] Figure 7 schematically illustrates a structural block diagram of a management device for distributed objects according to an embodiment of the present disclosure; and
[0023] Figure 8 schematically illustrates a block diagram of an electronic device suitable for implementing a database generation method and / or a management method for distributed objects according to embodiments of the present disclosure. Detailed Implementation
[0024] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0027] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0028] The embodiments of this disclosure provide a database generation method and apparatus, wherein an interceptor is set for at least one component in a distributed object to obtain at least one interceptor; wherein the interceptor is used to intercept container resource request requests sent by the application layer SaaS to the platform layer PaaS and to receive data information of events corresponding to the container resource request requests in the platform layer PaaS; and in response to the container resource request requests and event data information received by the at least one interceptor, a database corresponding to the distributed object is generated.
[0029] Figure 1 schematically illustrates an application scenario of a database generation method, a management method for distributed objects, an apparatus, a device, a medium, and a program product according to embodiments of the present disclosure.
[0030] As shown in Figure 1, the application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0031] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0032] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0033] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0034] It should be noted that the database generation method and / or the distributed object management method provided in this disclosure embodiment can generally be executed by server 105. Correspondingly, the database generation device and / or the distributed object management device provided in this disclosure embodiment can generally be located in server 105. The database generation method and / or the distributed object management method provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the database generation device and / or the distributed object management device provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.
[0035] It should be understood that the number of terminal devices, networks, and servers shown in Figure 1 is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0036] The database generation method of the disclosed embodiment will be described in detail below based on the scenario described in Figure 1 and with reference to Figure 2.
[0037] To better understand this disclosure, some terms mentioned herein are explained below.
[0038] Cloud-native: Cloud-native technologies enable organizations to build and run elastically scalable applications in new and dynamic environments such as public, private, and hybrid clouds. Representative cloud-native technologies include containers, service meshes, microservices, immutable infrastructure, and declarative APIs.
[0039] Infrastructure as a Service (IaaS) at the foundational layer; Platform as a Service (PaaS) at the platform layer; Software as a Service (SaaS) at the application layer.
[0040] Container: A process or a group of processes that are isolated from the rest of the system.
[0041] Microservices: A single application is developed as a microservice, with each microservice running in its own process and communicating using lightweight mechanisms, typically HTTP RESTful APIs. These services are built around business capabilities and deployed independently through fully automated deployment mechanisms. These services can use different programming languages and different data storage technologies to ensure minimal centralized management.
[0042] Figure 2 schematically illustrates a flowchart of a database generation method according to an embodiment of the present disclosure.
[0043] As shown in Figure 2, this embodiment includes operations S210 to S220, and the database generation method can be executed by a server.
[0044] In operation S210, an interceptor is set for at least one component in the distributed object to obtain at least one interceptor; wherein, the interceptor is used to intercept the container resource request sent by the application layer SaaS to the platform layer PaaS and to receive the data information of the container processing in the platform layer PaaS corresponding to the container resource request.
[0045] In operation S220, in response to the container resource request and event data information received by at least one interceptor, a database corresponding to the distributed object is generated.
[0046] Cloud computing architecture is revolutionizing software development by deploying different layers of physical resources, platforms, and services to the cloud, allowing developers to focus on the core of their business and achieve rapid delivery. Cloud-native applications typically employ technologies such as containers and microservices, which involve distributed and elastic deployment. However, this approach significantly increases operational risks for critical applications in traditional industries (such as banking and other financial sectors), making end-to-end monitoring and maintenance more complex.
[0047] This embodiment achieves at least one interceptor by setting up an interceptor, such as setting an interceptor for at least one component in a distributed object. This interceptor can be used to intercept container resource request requests sent from the application-layer SaaS to the platform-layer PaaS and to receive data information from the platform-layer PaaS regarding events corresponding to these requests. Thus, an application-aware platform, independent of the infrastructure layer IaaS, platform-layer PaaS, and application-layer SaaS architecture, is established based on this at least one interceptor. The interceptor acts as an observer in the native environment, recording the received container resource request requests and event data, and generating a database corresponding to the distributed object. Since this database records all interactions between the application-layer SaaS and platform-layer PaaS, users can retrieve, query, and manage the data stored in the database when they have query needs, achieving observability of the transaction chain.
[0048] For example, this interceptor can intercept various events from containers, middleware, applications, and other systems, filter the intercepted data to obtain valid status information, such as database transactions (including container resource request and event data). This generates a database to assist the monitoring system in tracing and simplifies operations and maintenance.
[0049] The database generation method provided in this embodiment first sets an interceptor for at least one component in the distributed object, resulting in at least one interceptor. This interceptor acts as an observer to record the interaction process between the application layer SaaS and the platform layer PaaS, specifically intercepting container resource request requests sent by the application layer SaaS to the platform layer PaaS and receiving data information from the platform layer PaaS regarding events corresponding to container resource request requests. This request and data information are then used to construct a database, providing a data foundation for user queries. For example, when a user has a query need, the database can be retrieved, queried, and managed, enabling observability of the transaction chain.
[0050] The container resource request includes one or more of a container destruction event and a container creation event; the database generation method further includes: responding to received data information corresponding to the container destruction event, and / or data information corresponding to the container creation event; and updating the database corresponding to the distributed object based on the data information corresponding to the container destruction event, and / or data information corresponding to the container creation event.
[0051] In a cloud-native environment, based on a three-tier cloud computing architecture (Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Application as a Service (SaaS), all infrastructure resources are deployed to the platform layer in container form. The platform layer handles application layer resource requests and may include runtime environments (such as Java Virtual Machines), database / middleware connection pools, etc. The application layer does not need to know the details of resource allocation and can also be decomposed into microservices. These services can call each other through REST APIs (application interfaces that follow REST architecture specifications) to execute related services (such as atomic operations required for core transactions, like A→B transfers, including deductions from A and additions to B). These services run on different container instances and are ultimately submitted based on a distributed transaction (i.e., distributed object) scheme.
[0052] Figure 3 schematically illustrates a diagram of receiving data information of container resource request requests and events according to an embodiment of the present disclosure. Referring to Figure 3, in the application layer 310, for a distributed object, the link from transaction initiation to transaction completion includes multiple nodes, each node corresponding to a component (component 1, component 2... component n). Container resource request requests initiated by multiple components in the application layer are processed by the platform layer 330 for events corresponding to the container resource request requests. To solve the problem of unobservable transaction records, an application-aware platform 320 can be set between the application layer 310 and the platform layer 330. The application-aware platform 320 includes one or more interceptors, which correspond to components or container pools and are used to record the interaction records between the corresponding components and container pools.
[0053] For example, by deploying an application-aware platform independently in a cloud-native environment, all resource access requests, including one or more container destruction and creation events, are intercepted and recorded locally (including multi-level storage such as cache, database, and files), generating a database corresponding to the distributed object. Simultaneously, a global transaction serial number and container number mapping table is maintained, and the database corresponding to the distributed object is queried or updated with each resource request event. To provide a unified query service to various monitoring systems, data information in the database (such as container event processing records) can be converted into link monitoring data according to a standard format, allowing users to complete the adaptation and integration.
[0054] The implementation of interceptors and application-aware platforms can support multiple technology stacks such as C++, J2EE, and Go. The platform features mainly consider supporting high concurrency, loose coupling, and microservice architecture. It publishes to upstream systems through REST standard interfaces and is compatible with mainstream communication protocols at the platform layer.
[0055] The database generation method provided in this embodiment can respond to received data information corresponding to container destruction events and / or data information corresponding to container creation events; and update the database corresponding to distributed objects based on the data information corresponding to container destruction events and / or data information corresponding to container creation events, so as to facilitate users to monitor container destruction events and / or container creation events, and solve the uncertainty caused by dynamic changes of containers to distributed objects.
[0056] Figure 4 schematically illustrates a flowchart of a method for managing distributed objects according to an embodiment of the present disclosure.
[0057] As shown in Figure 4, this embodiment includes operations S410 to S420, and the management method for distributed objects can be executed by a server.
[0058] In operation 410, a query request is sent to the database.
[0059] In operation 420, in response to receiving data information corresponding to the query request, the distributed object is managed based on the data information.
[0060] Understandably, the database is constructed according to the methods provided in this disclosure.
[0061] Understandably, when users have query needs, they can retrieve, query, and manage the data stored in the database to achieve observability of the transaction chain. The data in the database provides a basis for decision-making in managing distributed objects.
[0062] Figure 5 schematically illustrates the execution of output data information according to an embodiment of the present disclosure. Referring to Figure 5, a user generates a query request through client 510, such as querying the transaction status of a distributed object, or querying which container resource request requests component 1 has sent; client 510 sends the query request to server 520, and server 520 responds to the query request; for example, the query of the transaction status of a distributed object is sent to the management device for the distributed object. Accordingly, after receiving the data information corresponding to the query request, the management device for the distributed object determines the corresponding data information in the database, that is, obtains the query result; and then sends the query result (data information) to client 510, so that client 510 manages the distributed object according to the data information.
[0063] The distributed object management method provided in this embodiment utilizes a database generated from container resource request and event data to provide data information for user query needs, enabling users to manage distributed objects based on the data information.
[0064] The query request includes querying the transaction status of a distributed object; wherein, in response to receiving data information corresponding to the query request, the distributed object is managed based on the data information, including: determining the event processing progress corresponding to each component based on the data information; determining whether the transaction status of the distributed object is incomplete based on the event processing progress corresponding to each component; and sending a container resource processing policy to the application layer SaaS when the transaction status of the distributed object is incomplete. The container resource processing policy includes instructing the application layer SaaS to send a container resource request corresponding to the rejection of container destruction to the platform layer PaaS.
[0065] Understandably, due to the second-level creation or destruction characteristics of containers, if an anomaly occurs in some microservice chains (affected by complex factors such as system, network, and high concurrency), the original worker nodes may have been reclaimed, while new nodes may be added. In this case, if the transaction model is 2PC (two-phase commit) or 3PC (three-phase commit), it will be difficult to confirm whether the destroyed node has committed its local transaction, and the application has a certain probability that it cannot ensure transaction consistency through the retry mechanism.
[0066] In this embodiment, for example, the resource processing strategy is determined by judging whether the current transaction status has been completed. If it has not been completed, even if only the last link in the chain remains, the request to destroy the container will still be rejected, so that the container will not be destroyed and stability and reliability will be maintained.
[0067] The distributed object management method provided in this embodiment solves the consistency problem in the chain (such as the fund transaction chain) in the complex and ever-changing cloud-native environment by instructing the application layer SaaS to send a container resource request corresponding to the rejection of container destruction to the platform layer PaaS. This avoids the problem that transaction consistency cannot be ensured through retry mechanism when anomalies occur in some microservice chains.
[0068] Figure 6 schematically illustrates a structural block diagram of a database generation apparatus according to an embodiment of the present disclosure.
[0069] As shown in Figure 6, the database generation device 600 of this embodiment includes an interceptor setting module 610 and a generation module 620.
[0070] The interceptor module 610 is used to set interceptors for at least one component in the distributed object, thereby obtaining at least one interceptor; wherein the interceptor is used to intercept container resource request requests sent by the application layer SaaS to the platform layer PaaS and to receive data information of the container processing in the platform layer PaaS corresponding to the container resource request; and the generation module 620 is used to generate a database corresponding to the distributed object in response to the container resource request and the data information of the event received by the at least one interceptor.
[0071] In some embodiments, the container resource request includes one or more of a container destruction event and a container creation event; the apparatus further includes: a first receiving module, configured to respond to received data information corresponding to a container destruction event and / or data information corresponding to a container creation event; and an updating module, configured to update the database corresponding to the distributed object based on the data information corresponding to the container destruction event and / or the data information corresponding to the container creation event.
[0072] According to embodiments of this disclosure, any plurality of modules in the setting interceptor module 610 and the generation module 620 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules can be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the setting interceptor module 610 and the generation module 620 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the setting interceptor module 610 and the generation module 620 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0073] Figure 7 schematically illustrates a structural block diagram of a management device for distributed objects according to an embodiment of the present disclosure.
[0074] As shown in FIG7, the management device 700 for distributed objects in this embodiment includes a sending module 710 and a second receiving module 720.
[0075] The sending module 710 is used to send a query request to the database; and the second receiving module 720 is used to manage distributed objects based on the data information received in response to the query request.
[0076] For example, the database is constructed based on the apparatus shown in Figure 6.
[0077] In some embodiments, the query request includes: querying the transaction status of a distributed object; a second receiving module is configured to: determine the event processing progress corresponding to each component based on the data information; determine whether the transaction status of the distributed object is incomplete based on the event processing progress corresponding to each component; and, if the transaction status of the distributed object is incomplete, send a container resource processing strategy to the application layer SaaS; the container resource processing strategy includes instructing the application layer SaaS to send a container resource request corresponding to rejecting the destruction of the container to the platform layer PaaS.
[0078] According to embodiments of this disclosure, any plurality of modules in the transmitting module 710 and the receiving module 720 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the transmitting module 710 and the receiving module 720 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the transmitting module 710 and the receiving module 720 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0079] Figure 8 schematically illustrates a block diagram of an electronic device suitable for implementing a database generation method and / or a management method for distributed objects according to embodiments of the present disclosure.
[0080] As shown in FIG8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0081] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0082] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0083] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0084] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0085] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the database generation method and the distributed object management method provided in the embodiments of this disclosure.
[0086] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0087] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0088] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by processor 801, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0089] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0090] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0091] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0092] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A database generation method, comprising: At least one interceptor is set for at least one component in a distributed object, resulting in at least one interceptor. The interceptor is used to intercept container resource request requests sent from the application layer SaaS to the platform layer PaaS and to receive data information from the platform layer PaaS regarding events corresponding to the container resource request requests. In response to the at least one interceptor receiving the container resource request request and the event data information, a database corresponding to the distributed object is generated. The distributed object includes multiple nodes on a transaction initiation-to-completion chain, each node corresponding to a component. The database provides observability of the transaction chain. The container resource request includes a container destruction event. The database, upon receiving a query request, returns data information. The query request includes querying the transaction status of the distributed object. The data information is used to determine the event processing progress corresponding to each component and, based on the event processing progress, to determine whether the distributed object transaction status is incomplete. If the distributed object transaction status is incomplete, a container resource processing strategy is sent to the application layer SaaS. The container resource processing strategy includes instructing the application layer SaaS to send a container resource request to the platform layer PaaS corresponding to rejecting container destruction, so that the container is prevented from being destroyed if the transaction status remains in the final stage of the chain.
2. The method according to claim 1, wherein the container resource request further includes a container creation event; the method further includes: In response to received data information corresponding to a container destruction event, and / or data information corresponding to a container creation event; And based on the data information corresponding to the container destruction event, and / or the data information corresponding to the container creation event, update the database corresponding to the distributed object.
3. A method for managing distributed objects, comprising: A query request is sent to the database, the query request including: querying the transaction status of a distributed object, the distributed object including multiple nodes on the chain from transaction initiation to transaction completion, each node corresponding to a component, the database providing observability of the transaction chain; in response to receiving data information corresponding to the query request, managing the distributed object according to the data information, including: determining the event processing progress corresponding to each component according to the data information; determining whether the transaction status of the distributed object is incomplete based on the event processing progress corresponding to each component; if the transaction status of the distributed object is incomplete, sending a container resource processing strategy to the application layer SaaS; the container resource processing strategy includes instructing the application layer SaaS to send a container resource request corresponding to rejecting container destruction to the platform layer PaaS, so as to prevent the container from being destroyed in the last link of the remaining transaction status chain; wherein, the database is generated according to the method according to claim 1 or 2.
4. A database generation apparatus, comprising: An interceptor module is configured to set interceptors for at least one component in a distributed object, resulting in at least one interceptor. The interceptor is used to intercept container resource request requests sent from the application layer (SaaS) to the platform layer (PaaS) and to receive data information from the PaaS regarding events corresponding to the container resource request requests. A generation module is also configured to, in response to the at least one interceptor receiving the container resource request and the event data information, generate a database corresponding to the distributed object. The distributed object includes multiple nodes along a transaction initiation-to-completion chain, each node corresponding to a component. The database provides observability functionality for the transaction chain. The container resource request includes a container destruction event. The database is used to return data information upon receiving a query request. The query request includes querying the transaction status of a distributed object. The data information is used to determine the event processing progress corresponding to each component and to determine whether the transaction status of the distributed object is incomplete based on the event processing progress. If the transaction status of the distributed object is incomplete, a container resource processing strategy is sent to the application layer SaaS. The container resource processing strategy includes instructing the application layer SaaS to send a container resource request corresponding to rejecting container destruction to the platform layer PaaS, so that the container can be prevented from being destroyed if the transaction status is in the final link of the remaining chain.
5. The apparatus of claim 4, wherein the container resource request further includes a container creation event; the apparatus further includes: The first receiving module is used to respond to the received data information corresponding to the container destruction event, and / or the data information corresponding to the container creation event; And an update module, used to update the database corresponding to the distributed object based on data information corresponding to the container destruction event, and / or data information corresponding to the container creation event.
6. A management device for distributed objects, comprising: A sending module is used to send a query request to a database, the query request including: querying the transaction status of a distributed object, the distributed object including multiple nodes on the link from transaction initiation to transaction completion, each node corresponding to a component, the database providing observability of the transaction link; and a second receiving module is used to manage the distributed object according to the data information received in response to the query request, including: determining the event processing progress corresponding to each component according to the data information; determining whether the transaction status of the distributed object is incomplete based on the event processing progress corresponding to each component; and sending a container resource processing strategy to the application layer SaaS when the transaction status of the distributed object is incomplete; the container resource processing strategy includes instructing the application layer SaaS to send a container resource request corresponding to rejecting container destruction to the platform layer PaaS, so as to prevent the container from being destroyed when the transaction status is in the final link; wherein, the database is generated by the device according to claim 4 or 5.
7. An electronic device, comprising: One or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method according to any one of claims 1 to 3.
8. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 3.
9. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Interface log storage method and device, computer equipment and storage medium
CN108804644A
Container log query method and device
CN110287154A