Model service disaster recovery method, apparatus, device, and storage medium

By deleting the instance list of the target model service and registering the instance list of other model services with the same interface declaration set information during model service disaster recovery, the problem of increased costs caused by resource dependence in the prior art is solved, and zero-cost disaster recovery is achieved.

CN113157495BActive Publication Date: 2025-12-12BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110455359.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-26
Publication Date
2025-12-12
Estimated Expiration
2041-04-26

AI Technical Summary

Technical Problem

Existing model service disaster recovery methods rely on additional resources, leading to increased hardware and operational costs.

Method used

By responding to the detection that the target model service meets the disaster recovery conditions, its corresponding instance list is deleted, and the instance list of other model services with the same interface declaration set information in the target model service group is registered under the target model service, thus realizing disaster recovery.

Benefits of technology

Disaster recovery can be achieved without introducing additional node devices, reducing the hardware and operating costs of equipment resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113157495B_ABST
    Figure CN113157495B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a model service disaster recovery method, device, equipment and storage medium. The method comprises: in response to detecting that a target model service meets a starting disaster recovery condition, deleting a first instance list corresponding to the target model service; and registering a second instance list corresponding to other model services in a target model service group to which the target model service belongs to the target model service, the target model service group being a predetermined service group to which the target model service belongs, the other model services being model services included in the target model service group except the target model service, and the other model services having the same interface declaration set information as the target model service. The present disclosure can reduce the hardware cost of device resources, and can reduce the operation cost and labor cost of device resources.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of artificial intelligence, and particularly relates to a model service disaster recovery method and device, equipment and a storage medium. BACKGROUND

[0002] With the continuous development of deep learning technology, the demand for model services in various fields is also increasing. Model service is a service that puts models into high-availability services. Such services not only have the general characteristics of ordinary business services, but also have the particularity of deep learning models. In order to ensure the smooth implementation of model services, some methods are usually needed in related technologies to provide disaster recovery for services.

[0003] The disaster recovery method in related technologies is usually based on additional resources, that is, additional node devices are introduced for disaster recovery to deal with the problem of service unavailability caused by instance failure. However, this way not only increases the hardware cost of device resources, but also increases the operation cost and labor cost of device resources. SUMMARY

[0004] In order to overcome the problems in related technologies, the embodiments of the present disclosure provide a model service disaster recovery method, device, equipment and storage medium to solve the defects in related technologies.

[0005] According to a first aspect of the embodiments of the present disclosure, a model service disaster recovery method is provided, and the method comprises:

[0006] In response to detecting that a target model service meets a disaster recovery starting condition, deleting a first instance list corresponding to the target model service;

[0007] Registering a second instance list corresponding to other model services in a target model service group to which the target model service belongs to the target model service, the target model service group being a pre-determined service group to which the target model service belongs, the other model services being model services contained in the target model service group except the target model service, and the other model services and the target model service having the same interface declaration set information.

[0008] In an embodiment, the method further comprises:

[0009] In response to detecting that the target model service meets a disaster recovery starting condition, deleting a first instance list corresponding to the target model service under the target model service group.

[0010] In an embodiment, the method further comprises:

[0011] in response to detecting that the target model service meets a close disaster condition, deleting a second instance list corresponding to the target model service;

[0012] registering a third instance list currently acquired to the target model service, the third instance list including a latest instance list currently determined for the target model service.

[0013] In an embodiment, the method further includes:

[0014] registering the third instance list to the target model service group.

[0015] In an embodiment, the method further includes determining a target model service group to which the target model service belongs based on the following manner:

[0016] determining a target interface declaration set information of the target model service;

[0017] based on the target interface declaration set information, searching for a target model service group to which the target model service belongs, each model service included in the target model service group having the target interface declaration set information;

[0018] The method further includes:

[0019] in response to searching for the target model service group, adding the target model service into the target model service group;

[0020] registering a first instance list of the target model service to the target model service;

[0021] registering the first instance list of the target model service to the target model service group.

[0022] In an embodiment, the method further includes:

