Database business processing method and device

By obtaining the target database business model and the executable unit with the minimum granularity, and orchestrating the target database business configuration file, the problem of automatic allocation of system resources and business parameters in the database business is solved, and allocation efficiency and accuracy are improved.

CN114090541BActive Publication Date: 2025-03-07ALIBABA CLOUD COMPUTING CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111204071.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-03-07
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively allocate system resources and business parameters in database services, resulting in errors that are prone to occur during the allocation process, and the utilization efficiency of system resources and business parameters is not high.

Method used

By obtaining the target database business model corresponding to the target database business, obtaining the minimum granularity executable unit, and orchestrating the target database business configuration file according to the business requirements, to achieve automatic allocation of system resources and business parameters required by the target database business.

Benefits of technology

Automatic allocation of system resources and business parameters required for target database services is realized, reducing the chance of errors in the allocation process, and improving the utilization efficiency of system resources and business parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090541B_ABST
    Figure CN114090541B_ABST
Patent Text Reader

Abstract

The disclosed embodiment discloses a method and device for processing database services, the method comprising: obtaining a target database service model corresponding to a target database service, obtaining at least one executable unit encapsulating the target database service model operation according to the minimum granularity of the target database service according to the target database service model; obtaining a target database service configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit according to the service requirements of the target database service. The solution can achieve the purpose of automatically allocating at least one of the target system resources and target service parameters required for the target database service, reduce the probability of errors in the process of allocating system resources or service parameters for the database service, and improve the utilization efficiency of system resources or service parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of database technology, and in particular to a database business processing method and device. Background Art

[0002] The database system is an ideal data processing system developed to meet the needs of data processing. It is also a software system that provides data for actual operable storage, maintenance and application systems. It is a collection of storage media, processing objects and management systems. In the database system, the corresponding nodes can access the data in the database. As a system that can store and maintain data, the stable and reliable operation of the database system is the basis for providing good services to users. In order to ensure the stable and reliable operation of the database system, resources need to be allocated to the corresponding database services in the database system to support the database services. Summary of the invention

[0003] In order to solve the problems in the related art, the embodiments of the present disclosure provide a database service processing method and device.

[0004] In a first aspect, an embodiment of the present disclosure provides a database service processing method, the method comprising:

[0005] Acquire a target database business model corresponding to the target database business, where the target database business model is used to indicate at least one target database business model operation corresponding to the target database business, where the target database business model operation is used to operate at least one of a target system resource corresponding to the target database business and a target business parameter of the target database business in the database system;

[0006] Acquire at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business according to the target database business model;

[0007] A target database service configuration file that meets the workflow orchestration requirement and is orchestrated based on at least one executable unit is obtained according to the service requirement of the target database service.

[0008] In combination with the first aspect, in a first implementation of the first aspect of the present disclosure, the method further includes:

[0009] Execute the database service configuration process for the target database service according to the database service configuration file.

[0010] In combination with the first implementation of the first aspect, in a second implementation of the first aspect of the present disclosure, the method further includes:

[0011] In response to a failure in executing the database service configuration process, interrupting the execution of the database service configuration process;

[0012] Obtain interruption recovery indication information, and resume executing the database business configuration process according to the interruption recovery indication information, where the interruption recovery indication information is used to indicate the data flow steps for resuming execution of the database business configuration process.

[0013] In combination with the second implementation of the first aspect, in a third implementation of the first aspect of the present disclosure, the method further includes:

[0014] In response to the database service configuration process being interrupted or the database service configuration process being finished, setting the state of the target system resource and the state of the target service parameter to a stable state, wherein the state of the target system resource is a stable state for indicating that the target system resource is consistent with the expected system resource of the target database service, and the state of the target service resource is a stable state for indicating that the target service resource is consistent with the expected service resource of the target database service; or

[0015] In response to the database business configuration process not being interrupted or being resumed, the state of the target system resources and the state of the target business parameters are set to an unstable state. The state of the target system resources is an unstable state, which is used to indicate that the target system resources are inconsistent with the expected system resources of the target database business. The state of the target business resources is an unstable state, which is used to indicate that the target business resources are inconsistent with the expected business resources of the target database business.

[0016] In combination with the first aspect and any one of the first to third implementations of the first aspect, in a fourth implementation of the first aspect of the present disclosure, the method further includes:

[0017] In response to determining that at least one of the target system resources and the target business parameters has changed, obtaining a changed database business configuration file, where the changed database business configuration file is compiled based on at least one changed executable unit, where the changed executable unit is obtained by encapsulating a changed database business model operation corresponding to the target database business according to the minimum granularity of the target database business, and the changed database business model operation is used to operate at least one of the changed target system resources and the changed target business parameters;

[0018] Execute the database service configuration process for the target database service according to the changed database service configuration file.

[0019] In combination with the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect of the present disclosure, before obtaining a changed database service configuration file in response to determining that at least one of the target system resources and the target service parameter has changed, the method further includes:

[0020] Monitoring a database resource model, where the database resource model is used to indicate system resources of a database system and business parameters of at least one database business;

[0021] In response to determining, according to the monitoring result, that at least one of the system resources of the database system and the service parameter of at least one database service has changed, checking whether at least one of the target system resources and the target service parameter has changed.

[0022] In combination with the fifth implementation of the first aspect, in a sixth implementation of the first aspect of the present disclosure, checking whether at least one of a target system resource and a target service parameter changes includes:

[0023] Check whether at least one of the status of the target system resources and the status of the target business parameters is in an unstable state. The status of the target system resources being in an unstable state is used to indicate that the target system resources are inconsistent with the expected system resources of the target database business. The status of the target business resources being in an unstable state is used to indicate that the target business resources are inconsistent with the expected business resources of the target database business.

