WO2021129008A1 - Service invocation method, apparatus and device, and medium - Google Patents

Service invocation method, apparatus and device, and medium Download PDF

Info

Publication number
WO2021129008A1
WO2021129008A1 PCT/CN2020/117676 CN2020117676W WO2021129008A1 WO 2021129008 A1 WO2021129008 A1 WO 2021129008A1 CN 2020117676 W CN2020117676 W CN 2020117676W WO 2021129008 A1 WO2021129008 A1 WO 2021129008A1
Authority
WO
WIPO (PCT)
Prior art keywords
data center
service
center
data
target
Prior art date
Application number
PCT/CN2020/117676
Other languages
French (fr)
Chinese (zh)
Inventor
水淼
杨斌
高永露
雷平
陈斌
Original Assignee
中国银联股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国银联股份有限公司 filed Critical 中国银联股份有限公司
Publication of WO2021129008A1 publication Critical patent/WO2021129008A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/61Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Definitions

  • This application relates to the field of communication technology, and in particular to a method, device, device, and medium for invoking a service.
  • the distributed service invocation system in the related technology generally includes a registration center and multiple service providing devices, and each service providing device will register its device address on the registration center.
  • the service invoking device can obtain the device address that supports the business service that needs to be invoked from the registration center, and according to the obtained device address, invoke the business service through the service providing device corresponding to the device address.
  • the distributed service invocation system in the related technology does not have disaster tolerance characteristics, in the event of a disaster in the service providing device called by the service invocation device, it may cause the suspension of the business service, reduce the reliability of the business service, and may also cause The data of the business service is lost.
  • the embodiments of the present application provide a service invocation method, device, equipment, and medium, which can improve the reliability of a target service and avoid data loss of the target service.
  • an embodiment of the present application provides a method for invoking a service, and the method includes:
  • the target service In the case of a disaster in the main data center, stop calling the target service through the main data center; the target service has multiple callable data centers, and the multiple callable data centers are determined according to the service providing equipment information corresponding to the target service.
  • the data center with the highest priority among the data centers that can be called is the main data center, and the data centers other than the main data center among the data centers that can be called are the disaster recovery data centers.
  • the priority of the multiple data centers is preset according to the preset
  • the data center priority of the target service is determined;
  • the priority of the data center determine the first data center with the highest priority among the disaster recovery data centers
  • an embodiment of the present application provides a method for invoking a service, and the method includes:
  • an embodiment of the present application provides a service invoking device, which includes:
  • the first call control module is used to stop calling the target service through the main data center in the event of a disaster in the main data center;
  • the target service has multiple callable data centers, and the multiple callable data centers correspond to the target service
  • the service provision equipment information is determined, the data center with the highest priority among the multiple callable data centers is the main data center, and the other data centers of the multiple callable data centers except the main data center are the disaster recovery data centers, and multiple callable data centers are disaster recovery data centers.
  • the priority of the data center is determined according to the preset data center priority of the target service;
  • the data center reselection module is used to determine the first data center with the highest priority among the disaster recovery data centers according to the priority of the data center;
  • the second call control module is used to send a service call request to the first data center to call the target service.
  • an embodiment of the present application provides a service invoking device, which includes:
  • the first data acquisition module is used to acquire the first interactive operation data
  • the first data processing module is configured to determine the changed operating state of the third data center and the changed operating state of the third data center in response to the first interactive operation data;
  • the first instruction generation module is used to generate a state change instruction according to the third data center and the operating state after the change;
  • the first instruction sending module is configured to send a state change instruction to the registry, so that the registry sends a state change notification corresponding to the state change instruction to the service invoking device that invokes the target service through the third data center.
  • an embodiment of the present application provides a service invoking device, including: a processor and a memory storing computer program instructions;
  • the processor implements the service invoking method as described in the first aspect or the second aspect when the processor executes the computer program instructions.
  • an embodiment of the present application provides a computer storage medium with computer program instructions stored on the computer storage medium, and when the computer program instructions are executed by a processor, the service invoking method as described in the first or second aspect is implemented.
  • the target service has multiple callable data centers determined according to the service providing device information corresponding to the target service, and the priority of the multiple callable data centers is determined according to the preset data center priority of the target service.
  • the highest data center is used as the main data center, and other data centers are used as the disaster recovery data center, so that the disaster recovery form can be formed through the main data center and the disaster recovery data center. Therefore, in the event of a disaster in the main data center, the The first data center with the highest priority in the disaster recovery data center calls the target service to quickly complete the disaster recovery switch to the target service, which can ensure the reliability of the target business and avoid data loss of the target business.
  • Figure 1 is a system architecture diagram of an example of a distributed service invocation system in related technologies
  • Figure 2 is a system architecture diagram of an exemplary distributed service invocation system
  • FIG. 3 is a schematic flowchart of an embodiment of the service invocation method of the present application.
  • FIG. 4 is a schematic flowchart of another embodiment of the service invocation method of the present application.
  • Fig. 5 is a diagram of a working state control interface according to an embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of an embodiment of the service invoking device of the present application.
  • FIG. 7 is a schematic structural diagram of another embodiment of the service invoking apparatus of the present application.
  • Fig. 8 is a schematic structural diagram of an embodiment of the service invoking device of the present application.
  • Fig. 1 is a system architecture diagram of an example of a distributed service invocation system in related technologies.
  • the distributed service invocation system includes a registration center 101 and multiple service devices connected in communication with the registration center 101.
  • the service device can be a server, and each service device is registered in the registration center 101.
  • the service device becomes the service invocation device 102, and other service devices that support the business service become the service providing device 103.
  • the service invoking device 102 can send a subscription service request to the registration center 101, and the registration center 101 queries the service providing devices of all the service providing devices 103 that support the business service based on the subscription service request. After receiving the service providing device information, the service invoking device 102 selects one of the service providing devices 103 that support the business service to invoke the business service.
  • the embodiments of the present application provide a service invocation method, device, equipment, and medium for a distributed service invocation system.
  • FIG 2 is a system architecture diagram of an exemplary distributed service invocation system.
  • the distributed service invoking system includes a registration center 201 and a plurality of service devices connected in communication with the registration center 201.
  • the service device may be a server, and the server may be a high-performance electronic calculator. , Used to store and process data.
  • Each service device is registered in the registration center 201 with its device identification, supported business services and device addresses.
  • the service device becomes the service invocation device 202, and other service devices that support the business service become the service providing device 203.
  • the distributed service calling system includes multiple data centers.
  • the data center including the service providing device 203 is the callable data center 204, and the multiple service providing devices 203 are located in different callable data centers 204 respectively.
  • the number of service providing devices 203 in different callable data centers 204 may be the same or different.
  • Each service providing device 203 can support one business service or multiple business services.
  • each service device Since multiple service providing devices 203 are located in different callable data centers 204, each service device also needs to register the data center identifier of the data center to which the service device belongs in the registration center 201.
  • the service invoking device 202 can send a subscription service request to the registration center 201, and the registration center 201 queries the service providing devices of all service providing devices 203 that support the business service based on the subscription service request. After receiving the service providing device information, the service invoking device 202 selects a callable business service from the callable data centers 204 that support the business service, and when a disaster occurs in the callable data center 204 that is used to call the business service, Select one of the other callable data centers 204 to call the business service, so as to implement the disaster recovery switching of the service call.
  • the distributed service invocation system also includes a service control device 205, which can communicate with the registration center 201 to control the operation of each data center.
  • Fig. 3 is a schematic flowchart of an embodiment of the service invocation method of the present application.
  • the service invoking method shown in FIG. 3 can be applied to the service invoking device 202 in FIG. 2.
  • the service invocation method may include:
  • S320 According to the priority of the data center, determine the first data center with the highest priority among the disaster recovery data centers;
  • the target service has multiple callable data centers determined according to the service providing device information corresponding to the target service, and the priority of the multiple callable data centers is determined according to the preset data center priority of the target service.
  • the highest data center is used as the main data center, and other data centers are used as the disaster recovery data center, so that the disaster recovery form can be formed through the main data center and the disaster recovery data center. Therefore, in the event of a disaster in the main data center, the The first data center with the highest priority in the disaster recovery data center calls the target service to quickly complete the disaster recovery switch to the target service, which can ensure the reliability of the target business and avoid data loss of the target business.
  • the callable data center is a data center that has service provision equipment that supports the target service and is determined according to the service provision equipment information corresponding to the target service.
  • the service providing device may be the service providing device 203 in FIG. 2.
  • the service providing device information can be obtained from the registration center 201 in FIG. 2.
  • the service invoking method may further include:
  • the service invocation device may respond to the service invocation instruction and send a subscription request to the registry to subscribe to the target service.
  • the registry may register in the registered center.
  • the service devices according to the supported business services registered by each service device, determine the service providing device that supports the target service, and feedback the service providing device information corresponding to the service providing device to the service invoking device, so that the service invoking device can obtain The service provides device information.
  • the service providing device information may include multiple service providing devices supporting the target business and the device information of each service providing device.
  • the device information includes the data center identifier of the data center to which it belongs, so as to provide the device information according to the service. Determine the callable data center corresponding to the target service.
  • the service invoking method may further include:
  • the data center identifier can be used to add the "data center" attribute to each service providing device, so that the service invoking device can provide these services according to the data center identifier of the data center to which each service providing device belongs in the service providing device information Devices are divided into their own data centers. Since these service-providing devices support target services, the data centers to which these service-providing devices belong are callable data centers.
  • the main data center may be selected according to the priority of the multiple callable data centers, specifically, the priority of the multiple callable data centers Determined according to the preset data center priority of the target service.
  • the service invoking method may further include:
  • the data center priority is the priority for multiple data centers, and the multiple data centers include callable data centers;
  • the data center priority determine the callable data center priority of multiple callable data centers
  • the callable data center priority among multiple callable data centers, determine the main data center.
  • the distributed service invocation system may include multiple data centers, because not every data center supports the target business, and not every one supports the target business.
  • the data centers are currently in normal operation. Therefore, the multiple callable data centers determined according to the information of the service providing equipment are not necessarily all data centers that support the target business among the multiple data centers of the distributed service call system.
  • the operating status of the multiple data centers of the distributed service invocation system is dynamic, the data centers that can be invoked each time the target business is invoked may be different. Therefore, the service invocation device needs to be pre-configured with all data supporting the target business.
  • the data center priority of the center Therefore, after determining multiple callable data centers, you can use the data center priority to determine the callable data center priority, and according to the callable data center priority, select the highest priority data among the multiple callable data centers Center, as the main data center.
  • the service invoking device may send a service invocation request to the main data center to invoke the target service, thereby invoking the target service through the data center with the highest priority among the available data centers.
  • the specific method of S320 may include:
  • the first data center is determined in the disaster recovery data center.
  • the priority of the callable data center has been determined according to the priority of the data center, in the case of a disaster in the main data center, there is no need to re-determine the priority of the disaster recovery data center, as long as the callable data center priority has been determined.
  • For the data center priority select the data center with the second highest priority as the first data center with the highest priority in the disaster recovery data center.
  • the data center with the second highest priority in the disaster recovery data center can also be determined, and a service invocation request can be sent to the data center with the second highest priority. To call the target service.
  • a disaster in the data center with the second highest priority we will not repeat them here.
  • the service invoking device can use the "data center" attribute of the service providing device to automatically determine the main data center and disaster recovery data among the multiple available data centers according to the preset data center priority.
  • the first data center in the center so as to realize the automatic switching of disaster recovery.
  • the service providing device information may include multiple service providing devices supporting the target business and the device information of each service providing device, and the device information may include the data center identification of the data center to which it belongs, device operation information, and The device address information is used to use the device information of the service providing device to invoke the target service through at least one service providing device in the data center selected by the service invoking device.
  • the specific method of S330 may include:
  • a service call request is sent to the first target service providing device to call the target service.
  • the data center identifiers corresponding to multiple service providing devices in the service providing device information can be used, Select the first service providing device with the data center identifier corresponding to the first data center, and then determine the device operation information of each first service providing device according to the device operation information corresponding to multiple service providing devices in the service providing device information, And using preset device invocation rules, such as load balancing rules, select the first target service provider device that can perform service invocation from the first service provider device, and select the device corresponding to multiple service provider devices in the service provider device information
  • the address information is used to find the first target device address corresponding to the first target service providing device, so as to use the first target device address to send a service invocation request to the first target service providing device to call the target service.
  • the service invoking device may use the notification sent by the main data center to determine that a disaster occurs in the main data center. In some other embodiments of the present application, the service invoking device may also use the notification sent by the registration center to determine that a disaster occurs in the main data center. In still other embodiments of the present application, the service invoking device may also use notifications sent by the main data center and the registration center to determine that a disaster occurs in the main data center.
  • the service invoking method may further include:
  • the device operating state of at least one second service providing device is an abnormal operating state
  • the service abnormality notification may be a notification sent by the main data center.
  • the service exception notification may be a call request failure notification sent by the second service providing device supporting the target business in the main data center, and the second service providing device supporting the target business in the main data center is determined to feed back the call request failure notification
  • the service exception notification may also be a notification sent by the registration center.
  • the service abnormality notification may be a communication failure notification sent by the registration center to the service invoking device when the communication with the second service providing device supporting the target service fails, and the main data center's support target service is determined according to the communication failure notification.
  • the service abnormality notification may be a communication failure notification sent by the registration center to the service invoking device when the communication with the second service providing device supporting the target service fails, and the main data center's support target service is determined according to the communication failure notification.
  • the service abnormality notification can also be the notification sent by the main data center and the notification sent by the registration center. Therefore, the above two notifications can be used to comprehensively determine the device operating status of at least one second service providing device. Determine if there is a disaster in the main data center.
  • the service invoking method may further include:
  • the second data center is the main data center, it is determined that a disaster occurs in the main data center.
  • the registration center confirms that the equipment operating status of the service providing equipment supporting the target business in any data center is abnormal, that is, when the service providing equipment supporting the target business in the data center is completely unavailable, the registration center will
  • the service provision equipment that supports the target business in the data center is removed, that is, the data center is removed from the callable data center of the target business, and after removal, the service invocation device that is invoking the target service through the data center is sent to the service invocation device.
  • the data center removal notification with the data center identifier of the data center after receiving the data center removal notification, the service invoking device determines the second data center to be removed according to the data center identifier in the data center removal notification, And it is judged whether the second data center is the main data center. In the case of determining that the second data center is the main data center, it can be determined that a disaster occurs in the main data center.
  • the service invoking method may further include:
  • the third data center is the main data center and the operation state of the third data center is a stopped operation state after the change, it is determined that a disaster has occurred in the main data center.
  • the registration center may receive the state change instruction from the service control device 205 in FIG. 2, and operate according to the data center identification of the third data center whose operating state is changed in the state change instruction and the changed operation of the third data center. Status, generate status change notifications, and send them to the service invoking device. After receiving the status change notification, the service invoking device determines the changed operating status of the third data center and the changed operating status of the third data center. First, it determines whether the third data center is the main data center, and then determines whether the third data center is When the main data center and the changed operating state of the third data center are out of service, it is determined that the service control device sets the main data center to the "not shut down state", thereby determining that a disaster occurs in the main data center.
  • the service invoking device needs to perform the disaster recovery switch of the target service according to the device address of the started cold standby service provider device pushed by the registration center.
  • the service invoking method may further include:
  • a service call request is sent to the target service providing device corresponding to the target device address information to call the target service.
  • the target device address information refers to the device address information of the cold standby service providing device that has been started and completed.
  • the service invoking method may further include:
  • the registration center may receive the main data center change instruction from the service control device 205 in FIG. 2, and generate the data center identifier of the fourth data center that needs to be changed to the main data center in the main data center change instruction.
  • the main data center change notification is sent to the service calling device.
  • the service invoking device determines the fourth data center indicated by the main data center change notification according to the data center identifier in the main data center change notification, and uses the fourth data center as the new main data center , And send a service call request to the fourth data center to call the target service, thereby completing the manual switch to the main data center.
  • Fig. 4 is a schematic flowchart of another embodiment of the service invocation method of the present application.
  • the service invocation method shown in FIG. 4 can be applied to the service control device 205 in FIG. 2.
  • the service invocation method may include:
  • the service control device can be used for manual switching and manual control of some special switching scenarios.
  • the first service providing device in the first data center requires a certain amount of preparation time and cannot switch over in real time, or A new main data center is set up without stopping the operating state of the main data center, so as to realize the unified and integrated management of all registered data centers and service providing equipment in the registration center.
  • Fig. 5 is a diagram of a working state control interface according to an embodiment of the present application.
  • the service control device 205 may be provided with a working state control interface, which is used to interact with the user, obtain the user's interactive operation data, and generate corresponding instructions according to the interactive operation data.
  • S410 may specifically include:
  • the working state control interface includes a plurality of data centers registered on the registration center and a plurality of state control buttons corresponding to each data center;
  • first interactive operation data for the target state control button is acquired.
  • the working status control interface diagram shows that there are two callable data centers, namely the Beijing data center and the Shanghai data center.
  • the Beijing data center has 6 service providing equipment
  • the Shanghai data center has 2 service providing equipment
  • the data center and the Shanghai data center respectively have three status control buttons 510, which are the "set default” control button, the "set enabled” control button and the “set off” control button.
  • the "set enabled” control button And the “set to close” control button is used to change the running status of the corresponding callable data center.
  • the "Set to Enabled” control button can set all the service providing equipment in the corresponding callable data center to the normal operating state, so that the callable data center is in the normal operating state;
  • the "Set to Off” control button can set the corresponding All the service providing equipment in the callable data center is set to the out-of-operation state, so that the callable data center is in the out-of-operation state.
  • the first input operation may be a click operation on the target state control button in the "set to enable” control button and the "set to close” control button.
  • the service control device can obtain the target state control button.
  • the first interactive operation data of the target state control button includes the data center and the operating state corresponding to the target state control button.
  • the data center is regarded as the third data center, and the operating state is regarded as the changed operating state.
  • S430 may specifically include generating a state change instruction according to the data center identifier of the third data center and the operating state after the change.
  • the callable data center when any callable data center is set to stop operation, the callable data center is removed from the registry, so that the registry can also send a data center removal notification to the service calling device to make The service calling device switches the data center that calls the target service.
  • the registration center may also send the main data center status notification to the service invoking device to switch the service invoking device back to Call the target service through the callable data center.
  • the manual switching method provided by the embodiment of the present application can meet part of the disaster recovery switching requirements, has very strong adaptability, and meets the needs of most service disaster recovery switching.
  • the service invoking method may further include:
  • the second input operation is a click operation for the "set as default” control button.
  • the corresponding "set as default” control button can be determined
  • the data center is used as the new main data center, that is, the data center corresponding to the "set as default” control button is used as the fourth data center to be changed, and the main data center change instruction is generated according to the data center identifier of the fourth data center.
  • the service invoking method provided by the embodiments of the present application can be applied to a distributed service invoking system, and its switching mode is flexible, adaptable, and versatile, and can meet individualized and constantly changing needs.
  • the complexity of the distributed service invocation system is low, which greatly improves the development efficiency of the distributed service invocation system and the ability to respond to changes in disaster recovery requirements.
  • Fig. 6 is a schematic structural diagram of an embodiment of the service invoking apparatus of the present application.
  • the service invoking apparatus shown in FIG. 6 can be applied to the service invoking device 202 in FIG. 2.
  • the service invoking apparatus 600 may include:
  • the first call control module 610 is used to stop calling the target service through the main data center in the event of a disaster in the main data center; wherein the target service has multiple callable data centers, and the multiple callable data centers correspond to the target service
  • the service provision equipment information of the multiple callable data centers is determined, the data center with the highest priority among the multiple callable data centers is the main data center, and the data centers other than the main data center among the multiple callable data centers are the disaster recovery data centers.
  • the priority of a callable data center is determined according to the preset data center priority of the target service;
  • the data center reselection module 620 is configured to determine the first data center with the highest priority among the disaster recovery data centers according to the priority of the data center;
  • the second call control module 630 is configured to send a service call request to the first data center to call the target service.
  • the target service has multiple callable data centers determined according to the service providing device information corresponding to the target service, and the priority of the multiple callable data centers is determined according to the preset data center priority of the target service.
  • the highest data center is used as the main data center, and other data centers are used as the disaster recovery data center, so that the disaster recovery form can be formed through the main data center and the disaster recovery data center. Therefore, in the event of a disaster in the main data center, the The first data center with the highest priority in the disaster recovery data center calls the target service to quickly complete the disaster recovery switch to the target service, which can ensure the reliability of the target business and avoid data loss of the target business.
  • the callable data center is a data center with service providing equipment that supports the target service, which is determined according to the service providing equipment information corresponding to the target service.
  • the service providing device may be the service providing device 203 in FIG. 2.
  • the service providing device information can be obtained from the registration center 201 in FIG. 2.
  • the service invoking apparatus 600 may further include:
  • the subscription request sending module is used to send a subscription request for subscribing to the target service to the registration center;
  • the device information receiving module is used to receive service providing device information fed back by the registration center.
  • the service-providing device information includes multiple service-providing devices supporting the target business and the device information of each service-providing device, and the device information includes the data center identifier of the data center to which it belongs, so as to determine according to the service-providing device information The callable data center corresponding to the target service.
  • the service invoking apparatus 600 may further include:
  • a center identification acquiring module configured to acquire multiple data center identifications corresponding to the service providing equipment in the service providing equipment information
  • the callable center determination module is used to determine multiple callable data centers according to the obtained data center identification.
  • the data center identifier can be used to add the "data center" attribute to each service providing device, so that the service invoking device can provide these services according to the data center identifier of the data center to which each service providing device belongs in the service providing device information Devices are divided into their own data centers. Since these service-providing devices support target services, the data centers to which these service-providing devices belong are callable data centers.
  • the service invoking apparatus 600 may further include:
  • the priority obtaining module is used to obtain the priority of the data center; among them, the priority of the data center is the priority for multiple data centers, and the multiple data centers include callable data centers;
  • the priority determination module is used to determine the callable data center priority of multiple callable data centers according to the data center priority
  • the main center determination module is used to determine the main data center among multiple callable data centers according to the priority of the callable data center.
  • the service invoking apparatus 600 may further include:
  • the third call control module is used to send a service call request to the main data center to call the target service.
  • the data center reselection module 620 may be specifically used for:
  • the first data center is determined in the disaster recovery data center.
  • the service invoking device can use the "data center" attribute of the service providing device to automatically determine the main data center and disaster recovery data among the multiple available data centers according to the preset data center priority.
  • the first data center in the center so as to realize the automatic switching of disaster recovery.
  • the service providing device information may include multiple service providing devices supporting the target business and the device information of each service providing device, and the device information may include the data center identification of the data center to which it belongs, device operation information, and The device address information is used to use the device information of the service providing device to invoke the target service through at least one service providing device in the data center selected by the service invoking device.
  • the second call control module 630 may be specifically used to:
  • a service call request is sent to the first target service providing device to call the target service.
  • the service invoking apparatus 600 may further include:
  • the first notification receiving module is used to receive service exception notifications
  • the first notification processing module is configured to determine the device operating status of at least one second service providing device supporting the target service in the main data center in response to the service abnormality notification;
  • the first disaster determination module is configured to determine that a disaster occurs in the main data center when it is determined that the equipment operating state of at least one second service providing equipment is an abnormal operating state.
  • the service exception notification is a notification sent by the main data center and/or a notification sent by the registration center.
  • the service invoking apparatus 600 may further include:
  • the second notification receiving module is used to receive the data center removal notification sent by the registration center
  • the second notification processing module is configured to determine the second data center to be removed among the multiple callable data centers in response to the data center removal notification;
  • the second disaster determination module is used to determine that a disaster occurs in the main data center when the second data center is the main data center.
  • the service invoking apparatus 600 may further include:
  • the third notification receiving module is used to receive the status change notification sent by the registration center
  • the third notification processing module is used to determine the third data center that changes the operating status in response to the status change notification
  • the third disaster determination module is used to determine that a disaster occurs in the primary data center when the third data center is the primary data center and the operating state after the change of the third data center is the out of operation state.
  • the service invoking apparatus 600 may further include:
  • the fourth call control module is used to send a service call request to the target service providing device corresponding to the target device address information in the case of receiving the target device address information sent by the registration center to call the target service.
  • the service invoking apparatus 600 may further include:
  • the fourth notification receiving module is used to determine the fourth data center indicated by the main data center change notification among the multiple callable data centers in the case of receiving the main data center change notification sent by the registration center;
  • the fourth notification processing module is used to update the fourth data center as the main data center;
  • the fifth call control module is used to send a service call request to the fourth data center to call the target service.
  • the service invoking apparatus 600 of the embodiment shown in FIG. 6 can realize all the functions and effects of the service invoking method of the embodiment shown in FIG. 3, and the principle is similar, so it will not be repeated here.
  • Fig. 7 is a schematic structural diagram of another embodiment of the service invoking apparatus of the present application.
  • the service invoking apparatus shown in FIG. 7 can be applied to the service control device 205 in FIG. 2.
  • the service invoking apparatus 700 may include:
  • the first data obtaining module 710 is configured to obtain first interactive operation data
  • the first data processing module 720 is configured to determine the changed operating state of the third data center and the changed operating state of the third data center in response to the first interactive operation data;
  • the first instruction generation module 730 is configured to generate a state change instruction according to the third data center and the operating state after the change;
  • the first instruction sending module 740 is configured to send a state change instruction to the registration center, so that the registration center sends a state change notification corresponding to the state change instruction to the service invoking device that invokes the target service through the third data center.
  • the service control device can be used for manual switching and manual control of some special switching scenarios.
  • the first service providing device in the first data center requires a certain amount of preparation time and cannot switch over in real time, or A new main data center is set up without stopping the operating state of the main data center, so as to realize the unified and integrated management of all registered data centers and service providing equipment in the registration center.
  • the first data acquisition module 710 is specifically configured to:
  • the working state control interface includes a plurality of data centers registered on the registration center and a plurality of state control buttons corresponding to each data center;
  • first interactive operation data for the target state control button is acquired.
  • the service invoking apparatus 700 may further include:
  • the second data acquisition module is configured to receive a user's second input operation on the state control button on the working state control interface; in response to the second input operation, acquire the second interactive operation data for the state control button;
  • the second data processing module is configured to determine the fourth data center to be changed as the main data center according to the second interactive operation data
  • the second instruction generation module is used to generate the main data center change instruction according to the data center identifier of the fourth data center;
  • the second instruction sending module is used to send the main data center change instruction to the registration center, so that the registration center sends the main data center change notification corresponding to the data center change instruction to the service invoking device.
  • the service invoking apparatus 700 of the embodiment shown in FIG. 7 can realize all the functions and effects of the service invoking method of the embodiment shown in FIG. 4, and the principle is similar, so it will not be repeated here.
  • Fig. 8 is a schematic structural diagram of an embodiment of the service invoking device of the present application.
  • the service invoking device may include a processor 801 and a memory 802 storing computer program instructions.
  • the aforementioned processor 801 may include a central processing unit (CPU), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • the memory 802 may include mass storage for data or instructions.
  • the memory 802 may include a hard disk drive (Hard Disk Drive, HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or two or more Multiple combinations of these.
  • the storage 802 may include removable or non-removable (or fixed) media.
  • the memory 802 may be inside or outside the integrated gateway disaster recovery device.
  • the memory 802 is a non-volatile solid-state memory.
  • the memory 802 includes read-only memory (ROM).
  • the ROM can be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically rewritable ROM (EAROM) or flash memory or A combination of two or more of these.
  • the processor 801 reads and executes computer program instructions stored in the memory 802 to implement any one of the service invoking methods in the foregoing embodiments.
  • the service invoking device may further include a communication interface 803 and a bus 810. Among them, as shown in FIG. 8, the processor 801, the memory 802, and the communication interface 803 are connected through a bus 810 and complete mutual communication.
  • the communication interface 803 is mainly used to implement communication between various modules, devices, units and/or devices in the embodiments of the present application.
  • the bus 810 includes hardware, software, or both, and couples the components of the service invoking device to each other.
  • the bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hyper transfer (HT) interconnect, industry standard architecture (ISA) Bus, Infinite Bandwidth Interconnect, Low Pin Count (LPC) Bus, Memory Bus, Micro Channel Architecture (MCA) Bus, Peripheral Component Interconnect (PCI) Bus, PCI-Express (PCI-X) Bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or a combination of two or more of these.
  • the bus 810 may include one or more buses.
  • the service invoking device implements the various functions of the service invoking method and device described in conjunction with FIG. 1 to FIG. 7, and will not be repeated here.
  • the embodiment of the present application may provide a computer storage medium for implementation.
  • the computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the service invoking methods in the foregoing embodiments is implemented.
  • An example of the computer-readable storage medium may be a non-transitory computer-readable storage medium, including ROM, RAM, magnetic disk, or optical disk.
  • the functional blocks shown in the above-mentioned structural block diagram can be implemented as hardware, software, firmware, or a combination thereof.
  • it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, and so on.
  • ASIC application specific integrated circuit
  • the elements of this application are programs or code segments used to perform required tasks.
  • the program or code segment may be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link through a data signal carried in a carrier wave.
  • "Machine-readable medium" may include any medium that can store or transmit information.
  • machine-readable media examples include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and so on.
  • the code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

Abstract

Disclosed are a service invocation method, apparatus and device, and a medium. The service invocation method comprises: in the case that a disaster occurs in a main data center, stopping invoking a target service by means of the main data center, wherein the target service has multiple data centers that can be invoked, said multiple data centers are determined according to the service providing device information corresponding to the target service, the data center with the highest priority among said multiple data centers is the main data center, the other data centers are disaster recovery data centers, and the priorities of said multiple data centers are determined according to the preset priorities of the data centers of the target service; according to the priorities of the data centers, determining a first data center with the highest priority among the disaster recovery data centers; and sending a service invocation request to the first data center to invoke the target service. According to embodiments of the present application, the reliability of a target service can be improved, and the data loss of the target service can be avoided.

Description

服务调用方法、装置、设备及介质Service invocation method, device, equipment and medium
相关申请的交叉引用Cross references to related applications
本申请要求享有于2019年12月23日提交的名称为“服务调用方法、装置、设备及介质”的中国专利申请201911339742.6的优先权,该申请的全部内容通过引用并入本文中。This application claims the priority of the Chinese patent application 201911339742.6 entitled "Service Invocation Method, Apparatus, Equipment, and Medium" filed on December 23, 2019, and the entire content of this application is incorporated herein by reference.
技术领域Technical field
本申请涉及通信技术领域,特别是涉及一种服务调用方法、装置、设备及介质。This application relates to the field of communication technology, and in particular to a method, device, device, and medium for invoking a service.
背景技术Background technique
相关技术中的分布式服务调用系统一般包括一个注册中心和多个服务提供设备,每个服务提供设备都会在注册中心上注册其设备地址。服务调用设备可以从注册中心获取支持需要调用的业务服务的设备地址,并根据所获取的设备地址,通过设备地址对应的服务提供设备调用该业务服务。The distributed service invocation system in the related technology generally includes a registration center and multiple service providing devices, and each service providing device will register its device address on the registration center. The service invoking device can obtain the device address that supports the business service that needs to be invoked from the registration center, and according to the obtained device address, invoke the business service through the service providing device corresponding to the device address.
由于相关技术中的分布式服务调用系统不具有容灾特性,在服务调用设备所调用的服务提供设备发生灾难的情况下,可能导致业务服务的暂停,降低了业务服务的可靠性,还可能造成业务服务的数据丢失。Since the distributed service invocation system in the related technology does not have disaster tolerance characteristics, in the event of a disaster in the service providing device called by the service invocation device, it may cause the suspension of the business service, reduce the reliability of the business service, and may also cause The data of the business service is lost.
发明内容Summary of the invention
本申请实施例提供一种服务调用方法、装置、设备及介质,能够提高目标服务的可靠性,并且避免目标服务的数据丢失。The embodiments of the present application provide a service invocation method, device, equipment, and medium, which can improve the reliability of a target service and avoid data loss of the target service.
第一方面,本申请实施例提供一种服务调用方法,该方法包括:In the first aspect, an embodiment of the present application provides a method for invoking a service, and the method includes:
在主数据中心发生灾难的情况下,停止通过主数据中心调用目标服务;其中,目标服务具有多个可调用数据中心,多个可调用数据中心根据目标服务对应的服务提供设备信息确定,多个可调用数据中心中优先级最高的 数据中心为主数据中心,多个可调用数据中心中除主数据中心以外的其他数据中心为灾备数据中心,多个可调用数据中心的优先级根据预设的目标服务的数据中心优先级确定;In the case of a disaster in the main data center, stop calling the target service through the main data center; the target service has multiple callable data centers, and the multiple callable data centers are determined according to the service providing equipment information corresponding to the target service. The data center with the highest priority among the data centers that can be called is the main data center, and the data centers other than the main data center among the data centers that can be called are the disaster recovery data centers. The priority of the multiple data centers is preset according to the preset The data center priority of the target service is determined;
根据数据中心优先级,在灾备数据中心中确定优先级最高的第一数据中心;According to the priority of the data center, determine the first data center with the highest priority among the disaster recovery data centers;
向第一数据中心发送服务调用请求,以调用目标服务。Send a service call request to the first data center to call the target service.
第二方面,本申请实施例提供了一种服务调用方法,该方法包括:In the second aspect, an embodiment of the present application provides a method for invoking a service, and the method includes:
获取第一交互操作数据;Obtain the first interactive operation data;
响应于第一交互操作数据,确定变更运行状态的第三数据中心和第三数据中心的变更后运行状态;In response to the first interactive operation data, determine the changed operating state of the third data center and the changed operating state of the third data center;
根据第三数据中心和和变更后运行状态,生成状态变更指令;According to the third data center and the operating state after the change, generate state change instructions;
向注册中心发送状态变更指令,以使注册中心向通过第三数据中心调用目标服务的服务调用设备发送状态变更指令对应的状态变更通知。Send a state change instruction to the registry, so that the registry sends a state change notification corresponding to the state change instruction to the service invoking device that invokes the target service through the third data center.
第三方面,本申请实施例提供了一种服务调用装置,该装置包括:In the third aspect, an embodiment of the present application provides a service invoking device, which includes:
第一调用控制模块,用于在主数据中心发生灾难的情况下,停止通过主数据中心调用目标服务;其中,目标服务具有多个可调用数据中心,多个可调用数据中心根据目标服务对应的服务提供设备信息确定,多个可调用数据中心中优先级最高的数据中心为主数据中心,多个可调用数据中心中除主数据中心以外的其他数据中心为灾备数据中心,多个可调用数据中心的优先级根据预设的目标服务的数据中心优先级确定;The first call control module is used to stop calling the target service through the main data center in the event of a disaster in the main data center; the target service has multiple callable data centers, and the multiple callable data centers correspond to the target service The service provision equipment information is determined, the data center with the highest priority among the multiple callable data centers is the main data center, and the other data centers of the multiple callable data centers except the main data center are the disaster recovery data centers, and multiple callable data centers are disaster recovery data centers. The priority of the data center is determined according to the preset data center priority of the target service;
数据中心重选模块,用于根据数据中心优先级,在灾备数据中心中确定优先级最高的第一数据中心;The data center reselection module is used to determine the first data center with the highest priority among the disaster recovery data centers according to the priority of the data center;
第二调用控制模块,用于向第一数据中心发送服务调用请求,以调用目标服务。The second call control module is used to send a service call request to the first data center to call the target service.
第四方面,本申请实施例提供了一种服务调用装置,该装置包括:In a fourth aspect, an embodiment of the present application provides a service invoking device, which includes:
第一数据获取模块,用于获取第一交互操作数据;The first data acquisition module is used to acquire the first interactive operation data;
第一数据处理模块,用于响应于第一交互操作数据,确定变更运行状态的第三数据中心和第三数据中心的变更后运行状态;The first data processing module is configured to determine the changed operating state of the third data center and the changed operating state of the third data center in response to the first interactive operation data;
第一指令生成模块,用于根据第三数据中心和和变更后运行状态,生 成状态变更指令;The first instruction generation module is used to generate a state change instruction according to the third data center and the operating state after the change;
第一指令发送模块,用于向注册中心发送状态变更指令,以使注册中心向通过第三数据中心调用目标服务的服务调用设备发送状态变更指令对应的状态变更通知。The first instruction sending module is configured to send a state change instruction to the registry, so that the registry sends a state change notification corresponding to the state change instruction to the service invoking device that invokes the target service through the third data center.
第五方面,本申请实施例提供了一种服务调用设备,包括:处理器以及存储有计算机程序指令的存储器;In a fifth aspect, an embodiment of the present application provides a service invoking device, including: a processor and a memory storing computer program instructions;
处理器执行计算机程序指令时实现如第一方面或第二方面所述的服务调用方法。The processor implements the service invoking method as described in the first aspect or the second aspect when the processor executes the computer program instructions.
第六方面,本申请实施例提供了一种计算机存储介质,计算机存储介质上存储有计算机程序指令,计算机程序指令被处理器执行时实现如第一方面或第二方面所述的服务调用方法。In a sixth aspect, an embodiment of the present application provides a computer storage medium with computer program instructions stored on the computer storage medium, and when the computer program instructions are executed by a processor, the service invoking method as described in the first or second aspect is implemented.
在本申请实施例中,目标服务具有根据目标服务对应的服务提供设备信息确定的多个可调用数据中心,多个可调用数据中心中根据预设的目标服务的数据中心优先级确定的优先级最高的数据中心被作为主数据中心,其他数据中心被作为灾备数据中心,使得能够通过主数据中心和灾备数据中心形成容灾形态,因此,在主数据中心发生灾难的情况下,可以通过灾备数据中心中确定优先级最高的第一数据中心调用目标服务,快速完成对目标服务的灾备切换,能够保证目标业务的可靠性,避免目标业务的数据丢失。In the embodiment of the present application, the target service has multiple callable data centers determined according to the service providing device information corresponding to the target service, and the priority of the multiple callable data centers is determined according to the preset data center priority of the target service. The highest data center is used as the main data center, and other data centers are used as the disaster recovery data center, so that the disaster recovery form can be formed through the main data center and the disaster recovery data center. Therefore, in the event of a disaster in the main data center, the The first data center with the highest priority in the disaster recovery data center calls the target service to quickly complete the disaster recovery switch to the target service, which can ensure the reliability of the target business and avoid data loss of the target business.
附图说明Description of the drawings
下面将通过参考附图来描述本申请示例性实施例的特征、优点和技术效果。The features, advantages, and technical effects of the exemplary embodiments of the present application will be described below with reference to the accompanying drawings.
图1是相关技术中的分布式服务调用系统的一个示例的系统架构图;Figure 1 is a system architecture diagram of an example of a distributed service invocation system in related technologies;
图2是示例性的分布式服务调用系统的系统架构图;Figure 2 is a system architecture diagram of an exemplary distributed service invocation system;
图3是本申请的服务调用方法的实施例的流程示意图;FIG. 3 is a schematic flowchart of an embodiment of the service invocation method of the present application;
图4是本申请的服务调用方法的另一个实施例的流程示意图;FIG. 4 is a schematic flowchart of another embodiment of the service invocation method of the present application;
图5是根据本申请实施例的工作状态控制界面图;Fig. 5 is a diagram of a working state control interface according to an embodiment of the present application;
图6是本申请的服务调用装置的实施例的结构示意图;Fig. 6 is a schematic structural diagram of an embodiment of the service invoking device of the present application;
图7是本申请的服务调用装置的另一个实施例的结构示意图;FIG. 7 is a schematic structural diagram of another embodiment of the service invoking apparatus of the present application;
图8是本申请的服务调用设备的实施例的结构示意图。Fig. 8 is a schematic structural diagram of an embodiment of the service invoking device of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请的实施方式作进一步详细描述。以下实施例的详细描述和附图用于示例性地说明本申请的原理,但不能用来限制本申请的范围,即本申请不限于所描述的实施例。The implementation of the present application will be described in further detail below in conjunction with the accompanying drawings and embodiments. The detailed description and drawings of the following embodiments are used to exemplarily illustrate the principle of the present application, but cannot be used to limit the scope of the present application, that is, the present application is not limited to the described embodiments.
在本申请的描述中,需要说明的是,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。In the description of this application, it should be noted that relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities Or there is any such actual relationship or sequence between operations. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes those that are not explicitly listed Other elements of, or also include elements inherent to this process, method, article or equipment. If there are no more restrictions, the element defined by the sentence "including..." does not exclude the existence of other same elements in the process, method, article or equipment that includes the element.
图1是相关技术中的分布式服务调用系统的一个示例的系统架构图。如图1所示,该分布式服务调用系统包括注册中心101和多个与注册中心101通信连接的多个服务设备,其中,服务设备可以为服务器,每个服务设备都在注册中心101中注册有该服务设备的设备标识、所支持的业务服务和设备地址。当一个服务设备接收到针对业务服务的服务调用指令的情况下,该服务设备即成为了服务调用设备102,其他支持该业务服务的服务设备即成为了服务提供设备103。Fig. 1 is a system architecture diagram of an example of a distributed service invocation system in related technologies. As shown in Figure 1, the distributed service invocation system includes a registration center 101 and multiple service devices connected in communication with the registration center 101. The service device can be a server, and each service device is registered in the registration center 101. There is the device identification of the service device, the supported business service and the device address. When a service device receives a service invocation instruction for a business service, the service device becomes the service invocation device 102, and other service devices that support the business service become the service providing device 103.
在图1所示的分布式服务调用系统中,服务调用设备102可以向注册中心101发送订阅服务请求,注册中心101基于该订阅服务请求查询支持该业务服务的全部服务提供设备103的服务提供设备信息,服务调用设备102在接收到服务提供设备信息后,从支持该业务服务的服务提供设备103中选择一个调用业务服务。In the distributed service invoking system shown in FIG. 1, the service invoking device 102 can send a subscription service request to the registration center 101, and the registration center 101 queries the service providing devices of all the service providing devices 103 that support the business service based on the subscription service request. After receiving the service providing device information, the service invoking device 102 selects one of the service providing devices 103 that support the business service to invoke the business service.
在利用图1所示的分布式服务调用系统构建容灾系统的情况下,需要 设置两套分布式服务调用系统,不但会使整体系统的成本较高,还会使容灾管理较为困难,业务服务的灾备切换的速度较慢,降低了业务服务的可靠性,还可能造成业务服务的数据丢失。In the case of using the distributed service invocation system shown in Figure 1 to construct a disaster recovery system, two sets of distributed service invocation systems need to be set up, which not only makes the overall system cost higher, but also makes disaster recovery management more difficult. The speed of service disaster recovery switching is slow, which reduces the reliability of business services and may also cause data loss of business services.
为了解决现有技术问题,本申请实施例提供了一种针对分布式服务调用系统的服务调用方法、装置、设备及介质。In order to solve the problems of the prior art, the embodiments of the present application provide a service invocation method, device, equipment, and medium for a distributed service invocation system.
图2是示例性的分布式服务调用系统的系统架构图。如图2所示,该分布式服务调用系统包括注册中心201和多个与注册中心201通信连接的多个服务设备,其中,服务设备可以为服务器,服务器可以是一种高性能的电子计算器,用于存储和处理数据。每个服务设备都在注册中心201中注册有该服务设备的设备标识、所支持的业务服务和设备地址。当一个服务设备接收到针对业务服务的服务调用指令的情况下,该服务设备即成为了服务调用设备202,其他支持该业务服务的服务设备即成为了服务提供设备203。Figure 2 is a system architecture diagram of an exemplary distributed service invocation system. As shown in Figure 2, the distributed service invoking system includes a registration center 201 and a plurality of service devices connected in communication with the registration center 201. The service device may be a server, and the server may be a high-performance electronic calculator. , Used to store and process data. Each service device is registered in the registration center 201 with its device identification, supported business services and device addresses. When a service device receives a service invocation instruction for a business service, the service device becomes the service invocation device 202, and other service devices that support the business service become the service providing device 203.
继续参见图2,分布式服务调用系统包括多个数据中心,其中,包括服务提供设备203的数据中心为可调用数据中心204,多个服务提供设备203分别位于不同的可调用数据中心204中。其中,不同的可调用数据中心204中的服务提供设备203的数量可以相同也可以不同。每个服务提供设备203可以支持一个业务服务或者多个业务服务。Continuing to refer to FIG. 2, the distributed service calling system includes multiple data centers. Among them, the data center including the service providing device 203 is the callable data center 204, and the multiple service providing devices 203 are located in different callable data centers 204 respectively. The number of service providing devices 203 in different callable data centers 204 may be the same or different. Each service providing device 203 can support one business service or multiple business services.
由于多个服务提供设备203分别位于不同的可调用数据中心204中,因此,每个服务设备还需要在注册中心201中注册该服务设备所属数据中心的数据中心标识。Since multiple service providing devices 203 are located in different callable data centers 204, each service device also needs to register the data center identifier of the data center to which the service device belongs in the registration center 201.
在图2所示的分布式服务调用系统中,服务调用设备202可以向注册中心201发送订阅服务请求,注册中心201基于该订阅服务请求查询支持该业务服务的全部服务提供设备203的服务提供设备信息,服务调用设备202在接收到服务提供设备信息后,从支持该业务服务的可调用数据中心204中选择一个调用业务服务,并在用于调用业务服务的可调用数据中心204发生灾难时,从其他可调用数据中心204中选择一个调用业务服务,以实现服务调用的灾备切换。In the distributed service invoking system shown in FIG. 2, the service invoking device 202 can send a subscription service request to the registration center 201, and the registration center 201 queries the service providing devices of all service providing devices 203 that support the business service based on the subscription service request. After receiving the service providing device information, the service invoking device 202 selects a callable business service from the callable data centers 204 that support the business service, and when a disaster occurs in the callable data center 204 that is used to call the business service, Select one of the other callable data centers 204 to call the business service, so as to implement the disaster recovery switching of the service call.
继续参见图2,分布式服务调用系统还包括服务控制设备205,服务控 制设备205能够与注册中心201,控制各个数据中心的运行。Continuing to refer to Figure 2, the distributed service invocation system also includes a service control device 205, which can communicate with the registration center 201 to control the operation of each data center.
下面,参考图2所示的分布式服务调用系统,对本申请实施例提供的服务调用方法进行详细说明。Hereinafter, with reference to the distributed service invoking system shown in FIG. 2, the service invoking method provided by the embodiment of the present application will be described in detail.
图3是本申请的服务调用方法的实施例的流程示意图。其中,图3所示的服务调用方法可以应用于图2中的服务调用设备202。如图3所示,该服务调用方法可以包括:Fig. 3 is a schematic flowchart of an embodiment of the service invocation method of the present application. Wherein, the service invoking method shown in FIG. 3 can be applied to the service invoking device 202 in FIG. 2. As shown in Figure 3, the service invocation method may include:
S310、在主数据中心发生灾难的情况下,停止通过主数据中心调用目标服务;其中,目标服务具有多个可调用数据中心,多个可调用数据中心根据目标服务对应的服务提供设备信息确定,多个可调用数据中心中优先级最高的数据中心为主数据中心,多个可调用数据中心中除主数据中心以外的其他数据中心为灾备数据中心,多个可调用数据中心的优先级根据预设的目标服务的数据中心优先级确定;S310. In the case of a disaster in the main data center, stop calling the target service through the main data center; where the target service has multiple callable data centers, and the multiple callable data centers are determined according to the service providing equipment information corresponding to the target service. The data center with the highest priority among the multiple callable data centers is the main data center, and the data centers other than the main data center among the multiple callable data centers are disaster recovery data centers. The priority of the multiple callable data centers is based on The data center priority of the preset target service is determined;
S320、根据数据中心优先级,在灾备数据中心中确定优先级最高的第一数据中心;S320: According to the priority of the data center, determine the first data center with the highest priority among the disaster recovery data centers;
S330、向第一数据中心发送服务调用请求,以调用目标服务。S330. Send a service invocation request to the first data center to invoke the target service.
在本申请实施例中,目标服务具有根据目标服务对应的服务提供设备信息确定的多个可调用数据中心,多个可调用数据中心中根据预设的目标服务的数据中心优先级确定的优先级最高的数据中心被作为主数据中心,其他数据中心被作为灾备数据中心,使得能够通过主数据中心和灾备数据中心形成容灾形态,因此,在主数据中心发生灾难的情况下,可以通过灾备数据中心中确定优先级最高的第一数据中心调用目标服务,快速完成对目标服务的灾备切换,能够保证目标业务的可靠性,避免目标业务的数据丢失。In the embodiment of the present application, the target service has multiple callable data centers determined according to the service providing device information corresponding to the target service, and the priority of the multiple callable data centers is determined according to the preset data center priority of the target service. The highest data center is used as the main data center, and other data centers are used as the disaster recovery data center, so that the disaster recovery form can be formed through the main data center and the disaster recovery data center. Therefore, in the event of a disaster in the main data center, the The first data center with the highest priority in the disaster recovery data center calls the target service to quickly complete the disaster recovery switch to the target service, which can ensure the reliability of the target business and avoid data loss of the target business.
在本申请实施例中,具体地,可调用数据中心为根据目标服务对应的服务提供设备信息所确定的、具有支持目标业务的服务提供设备的数据中心。其中,服务提供设备可以为图2中的服务提供设备203。In the embodiment of the present application, specifically, the callable data center is a data center that has service provision equipment that supports the target service and is determined according to the service provision equipment information corresponding to the target service. The service providing device may be the service providing device 203 in FIG. 2.
在本申请一些实施例中,服务提供设备信息可以从图2中的注册中心201获取。In some embodiments of the present application, the service providing device information can be obtained from the registration center 201 in FIG. 2.
可选地,在S310之前,该服务调用方法还可以包括:Optionally, before S310, the service invoking method may further include:
向注册中心发送订阅目标服务的订阅请求;Send a subscription request for subscribing to the target service to the registry;
接收注册中心反馈的服务提供设备信息。Receive service provision device information fed back by the registration center.
具体地,当服务调用设备接收到针对目标服务的服务调用指令后,可以响应于该服务调用指令,向注册中心发送订阅目标服务的订阅请求,注册中心在接收到订阅请求后,可以在所注册的服务设备中,根据每个服务设备注册的所支持的业务服务,确定支持目标服务的服务提供设备,并将服务提供设备对应的服务提供设备信息反馈给服务调用设备,以使服务调用设备获取服务提供设备信息。Specifically, after the service invocation device receives the service invocation instruction for the target service, it may respond to the service invocation instruction and send a subscription request to the registry to subscribe to the target service. After receiving the subscription request, the registry may register in the registered center. Among the service devices, according to the supported business services registered by each service device, determine the service providing device that supports the target service, and feedback the service providing device information corresponding to the service providing device to the service invoking device, so that the service invoking device can obtain The service provides device information.
在本申请一些实施例中,服务提供设备信息可以包括支持目标业务的多个服务提供设备和每个服务提供设备的设备信息,设备信息包括所属数据中心的数据中心标识,以根据服务提供设备信息确定目标服务对应的可调用数据中心。In some embodiments of the present application, the service providing device information may include multiple service providing devices supporting the target business and the device information of each service providing device. The device information includes the data center identifier of the data center to which it belongs, so as to provide the device information according to the service. Determine the callable data center corresponding to the target service.
可选地,在上述的接收注册中心反馈的服务提供设备信息之后以及S310之前,该服务调用方法还可以包括:Optionally, after receiving the service providing device information fed back by the registration center and before S310, the service invoking method may further include:
获取服务提供设备信息中的多个服务提供设备对应的数据中心标识;Obtain the data center identifiers corresponding to multiple service providing devices in the service providing device information;
根据所获取的数据中心标识,确定多个可调用数据中心。According to the obtained data center identifier, multiple callable data centers are determined.
因此,可以利用数据中心标识,为每个服务提供设备增加“数据中心”属性,使得服务调用设备能够根据服务提供设备信息中的每个服务提供设备所属数据中心的数据中心标识,将这些服务提供设备划分至所属的数据中心,由于这些服务提供设备支持目标服务,因此,这些服务提供设备所属的数据中心即为可调用数据中心。Therefore, the data center identifier can be used to add the "data center" attribute to each service providing device, so that the service invoking device can provide these services according to the data center identifier of the data center to which each service providing device belongs in the service providing device information Devices are divided into their own data centers. Since these service-providing devices support target services, the data centers to which these service-providing devices belong are callable data centers.
在本申请一些实施例中,在S310之前,还可以在多个可调用数据中心中,根据多个可调用数据中心的优先级选择主数据中心,具体地,多个可调用数据中心的优先级根据预设的目标服务的数据中心优先级确定。In some embodiments of the present application, before S310, among multiple callable data centers, the main data center may be selected according to the priority of the multiple callable data centers, specifically, the priority of the multiple callable data centers Determined according to the preset data center priority of the target service.
可选地,在上述的接收注册中心反馈的服务提供设备信息之后以及S310之前,该服务调用方法还可以包括:Optionally, after receiving the service providing device information fed back by the registration center and before S310, the service invoking method may further include:
获取数据中心优先级;其中,数据中心优先级为针对多个数据中心的优先级,多个数据中心包括可调用数据中心;Obtain the data center priority; among them, the data center priority is the priority for multiple data centers, and the multiple data centers include callable data centers;
根据数据中心优先级,确定多个可调用数据中心的可调用数据中心优 先级;According to the data center priority, determine the callable data center priority of multiple callable data centers;
根据可调用数据中心优先级,在多个可调用数据中心中,确定主数据中心。According to the callable data center priority, among multiple callable data centers, determine the main data center.
在这些实施例,如图2所示的分布式服务调用系统,分布式服务调用系统可以包括多个数据中心,由于并不是每个数据中心都支持目标业务,也并不是每个支持目标业务的数据中心当前都处于正常运行状态,因此,根据服务提供设备信息所确定的多个可调用数据中心,并不一定是分布式服务调用系统的多个数据中心中的全部支持目标业务的数据中心。但是,因为分布式服务调用系统的多个数据中心的运行状态是动态的,每一次调用目标业务时的可调用数据中心可能不同,因此,服务调用设备中需要预先配置好全部支持目标业务的数据中心的数据中心优先级。因此,在确定多个可调用数据中心后,可以利用数据中心优先级,确定可调用数据中心优先级,并且根据可调用数据中心优先级,在多个可调用数据中心中选择优先级最高的数据中心,作为主数据中心。In these embodiments, the distributed service invocation system as shown in Figure 2. The distributed service invocation system may include multiple data centers, because not every data center supports the target business, and not every one supports the target business. The data centers are currently in normal operation. Therefore, the multiple callable data centers determined according to the information of the service providing equipment are not necessarily all data centers that support the target business among the multiple data centers of the distributed service call system. However, because the operating status of the multiple data centers of the distributed service invocation system is dynamic, the data centers that can be invoked each time the target business is invoked may be different. Therefore, the service invocation device needs to be pre-configured with all data supporting the target business. The data center priority of the center. Therefore, after determining multiple callable data centers, you can use the data center priority to determine the callable data center priority, and according to the callable data center priority, select the highest priority data among the multiple callable data centers Center, as the main data center.
在本申请一些实施例中,在确定了主数据中心后,服务调用设备可以向主数据中心发送服务调用请求,以调用目标服务,从而通过可调用数据中心中优先级最高的数据中心调用目标服务。In some embodiments of the present application, after the main data center is determined, the service invoking device may send a service invocation request to the main data center to invoke the target service, thereby invoking the target service through the data center with the highest priority among the available data centers. .
在本申请一些实施例中,S320的具体方法可以包括:In some embodiments of the present application, the specific method of S320 may include:
根据可调用数据中心优先级,在灾备数据中心中确定第一数据中心。According to the priority of the callable data center, the first data center is determined in the disaster recovery data center.
具体地,由于上文中已经根据数据中心优先级确定了可调用数据中心优先级,因此,在主数据中心发生灾难的情况下,无需重新确定灾备数据中心优先级,只要根据已经确定的可调用数据中心优先级,选择优先级次最高的数据中心,作为灾备数据中心中优先级最高的第一数据中心即可。Specifically, since the priority of the callable data center has been determined according to the priority of the data center, in the case of a disaster in the main data center, there is no need to re-determine the priority of the disaster recovery data center, as long as the callable data center priority has been determined. For the data center priority, select the data center with the second highest priority as the first data center with the highest priority in the disaster recovery data center.
在本申请一些实施例中,在第一数据中心发生灾难的情况下,还可以在灾备数据中心中确定优先级次最高的数据中心,并向优先级次最高的数据中心发送服务调用请求,以调用目标服务。在优先级次最高的数据中心发生灾难的情况下,以此类推,在此不做赘述。In some embodiments of the present application, in the case of a disaster in the first data center, the data center with the second highest priority in the disaster recovery data center can also be determined, and a service invocation request can be sent to the data center with the second highest priority. To call the target service. In the case of a disaster in the data center with the second highest priority, and so on, we will not repeat them here.
因此,在本申请实施例中,服务调用设备可以利用服务提供设备的“数据中心”属性,根据预设的数据中心优先级,自动确定多个可调用数 据中心中的主数据中心和灾备数据中心中的第一数据中心,从而实现灾备的自动切换。Therefore, in this embodiment of the application, the service invoking device can use the "data center" attribute of the service providing device to automatically determine the main data center and disaster recovery data among the multiple available data centers according to the preset data center priority. The first data center in the center, so as to realize the automatic switching of disaster recovery.
在本申请另一些实施例中,服务提供设备信息可以包括支持目标业务的多个服务提供设备和每个服务提供设备的设备信息,设备信息可以包括所属数据中心的数据中心标识、设备运行信息和设备地址信息,以利用服务提供设备的设备信息,通过服务调用设备所选择的数据中心中的至少一个服务提供设备调用目标服务。In other embodiments of the present application, the service providing device information may include multiple service providing devices supporting the target business and the device information of each service providing device, and the device information may include the data center identification of the data center to which it belongs, device operation information, and The device address information is used to use the device information of the service providing device to invoke the target service through at least one service providing device in the data center selected by the service invoking device.
下面,以服务调用设备所选择的数据中心为第一数据中心为例进行说明。In the following, description is made by taking the data center selected by the service invoking device as the first data center as an example.
可选地,S330的具体方法可以包括:Optionally, the specific method of S330 may include:
根据服务提供设备信息中的多个服务提供设备对应的数据中心标识,确定属于第一数据中心的第一服务提供设备;Determine the first service providing device belonging to the first data center according to the data center identifiers corresponding to the multiple service providing devices in the service providing device information;
根据服务提供设备信息中的多个服务提供设备对应的设备运行信息和预设的设备调用规则,在第一服务提供设备中,确定第一目标服务提供设备;Determine the first target service providing device in the first service providing device according to the device operation information corresponding to the multiple service providing devices in the service providing device information and the preset device invocation rules;
根据服务提供设备信息中的多个服务提供设备对应的设备地址信息,确定第一目标服务提供设备对应的第一目标设备地址;Determine the first target device address corresponding to the first target service providing device according to the device address information corresponding to the multiple service providing devices in the service providing device information;
通过第一目标设备地址,向第一目标服务提供设备发送服务调用请求,以调用目标服务。Through the address of the first target device, a service call request is sent to the first target service providing device to call the target service.
具体地,在主数据中心发生灾难的情况下,当服务调用设备在灾备数据中心中确定了第一数据中心以后,可以根据服务提供设备信息中的多个服务提供设备对应的数据中心标识,选择具有第一数据中心对应的数据中心标识的第一服务提供设备,然后根据服务提供设备信息中的多个服务提供设备对应的设备运行信息,确定每个第一服务提供设备的设备运行信息,并利用预设的设备调用规则,例如负载均衡规则,在第一服务提供设备中选择可以进行服务调用的第一目标服务提供设备,并根据服务提供设备信息中的多个服务提供设备对应的设备地址信息,查找第一目标服务提供设备对应的第一目标设备地址,从而通过第一目标设备地址,向第一目标服务提供设备发送服务调用请求,以调用目标服务。Specifically, in the case of a disaster in the primary data center, after the service invoking device determines the first data center in the disaster recovery data center, the data center identifiers corresponding to multiple service providing devices in the service providing device information can be used, Select the first service providing device with the data center identifier corresponding to the first data center, and then determine the device operation information of each first service providing device according to the device operation information corresponding to multiple service providing devices in the service providing device information, And using preset device invocation rules, such as load balancing rules, select the first target service provider device that can perform service invocation from the first service provider device, and select the device corresponding to multiple service provider devices in the service provider device information The address information is used to find the first target device address corresponding to the first target service providing device, so as to use the first target device address to send a service invocation request to the first target service providing device to call the target service.
在本申请一些实施例中,服务调用设备可以利用主数据中心发送的通知确定主数据中心发生灾难。在本申请另一些实施例中,服务调用设备还可以利用注册中心发送的通知确定主数据中心发生灾难。在本申请又一些实施例中,服务调用设备也可以利用主数据中心和注册中心发送的通知确定主数据中心发生灾难。In some embodiments of the present application, the service invoking device may use the notification sent by the main data center to determine that a disaster occurs in the main data center. In some other embodiments of the present application, the service invoking device may also use the notification sent by the registration center to determine that a disaster occurs in the main data center. In still other embodiments of the present application, the service invoking device may also use notifications sent by the main data center and the registration center to determine that a disaster occurs in the main data center.
在本申请一些实施例中,可选地,在S310之前,该服务调用方法还可以包括:In some embodiments of the present application, optionally, before S310, the service invoking method may further include:
接收服务异常通知;Receive notifications of service exceptions;
响应于服务异常通知,确定主数据中心中支持目标业务的至少一个第二服务提供设备的设备运行状态;In response to the service abnormality notification, determine the device operating status of at least one second service providing device supporting the target business in the main data center;
在确定至少一个第二服务提供设备的设备运行状态均为异常运行状态的情况下,确定主数据中心发生灾难。In a case where it is determined that the device operating state of at least one second service providing device is an abnormal operating state, it is determined that a disaster occurs in the main data center.
在一些实施例中,服务异常通知可以为主数据中心发送的通知。具体地,服务异常通知可以为主数据中心的支持目标业务的第二服务提供设备发送的调用请求失败通知,在确定主数据中心的支持目标业务的第二服务提供设备均反馈了调用请求失败通知的情况下,可以确定至少一个第二服务提供设备的设备运行状态均为异常运行状态,从而可以确定主数据中心发生灾难。In some embodiments, the service abnormality notification may be a notification sent by the main data center. Specifically, the service exception notification may be a call request failure notification sent by the second service providing device supporting the target business in the main data center, and the second service providing device supporting the target business in the main data center is determined to feed back the call request failure notification In the case of, it can be determined that the equipment operating status of at least one second service providing equipment is an abnormal operating status, so that it can be determined that a disaster occurs in the primary data center.
在另一些实施例中,服务异常通知还可以为注册中心发送的通知。具体地,服务异常通知可以为注册中心在与支持目标业务的第二服务提供设备通信失败的情况下,向服务调用设备发送的通信失败通知,在根据通信失败通知确定主数据中心的支持目标业务的第二服务提供设备均与注册中心通信失败的情况下,可以确定至少一个第二服务提供设备的设备运行状态均为异常运行状态,从而可以确定主数据中心发生灾难。In other embodiments, the service exception notification may also be a notification sent by the registration center. Specifically, the service abnormality notification may be a communication failure notification sent by the registration center to the service invoking device when the communication with the second service providing device supporting the target service fails, and the main data center's support target service is determined according to the communication failure notification. When all of the second service providing devices fail to communicate with the registration center, it can be determined that the device operating status of at least one second service providing device is an abnormal operating status, so that it can be determined that a disaster occurs in the main data center.
在有一些实施例中,服务异常通知也可以为主数据中心发送的通知和注册中心发送的通知,因此,可以利用上述的两种通知综合确定至少一个第二服务提供设备的设备运行状态,以确定主数据中心是否发生灾难。In some embodiments, the service abnormality notification can also be the notification sent by the main data center and the notification sent by the registration center. Therefore, the above two notifications can be used to comprehensively determine the device operating status of at least one second service providing device. Determine if there is a disaster in the main data center.
在本申请另一些实施例中,可选地,在S310之前,该服务调用方法还可以包括:In some other embodiments of the present application, optionally, before S310, the service invoking method may further include:
接收注册中心发送的数据中心移除通知;Receive the data center removal notice sent by the registration center;
响应于数据中心移除通知,在多个可调用数据中心中,确定被移除的第二数据中心;In response to the data center removal notification, determine the second data center to be removed among the multiple callable data centers;
在第二数据中心为主数据中心的情况下,确定主数据中心发生灾难。In the case that the second data center is the main data center, it is determined that a disaster occurs in the main data center.
具体地,在注册中心确认任一个数据中心中支持目标业务的服务提供设备的设备运行状态均为异常运行状态,即该数据中心中支持目标业务的服务提供设备完全不可用时,注册中心会将该数据中心中支持目标业务的服务提供设备移除,即将该数据中心从目标业务的可调用数据中心中移除,并在移除后,向正在通过该数据中心调用目标服务的服务调用设备发送带有该数据中心的数据中心标识的数据中心移除通知,服务调用设备在接收到数据中心移除通知后,根据数据中心移除通知中的数据中心标识,确定被移除的第二数据中心,并且判断第二数据中心是否为主数据中心,在确定第二数据中心为主数据中心的情况下,便可以确定主数据中心发生灾难。Specifically, the registration center confirms that the equipment operating status of the service providing equipment supporting the target business in any data center is abnormal, that is, when the service providing equipment supporting the target business in the data center is completely unavailable, the registration center will The service provision equipment that supports the target business in the data center is removed, that is, the data center is removed from the callable data center of the target business, and after removal, the service invocation device that is invoking the target service through the data center is sent to the service invocation device. The data center removal notification with the data center identifier of the data center, after receiving the data center removal notification, the service invoking device determines the second data center to be removed according to the data center identifier in the data center removal notification, And it is judged whether the second data center is the main data center. In the case of determining that the second data center is the main data center, it can be determined that a disaster occurs in the main data center.
在本申请又一些实施例中,可选地,在S310之前,该服务调用方法还可以包括:In still other embodiments of the present application, optionally, before S310, the service invoking method may further include:
接收注册中心发送的状态变更通知;Receive status change notifications sent by the registry;
响应于状态变更通知,确定变更运行状态的第三数据中心;In response to the status change notification, determine the third data center that changes its operating status;
在第三数据中心为主数据中心且第三数据中心的变更后运行状态为停止运行状态的情况下,确定主数据中心发生灾难。In the case where the third data center is the main data center and the operation state of the third data center is a stopped operation state after the change, it is determined that a disaster has occurred in the main data center.
具体地,注册中心可以接收来自图2中的服务控制设备205的状态变更指令,并根据该状态变更指令中的变更运行状态的第三数据中心的数据中心标识和第三数据中心的变更后运行状态,生成状态变更通知,发送给服务调用设备。服务调用设备在接收到状态变更通知后,确定变更运行状态的第三数据中心和第三数据中心的变更后运行状态,首先判断第三数据中心是否为主数据中心,在确定第三数据中心为主数据中心且第三数据中心的变更后运行状态为停止运行状态的情况下,确定服务控制设备将主数据中心设置为“未停机状态”,从而确定主数据中心发生灾难。Specifically, the registration center may receive the state change instruction from the service control device 205 in FIG. 2, and operate according to the data center identification of the third data center whose operating state is changed in the state change instruction and the changed operation of the third data center. Status, generate status change notifications, and send them to the service invoking device. After receiving the status change notification, the service invoking device determines the changed operating status of the third data center and the changed operating status of the third data center. First, it determines whether the third data center is the main data center, and then determines whether the third data center is When the main data center and the changed operating state of the third data center are out of service, it is determined that the service control device sets the main data center to the "not shut down state", thereby determining that a disaster occurs in the main data center.
其中,上述的服务控制设备205生成状态变更指令的具体方法将在下文详细说明,在此不做赘述。Wherein, the specific method for the above-mentioned service control device 205 to generate the status change instruction will be described in detail below, and will not be repeated here.
在本申请实施例中,在主数据中心发生灾难的情况下,具有温备和冷备两种模式。在温备模式下,可以直接利用在服务调用设备启动时,根据订阅请求从注册中心获取的服务提供设备信息执行S320-330,以实时进行目标服务的灾备切换。在冷备模式下,服务调用设备需要根据注册中心推送来的已启动完成的冷备服务提供设备的设备地址,进行目标服务的灾备切换。In the embodiment of the present application, in the event of a disaster in the main data center, there are two modes of warm standby and cold standby. In the warm backup mode, you can directly use the service providing device information obtained from the registration center according to the subscription request to execute S320-330 when the service invoking device starts, so as to perform the disaster recovery switch of the target service in real time. In the cold standby mode, the service invoking device needs to perform the disaster recovery switch of the target service according to the device address of the started cold standby service provider device pushed by the registration center.
在一些实施例中,可选地,在冷备模式下,在S310之后,该服务调用方法还可以包括:In some embodiments, optionally, in the cold standby mode, after S310, the service invoking method may further include:
在接收到注册中心发送的目标设备地址信息的情况下,向目标设备地址信息对应的目标服务提供设备发送服务调用请求,以调用目标服务。In the case of receiving the target device address information sent by the registration center, a service call request is sent to the target service providing device corresponding to the target device address information to call the target service.
其中,目标设备地址信息指的是已启动完成的冷备服务提供设备的设备地址信息。Among them, the target device address information refers to the device address information of the cold standby service providing device that has been started and completed.
在本申请一些实施例在,该服务调用方法还可以包括:In some embodiments of the present application, the service invoking method may further include:
在接收到注册中心发送的主数据中心变更通知的情况下,在多个可调用数据中心中,确定主数据中心变更通知所指示的第四数据中心;In the case of receiving the main data center change notification sent by the registration center, among multiple callable data centers, determine the fourth data center indicated by the main data center change notification;
将第四数据中心,更新为主数据中心;Update the fourth data center to the main data center;
向第四数据中心发送服务调用请求,以调用目标服务。Send a service call request to the fourth data center to call the target service.
具体地,注册中心可以接收来自图2中的服务控制设备205的主数据中心变更指令,并根据该主数据中心变更指令中的需要变更为主数据中心的第四数据中心的数据中心标识,生成主数据中心变更通知,发送给服务调用设备。服务调用设备在接收到主数据中心变更通知后,根据主数据中心变更通知中的数据中心标识,确定主数据中心变更通知所指示的第四数据中心,将第四数据中心作为新的主数据中心,并向第四数据中心发送服务调用请求,以调用目标服务,从而完成对主数据中心的手动切换。Specifically, the registration center may receive the main data center change instruction from the service control device 205 in FIG. 2, and generate the data center identifier of the fourth data center that needs to be changed to the main data center in the main data center change instruction. The main data center change notification is sent to the service calling device. After receiving the main data center change notification, the service invoking device determines the fourth data center indicated by the main data center change notification according to the data center identifier in the main data center change notification, and uses the fourth data center as the new main data center , And send a service call request to the fourth data center to call the target service, thereby completing the manual switch to the main data center.
其中,上述的服务控制设备205生成主数据中心变更指令的具体方法将在下文详细说明,在此不做赘述。The specific method for the above-mentioned service control device 205 to generate the main data center change instruction will be described in detail below, and will not be repeated here.
图4是本申请的服务调用方法的另一个实施例的流程示意图。其中,图4所示的服务调用方法可以应用于图2中的服务控制设备205。如图4所示,该服务调用方法可以包括:Fig. 4 is a schematic flowchart of another embodiment of the service invocation method of the present application. Wherein, the service invocation method shown in FIG. 4 can be applied to the service control device 205 in FIG. 2. As shown in Figure 4, the service invocation method may include:
S410、获取第一交互操作数据;S410. Acquire first interactive operation data.
S420、响应于第一交互操作数据,确定变更运行状态的第三数据中心和第三数据中心的变更后运行状态;S420. In response to the first interactive operation data, determine the changed operating state of the third data center and the changed operating state of the third data center;
S430、根据第三数据中心和和变更后运行状态,生成状态变更指令;S430. Generate a state change instruction according to the third data center and the operating state after the change;
S440、向注册中心发送状态变更指令,以使注册中心向通过第三数据中心调用目标服务的服务调用设备发送状态变更指令对应的状态变更通知。S440. Send a state change instruction to the registry, so that the registry sends a state change notification corresponding to the state change instruction to the service invoking device that invokes the target service through the third data center.
在本申请实施例中,服务控制设备可以用于对某些特殊切换场景的手动切换和手动控制,例如第一数据中心中的第一服务提供设备需要一定的准备时间不能实时的切换过来,或者在不停止主数据中心的运行状态的情况下设置新的主数据中心,从而实现对注册中心中所有注册的数据中心和服务提供设备的统一集成管理。In the embodiment of the present application, the service control device can be used for manual switching and manual control of some special switching scenarios. For example, the first service providing device in the first data center requires a certain amount of preparation time and cannot switch over in real time, or A new main data center is set up without stopping the operating state of the main data center, so as to realize the unified and integrated management of all registered data centers and service providing equipment in the registration center.
图5是根据本申请实施例的工作状态控制界面图。如图5所示,服务控制设备205可以设有工作状态控制界面,工作状态控制界面用于与用户进行交互,获取用户的交互操作数据,并根据交互操作数据生成对应的指令。Fig. 5 is a diagram of a working state control interface according to an embodiment of the present application. As shown in FIG. 5, the service control device 205 may be provided with a working state control interface, which is used to interact with the user, obtain the user's interactive operation data, and generate corresponding instructions according to the interactive operation data.
在本申请一些实施例中,S410可以具体包括:In some embodiments of the present application, S410 may specifically include:
接收用户对工作状态控制界面上的目标状态控制按钮的第一输入操作;其中,工作状态控制界面包括在注册中心上所注册的多个数据中心和每个数据中心对应的多个状态控制按钮;Receiving a user's first input operation on the target state control button on the working state control interface; wherein the working state control interface includes a plurality of data centers registered on the registration center and a plurality of state control buttons corresponding to each data center;
响应于第一输入操作,获取针对目标状态控制按钮的第一交互操作数据。In response to the first input operation, first interactive operation data for the target state control button is acquired.
参见图5,工作状态控制界面图中显示有两个可调用数据中心,分别为北京数据中心和上海数据中心,北京数据中心具有6个服务提供设备,上海数据中心具有2个服务提供设备,北京数据中心和上海数据中心分别具有三个状态控制按钮510,分别为“设为默认”控制按钮、“设为启用”控制按钮和“设为关闭”控制按钮,其中,“设为启用”控制按钮和“设为关闭”控制按钮用于变更对应的可调用数据中心的运行状态。其中,“设为启用”控制按钮可以将对应的可调用数据中心中的全部服务提供设备设为正常运行状态,使该可调用数据中心处于正常运行状态;“设为关 闭”控制按钮可以将对应的可调用数据中心中的全部服务提供设备设为停止运行状态,使该可调用数据中心处于停止运行状态。Refer to Figure 5, the working status control interface diagram shows that there are two callable data centers, namely the Beijing data center and the Shanghai data center. The Beijing data center has 6 service providing equipment, and the Shanghai data center has 2 service providing equipment, Beijing The data center and the Shanghai data center respectively have three status control buttons 510, which are the "set default" control button, the "set enabled" control button and the "set off" control button. Among them, the "set enabled" control button And the "set to close" control button is used to change the running status of the corresponding callable data center. Among them, the "Set to Enabled" control button can set all the service providing equipment in the corresponding callable data center to the normal operating state, so that the callable data center is in the normal operating state; the "Set to Off" control button can set the corresponding All the service providing equipment in the callable data center is set to the out-of-operation state, so that the callable data center is in the out-of-operation state.
具体地,第一输入操作可以为针对“设为启用”控制按钮和“设为关闭”控制按钮中的目标状态控制按钮的点击操作,当用户点击目标状态控制按钮后,服务控制设备可以获取针对目标状态控制按钮的第一交互操作数据,包括目标状态控制按钮对应的数据中心和运行状态,该数据中心被作为第三数据中心,该运行状态被作为变更后运行状态。Specifically, the first input operation may be a click operation on the target state control button in the "set to enable" control button and the "set to close" control button. When the user clicks the target state control button, the service control device can obtain the target state control button. The first interactive operation data of the target state control button includes the data center and the operating state corresponding to the target state control button. The data center is regarded as the third data center, and the operating state is regarded as the changed operating state.
在本申请一些实施例中,S430可以具体包括根据第三数据中心的数据中心标识和变更后运行状态,生成状态变更指令。In some embodiments of the present application, S430 may specifically include generating a state change instruction according to the data center identifier of the third data center and the operating state after the change.
在这些实施例中,当任意可调用数据中心被设置为停止运行状态后,注册中心中移除该可调用数据中心,以使注册中心也可以通过向服务调用设备发送数据中心移除通知,使服务调用设备切换调用目标服务的数据中心。In these embodiments, when any callable data center is set to stop operation, the callable data center is removed from the registry, so that the registry can also send a data center removal notification to the service calling device to make The service calling device switches the data center that calls the target service.
进一步地,在上述的被设置为停止运行状态的可调用数据中心重新被设置为正常运行状态的情况下,注册中心也可以通过向服务调用设备发送主数据中心状态通知,使服务调用设备切换回通过该可调用数据中心调用目标服务。Further, in the case that the above-mentioned callable data center that is set to be in the out of operation state is set to the normal operating state again, the registration center may also send the main data center status notification to the service invoking device to switch the service invoking device back to Call the target service through the callable data center.
因此,本申请实施例提供的手工切换的方式,可以满足部分的灾备切换要求,具有非常强的适应性,满足大多数服务灾备切换的需求。Therefore, the manual switching method provided by the embodiment of the present application can meet part of the disaster recovery switching requirements, has very strong adaptability, and meets the needs of most service disaster recovery switching.
在本申请另一些实施例中,该服务调用方法还可以包括:In some other embodiments of the present application, the service invoking method may further include:
接收用户对工作状态控制界面上的状态控制按钮的第二输入操作;Receiving a user's second input operation on the state control button on the working state control interface;
响应于第二输入操作,获取针对状态控制按钮的第二交互操作数据;In response to the second input operation, acquiring second interactive operation data for the state control button;
根据第二交互操作数据,确定待变更为主数据中心的第四数据中心;According to the second interactive operation data, determine the fourth data center to be changed to the main data center;
根据第四数据中心的数据中心标识,生成主数据中心变更指令;According to the data center identification of the fourth data center, generate the main data center change instruction;
向注册中心发送主数据中心变更指令,以使注册中心向服务调用设备发送数据中心变更指令对应的主数据中心变更通知。Send the main data center change instruction to the registration center, so that the registration center sends the main data center change notification corresponding to the data center change instruction to the service invoking device.
继续参见图5,第二输入操作为针对“设为默认”控制按钮的点击操作,在用户点击任意“设为默认”控制按钮的情况下,可以确定将该“设为默认”控制按钮对应的数据中心作为新的主数据中心,即将该“设为默 认”控制按钮对应的数据中心作为待变更的第四数据中心,并根据第四数据中心的数据中心标识,生成主数据中心变更指令。Continuing to refer to Figure 5, the second input operation is a click operation for the "set as default" control button. When the user clicks any "set as default" control button, the corresponding "set as default" control button can be determined The data center is used as the new main data center, that is, the data center corresponding to the "set as default" control button is used as the fourth data center to be changed, and the main data center change instruction is generated according to the data center identifier of the fourth data center.
综上所述,本申请实施例所提供的服务调用方法,可以应用于分布式服务调用系统,其切换方式灵活、适应性强、通用性高,可以满足个性化和不断变化的需求。同时,分布式服务调用系统的复杂性较低,极大的提高了分布式服务调用系统的开发效率和应对灾备需求变化的能力。In summary, the service invoking method provided by the embodiments of the present application can be applied to a distributed service invoking system, and its switching mode is flexible, adaptable, and versatile, and can meet individualized and constantly changing needs. At the same time, the complexity of the distributed service invocation system is low, which greatly improves the development efficiency of the distributed service invocation system and the ability to respond to changes in disaster recovery requirements.
图6是本申请的服务调用装置的实施例的结构示意图。其中,图6所示的服务调用装置可以应用于图2中的服务调用设备202。如图6所示,该服务调用装置600可以包括:Fig. 6 is a schematic structural diagram of an embodiment of the service invoking apparatus of the present application. Wherein, the service invoking apparatus shown in FIG. 6 can be applied to the service invoking device 202 in FIG. 2. As shown in FIG. 6, the service invoking apparatus 600 may include:
第一调用控制模块610,用于在主数据中心发生灾难的情况下,停止通过主数据中心调用目标服务;其中,目标服务具有多个可调用数据中心,多个可调用数据中心根据目标服务对应的服务提供设备信息确定,多个可调用数据中心中优先级最高的数据中心为主数据中心,多个可调用数据中心中除所述主数据中心以外的其他数据中心为灾备数据中心,多个可调用数据中心的优先级根据预设的目标服务的数据中心优先级确定;The first call control module 610 is used to stop calling the target service through the main data center in the event of a disaster in the main data center; wherein the target service has multiple callable data centers, and the multiple callable data centers correspond to the target service The service provision equipment information of the multiple callable data centers is determined, the data center with the highest priority among the multiple callable data centers is the main data center, and the data centers other than the main data center among the multiple callable data centers are the disaster recovery data centers. The priority of a callable data center is determined according to the preset data center priority of the target service;
数据中心重选模块620,用于根据数据中心优先级,在灾备数据中心中确定优先级最高的第一数据中心;The data center reselection module 620 is configured to determine the first data center with the highest priority among the disaster recovery data centers according to the priority of the data center;
第二调用控制模块630,用于向第一数据中心发送服务调用请求,以调用目标服务。The second call control module 630 is configured to send a service call request to the first data center to call the target service.
在本申请实施例中,目标服务具有根据目标服务对应的服务提供设备信息确定的多个可调用数据中心,多个可调用数据中心中根据预设的目标服务的数据中心优先级确定的优先级最高的数据中心被作为主数据中心,其他数据中心被作为灾备数据中心,使得能够通过主数据中心和灾备数据中心形成容灾形态,因此,在主数据中心发生灾难的情况下,可以通过灾备数据中心中确定优先级最高的第一数据中心调用目标服务,快速完成对目标服务的灾备切换,能够保证目标业务的可靠性,避免目标业务的数据丢失。In the embodiment of the present application, the target service has multiple callable data centers determined according to the service providing device information corresponding to the target service, and the priority of the multiple callable data centers is determined according to the preset data center priority of the target service. The highest data center is used as the main data center, and other data centers are used as the disaster recovery data center, so that the disaster recovery form can be formed through the main data center and the disaster recovery data center. Therefore, in the event of a disaster in the main data center, the The first data center with the highest priority in the disaster recovery data center calls the target service to quickly complete the disaster recovery switch to the target service, which can ensure the reliability of the target business and avoid data loss of the target business.
在本申请实施例中,具体地,可调用数据中心为根据目标服务对应的服务提供设备信息所确定的、具有支持目标业务的服务提供设备的数据中 心。其中,服务提供设备可以为图2中的服务提供设备203。In the embodiment of the present application, specifically, the callable data center is a data center with service providing equipment that supports the target service, which is determined according to the service providing equipment information corresponding to the target service. The service providing device may be the service providing device 203 in FIG. 2.
在本申请一些实施例中,服务提供设备信息可以从图2中的注册中心201获取。In some embodiments of the present application, the service providing device information can be obtained from the registration center 201 in FIG. 2.
可选地,该服务调用装置600还可以包括:Optionally, the service invoking apparatus 600 may further include:
订阅请求发送模块,用于向注册中心发送订阅目标服务的订阅请求;The subscription request sending module is used to send a subscription request for subscribing to the target service to the registration center;
设备信息接收模块,用于接收注册中心反馈的服务提供设备信息。The device information receiving module is used to receive service providing device information fed back by the registration center.
在本申请一些实施例中,服务提供设备信息包括支持目标业务的多个服务提供设备和每个服务提供设备的设备信息,设备信息包括所属数据中心的数据中心标识,以根据服务提供设备信息确定目标服务对应的可调用数据中心。In some embodiments of the present application, the service-providing device information includes multiple service-providing devices supporting the target business and the device information of each service-providing device, and the device information includes the data center identifier of the data center to which it belongs, so as to determine according to the service-providing device information The callable data center corresponding to the target service.
在本申请一些实施例中,该服务调用装置600还可以包括:In some embodiments of the present application, the service invoking apparatus 600 may further include:
中心标识获取模块,用于获取所述服务提供设备信息中的多个所述服务提供设备对应的数据中心标识;A center identification acquiring module, configured to acquire multiple data center identifications corresponding to the service providing equipment in the service providing equipment information;
可调用中心确定模块,用于根据获取的数据中心标识,确定多个可调用数据中心。The callable center determination module is used to determine multiple callable data centers according to the obtained data center identification.
因此,可以利用数据中心标识,为每个服务提供设备增加“数据中心”属性,使得服务调用设备能够根据服务提供设备信息中的每个服务提供设备所属数据中心的数据中心标识,将这些服务提供设备划分至所属的数据中心,由于这些服务提供设备支持目标服务,因此,这些服务提供设备所属的数据中心即为可调用数据中心。Therefore, the data center identifier can be used to add the "data center" attribute to each service providing device, so that the service invoking device can provide these services according to the data center identifier of the data center to which each service providing device belongs in the service providing device information Devices are divided into their own data centers. Since these service-providing devices support target services, the data centers to which these service-providing devices belong are callable data centers.
在本申请一些实施例中,该服务调用装置600还可以包括:In some embodiments of the present application, the service invoking apparatus 600 may further include:
优先级获取模块,用于获取数据中心优先级;其中,数据中心优先级为针对多个数据中心的优先级,多个数据中心包括可调用数据中心;The priority obtaining module is used to obtain the priority of the data center; among them, the priority of the data center is the priority for multiple data centers, and the multiple data centers include callable data centers;
优先级确定模块,用于根据数据中心优先级,确定多个可调用数据中心的可调用数据中心优先级;The priority determination module is used to determine the callable data center priority of multiple callable data centers according to the data center priority;
主中心确定模块,用于根据可调用数据中心优先级,在多个可调用数据中心中,确定主数据中心。The main center determination module is used to determine the main data center among multiple callable data centers according to the priority of the callable data center.
在本申请一些实施例中,该服务调用装置600还可以包括:In some embodiments of the present application, the service invoking apparatus 600 may further include:
第三调用控制模块,用于向主数据中心发送服务调用请求,以调用目 标服务。The third call control module is used to send a service call request to the main data center to call the target service.
在本申请一些实施例中,数据中心重选模块620可以具体用于:In some embodiments of the present application, the data center reselection module 620 may be specifically used for:
根据可调用数据中心优先级,在灾备数据中心中确定第一数据中心。According to the priority of the callable data center, the first data center is determined in the disaster recovery data center.
因此,在本申请实施例中,服务调用设备可以利用服务提供设备的“数据中心”属性,根据预设的数据中心优先级,自动确定多个可调用数据中心中的主数据中心和灾备数据中心中的第一数据中心,从而实现灾备的自动切换。Therefore, in this embodiment of the application, the service invoking device can use the "data center" attribute of the service providing device to automatically determine the main data center and disaster recovery data among the multiple available data centers according to the preset data center priority. The first data center in the center, so as to realize the automatic switching of disaster recovery.
在本申请另一些实施例中,服务提供设备信息可以包括支持目标业务的多个服务提供设备和每个服务提供设备的设备信息,设备信息可以包括所属数据中心的数据中心标识、设备运行信息和设备地址信息,以利用服务提供设备的设备信息,通过服务调用设备所选择的数据中心中的至少一个服务提供设备调用目标服务。In other embodiments of the present application, the service providing device information may include multiple service providing devices supporting the target business and the device information of each service providing device, and the device information may include the data center identification of the data center to which it belongs, device operation information, and The device address information is used to use the device information of the service providing device to invoke the target service through at least one service providing device in the data center selected by the service invoking device.
下面,以服务调用设备所选择的数据中心为第一数据中心为例进行说明。In the following, description is made by taking the data center selected by the service invoking device as the first data center as an example.
在本申请一些实施例中,第二调用控制模块630可以具体用于:In some embodiments of the present application, the second call control module 630 may be specifically used to:
根据服务提供设备信息中的多个服务提供设备对应的数据中心标识,确定属于第一数据中心的第一服务提供设备;Determine the first service providing device belonging to the first data center according to the data center identifiers corresponding to the multiple service providing devices in the service providing device information;
根据服务提供设备信息中的多个服务提供设备对应的设备运行信息和预设的设备调用规则,在第一服务提供设备中,确定第一目标服务提供设备;Determine the first target service providing device in the first service providing device according to the device operation information corresponding to the multiple service providing devices in the service providing device information and the preset device invocation rules;
根据服务提供设备信息中的多个服务提供设备对应的设备地址信息,确定第一目标服务提供设备对应的第一目标设备地址;Determine the first target device address corresponding to the first target service providing device according to the device address information corresponding to the multiple service providing devices in the service providing device information;
通过第一目标设备地址,向第一目标服务提供设备发送服务调用请求,以调用目标服务。Through the address of the first target device, a service call request is sent to the first target service providing device to call the target service.
在本申请一些实施例中,该服务调用装置600还可以包括:In some embodiments of the present application, the service invoking apparatus 600 may further include:
第一通知接收模块,用于接收服务异常通知;The first notification receiving module is used to receive service exception notifications;
第一通知处理模块,用于响应于服务异常通知,确定主数据中心中支持目标业务的至少一个第二服务提供设备的设备运行状态;The first notification processing module is configured to determine the device operating status of at least one second service providing device supporting the target service in the main data center in response to the service abnormality notification;
第一灾难确定模块,用于在确定至少一个第二服务提供设备的设备运 行状态均为异常运行状态的情况下,确定主数据中心发生灾难。The first disaster determination module is configured to determine that a disaster occurs in the main data center when it is determined that the equipment operating state of at least one second service providing equipment is an abnormal operating state.
可选地,服务异常通知为主数据中心发送的通知和/或注册中心发送的通知。Optionally, the service exception notification is a notification sent by the main data center and/or a notification sent by the registration center.
在本申请另一些实施例中,该服务调用装置600还可以包括:In some other embodiments of the present application, the service invoking apparatus 600 may further include:
第二通知接收模块,用于接收注册中心发送的数据中心移除通知;The second notification receiving module is used to receive the data center removal notification sent by the registration center;
第二通知处理模块,用于响应于数据中心移除通知,在多个可调用数据中心中,确定被移除的第二数据中心;The second notification processing module is configured to determine the second data center to be removed among the multiple callable data centers in response to the data center removal notification;
第二灾难确定模块,用于在第二数据中心为主数据中心的情况下,确定主数据中心发生灾难。The second disaster determination module is used to determine that a disaster occurs in the main data center when the second data center is the main data center.
在本申请又一些实施例中,该服务调用装置600还可以包括:In still other embodiments of the present application, the service invoking apparatus 600 may further include:
第三通知接收模块,用于接收注册中心发送的状态变更通知;The third notification receiving module is used to receive the status change notification sent by the registration center;
第三通知处理模块,用于响应于状态变更通知,确定变更运行状态的第三数据中心;The third notification processing module is used to determine the third data center that changes the operating status in response to the status change notification;
第三灾难确定模块,用于在第三数据中心为主数据中心且第三数据中心的变更后运行状态为停止运行状态的情况下,确定主数据中心发生灾难。The third disaster determination module is used to determine that a disaster occurs in the primary data center when the third data center is the primary data center and the operating state after the change of the third data center is the out of operation state.
在本申请一些实施例中,该服务调用装置600还可以包括:In some embodiments of the present application, the service invoking apparatus 600 may further include:
第四调用控制模块,用于在接收到注册中心发送的目标设备地址信息的情况下,向目标设备地址信息对应的目标服务提供设备发送服务调用请求,以调用目标服务。The fourth call control module is used to send a service call request to the target service providing device corresponding to the target device address information in the case of receiving the target device address information sent by the registration center to call the target service.
在本申请一些实施例中,该服务调用装置600还可以包括:In some embodiments of the present application, the service invoking apparatus 600 may further include:
第四通知接收模块,用于在接收到注册中心发送的主数据中心变更通知的情况下,在多个可调用数据中心中,确定主数据中心变更通知所指示的第四数据中心;The fourth notification receiving module is used to determine the fourth data center indicated by the main data center change notification among the multiple callable data centers in the case of receiving the main data center change notification sent by the registration center;
第四通知处理模块,用于将第四数据中心,更新为主数据中心;The fourth notification processing module is used to update the fourth data center as the main data center;
第五调用控制模块,用于向第四数据中心发送服务调用请求,以调用目标服务。The fifth call control module is used to send a service call request to the fourth data center to call the target service.
需要说明的是,图6所示实施例的服务调用装置600能够实现图3所示实施例的服务调用方法的全部功能和效果,且原理相似,在此不做赘述。It should be noted that the service invoking apparatus 600 of the embodiment shown in FIG. 6 can realize all the functions and effects of the service invoking method of the embodiment shown in FIG. 3, and the principle is similar, so it will not be repeated here.
图7是本申请的服务调用装置的另一个实施例的结构示意图。其中, 图7所示的服务调用装置可以应用于图2中的服务控制设备205。如图7所示,该服务调用装置700可以包括:Fig. 7 is a schematic structural diagram of another embodiment of the service invoking apparatus of the present application. Wherein, the service invoking apparatus shown in FIG. 7 can be applied to the service control device 205 in FIG. 2. As shown in FIG. 7, the service invoking apparatus 700 may include:
第一数据获取模块710,用于获取第一交互操作数据;The first data obtaining module 710 is configured to obtain first interactive operation data;
第一数据处理模块720,用于响应于第一交互操作数据,确定变更运行状态的第三数据中心和第三数据中心的变更后运行状态;The first data processing module 720 is configured to determine the changed operating state of the third data center and the changed operating state of the third data center in response to the first interactive operation data;
第一指令生成模块730,用于根据第三数据中心和和变更后运行状态,生成状态变更指令;The first instruction generation module 730 is configured to generate a state change instruction according to the third data center and the operating state after the change;
第一指令发送模块740,用于向注册中心发送状态变更指令,以使注册中心向通过第三数据中心调用目标服务的服务调用设备发送状态变更指令对应的状态变更通知。The first instruction sending module 740 is configured to send a state change instruction to the registration center, so that the registration center sends a state change notification corresponding to the state change instruction to the service invoking device that invokes the target service through the third data center.
在本申请实施例中,服务控制设备可以用于对某些特殊切换场景的手动切换和手动控制,例如第一数据中心中的第一服务提供设备需要一定的准备时间不能实时的切换过来,或者在不停止主数据中心的运行状态的情况下设置新的主数据中心,从而实现对注册中心中所有注册的数据中心和服务提供设备的统一集成管理。In the embodiment of the present application, the service control device can be used for manual switching and manual control of some special switching scenarios. For example, the first service providing device in the first data center requires a certain amount of preparation time and cannot switch over in real time, or A new main data center is set up without stopping the operating state of the main data center, so as to realize the unified and integrated management of all registered data centers and service providing equipment in the registration center.
在本申请一些实施例中,第一数据获取模块710具体用于:In some embodiments of the present application, the first data acquisition module 710 is specifically configured to:
接收用户对工作状态控制界面上的目标状态控制按钮的第一输入操作;其中,工作状态控制界面包括在注册中心上所注册的多个数据中心和每个数据中心对应的多个状态控制按钮;Receiving a user's first input operation on the target state control button on the working state control interface; wherein the working state control interface includes a plurality of data centers registered on the registration center and a plurality of state control buttons corresponding to each data center;
响应于第一输入操作,获取针对目标状态控制按钮的第一交互操作数据。In response to the first input operation, first interactive operation data for the target state control button is acquired.
在本申请另一些实施例中,该服务调用装置700还可以包括:In some other embodiments of the present application, the service invoking apparatus 700 may further include:
第二数据获取模块,用于接收用户对工作状态控制界面上的状态控制按钮的第二输入操作;响应于第二输入操作,获取针对状态控制按钮的第二交互操作数据;The second data acquisition module is configured to receive a user's second input operation on the state control button on the working state control interface; in response to the second input operation, acquire the second interactive operation data for the state control button;
第二数据处理模块,用于根据第二交互操作数据,确定待变更为主数据中心的第四数据中心;The second data processing module is configured to determine the fourth data center to be changed as the main data center according to the second interactive operation data;
第二指令生成模块,用于根据第四数据中心的数据中心标识,生成主数据中心变更指令;The second instruction generation module is used to generate the main data center change instruction according to the data center identifier of the fourth data center;
第二指令发送模块,用于向注册中心发送主数据中心变更指令,以使注册中心向服务调用设备发送数据中心变更指令对应的主数据中心变更通知。The second instruction sending module is used to send the main data center change instruction to the registration center, so that the registration center sends the main data center change notification corresponding to the data center change instruction to the service invoking device.
需要说明的是,图7所示实施例的服务调用装置700能够实现图4所示实施例的服务调用方法的全部功能和效果,且原理相似,在此不做赘述。It should be noted that the service invoking apparatus 700 of the embodiment shown in FIG. 7 can realize all the functions and effects of the service invoking method of the embodiment shown in FIG. 4, and the principle is similar, so it will not be repeated here.
图8是本申请的服务调用设备的实施例的结构示意图。如图8所示,服务调用设备可以包括处理器801以及存储有计算机程序指令的存储器802。Fig. 8 is a schematic structural diagram of an embodiment of the service invoking device of the present application. As shown in FIG. 8, the service invoking device may include a processor 801 and a memory 802 storing computer program instructions.
具体地,上述处理器801可以包括中央处理器(CPU),或者特定集成电路(Application Specific Integrated Circuit,ASIC),或者可以被配置成实施本申请实施例的一个或多个集成电路。Specifically, the aforementioned processor 801 may include a central processing unit (CPU), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
存储器802可以包括用于数据或指令的大容量存储器。举例来说而非限制,存储器802可包括硬盘驱动器(Hard Disk Drive,HDD)、软盘驱动器、闪存、光盘、磁光盘、磁带或通用串行总线(Universal Serial Bus,USB)驱动器或者两个或更多个以上这些的组合。在合适的情况下,存储器802可包括可移除或不可移除(或固定)的介质。在合适的情况下,存储器802可在综合网关容灾设备的内部或外部。在特定实施例中,存储器802是非易失性固态存储器。在特定实施例中,存储器802包括只读存储器(ROM)。在合适的情况下,该ROM可以是掩模编程的ROM、可编程ROM(PROM)、可擦除PROM(EPROM)、电可擦除PROM(EEPROM)、电可改写ROM(EAROM)或闪存或者两个或更多个以上这些的组合。The memory 802 may include mass storage for data or instructions. For example and not limitation, the memory 802 may include a hard disk drive (Hard Disk Drive, HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or two or more Multiple combinations of these. Where appropriate, the storage 802 may include removable or non-removable (or fixed) media. Where appropriate, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a particular embodiment, the memory 802 is a non-volatile solid-state memory. In a particular embodiment, the memory 802 includes read-only memory (ROM). Where appropriate, the ROM can be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically rewritable ROM (EAROM) or flash memory or A combination of two or more of these.
处理器801通过读取并执行存储器802中存储的计算机程序指令,以实现上述实施例中的任意一种服务调用方法。The processor 801 reads and executes computer program instructions stored in the memory 802 to implement any one of the service invoking methods in the foregoing embodiments.
在一个示例中,服务调用设备还可包括通信接口803和总线810。其中,如图8所示,处理器801、存储器802、通信接口803通过总线810连接并完成相互间的通信。In an example, the service invoking device may further include a communication interface 803 and a bus 810. Among them, as shown in FIG. 8, the processor 801, the memory 802, and the communication interface 803 are connected through a bus 810 and complete mutual communication.
通信接口803,主要用于实现本申请实施例中各模块、装置、单元和/或设备之间的通信。The communication interface 803 is mainly used to implement communication between various modules, devices, units and/or devices in the embodiments of the present application.
总线810包括硬件、软件或两者,将服务调用设备的部件彼此耦接在 一起。举例来说而非限制,总线可包括加速图形端口(AGP)或其他图形总线、增强工业标准架构(EISA)总线、前端总线(FSB)、超传输(HT)互连、工业标准架构(ISA)总线、无限带宽互连、低引脚数(LPC)总线、存储器总线、微信道架构(MCA)总线、外围组件互连(PCI)总线、PCI-Express(PCI-X)总线、串行高级技术附件(SATA)总线、视频电子标准协会局部(VLB)总线或其他合适的总线或者两个或更多个以上这些的组合。在合适的情况下,总线810可包括一个或多个总线。尽管本申请实施例描述和示出了特定的总线,但本申请考虑任何合适的总线或互连。The bus 810 includes hardware, software, or both, and couples the components of the service invoking device to each other. By way of example and not limitation, the bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hyper transfer (HT) interconnect, industry standard architecture (ISA) Bus, Infinite Bandwidth Interconnect, Low Pin Count (LPC) Bus, Memory Bus, Micro Channel Architecture (MCA) Bus, Peripheral Component Interconnect (PCI) Bus, PCI-Express (PCI-X) Bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, the bus 810 may include one or more buses. Although the embodiments of this application describe and show a specific bus, this application considers any suitable bus or interconnection.
该服务调用设备实现结合图1至图7描述的服务调用方法和装置的各个功能,在此不做赘述。The service invoking device implements the various functions of the service invoking method and device described in conjunction with FIG. 1 to FIG. 7, and will not be repeated here.
另外,结合上述实施例中的服务调用方法,本申请实施例可提供一种计算机存储介质来实现。该计算机存储介质上存储有计算机程序指令;该计算机程序指令被处理器执行时实现上述实施例中的任意一种服务调用方法。计算机可读存储介质的示例可以是非暂态计算机可读存储介质,包括ROM、RAM、磁碟或者光盘等。In addition, in combination with the service invoking method in the foregoing embodiment, the embodiment of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the service invoking methods in the foregoing embodiments is implemented. An example of the computer-readable storage medium may be a non-transitory computer-readable storage medium, including ROM, RAM, magnetic disk, or optical disk.
需要明确的是,本申请并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上述实施例中,描述和示出了若干具体的步骤作为示例。但是,本申请的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本申请的精神后,作出各种改变、修改和添加,或者改变步骤之间的顺序。It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figure. For the sake of brevity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown. After understanding the spirit of the present application, those skilled in the art can make various changes, modifications and additions, or change the sequence between the steps.
以上所述的结构框图中所示的功能块可以实现为硬件、软件、固件或者它们的组合。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本申请的元素是被用于执行所需任务的程序或者代码段。程序或者代码段可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。“机器可读介质”可以包括能够存储或传输信息的任何介质。机器可读介质的例子包括电子电路、半导体存储器设备、ROM、闪存、可擦除ROM(EROM)、软盘、CD-ROM、光盘、硬盘、光纤介质、射频(RF)链路,等等。代码段可以经由诸如因特网、内联网等的计算机 网络被下载。The functional blocks shown in the above-mentioned structural block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, and so on. When implemented in software, the elements of this application are programs or code segments used to perform required tasks. The program or code segment may be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link through a data signal carried in a carrier wave. "Machine-readable medium" may include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
还需要说明的是,本申请中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或系统。但是,本申请不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be different from the order in the embodiments, or several steps may be performed at the same time.
以上所述,仅为本申请的具体实施方式,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。应理解,本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。The above are only specific implementations of the present application. Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described systems, modules and units can be referred to the foregoing method embodiments. The corresponding process in, I will not repeat it here. It should be understood that the scope of protection of this application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should cover Within the scope of protection of this application.

Claims (21)

  1. 一种服务调用方法,包括:A service invocation method, including:
    在主数据中心发生灾难的情况下,停止通过所述主数据中心调用目标服务;其中,所述目标服务具有多个可调用数据中心,多个所述可调用数据中心根据所述目标服务对应的服务提供设备信息确定,多个所述可调用数据中心中优先级最高的数据中心为主数据中心,多个所述可调用数据中心中除所述主数据中心以外的其他数据中心为灾备数据中心,多个所述可调用数据中心的优先级根据预设的所述目标服务的数据中心优先级确定;In the case of a disaster in the main data center, stop calling the target service through the main data center; wherein the target service has a plurality of callable data centers, and the plurality of callable data centers corresponds to the target service Service provision equipment information is determined, the data center with the highest priority among the multiple callable data centers is the main data center, and the data centers other than the main data center among the multiple callable data centers are disaster recovery data Center, the priority of the multiple callable data centers is determined according to the preset data center priority of the target service;
    根据所述数据中心优先级,在所述灾备数据中心中确定优先级最高的第一数据中心;Determine the first data center with the highest priority among the disaster recovery data centers according to the data center priority;
    向所述第一数据中心发送服务调用请求,以调用所述目标服务。Send a service invocation request to the first data center to invoke the target service.
  2. 根据权利要求1所述的方法,其中,所述在主数据中心发生灾难的情况下,停止通过所述主数据中心调用目标服务之前,还包括:The method according to claim 1, wherein, in the case of a disaster in the main data center, before stopping invoking the target service through the main data center, the method further comprises:
    向注册中心发送订阅所述目标服务的订阅请求;Sending a subscription request for subscribing to the target service to the registry;
    接收所述注册中心反馈的所述服务提供设备信息。Receiving the service providing device information fed back by the registration center.
  3. 根据权利要求2所述的方法,其中,所述服务提供设备信息包括支持所述目标业务的多个服务提供设备和每个所述服务提供设备的设备信息,所述设备信息包括所属数据中心的数据中心标识。The method according to claim 2, wherein the service providing device information includes a plurality of service providing devices supporting the target business and the device information of each of the service providing devices, and the device information includes the information of the data center to which it belongs. Data center identification.
  4. 根据权利要求3所述的方法,其中,所述在主数据中心发生灾难的情况下,停止通过所述主数据中心调用目标服务之前,还包括:The method according to claim 3, wherein, in the case of a disaster in the main data center, before stopping invoking the target service through the main data center, the method further comprises:
    获取所述服务提供设备信息中的多个所述服务提供设备对应的数据中心标识;Acquiring multiple data center identifiers corresponding to the service providing equipment in the service providing equipment information;
    根据所获取的数据中心标识,确定多个所述可调用数据中心。According to the obtained data center identifier, a plurality of the callable data centers are determined.
  5. 根据权利要求2所述的方法,其中,所述接收所述注册中心反馈的所述服务提供设备信息之后,还包括:The method according to claim 2, wherein after the receiving the service providing device information fed back by the registration center, the method further comprises:
    获取所述数据中心优先级;其中,所述数据中心优先级为针对多个数据中心的优先级,多个所述数据中心包括所述可调用数据中心;Acquiring the data center priority; wherein the data center priority is a priority for multiple data centers, and the multiple data centers include the callable data center;
    根据所述数据中心优先级,确定多个所述可调用数据中心的可调用数 据中心优先级;Determine the callable data center priorities of the multiple callable data centers according to the data center priority;
    根据所述可调用数据中心优先级,在多个所述可调用数据中心中,确定所述主数据中心。According to the priority of the callable data center, the main data center is determined among the plurality of callable data centers.
  6. 根据权利要求5所述的方法,其中,所述根据所述可调用数据中心优先级,在多个所述可调用数据中心中,确定所述主数据中心之后,还包括:5. The method according to claim 5, wherein the step of determining the primary data center among a plurality of the callable data centers according to the priority of the callable data center further comprises:
    向所述主数据中心发送所述服务调用请求,以调用所述目标服务。Send the service invocation request to the main data center to invoke the target service.
  7. 根据权利要求5所述的方法,其中,所述根据所述数据中心优先级,在所述灾备数据中心中确定优先级最高的第一数据中心,包括:The method according to claim 5, wherein the determining the first data center with the highest priority among the disaster recovery data centers according to the priority of the data center comprises:
    根据所述可调用数据中心优先级,在所述灾备数据中心中确定所述第一数据中心。According to the callable data center priority, the first data center is determined in the disaster recovery data center.
  8. 根据权利要求3所述的方法,其中,所述设备信息还包括设备运行信息和设备地址信息。The method according to claim 3, wherein the device information further includes device operation information and device address information.
  9. 根据权利要求8所述的方法,其中,所述向所述第一数据中心发送服务调用请求,以调用所述目标服务,包括:The method according to claim 8, wherein the sending a service invocation request to the first data center to invoke the target service comprises:
    根据所述服务提供设备信息中的多个所述服务提供设备对应的数据中心标识,确定属于所述第一数据中心的第一服务提供设备;Determine the first service providing device belonging to the first data center according to the data center identifiers corresponding to the multiple service providing devices in the service providing device information;
    根据所述服务提供设备信息中的多个所述服务提供设备对应的设备运行信息和预设的设备调用规则,在所述第一服务提供设备中,确定第一目标服务提供设备;Determining a first target service providing device in the first service providing device according to device operation information corresponding to a plurality of the service providing devices in the service providing device information and preset device invocation rules;
    根据所述服务提供设备信息中的多个所述服务提供设备对应的设备地址信息,确定所述第一目标服务提供设备对应的第一目标设备地址;Determining the first target device address corresponding to the first target service providing device according to the device address information corresponding to the multiple service providing devices in the service providing device information;
    通过所述第一目标设备地址,向所述第一目标服务提供设备发送所述服务调用请求,以调用所述目标服务。Send the service invocation request to the first target service providing device through the first target device address, so as to invoke the target service.
  10. 根据权利要求1所述的方法,其中,所述在主数据中心发生灾难的情况下,停止通过所述主数据中心调用目标服务之前,还包括:The method according to claim 1, wherein, in the case of a disaster in the main data center, before stopping invoking the target service through the main data center, the method further comprises:
    接收服务异常通知;Receive notifications of service exceptions;
    响应于所述服务异常通知,确定所述主数据中心中支持所述目标业务的至少一个第二服务提供设备的设备运行状态;In response to the service abnormality notification, determine the device operating status of at least one second service providing device in the main data center that supports the target service;
    在确定至少一个所述第二服务提供设备的设备运行状态均为异常运行状态的情况下,确定所述主数据中心发生灾难。In a case where it is determined that the device operating state of at least one of the second service providing devices is an abnormal operating state, it is determined that a disaster occurs in the main data center.
  11. 根据权利要求10所述的方法,其中,所述服务异常通知为所述主数据中心发送的通知和/或注册中心发送的通知。The method according to claim 10, wherein the service abnormality notification is a notification sent by the main data center and/or a notification sent by a registration center.
  12. 根据权利要求1所述的方法,其中,所述在主数据中心发生灾难的情况下,停止通过所述主数据中心调用目标服务之前,还包括:The method according to claim 1, wherein, in the case of a disaster in the main data center, before stopping invoking the target service through the main data center, the method further comprises:
    接收注册中心发送的数据中心移除通知;Receive the data center removal notice sent by the registration center;
    响应于所述数据中心移除通知,在多个所述可调用数据中心中,确定被移除的第二数据中心;In response to the data center removal notification, determining the second data center to be removed among the plurality of callable data centers;
    在所述第二数据中心为所述主数据中心的情况下,确定所述主数据中心发生灾难。In a case where the second data center is the main data center, it is determined that a disaster occurs in the main data center.
  13. 根据权利要求1所述的方法,其中,所述在主数据中心发生灾难的情况下,停止通过所述主数据中心调用目标服务之前,还包括:The method according to claim 1, wherein, in the case of a disaster in the main data center, before stopping invoking the target service through the main data center, the method further comprises:
    接收注册中心发送的状态变更通知;Receive status change notifications sent by the registry;
    响应于所述状态变更通知,确定变更运行状态的第三数据中心;In response to the status change notification, determine a third data center that changes its operating status;
    在所述第三数据中心为所述主数据中心且所述第三数据中心的变更后运行状态为停止运行状态的情况下,确定所述主数据中心发生灾难。In a case where the third data center is the main data center and the changed operation state of the third data center is a stopped operation state, it is determined that a disaster has occurred in the main data center.
  14. 根据权利要求1所述的方法,其中,所述在主数据中心发生灾难的情况下,停止通过所述主数据中心调用目标服务之后,还包括:The method according to claim 1, wherein, in the case of a disaster in the main data center, after stopping invoking the target service through the main data center, the method further comprises:
    在接收到注册中心发送的目标设备地址信息的情况下,向所述目标设备地址信息对应的目标服务提供设备发送服务调用请求,以调用所述目标服务。In the case of receiving the target device address information sent by the registration center, sending a service invocation request to the target service providing device corresponding to the target device address information to invoke the target service.
  15. 根据权利要求1所述的方法,其中,还包括:The method according to claim 1, further comprising:
    在接收到注册中心发送的主数据中心变更通知的情况下,在多个所述可调用数据中心中,确定所述主数据中心变更通知所指示的第四数据中心;In the case of receiving the main data center change notification sent by the registration center, among the multiple callable data centers, determine the fourth data center indicated by the main data center change notification;
    将所述第四数据中心,更新为主数据中心;Update the fourth data center as the main data center;
    向所述第四数据中心发送所述服务调用请求,以调用所述目标服务。Send the service invocation request to the fourth data center to invoke the target service.
  16. 一种服务调用方法,包括:A service invocation method, including:
    获取第一交互操作数据;Obtain the first interactive operation data;
    响应于所述第一交互操作数据,确定变更运行状态的第三数据中心和所述第三数据中心的变更后运行状态;In response to the first interactive operation data, determining the changed operating state of the third data center and the changed operating state of the third data center;
    根据所述第三数据中心和和所述变更后运行状态,生成状态变更指令;Generating a state change instruction according to the third data center and the operating state after the change;
    向注册中心发送所述状态变更指令,以使所述注册中心向通过所述第三数据中心调用目标服务的服务调用设备发送所述状态变更指令对应的状态变更通知。Sending the state change instruction to a registration center, so that the registration center sends a state change notification corresponding to the state change instruction to a service invoking device that invokes a target service through the third data center.
  17. 根据权利要求16所述的方法,其中,所述获取第一交互操作数据,包括:The method according to claim 16, wherein said obtaining the first interactive operation data comprises:
    接收用户对工作状态控制界面上的目标状态控制按钮的第一输入操作;其中,所述工作状态控制界面包括在所述注册中心上所注册的多个数据中心和每个所述数据中心对应的多个状态控制按钮;Receive a user's first input operation on the target state control button on the working state control interface; wherein, the working state control interface includes a plurality of data centers registered on the registration center and each data center corresponding Multiple status control buttons;
    响应于所述第一输入操作,获取针对所述目标状态控制按钮的第一交互操作数据。In response to the first input operation, first interactive operation data for the target state control button is acquired.
  18. 一种服务调用装置,包括:A service calling device includes:
    第一调用控制模块,用于在主数据中心发生灾难的情况下,停止通过所述主数据中心调用目标服务;其中,所述目标服务具有多个可调用数据中心,多个所述可调用数据中心根据所述目标服务对应的服务提供设备信息确定,多个所述可调用数据中心中优先级最高的数据中心为主数据中心,多个所述可调用数据中心中除所述主数据中心以外的其他数据中心为灾备数据中心,多个所述可调用数据中心的优先级根据预设的所述目标服务的数据中心优先级确定;The first call control module is used to stop calling the target service through the main data center in the case of a disaster in the main data center; wherein the target service has multiple callable data centers, and multiple callable data The center determines according to the service providing equipment information corresponding to the target service, the data center with the highest priority among the multiple callable data centers is the main data center, and among the multiple callable data centers, except for the main data center The other data centers in are disaster recovery data centers, and the priorities of the multiple callable data centers are determined according to the preset data center priorities of the target service;
    数据中心重选模块,用于根据所述数据中心优先级,在所述灾备数据中心中确定优先级最高的第一数据中心;A data center reselection module, configured to determine the first data center with the highest priority among the disaster recovery data centers according to the data center priority;
    第二调用控制模块,用于向所述第一数据中心发送服务调用请求,以调用所述目标服务。The second call control module is configured to send a service call request to the first data center to call the target service.
  19. 一种服务调用装置,包括:A service calling device includes:
    第一数据获取模块,用于获取第一交互操作数据;The first data acquisition module is used to acquire the first interactive operation data;
    第一数据处理模块,用于响应于所述第一交互操作数据,确定变更运行状态的第三数据中心和所述第三数据中心的变更后运行状态;The first data processing module is configured to determine the changed operating state of the third data center and the changed operating state of the third data center in response to the first interactive operation data;
    第一指令生成模块,用于根据所述第三数据中心和和所述变更后运行状态,生成状态变更指令;The first instruction generation module is configured to generate a state change instruction according to the third data center and the operating state after the change;
    第一指令发送模块,用于向注册中心发送所述状态变更指令,以使所述注册中心向通过所述第三数据中心调用目标服务的服务调用设备发送所述状态变更指令对应的状态变更通知。The first instruction sending module is configured to send the state change instruction to the registration center, so that the registration center sends the state change notification corresponding to the state change instruction to the service invoking device that invokes the target service through the third data center .
  20. 一种服务调用设备,包括:处理器以及存储有计算机程序指令的存储器;A service calling device includes: a processor and a memory storing computer program instructions;
    所述处理器执行所述计算机程序指令时实现如权利要求1-15或权利要求16-17任意一项所述的服务调用方法。The processor implements the service invoking method according to any one of claims 1-15 or claims 16-17 when executing the computer program instructions.
  21. 一种计算机存储介质,所述计算机存储介质上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现如权利要求1-15或权利要求16-17任意一项所述的服务调用方法。A computer storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the service invoking method according to any one of claims 1-15 or claims 16-17 is implemented .
PCT/CN2020/117676 2019-12-23 2020-09-25 Service invocation method, apparatus and device, and medium WO2021129008A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911339742.6A CN111147567A (en) 2019-12-23 2019-12-23 Service calling method, device, equipment and medium
CN201911339742.6 2019-12-23

Publications (1)

Publication Number Publication Date
WO2021129008A1 true WO2021129008A1 (en) 2021-07-01

Family

ID=70519304

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117676 WO2021129008A1 (en) 2019-12-23 2020-09-25 Service invocation method, apparatus and device, and medium

Country Status (2)

Country Link
CN (1) CN111147567A (en)
WO (1) WO2021129008A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598743A (en) * 2022-03-17 2022-06-07 上海小度技术有限公司 Service discovery method, device, electronic equipment and storage medium
WO2023160551A1 (en) * 2022-02-28 2023-08-31 北京有竹居网络技术有限公司 Request processing method, and device

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147567A (en) * 2019-12-23 2020-05-12 中国银联股份有限公司 Service calling method, device, equipment and medium
CN112015601B (en) * 2020-08-05 2023-08-08 中国银联股份有限公司 Method and device for processing data of multiple data centers
CN114363233B (en) * 2020-10-12 2023-12-22 网联清算有限公司 Packet routing method, device, electronic equipment and storage medium
CN113873039A (en) * 2021-09-29 2021-12-31 吉林亿联银行股份有限公司 Traffic scheduling method and device, electronic equipment and storage medium
CN115499791B (en) * 2022-08-19 2024-01-12 广州汽车集团股份有限公司 Service-oriented communication method, device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030181209A1 (en) * 1999-06-14 2003-09-25 Forte Stephen P. Method and apparatus for communicating with one of plural devices associated with a single telephone number during a disaster and disaster recovery
CN101656624A (en) * 2008-08-18 2010-02-24 中兴通讯股份有限公司 Multi-node application-level disaster recovery system and multi-node application-level disaster recovery method
CN102255750A (en) * 2011-06-28 2011-11-23 中兴通讯股份有限公司 Method and device for service disaster recovery protection
CN105528259A (en) * 2016-03-01 2016-04-27 浪潮通信信息系统有限公司 Application-level disaster-tolerant automatic switching control design method
CN106713409A (en) * 2016-10-21 2017-05-24 中国电信集团系统集成有限责任公司 SaaS-based cloud disaster recovery system and method
CN111147567A (en) * 2019-12-23 2020-05-12 中国银联股份有限公司 Service calling method, device, equipment and medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582109A (en) * 2013-03-07 2019-04-05 贝斯莱尔科技有限公司 Data center's control method and system
CA2901223C (en) * 2014-11-17 2017-10-17 Jiongjiong Gu Method for migrating service of data center, apparatus, and system
US10270646B2 (en) * 2016-10-24 2019-04-23 Servicenow, Inc. System and method for resolving master node failures within node clusters
CN107729176B (en) * 2017-09-14 2020-09-29 北京京东尚科信息技术有限公司 Disaster recovery method and disaster recovery system for configuration file management system
CN109819004B (en) * 2017-11-22 2021-11-02 中国人寿保险股份有限公司 Method and system for deploying multi-activity data centers
CN109672551B (en) * 2018-09-25 2022-02-01 平安科技(深圳)有限公司 Cross-data center application publishing method, device, storage medium and device
CN209103275U (en) * 2018-11-12 2019-07-12 广东深博信息科技有限公司 Big data stores disaster recovery and backup systems
CN110336855B (en) * 2019-05-09 2020-05-05 广州市番禺区中心医院 Medical cloud data system
CN110351122B (en) * 2019-06-17 2022-02-25 腾讯科技(深圳)有限公司 Disaster recovery method, device, system and electronic equipment
CN110602169B (en) * 2019-08-13 2022-11-29 未鲲(上海)科技服务有限公司 Service calling method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030181209A1 (en) * 1999-06-14 2003-09-25 Forte Stephen P. Method and apparatus for communicating with one of plural devices associated with a single telephone number during a disaster and disaster recovery
CN101656624A (en) * 2008-08-18 2010-02-24 中兴通讯股份有限公司 Multi-node application-level disaster recovery system and multi-node application-level disaster recovery method
CN102255750A (en) * 2011-06-28 2011-11-23 中兴通讯股份有限公司 Method and device for service disaster recovery protection
CN105528259A (en) * 2016-03-01 2016-04-27 浪潮通信信息系统有限公司 Application-level disaster-tolerant automatic switching control design method
CN106713409A (en) * 2016-10-21 2017-05-24 中国电信集团系统集成有限责任公司 SaaS-based cloud disaster recovery system and method
CN111147567A (en) * 2019-12-23 2020-05-12 中国银联股份有限公司 Service calling method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023160551A1 (en) * 2022-02-28 2023-08-31 北京有竹居网络技术有限公司 Request processing method, and device
CN114598743A (en) * 2022-03-17 2022-06-07 上海小度技术有限公司 Service discovery method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111147567A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
WO2021129008A1 (en) Service invocation method, apparatus and device, and medium
CN104199957B (en) A kind of implementation method of Redis general-purpose proxies
EP3060018B1 (en) Registration method and system for common service entity
US10880779B2 (en) User plane resource management method, user plane network element, and control plane network element
US11432137B2 (en) Service notification method for mobile edge host and apparatus
CN110837424A (en) Service instance determining method and device, storage medium and electronic equipment
WO2021088641A1 (en) Data transmission method, data processing method, data reception method and device, and storage medium
CN111970198A (en) Service routing method, device, electronic equipment and medium
CN112202746B (en) RPC member information acquisition method, device, electronic equipment and storage medium
US10064044B2 (en) Method and apparatus for determining roaming status of terminal, terminal, and server
CN114189525B (en) Service request method and device and electronic equipment
EP3452904A1 (en) Snapshot creation in virtual network environment
CN111064626A (en) Configuration updating method, device, server and readable storage medium
CN111309691A (en) Data sharing exchange system and exchange method based on bus architecture
CN110275701B (en) Data processing method, device, medium and computing equipment
CN114679349B (en) Data communication method and device
CN114422335A (en) Communication method, communication device, server and storage medium
US11100039B2 (en) Interconnection system, and interconnection control method and apparatus
CN113556370A (en) Service calling method and device
CN111580998A (en) RPC calling method of multiple tenants in SaaS service mode
CN110943975A (en) Service registration method, device, computer equipment and storage medium
CN113259445B (en) Service management method and system in mixed cloud mode
US20180248759A1 (en) Troubleshooting in remote management services
US11888695B1 (en) Confirmed commit with user specified automatic rollback configuration
WO2022160304A1 (en) Exchange method and apparatus for multi-subscriber identification module characteristic information, and communication device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20906738

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20906738

Country of ref document: EP

Kind code of ref document: A1