[0023] in response to not searching for the target model service group, creating a target model service group to which the target model service belongs, and registering the target interface declaration set information to the target model service group;

[0024] adding the target model service into the target model service group.

[0025] According to a second aspect of the embodiments of the present disclosure, a model service disaster recovery apparatus is provided, the apparatus including:

[0026] a service list deletion module, configured to, in response to detecting that a target model service meets a start disaster condition, delete a first instance list corresponding to the target model service;

[0027] The service list registration module is configured to register a second instance list corresponding to other model services in a target model service group to which the target model service belongs to the target model service, the target model service group being a predetermined service group to which the target model service belongs, the other model services being model services included in the target model service group and other than the target model service, and the other model services having a same interface declaration set information as the target model service.

[0028] In an embodiment, the apparatus further includes:

[0029] The group list deletion module is configured to delete, in response to detecting that the target model service satisfies a starting disaster recovery condition, the first instance list corresponding to the target model service under the target model service group.

[0030] In an embodiment, the apparatus further includes a disaster recovery closing module.

[0031] The disaster recovery closing module includes:

[0032] The service list deletion unit is configured to delete, in response to detecting that the target model service satisfies a closing disaster recovery condition, the second instance list corresponding to the target model service.

[0033] The service list registration unit is configured to register a third instance list currently obtained to the target model service, the third instance list including a latest instance list currently determined for the target model service.

[0034] In an embodiment, the disaster recovery closing module further includes:

[0035] The group list registration unit is configured to register the third instance list to the target model service group.

[0036] In an embodiment, the apparatus further includes a target group determination module.

[0037] The target group determination module includes:

[0038] The set information determination unit is configured to determine target interface declaration set information of the target model service.

[0039] The target group determination unit is configured to find a target model service group to which the target model service belongs based on the target interface declaration set information, each model service included in the target model service group having the target interface declaration set information.

[0040] The apparatus further includes:

[0041] a first service adding module, configured to add the target model service into the target model service group in response to finding the target model service group;

[0042] a first list registering module, configured to register the first instance list of the target model service under the target model service;

[0043] a second list registering module, configured to register the first instance list of the target model service under the target model service group.

[0044] In an embodiment, the apparatus further includes:

[0045] a target group creating module, configured to create a target model service group to which the target model service belongs in response to not finding the target model service group, and register the target interface declaration set information under the target model service group;

[0046] a second service adding module, configured to add the target model service into the target model service group.

[0047] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, and the device includes:

[0048] a processor and a memory for storing processor-executable instructions;

[0049] The processor is configured to:

[0050] delete the first instance list corresponding to the target model service in response to detecting that the target model service meets a starting disaster recovery condition;

[0051] register a second instance list corresponding to other model services in a target model service group to which the target model service belongs under the target model service, the target model service group being a predetermined service group to which the target model service belongs, the other model services being model services included in the target model service group other than the target model service, and the other model services having the same interface declaration set information as the target model service.

[0052] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, and the medium stores a computer program, which is executed by a processor to implement:

[0053] delete the first instance list corresponding to the target model service in response to detecting that the target model service meets a starting disaster recovery condition;

[0054] register a second instance list corresponding to other model services in a target model service group to which the target model service belongs to the target model service, the target model service group being a predetermined service group to which the target model service belongs, the other model services being model services included in the target model service group and other than the target model service, and the other model services having the same interface declaration set information as the target model service.

[0055] The technical solution provided by the embodiments of the present disclosure can include the following beneficial effects:

[0056] The present disclosure can achieve the following beneficial effects by deleting the first instance list corresponding to the target model service and registering the second instance list corresponding to the other model services in the target model service group to which the target model service belongs to the target model service in response to detecting that the target model service meets the starting disaster recovery condition: when the target model service meets the starting disaster recovery condition, the instance list of the target model service can be replaced by the second instance list corresponding to the other model services in the target model service group that have the same interface declaration set information as the target model service, so that the disaster recovery of the target model service can be achieved, i.e., the target model service can be restored to normal, and since no additional node device needs to be introduced for disaster recovery, the hardware cost of device resources can be reduced, and the operation cost and labor cost of device resources can be reduced.

