A data updating method, device and computer equipment
By gradually verifying grayscale data on database servers in multiple data centers, the problem of global impact caused by the immediate effect of data modifications was solved, thus improving the effectiveness and efficiency of data modification.
Patent Information
- Application Number
- CN202011438300.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2040-12-07
AI Technical Summary
In existing technologies, data modifications are updated instantly, which means that if a problem occurs, all devices will be affected, resulting in significant losses.
By progressively validating grayscale data across database servers in multiple data centers, including verification at the target sub-region and data center levels, the data is ensured to gradually take effect in each region and is stored as official data only after all verifications have passed.
This improves the effectiveness and efficiency of data modification, avoids the global impact of synchronizing data modifications to all devices, and ensures the security and reliability of data modification.
Smart Images

Figure CN114595233B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information processing, and more specifically to a data updating method, apparatus, and computer equipment. Background Technology
[0002] With the rapid development of computer networks, various application platforms have been applied to an increasing number of fields. To ensure the reliability of these platforms, multiple database servers are often deployed across multiple data centers. During platform operation and maintenance, it is frequently necessary to modify configuration data based on actual conditions. For example, upgrading message versions may require adjusting message identifiers according to updated message specifications. Similarly, adjusting dedicated routing lines may require modifying access IP addresses. If modifications or additions to configuration data take effect immediately, the adjusted data will be applied to all devices within the entire platform environment. Therefore, if a problem occurs with the adjusted configuration data, all devices will be affected, impacting the normal operation of the application platform. Summary of the Invention
[0003] Therefore, the technical problem to be solved by the present invention is to overcome the defect of the prior art in which data modification is updated in real time, which causes all devices to be affected and suffer significant losses once a problem occurs, and thus provides a data update method, device and system.
[0004] According to a first aspect, embodiments of the present invention disclose a data update method applied to database servers deployed in multiple data centers, wherein any one of the multiple data centers includes several sub-regions, and any one sub-region includes several of the database servers, wherein the method includes: obtaining grayscale data from a grayscale data table; performing a first verification on the grayscale data on all database servers in a target sub-region; determining that the grayscale data has been verified successfully in the target sub-region when the first verification is passed; performing a second verification on the grayscale data on all database servers in the first data center when the grayscale data center is verified successfully in all sub-regions of the first data center, wherein the first data center is any one data center; determining that the grayscale data has been verified successfully in the first data center when the second verification is passed; and storing the grayscale data as formal data in a formal data table when the grayscale data center has been verified successfully in all data centers.
[0005] In conjunction with the first aspect, in the first embodiment of the first aspect, the step of determining that the first verification has passed includes: obtaining identification information of multiple database servers in the target sub-region, the identification information being used to characterize the identity information of the database servers accessing the grayscale data; querying a preset grayscale host table based on the identification information, the preset grayscale host table being used to characterize a pre-set list of database servers; when all database servers in the target sub-region are found in the preset grayscale host table, determining whether the grayscale data can pass the verification according to preset rules; and determining that the first verification has passed when the grayscale data conforms to the preset rules.
[0006] In conjunction with the first aspect, in the second embodiment of the first aspect, the step of determining whether the second verification is passed includes: obtaining the identification information of all database servers in the first computer room; querying a preset host table based on the identification information; when all database servers in the first computer room are found in the preset host table, determining whether the grayscale data can pass the verification according to preset rules; and determining that the second verification is passed when the grayscale data conforms to the preset rules.
[0007] In conjunction with the first aspect, the third embodiment of the first aspect further includes at least one of the following: when it is determined that the first verification fails, it is determined that the grayscale data has failed verification in the target sub-region and the grayscale data update has failed, and a sub-region data update failure prompt message is generated; when it is determined that the second verification fails, it is determined that the grayscale data has failed verification in the first data center, and a single data center data update failure prompt message is generated.
[0008] In conjunction with the third embodiment of the first aspect, in the fourth embodiment of the first aspect, the data update method further includes: generating a successful update prompt message based on the official data; updating a preset grayscale update control table based on the sub-region data update failure prompt message, the single-data-room data update failure prompt message, and the successful update prompt message; and determining the current verification sub-region and the current verification data-room based on the preset grayscale update control table.
[0009] In conjunction with the fourth embodiment of the first aspect, in the fifth embodiment of the first aspect, the data update method further includes: determining the target sub-region according to the preset grayscale update control table.
[0010] In conjunction with the fourth embodiment of the first aspect, the sixth embodiment of the first aspect further includes: the target sub-region being any sub-region.
[0011] According to a second aspect, embodiments of the present invention disclose a data update apparatus, applied to database servers deployed in multiple data centers, wherein any one of the multiple data centers includes several sub-regions, and any one sub-region includes several of the database servers, wherein the apparatus includes: an acquisition module, configured to acquire grayscale data from a grayscale data table; a first verification module, configured to perform a first verification on the grayscale data on all database servers in a target sub-region, wherein the target sub-region is any one sub-region; a first determination module, configured to determine that the grayscale data has been verified successfully in the target sub-region when the first verification is successful; a second verification module, configured to perform a second verification on the grayscale data on all database servers in the first data center when the grayscale data center has been verified successfully in all sub-regions in the first data center, wherein the first data center is any one data center; a second determination module, configured to determine that the grayscale data has been verified successfully in the first data center when the second verification is successful; and an update module, configured to update the grayscale data to formal data and store it in a formal data table when the grayscale data center has been verified successfully in all data centers.
[0012] According to a third aspect, an embodiment of the present invention provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the steps of the data update method described in the first aspect or any embodiment of the first aspect.
[0013] According to a fourth aspect, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the data update method described in the second aspect or any embodiment of the second aspect.
[0014] The technical solution of this invention has the following advantages:
[0015] This invention provides a data update method, apparatus, and computer device. The method is applied to database servers deployed in multiple data centers, each of which includes several sub-regions, and each sub-region includes several database servers. The method includes: obtaining grayscale data from a grayscale data table; performing a first verification on the grayscale data on all database servers in a target sub-region; determining that the grayscale data has been verified successfully in the target sub-region when the first verification is successful; performing a second verification on the grayscale data on all database servers in a first data center (any data center); determining that the grayscale data has been verified successfully in the first data center when the second verification is successful; and storing the grayscale data as formal data in a formal data table when the grayscale data has been verified successfully in all data centers. By implementing this invention, by combining the identity information of the database server and whether the grayscale data can be verified on the corresponding database server, it can be determined whether the modified or added configuration data can take effect in the preset area. This solves the problem in related technologies where, since data modification takes effect immediately and is synchronized to all database servers in the same area, if a problem occurs with the data modification, all devices will be affected, causing significant losses. This invention allows a set of data to take effect gradually in the same area and verifies the modified data in a timely manner, ensuring the effectiveness of data modification and improving the efficiency of data modification. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a specific example of a data update method in an embodiment of the present invention.
[0018] Figure 2 This is a schematic diagram of the layout of each computer room in a data update method according to an embodiment of the present invention;
[0019] Figure 3 This is a flowchart illustrating the process of determining the first verification to pass in a data update method according to an embodiment of the present invention.
[0020] Figure 4 This is a flowchart illustrating the process of determining the second verification to pass in a data update method according to an embodiment of the present invention.
[0021] Figure 5 This is a structural block diagram of data access in a data update method according to an embodiment of the present invention.
[0022] Figure 6 This is a structural block diagram of a data update device according to an embodiment of the present invention;
[0023] Figure 7 This is a structural block diagram of a computer device in a data update system according to an embodiment of the present invention. Detailed Implementation
[0024] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] In the description of this invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0026] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the term "connection" should be interpreted broadly. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can also refer to the internal connection of two components; it can be a wireless connection or a wired connection. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0027] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0028] This embodiment provides a data update method that can be applied to specific scenarios of operation and maintenance of application platforms in financial institutions. For example, it can be used in scenarios where configuration data needs to be modified according to actual conditions during application platform maintenance; it can also be used in scenarios involving the storage, use, or modification of important certificate information. Specifically, this data update method is applied to database servers deployed in multiple data centers. Each of these data centers includes several sub-regions, and each sub-region includes several database servers. For example... Figure 1 As shown, the data update method includes:
[0029] Step S11: Obtain grayscale data from the grayscale data table; In this embodiment, the grayscale data table is a data table that stores grayscale data. Grayscale data is data to be verified after being modified by the user. Specifically, the user can operate on the pre-stored configuration data according to the actual configuration requirements. This can be adding multiple data entries, modifying a single data entry, or deleting a single data entry. Grayscale data is generated after the configuration data is modified and stored in the grayscale table. In other words, when it is necessary to modify the configuration data of the application platform, grayscale data can be obtained from the grayscale table.
[0030] Step S12: Perform a first verification of the grayscale data on all database servers in the target sub-region; In this embodiment, the target sub-region can be a sub-region of any one of multiple data centers, and the sub-region can include several database servers. A database server can be a processor storing several databases, such as a computer device, a mobile terminal, etc.; that is, the sub-region can be part of a data center including several database servers, and the target sub-region can be part of a data center currently executing the method described in this embodiment; Figure 2 As shown, for example, there can be nine data centers: A1, A2, A3, A4, A5, A6, A7, and A9. Each of these data centers can be configured with 10 database servers. Each data center can be divided into three sub-areas: the first sub-area can have 2 database servers, the second sub-area can have 3 database servers, and the third sub-area can have 5 database servers. Figure 2 Solid lines delineate different computer rooms, while dashed lines delineate different sub-areas within each computer room. Those skilled in the art can determine the number of computer rooms, the division of sub-areas within each computer room, and the number of database servers within each sub-area based on actual application requirements; this invention does not impose any limitations on these aspects.
[0031] Specifically, the execution process of performing the first verification of grayscale data on all database servers in the target sub-region can be as follows: retrieve grayscale data from the grayscale data table, verify the grayscale data in all database servers in the target sub-region, and then generate a verification result based on the usage result. That is, verify the grayscale data one by one on a sub-region basis. For example, when the grayscale data passes verification on all database servers in the first sub-region, it means that the grayscale data is recognized by all users in the first sub-region. At this time, the grayscale data can be synchronized to the next sub-region and verified by all database servers in the next sub-region. The first verification is judged based on the usage result of the grayscale data on the database servers in all sub-regions.
[0032] Step S13: When the first verification is passed, it is determined that the grayscale data has passed the verification in the target sub-region. In this embodiment, after the grayscale data is used in all database servers in the target sub-region, a usage result that meets the target conditions is generated. At this time, it can be determined that the first verification has passed. For example, the first verification can be to verify the two database servers in the first sub-region.
[0033] For example, firstly, once the database server in the target sub-region obtains the grayscale data, the grayscale data becomes effective immediately, meaning that the grayscale data can be used immediately by the database server in the target sub-region; secondly, usage results that meet the target conditions are generated, and the usage results are used to determine whether any abnormalities have occurred. If no abnormalities have occurred, the first verification is confirmed to be successful.
[0034] Specifically, when applied to scenarios connecting payment institutions (e.g., Alipay, Tenpay) and the NetsUnion Clearing Corporation (NUCC) system, and when transactions are conducted, the payment institution needs to transmit data with the NUCC. For example, when a transfer transaction is conducted, the generated information can be transmitted to the NUCC using a first data packet. When the user modifies or updates the information, the generated information can be transmitted to the NUCC using a second data packet. In this case, the grayscale data is "the information generated when a transfer transaction is conducted is transmitted to the NUCC using a second data packet." After the database server in the target sub-region obtains this grayscale data, the information generated by the transfer transaction is immediately transmitted to the NUCC using the second data packet. At this point, it can be determined whether any abnormalities occur during subsequent use by the user. If no abnormalities occur, the verification is successful.
[0035] Step S14: When it is determined that the grayscale data has passed verification in all sub-regions of the first data center, a second verification is performed on the grayscale data on all database servers in the first data center. The first data center can be any data center. In this embodiment, after it is determined that the grayscale data has passed verification in all sub-regions of the first data center, the grayscale data can be verified on a data center-by-data center basis. For example, the grayscale data can be verified on the database server in any data center first. After the verification is passed, the grayscale data can be verified on the database server in the next data center, until the last data center. Finally, the verification is determined based on the usage results of the grayscale data on the database servers in all data centers, i.e., the second verification is performed.
[0036] Step S15: When the second verification is passed, it is determined that the grayscale data has passed the verification in the first data center. In this embodiment, after the grayscale data is used on all database servers in each data center, a usage result that meets the target conditions is generated, and at this time the second verification can be determined to be passed.
[0037] Step S16: When it is determined that the grayscale data has passed verification in all data centers, the grayscale data is stored as formal data in the formal data table. In this embodiment, formal data refers to data that has been verified by all database servers and has passed all verifications; that is, data that can be directly provided for external access. Specifically, if the grayscale data has passed verification in all data centers, it means that the grayscale data can be stored as formal data in the formal data table and can be obtained and used by any database server in any sub-region within any data center.
[0038] This invention provides a data update method comprising: obtaining grayscale data from a grayscale data table; performing a first verification on the grayscale data on all database servers in a target sub-region; determining that the grayscale data has passed verification in the target sub-region when the first verification is successful; performing a second verification on the grayscale data on all database servers in a first data center (any data center in the first data center) when the grayscale data has passed verification in all sub-regions in the first data center; determining that the grayscale data has passed verification in the first data center when the second verification is successful; and storing the grayscale data as formal data in a formal data table when the grayscale data has passed verification in all data centers. By implementing this invention, combining the identity information of the database server with whether the grayscale data can be verified on the corresponding database server, it can determine whether modified or added configuration data can take effect in a preset region. This solves the problem in related technologies where, because data modification takes effect immediately and is synchronized to all database servers in the same region, any problem with the data modification will affect all devices, causing significant losses. This method allows data to take effect gradually within the same region and verifies the modified data in a timely manner, ensuring the effectiveness of data modification and improving the efficiency of data modification.
[0039] In an optional embodiment, step S12, which involves performing a first verification of the grayscale data on all database servers in the target sub-region, further includes: In this embodiment, the target sub-region can be a sub-region of any of multiple data centers. Specifically, the target sub-region can be any sub-region in the first data center. After the grayscale data has been verified and passed on all database servers in the target sub-region, the next target sub-region can be any sub-region in the first data center other than the target sub-region. The next target sub-region can also be any sub-region in any data center other than the first data center, until the grayscale data has been verified on all database servers in any sub-region of any data center. At this point, the first verification is passed.
[0040] In an alternative embodiment, such as Figure 2As shown, the target sub-region can be the first sub-region within the A2 data center. On the two database servers within the first sub-region of the A2 data center, the grayscale data is verified. Once the grayscale data verification is successful on the two database servers within the first sub-region, the next target sub-region can be any sub-region within the A2 data center, for example, the third sub-region. Then, the grayscale data is verified on the five database servers within the third sub-region of the A2 data center.
[0041] In an alternative embodiment, such as Figure 2 As shown, the target sub-region can be the first sub-region within the A2 data center. The grayscale data is verified on two database servers within the first sub-region of the A2 data center. Once the grayscale data verification is successful on the two database servers within the first sub-region, the next target sub-region can be any sub-region within any data center other than the A2 data center. For example, it can be the third sub-region within the A1 data center. Subsequently, the grayscale data is verified on five database servers within the third sub-region of the A1 data center.
[0042] The present invention provides a data update method that, when performing a first verification of grayscale data on all database servers in a target sub-region, allows the next target sub-region to be located in the same data center or a different data center as the previous target sub-region. By implementing the present invention, data can be verified in real time, and the resource consumption for verifying grayscale data can be saved.
[0043] As an optional embodiment of the present invention, such as Figure 3 As shown, the steps for determining whether the first verification has passed include:
[0044] Step S21: Obtain the identification information of multiple database servers in the target sub-region respectively. The identification information is used to represent the identity information of the database server accessing the grayscale data. In this embodiment, the identification information of the database server can be [bizType+ip]. Different database servers have different identification information, where ip is the IP address of the database server.
[0045] Step S22: Query the preset grayscale host table according to the identification information. The preset grayscale host table is used to represent the pre-set database server list information. In this embodiment, the preset grayscale host table is queried according to the identity identification information of the obtained database server. That is, it is determined whether the IP address of the database server can be found in the preset grayscale host table, that is, whether the database server belongs to the preset grayscale host table.
[0046] Specifically, the preset grayscale host table is used to represent the list of database servers that can be used to pre-verify grayscale data within the target sub-region. It can be represented by [bizType+idc+ip], where ip is the IP address information of each database server.
[0047] Step S23: When all database servers within the target sub-region are found in the preset grayscale host table, the grayscale data is judged to pass verification according to preset rules. In this embodiment, the preset rules can be judgment conditions determined based on historical data within the target time period, such as whether the data conforms to a standard format. When the grayscale data is modified message identifier information, it can be judged whether the modified message identifier conforms to the latest version of the message specification, i.e., the judgment condition is the latest version of the message specification information. When the grayscale data is modified user identity information, the user information includes user name information, ID card number information, etc. Based on the user's ID card number information, the preset identity information database is queried to determine whether the same user identity information can be matched in the database. At this time, the judgment condition is the preset identity information database. The preset rules can be determined according to the type and detailed information of the grayscale data. Different types of grayscale data correspond to different preset rules, which will not be elaborated here.
[0048] Step S24: When the grayscale data conforms to the preset rules, the first verification is deemed successful. In this embodiment, when the modified data conforms to the preset rules, for example, the modified message identifier conforms to the latest version of the message specification, or the user's ID number information can be matched with the same user identity information in the database, the first verification can be determined to be successful.
[0049] As an optional embodiment of the present invention, such as Figure 4 As shown, the steps for determining whether the second verification has passed include:
[0050] Step S31: Obtain the identification information of all database servers in the first computer room respectively; In this embodiment, the identification information of the database server can be [bizType+ip], and the identification information of different database servers is different, where ip is the IP address of the database server.
[0051] Step S32: Query the preset host table according to the identification information; In this embodiment, the preset host table is used to represent the list information of all database servers in each computer room; Query the preset host table according to the obtained identity identification information of the database server, that is, determine whether the IP address of the database server can be found in the preset host table, that is, determine whether the database server belongs to the local computer room.
[0052] Step S33: When all database servers in the first data center are found in the preset host table, it is determined whether the grayscale data can pass the verification according to preset rules. In this embodiment, the preset rules can be judgment conditions determined based on historical data within the target time period, such as whether the data conforms to a standard format. When the grayscale data is modified message identifier information, it can be determined whether the modified message identifier conforms to the latest version of the message specification, that is, the judgment condition is the latest version of the message specification information. When the grayscale data is modified user identity information, the user information includes user name information, ID card number information, etc. Based on the user's ID card number information, a preset identity information database is queried to determine whether the same user identity information can be matched in the database. At this time, the judgment condition is the preset identity information database. The preset rules can be determined according to the type and detailed information of the grayscale data. Different types of grayscale data correspond to different preset rules, which will not be elaborated here.
[0053] Step S34: When the grayscale data conforms to the preset rules, the second verification is deemed successful. In this embodiment, when the modified data conforms to the preset rules, for example, the modified message identifier conforms to the latest version of the message specification, or the user's ID number information can be matched with the same user identity information in the database, the second verification can be determined to be successful.
[0054] As an optional embodiment of the present invention, the data update method further includes at least one of the following:
[0055] In the first scenario, when the first verification fails, it is determined that the grayscale data verification in the target sub-region has failed, the grayscale data update has failed, and a sub-region data update failure prompt message is generated. In this embodiment, during the first verification process, if the usage result generated after using grayscale data on the database server in any sub-region does not meet the preset rules, then the grayscale data will no longer be synchronized to the database servers in other sub-regions, and the grayscale data update failure will be immediately stopped, and a sub-region data update failure prompt message will be generated.
[0056] In the second scenario, if the second verification fails, it is determined that the grayscale data failed verification in the first data center, and a single-data center data update failure message is generated. In this embodiment, if, during the second verification process, the usage result generated after using the grayscale data on a database server in any data center does not meet the preset rules, then the grayscale data will not be synchronized to the database servers in other data centers, and the grayscale data update failure will be immediately stopped, generating a single-data center data update failure message.
[0057] For example, a grayscale data verification failure could occur when the grayscale data is a modified message identifier. According to the latest version of the message specification, it is determined that this message identifier does not correspond to the latest version of the message specification, and in this case, the grayscale data update can be considered to have failed.
[0058] This invention provides a data update method that includes, when grayscale data fails to be verified in any sub-region or data center, immediately declaring the grayscale data update failure and preventing the grayscale data from being synchronized to database servers in other sub-regions or data centers. By implementing this invention, the data update process can be controlled, preventing data corruption due to the large number of devices using the data, thus ensuring the security of data modification.
[0059] As an optional embodiment of the present invention, the data update method further includes:
[0060] First, a successful update notification message is generated based on the official data. In this embodiment, when grayscale data is stored as official data in the official data table, a successful update notification message is generated, indicating that the grayscale data has been verified by all database servers and can be accessed or used by any database server.
[0061] Secondly, based on the data update failure messages for sub-regions, single-data-rooms, and successful updates, the preset grayscale update control table is updated. Based on this table, the current verification sub-region and the current verification data room are determined. In this embodiment, updating the preset grayscale update control table is equivalent to recording the data update progress in real time. Specifically, the current update progress of the grayscale data can be determined based on the preset grayscale update control table, for example, whether it is in the first verification or the second verification stage, or the update stage of the first verification or the second verification stage.
[0062] As an optional embodiment of the present invention, the data update method further includes:
[0063] The target sub-region is determined based on a preset grayscale update control table. In this embodiment, the sub-region in which the data update method described in the above embodiments is executed can be determined according to the preset grayscale update control table, that is, in which sub-region grayscale data verification can be performed.
[0064] As an optional embodiment of the present invention, the data update method further includes:
[0065] The target sub-region can be any sub-region. In this embodiment, the sub-region for which the data update method described in the above embodiments is executed can be any sub-region within any computer room.
[0066] For example, the process of updating business data does not require the caller of the business data to upgrade or modify it, that is, it is unrelated to the users who use the data.
[0067] The following describes this method in detail with a specific example, such as... Figure 5 As shown, in practical application scenarios, when a data request is received from caller 1, caller 2, ... caller N, the IP address information of the visitor is obtained according to the data request, and the data identifier information [bizType] of the data caller is determined according to the current access interface. Data is then returned, which comes from the union of the grayscale data table and the formal data table. The grayscale data table is a collection table storing grayscale data, and the formal data table stores verified grayscale data. In the first case of data return, if it is determined that the caller needs to use grayscale data, grayscale data is returned to the caller according to the grayscale data table. For grayscale data and formal data with the same identifier, the grayscale data takes precedence. In the second case of data return, if it is determined that the current caller does not need grayscale data, that is, if it is determined that the database server issuing the data request does not belong to the pre-defined grayscale host table, then formal data is returned.
[0068] Specifically, after the modified data passes the review process, it only means that the data modification method meets the requirements, but the content may not be correct. At this time, it needs to go through the standard gray-scale verification process, that is, the data update method described in the above embodiment. Only data that has passed the gray-scale verification can become official data. At this time, the gray-scale effectiveness control table is updated in real time. If data caching is required, the cache of official data and gray-scale data directly corresponds to the gray-scale data table and the official data table in the database, which can store data more clearly and explicitly.
[0069] This invention provides a data update device applied to database servers deployed in multiple data centers. Each data center includes several sub-regions, and each sub-region includes several database servers, such as... Figure 6 As shown, the device includes:
[0070] The acquisition module 41 is used to acquire grayscale data from the grayscale data table; for detailed implementation details, please refer to the relevant description of step S11 in the above method embodiment.
[0071] The first verification module 42 is used to perform a first verification on grayscale data on all database servers in the target sub-region, where the target sub-region is any sub-region; for detailed implementation details, please refer to the relevant description of step S12 in the above method embodiment.
[0072] The first determining module 43 is used to determine that the grayscale data has passed the verification in the target sub-region when the first verification is passed; for detailed implementation details, please refer to the relevant description of step S13 in the above method embodiment.
[0073] The second verification module 44 is used to perform a second verification on all database servers in the first computer room when it is determined that the grayscale data has passed verification in all sub-regions in the first computer room. The first computer room can be any computer room. For detailed implementation details, please refer to the relevant description of step S14 in the above method embodiment.
[0074] The second determining module 45 is used to determine that the grayscale data has passed the verification in the first computer room when the second verification is passed; for detailed implementation details, please refer to the relevant description of step S15 in the above method embodiment.
[0075] The update module 46 is used to update the grayscale data to official data and store it in the official data table when it is determined that the grayscale data has passed verification in all data centers. For detailed implementation details, please refer to the relevant description of step S16 in the above method embodiment.
[0076] An embodiment of the present invention provides a data update device, comprising: an acquisition module 41, configured to acquire grayscale data from a grayscale data table; a first verification module 42, configured to perform a first verification on the grayscale data on all database servers in a target sub-region; a first determination module 43, configured to determine that the grayscale data has passed verification in the target sub-region when the first verification is passed; a second verification module 44, configured to perform a second verification on the grayscale data on all database servers in a first data center when the grayscale data has passed verification in all sub-regions in a first data center, wherein the first data center can be any data center; a second determination module 45, configured to determine that the grayscale data has passed verification in the first data center when the second verification is passed; and an update module 46, configured to store the grayscale data as formal data in a formal data table when the grayscale data has passed verification in all data centers. By implementing this invention, by combining the identity information of the database server and whether the grayscale data can be verified on the corresponding database server, it can be determined whether the modified or added configuration data can take effect in the preset area. This solves the problem in related technologies where, since data modification takes effect immediately and is synchronized to all database servers in the same area, if a problem occurs with the data modification, all devices will be affected, causing significant losses. This invention allows a set of data to take effect gradually in the same area and verifies the modified data in a timely manner, ensuring the effectiveness of data modification and improving the efficiency of data modification.
[0077] This invention also provides a computer device, such as... Figure 7As shown, the computer device may include a processor 51 and a memory 52, wherein the processor 51 and the memory 52 may be connected via a bus 50 or other means. Figure 7 For example, China and Israel are connected via bus 50.
[0078] Processor 51 can be a central processing unit (CPU). Processor 51 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0079] The memory 52, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the data update method in this embodiment of the invention. The processor 51 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 52, thereby implementing the data update method in the above method embodiment.
[0080] The memory 52 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 51, etc. Furthermore, the memory 52 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 52 may optionally include memory remotely located relative to the processor 51, and these remote memories may be connected to the processor 51 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0081] The one or more modules are stored in the memory 52, and when executed by the processor 51, they perform the following: Figure 1 The data update method in the illustrated embodiment.
[0082] For specific details regarding the aforementioned computer equipment, please refer to the relevant documentation. Figure 1 The relevant descriptions and effects in the illustrated embodiments are for understanding purposes only and will not be repeated here.
[0083] This invention also provides a non-transitory computer-readable medium that stores computer instructions for causing a computer to execute a data update method as described in any of the above embodiments. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.
[0084] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A data update method, applied to database servers deployed in multiple data centers, wherein any one of the multiple data centers includes several sub-regions, and any sub-region includes several of the database servers, wherein, The method includes: Retrieve grayscale data from the grayscale data table; The grayscale data is first verified on all database servers in the target sub-region. The target sub-region can be any sub-region. Then, a verification result is generated based on the usage result. The grayscale data is verified one by one on a sub-region basis. When the grayscale data passes the verification on all database servers in the first sub-region, it is determined that the grayscale data is recognized by all users in the first sub-region. The grayscale data is synchronized to the next sub-region and verified by all database servers in the next sub-region. The first verification is determined based on the usage result of the grayscale data on the database servers in all sub-regions. When the first verification is passed, it is determined that the grayscale data has passed the verification in the target sub-region; When it is determined that the grayscale data has passed verification in all sub-regions of the first data center, the grayscale data is then verified a second time on all database servers in the first data center, where the first data center can be any data center. When the second verification is passed, it is determined that the grayscale data has passed verification in the first data center; when the grayscale data is used on all database servers in each data center, a usage result that meets the target conditions is generated, and the second verification is determined to be passed. When it is determined that the grayscale data has passed verification in all data centers, the grayscale data is stored as formal data in the formal data table.
2. The method according to claim 1, wherein, The step of determining that the first verification has passed includes: The identification information of multiple database servers within the target sub-region is obtained respectively. The identification information is used to characterize the identity information of the database server accessing the grayscale data. Based on the identification information, query the preset grayscale host table, which is used to represent the pre-set database server list information; When all database servers in the target sub-region are found in the preset grayscale host table, it is determined whether the grayscale data can pass the verification according to preset rules; When the grayscale data conforms to the preset rules, the first verification is deemed to have passed.
3. The method according to claim 1, wherein, The step of determining whether the second verification is successful includes: Obtain the identification information of all database servers in the first computer room; Based on the identification information, query the preset host table; When all database servers in the first data center are found in the preset host table, it is determined whether the grayscale data can pass the verification according to preset rules. When the grayscale data conforms to the preset rules, the second verification is deemed to have passed.
4. The method according to claim 1, wherein, It also includes at least one of the following: When the first verification fails, it is determined that the grayscale data has failed to be verified in the target sub-region and the grayscale data update has failed, and a sub-region data update failure prompt message is generated; When the second verification fails, it is determined that the grayscale data failed to be verified in the first data center, and a single data center data update failure prompt message is generated.
5. The method according to claim 4, wherein, Also includes: Based on the official data, a successful update notification message is generated; Update the preset grayscale update control table based on the data update failure message for the sub-region, the data update failure message for the single computer room, and the successful update message. Based on the preset grayscale update control table, determine the current verification sub-region and the current verification server room.
6. The method according to claim 5, wherein, Also includes: The target sub-region is determined according to the preset grayscale update control table.
7. The method according to claim 5, wherein, Also includes: The target sub-region can be any sub-region.
8. A data updating device, wherein, An apparatus for use with database servers deployed in multiple data centers, wherein each data center comprises several sub-regions, and each sub-region comprises several of the aforementioned database servers, wherein the apparatus comprises: The acquisition module is used to retrieve grayscale data from the grayscale data table; The first verification module is used to perform a first verification on the grayscale data on all database servers in the target sub-region, where the target sub-region can be any sub-region; then, it generates a verification result based on the usage results, and verifies the grayscale data one by one on a sub-region basis. When the grayscale data passes the verification on all database servers in the first sub-region, it is determined that the grayscale data is recognized by all users in the first sub-region. The grayscale data is then synchronized to the next sub-region and verified by all database servers in the next sub-region. The first verification is judged based on the usage results of the grayscale data on the database servers in all sub-regions. The first determining module is used to determine that the grayscale data has passed verification in the target sub-region when the first verification is passed; The second verification module is used to perform a second verification on all database servers in the first data center when it is determined that the grayscale data has passed verification in all sub-regions in the first data center. The first data center can be any data center. The second determining module is used to determine that the grayscale data has passed verification in the first data center when the second verification is passed; and to determine that the second verification has passed when the grayscale data is used on all database servers in each data center and a usage result that meets the target conditions is generated. The update module is used to update the grayscale data to official data and store it in the official data table when it is determined that the grayscale data has passed verification in all data centers.
9. A computer device, wherein, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the steps of the data update method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the steps of the data update method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and device for updating server cluster file
CN104378394A
Verification method, device, equipment and storage medium of multi-database modification affair
CN108829495A