Application production method and device, electronic equipment and program product
By evaluating and optimizing the time it takes to change data tables, and utilizing defragmentation, database and table sharding, and a data replication platform, we solved the business continuity issue during the production of applications and system versions, and achieved fast and seamless application version updates.
Patent Information
- Application Number
- CN202510794514.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-26
AI Technical Summary
During the production period of application and system versions, business cannot be executed, affecting business continuity. The platform system does not have mature basic services, and the downtime is long.
By evaluating the change time of the data tables of the applications to be put into production, implementing defragmentation and sharding optimization strategies, and using the data replication platform to make changes, business continuity is ensured.
The data table structure adjustment was completed within a limited time, ensuring business continuity and user service experience and reducing downtime.
Smart Images

Figure CN120704710A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and specifically, to an application production method, device, electronic equipment and program product. Background Art
[0002] With changes in payment methods and the rapid development of internet finance, customers are increasingly demanding continuous banking operations. This is especially true for time-sensitive transactions such as quick payments, aggregated payments, and phone banking reports of lost items, which necessitate 24 / 7 continuous service. Furthermore, to better serve customers, application systems require rapid version iterations, with four centralized release windows each year, each lasting approximately 120 minutes. Minimizing the impact on customer services during application and system releases has become a pressing issue. Therefore, an independent system is required to provide basic financial services to customers during primary site downtime.
[0003] During the production phase of application and system versions, business operations may be interrupted, impacting business continuity. The host system has an active-active system with a relatively mature basic service switching mechanism, which can minimize business impact. However, the platform system lacks mature basic services, resulting in longer downtime.
[0004] There is currently no effective solution to the problem that during the production period of application and system versions in related technologies, business execution cannot be carried out, business continuity is affected, the platform system does not have mature basic services, and downtime is long. Summary of the Invention
[0005] The main purpose of this application is to provide an application commissioning method, device, electronic equipment and program product to solve the problems in related technologies that during the commissioning of application and system versions, business cannot be executed, affecting business continuity, the platform system does not have mature basic services, and the downtime is long.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for application commissioning is provided, which includes: determining a first data table related to the application to be commissioned in a first storage space, evaluating the time required to change the first data table during the commissioning process, and obtaining a first duration; when the first duration is greater than a preset duration, optimizing the first data table through a preset optimization strategy to obtain a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation, database and table sharding; evaluating the time required to change the second data table during the commissioning process to obtain a second duration; when the second duration is greater than the preset duration, changing the second data table based on a data replication platform, and performing a commissioning operation on the application to be commissioned.
[0007] Furthermore, the time required to change the first data table during the production process is evaluated to obtain a first duration, including: determining the operation type of the change operation of the first data table during the production process, wherein the operation type includes at least one of the following: a first type of operation and a second type of operation, the first type of operation at least includes: adding an index, and the second type of operation includes at least one of the following: deleting a primary key, adding a new primary key, adding a new field, deleting a field, modifying the field sort, modifying the field type, setting whether a field is empty, modifying the data table character set, rebuilding the data table, re-specifying the number of partitions, changing a non-partitioned table to a partitioned table, adding a new partition, deleting a partition, cleaning up partition fragments, changing a partitioned table to a non-partitioned table, moving a partition table space, analyzing or checking partitions, and rebuilding or recovering partitions; calculating the first duration based on the operation type of the change operation of the first data table and the index reconstruction speed, wherein the index reconstruction speed is determined based on the fragmentation rate of the storage space where the first data table is located.
[0008] Furthermore, the first duration is calculated based on the operation type and index reconstruction speed of the change operation of the first data table, including: calculating the index data volume of the first data table based on the primary key field length of the first data table, the index field length of the first data table and the number of data items in the first data table; calculating the data table data volume of the first data table based on the data length of each data item in the first data table and the number of data items in the first data table, or calculating the data table data volume of the first data table based on the data length of each data item in the first data table and the number of partitions of the first data table; when the change operation of the first data table belongs to the first type of operation, the first duration is calculated based on the index data volume and index reconstruction speed of the first data table; when the change operation of the first data table belongs to the second type of operation, the first duration is calculated based on the data table data volume and index reconstruction speed of the first data table.
[0009] Furthermore, the first duration is calculated based on the operation type of the change operation of the first data table and the index reconstruction speed, including: when the data volume of the first data table is less than a preset value, determining the first duration corresponding to the data volume of the first data table based on the data volume of the first data table and the fragmentation rate of the first data table; when the data volume of the first data table is greater than or equal to the preset value, compressing the data volume of the first data table using a preset algorithm to obtain a compressed first data table; determining the first duration corresponding to the data volume of the compressed first data table based on the data volume of the compressed first data table and the fragmentation rate of the compressed first data table; when the data volume of the compressed first data table is greater than or equal to the preset value, modifying the data table structure of the first data table using a preset algorithm, and determining the first duration based on the modified first data table.
[0010] Furthermore, the second data table is changed based on the data replication platform, and the application to be put into production is put into production, including: copying the data in the first storage space to the second storage space, and intercepting the first service request involving the application to be put into production during the copying process; after copying the data in the first storage space to the second storage space, changing the second data table in the first storage space, and receiving the first service request at the same time, connecting the application to be put into production to the second storage space, and synchronizing the incremental data in the second storage space to the first storage space through the message queue; putting the application to be put into production into production, and after the commissioning of the application to be put into production is completed and the incremental data in the second storage space is successfully synchronized to the first storage space, connecting the put-in-production application to the updated first storage space to successfully put the application to be put into production into production.
[0011] Furthermore, a first data table in the first storage space that involves an application to be put into production is determined, and the time required to change the first data table during the production process is evaluated to obtain a first duration, including: obtaining a data table in the first storage space, and judging whether the data table involves basic business functions, wherein the basic business functions include at least one of the following: deposits and withdrawals, transactions, and reporting lost; if the data table involves the basic business functions, judging whether the data table involves metadata modification operations of the database, wherein the metadata modification operations include at least one of the following: deleting a data table, deleting an index, and renaming a data table field; if the data table involves the basic business functions and the data table involves the metadata modification operations of the database, executing the step of evaluating the time required to change the first data table during the production process to obtain the first duration; if the data table does not involve the basic business functions, or the data table does not involve the metadata modification operations of the database, directly putting the data table into production.
[0012] Furthermore, before evaluating the time required to change the first data table during the production process and obtaining the first duration, the method also includes: determining the data table structure based on the basic business functions corresponding to the application to be put into production; expanding the data table structure based on the spare fields and spare table information to obtain the expanded data table structure; receiving business data, and filling the expanded data table structure based on the business data to obtain the first data table involving the basic business functions.
[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an application commissioning device is provided, which includes: a first evaluation unit, used to determine a first data table related to the application to be commissioned in the first storage space, and evaluate the time required to change the first data table during the commissioning process to obtain a first duration; an optimization unit, used to optimize the first data table through a preset optimization strategy when the first duration is greater than a preset duration to obtain a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation, sharding; a second evaluation unit, used to evaluate the time required to change the second data table during the commissioning process to obtain a second duration; a commissioning unit, used to change the second data table based on a data replication platform when the second duration is greater than the preset duration, and perform commissioning operations on the application to be commissioned.
[0014] Furthermore, the first evaluation unit includes: a determination subunit, used to determine the operation type of the change operation of the first data table during the production process, wherein the operation type includes at least one of the following: a first type of operation, a second type of operation, the first type of operation at least includes: adding an index, and the second type of operation includes at least one of the following: deleting a primary key, adding a new primary key, adding a new field, deleting a field, modifying the field sort, modifying the field type, setting whether a field is empty, modifying the data table character set, rebuilding the data table, re-specifying the number of partitions, changing a non-partitioned table to a partitioned table, adding a new partition, deleting a partition, cleaning up partition fragments, changing a partitioned table to a non-partitioned table, moving partition table space, analyzing or checking partitions, and rebuilding or restoring partitions; a calculation subunit, used to calculate the first duration based on the operation type of the change operation of the first data table and the index reconstruction speed, wherein the index reconstruction speed is determined based on the fragmentation rate of the storage space where the first data table is located.
[0015] Furthermore, the calculation subunit includes: a first calculation module, used to calculate the index data volume of the first data table based on the primary key field length of the first data table, the index field length of the first data table and the number of data items in the first data table; a second calculation module, used to calculate the data table data volume of the first data table based on the data length of each data item in the first data table and the number of data items in the first data table, or to calculate the data table data volume of the first data table based on the data length of each data item in the first data table and the number of partitions of the first data table; a third calculation module, used to calculate the first duration based on the index data volume and index reconstruction speed of the first data table when the change operation of the first data table belongs to the first category of operation; a fourth calculation module, used to calculate the first duration based on the data table data volume and index reconstruction speed of the first data table when the change operation of the first data table belongs to the second category of operation.
[0016] Furthermore, the calculation subunit includes: a first determination module, used to determine the first duration corresponding to the data volume of the first data table based on the data volume of the first data table and the fragmentation rate of the first data table when the data volume of the first data table is less than a preset value; a compression module, used to compress the data volume of the first data table using a preset algorithm to obtain a compressed first data table when the data volume of the first data table is greater than or equal to the preset value; a second determination module, used to determine the first duration corresponding to the data volume of the compressed first data table based on the data volume of the compressed first data table and the fragmentation rate of the compressed first data table; a third determination module, used to modify the data table structure of the first data table using a preset algorithm when the data volume of the compressed first data table is greater than or equal to the preset value, and determine the first duration based on the modified first data table.
[0017] Furthermore, the production unit includes: a replication sub-unit, used to copy the data in the first storage space to the second storage space, and intercept the first service request involving the application to be put into production during the replication process; a synchronization sub-unit, used to change the second data table in the first storage space after copying the data in the first storage space to the second storage space, and at the same time receive the first service request, connect the application to be put into production to the second storage space, and synchronize the incremental data in the second storage space to the first storage space through the message queue; a first production sub-unit, used to put the application to be put into production into production, and after the production of the application to be put into production is completed and the incremental data in the second storage space is successfully synchronized to the first storage space, connect the put-in-production application to the updated first storage space to ensure that the application to be put into production is successfully put into production.
[0018] Furthermore, the first evaluation unit includes: a first judgment sub-unit, used to obtain the data table in the first storage space, and judge whether the data table involves basic business functions, wherein the basic business functions include at least one of the following: deposits and withdrawals, transactions, and reporting lost; a second judgment sub-unit, used to judge whether the data table involves metadata modification operations of the database when the data table involves the basic business functions, wherein the metadata modification operations include at least one of the following: deleting a data table, deleting an index, and renaming a data table field; an evaluation sub-unit, used to, when the data table involves the basic business functions and the data table involves the metadata modification operations of the database, perform a step of evaluating the time required to change the first data table during the commissioning process to obtain a first duration; a second commissioning sub-unit, used to, when the data table does not involve the basic business functions or the data table does not involve the metadata modification operations of the database, directly perform the commissioning process on the data table.
[0019] Furthermore, the device also includes: a determination unit, used to evaluate the time required to change the first data table during the production process, and determine the data table structure based on the basic business functions corresponding to the application to be put into production before obtaining the first duration; an expansion unit, used to expand the data table structure based on the spare fields and spare table information to obtain the expanded data table structure; a filling unit, used to receive business data, and fill the expanded data table structure based on the business data to obtain the first data table involving the basic business functions.
[0020] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements any one of the above-mentioned application commissioning methods, and which, when executed by a processor, implements the steps of the application commissioning method described in each embodiment of the present application.
[0021] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes stored computer instructions, wherein when the computer instructions are executed by a processor, any one of the above-mentioned application commissioning methods is implemented.
[0022] In order to achieve the above-mentioned purpose, according to one aspect of the present application, an electronic device is provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned application commissioning methods.
[0023] In an embodiment of the present application, by determining the first data table related to the application to be put into production in the first storage space, the time required for changing the first data table during the production process is evaluated to obtain a first duration; when the first duration is greater than the preset duration, the first data table is optimized through a preset optimization strategy to obtain a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation, sharding; the time required for changing the second data table during the production process is evaluated to obtain a second duration; when the second duration is greater than the preset duration, the second data table is changed based on the data replication platform, and the application to be put into production is put into production, thereby solving the technical problems that during the application and system version production period, business execution cannot be achieved, business continuity is affected, the platform system does not have mature basic services, and downtime is long.
[0024] By determining the first data table associated with the application to be put into production in the first storage space and accurately evaluating the first time required to change these data tables, the risk of service interruption can be effectively identified, achieving the technical effect of pre-planning and controlling the potential business impact during the application version production process. At the same time, for the first data table that exceeds the preset time, by implementing preset optimization strategies such as defragmentation, database and table sharding, it is converted into a second data table, which speeds up the originally lengthy change operation and achieves the goal of completing the data table structure adjustment within the limited time, further achieving the technical effect of optimizing business continuity management. In addition, if the second time is still not met, the second data table is changed with the help of the data replication platform, and the application production operation is carried out simultaneously, ensuring seamless service switching and data consistency, and achieving the smooth promotion of application version updates without affecting the customer experience, thereby achieving the technical effect of maintaining business continuity and user service experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0026] Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) for implementing an application commissioning method according to Example 1 of the present application;
[0027] Figure 2 This is a flow chart of an optional application production method provided in Example 1 of the present application;
[0028] Figure 3 This is a schematic diagram of a process for performing a production operation on an application to be put into production based on an optional data replication platform according to Example 1 of the present application;
[0029] Figure 4 This is a flowchart of an optional application commissioning provided in Example 1 of the present application;
[0030] Figure 5 This is a schematic diagram of an application production device provided in Example 2 of the present application;
[0031] Figure 6 This is a schematic diagram of an electronic device put into production according to Example 3 of the present application. DETAILED DESCRIPTION
[0032] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0033] It should be noted that the methods and devices determined by the processing methods, devices, storage media and electronic devices of this application document can be used in the financial technology field to reduce downtime during the production of applications and system versions, and can also be used in any field other than the financial technology field. The application fields of the methods and devices of the processing methods, devices, storage media and electronic devices of this application document are not limited.
[0034] It should be noted that the collected information (including but not limited to user device information, user personal information, collected data, used data, generated data, processed data, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, collected information, used information, generated information, processed information, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.
[0035] Example 1
[0036] According to an embodiment of the present application, an embodiment of a method for putting an application into production is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing the application production method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (illustrated as 102a, 102 applications, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (US application) port (which may be included as one of the ports of the US application bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0038] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the application production method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned application production method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.
[0041] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0042] Under the above operating environment, this application provides Figure 2 The application commissioning method shown. Figure 2 This is a flow chart of the application production method according to Example 1 of the present application.
[0043] Step S201 : determining a first data table related to an application to be put into production in a first storage space, and evaluating the time required for changing the first data table during the production process to obtain a first duration.
[0044] In this first embodiment, in order to reduce service interruption time caused by table structure changes, during the implementation of the application version production, it is first necessary to identify the data tables (first data tables) directly associated with the application to be launched in the current primary storage environment (first storage space). Then, based on the current production environment, the time consumption of specific operations to modify these first data tables (for example, adding fields, rebuilding indexes, etc.) is quantitatively analyzed to derive the estimated duration (first duration) of modifying the first data tables during the production phase.
[0045] Step S202 : When the first duration is greater than a preset duration, the first data table is optimized using a preset optimization strategy to obtain a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation and database and table sharding.
[0046] In this first embodiment, when the assessed first duration exceeds a preset downtime tolerance threshold (e.g., 20 minutes), it indicates that directly modifying the first data table will cause unacceptable service interruption. In this case, a preset optimization strategy is executed to shorten the data table modification time. The optimization strategy includes at least two options: defragmentation and database and table sharding.
[0047] Defragmentation improves database performance by reorganizing data within tables, reducing free space and speeding up table structure modification operations. This can alleviate operational inefficiencies previously caused by excessive free space, helping to shorten service interruptions.
[0048] The sharding strategy involves splitting large tables into smaller parts, storing them in different databases or servers. This reduces the amount of data required to modify a single table structure, thereby reducing operation time. This strategy is particularly suitable for large primary tables. By splitting them into secondary tables, the initial modification time can be significantly reduced, ensuring service continuity.
[0049] Step S203: Evaluate the time required to change the second data table during the production process to obtain a second duration.
[0050] In this embodiment 1, after completing the preset optimization strategy for the first data table, a second data table is generated that has undergone defragmentation or database and table sharding. Next, the platform database change operation time consumption evaluation standard is applied again to perform a time quantification analysis on the second data table that will be changed in the production process. This process involves calculating the estimated time consumption of various database operations (such as field addition and deletion, index adjustment) implemented on the second data table, taking into account the data volume of a single table and the current level of fragmentation, to obtain an accurate estimate of the time required to change the second data table, that is, the second duration.
[0051] Step S204 : When the second time period is longer than the preset time period, the second data table is changed based on the data replication platform, and the application to be put into production is put into production.
[0052] In this first embodiment, if the second duration determined by the evaluation still exceeds the preset duration threshold, it indicates that traditional optimization methods are insufficient to complete the data table change within the specified time. In this case, the application to be put into production is put into production using the data replication platform. This allows the change to the second data table and the application version upgrade to be completed without extending the preset interruption time, thereby ensuring business continuity.
[0053] Optionally, in the application commissioning method provided in Example 1 of the present application, the time required to change the first data table during the commissioning process is evaluated to obtain a first duration, including: determining the operation type of the change operation of the first data table during the commissioning process, wherein the operation type includes at least one of the following: first-category operations and second-category operations, the first-category operations at least include: adding new indexes, and the second-category operations include at least one of the following: deleting primary keys, adding new primary keys, adding new fields, deleting fields, modifying field sorting, modifying field types, setting whether fields are empty, modifying data table character sets, rebuilding data tables, re-specifying the number of partitions, changing non-partitioned tables to partitioned tables, adding new partitions, deleting partitions, cleaning up partition fragments, changing partitioned tables to non-partitioned tables, moving partition table space, analyzing or checking partitions, and rebuilding or recovering partitions; calculating the first duration based on the operation type of the change operation of the first data table and the index reconstruction speed, wherein the index reconstruction speed is determined based on the fragmentation rate of the storage space where the first data table is located.
[0054] In this embodiment 1, change operations on the first data table involved in the production process are identified, and these change operations are subdivided into two categories, where the first category of operations at least includes: adding a new index, and the second category of operations can include: deleting a primary key, adding a new primary key, deleting a field, modifying the field sort and type, adjusting field constraints, converting the data table character set, rebuilding the data table, re-specifying the number of partitions, converting between non-partitioned tables and partitioned tables, cleaning up partition fragments, migrating partition table space and partition analysis, inspection, reconstruction and recovery, adding a new field, adding a new partition, and deleting a partition.
[0055] Then, for each change operation, the exact time required to change the first data table is calculated based on the operation type and the specific index rebuild speed. This is defined as the first duration. It is important to note that the index rebuild speed is not a fixed value but is dynamically adjusted based on the fragmentation rate of the storage space where the first data table resides. A higher fragmentation rate results in a slower rebuild speed, which in turn affects the calculation of the first duration.
[0056] In an optional embodiment, different modification operations on the first data table have different corresponding time consumptions, as shown in Table 1. It should be noted that for data table modification operations that take seconds, production can be put into operation without stopping the system, and the corresponding time consumption of the modification operation does not need to be calculated.
[0057] Table 1
[0058]
[0059]
[0060] For database changes that extend the length of a VARCHAR field, assuming that the C1 field was originally a VARCHAR(m) and the ALTER TABLE t1 MODIFY c1 VARCHAR(n) statement is executed, the following scenarios do not require a table rebuild: First, for tables using the utf8mb4 character set, both m and n are less than 64, or both m and n are greater than or equal to 64; second, for tables using the utf8 character set, both m and n are less than 86, or both m and n are greater than or equal to 86; third, for tables using the GBK character set, both m and n are less than 128, or both m and n are greater than or equal to 128. In other scenarios, extending the length of a VARCHAR field requires a table rebuild, which takes time proportional to the amount of data in the entire table (approximately data volume divided by rebuild speed).
[0061] By finely classifying change operation types and combining index reconstruction speed with storage space fragmentation, we scientifically calculate the actual time required to change the first data table. This provides accurate data for formulating effective production strategies, helps balance the needs of system updates and business operations, and avoids the inconvenience caused by long-term downtime to user services.
[0062] Optionally, in the application commissioning method provided in Example 1 of the present application, the first duration is calculated based on the operation type of the change operation of the first data table and the index reconstruction speed, including: calculating the index data volume of the first data table based on the primary key field length of the first data table, the index field length of the first data table and the number of data items in the first data table; calculating the data table data volume of the first data table based on the data length of each data item in the first data table and the number of data items in the first data table, or calculating the data table data volume of the first data table based on the data length of each data item in the first data table and the number of partitions of the first data table; when the change operation of the first data table belongs to the first type of operation, the first duration is calculated based on the index data volume of the first data table and the index reconstruction speed; when the change operation of the first data table belongs to the second type of operation, the first duration is calculated based on the data table data volume of the first data table and the index reconstruction speed.
[0063] In this first embodiment, the amount of index data in the first data table is calculated based on the total length of the primary key field, the total length of the index field, and the total number of records in the data table. The amount of index data is calculated by adding the length of the primary key field and the length of the index field, and then multiplying the sum by the number of data entries.
[0064] Then, the data volume of the first data table is estimated. This step is carried out according to two paths: for non-partitioned data tables, the average data length of each data item is multiplied by the number of data items; and for partitioned data tables, the data length of each partition is multiplied by the number of partitions to estimate the data volume of the entire data table.
[0065] Secondly, when the change operation of the first data table is classified as a first type of operation, ie, involving adding a new index, the first duration required to execute the change operation is calculated using the ratio between the index data volume and the index rebuilding speed.
[0066] Finally, if the change operation on the first data table belongs to the second type of operation, a first duration required to implement such change operation is calculated based on the ratio between the previously acquired data volume of the data table and the index rebuilding speed.
[0067] Through refined calculations of data volume and reconstruction speed, specific time assessment standards are provided for different types of change operations, ensuring that during version deployment or database structure changes, downtime can be accurately predicted and reasonably planned in advance, effectively supporting the maintenance of business continuity and system stability.
[0068] Optionally, in the application commissioning method provided in Example 1 of the present application, the first duration is calculated based on the operation type of the change operation of the first data table and the index reconstruction speed, including: when the data volume of the first data table is less than a preset value, determining the first duration corresponding to the data volume of the first data table based on the data volume of the first data table and the fragmentation rate of the first data table; when the data volume of the first data table is greater than or equal to the preset value, using a preset algorithm to compress the data volume of the first data table to obtain a compressed first data table; determining the first duration corresponding to the data volume of the compressed first data table based on the data volume of the compressed first data table and the fragmentation rate of the compressed first data table; when the data volume of the compressed first data table is greater than or equal to the preset value, using a preset algorithm to modify the data table structure of the first data table, and determining the first duration based on the modified first data table.
[0069] In this embodiment 1, if the data volume of the first data table is less than a preset value (for example, 50G), the first duration corresponding to the data volume can be determined based on the data volume of the first data table and the fragmentation rate of the first data table, that is, the time required to perform the change operation. For example, for data tables within 5G, the table structure modification can be completed within 5 minutes; for data tables from 5G to 50G, and when the fragmentation rate of the data table is less than 10%, the table structure modification can be completed within 10 minutes. For data tables larger than 50G or with a fragmentation rate higher than 10%, the actual table data volume can be compressed by methods such as data cleaning and defragmentation (that is, the above-mentioned preset algorithm) to obtain the above-mentioned compressed first data table. If it is still larger than 50G on this basis, it can be further considered to dismantle the database and table or other methods to modify the compressed first data table. The corresponding first duration is determined based on the data volume and fragmentation rate of the modified first data table to provide a time basis for the final implementation of the change operation.
[0070] The above steps can accurately calculate the actual time consumption of the change operation, while minimizing the impact of table structure updates or data volume adjustments on business continuity, ensuring the efficient execution of the change operation. Through step-by-step analysis and optimization, scientific guidance is provided for time management during system maintenance and upgrades.
[0071] Optionally, in the application commissioning method provided in Example 1 of the present application, the second data table is changed based on the data replication platform, and the commissioning operation is performed on the application to be commissioned, including: copying the data in the first storage space to the second storage space, and intercepting the first service request involving the application to be commissioned during the copying process; after copying the data in the first storage space to the second storage space, changing the second data table in the first storage space, and receiving the first service request at the same time, connecting the application to be commissioned to the second storage space, and synchronizing the incremental data in the second storage space to the first storage space through the message queue; commissioning the application to be commissioned, and after the commissioning of the application to be commissioned is completed and the incremental data in the second storage space is successfully synchronized to the first storage space, connecting the commissioned application to the updated first storage space to ensure successful commissioning of the application to be commissioned.
[0072] In this embodiment 1, Figure 3 This is a flowchart of the production operation of the production application based on the data replication platform.
[0073] First, the original primary cluster (ie the first storage space mentioned above, such as Figure 3 The data in the master database in the data replication platform is completely copied and located in the pre-prepared backup cluster (secondary storage space, such as Figure 3 The new database (master) in the database is replicated to ensure data consistency and integrity. Then, while the data is being replicated, the application layer initiates a service request interception mechanism to prevent new requests from entering, thus creating a stable environment for application updates.
[0074] Then, after the data copy is completed, the necessary table structure upgrade or existing data migration processing is performed on the optimized second data table in the first storage space. At the same time, the standby cluster begins to receive and process service requests and starts reverse synchronization of incremental data, that is, the new data generated in the second storage space since the last full copy is sent back to the message queue. The message queue transfers the incremental data to the first storage space where the version upgrade has been completed, ensuring real-time synchronization between the primary and standby clusters.
[0075] Finally, perform the version upgrade of the application to be put into production. After confirming that the update of the application to be put into production has been successfully completed and the incremental data in the second storage space has been synchronized to the first storage space without omission, the service request interception is released, and the new application after production is redirected to the original primary cluster, that is, the first storage space, to resume normal service provision, ensuring business continuity and the latest data status.
[0076] Through the above steps, it is possible to update applications and adjust databases without affecting external services, achieving the technical effect of improving business continuity. At the same time, through the strategy of data replication and incremental synchronization, data consistency is maintained, a smooth transition is achieved, and the technical effect of reducing business interruption time and optimizing customer experience is further achieved.
[0077] Optionally, in the application commissioning method provided in Example 1 of the present application, a first data table in the first storage space involving the application to be commissioned is determined, and the time required to change the first data table during the commissioning process is evaluated to obtain a first duration, including: obtaining the data table in the first storage space, and judging whether the data table involves basic business functions, wherein the basic business functions include at least one of the following: deposits and withdrawals, transactions, and reporting lost; in the case where the data table involves basic business functions, judging whether the data table involves metadata modification operations of the database, wherein the metadata modification operations include at least one of the following: deleting a data table, deleting an index, and renaming a data table field; in the case where the data table involves basic business functions and the data table involves metadata modification operations of the database, executing the step of evaluating the time required to change the first data table during the commissioning process to obtain the first duration; in the case where the data table does not involve basic business functions, or the data table does not involve metadata modification operations of the database, directly performing the commissioning process on the data table.
[0078] In this embodiment 1, all data tables in the first storage space are identified, and each data table is analyzed to determine whether it carries basic business functions. Basic business functions refer to an application that supports core business. During the production period of the application version, the basic, core business functions are ensured to be continuously provided to the outside world through rolling upgrades, database master-slave switching, and other solutions. They are used to provide basic financial service transactions during version downtime, including but not limited to: ATM deposits and withdrawals, POS consumption, telephone banking reporting of loss, third-party quick payment, B2C payment, and other services.
[0079] Next, for data tables determined to be relevant to essential business functions, further review is conducted to determine whether they involve modifications to database metadata, including but not limited to deleting tables or indexes and renaming fields. Secondly, once a specific data table is confirmed to be relevant to essential business functions and involves metadata modifications, the estimated time required to modify that table during the rollout process is calculated, defined as the first duration.
[0080] Finally, for data tables that do not touch basic business functions or involve metadata modification, no additional evaluation is required and they can directly enter the production process to implement version upgrades or other changes to ensure the update efficiency and security of non-critical data tables.
[0081] Through this series of steps, we can accurately identify and evaluate the time required to change key data tables, thereby formulating a reasonable production strategy to ensure that data tables involving basic business functions are properly handled during the update process. At the same time, it accelerates the update process of non-critical data tables, thereby improving the efficiency of system version production and business continuity as a whole.
[0082] Optionally, in the application commissioning method provided in Example 1 of the present application, before evaluating the time required to change the first data table during the commissioning process to obtain the first duration, the above method also includes: determining the data table structure based on the basic business functions corresponding to the application to be commissioned; expanding the data table structure based on the spare fields and spare table information to obtain the expanded data table structure; receiving business data, and filling the expanded data table structure based on the business data to obtain the first data table involving the basic business functions.
[0083] In this embodiment 1, based on the specific basic business functions supported by the application to be put into production, the data table structure requirements associated with it are clarified. These basic business functions generally include financial services such as deposits and withdrawals, transactions, and reporting of losses. Then, based on the spare fields and spare table information reserved at the beginning of the system design, an extension operation is performed on the established data table structure, aiming to enhance the flexibility of the data table and its ability to adapt to future version upgrades. Secondly, after the data table structure is expanded, the system receives various types of data from the business front end, and fills these expanded data table structures with data based on the actual business data content received, to ensure that the data table can correctly reflect the business status. Finally, the data table after data filling forms the first data table involving the basic business functions.
[0084] Through the above process, the system can dynamically adjust the data table structure according to the basic business functional requirements of the application, and expand it in a timely manner through reserved spare fields and tables, ensuring that the data table can not only meet current functional requirements but also have the potential to cope with future version upgrades, ultimately achieving smooth and orderly version updates and reducing the impact of data table structure adjustments on business continuity.
[0085] Optionally, in this embodiment 1, Figure 4This is a flowchart for the application launch. First, the application layer initiates a comprehensive analysis of the table structure to be changed, and quantitatively evaluates the downtime that may be caused by directly changing these table structures during the version update, which is marked as the first duration. Then, based on the first duration, the system automatically determines whether the preset 20-minute downtime limit is met. If the first duration is within the limit, the shutdown operation is directly executed to change the table structure. No additional optimization is required at this stage. Secondly, if the preliminary assessment shows that the first duration exceeds 20 minutes, the system will immediately trigger the preset optimization strategy, including but not limited to defragmentation to reduce data processing time, or take measures such as sharding to reduce data pressure. The goal is to compress the downtime to within 20 minutes without affecting data consistency and integrity. Finally, even after the aforementioned optimization, if the expected downtime for changing the table structure still exceeds 20 minutes, the system will adopt a redundant service solution based on the data replication platform. This solution pre-copies basic services to the backup cluster before the update, ensuring that when the main cluster undergoes a major update, the backup cluster can seamlessly take over and provide services, minimizing the impact on customers until the main cluster is updated. Data synchronization and service switching are then performed to restore full-function services.
[0086] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0087] To sum up, the application commissioning method provided in the embodiment of the present application determines the first data table related to the application to be commissioned in the first storage space, evaluates the time required for changing the first data table during the commissioning process, and obtains a first duration; when the first duration is greater than the preset duration, the first data table is optimized through a preset optimization strategy to obtain a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation, database and table sharding; the time required for changing the second data table during the commissioning process is evaluated to obtain a second duration; when the second duration is greater than the preset duration, the second data table is changed based on the data replication platform, and the commissioning operation is performed on the application to be commissioned, which solves the problems in related technologies that during the commissioning of applications and system versions, business cannot be executed, affecting business continuity, the platform system does not have mature basic services, and the downtime is long.
[0088] By determining the first data table associated with the application to be put into production in the first storage space and accurately evaluating the first time required to change these data tables, the risk of service interruption can be effectively identified, achieving the technical effect of pre-planning and controlling the potential business impact during the application version production process. At the same time, for the first data table that exceeds the preset time, by implementing preset optimization strategies such as defragmentation, database and table sharding, it is converted into a second data table, which speeds up the originally lengthy change operation and achieves the goal of completing the data table structure adjustment within the limited time, further achieving the technical effect of optimizing business continuity management. In addition, if the second time is still not met, the second data table is changed with the help of the data replication platform, and the application production operation is carried out simultaneously, ensuring seamless service switching and data consistency, and achieving the smooth promotion of application version updates without affecting the customer experience, thereby achieving the technical effect of maintaining business continuity and user service experience.
[0089] Example 2
[0090] The present application also provides an application production device. It should be noted that the application production device of the present application can be used to execute the application production method provided in the present application. The application production device provided in the present application is introduced below.
[0091] According to an embodiment of the present application, a device for implementing the above-mentioned application production method is also provided, such as Figure 5 As shown, the device includes:
[0092] Specifically, the first evaluation unit 501 is configured to determine a first data table related to the application to be put into production in the first storage space, and evaluate the time required to change the first data table during the production process to obtain a first duration.
[0093] The optimization unit 502 is used to optimize the first data table by a preset optimization strategy to obtain a second data table when the first duration is greater than a preset duration, wherein the preset optimization strategy includes at least one of the following: defragmentation and database and table sharding.
[0094] The second evaluation unit 503 is configured to evaluate the time required for changing the second data table during the production process to obtain a second duration.
[0095] The production unit 504 is configured to change the second data table based on the data replication platform and perform a production operation on the application to be put into production when the second time period is greater than a preset time period.
[0096] The application commissioning device provided in the embodiment of the present application determines the first data table related to the application to be commissioned in the first storage space through the first evaluation unit 501, evaluates the time required for changing the first data table during the commissioning process, and obtains a first duration; the optimization unit 502 optimizes the first data table through a preset optimization strategy when the first duration is greater than the preset duration, and obtains a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation, database and table sharding; the second evaluation unit 503 evaluates the time required for changing the second data table during the commissioning process, and obtains a second duration; the commissioning unit 504 changes the second data table based on the data replication platform when the second duration is greater than the preset duration, and performs commissioning operations on the application to be commissioned, thereby solving the problems in related technologies of the inability to execute business during the commissioning of applications and system versions, affecting business continuity, the platform system lacking mature basic services, and long downtime.
[0097] By determining the first data table associated with the application to be put into production in the first storage space and accurately evaluating the first time required to change these data tables, the risk of service interruption can be effectively identified, achieving the technical effect of pre-planning and controlling the potential business impact during the application version production process. At the same time, for the first data table that exceeds the preset time, by implementing preset optimization strategies such as defragmentation, database and table sharding, it is converted into a second data table, which speeds up the originally lengthy change operation and achieves the goal of completing the data table structure adjustment within the limited time, further achieving the technical effect of optimizing business continuity management. In addition, if the second time is still not met, the second data table is changed with the help of the data replication platform, and the application production operation is carried out simultaneously, ensuring seamless service switching and data consistency, and achieving the smooth promotion of application version updates without affecting the customer experience, thereby achieving the technical effect of maintaining business continuity and user service experience.
[0098] Optionally, in the application commissioning device provided in Example 2 of the present application, the above-mentioned first evaluation unit 501 includes: a determination subunit, used to determine the operation type of the change operation of the first data table during the commissioning process, wherein the operation type includes at least one of the following: first-category operations, second-category operations, the first-category operations at least include: adding a new index, and the second-category operations include at least one of the following: deleting a primary key, adding a new primary key, adding a new field, deleting a field, modifying the field sort, modifying the field type, setting whether a field is empty, modifying the data table character set, rebuilding the data table, re-specifying the number of partitions, changing a non-partitioned table to a partitioned table, adding a new partition, deleting a partition, cleaning up partition fragments, changing a partitioned table to a non-partitioned table, moving partition table space, analyzing or checking partitions, and rebuilding or recovering partitions; a calculation subunit, used to calculate the first duration based on the operation type of the change operation of the first data table and the index reconstruction speed, wherein the index reconstruction speed is determined based on the fragmentation rate of the storage space where the first data table is located.
[0099] Optionally, in the application commissioning device provided in Example 2 of the present application, the above-mentioned calculation sub-unit includes: a first calculation module, used to calculate the index data volume of the first data table based on the primary key field length of the first data table, the index field length of the first data table and the number of data items in the first data table; a second calculation module, used to calculate the data table data volume of the first data table based on the data length of each data item in the first data table and the number of data items in the first data table, or to calculate the data table data volume of the first data table based on the data length of each data item in the first data table and the number of partitions of the first data table; a third calculation module, used to calculate the first duration based on the index data volume of the first data table and the index reconstruction speed when the change operation of the first data table belongs to the first type of operation; a fourth calculation module, used to calculate the first duration based on the data table data volume and the index reconstruction speed of the first data table when the change operation of the first data table belongs to the second type of operation.
[0100] Optionally, in the application commissioning device provided in Example 2 of the present application, the above-mentioned calculation sub-unit includes: a first determination module, which is used to determine the first duration corresponding to the data volume of the first data table based on the data volume of the first data table and the fragmentation rate of the first data table when the data volume of the first data table is less than a preset value; a compression module, which is used to compress the data volume of the first data table using a preset algorithm to obtain a compressed first data table when the data volume of the first data table is greater than or equal to a preset value; a second determination module, which is used to determine the first duration corresponding to the data volume of the compressed first data table based on the data volume of the compressed first data table and the fragmentation rate of the compressed first data table; a third determination module, which is used to modify the data table structure of the first data table using a preset algorithm when the data volume of the compressed first data table is greater than or equal to the preset value, and determine the first duration based on the modified first data table.
[0101] Optionally, in the application commissioning device provided in Example 2 of the present application, the above-mentioned commissioning unit 504 includes: a copying sub-unit, used to copy the data in the first storage space to the second storage space, and intercept the first service request involving the application to be commissioned during the copying process; a synchronization sub-unit, used to change the second data table in the first storage space after copying the data in the first storage space to the second storage space, and at the same time receive the first service request, connect the application to be commissioned to the second storage space, and synchronize the incremental data in the second storage space to the first storage space through the message queue; a first commissioning sub-unit, used to commission the application to be commissioned, and after the commissioning of the application to be commissioned is completed and the incremental data in the second storage space is successfully synchronized to the first storage space, connect the commissioned application to the updated first storage space to ensure that the application to be commissioned is successfully commissioned.
[0102] Optionally, in the application commissioning device provided in Example 2 of the present application, the above-mentioned first evaluation unit 501 includes: a first judgment sub-unit, used to obtain the data table in the first storage space, and determine whether the data table involves basic business functions, wherein the basic business functions include at least one of the following: deposits and withdrawals, transactions, and reporting lost; a second judgment sub-unit, used to determine whether the data table involves metadata modification operations of the database when the data table involves basic business functions, wherein the metadata modification operations include at least one of the following: deleting the data table, deleting the index, and renaming the data table field; an evaluation sub-unit, used to evaluate the time required to change the first data table during the commissioning process and obtain a first duration when the data table involves basic business functions and the data table involves metadata modification operations of the database; a second commissioning sub-unit, used to directly perform the commissioning process on the data table when the data table does not involve basic business functions or the data table does not involve metadata modification operations of the database.
[0103] Optionally, in the application commissioning device provided in Example 2 of the present application, the above-mentioned device also includes: a determination unit, used to evaluate the time required to change the first data table during the commissioning process, and before obtaining the first duration, determine the data table structure based on the basic business functions corresponding to the application to be commissioned; an expansion unit, used to expand the data table structure based on the spare fields and spare table information to obtain the expanded data table structure; a filling unit, used to receive business data, and fill the expanded data table structure based on the business data to obtain the first data table involving the basic business functions.
[0104] It should be noted that the first evaluation unit 501, optimization unit 502, second evaluation unit 503, and production unit 504 described above correspond to steps S201 to S204 in Example 1. The examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 1. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102 application production, ..., 102n). The above modules can also be run as part of a device in the computer terminal 10 provided in Example 1.
[0105] Example 3
[0106] An embodiment of the present application may provide an electronic device, Figure 6 This is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6Only one is shown) processor 602, memory 604, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0107] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0108] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: determine the first data table related to the application to be put into production in the first storage space, evaluate the time required to change the first data table during the production process, and obtain a first duration; when the first duration is greater than the preset duration, optimize the first data table through a preset optimization strategy to obtain a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation, database and table sharding; evaluate the time required to change the second data table during the production process to obtain a second duration; when the second duration is greater than the preset duration, change the second data table based on the data replication platform, and perform the production operation on the application to be put into production.
[0109] The processor can call information and applications stored in the memory through a transmission device to perform the following steps: evaluating the time required to change the first data table during the production process to obtain a first duration, including: determining the operation type of the change operation of the first data table during the production process, wherein the operation type includes at least one of the following: a first-category operation and a second-category operation, wherein the first-category operation at least includes: adding an index, and the second-category operation includes at least one of the following: deleting a primary key, adding a new primary key, adding a new field, deleting a field, modifying the field sort, modifying the field type, setting whether a field is empty, modifying the data table character set, rebuilding the data table, re-specifying the number of partitions, changing a non-partitioned table to a partitioned table, adding a new partition, deleting a partition, clearing partition fragments, changing a partitioned table to a non-partitioned table, moving a partition table space, analyzing or checking partitions, and rebuilding or recovering partitions; calculating the first duration based on the operation type of the change operation of the first data table and the index reconstruction speed, wherein the index reconstruction speed is determined based on the fragmentation rate of the storage space where the first data table is located.
[0110] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: calculate the first duration based on the operation type of the change operation of the first data table and the index reconstruction speed, including: calculating the index data volume of the first data table based on the primary key field length of the first data table, the index field length of the first data table and the number of data items in the first data table; calculating the data table data volume of the first data table based on the data length of each data item in the first data table and the number of data items in the first data table, or calculating the data table data volume of the first data table based on the data length of each data item in the first data table and the number of partitions of the first data table; when the change operation of the first data table belongs to the first type of operation, calculate the first duration based on the index data volume of the first data table and the index reconstruction speed; when the change operation of the first data table belongs to the second type of operation, calculate the first duration based on the data table data volume of the first data table and the index reconstruction speed.
[0111] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: calculate the first duration based on the operation type and index reconstruction speed of the change operation of the first data table, including: when the data volume of the first data table is less than a preset value, determine the first duration corresponding to the data volume of the first data table based on the data volume of the first data table and the fragmentation rate of the first data table; when the data volume of the first data table is greater than or equal to the preset value, use a preset algorithm to compress the data volume of the first data table to obtain a compressed first data table; determine the first duration corresponding to the data volume of the compressed first data table based on the data volume of the compressed first data table and the fragmentation rate of the compressed first data table; when the data volume of the compressed first data table is greater than or equal to the preset value, use a preset algorithm to modify the data table structure of the first data table, and determine the first duration based on the modified first data table.
[0112] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: change the second data table based on the data replication platform, and perform production operations on the application to be put into production, including: copying the data in the first storage space to the second storage space, and intercepting the first service request involving the application to be put into production during the copying process; after copying the data in the first storage space to the second storage space, changing the second data table in the first storage space, and receiving the first service request at the same time, connecting the application to be put into production to the second storage space, and synchronizing the incremental data in the second storage space to the first storage space through the message queue; putting the application to be put into production into production, and after the production of the application to be put into production is completed and the incremental data in the second storage space is successfully synchronized to the first storage space, connecting the put-in-production application to the updated first storage space to successfully put the application to be put into production into production.
[0113] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: determine the first data table in the first storage space that involves the application to be put into production, evaluate the time required to change the first data table during the production process, and obtain a first duration, including: obtaining the data table in the first storage space, and judging whether the data table involves basic business functions, wherein the basic business functions include at least one of the following: deposits and withdrawals, transactions, and reporting lost; when the data table involves basic business functions, judge whether the data table involves metadata modification operations of the database, wherein the metadata modification operations include at least one of the following: deleting the data table, deleting the index, and renaming the data table field; when the data table involves basic business functions and the data table involves metadata modification operations of the database, perform the step of evaluating the time required to change the first data table during the production process to obtain the first duration; when the data table does not involve basic business functions, or the data table does not involve metadata modification operations of the database, directly put the data table into production.
[0114] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: before evaluating the time required to change the first data table during the production process and obtaining the first duration, the above method also includes: determining the data table structure based on the basic business functions corresponding to the application to be put into production; expanding the data table structure based on the spare fields and spare table information to obtain the expanded data table structure; receiving business data, and filling the expanded data table structure based on the business data to obtain the first data table involving the basic business functions.
[0115] An embodiment of the present application is used to provide an application commissioning method. By determining a first data table related to an application to be commissioned in a first storage space, the time required to change the first data table during the commissioning process is evaluated to obtain a first duration; when the first duration is greater than a preset duration, the first data table is optimized through a preset optimization strategy to obtain a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation, sharding; the time required to change the second data table during the commissioning process is evaluated to obtain a second duration; when the second duration is greater than the preset duration, the second data table is changed based on a data replication platform, and the application to be commissioned is commissioned, thereby solving the technical problems that during the commissioning of applications and system versions, business cannot be executed, affecting business continuity, the platform system does not have mature basic services, and the downtime is long.
[0116] By determining the first data table associated with the application to be put into production in the first storage space and accurately evaluating the first time required to change these data tables, the risk of service interruption can be effectively identified, achieving the technical effect of pre-planning and controlling the potential business impact during the application version production process. At the same time, for the first data table that exceeds the preset time, by implementing preset optimization strategies such as defragmentation, database and table sharding, it is converted into a second data table, which speeds up the originally lengthy change operation and achieves the goal of completing the data table structure adjustment within the limited time, further achieving the technical effect of optimizing business continuity management. In addition, if the second time is still not met, the second data table is changed with the help of the data replication platform, and the application production operation is carried out simultaneously, ensuring seamless service switching and data consistency, and achieving the smooth promotion of application version updates without affecting the customer experience, thereby achieving the technical effect of maintaining business continuity and user service experience.
[0117] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 6 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 6 Different configurations shown.
[0118] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0119] Example 4
[0120] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the application production method provided in the first embodiment.
[0121] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0122] The present application also provides a computer program product which, when executed on a data processing device, is adapted to execute the steps of the application commissioning method.
[0123] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0124] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0125] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0126] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0127] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0129] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An application production method, characterized in that: include: Determining a first data table related to the application to be put into production in the first storage space, and evaluating a time required to change the first data table during the production process to obtain a first duration; When the first duration is greater than a preset duration, optimizing the first data table by a preset optimization strategy to obtain a second data table, wherein the preset optimization strategy includes at least one of the following: defragmentation, and sharding. Evaluate the time required to change the second data table during the production process to obtain a second duration; When the second time period is greater than the preset time period, the second data table is changed based on the data replication platform, and the application to be put into production is put into production.
2. The method according to claim 1, characterized in that The time required to change the first data table during the production process is evaluated to obtain a first duration, including: Determining an operation type of a change operation on the first data table during the production process, wherein the operation type includes at least one of the following: a first-category operation and a second-category operation, the first-category operation at least including: adding an index, and the second-category operation including at least one of the following: deleting a primary key, adding a primary key, adding a field, deleting a field, modifying a field sort, modifying a field type, setting whether a field is empty, modifying a data table character set, rebuilding a data table, re-specifying the number of partitions, changing a non-partitioned table to a partitioned table, adding a partition, deleting a partition, clearing partition fragments, changing a partitioned table to a non-partitioned table, moving partition table space, analyzing or checking partitions, and rebuilding or recovering partitions; The first duration is calculated based on an operation type of the change operation on the first data table and an index rebuilding speed, wherein the index rebuilding speed is determined based on a fragmentation rate of a storage space where the first data table is located.
3. The method according to claim 2, characterized in that Calculating the first duration according to the operation type of the change operation on the first data table and the index rebuilding speed includes: Calculating the index data volume of the first data table according to the length of the primary key field of the first data table, the length of the index field of the first data table, and the number of data entries in the first data table; Calculating the data table data volume of the first data table according to the data length of each data item in the first data table and the number of data items in the first data table, or calculating the data table data volume of the first data table according to the data length of each data item in the first data table and the number of partitions in the first data table; When the change operation on the first data table belongs to the first type of operation, the first duration is calculated according to the index data volume and index reconstruction speed of the first data table; When the change operation of the first data table belongs to the second type of operation, the first duration is calculated according to the data volume of the first data table and the index reconstruction speed.
4. The method according to claim 2, characterized in that Calculating the first duration according to the operation type of the change operation on the first data table and the index rebuilding speed includes: When the data volume of the first data table is less than a preset value, determining the first duration corresponding to the data volume of the first data table according to the data volume of the first data table and the fragmentation rate of the first data table; When the amount of data in the first data table is greater than or equal to the preset value, compressing the amount of data in the first data table using a preset algorithm to obtain a compressed first data table; determining the first duration corresponding to the data volume of the compressed first data table according to the data volume of the compressed first data table and the fragmentation rate of the compressed first data table; When the amount of data in the compressed first data table is greater than or equal to the preset value, a preset algorithm is used to modify the data table structure of the first data table, and the first duration is determined based on the modified first data table.
5. The method according to claim 1, wherein Changing the second data table based on the data replication platform and performing a production operation on the application to be put into production includes: copying the data in the first storage space to the second storage space, and intercepting a first service request related to the application to be put into production during the copying process; After copying the data in the first storage space to the second storage space, changing the second data table in the first storage space, receiving the first service request, connecting the application to be put into production to the second storage space, and synchronizing the incremental data in the second storage space to the first storage space through the message queue; Put the application to be put into production into production. After the production of the application to be put into production is completed and the incremental data in the second storage space is successfully synchronized to the first storage space, the put-in-production application is connected to the updated first storage space to successfully put the application to be put into production into production.
6. The method according to claim 1, wherein Determining a first data table related to an application to be put into production in a first storage space, and evaluating a time required to change the first data table during the production process to obtain a first duration, including: Obtaining a data table in the first storage space, and determining whether the data table involves a basic business function, wherein the basic business function includes at least one of the following: deposits and withdrawals, transactions, and loss reporting; In the case where the data table involves the basic business function, determining whether the data table involves a metadata modification operation of the database, wherein the metadata modification operation includes at least one of the following: deleting a data table, deleting an index, and renaming a data table field; When the data table involves the basic business function and the data table involves the metadata modification operation of the database, performing a step of evaluating the time required to modify the first data table during the production process to obtain a first duration; In the case where the data table does not involve the basic business functions, or the data table does not involve the metadata modification operation of the database, the data table is directly put into production.
7. The method according to claim 1, characterized in that Before evaluating the time required for changing the first data table during the production process to obtain the first duration, the method further includes: Determine the data table structure based on the basic business functions corresponding to the application to be put into production; Expanding the data table structure based on the spare field and spare table information to obtain an expanded data table structure; Business data is received, and the expanded data table structure is filled according to the business data to obtain the first data table related to the basic business function.
8. An application production device, characterized in that: include: a first evaluation unit, configured to determine a first data table related to the application to be put into production in the first storage space, and evaluate a time required to change the first data table during the production process to obtain a first duration; an optimization unit, configured to optimize the first data table using a preset optimization strategy to obtain a second data table when the first duration is greater than a preset duration, wherein the preset optimization strategy includes at least one of the following: defragmentation and database and table sharding; A second evaluation unit is configured to evaluate the time required for changing the second data table during the production process to obtain a second duration; The production unit is used to change the second data table based on the data replication platform and perform a production operation on the application to be put into production when the second time period is greater than the preset time period.
9. An electronic device, characterized in that: include: a memory storing an executable program; A processor is used to run the program, wherein the program, when running, executes the application commissioning method according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the application commissioning method described in any one of claims 1 to 7 are implemented.