[0057] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0058] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure.

[0059] Figure 1 is a flowchart of a model service disaster recovery method according to a first exemplary embodiment;

[0060] Figure 2 is a flowchart of a model service disaster recovery method according to a second exemplary embodiment;

[0061] Figure 3 is a flowchart of a model service disaster recovery method according to a third exemplary embodiment;

[0062] Figure 4 is a flowchart of a model service disaster recovery method according to a fourth exemplary embodiment;

[0063] Figure 5is a flowchart illustrating how to determine a target model service group and register a first instance list according to an example embodiment;

[0064] Figure 6 is a block diagram of a model service disaster recovery apparatus according to an example embodiment;

[0065] Figure 7 is a block diagram of a model service disaster recovery apparatus according to yet another example embodiment;

[0066] Figure 8 is a block diagram of an electronic device according to an example embodiment. DETAILED DESCRIPTION

[0067] The example embodiments will be described in detail herein with reference to the attached drawings. In the following description, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following example embodiments do not represent all the embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0068] Figure 1 is a flowchart of a model service disaster recovery method according to a first example embodiment; the method of the present embodiment can be applied to a cluster containing multiple node devices, including physical machines, virtual machines, or containers, etc.

[0069] As shown in Figure 1 the method comprises the following steps S101-S102:

[0070] In step S101, in response to detecting that a target model service meets a start disaster recovery condition, a first instance list corresponding to the target model service is deleted.

[0071] Wherein, the above-mentioned target model service can be a service that uses a model for inference in related technologies, and the present embodiment does not limit this.

[0072] In this embodiment, after the target model service is deployed to the cluster currently containing multiple node devices, the target model service can provide corresponding services to the business upstream calling party based on the external interface of the target model service. The type of the external interface of the target model service can be set based on actual needs, such as being set to http, grpc, or other rpc types, and the like, which is not limited in this embodiment. On this basis, when it is detected that the target model service meets the starting disaster recovery condition, the first instance list corresponding to the target model service can be deleted. The first instance list contains related information of each instance currently corresponding to the target model service. By deleting the first instance list corresponding to the target model service, the corresponding relationship between the target model service and the first instance list can be released.

[0073] The manner in which the target model service meets the starting disaster recovery condition can be set based on actual business needs. For example, when the number of instances of the target model service that fail is greater than or equal to a first set threshold, it can be determined that the target model service meets the starting disaster recovery condition.

[0074] In step S102, a second instance list corresponding to other model services in a target model service group to which the target model service belongs is registered under the target model service.

[0075] In this embodiment, after the first instance list corresponding to the target model service is deleted in response to detecting that the target model service meets the starting disaster recovery condition, the second instance list corresponding to other model services in a target model service group to which the target model service belongs can be registered under the target model service.

[0076] The target model service group can be a service group to which the target model service belongs, which is determined in advance. The other model services in the target model service group can be model services included in the target model service group except for the target model service, and the other model services have the same interface declaration set information as the target model service.

[0077] It can be understood that by deleting the first instance list corresponding to the target model service when the target model service meets the starting disaster recovery condition, and registering the second instance list corresponding to other model services in a target model service group to which the target model service belongs under the target model service, the instance list of the target model service can be replaced by the second instance list corresponding to other model services in the target model service group that have the same interface declaration set information as the target model service, so that disaster recovery of the target model service can be implemented.

[0078] As can be seen from the above description, the method of the embodiment can replace the instance list of the target model service by the second instance list corresponding to other model services in the target model service group having the same interface declaration set information as the target model service when the target model service meets the starting disaster recovery condition, so as to realize disaster recovery of the target model service, i.e., to restore the target model service to normal, and thus the hardware cost of the device resources can be reduced, and the operation cost and labor cost of the device resources can be reduced as well.