[0024] In combination with the sixth implementation of the first aspect, in a seventh implementation of the first aspect of the present disclosure, the method further includes:

[0025] In response to the completion of the database business configuration process for the target database business according to the changed database business configuration file, the state of the changed target system resources and the state of the changed target business parameters are set to a stable state. The state of the changed target system resources is a stable state, which is used to indicate that the changed target system resources are consistent with the expected system resources of the target database business. The state of the changed target business resources is a stable state, which is used to indicate that the changed target business resources are consistent with the expected business resources of the target database business.

[0026] In combination with the seventh implementation manner of the first aspect, in an eighth implementation manner of the first aspect of the present disclosure, the method further includes:

[0027] Check whether at least one of the changed state of the target system resource and the changed state of the target service parameter is in an unstable state;

[0028] In response to determining that at least one of the state of the target system resource after the change and the state of the target business parameter after the change is an unstable state, obtaining a database business configuration file after the change again, the database business configuration file after the change again being compiled based on at least one executable unit after the change again, the executable unit after the change again being obtained by encapsulating the database business model operation after the change again corresponding to the target database business according to the minimum granularity of the target database business, and the database business model operation after the change again being used to operate at least one of the target system resource after the change again and the target business parameter after the change again;

[0029] The database service configuration process is executed for the target database service according to the database service configuration file after the change again.

[0030] In a second aspect, an embodiment of the present disclosure provides a database service processing device, the device comprising:

[0031] a model acquisition module configured to acquire a target database business model corresponding to a target database business, the target database business model being used to indicate at least one target database business model operation corresponding to the target database business, the target database business model operation being used to operate at least one of a target system resource corresponding to the target database business and a target business parameter of the target database business in the database system;

[0032] A unit encapsulation module is configured to obtain, according to the target database business model, at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business;

[0033] The file arrangement module is configured to obtain a target database service configuration file that meets the workflow arrangement requirements and is arranged based on at least one executable unit according to the service requirements of the target database service.

[0034] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0035] According to the technical solution provided by the embodiment of the present disclosure, by acquiring a target database business model corresponding to the target database business, the target database business model is used to indicate at least one target database business model operation corresponding to the target database business, and the target database business model operation is used to operate on at least one of the target system resources corresponding to the target database business in the database system and the target business parameters of the target database business; according to the target database business model, at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business is acquired; according to the business requirements of the target database business, a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit is acquired. Compared with the aforementioned scheme, the scheme proposed by the inventor of the present disclosure obtains a target database business model corresponding to the target database business, and based on the target database business model, the corresponding relationship between the target database business model operation that operates at least one of the target system resources and the target business parameters and the target database business can be determined; by obtaining at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business according to the target database business model, the executable unit can be used to orchestrate each step required for the target database business according to the workflow orchestration requirements on the premise of being able to operate at least one of the target system resources and the target business parameters; by obtaining a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit according to the business requirements of the target database business, the target database business configuration file that can be used to execute the database business configuration process for the target database business can be obtained, so as to achieve the purpose of automatically allocating at least one of the target system resources and the target business parameters required for the target database business, thereby reducing the probability of errors in the process of allocating system resources or business parameters for the database business and improving the utilization efficiency of system resources or business parameters.

[0036] According to the technical solution provided by the embodiment of the present disclosure, by executing the database business configuration process for the target database business according to the database business configuration file, at least one of the target system resources and target business parameters required for the target database business can be automatically allocated without manual participation in the allocation of system resources or business parameters, thereby reducing the probability of errors in the process of allocating system resources or business parameters for the database business and improving the utilization efficiency of system resources or business parameters.

[0037] According to the technical solution provided by the embodiment of the present disclosure, by responding to the failure of executing the database business configuration process, interrupting the execution of the database business configuration process, obtaining interruption recovery indication information, and resuming the execution of the database business configuration process according to the interruption recovery indication information, when the execution of the database business configuration process fails, the execution of the database business configuration process can be promptly resumed from the corresponding steps, thereby improving the probability of completing the execution of the database business configuration process.

[0038] According to the technical solution provided by the embodiment of the present disclosure, in response to the interruption of the execution of the database business configuration process or the completion of the execution of the database business configuration process, the state of the target system resources and the state of the target business parameters are set to a stable state; or in response to the execution of the database business configuration process not being interrupted or the execution of the database business configuration process being resumed, the state of the target system resources and the state of the target business parameters are set to an unstable state. The state of the target system resources and the state of the target business parameters can be set based on the execution status of the database business configuration process, so as to facilitate the judgment of whether the target database business can be executed normally according to the state of the target system resources and the state of the target business parameters.

[0039] According to the technical solution provided by the embodiment of the present disclosure, by obtaining a changed database business configuration file in response to determining that at least one of the target system resources and the target business parameters has changed, and executing a database business configuration process for the target database business according to the changed database business configuration file, the corresponding database business configuration process can be executed on the target database business according to the changed database business configuration file in a timely manner when at least one of the target system resources and the target business parameters has changed, so that the system resources and business parameters required by the target database business are consistent with the system resources and business parameters configured for the target database business, ensuring that the target database business can be normally executed even after at least one of the target system resources and the target business parameters has changed.

