Database and middleware decoupling replacement method and device, equipment and storage medium
By gradually expanding the middleware deployment and database simulation processing strategy, the business continuity and risk issues during the database and middleware replacement process were resolved, and a safe and lossless switching process was achieved.
Patent Information
- Application Number
- CN202510852003.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-03
AI Technical Summary
In the existing technology, the replacement process of databases and middleware can easily damage the continuity of business services and may lead to business operation risks, especially when problems arise due to different operating mechanisms after switching.
By gradually expanding the deployment of the target middleware, controlling the traffic or services to be processed by the target middleware, and replacing all middleware when conditions are met; converting the database data and migrating it to the target database; building a simulation environment to process business traffic and obtain real execution results to meet the switching conditions.
It achieves safe and lossless switching of database and middleware, avoids the incompatibility caused by sudden switching, and makes the switching process more gentle and controllable.
Smart Images

Figure CN120743877A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of big data technology, and in particular to a method, apparatus, device, and storage medium for decoupling and replacing a database and middleware. Background Art
[0002] As the number of database and middleware products increases, newer products often offer more features, which in turn encourages users to adopt newer products. However, due to the long-term use of older products, their associated business processes are more mature and their business data is more complex, making product replacement more difficult.
[0003] Currently, databases and middleware are directly replaced and put into production. This may lead to damage to the continuity of business services during the switching process, and may also cause risks to some business operations due to differences in their operating mechanisms after the switch. Summary of the Invention
[0004] The embodiments of the present application provide a method, apparatus, device, and storage medium for decoupling and replacing a database and middleware to ensure safe and lossless switching of the database and middleware.
[0005] In a first aspect, an embodiment of the present application provides a method for decoupling and replacing a database and middleware, the method comprising:
[0006] Obtain the deployment information of the target middleware, and gradually expand the deployment of the target middleware according to the deployment information;
[0007] Control the target traffic or target service to be processed by the target middleware, and if the processing result meets the conditions for full middleware switching, replace all the middleware to be replaced with the target middleware;
[0008] For any database to be replaced, the data in the database to be replaced is converted and migrated to the target database;
[0009] Use the target database to build a simulation environment, and copy any business traffic into the simulation environment for processing to obtain the simulation processing results;
[0010] The real execution results of any business traffic are obtained, and when the simulation processing results and the real execution results meet the database switching conditions, the database to be replaced is switched to the target database.
[0011] In a second aspect, an embodiment of the present application provides a database and middleware decoupling and replacement device, the device comprising:
[0012] The middleware deployment module is used to obtain the deployment information of the target middleware and gradually expand the deployment of the target middleware according to the deployment information;
[0013] The middleware full cut module is used to control the target traffic or target service to be processed by the target middleware, and replace all the middleware to be replaced with the target middleware if the processing result meets the middleware full cut condition;
[0014] The data conversion and migration module is used to convert the data in any database to be replaced and migrate it to the target database;
[0015] The simulation module is used to build a simulation environment using the target database and copy any business traffic into the simulation environment for processing to obtain simulation processing results;
[0016] The database switching module is used to obtain the actual execution results of any business traffic, and when the simulation processing results and the actual execution results meet the database switching conditions, the database to be replaced is switched to the target database.
[0017] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:
[0018] one or more processors;
[0019] a storage device for storing one or more programs,
[0020] When one or more programs are executed by one or more processors, the one or more processors implement the database and middleware decoupling replacement method provided in any embodiment of the present application.
[0021] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the database and middleware decoupling and replacement method provided in any embodiment of the present application.
[0022] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the database and middleware decoupling and replacement method provided in any embodiment of the present application.
[0023] The technical solution of the embodiment of the present application obtains the deployment information of the target middleware, and gradually expands the deployment of the target middleware according to the deployment information; controls the target traffic or target service to be processed through the target middleware, and replaces all the middleware to be replaced with the target middleware when the processing result meets the middleware full cut condition; for any database to be replaced, transforms the data in the database to be replaced and migrates it to the target database; uses the target database to build a simulation environment, and copies any business traffic and inputs it into the simulation environment for processing to obtain the simulation processing result; obtains the real execution result of any business traffic, and when the simulation processing result and the real execution result meet the database switching condition, switches the database to be replaced to the target database. Based on this, through the strategy of gradually expanding the deployment of the middleware and the mechanism of database simulation processing, the incompatibility consequences caused by the sudden switching of the middleware and the database can be avoided, making the switching process more gentle and controllable, and ensuring the safe and lossless switching of the database and the middleware. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flowchart of the database and middleware decoupling and replacement method provided in Example 1 of the present application;
[0025] Figure 2 A schematic diagram of the structure of a database and middleware decoupling and replacement device provided in Example 2 of the present application;
[0026] Figure 3 This is a structural diagram of an electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION
[0027] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the present application and are not intended to limit the present application. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions of the present application, not all of the structures.
[0028] Example 1
[0029] Figure 1 This is a flowchart of the database and middleware decoupling replacement method provided in Example 1 of the present application, as shown in FIG. Figure 1 As shown, the database and middleware decoupling and replacement method provided in this embodiment can be applied to a database and middleware decoupling and replacement platform mounted on a device with data processing capabilities such as a computer, and can be used with some application software to achieve a better experience. Specifically, the method may include the following steps:
[0030] Step 101: Obtain deployment information of the target middleware, and gradually expand the deployment of the target middleware according to the deployment information.
[0031] In this step, the target middleware refers to the desired middleware. In this embodiment, the target middleware is used to replace the previous middleware, namely the grayscale middleware to be replaced and the normal middleware to be replaced. It should be noted that in this embodiment, the original middleware architecture consists of four grayscale middlewares to be replaced and eight normal middlewares to be replaced. The purpose of this embodiment is to replace all of these middlewares with the target middleware.
[0032] When obtaining deployment information, pom packaging can be performed. In order to ensure the accurate acquisition of deployment information, this embodiment can use two tasks to package in different ways to obtain two versions of deployment information. When deploying, deployment is performed according to the two versions of deployment information respectively to obtain two deployed middlewares. After testing both with preset traffic, the final target middleware is obtained according to the test results.
[0033] It should be noted that if the test results are that all the tested middlewares pass the test, any of the tested middlewares can be determined as the target middleware. If the test results are that one of them passes the test, the middleware that passes the test can be determined as the target middleware. If the test results are that all the tested middlewares fail the test, the deployment information is obtained again and redeployed.
[0034] In addition, in this step, during the gradual expansion of deployment, the target middleware can be deployed individually according to the deployment information, and the traffic types or service types processed by the target middleware can be gradually increased; when the number of traffic types or service types meets the expansion conditions, the deployment of the target middleware is increased.
[0035] By gradually expanding, a gentle and controllable switch can be achieved, thus ensuring the smooth switching to a certain extent.
[0036] Specifically, gradually increasing traffic types or service types may refer to the number of specific traffic and services for specific customers. As the number of types increases, the requirements for the target middleware will also be higher. If the target middleware can successfully complete the processing of a larger number of types, the subsequent target middleware can be further deployed.
[0037] During a single deployment, you can replace any grayscale middleware to be replaced with the target middleware, and then deploy services on the target middleware based on the deployment information. This ensures that the middleware architecture remains consistent with the previous one, improving architectural stability during the replacement process.
[0038] It should be noted that in order to ensure that the target middleware can handle the signed traffic type or service type, the normal middleware to be replaced in this embodiment can mark the corresponding type of traffic or service when it receives it, and resend the marked traffic or service to the distribution center for distribution, or route some marked services, such as RPC services, directly to the target middleware.
[0039] It should be noted that when the distribution center receives traffic or service, it will determine whether it has a tag. If so, it will be distributed to the target middleware for processing. If not, it will still be distributed to the previous middleware for processing.
[0040] When additional deployment of the target middleware is performed, if the number of traffic types or service types is greater than the preset threshold, it is determined that the number of types meets the expansion conditions; all the grayscale middleware to be replaced are replaced with the target middleware, and the target middleware is deployed for business according to the deployment information.
[0041] It should be noted that by setting a preset threshold, the degree of aggressiveness of expanding the deployment can be flexibly controlled. If cautious expansion is required, the preset threshold can be raised; if aggressive expansion is required, the preset threshold can be lowered.
[0042] Among them, the expanded deployment is mainly aimed at the grayscale middleware to be replaced. The replacement of the normal middleware to be replaced needs to wait until the target middleware completes successful support for all types.
[0043] Step 102: Control the target traffic or target service to be processed by the target middleware, and when the processing result meets the middleware full cut condition, replace all the middleware to be replaced with the target middleware.
[0044] In this step, the middleware full cut condition is that the target middleware mentioned in the previous step completes the successful support of all types.
[0045] In addition, the method of controlling the target traffic or target service to be processed by the target middleware is mentioned in the previous step. The normal middleware to be replaced can mark the corresponding type of traffic or service when it receives it, and resend the marked traffic or service to the distribution center for distribution, or route some marked services, such as RPC services, directly to the target middleware.
[0046] It should be noted that when the distribution center receives traffic or service, it will determine whether it has a tag. If so, it will be distributed to the target middleware for processing. If not, it will still be distributed to the previous middleware for processing.
[0047] Step 103: For any database to be replaced, the data in the database to be replaced is converted and migrated to the target database.
[0048] In this step, you can use the preset data object conversion tool to convert the data in the replacement database into the format corresponding to the target database; use the distributed batch framework to batch migrate the converted data to the target database
[0049] Data object conversion tools can efficiently convert data objects in a database. It should be noted that since most tools may not achieve 100% conversion efficiency, manual modification can be used to back up the tool's conversion results and further ensure that the data objects in the database can be successfully converted.
[0050] In addition, when performing migration, you can use single-region migration, full-instance migration, or simulated incremental migration. Among them, single-region migration can be combined with the table structure migration tool of the UGO tool, and can have two sets of database table creation statements for Oracle and Guass to complete various data migration actions; full-instance migration is to migrate from Oracle to Guass, and the DRS data replication tool can be used to complete the overall data migration from the Oracle instance to the Guass instance; simulated incremental migration can rely on the DRP data synchronization mechanism.
[0051] The above migration methods can refer to relevant technologies and will not be described in detail here.
[0052] Step 104: Use the target database to build a simulation environment, and copy any business traffic and input it into the simulation environment for processing to obtain simulation processing results.
[0053] In this step, the aforementioned target database can be directly used as the database in the simulation environment, or the object can be migrated again through the UGO tool to complete the full migration and incremental synchronization through data migration to avoid data pollution to the target database during the simulation process.
[0054] Specifically, when performing simulation, the processed business traffic can be replayed in the simulation environment; the target data can be called from the target database in the simulation environment using a batch server, and the target data can be obtained through a file server; and the target data can be determined as the simulation processing result.
[0055] By using the batch server, on the one hand, relevant data in the database of the simulation environment can be obtained, and on the other hand, real batch scheduling and detection business can be simulated to make the simulation more in line with the actual scenario.
[0056] Specifically, the batch server can be scheduled through the DBF distributed batch framework, and the batch server can use GSQL statements to retrieve data from the database in the simulation environment (this needs to be implemented through a file server, and for details, please refer to relevant technologies).
[0057] Step 105: Acquire the actual execution result of any business traffic, and when the simulation processing result and the actual execution result meet the database switching condition, switch the database to be replaced to the target database.
[0058] In this step, the actual execution result of any business traffic can be the content obtained by the real batch server. By comparing the simulation processing result and the actual execution result, if the comparison shows that the data in the two files are consistent, it is considered that the database switching condition is met.
[0059] When switching databases, you can flexibly switch shards to meet certain requirements or restrictions, such as switching a database shard first and then switching other shards. After the above steps, the middleware and database can be replaced.
[0060] In this embodiment, the deployment information of the target middleware is obtained, and the target middleware is gradually expanded and deployed according to the deployment information; the target traffic or target service is controlled to be processed by the target middleware, and when the processing result meets the middleware full cut condition, all the middleware to be replaced are replaced with the target middleware; for any database to be replaced, the data in the database to be replaced is converted and migrated to the target database; a simulation environment is built using the target database, and any business traffic is copied and input into the simulation environment for processing to obtain the simulation processing result; the actual execution result of any business traffic is obtained, and when the simulation processing result and the actual execution result meet the database switching condition, the database to be replaced is switched to the target database. Based on this, through the strategy of gradually expanding the deployment of the middleware and the mechanism of database simulation processing, the incompatibility consequences caused by the sudden switching of the middleware and the database can be avoided, making the switching process more gentle and controllable, and ensuring the safe and lossless switching of the database and the middleware.
[0061] Example 2
[0062] Figure 2 This is a schematic diagram of the structure of a database and middleware decoupling replacement device provided in the second embodiment of the present application. The database and middleware decoupling replacement device provided in the embodiment of the present application can execute the database and middleware decoupling replacement method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. The device can be implemented in software and / or hardware, such as Figure 2As shown, the database and middleware decoupling and replacement device specifically includes: a middleware deployment module 201, a middleware full-cut module 202, a data conversion and migration module 203, a simulation module 204, and a database switching module 205.
[0063] The middleware deployment module is used to obtain the deployment information of the target middleware and gradually expand the deployment of the target middleware according to the deployment information;
[0064] The middleware full cut module is used to control the target traffic or target service to be processed by the target middleware, and replace all the middleware to be replaced with the target middleware if the processing result meets the middleware full cut condition;
[0065] The data conversion and migration module is used to convert the data in any database to be replaced and migrate it to the target database;
[0066] The simulation module is used to build a simulation environment using the target database and copy any business traffic into the simulation environment for processing to obtain simulation processing results;
[0067] The database switching module is used to obtain the actual execution results of any business traffic, and when the simulation processing results and the actual execution results meet the database switching conditions, the database to be replaced is switched to the target database.
[0068] Furthermore, the middleware deployment module includes:
[0069] A single deployment unit is used to deploy a target middleware individually according to the deployment information, and gradually increase the traffic types or service types processed by the target middleware;
[0070] The expansion deployment unit is used to increase the deployment of the target middleware when the number of traffic types or service types meets the expansion conditions.
[0071] Furthermore, a single deployment unit includes:
[0072] In the first replacement unit, any grayscale middleware to be replaced is replaced with a target middleware, and business deployment is performed on the target middleware according to the deployment information.
[0073] Furthermore, the expanded deployment units include:
[0074] an expansion condition determination subunit, configured to determine that the number of traffic types or service types meets the expansion condition if the number of types is greater than a preset threshold;
[0075] The second replacement sub-unit is used to replace all the grayscale middleware to be replaced with the target middleware, and perform business deployment on the target middleware according to the deployment information.
[0076] Furthermore, the data conversion and migration module includes:
[0077] A conversion unit, configured to convert the data in the database to be replaced into a format corresponding to the target database using a preset data object conversion tool;
[0078] The migration unit is used to migrate the converted data into the target database in batches using a distributed batch framework.
[0079] Furthermore, the simulation module includes:
[0080] Traffic replay unit, used to replay the processed business traffic in a simulation environment;
[0081] a calling unit, configured to call target data from a target database in a simulation environment using a batch server, and obtain the target data through a file server;
[0082] The simulation result determination unit is used to determine the target data as the simulation processing result.
[0083] Example 3
[0084] Figure 3 This is a structural diagram of an electronic device provided in Example 3 of the present application, such as Figure 3 As shown, the electronic device includes a processor 310, a memory 320, an input device 330 and an output device 340; the number of processors 310 in the electronic device can be one or more. Figure 3 In the figure, a processor 310 is used as an example; the processor 310, memory 320, input device 330 and output device 340 in the electronic device can be connected via a bus or other means. Figure 3 The bus connection is taken as an example.
[0085] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the database and middleware decoupling and replacement method in the embodiments of the present invention. The processor 310 executes the software programs, instructions, and modules stored in the memory 320 to execute various functional applications and data processing of the electronic device, that is, to implement the above-mentioned database and middleware decoupling and replacement method:
[0086] Obtain the deployment information of the target middleware, and gradually expand the deployment of the target middleware according to the deployment information;
[0087] Control the target traffic or target service to be processed by the target middleware, and if the processing result meets the conditions for full middleware switching, replace all the middleware to be replaced with the target middleware;
[0088] For any database to be replaced, the data in the database to be replaced is converted and migrated to the target database;
[0089] Use the target database to build a simulation environment, and copy any business traffic into the simulation environment for processing to obtain the simulation processing results;
[0090] The real execution results of any business traffic are obtained, and when the simulation processing results and the real execution results meet the database switching conditions, the database to be replaced is switched to the target database.
[0091] Furthermore, the target middleware is gradually expanded and deployed according to the deployment information, including:
[0092] Deploy the target middleware individually according to the deployment information, and gradually increase the types of traffic or services processed by the target middleware;
[0093] When the number of traffic types or service types meets the expansion condition, the deployment of target middleware is increased.
[0094] Furthermore, the target middleware is individually deployed according to the deployment information, including:
[0095] Replace any grayscale middleware to be replaced with the target middleware, and deploy the target middleware according to the deployment information.
[0096] Furthermore, when the number of traffic types or service types meets the expansion conditions, additional deployment of target middleware is performed, including:
[0097] If the number of types of traffic types or service types is greater than a preset threshold, determining that the number of types meets the expansion condition;
[0098] Replace all the grayscale middleware to be replaced with the target middleware, and deploy the business of the target middleware according to the deployment information.
[0099] Furthermore, the data in the database to be replaced is converted and migrated to the target database, including:
[0100] Use the preset data object conversion tool to convert the data in the replacement database into the format corresponding to the target database;
[0101] Use the distributed batch framework to batch migrate the converted data to the target database.
[0102] Furthermore, any business traffic is copied and input into the simulation environment for processing to obtain simulation processing results, including:
[0103] Replay the processed business traffic in a simulation environment;
[0104] Using the batch server to call the target data from the target database in the simulation environment, and obtaining the target data through the file server;
[0105] The target data is determined as the simulation processing result.
[0106] The memory 320 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the terminal, etc. Furthermore, the memory 320 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely located relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0107] Example 4
[0108] The fourth embodiment of the present application further provides a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, they are used to perform a method for decoupling and replacing a database and middleware. The method includes:
[0109] Obtain the deployment information of the target middleware, and gradually expand the deployment of the target middleware according to the deployment information;
[0110] Control the target traffic or target service to be processed by the target middleware, and if the processing result meets the conditions for full middleware switching, replace all the middleware to be replaced with the target middleware;
[0111] For any database to be replaced, the data in the database to be replaced is converted and migrated to the target database;
[0112] Use the target database to build a simulation environment, and copy any business traffic into the simulation environment for processing to obtain the simulation processing results;
[0113] The real execution results of any business traffic are obtained, and when the simulation processing results and the real execution results meet the database switching conditions, the database to be replaced is switched to the target database.
[0114] Furthermore, the target middleware is gradually expanded and deployed according to the deployment information, including:
[0115] Deploy the target middleware individually according to the deployment information, and gradually increase the types of traffic or services processed by the target middleware;
[0116] When the number of traffic types or service types meets the expansion condition, the deployment of target middleware is increased.
[0117] Furthermore, the target middleware is individually deployed according to the deployment information, including:
[0118] Replace any grayscale middleware to be replaced with the target middleware, and deploy the target middleware according to the deployment information.
[0119] Furthermore, when the number of traffic types or service types meets the expansion conditions, additional deployment of target middleware is performed, including:
[0120] If the number of types of traffic types or service types is greater than a preset threshold, determining that the number of types meets the expansion condition;
[0121] Replace all the grayscale middleware to be replaced with the target middleware, and deploy the business of the target middleware according to the deployment information.
[0122] Furthermore, the data in the database to be replaced is converted and migrated to the target database, including:
[0123] Use the preset data object conversion tool to convert the data in the replacement database into the format corresponding to the target database;
[0124] Use the distributed batch framework to batch migrate the converted data to the target database.
[0125] Furthermore, any business traffic is copied and input into the simulation environment for processing to obtain simulation processing results, including:
[0126] Replay the processed business traffic in a simulation environment;
[0127] Using the batch server to call the target data from the target database in the simulation environment, and obtaining the target data through the file server;
[0128] The target data is determined as the simulation processing result.
[0129] Of course, the storage medium containing computer-executable instructions provided in an embodiment of the present application is not limited to the above method operations, and its computer-executable instructions can also execute related operations in the database and middleware decoupling replacement method provided in any embodiment of the present application.
[0130] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present application can be implemented with the help of software and necessary general-purpose hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer's floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0131] It is worth noting that in the embodiments of the above-mentioned device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.
[0132] Example 5
[0133] This embodiment provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the database and middleware decoupling and replacement method provided in any embodiment of this application. The method may specifically include:
[0134] Obtain the deployment information of the target middleware, and gradually expand the deployment of the target middleware according to the deployment information;
[0135] Control the target traffic or target service to be processed by the target middleware, and if the processing result meets the conditions for full middleware switching, replace all the middleware to be replaced with the target middleware;
[0136] For any database to be replaced, the data in the database to be replaced is converted and migrated to the target database;
[0137] Use the target database to build a simulation environment, and copy any business traffic into the simulation environment for processing to obtain the simulation processing results;
[0138] The real execution results of any business traffic are obtained, and when the simulation processing results and the real execution results meet the database switching conditions, the database to be replaced is switched to the target database.
[0139] Furthermore, the target middleware is gradually expanded and deployed according to the deployment information, including:
[0140] Deploy the target middleware individually according to the deployment information, and gradually increase the types of traffic or services processed by the target middleware;
[0141] When the number of traffic types or service types meets the expansion condition, the deployment of target middleware is increased.
[0142] Furthermore, the target middleware is individually deployed according to the deployment information, including:
[0143] Replace any grayscale middleware to be replaced with the target middleware, and deploy the target middleware according to the deployment information.
[0144] Furthermore, when the number of traffic types or service types meets the expansion conditions, additional deployment of target middleware is performed, including:
[0145] If the number of types of traffic types or service types is greater than a preset threshold, determining that the number of types meets the expansion condition;
[0146] Replace all the grayscale middleware to be replaced with the target middleware, and deploy the business of the target middleware according to the deployment information.
[0147] Furthermore, the data in the database to be replaced is converted and migrated to the target database, including:
[0148] Use the preset data object conversion tool to convert the data in the replacement database into the format corresponding to the target database;
[0149] Use the distributed batch framework to batch migrate the converted data to the target database.
[0150] Furthermore, any business traffic is copied and input into the simulation environment for processing to obtain simulation processing results, including:
[0151] Replay the processed business traffic in a simulation environment;
[0152] Using the batch server to call the target data from the target database in the simulation environment, and obtaining the target data through the file server;
[0153] The target data is determined as the simulation processing result.
[0154] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the appended claims.
Claims
1. A database and middleware decoupling and replacement method, characterized in that: The method comprises: Obtaining deployment information of the target middleware, and gradually expanding the deployment of the target middleware according to the deployment information; Controlling target traffic or target service to be processed by the target middleware, and replacing all the middleware to be replaced with the target middleware if the processing result meets the middleware full cut condition; For any database to be replaced, convert the data in the database to be replaced and migrate it to the target database; Using the target database to build a simulation environment, and copying any business traffic into the simulation environment for processing to obtain simulation processing results; The actual execution result of the arbitrary business traffic is obtained, and when the simulation processing result and the actual execution result meet a database switching condition, the database to be replaced is switched to the target database.
2. The method according to claim 1, characterized in that The stepwise expansion deployment of the target middleware according to the deployment information includes: Deploying the target middleware individually according to the deployment information, and gradually increasing the types of traffic or services processed by the target middleware; When the number of the traffic types or service types meets the expansion condition, the deployment of the target middleware is increased.
3. The method according to claim 2, characterized in that The single deployment of the target middleware according to the deployment information includes: Any grayscale middleware to be replaced is replaced with the target middleware, and the service of the target middleware is deployed according to the deployment information.
4. The method according to claim 2, characterized in that When the number of the traffic type or service type meets the expansion condition, increasing the deployment of the target middleware includes: If the number of the traffic type or service type is greater than a preset threshold, determining that the number of the type meets the expansion condition; All the grayscale middleware to be replaced are replaced with the target middleware, and the service of the target middleware is deployed according to the deployment information.
5. The method according to claim 1, wherein The converting of the data in the database to be replaced and migrating the data to the target database includes: Using a preset data object conversion tool to convert the data in the to-be-replaced database into a format corresponding to the target database; The converted data is batch migrated to the target database using a distributed batch framework.
6. The method according to claim 1, characterized in that The copying of arbitrary business traffic and inputting it into the simulation environment for processing to obtain simulation processing results includes: Replaying the processed service traffic in the simulation environment; Using a batch server to call target data from a target database in the simulation environment, and obtaining the target data through a file server; The target data is determined as a simulation processing result.
7. A database and middleware decoupling and replacement device, characterized in that: The device comprises: A middleware deployment module, configured to obtain deployment information of a target middleware and gradually expand deployment of the target middleware according to the deployment information; A middleware full cut module is used to control the target traffic or target service to be processed by the target middleware, and replace all the middleware to be replaced with the target middleware if the processing result meets the middleware full cut condition; A data conversion and migration module is used to convert the data in any database to be replaced and migrate it to the target database; A simulation module is used to build a simulation environment using the target database, and copy any business traffic and input it into the simulation environment for processing to obtain simulation processing results; The database switching module is used to obtain the actual execution result of the arbitrary business traffic, and when the simulation processing result and the actual execution result meet the database switching condition, switch the database to be replaced to the target database.
8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the database and middleware decoupling replacement method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the database and middleware decoupling and replacement method as described in any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the database and middleware decoupling and replacement method described in any one of claims 1 to 6 is implemented.