[0079] Figure 2 is a flowchart of a model service disaster recovery method according to a second exemplary embodiment.

[0080] The related explanations and descriptions of steps S201 and S203 can be referred to the steps S101-S102 in the above Figure 1 embodiment, which will not be repeated here. As shown in the above Figure 2 embodiment, the embodiment of the present application is based on the above Figure 1 embodiment, and after the first instance list corresponding to the target model service is deleted in response to the detection that the target model service meets the starting disaster recovery condition, the first instance list corresponding to the target model service under the target model service group can also be deleted, so as to realize the disassociation between the target model service group and the first instance list of the target model service. It can be understood that since the target model service currently meets the starting disaster recovery condition, i.e., most of the instances corresponding to the first instance list of the target model service have failed, the first instance list corresponding to the target model service under the target model service group also needs to be deleted.

[0081] Figure 3 is a flowchart of a model service disaster recovery method according to a third exemplary embodiment; the related explanations and descriptions of steps S301-S302 can be referred to the steps S101-S102 in the above Figure 1 embodiment, which will not be repeated here. As shown in the above Figure 3 embodiment, the embodiment of the present application is based on the above Figure 1 embodiment, and further includes the following steps S303-S304:

[0082] In step S303, the second instance list corresponding to the target model service is deleted in response to the detection that the target model service meets the closing disaster recovery condition.

[0083] In the embodiment, after the second instance list corresponding to other model services in the target model service group to which the target model service belongs is registered under the target model service, if it is detected that the target model service meets the disaster recovery closing condition, the second instance list corresponding to the target model service can be deleted.

[0084] In an embodiment, the manner in which the target model service meets the disaster recovery closing condition can be set based on actual business needs. For example, when the number of instances normally running of the target model service is greater than or equal to a second set threshold, it can be determined that the target model service meets the disaster recovery closing condition.

[0085] It can be understood that, since in the embodiment, when the target model service meets the disaster recovery starting condition, the instance list of the target model service is temporarily replaced based on the second instance list corresponding to other model services in the target model service group that have the same interface declaration set information as the target model service, when it is detected that the target model service meets the disaster recovery closing condition, the second instance list corresponding to the target model service can be deleted, that is, the correspondence between the target model service and the second instance list of other model services is removed, so as to reduce the work burden of the instances corresponding to the second instance list.

[0086] In step S304, the third instance list currently obtained is registered under the target model service.

[0087] In the embodiment, after the second instance list corresponding to the target model service is deleted in response to detection that the target model service meets the disaster recovery closing condition, the third instance list currently obtained can be registered under the target model service. The third instance list includes the latest instance list currently determined for the target model service, that is, the instance list corresponding to the target model service after recovery to normal.

[0088] As can be known from the above description, by deleting the second instance list corresponding to the target model service in response to detection that the target model service meets the disaster recovery closing condition, and registering the third instance list currently obtained under the target model service, the correspondence between the target model service and the second instance list of other model services can be removed, so as to reduce the work burden of the instances corresponding to the second instance list.

[0089] Figure 4 is a flowchart of a model service disaster recovery method according to a fourth exemplary embodiment; for related explanations and descriptions of steps S401-S403, reference can be made to steps S201-S203 in the above-described Figure 2 embodiment, and for related explanations and descriptions of steps S404-S405, reference can be made to steps S201-S203 in the above-describedFigure 3 Steps S303-S304 in the illustrated embodiment are not described here. As Figure 4 The embodiment illustrated can further include the following step S406 on the basis of the above-described embodiment:

[0090] In step S406, the third instance list is registered under the target model service group.

[0091] In the embodiment, after registering the third instance list currently acquired under the target model service, the third instance list can be registered under the target model service group, that is, the correspondence between the third instance list of the target model service and the target model service group is constructed, so that subsequent searching for the instance list corresponding to the target model service under the target model service group based on the correspondence can be implemented, thereby implementing disaster recovery and other processing of the target model service.

