Route updating method and device, electronic equipment, storage medium and program product
By automatically updating the routing configuration when the client device receives an abnormal response, flexible routing switching of the dual-active service data center is achieved, which solves the problem of untimely routing updates in the existing technology and improves the timeliness and high availability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, when a dual-active service data center fails, the routing updates are not timely, resulting in poor timeliness of routing updates and an inability to switch to another service data center for data interaction in a timely manner.
When a client device receives an abnormal response, it automatically updates its local routing configuration and sends a service request to the second data center through the application service of the first or second data center, thus achieving flexible routing switching.
It improves the timeliness of route updates, preventing the control center from failing to switch routes in time, thereby restoring local application services in a short time and improving the system's high availability and flexibility.
Smart Images

Figure CN121728012A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information software system technology, and in particular to a routing update method, apparatus, electronic device, storage medium and program product. Background Technology
[0002] Currently, to ensure the normal operation of services on mobile terminals, major internet application service providers have begun deploying active-active service data centers in multiple cities across the country to support application services for users nationwide. To enable routing update control within these active-active service data centers, a full service switch is typically added to facilitate cross-data center routing updates during system failures.
[0003] In related technologies, when a large-scale failure occurs in one of the service data centers in a dual-active service data center, the dual-active service data center can perform a route update through a full service switch to switch the mobile terminal's service to the other service data center in the dual-active service data center for data interaction.
[0004] However, in the above method, since the full service switch only performs route updates when a large-scale failure occurs in a certain service data center, the dual-active service data center cannot perform route updates in a timely manner, resulting in poor timeliness of route updates. Summary of the Invention
[0005] This application provides a route update method, apparatus, electronic device, storage medium, and program product for improving the timeliness of route updates.
[0006] In a first aspect, this application provides a route update method, comprising: sending a first service request to a first data center; receiving a response result of the first service request sent by the first data center; if the response result indicates an abnormal response, updating a local routing configuration based on the address of an application service in the first data center or the address of an application service in the second data center, and address information of the second data center, wherein the updated local routing configuration is used to configure the initiation of a service request to the second data center through the application service of the first data center or the application service of the second data center; the address information of the second data center includes the address of the second data center, the address of the application service of the second data center, and the database address of the second data center; and sending a second service request to the second data center through the application service of the first data center or the application service of the second data center based on the updated local routing configuration.
[0007] The technical solution provided in this application brings at least the following benefits: In the event that the response result sent by the first data center indicates an abnormal response, the client device can automatically perform a route update operation to prevent the control center from failing to switch routes in time, thereby restoring the service of the local application in a short time, thus improving the timeliness of route updates.
[0008] One possible implementation is that the updated local routing configuration described above serves as a first routing configuration. This first routing configuration is used to configure the initiation of service requests to the second data center through the application services of the second data center and the network domain name of the first data center. The above-described sending of a second service request to the second data center based on the updated local routing configuration, through either the application services of the first or second data center, includes: based on the first routing configuration, sending a second service request to the database of the second data center through the network domain name of the first data center and the application services of the second data center.
[0009] Another possible implementation is that the updated local routing configuration described above is a second routing configuration. This second routing configuration is used to configure the initiation of service requests to the second data center through the application services of the second data center and the network domain name of the second data center. Based on the updated routing configuration, sending a second service request to the second data center through the application services of the first or second data center includes: based on the second routing configuration, sending a second service request to the database of the second data center through the network domain name of the second data center and the application services of the second data center.
[0010] Another possible implementation is that the updated local routing configuration described above is a third routing configuration. This third routing configuration is used to configure the initiation of service requests to the second data center through the network domain name and application services of the first data center. Based on the updated routing configuration, sending a second service request to the second data center through either the application services of the first or second data center includes: based on the third routing configuration, sending a second service request to the database of the second data center through the network domain name and application services of the first data center.
[0011] Another possible implementation involves the second service request comprising a first sub-service request, a second sub-service request, and a third sub-service request. The above-mentioned sending of the second service request to the second data center based on the updated local routing configuration, through the application service of the first data center or the application service of the second data center, includes: sending the first sub-service request to the database of the second data center based on the third routing configuration, where the third routing configuration is used to configure the service request to be initiated to the second data center through the network domain name and application service of the first data center; in the event of an anomaly in the first sub-service request, sending the second sub-service request to the database of the second data center based on the first routing configuration, where the first routing configuration is used to configure the service request to be initiated to the second data center through the application service and network domain name of the first data center; and in the event of an anomaly in the second sub-service request, sending the third sub-service request to the database of the second data center based on the second routing configuration, where the second routing configuration is used to configure the service request to be initiated to the second data center through the application service and network domain name of the second data center.
[0012] Another possible implementation, before updating the local routing configuration based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center, the method further includes: sending a routing configuration update request to the first data center if the response result indicates an abnormal response; receiving a routing configuration update policy sent by the first data center; sending a third service request to the first data center based on the routing path corresponding to the routing configuration update policy; and updating the local routing configuration based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center if the response result indicates an abnormal response, including: updating the local routing configuration based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center if the third service request is abnormal.
[0013] Another possible implementation is that, after sending a second service request to the second data center through the application service of the first data center or the application service of the second data center based on the updated routing configuration, the method further includes: restoring the local routing configuration after a preset time period.
[0014] Secondly, this application provides a route update apparatus, including: a sending module, a receiving module, and a processing module. The sending module is used to send a first service request to a first data center. The receiving module is used to receive the response result of the first service request sent by the first data center. The processing module is used to update a local routing configuration based on the address of the application service of the first data center or the address of the application service of the second data center, and the address information of the second data center, when the response result indicates an anomaly. The updated local routing configuration is used to configure the initiation of a service request to the second data center through the application service of the first data center or the application service of the second data center; the address information of the second data center includes the address of the second data center, the address of the application service of the second data center, and the database address of the second data center. The sending module is also used to send a second service request to the second data center through the application service of the first data center or the application service of the second data center based on the updated local routing configuration.
[0015] One possible implementation is that the updated local routing configuration described above is a first routing configuration. This first routing configuration is used to configure the initiation of service requests to the second data center via the application service and network domain name of the second data center. Specifically, the sending module is used, based on the first routing configuration, to send a second service request to the database of the second data center via the network domain name of the first data center and the application service of the second data center.
[0016] Another possible implementation is that the updated local routing configuration described above is a second routing configuration. This second routing configuration is used to configure the initiation of service requests to the second data center through the application services and network domain names of the second data center. Specifically, the sending module described above is used to send a second service request to the database of the second data center based on the second routing configuration, through the network domain names and application services of the second data center.
[0017] Another possible implementation is that the updated local routing configuration described above is a third routing configuration. This third routing configuration is used to configure the initiation of service requests to the second data center through the network domain name and application services of the first data center. Specifically, the sending module described above is used to send a second service request to the database of the second data center based on the third routing configuration, using the network domain name and application services of the first data center.
[0018] Another possible implementation is that the aforementioned second service request includes a first sub-service request, a second sub-service request, and a third sub-service request. Specifically, the sending module is used to send the first sub-service request to the database of the second data center based on the third routing configuration. The third routing configuration is used to configure the service request to be initiated to the second data center through the network domain name and application service of the first data center. In the event of an anomaly in the first sub-service request, the module sends the second sub-service request to the database of the second data center based on the first routing configuration. The first routing configuration is used to configure the service request to be initiated to the second data center through the application service and network domain name of the second data center. In the event of an anomaly in the second sub-service request, the module sends the third sub-service request to the database of the second data center based on the second routing configuration. The second routing configuration is used to configure the service request to be initiated to the second data center through the application service and network domain name of the second data center.
[0019] In another possible implementation, before updating the local routing configuration based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center, the sending module is further configured to send a routing configuration update request to the first data center if the response result indicates an anomaly. The receiving module is further configured to receive the routing configuration update policy sent by the first data center. The sending module is further configured to send a third service request to the first data center based on the routing path corresponding to the routing configuration update policy. Specifically, the processing module is configured to update the local routing configuration based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center, if the third service request is abnormal.
[0020] In another possible implementation, the aforementioned processing module is also used to send a second service request to the second data center through the application service of the first data center or the application service of the second data center based on the updated routing configuration, and then restore the local routing configuration after a preset time.
[0021] Thirdly, this application provides an electronic device comprising: a processor and a memory; the memory storing processor-executable instructions; when the processor is configured to execute the instructions, causing the electronic device to implement the method of the first aspect described above.
[0022] Fourthly, this application provides a computer-readable storage medium comprising: computer software instructions; which, when executed in an electronic device, cause the electronic device to implement the method described in the first aspect.
[0023] Fifthly, this application provides a computer program product comprising a computer program; when the computer program is run in an electronic device, the electronic device performs the method described in the first aspect.
[0024] The beneficial effects of the second to fifth aspects mentioned above are described in the corresponding description of the first aspect and will not be repeated here. Attached Figure Description
[0025] Figure 1 This is a schematic diagram illustrating the application environment of a route update method provided in an embodiment of this application; Figure 2 A flowchart illustrating a route update method provided in an embodiment of this application; Figure 3 A flowchart illustrating another route update method provided in an embodiment of this application; Figure 4 A flowchart illustrating yet another route update method provided in an embodiment of this application; Figure 5 A flowchart illustrating yet another route update method provided in an embodiment of this application; Figure 6 A flowchart illustrating yet another route update method provided in an embodiment of this application; Figure 7 A flowchart illustrating yet another route update method provided in an embodiment of this application; Figure 8 A flowchart illustrating yet another route update method provided in an embodiment of this application; Figure 9 A schematic diagram illustrating the interaction flow of a route update method provided in an embodiment of this application; Figure 10 A system architecture diagram of a routing update system provided in this application embodiment; Figure 11 This is a schematic diagram illustrating the composition of a routing update device provided in an embodiment of this application; Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] The routing update method, apparatus, electronic device, storage medium, and program product provided in this application will now be described in detail with reference to the accompanying drawings.
[0027] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0028] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0029] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0030] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0031] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0032] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0033] The technical terms used in the embodiments of this application will be explained in detail below.
[0034] Active-Active System: An active-active system synchronizes data and services across multiple data centers to ensure that even if one data center fails, another can continue operating normally. The core advantages of an active-active system are high availability and load balancing. Fault Detection and Switching: The system monitors its status in real time and switches over when a fault occurs.
[0035] The routing update method provided in this application can be applied to routing update scenarios in active-active systems.
[0036] Currently, with the increasing number of users of major internet applications, the application clients installed on users' electronic devices are the first to be affected by any system anomalies. Moreover, for application systems with millions, tens of millions, or even hundreds of millions of users, any large-scale changes or operations can be fatal to a company's business applications. Therefore, large internet application service providers have begun deploying dual-active service data centers in multiple cities across the country to support application services for users nationwide. To achieve switching control between dual-active service centers, a dual-active management and control system is set up in each data center, facilitating service switching across data centers by system administrators during system failures.
[0037] In existing technologies, most active-active systems rely on centralized remote switching control within the data center. When a large-scale failure occurs in one of the active-active service data centers, the active-active service data center can perform a full service switching switch to update the routing, thereby switching the mobile terminal's service to the other active-active service data center for data interaction.
[0038] However, the above method has the following seven problems.
[0039] 1. In the existing dual-active system failover methods, the failover is centrally managed, requiring the configuration of a dual-active failover switch in the centralized dual-active management console in the data center, which poses a risk of switch control failure.
[0040] 2. Existing active-active systems mostly use a unified control method for switching over. If a service center experiences an anomaly among a small number of users, it is impossible to control the situation at a specific point to avoid expanding the scope of the impact.
[0041] 3. The existing active-active system uses a batch switching method. When the switch is executed, the service traffic of all users is switched, which will cause a traffic surge to the service center. The concentrated response to service requests may cause instantaneous service interruption and affect the user experience.
[0042] 4. Existing active-active system switching methods lack flexible terminal configuration capabilities and cannot dynamically adjust switching rules according to actual production failure scenarios. As a result, centralized control methods fail to meet the optimal terminal switching strategy in complex and ever-changing production environments.
[0043] 5. The existing method for switching between active-active systems requires manual configuration of the switch. Manual configuration may have unpredictable risks such as untimely operation or misoperation.
[0044] 6. The existing dual-active system switching method requires real-time monitoring of the service traffic and status of the two data centers. The alarm for dual-active system switching needs to be configured with a certain threshold. Before the threshold is triggered, the abnormal business volume of the system is small and insufficient to meet the conditions for switching the centralized dual-active switch, so there will be some business loss.
[0045] 7. Existing active-active failover methods cannot perform hierarchical flow control failover.
[0046] To address the aforementioned technical problems, this application provides a route update method, apparatus, electronic device, storage medium, and program product. The client device can automatically perform route update operations to prevent the control center from failing to switch routes in a timely manner, thereby restoring local application services in a short time and improving the timeliness of route updates.
[0047] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0048] The routing update method provided in this application can be applied to, for example, Figure 1 The application environment shown. For example... Figure 1 As shown, Figure 1 This illustration shows an application environment diagram of a routing update method provided in an embodiment of this application; the application environment includes a routing update device 101 and a data center device 102. The routing update device 101 and the data center device 102 are interconnected.
[0049] In some embodiments, the routing update device 101 can be a device with wireless transceiver capabilities, such as a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. This application embodiment does not limit the specific device form of the routing update device 101. Figure 1 The routing update device 101 is illustrated using a mobile phone as an example.
[0050] The data center device 102 can be a server cluster consisting of multiple servers, a single server, a computer, or a processor or processing chip in a server or computer, etc. This application embodiment does not limit the specific device form of the data center device 102. Figure 1The example shown is a data center device 102 consisting of two servers. The data center device 102 includes a first sub-data center device 1021 and a second sub-data center device 1022.
[0051] In some embodiments, the routing update device 101 sends a first service request to the first sub-data center device 1021 and receives a response result of the service request sent by the first sub-data center device 1021. Then, if the response result indicates an abnormal response, the routing update device 101 updates the local routing configuration based on the address of the application service of the first data center or the address of the application service of the second data center, and the address information of the second data center. The updated local routing configuration is used to configure the initiation of a service request to the second data center through the application service of the first data center or the application service of the second data center. The address information of the second data center includes the address of the second data center and the database address of the second data center. Finally, based on the updated local routing configuration, the routing update device 101 sends a second service request to the second sub-data center device 1022 through the application service of the first data center or the application service of the second data center.
[0052] It should be noted that the system architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0053] See Figure 2 This is a flowchart illustrating a route update method provided in an embodiment of this application. Figure 2 As shown, the routing update method provided in this application can be implemented through a client device, specifically including the following steps S201 to S204.
[0054] S201, The client device sends the first service request to the first data center.
[0055] In some embodiments, the first service request may be triggered by a user; or by a client device. The specific trigger may be determined based on actual usage requirements, and this application embodiment does not impose any restrictions.
[0056] For example, the aforementioned first service request can be any of the following: a video data service request, a game data service request, an audio data service request, or a text data service request, etc. The specific request can be determined based on actual usage requirements, and this application embodiment does not impose any limitations.
[0057] In some embodiments, the client device may send a first service request to the first data center via a wireless network or a mobile network.
[0058] For example, a client device can send a first service request to a first data center via the address of the first data center.
[0059] It should be noted that the address of the first data center mentioned above is pre-stored in the client device.
[0060] In some embodiments, when service requests belong to different applications, the client device can send the service request to the corresponding data center based on the data center address stored in the application to which the service request belongs. That is, service requests from different applications can correspond to different data centers.
[0061] S202, The client device receives the response result of the first service request sent by the first data center.
[0062] For example, the above response results can be conveyed in the form of numbers or text.
[0063] In some embodiments, the client device may receive the response result of the first service request sent by the first data center through the aforementioned wireless network or mobile network.
[0064] S203. If the response result indicates an abnormal response, the client device updates its local routing configuration based on the address of the application service of the first data center or the address of the application service of the second data center, as well as the address information of the second data center.
[0065] In some embodiments, the updated local routing configuration described above is used to configure the initiation of service requests to the second data center through the application service of the first data center or the application service of the second data center; the address information of the second data center includes the address of the second data center, the address of the application service of the second data center, and the database address of the second data center.
[0066] In some embodiments, the address information of the second data center is also pre-stored in the client device.
[0067] For example, if the response result is 0, the client device can determine that the response is abnormal; if the response result is 1, the client device can determine that a data transmission link has been established with the first data center.
[0068] It should be noted that the above-mentioned response anomaly indicates that the client device has failed to establish a data transmission link with the first data center.
[0069] In some embodiments, if the response result indicates an abnormal response, the client device can update its local routing configuration based on the address of the application service of the first data center, the domain name of the first data center, the address of the second data center, and the database address of the second data center.
[0070] In some embodiments, if the response result indicates an abnormal response, the client device can update its local routing configuration based on the domain name of the first data center, the address of the application service of the second data center, the address of the second data center, and the database address of the second data center.
[0071] In some embodiments, if the response result indicates an abnormal response, the client device can update its local routing configuration based on the domain name of the second data center, the address of the application service of the second data center, the address of the second data center, and the database address of the second data center.
[0072] In some embodiments, if the client device receives a response result indicating an abnormal response, a prompt message may be displayed to prompt the user to troubleshoot the first data center.
[0073] S204. Based on the updated local routing configuration, the client device sends a second service request to the second data center through the application service of the first data center or the application service of the second data center.
[0074] In some embodiments, the second service request contains the same request parameters as the first service request.
[0075] In some embodiments, the client device may send a second service request to the database of the second data center via a wireless network or a wired network, based on the routing path in the updated local routing configuration.
[0076] It should be noted that the data stored in the database of the first data center is the same as the data stored in the database of the second data center.
[0077] In the routing update method provided in this application, the client device can send a first service request to a first data center; then, it receives the response result of the first service request sent by the first data center; next, if the response result indicates an anomaly, it updates the local routing configuration based on the address of the application service of the first data center or the address of the application service of the second data center, as well as the address information of the second data center. The updated local routing configuration is used to configure the initiation of service requests to the second data center through the application service of the first data center or the application service of the second data center; the address information of the second data center includes the address of the second data center, the address of the application service of the second data center, and the database address of the second data center; finally, based on the updated local routing configuration, it sends a second service request to the second data center through the application service of the first data center or the application service of the second data center. In this solution, if the response result sent by the first data center indicates an anomaly, the client device can automatically perform a routing update operation to prevent the control center from failing to switch routes in time, thereby restoring the service of the local application in a short time, thus improving the timeliness of routing updates.
[0078] In some embodiments, the updated local routing configuration described above is a first routing configuration, which is used to configure the initiation of service requests to the second data center through the application services of the second data center and the network domain name of the first data center.
[0079] For example, combined Figure 2 ,like Figure 3 As shown, the above S204 can be specifically implemented as the following step S204a.
[0080] S204a: Based on the first routing configuration, the client device sends a second service request to the database of the second data center through the network domain name of the first data center and the application service of the second data center.
[0081] In some embodiments, the client device may send a second service request to the database of the second data center via a wireless network or mobile network, based on the network domain name of the first data center, the address of the application service of the second data center, and the address of the database of the second data center in the first routing configuration.
[0082] In this embodiment of the application, when the response result indicates an abnormal response, the client device can send a second service request to the database of the second data center according to the updated first routing configuration, thereby improving the flexibility of the client device in performing route switching.
[0083] In some embodiments, the updated local routing configuration described above is a second routing configuration, which is used to configure the initiation of service requests to the second data center through the application services of the second data center and the network domain name of the second data center.
[0084] For example, combined Figure 2 ,like Figure 4 As shown, the above S204 can be specifically implemented as the following step S204b.
[0085] S204b: Based on the second routing configuration, the client device sends a second service request to the database of the second data center through the network domain name of the second data center and the application services of the second data center.
[0086] In some embodiments, the client device may send a second service request to the database of the second data center via a wireless network or mobile network, based on the network domain name of the second data center, the address of the application service of the second data center, and the address of the database of the second data center in the second routing configuration.
[0087] In this embodiment of the application, when the response result indicates an abnormal response, the client device can send a second service request to the database of the second data center according to the updated second routing configuration, thereby improving the flexibility of the client device in performing route switching.
[0088] In some embodiments, the updated local routing configuration described above is a third routing configuration, which is used to configure the initiation of service requests to the second data center through the network domain name of the first data center and the application services of the first data center.
[0089] For example, combined Figure 2 ,like Figure 5 As shown, the above S204 can be specifically implemented as the following step S204c.
[0090] In step S204c, the client device, based on the third routing configuration, sends a second service request to the database of the second data center through the network domain name and application services of the first data center.
[0091] In some embodiments, the client device may send a second service request to the database of the second data center via a wireless network or mobile network, based on the network domain name of the first data center, the address of the application service of the first data center, and the address of the database of the second data center in the third routing configuration.
[0092] In this embodiment of the application, when the response result indicates an abnormal response, the client device can send a second service request to the database of the second data center according to the updated third routing configuration, thereby improving the flexibility of the client device in performing route switching.
[0093] In some embodiments, the second service request includes a first sub-service request, a second sub-service request, and a third sub-service request.
[0094] For example, combined Figure 2 ,like Figure 6 As shown, the above S204 can be specifically implemented as the following steps S301 to S303.
[0095] S301: The client device sends the first sub-service request to the database of the second data center based on the third routing configuration.
[0096] In some embodiments, the third routing configuration described above is used to configure the initiation of service requests to the second data center through the network domain name of the first data center and the application services of the first data center.
[0097] It should be noted that the specific implementation process of S301 can be found in the above embodiments, and will not be repeated here to avoid repetition.
[0098] S302. In the event of an anomaly in the first sub-service request, the client device sends a second sub-service request to the database of the second data center based on the first routing configuration.
[0099] In some embodiments, the first routing configuration described above is used to configure the initiation of service requests to the second data center through the application services of the second data center and the network domain name of the first data center.
[0100] It should be noted that the specific implementation process of S302 above can be found in the above embodiments, and will not be repeated here to avoid repetition.
[0101] S303. In the event of an anomaly in the second sub-service request, the client device sends a third sub-service request to the database of the second data center based on the second routing configuration.
[0102] In some embodiments, the second routing configuration described above is used to configure the initiation of service requests to the second data center through the application services of the second data center and the network domain name of the second data center.
[0103] It should be noted that the specific implementation process of S303 above can be found in the above embodiments, and will not be repeated here to avoid repetition.
[0104] In some embodiments, the request parameters contained in the first sub-service request, the second sub-service request, and the third sub-service request are the same.
[0105] In this embodiment of the application, when the response result indicates an abnormal response, the client device can send service requests to the database of the second data center in sequence according to the first routing configuration, the second routing configuration, and the third routing configuration, thereby improving the flexibility of the client device in switching routes.
[0106] It should be understood that the client device can also receive the routing configuration update policy sent by the first data center, and send a third service request to the first data center based on the routing configuration update policy.
[0107] Therefore, combining Figure 2 ,like Figure 7 As shown, before "the client device updates the local routing configuration based on the address of the application service of the first data center or the address of the application service of the second data center, and the address information of the second data center" in the above-mentioned S203, the routing update method provided in this application embodiment further includes the following steps S401 to S403; and the above-mentioned S203 can be specifically implemented by the following S501.
[0108] S401. If the response result indicates an abnormal response, the client device sends a route configuration update request to the first data center.
[0109] In some embodiments, the client device may send a routing configuration update request to the first data center via a wireless network or a mobile network.
[0110] S402. The client device receives the routing configuration update policy sent by the first data center.
[0111] In some embodiments, the client device may receive a routing configuration update policy sent by the first data center via a wireless network or mobile network.
[0112] In some embodiments, after receiving a routing configuration update policy, the client device can store the routing configuration update policy.
[0113] In some embodiments, after receiving a routing configuration update policy, the client device can override the local routing configuration according to the routing configuration update policy.
[0114] S403: The client device sends a third service request to the first data center based on the routing path corresponding to the routing configuration update policy.
[0115] In some embodiments, the client device can send a third service request to the first data center via a wireless network or mobile network according to the routing path corresponding to the routing configuration update policy.
[0116] In some embodiments, the third service request contains the same request parameters as the second service request.
[0117] S501. In the event of an abnormal third service request, the client device updates its local routing configuration based on the address of the application service of the first data center or the application service of the second data center, as well as the address information of the second data center.
[0118] It should be noted that the specific implementation process of S501 can be found in the above embodiments, and will not be repeated here to avoid repetition.
[0119] It should be understood that client devices can also restore their local routing configuration after a preset time.
[0120] Therefore, combining Figure 2 ,like Figure 8 As shown, after S204 above, this application embodiment provides a route update method, which further includes the following step S601.
[0121] S601. After a preset time, the client device restores its local routing configuration.
[0122] In some embodiments, the preset duration can be preset by the electronic device or user-defined. The specific duration can be determined according to actual usage needs, and this application embodiment does not impose any limitations.
[0123] In some embodiments, the preset duration may be different for the first routing configuration, the second routing configuration, and the third routing configuration described above.
[0124] For example, for the first route configuration, the preset duration can be 12 hours; for the second route configuration, the preset duration can be 6 hours; and for the third route configuration, the preset duration can be 24 hours.
[0125] In some embodiments, the client device may save the original local routing configuration and, after a preset period of time, overwrite the updated local routing configuration with the original local routing configuration to restore the local routing configuration.
[0126] In this embodiment, the client device can automatically restore the local routing configuration after the fault in the first data center is eliminated by setting a preset time, i.e., an expiration time, without requiring manual adjustment by the user, thus improving the flexibility of the client device in restoring the local routing configuration.
[0127] The routing update method of this application is described below with reference to a specific embodiment, such as... Figure 9 As shown, Figure 9The following is a schematic diagram of the interaction process of a route update method provided in an embodiment of this application. The specific process is as follows: S1 to S8.
[0128] S1. The client device loads the local dual-active routing configuration.
[0129] In some embodiments, the client device is in a pending state.
[0130] S2. The client device sends the first service request to the first data center through the local dual-active routing configuration.
[0131] S3. The first data center receives the first service request sent by the client device and sends a response result to the client device.
[0132] For example, the first data center returns a response result, and the final data is transmitted back to the client device, completing the first interaction loop.
[0133] S4. The client device receives the response result sent by the first data center, and if the client device detects that the received response result indicates an abnormal response, the client device sends a dual-active service configuration update request to the first data center.
[0134] In some embodiments, the above-mentioned active-active service configuration update request requires obtaining the latest routing policy.
[0135] S5. The first data center receives the dual-active service configuration update request sent by the client device and sends the latest routing policy to the client device.
[0136] S6. The client device receives the latest routing policy sent by the first data center and overwrites the old local routing configuration to obtain the latest routing configuration.
[0137] In some embodiments, the client device may store the latest routing configuration.
[0138] S7. The client device sends the first service request to the first data center again using the latest routing configuration.
[0139] S8. If the client device detects that the received response result still indicates an abnormal response, the client device performs a local configuration iterative update strategy.
[0140] For example, the above local configuration iteration update strategy includes the following steps.
[0141] The first strategy change was implemented.
[0142] The client device changes the routing label in its local configuration to the second data center and changes the active-active switching level to the first level, initiating the first-level service request using the new strategy. For example, if the routing data center is updated to B Center and the switching level is updated to database, the client device will initiate the request using the network domain name of A Center. After passing through the application service of ACenter, the request will ultimately reach the database of B Center, and the server will respond and return the result.
[0143] If the system still responds abnormally, the second local configuration iteration update strategy will be executed.
[0144] The second strategy change was implemented.
[0145] The client device changes the routing label in its local configuration to the second data center and changes the active-active failover level to the second level, with an expiration time of 12 hours. It then initiates business requests using the new policy. For example, if the routing data center is updated to B Center and the failover level is updated to application service, then when the client initiates a request, it uses the network domain name of A Center to make the request, which goes through the application service of B Center and finally requests the database of B Center. The server then responds and returns the result.
[0146] If the system still responds abnormally, the third local configuration iteration update strategy will be executed.
[0147] The third strategy change was implemented.
[0148] The client device changes its local configuration routing label to the second data center and changes the active-active failover level to level three, with a 6-hour expiration period. It then initiates service requests using the new policy. For example, if the routing data center is updated to B Center and the failover level is updated to a network domain name, the client will use the second data center's network domain name to initiate the request. The requested service will then travel through the B Center domain name to the application service in B Center, querying the database in B Center.
[0149] After all the above local configurations are updated, the expiration time will be recalculated. Once the expiration time expires, the configuration will be reset to the initial state. During this period, the monitoring component of the first data center will collect and report application request information from clients. System maintenance personnel should, upon receiving an alert, promptly fix the system anomaly so that client devices can make normal requests after their local policies expire. If the system anomaly persists after expiration, the client device can repeat the above routing change method to recalculate the expiration time until recovery.
[0150] In some embodiments, the client device can add locally updated configuration information to the packet header, request the domain name address of different data centers according to the local dual-active configuration rules, the gateway of the data center then parses the dual-active routing configuration in the packet header information, forwards the request to the application service with the corresponding policy, the application service then parses the configuration policy in the packet header information, and executes the requested method in the database of the corresponding data center with reference to the configuration information, so as to achieve the purpose of automatically executing dual-active traffic switching control.
[0151] In this embodiment, the client device can automatically execute a series of traffic control strategies to restore the service traffic of the local application in a short time if the control center fails to switch the traffic control system in time.
[0152] Furthermore, by combining local dynamic iterative dual-active configuration updates on client devices with hierarchical dual-active traffic switching, client devices can automatically, quickly, effectively, and with minimal impact on system anomalies in production business systems.
[0153] Figure 10 The system architecture diagram of a routing update system provided in this application embodiment is shown. The routing update system 800 may include: a client device 801, a first data center 802, and a second data center 803.
[0154] The client device 801 is configured to: send a first service request to the first data center; receive a response to the first service request from the first data center; if the response indicates an anomaly, update its local routing configuration based on the address of the application service of the first data center or the address of the application service of the second data center, and the address information of the second data center. The updated local routing configuration is used to configure the initiation of a service request to the second data center through the application service of the first data center or the application service of the second data center. The address information of the second data center includes the address of the second data center, the address of the application service of the second data center, and the database address of the second data center. Based on the updated local routing configuration, a second service request is sent to the second data center through the application service of the first data center or the application service of the second data center. The solutions applied to steps S201 and S201, S202 and S202, S203 and S203, and S204 and S204 are also applicable to these steps.
[0155] The first data center 802 is used to send the response result of the first service request to the client device 801.
[0156] The second data center 803 is used to receive the second service request sent by the client device 801.
[0157] It should be noted that for a detailed explanation of the steps performed by each module and their beneficial effects, please refer to the description in the above embodiments, which will not be repeated here.
[0158] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0159] This application embodiment can divide the routing update device into functional modules according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0160] In some embodiments, this application also provides a route update apparatus. The route update apparatus may include one or more functional modules for implementing the route update method of the above method embodiments.
[0161] For example, Figure 11 This is a schematic diagram illustrating the composition of a routing update device provided in an embodiment of this application. Figure 11 As shown, the route update device 900 includes: a sending module 901, a receiving module 902, and a processing module 903.
[0162] The system includes a sending module 901, used to send a first service request to the first data center. A receiving module 902, used to receive the response result of the first service request sent by the first data center. A processing module 903, used to update the local routing configuration based on the address of the application service of the first data center or the application service of the second data center, and the address information of the second data center, when the response result indicates an anomaly. The updated local routing configuration configures the initiation of service requests to the second data center through the application service of the first data center or the application service of the second data center. The address information of the second data center includes the address of the second data center, the address of the application service of the second data center, and the database address of the second data center. The sending module 901 is also used to send a second service request to the second data center through the application service of the first data center or the application service of the second data center, based on the updated local routing configuration.
[0163] In the routing update device provided in this application, if the response result sent by the first data center indicates an abnormal response, the client device can automatically perform a routing update operation to prevent the control center from failing to switch routes in time, thereby restoring the service of the local application in a short time, thus improving the timeliness of routing updates.
[0164] In some embodiments, the updated local routing configuration described above is a first routing configuration, which is used to configure the initiation of service requests to the second data center through the application service of the second data center and the network domain name of the first data center. Specifically, the sending module 901 is used to send a second service request to the database of the second data center based on the first routing configuration, through the network domain name of the first data center and the application service of the second data center.
[0165] In other embodiments, the updated local routing configuration described above is a second routing configuration, which is used to configure the initiation of service requests to the second data center through the application services and network domain names of the second data center. Specifically, the sending module 901 is used to send a second service request to the database of the second data center based on the second routing configuration, through the network domain names and application services of the second data center.
[0166] In some other embodiments, the updated local routing configuration described above is a third routing configuration, which is used to configure the initiation of service requests to the second data center through the network domain name and application services of the first data center. Specifically, the sending module 901 is used, based on the third routing configuration, to send a second service request to the database of the second data center through the network domain name and application services of the first data center.
[0167] In some other embodiments, the second service request includes a first sub-service request, a second sub-service request, and a third sub-service request. Specifically, the sending module 901 is configured to send the first sub-service request to the database of the second data center based on a third routing configuration, whereby the third routing configuration configures the service request to be initiated to the second data center via the network domain name and application service of the first data center; in the event of an anomaly in the first sub-service request, to send the second sub-service request to the database of the second data center based on the first routing configuration, whereby the first routing configuration configures the service request to be initiated to the second data center via the application service and network domain name of the first data center; and in the event of an anomaly in the second sub-service request, to send the third sub-service request to the database of the second data center based on the second routing configuration, whereby the second routing configuration configures the service request to be initiated to the second data center via the application service and network domain name of the second data center.
[0168] In some embodiments, before updating the local routing configuration based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center, the sending module 901 is further configured to send a routing configuration update request to the first data center if the response result indicates an abnormal response. The receiving module 902 is further configured to receive the routing configuration update policy sent by the first data center. The sending module 901 is further configured to send a third service request to the first data center based on the routing path corresponding to the routing configuration update policy. The processing module 903 is specifically configured to update the local routing configuration based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center, if the third service request is abnormal.
[0169] In some other embodiments, the processing module 903 is further configured to restore the local routing configuration after sending a second service request to the second data center through the application service of the first data center or the application service of the second data center based on the updated routing configuration, and after a preset time period.
[0170] It should be noted that the routing update device can implement all the processes implemented in the above method embodiments and achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0171] In the case where the functions of the integrated modules described above are implemented in hardware, this application provides a possible structural schematic diagram of the electronic device involved in the above embodiments. For example... Figure 12 As shown, the electronic device 90 includes: a processor 92, a communication interface 93, and a bus 94. Optionally, the electronic device 90 may also include a memory 91.
[0172] Processor 92 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 92 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0173] Communication interface 93 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0174] The memory 91 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0175] As one possible implementation, the memory 91 can exist independently of the processor 92. The memory 91 can be connected to the processor 92 via a bus 94 and is used to store instructions or program code. When the processor 92 calls and executes the instructions or program code stored in the memory 91, it can implement the routing update method provided in the embodiments of this application.
[0176] In another possible implementation, memory 91 can also be integrated with processor 92.
[0177] Bus 94 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 94 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0178] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.
[0179] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The program can be stored in the aforementioned computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be any of the foregoing embodiments or memory. The aforementioned computer-readable storage medium can also be an external storage device of the aforementioned service invocation device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the aforementioned service invocation device. Further, the aforementioned computer-readable storage medium can include both internal storage units of the aforementioned service invocation device and external storage devices. The aforementioned computer-readable storage medium is used to store the aforementioned computer program and other programs and data required by the aforementioned service invocation device. The aforementioned computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0180] This application also provides a computer program product comprising a computer program that, when run on a computer, causes the computer to execute any of the routing update methods provided in the above embodiments.
[0181] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A route update method, characterized in that, Applied to client devices, including: Send the first service request to the first data center; Receive the response result of the first service request sent by the first data center; If the response result indicates an abnormal response, the local routing configuration is updated based on the address of the application service of the first data center or the address of the application service of the second data center, and the address information of the second data center. The updated local routing configuration is used to configure the service request to be initiated to the second data center through the application service of the first data center or the application service of the second data center. The address information of the second data center includes the address of the second data center, the address of the application service of the second data center, and the database address of the second data center. Based on the updated local routing configuration, a second service request is sent to the second data center through the application service of the first data center or the application service of the second data center.
2. The routing update method according to claim 1, characterized in that, The updated local routing configuration is the first routing configuration, which is used to configure the initiation of service requests to the second data center through the application service of the second data center and the network domain name of the first data center. The step of sending a second service request to the second data center based on the updated local routing configuration, through the application service of the first data center or the application service of the second data center, includes: Based on the first routing configuration, a second service request is sent to the database of the second data center through the network domain name of the first data center and the application service of the second data center.
3. The routing update method according to claim 1, characterized in that, The updated local routing configuration is the second routing configuration, which is used to configure the initiation of service requests to the second data center through the application services and network domain names of the second data center. The step of sending a second service request to the second data center based on the updated routing configuration, through the application service of the first data center or the application service of the second data center, includes: Based on the second routing configuration, a second service request is sent to the database of the second data center through the network domain name and application services of the second data center.
4. The routing update method according to claim 1, characterized in that, The updated local routing configuration is a third routing configuration, which is used to configure the initiation of service requests to the second data center through the network domain name of the first data center and the application service of the first data center. The step of sending a second service request to the second data center based on the updated routing configuration, through the application service of the first data center or the application service of the second data center, includes: Based on the third routing configuration, a second service request is sent to the database of the second data center through the network domain name of the first data center and the application service of the first data center.
5. The routing update method according to claim 1, characterized in that, The second service request includes a first sub-service request, a second sub-service request, and a third sub-service request; The step of sending a second service request to the second data center based on the updated local routing configuration, through the application service of the first data center or the application service of the second data center, includes: Based on the third routing configuration, the first sub-service request is sent to the database of the second data center. The third routing configuration is used to configure the service request to be initiated to the second data center through the network domain name and application service of the first data center. In the event of an anomaly in the first sub-service request, the second sub-service request is sent to the database of the second data center based on the first routing configuration. The first routing configuration is used to configure the service request to be initiated to the second data center through the application service of the second data center and the network domain name of the first data center. In the event of an anomaly in the second sub-service request, the third sub-service request is sent to the database of the second data center based on the second routing configuration. The second routing configuration is used to configure the service request to be initiated to the second data center through the application service and network domain name of the second data center.
6. The routing update method according to any one of claims 1 to 5, characterized in that, Before updating the local routing configuration based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center, the method further includes: If the response result indicates an abnormal response, a route configuration update request is sent to the first data center; Receive the routing configuration update policy sent by the first data center; A third service request is sent to the first data center based on the routing path corresponding to the routing configuration update policy. In the event that the response result indicates an abnormal response, the local routing configuration is updated based on the address of the application service in the first data center or the address of the application service in the second data center, and the address information of the second data center, including: In the event of an anomaly in the third service request, the local routing configuration is updated based on the address of the application service in the first data center or the address of the application service in the second data center, as well as the address information of the second data center.
7. The routing update method according to claim 6, characterized in that, After sending a second service request to the second data center based on the updated routing configuration through the application service of the first data center or the application service of the second data center, the method further includes: After a preset time period, the local routing configuration is restored.
8. A route update device, characterized in that, Applied to client devices, it includes: a sending module, a receiving module, and a processing module; The sending module is used to send a first service request to the first data center; The receiving module is used to receive the response result of the first service request sent by the first data center; The processing module is configured to, in the event that the response result indicates an abnormal response, update the local routing configuration based on the address of the application service of the first data center or the address of the application service of the second data center, and the address information of the second data center. The updated local routing configuration is configured to initiate a service request to the second data center through the application service of the first data center or the application service of the second data center. The address information of the second data center includes the address of the second data center, the address of the application service of the second data center, and the database address of the second data center. The sending module is further configured to send a second service request to the second data center through the application service of the first data center or the application service of the second data center, based on the updated local routing configuration.
9. An electronic device, characterized in that, The device includes a processor and a memory, the processor being coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement the routing update method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer-executable instructions that, when executed on a computer, cause the computer to perform the routing update method according to any one of claims 1 to 7.
11. A computer program product, characterized in that, The computer program product includes a computer program that, when run on an electronic device, causes the electronic device to perform the routing update method as described in any one of claims 1 to 7.