[0040] According to the technical solution provided by the embodiment of the present disclosure, considering that in a database system, when at least one of the system resources of the database system and the business parameters of at least one database service changes, even if the target system resources and the target service parameters have not been monitored before, the target system resources and the target service parameters may also change accordingly after a period of time due to the influence of other system resource changes or other target service parameter changes. By monitoring the database resource model, the database resource model is used to indicate the system resources of the database system and the business parameters of at least one database service. In response to determining that at least one of the system resources of the database system and the business parameters of at least one database service have changed according to the monitoring result, checking whether at least one of the target system resources and the target service parameters has changed can ensure that it is possible to timely discover whether at least one of the target system resources and the target service parameters has changed, so as to timely obtain the changed database service configuration file and execute the database service configuration process for the target database service according to the changed database service configuration file, thereby reducing the probability that the target database service cannot be normally executed due to the change of at least one of the target system resources and the target service parameters.

[0041] According to the technical solution provided by the embodiment of the present disclosure, by checking whether at least one of the state of the target system resources and the state of the target business parameters is in an unstable state, it is possible to more conveniently determine whether at least one of the state of the target system resources and the state of the target business parameters has changed, thereby improving the efficiency of checking whether at least one of the target system resources and the target business parameters has changed.

[0042] According to the technical solution provided by the embodiment of the present disclosure, in response to the completion of the database business configuration process for the target database business according to the changed database business configuration file, the state of the changed target system resources and the state of the changed target business parameters are set to a stable state, which makes it easy to monitor whether the changed target system resources change again and whether the changed target business parameters change again after the database business configuration process.

[0043] According to the technical solution provided by the embodiment of the present disclosure, after the state of the changed target system resource and the state of the changed target business parameter are set to a stable state, by checking whether at least one of the state of the changed target system resource and the state of the changed target business parameter is an unstable state, it can be determined whether the changed target system resource or the changed target business parameter changes again after the state of the changed target system resource and the state of the changed target business parameter are set to a stable state; when the changed target system resource or the changed target business parameter changes again, that is, in response to determining that at least one of the state of the changed target system resource and the state of the changed target business parameter is an unstable state, by obtaining a database business configuration file after the second change, a database business configuration process is executed for the target database business according to the database business configuration file after the second change, it can be ensured that the target database business can be normally executed even after the changed target system resource or the changed target business parameter changes again, thereby reducing the probability that the target database business cannot be normally executed due to the changed target system resource or the changed target business parameter changing again.

[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:

[0046] Figure 1 A flowchart showing a database service processing method according to an embodiment of the present disclosure is shown;

[0047] Figure 2 A flowchart showing an example of a database service processing method according to an embodiment of the present disclosure;

[0048] Figure 3 A schematic diagram showing an operation sequence of an example of a database service processing method according to an embodiment of the present disclosure;

[0049] Figure 4 A structural block diagram of a database service processing device according to an embodiment of the present disclosure is shown;

[0050] Figure 5 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0051] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts that are not related to the description of the exemplary embodiments are omitted in the accompanying drawings. In the present disclosure, it should be understood that terms such as "including" or "having" are intended to indicate the presence of labels, numbers, steps, behaviors, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility that one or more other labels, numbers, steps, behaviors, components, parts, or combinations thereof exist or are added. It should also be noted that, in the absence of conflict, the embodiments in the present disclosure and the labels in the embodiments can be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0052] In order to allocate resources for corresponding database services, the inventors of the present disclosure have considered the following solutions: corresponding tools (such as Kubernetes, etc.) can be used to allocate resources for different database services respectively, or corresponding operators can manually allocate resources for different database services respectively.

[0053] The disadvantages of the above solution are: when using the corresponding tools to allocate resources for different database services, the resource allocation process is implemented based on the characteristics of the resources themselves, so only a small portion of the resources required for the database services can be allocated, and the remaining large portion of the resources still need to be manually allocated by the operator. In the process of manual resource allocation by the operator, since the specific resource allocation involves planning, allocation, and calling of related resources, as well as migration, specification changes, backup and other different operations for the database itself, the above operations require high skills from the operator, and will generate a lot of tedious details in the process of resource allocation, which is very easy to make mistakes, and may not be able to fully and effectively utilize the relevant resources.

[0054] Taking into account the shortcomings of the above schemes, the inventors of the present disclosure have proposed a new scheme: obtaining a target database business model corresponding to the target database business, the target database business model is used to indicate at least one target database business model operation corresponding to the target database business, and the target database business model operation is used to operate on at least one of the target system resources corresponding to the target database business in the database system and the target business parameters of the target database business; obtaining at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business according to the target database business model; obtaining a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit according to the business requirements of the target database business. Compared with the aforementioned scheme, the scheme proposed by the inventor of the present disclosure obtains a target database business model corresponding to the target database business, and based on the target database business model, the corresponding relationship between the target database business model operation that operates at least one of the target system resources and the target business parameters and the target database business can be determined; by obtaining at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business according to the target database business model, the executable unit can be used to orchestrate each step required for the target database business according to the workflow orchestration requirements on the premise of being able to operate at least one of the target system resources and the target business parameters; by obtaining a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit according to the business requirements of the target database business, the target database business configuration file that can be used to execute the database business configuration process for the target database business can be obtained, so as to achieve the purpose of automatically allocating at least one of the target system resources and the target business parameters required for the target database business, thereby reducing the probability of errors in the process of allocating system resources or business parameters for the database business and improving the utilization efficiency of system resources or business parameters.

[0055] In order to solve the above problems, the present disclosure proposes a database service processing method and device.

[0056] Figure 1 FIG. 1 is a flowchart of a database service processing method according to an embodiment of the present disclosure. Figure 1As shown, the method for processing turning section information includes steps S101, S102, and S103. In step S101, a target database business model corresponding to the target database business is obtained. The target database business model is used to indicate at least one target database business model operation corresponding to the target database business, and the target database business model operation is used to operate at least one of the target system resources corresponding to the target database business in the database system and the target business parameters of the target database business. In step S102, at least one executable unit encapsulated with the target database business model operation according to the minimum granularity of the target database business is obtained according to the target database business model. In step S103, according to the business requirements of the target database business, a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit is obtained.