[0092] Figure 5 is a flowchart illustrating how to determine a target model service group and register a first instance list according to an example embodiment; as Figure 5 The embodiment illustrated can further include the following steps S501-S508 on the basis of the above-described Figures 1 to 4

[0093] In step S501, the target interface declaration set information of the target model service is determined.

[0094] In the embodiment, the model file of the target model service can be detected based on a preset model detection manner, thereby determining the target interface declaration set information of the target model service.

[0095] The above-described preset model detection manner can be selected from related technologies based on actual business needs, for example, an artificial detection manner or an automatic detection manner can be used, and the embodiment is not limited in this regard.

[0096] For example, the target interface declaration set information of the target model service can include the interface type of the target model service and the corresponding data dimension, etc.

[0097] In step S502, the target model service group to which the target model service belongs is searched based on the target interface declaration set information.

[0098] In the embodiment, after determining the target interface declaration set information of the target model service, the target model service group to which the target model service belongs can be searched based on the target interface declaration set information.

[0099] The target model service group contains each model service having the target interface declaration set information.​

[0100] For example, the target model service group corresponding to the target interface declaration set information can be found based on a pre-constructed correspondence between interface declaration set information and model service groups.

[0101] In step S503, it is determined whether the target model service group is found: if yes, step S504 is performed; if no, step S507 is performed.

[0102] In the embodiment, after the operation of finding the target model service group based on the target interface declaration set information is performed, it can be determined whether the target model service group is found. If the target model service group is found, step S504 can be performed; otherwise, step S507 can be performed.

[0103] In step S504, the target model service is added to the target model service group.

[0104] In the embodiment, when the target model service group is found, the target model service can be added to the target model service group. In this way, the association between the target model service and the target model service group can be constructed, and the subsequent disaster recovery of the target model service based on the instance list of other model services in the target model service group can be implemented.

[0105] In step S505, the first instance list of the target model service is registered under the target model service.

[0106] In the embodiment, after the target model service is added to the target model service group, the first instance list of the target model service can be registered under the target model service, that is, the correspondence between the target model service and the first instance list can be constructed. In this way, when it is determined that the target model service fails (for example, the disaster recovery condition is met), the first instance list corresponding to the target model service can be deleted; or when other model services in the target model service group fail and disaster recovery is needed, the failed model services can be recovered based on the first instance list corresponding to the target model service.

[0107] In step S506, the first instance list of the target model service is registered under the target model service group.

[0108] In this embodiment, after the first instance list of the target model service is registered under the target model service, the first instance list of the target model service can be registered under the target model service group, that is, the corresponding relationship between the first instance list of the target model service and the target model service group can be established. In this way, when it is determined that the target model service fails (for example, the disaster recovery condition is met) subsequently, the first instance list of the target model service corresponding to the target model service in the target model service group can be deleted; or when other model services in the target model service group fail and disaster recovery is needed, the failed model service can be recovered based on the first instance list corresponding to the target model service.

[0109] In step S507, a target model service group to which the target model service belongs is created, and the target interface declaration set information is registered under the target model service group.

[0110] In this embodiment, when the target model service group is not found, the target model service group to which the target model service belongs can be created, and the target interface declaration set information can be registered under the target model service group. That is, when there is no target model service group to which the target model service belongs at present, a target model service group can be newly created for the target model service, and the target interface declaration set information of the target model service can be registered under the target model service group, so as to facilitate subsequent addition of more model services to the target model service group based on the target interface declaration set information, thereby achieving subsequent disaster recovery based on the instance lists corresponding to the model services in the group.

[0111] In step S508, the target model service is added to the target model service group.

[0112] In this embodiment, after the target model service group to which the target model service belongs is created, the target model service can be added to the target model service group, and then steps S505-S506 can be continued.

[0113] It can be understood that in this embodiment, by planning model services with the same interface declaration set information into the same model service group, subsequent disaster recovery of a model service in the model service group can be realized based on the instance list of another model service in the model service group other than the currently failed model service, so that the currently failed model service can be replaced by another model service in the model service group to work, thereby realizing a zero-cost disaster recovery solution.

[0114] Figure 6is a block diagram of a model service disaster recovery apparatus according to an example embodiment; the apparatus of the embodiment can be applied to a cluster containing multiple node devices, including physical machines, virtual machines, or containers, etc. As Figure 6 shown, the apparatus includes a service list deletion module 110 and a service list registration module 120, wherein:

[0115] The service list deletion module 110 is configured to delete a first instance list corresponding to a target model service in response to detecting that the target model service meets a disaster recovery start condition.

[0116] The service list registration module 120 is configured to register a second instance list corresponding to other model services in a target model service group to which the target model service belongs under the target model service, the target model service group being a predetermined service group to which the target model service belongs, the other model services being model services included in the target model service group other than the target model service, and the other model services having the same interface declaration set information as the target model service.

[0117] As can be seen from the above description, the apparatus of the embodiment can replace the instance list of the target model service with the second instance list corresponding to the other model services in the target model service group that have the same interface declaration set information as the target model service when the target model service meets the disaster recovery start condition, so as to implement disaster recovery of the target model service, i.e., to restore the target model service to normal, without the need to introduce additional node devices for disaster recovery, thereby reducing the hardware cost of device resources and reducing the operation cost and labor cost of device resources.

[0118] Figure 7 is a block diagram of a model service disaster recovery apparatus according to another example embodiment; the apparatus of the embodiment can be applied to a cluster containing multiple node devices, including physical machines, virtual machines, or containers, etc. In the embodiment, the functions of the service list deletion module 210 and the service list registration module 220 are the same as those of the service list deletion module 110 and the service list registration module 120 in the foregoing Figure 6 embodiment, and will not be described in detail. As Figure 7 shown, the apparatus can further include:

[0119] The group list deletion module 230 is configured to delete, in response to detecting that the target model service meets the start disaster recovery condition, a first instance list corresponding to the target model service under the target model service group.

[0120] In an embodiment, the apparatus can further include a disaster recovery closing module 240.

[0121] The disaster recovery closing module 240 can include:

[0122] The service list deletion unit 241 is configured to delete, in response to detecting that the target model service meets the close disaster recovery condition, a second instance list corresponding to the target model service.

[0123] The service list registration unit 242 is configured to register a third instance list currently obtained to the target model service, the third instance list including a latest instance list currently determined for the target model service.

[0124] In an embodiment, the disaster recovery closing module 240 can further include:

[0125] The group list registration unit 243 is configured to register the third instance list to the target model service group.

[0126] In an embodiment, the apparatus can further include a target group determination module 250.

[0127] The target group determination module 250 can include:

[0128] The set information determination unit 251 is configured to determine target interface declaration set information of the target model service.

[0129] The target group determination unit 252 is configured to find a target model service group to which the target model service belongs based on the target interface declaration set information, the target model service group containing each model service having the target interface declaration set information.

[0130] On this basis, the apparatus can further include:

[0131] The first service adding module 260 is configured to add the target model service to the target model service group in response to finding the target model service group.

[0132] The first list registration module 270 is configured to register the first instance list of the target model service to the target model service.

[0133] The second list registration module 280 is configured to register the first instance list of the target model service to the target model service group.

[0134] In another embodiment, the apparatus described above can further include:

[0135] a target group creating module 290, configured to, in response to the target model service group not being found, create a target model service group to which the target model service belongs, and register the target interface declaration set information under the target model service group;

[0136] a second service adding module 300, configured to add the target model service into the target model service group.

[0137] With regard to the apparatus in the above-described embodiments, the specific manners in which various modules perform operations have been described in detail in the embodiments of the method, and thus will not be described in detail here.

[0138] Figure 8 is a block diagram of an electronic device according to an exemplary embodiment. For example, the device 900 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

[0139] Referring to Figure 8 , the device 900 can include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.