[0057] In an embodiment of the present disclosure, the target database service may be understood as a service that operates on the target database or the data in the target database. For example, the target database service may be a service that initializes the target database, may be a service that reads data from the target database, or may be a service that writes data to the target database. In an embodiment of the present disclosure, Table 1 shows the correspondence between the database service identifier and the database service purpose, wherein the target database service may be a database service corresponding to any database service identifier in Table 1.

[0058] Table 1

[0059] Database business identifier Database business purpose CreateSharedStorageCluster Create an instance cluster SharedStorageClusterAddRo Add ro node ExtendStorageSharedStorageCluster Expandable storage SharedStorageClusterFlushParams Refresh parameters to the engine SharedStorageClusterMigrateRo Migrate ro node SharedStorageClusterMigrateRw Migrate rw node SharedStorageClusterModifyClass Changing instance specifications SharedStorageClusterRebuild Rebuilding the cluster SharedStorageClusterRebuildRo Rebuilding a read-only node SharedStorageClusterRemoveRo Deleting a read-only node SharedStorageClusterRestartCluster Restart the cluster SharedStorageClusterRestartIns Restart the instance SharedStorageClusterSwitchRw Read-write switching SharedStorageClusterUpgradeMinorVersion Minor version upgrade

[0060] In one embodiment of the present disclosure, the target database business model can be understood as a model abstracted from the target database business. It should be noted that multiple different target database business models can be abstracted from one target database business, that is, one target database business can correspond to multiple different target database business models; at the same time, the target database business models abstracted from different target database businesses can be the same, that is, one target database business model can correspond to multiple target database businesses at the same time. In one embodiment of the present disclosure, Table 2 shows the correspondence between the database business model identifier, the database business model name, the database business model operation identifier, and the database business model operation purpose. Among them, the target database business model can be the database business model corresponding to any database business model identifier in Table 2.

[0061] Table 2

[0062]

[0063]

[0064]

[0065]

[0066] In one embodiment of the present disclosure, the database system can be understood as a system that carries a target database. The database system can be distributed or non-distributed. For example, a distributed database system based on shared storage technology may include multiple hosts or computing nodes, and the data in the database can be accessed simultaneously through different hosts or computing nodes. In one embodiment of the present disclosure, the target system resources corresponding to the target database business in the database system can be understood as the resources of the database system required to execute the target database business, wherein the resources of the database system may include hardware resources and software resources. For example, the resources of the database system may include computing resources, storage resources, and network resources of the database system, wherein computing resources may be understood as computing volume, computing rate, etc., storage resources may be understood as space for data storage, time interval for data storage, data write rate, data read rate, etc., and network resources may be understood as available ports, available addresses, network communication rate, network traffic, etc. In one embodiment of the present disclosure, the target business parameters may be understood as parameters for configuring the target database business or the target database, for example, the target business parameters may include the version number of the target database, the account corresponding to the target business, etc. It should be noted that the target business parameters may be independent of the data stored in the target database. In one embodiment of the present disclosure, the minimum granularity of the target database service can be understood as the minimum component of the target database service divided according to the execution steps required by the target database service, and the executable units encapsulated according to the minimum granularity of the target database service can correspond to different steps required by the target database service. In one embodiment of the present disclosure, the executable unit can be understood as a unit that can implement one or more database service model operations, and the executable unit can be used as a step in various database service configuration processes, and multiple executable units can also be combined into a step in the database service configuration process.

[0067] In one embodiment of the present disclosure, the target database service configuration file may further include an executable unit identifier corresponding to the executable unit for arranging the target database service configuration file. For example, the corresponding relationship between the executable unit and the executable unit identifier and the executable unit function (purpose) may be as shown in Table 3.

[0068] Table 3

[0069]

[0070]

[0071]

[0072] In one embodiment of the present disclosure, the target database business configuration file can be understood as a file stored in a readable data exchange format, for example, the target database business configuration file can be a file stored in a yml format, an xml format, or a json format. In one embodiment of the present disclosure, the business requirements of the target database business can be understood as indicating all target system resources and all target business parameters required for the target database business. In one embodiment of the present disclosure, the target database business configuration file that meets the workflow orchestration requirements can be understood as the target database business configuration file can be used to execute the corresponding executable unit according to the execution step sequence to automatically complete the database business configuration process for the target database business.