[0140] The processing component 902 generally controls the overall operations of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 can include one or more processors 920 to execute instructions to complete all or part of steps of the methods described above. In addition, the processing component 902 can include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0141] The memory 904 is configured to store various types of data to support the operation of the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0142] The power supply component 906 supplies electrical power for the various components of the device 900. The power supply component 906 can include a power supply management system, one or more power supplies, and other components associated with generating, managing and distributing electrical power for the device 900.

[0143] The multimedia component 908 includes a screen providing an output interface between the device 900 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swiping and gestures on the touch panel. The touch sensors can not only sense a boundary of a touching or swiping action, but also detect duration and pressure associated with the touching or swiping action. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. The front and / or rear camera can receive external multimedia data when the device 900 is in an operation mode, such as a shooting mode or a video mode. Each of the front and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0144] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC) that is configured to receive an external audio signal when the device 900 is in an operation mode, such as a calling mode, a recording mode and a voice recognition mode. The received audio signal can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.

[0145] The I / O interface 912 provides an interface between the processing component 902 and peripheral interface modules, which can be a keyboard, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button and a lock button.

[0146] The sensor component 914 includes one or more sensors for providing status assessments for various aspects of the device 900. For example, the sensor component 914 can detect an open / closed position of the device 900, relative positioning of components, such as a display and a keypad of the device 900, a change in position of the device 900 or a component of the device 900, presence or absence of user contact with the device 900, orientation or acceleration / deceleration of the device 900, and temperature changes of the device 900. The sensor component 914 can also include proximity sensor(s) configured to detect presence of nearby objects without any physical contact. The sensor component 914 can further include a light sensor(s) such as a CMOS or CCD image sensor for use in imaging applications. In some embodiments, the sensor component 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0147] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and another device. The device 900 can access a wireless network based on a corresponding communication standard, such as WiFi, 2G or 3G, 4G or 5G, or a combination thereof. In an example embodiment, the communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) techniques, infrared data association (IrDA) techniques, ultra-wideband (UWB) techniques, Bluetooth (BT) techniques, and other techniques.

[0148] In an example embodiment, the device 900 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components, for performing the above-described methods.

[0149] In an example embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 904 including instructions, is also provided, which can be executed by the processor 920 of the device 900 to complete the above-described methods. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.

[0150] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the disclosure be construed as including any patents, patent applications, publications, publications, or other disclosure of the prior art that are referred to by their title or by a general identification of their content. It is intended that the disclosure encompass variations and modifications of the specific structure disclosed herein to the extent that these variations and modifications remain consistent with the general principles of the present disclosure. The specification and examples are to be regarded as exemplary in nature and not as restrictive.

[0151] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings and that various modifications and changes can be made therein without departing from the scope thereof. The scope of the present disclosure is indicated by the appended claims.

Claims

1. A model service disaster recovery method, characterized in that, The method includes: In response to the detection that the target model service meets the conditions for starting disaster recovery, the first instance list corresponding to the target model service is deleted; Register the second instance list corresponding to other model services in the target model service group to which the target model service belongs to the target model service. The target model service group is a service group to which the target model service belongs in advance. The other model services are model services other than the target model service included in the target model service group. The other model services have the same interface declaration set information as the target model service. In response to the detection that the target model service meets the conditions for disabling disaster recovery, the second instance list corresponding to the target model service is deleted; Register the currently obtained third instance list to the target model service, wherein the third instance list includes the latest instance list currently determined for the target model service; The method further includes determining the target model service group to which the target model service belongs based on the following: Determine the target interface declaration set information for the target model service; Based on the target interface declaration set information, the target model service group to which the target model service belongs is located, and each model service included in the target model service group has the target interface declaration set information; The method further includes: In response to finding the target model service group, the target model service is added to the target model service group; Register the first instance list of the target model service under the target model service; Register the first instance list of the target model service under the target model service group.

2. The method according to claim 1, characterized in that, The method further includes: In response to the detection that the target model service meets the conditions for starting disaster recovery, the first instance list corresponding to the target model service under the target model service group is deleted.

3. The method according to claim 1, characterized in that, The method further includes: Register the third instance list under the target model service group.