[0073] In one embodiment of the present disclosure, Figure 2 A flowchart showing an example of a database service processing method according to an embodiment of the present disclosure is shown as follows: Figure 2As shown, in step 200, a target database business model corresponding to the target database business is obtained, wherein the target database business model obtained through step 200 may include a database business model 201 whose database business model is identified as Account, a database business model 202 whose database business model is identified as DbClusterBase, a database business model 203 whose database business model is identified as SharedStorageDbClusterBase, a database business model 204 whose database business model is identified as DbIns, and the like. Taking the target database business model as the database business model 203 whose database business model identifier is SharedStorageDbClusterBase as an example, the database business model 203 may include at least one target database business model operation for operating an account 101 of the target database business, a version number 102 of the target database, and a parameter 103 of the target database business, wherein the account 101 of the target database business, the version number 102 of the target database, and the parameter 103 of the target database business all belong to the target business parameters of the target database business; in step 300, at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business is obtained according to the target database business model, wherein the executable unit obtained by step 300 may include an executable unit 301 whose executable unit identifier is InitMeta, an executable unit 301 whose executable unit identifier is Prepar An executable unit 302 of eStorage, an executable unit 303 with an executable unit identifier of CreateRwPod, an executable unit 304 with an executable unit identifier of CreateRoPods, an executable unit 305 with an executable unit identifier of CreateClusterManager, an executable unit 306 with an executable unit identifier of AddToClusterManager, an executable unit 307 with an executable unit identifier of UpdateRunningStatus, an executable unit 308 with an executable unit identifier of GenerateAddRoTempId, an executable unit 309 with an executable unit identifier of InitTempRoMeta, an executable unit 310 with an executable unit identifier of EnsureNewRoUpToDate, an executable unit 311 with an executable unit identifier of CleanAllTempMeta, etc.;In step 400, a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit is obtained according to the business requirements of the target database business, wherein the target database business configuration file obtained through step 400 may include a database business configuration file 401 obtained according to the business requirements of the database business with the database business identifier being CreateSharedStorageCluster, a database business configuration file 402 obtained according to the business requirements of the database business with the database business identifier being SharedStorageClusterAddRo, a database business configuration file 403 obtained according to the business requirements of the database business with the database business identifier being ExtendStorageSharedStorageCluster, and a database business configuration file 404 obtained according to the business requirements of the database business with the database business identifier being Based on the database business identifier. The database service configuration file 404 is obtained according to the service requirement of the database service with the database service identifier of SharedStorageClusterFlushParams, the database service configuration file 405 is obtained according to the service requirement of the database service with the database service identifier of SharedStorageClusterMigrateRo, the database service configuration file 406 is obtained according to the service requirement of the database service with the database service identifier of SharedStorageClusterMigrateRw, the database service configuration file 407 is obtained according to the service requirement of the database service with the database service identifier of SharedStorageClusterModifyClass, etc.;

[0074] Compared with the aforementioned scheme, the scheme proposed by the inventor of the present disclosure obtains a target database business model corresponding to the target database business, and based on the target database business model, the corresponding relationship between the target database business model operation that operates at least one of the target system resources and the target business parameters and the target database business can be determined; by obtaining at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business according to the target database business model, the executable unit can be used to orchestrate each step required for the target database business according to the workflow orchestration requirements on the premise of being able to operate at least one of the target system resources and the target business parameters; by obtaining a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit according to the business requirements of the target database business, the target database business configuration file that can be used to execute the database business configuration process for the target database business can be obtained, so as to achieve the purpose of automatically allocating at least one of the target system resources and the target business parameters required for the target database business, thereby reducing the probability of errors in the process of allocating system resources or business parameters for the database business and improving the utilization efficiency of system resources or business parameters.

[0075] In one embodiment of the present disclosure, the database service processing method further includes: executing a database service configuration process for a target database service according to a database service configuration file. According to the technical solution provided by the embodiment of the present disclosure, at least one of the target system resources and target service parameters required by the target database service can be automatically allocated without manual participation in the allocation of system resources or service parameters, thereby reducing the probability of errors in the process of allocating system resources or service parameters for the database service and improving the utilization efficiency of system resources or service parameters.

[0076] In one embodiment of the present disclosure, the database business processing method also includes: in response to a failure in executing a database business configuration process, interrupting the execution of the database business configuration process; obtaining interruption recovery indication information, and resuming the execution of the database business configuration process according to the interruption recovery indication information, wherein the interruption recovery indication information is used to indicate the data flow steps for resuming the execution of the database business configuration process.

[0077] In one embodiment of the present disclosure, the failure of the database business configuration process can be understood as an error in the database business configuration process causing the failure of the database business configuration process, or an external intervention in the database business configuration process causing the failure of the database business configuration process. The error in the database business configuration process may be caused by the system resources or business parameters involved in the database business configuration process exceeding the preset range, or may be caused by changes in the system resources or business parameters involved in the database business configuration process. The present disclosure does not specifically limit the cause of the error in the database business configuration process.

[0078] In one embodiment of the present disclosure, the interruption recovery indication information may be pre-stored in a database system, or may be obtained from other devices or systems. For example, the interruption recovery indication information sent by a human-computer interaction device may be received, and the interruption recovery indication information is input by a user through the human-computer interaction device. It should be noted that the present disclosure does not specifically limit the method for obtaining the interruption recovery indication information.

[0079] In one embodiment of the present disclosure, the data flow steps of resuming execution of the database business configuration process can be understood as which specific step of the database business configuration process is started from when resuming execution of the database business configuration process. For example, execution can be started from the first step of the database business configuration process, or from the last step executed by the database business configuration process before the database business configuration process is interrupted, or from the next step of the last step executed by the database business configuration process before the database business configuration process is interrupted. According to the technical solution provided in the embodiment of the present disclosure, when the execution of the database business configuration process fails, the execution of the database business configuration process can be resumed from the corresponding step in a timely manner, thereby improving the probability of completing the execution of the database business configuration process.

[0080] In one embodiment of the present disclosure, the database business processing method further includes: in response to the database business configuration process being interrupted or the database business configuration process being finished, setting the state of the target system resource and the state of the target business parameter to a stable state, the state of the target system resource being a stable state is used to indicate that the target system resource is consistent with the expected system resource of the target database business, and the state of the target business resource being a stable state is used to indicate that the target business resource is consistent with the expected business resource of the target database business; or in response to the database business configuration process not being interrupted or the database business configuration process being resumed, setting the state of the target system resource and the state of the target business parameter to an unstable state, the state of the target system resource being an unstable state is used to indicate that the target system resource is inconsistent with the expected system resource of the target database business, and the state of the target business resource being an unstable state is used to indicate that the target business resource is inconsistent with the expected business resource of the target database business. In one embodiment of the present disclosure, the expected system resource of the target database business can be understood as the system resource of the database system required when the target database business is executed normally. The expected business resource of the target database business can be understood as the parameter configured by the target database business or the parameter configured by the target database when the target database business is executed normally. According to the technical solution provided in the embodiment of the present disclosure, the status of the target system resources and the status of the target business parameters can be set based on the execution status of the database business configuration process, so as to facilitate the judgment of whether the target database business can be executed normally based on the status of the target system resources and the status of the target business parameters.