4. The method according to claim 1, characterized in that, The method further includes: In response to the failure to find the target model service group, a target model service group to which the target model service belongs is created, and the target interface declaration set information is registered under the target model service group; Add the target model service to the target model service group.

5. A model service disaster recovery device, characterized in that, The device includes: The service list deletion module is used to delete the first instance list corresponding to the target model service in response to the detection that the target model service meets the conditions for starting disaster recovery. The service list registration module is used to register the second instance list corresponding to other model services in the target model service group to which the target model service belongs to the target model service. The target model service group is a pre-determined service group to which the target model service belongs. The other model services are model services other than the target model service included in the target model service group. The other model services have the same interface declaration set information as the target model service. The device also includes a disaster recovery shutdown module; The disaster recovery shutdown module includes: The service list deletion unit is used to delete the second instance list corresponding to the target model service in response to detecting that the target model service meets the disaster recovery shutdown conditions; The service list registration unit is used to register the currently obtained third instance list to the target model service, wherein the third instance list includes the latest instance list currently determined for the target model service; The device also includes a target group determination module; The target group determination module includes: The set information determination unit is used to determine the target interface declaration set information of the target model service; The target group determination unit is used to find the target model service group to which the target model service belongs based on the target interface declaration set information, wherein each model service included in the target model service group has the target interface declaration set information; The device further includes: The first service addition module is used to add the target model service to the target model service group in response to finding the target model service group; The first list registration module is used to register the first instance list of the target model service under the target model service; The second list registration module is used to register the first instance list of the target model service under the target model service group.

6. The apparatus according to claim 5, characterized in that, The device further includes: The group list deletion module is used to delete the first instance list corresponding to the target model service under the target model service group in response to detecting that the target model service meets the conditions for starting disaster recovery.

7. An electronic device, characterized in that, The device includes: The processor and the memory used to store processor-executable instructions; The processor is configured as follows: In response to the detection that the target model service meets the conditions for starting disaster recovery, the first instance list corresponding to the target model service is deleted; Register the second instance list corresponding to other model services in the target model service group to which the target model service belongs to the target model service. The target model service group is a service group to which the target model service belongs in advance. The other model services are model services other than the target model service included in the target model service group. The other model services have the same interface declaration set information as the target model service. In response to the detection that the target model service meets the conditions for disabling disaster recovery, the second instance list corresponding to the target model service is deleted; Register the currently obtained third instance list to the target model service, wherein the third instance list includes the latest instance list currently determined for the target model service; The methods for determining the target model service group to which the target model service belongs include: Determine the target interface declaration set information for the target model service; Based on the target interface declaration set information, the target model service group to which the target model service belongs is located, and each model service included in the target model service group has the target interface declaration set information; Also includes: In response to finding the target model service group, the target model service is added to the target model service group; Register the first instance list of the target model service under the target model service; Register the first instance list of the target model service under the target model service group.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, This program is implemented when it is executed by the processor: In response to the detection that the target model service meets the conditions for starting disaster recovery, the first instance list corresponding to the target model service is deleted; Register the second instance list corresponding to other model services in the target model service group to which the target model service belongs to the target model service. The target model service group is a service group to which the target model service belongs in advance. The other model services are model services other than the target model service included in the target model service group. The other model services have the same interface declaration set information as the target model service. In response to the detection that the target model service meets the conditions for disabling disaster recovery, the second instance list corresponding to the target model service is deleted; Register the currently obtained third instance list to the target model service, wherein the third instance list includes the latest instance list currently determined for the target model service; The methods for determining the target model service group to which the target model service belongs include: Determine the target interface declaration set information for the target model service; Based on the target interface declaration set information, the target model service group to which the target model service belongs is located, and each model service included in the target model service group has the target interface declaration set information; Also includes: In response to finding the target model service group, the target model service is added to the target model service group; Register the first instance list of the target model service under the target model service; Register the first instance list of the target model service under the target model service group.

Citation Information

Patent Citations

  • Method and device for switching disaster recovery application example

    CN104539462A