[0081] In one embodiment of the present disclosure, the database business processing method further includes: in response to determining that at least one of the target system resources and the target business parameters has changed, obtaining a changed database business configuration file, the changed database business configuration file is compiled based on at least one changed executable unit, the changed executable unit is obtained by encapsulating the changed database business model operation corresponding to the target database business according to the minimum granularity of the target database business, and the changed database business model operation is used to operate at least one of the changed target system resources and the changed target business parameters; executing the database business configuration process for the target database business according to the changed database business configuration file. In one embodiment of the present disclosure, determining that at least one of the target system resources and the target business parameters has changed can be to monitor the change status of the target system resources and the target business parameters through corresponding tools, and determine whether at least one of the target system resources and the target business parameters has changed based on the monitoring results. According to the technical solution provided by the embodiment of the present disclosure, when at least one of the target system resources and the target business parameters changes, the corresponding database business configuration process can be executed on the target database business in a timely manner according to the changed database business configuration file, so that the system resources and business parameters required by the target database business are consistent with the system resources and business parameters configured for the target database business, ensuring that the target database business can be normally executed even after at least one of the target system resources and the target business parameters changes.

[0082] In one embodiment of the present disclosure, in response to determining that at least one of the target system resources and the target business parameters has changed, before obtaining the database business configuration file after the change, the database business processing method also includes: monitoring a database resource model, where the database resource model is used to indicate the system resources of the database system and the business parameters of at least one database business; in response to determining that at least one of the system resources of the database system and the business parameters of at least one database business has changed according to the monitoring result, checking whether at least one of the target system resources and the target business parameters has changed.

[0083] In one embodiment of the present disclosure, the database resource model may be implemented through corresponding tools, for example, it may be defined through the application program interface of Custom Resource Definition (CRD) in Kubernetes software.

[0084] The specific definition of the database resource model can be as follows:

[0085]

[0086]

[0087]

[0088]

[0089]

[0090]

[0091]

[0092]

[0093]

[0094]

[0095] In one embodiment of the present disclosure, monitoring of the database resource model can be implemented through corresponding tools, for example, the database resource model can be monitored through the management controller in the Kubernetes software. According to the technical solution provided in the embodiment of the present disclosure, it can be ensured that it is possible to timely discover whether at least one of the target system resources and target business parameters has changed, so as to timely obtain the database business configuration file after the change and execute the database business configuration process for the target database business according to the database business configuration file after the change, thereby reducing the probability that the target database business cannot be normally executed due to the change of at least one of the target system resources and target business parameters.

[0096] In one embodiment of the present disclosure, checking whether at least one of the target system resources and the target business parameters has changed includes: checking whether at least one of the state of the target system resources and the state of the target business parameters is in an unstable state, the state of the target system resources being in an unstable state is used to indicate that the target system resources are inconsistent with the expected system resources of the target database business, and the state of the target business resources being in an unstable state is used to indicate that the target business resources are inconsistent with the expected business resources of the target database business. In one embodiment of the present disclosure, the expected system resources of the target database business can be understood as the system resources of the database system required when the target database business is normally executed. The expected business resources of the target database business can be understood as the parameters configured by the target database business or the parameters configured by the target database when the target database business is normally executed. When at least one of the state of the target system resources and the state of the target business parameters is in an unstable state, it can be understood that at least one of the state of the target system resources and the state of the target business parameters changes from a stable state to an unstable state, that is, at least one of the state of the target system resources and the state of the target business parameters changes. In one embodiment of the present disclosure, checking whether at least one of the state of the target system resources and the state of the target business parameters is in an unstable state can be performed by a corresponding tool. For example, when it is determined that at least one of the system resources of the database system and the business parameters of at least one database business has changed, the resource tuning (Reconcile) action in the Kubernetes software can be triggered to execute the state machine entry (DoStateMainEnter) of the state machine (State Machine) through the resource tuning entry to check whether at least one of the state of the system resources and the state of the business parameters is an unstable state, that is, whether at least one of the state of the target system resources and the state of the target business parameters has changed from a stable state to an unstable state. According to the technical solution provided by the embodiment of the present disclosure, it is relatively convenient to determine whether at least one of the state of the target system resources and the state of the target business parameters has changed, thereby improving the efficiency of checking whether at least one of the target system resources and the target business parameters has changed.

[0097] In one embodiment of the present disclosure, the database service processing method further includes: in response to the completion of the database service configuration process for the target database service according to the changed database service configuration file, setting the state of the changed target system resources and the state of the changed target service parameters to a stable state, the state of the changed target system resources being a stable state is used to indicate that the changed target system resources are consistent with the expected system resources of the target database service, and the state of the changed target service resources being a stable state is used to indicate that the changed target service resources are consistent with the expected service resources of the target database service. According to the technical solution provided in the embodiment of the present disclosure, it is convenient to monitor whether the changed target system resources and the changed target service parameters are changed again after the database service configuration process.

[0098] In one embodiment of the present disclosure, the database service processing method further includes: in response to the end of executing the database service configuration process for the target database service according to the changed database service configuration file, checking whether at least one of the state of the changed target system resource and the state of the changed target service parameter is an unstable state; in response to determining that at least one of the state of the changed target system resource and the state of the changed target service parameter is an unstable state, obtaining a database service configuration file after a second change, the database service configuration file after a second change is compiled based on at least one executable unit after a second change, the executable unit after a second change is obtained by encapsulating the database service model operation after a second change corresponding to the target database service according to the minimum granularity of the target database service, and the database service model operation after a second change is used to operate at least one of the target system resource after a second change and the target service parameter after a second change; executing the database service configuration process for the target database service according to the database service configuration file after a second change. According to the technical solution provided by the embodiment of the present disclosure, it can be ensured that the target database service can be normally executed even after the changed target system resource or the changed target service parameter changes again, reducing the probability that the target database service cannot be normally executed due to the changed target system resource or the changed target service parameter changing again.

[0099] In one embodiment of the present disclosure, Figure 3 FIG. 1 is a schematic diagram showing an operation sequence of an example of a database service processing method according to an embodiment of the present disclosure. Figure 3As shown, in step 501, when the application side changes the resource Resourse 51 (Resourse 51 includes at least one of the system resources of the database system and the business parameters of the data service) through the CRD in the Kubernetes software, the control controller that monitors the database resource model in the Kubernetes software determines that at least one of the system resources of the database system and the business parameters of the database service has changed according to the monitoring result, thereby triggering the resource tuning action of tuning Reconcile52 in the Kubernetes software. In step 502, after the resource tuning action is triggered, the workflow entry DoStateMainEnter of the state machine StateMachine 53 is executed through the tuning entry. In step 503, the state machine 53 traverses its own state transition diagram StateTranslateMap. In step 504, the state machine 53 executes the state event check eventChecker in sequence to detect whether the state change of the state of the target system resource or the state of the target business parameter is triggered, that is, to determine whether at least one of the state of the target system resource and the state of the target business parameter is an unstable state. In step 505, when at least one of the state of the target system resource and the state of the target business parameter is determined to be an unstable state, it is determined that the StateTranslate state transition 54 occurs, and the unstable state main entry UnstateMainEnter 55 corresponding to the unstable state is executed. In step 506, the changed database business configuration file is obtained, and the workflow execute workflow is executed according to the changed database business configuration file, that is, the database business configuration process is executed for the target database business according to the changed database business configuration file. In step 507, the state of the changed resource 51 (that is, the state of the changed target system resource and the state of the changed target business parameter) is set to a stable state. In step 508, the tuning entry of the tuning 52 is triggered to execute the workflow entry of the state machine 53. In step 509, the state machine 53 traverses its own state transition diagram. In step 510, the state machine 53 sequentially executes the state event check eventChecker to detect whether the state change of the changed target system resource or the state change of the changed target business parameter is triggered, that is, to determine whether at least one of the state of the changed target system resource and the state of the changed target business parameter is an unstable state. In step 511, when it is determined that the state of the changed target system resource and the state of the changed target business parameter are both stable states, the stable state main entry stateMainEnter 56 corresponding to the stable state is executed.In step 512, when the state of the target system resource after the change or the state of the target service parameter after the change is an unstable state, it is determined that a state transition 54 has occurred, and the unstable state main entry 55 corresponding to the unstable state is executed. In step 513, the database service configuration file after the change is obtained again, and the workflow is executed according to the database service configuration file after the change, that is, the database service configuration process is executed for the target database service according to the database service configuration file after the change.

[0100] The following reference Figure 4 A database service processing device according to an embodiment of the present disclosure is described. Figure 4 FIG. 2 shows a structural block diagram of a database service processing device according to an embodiment of the present disclosure. Figure 4 As shown, the database business processing device 600 includes: a model acquisition module 601, which is configured to acquire a target database business model corresponding to the target database business, the target database business model is used to indicate at least one target database business model operation corresponding to the target database business, and the target database business model operation is used to operate on at least one of the target system resources corresponding to the target database business in the database system and the target business parameters of the target database business; a unit encapsulation module 602, which is configured to acquire at least one executable unit encapsulated with the target database business model operation according to the minimum granularity of the target database business according to the target database business model; and a file orchestration module 603, which is configured to acquire a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit according to the business requirements of the target database business.

[0101] Compared with the aforementioned scheme, the scheme proposed by the inventor of the present disclosure obtains a target database business model corresponding to the target database business, and based on the target database business model, the corresponding relationship between the target database business model operation that operates at least one of the target system resources and the target business parameters and the target database business can be determined; by obtaining at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business according to the target database business model, the executable unit can be used to orchestrate each step required for the target database business according to the workflow orchestration requirements on the premise of being able to operate at least one of the target system resources and the target business parameters; by obtaining a target database business configuration file that meets the workflow orchestration requirements and is orchestrated based on at least one executable unit according to the business requirements of the target database business, the target database business configuration file that can be used to execute the database business configuration process for the target database business can be obtained, so as to achieve the purpose of automatically allocating at least one of the target system resources and the target business parameters required for the target database business, thereby reducing the probability of errors in the process of allocating system resources or business parameters for the database business and improving the utilization efficiency of system resources or business parameters.

[0102] Those skilled in the art will understand that referring to Figure 3 The described technical solution can be combined with any of the embodiments described above, so as to have the technical effect achieved by any of the embodiments described above. The specific contents can refer to the description of the above embodiments, and the specific contents will not be repeated here.

[0103] Figure 5 1 shows a block diagram of an electronic device according to an embodiment of the present disclosure. The present disclosure also provides an electronic device, such as Figure 5 As shown, it includes at least one processor 701; and a memory 702 that is communicatively connected to the at least one processor 701; wherein the memory 702 stores instructions that can be executed by the at least one processor 701, and the instructions are executed by the at least one processor 701 to execute the steps in the aforementioned database business processing method.

[0104] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the road map or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a different order from the order marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0105] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0106] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the node described in the above embodiment; or a computer-readable storage medium that exists independently and is not installed in a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.

[0107] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

Claims

1. A database business processing method, wherein: The method comprises: Acquire a target database business model corresponding to a target database business, wherein the target database business model is used to indicate at least one target database business model operation corresponding to the target database business, wherein the target database business model operation is used to operate at least one of a target system resource corresponding to the target database business in a database system and a target business parameter of the target database business; Acquire, according to the target database business model, at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business; A target database service configuration file that meets the workflow orchestration requirement and is orchestrated based on at least one of the executable units is obtained according to the service requirement of the target database service.

2. The database service processing method according to claim 1, wherein: The method further comprises: A database service configuration process is executed for the target database service according to the database service configuration file.

3. The database service processing method according to claim 2, wherein: The method further comprises: In response to a failure in executing the database service configuration process, interrupting the execution of the database service configuration process; Obtain interruption recovery indication information, and resume execution of the database service configuration process according to the interruption recovery indication information, wherein the interruption recovery indication information is used to indicate the data flow steps for resuming execution of the database service configuration process.

4. The database service processing method according to claim 3, wherein: The method further comprises: In response to the database service configuration process being interrupted or the database service configuration process being finished, setting the state of the target system resource and the state of the target service parameter to a stable state, wherein the state of the target system resource is a stable state for indicating that the target system resource is consistent with the expected system resource of the target database service, and the state of the target service parameter is a stable state for indicating that the target service resource is consistent with the expected service resource of the target database service; or In response to the database business configuration process not being interrupted or being resumed, the state of the target system resources and the state of the target business parameters are set to an unstable state, wherein the state of the target system resources is an unstable state, indicating that the target system resources are inconsistent with the expected system resources of the target database business, and the state of the target business parameters is an unstable state, indicating that the target business resources are inconsistent with the expected business resources of the target database business.

5. The database service processing method according to any one of claims 1 to 4, wherein: The method further comprises: In response to determining that at least one of the target system resource and the target business parameter has changed, obtaining a changed database business configuration file, wherein the changed database business configuration file is compiled based on at least one changed executable unit, wherein the changed executable unit is obtained by encapsulating a changed database business model operation corresponding to the target database business according to the minimum granularity of the target database business, and the changed database business model operation is used to operate at least one of the changed target system resource and the changed target business parameter; A database service configuration process is executed for the target database service according to the changed database service configuration file.

6. The database service processing method according to claim 5, wherein: In response to determining that at least one of the target system resource and the target service parameter has changed, before obtaining the changed database service configuration file, the method further includes: Monitoring a database resource model, where the database resource model is used to indicate system resources of the database system and business parameters of at least one database business; In response to determining, according to the monitoring result, that at least one of the system resources of the database system and the service parameter of at least one database service has changed, checking whether at least one of the target system resources and the target service parameter has changed.

7. The database service processing method according to claim 6, wherein: The checking whether at least one of the target system resources and the target service parameters has changed includes: Check whether at least one of the status of the target system resources and the status of the target business parameters is in an unstable state. The status of the target system resources being in an unstable state is used to indicate that the target system resources are inconsistent with the expected system resources of the target database business. The status of the target business parameters being in an unstable state is used to indicate that the target business resources are inconsistent with the expected business resources of the target database business.

8. The database service processing method according to claim 7, wherein: The method further comprises: In response to the completion of the database service configuration process for the target database service according to the changed database service configuration file, the state of the changed target system resources and the state of the changed target service parameters are set to a stable state. The state of the changed target system resources is a stable state, which is used to indicate that the changed target system resources are consistent with the expected system resources of the target database service. The state of the changed target service parameters is a stable state, which is used to indicate that the changed target service resources are consistent with the expected service resources of the target database service.

9. The database service processing method according to claim 8, wherein: The method further comprises: Checking whether at least one of the state of the target system resource after the change and the state of the target service parameter after the change is in an unstable state; In response to determining that at least one of the state of the target system resource after the change and the state of the target business parameter after the change is an unstable state, obtaining a re-changed database business configuration file, wherein the re-changed database business configuration file is compiled based on at least one re-changed executable unit, wherein the re-changed executable unit is obtained by encapsulating a re-changed database business model operation corresponding to the target database business according to the minimum granularity of the target database business, and the re-changed database business model operation is used to operate at least one of the re-changed target system resource and the re-changed target business parameter; A database service configuration process is executed for the target database service according to the database service configuration file after the further change.

10. A database service processing device, wherein: The device comprises: a model acquisition module, configured to acquire a target database business model corresponding to a target database business, wherein the target database business model is used to indicate at least one target database business model operation corresponding to the target database business, wherein the target database business model operation is used to operate at least one of a target system resource corresponding to the target database business in a database system and a target business parameter of the target database business; A unit encapsulation module is configured to obtain, according to the target database business model, at least one executable unit encapsulating the target database business model operation according to the minimum granularity of the target database business; The file arrangement module is configured to obtain, according to the business requirements of the target database business, a target database business configuration file that is arranged based on at least one of the executable units and meets the workflow arrangement requirements.

Citation Information

Patent Citations

  • Big data execution method, system and device based on Linux platform and storage medium

    CN112035443A