CN114327542B - A method, device, electronic device and storage medium for updating service equipment - Google Patents
A method, device, electronic device and storage medium for updating service equipment Download PDFInfo
- Publication number
- CN114327542B CN114327542B CN202111522295.5A CN202111522295A CN114327542B CN 114327542 B CN114327542 B CN 114327542B CN 202111522295 A CN202111522295 A CN 202111522295A CN 114327542 B CN114327542 B CN 114327542B
- Authority
- CN
- China
- Prior art keywords
- target
- application
- service device
- data
- application data
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种服务设备的更新方法、装置、电子设备及存储介质。The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for updating service equipment.
背景技术Background technique
OpenStack是一个开源的云计算管理平台,其中包括一系列软件开源项目的组合。在进行版本升级时,由于组件多且相互间的依赖关系复杂,因此容易出现问题且较难定位。现有技术中在OpenStack进行升级时,通常是使用新建版本的OpenStack替换原始版本的OpenStack提供服务。然而,在替换过程中需要把原始版本的OpenStack携带的应用进行整体迁移,在实现本发明的过程中,发明人发现将原始版本OpenStack上的应用直接整体迁移的话,涉及的周期和成本非常大,影响OpenStack的业务处理效率。OpenStack is an open source cloud computing management platform, which includes a combination of software open source projects. When performing version upgrades, problems are prone to occur and difficult to locate due to the large number of components and complex dependencies between them. In the existing technology, when OpenStack is upgraded, a new version of OpenStack is usually used to replace the original version of OpenStack to provide services. However, during the replacement process, the applications carried by the original version of OpenStack need to be migrated as a whole. In the process of implementing the present invention, the inventor found that if the applications on the original version of OpenStack are directly migrated as a whole, the cycle and cost involved are very large. Affects the business processing efficiency of OpenStack.
发明内容Contents of the invention
为了解决上述技术问题或者至少部分地解决上述技术问题,本申请提供了一种服务设备的更新方法、装置、电子设备及存储介质。In order to solve the above technical problems or at least partially solve the above technical problems, this application provides a method, device, electronic device and storage medium for updating service equipment.
根据本申请实施例的一个方面,提供了一种服务设备的更新方法,应用于存储设备,所述方法包括:According to one aspect of the embodiment of the present application, a method for updating a service device is provided, which is applied to a storage device. The method includes:
接收设备对接请求;Receive device docking requests;
基于所述设备对接请求确定当前时刻与所述存储设备对接的目标服务设备,并获取所述目标服务设备对应的第一版本信息;Determine the target service device that is connected to the storage device at the current moment based on the device connection request, and obtain the first version information corresponding to the target service device;
在所述第一版本信息高于所述存储设备对接的历史服务设备对应的第二版本信息的情况下,获取所述历史服务设备中部署的目标应用在所述存储设备中存储的应用数据;If the first version information is higher than the second version information corresponding to the historical service device connected to the storage device, obtain the application data stored in the storage device of the target application deployed in the historical service device;
建立所述应用数据与所述目标服务设备的绑定关系,以使所述目标服务设备基于所述绑定关系读取应用数据,并按照所述应用数据恢复所述目标应用完成设备更新。Establish a binding relationship between the application data and the target service device, so that the target service device reads the application data based on the binding relationship, and restores the target application according to the application data to complete the device update.
进一步的,所述基于所述设备对接请求当前时刻与所述存储设备对接的目标服务设备,包括:Further, the target service device that is connected to the storage device at the current moment based on the device connection request includes:
基于所述设备对接请求获取设备认证信息;Obtain device authentication information based on the device docking request;
在所述设备认证信息与所述存储设备中存储的预设认证信息相匹配的情况下,确定所述设备对接请求认证通过,并基于所述设备对接请求当前时刻与所述存储设备对接的目标服务设备。In the case where the device authentication information matches the preset authentication information stored in the storage device, it is determined that the device docking request is authenticated, and the target of docking with the storage device is based on the device docking request at the current moment. Service equipment.
进一步的,所述获取所述历史服务设备中部署的目标应用在所述存储设备中存储的应用数据,包括:Further, obtaining the application data stored in the storage device of the target application deployed in the historical service device includes:
查询所述历史服务设备中部署的目标应用对应的目标应用标识;Query the target application identifier corresponding to the target application deployed in the historical service device;
基于预设应用标识与数据盘之间的关联关系,确定所述目标应用标识对应的目标数据盘;Based on the association between the preset application identification and the data disk, determine the target data disk corresponding to the target application identification;
将所述目标数据盘中存储的数据确定为所述应用数据。The data stored in the target data disk is determined as the application data.
进一步的,所述建立所述应用数据与所述目标服务设备的绑定关系,以使所述目标服务设备基于所述绑定关系读取应用数据,并按照所述应用数据恢复所述目标应用完成设备更新,包括:Further, establishing a binding relationship between the application data and the target service device, so that the target service device reads the application data based on the binding relationship and restores the target application according to the application data. Complete device updates including:
建立所述目标数据盘与所述目标服务设备之间的绑定关系;Establish a binding relationship between the target data disk and the target service device;
在确定所述绑定关系建立完成的情况下,接收所述目标服务设备的读取指令;When it is determined that the binding relationship is established, receive a read instruction from the target service device;
响应于所述读取指令,向所述目标服务设备提供满足所述读取指令的应用数据,以使所述目标服务设备按照满足所述读取指令的应用数据恢复所述目标应用。In response to the read instruction, application data that satisfies the read instruction is provided to the target service device, so that the target service device restores the target application according to the application data that satisfies the read instruction.
进一步的,在建立所述应用数据与所述目标服务设备的绑定关系之前,所述方法还包括:Further, before establishing a binding relationship between the application data and the target service device, the method further includes:
向所述历史服务设备发送控制指令,其中,所述控制指令用于控制所述历史服务设备中的目标应用停止运行;Send a control instruction to the history service device, where the control instruction is used to control the target application in the history service device to stop running;
在确定所述历史服务设备中的目标应用停止运行的情况下,建立所述目标数据盘与所述目标服务设备之间的绑定关系。When it is determined that the target application in the historical service device stops running, a binding relationship between the target data disk and the target service device is established.
进一步的,所述响应于所述读取指令,向所述目标服务设备提供满足所述读取指令的应用数据,包括:Further, in response to the read instruction, providing application data that satisfies the read instruction to the target service device includes:
检测满足所述读取指令的应用数据的完整程度;Detect the completeness of application data that satisfies the read instruction;
在所述完整程度用于指示所述应用数据完整的情况下,向所述目标服务设备提供满足所述读取指令的应用数据。If the completeness level is used to indicate that the application data is complete, application data that satisfies the read instruction is provided to the target service device.
进一步的,在建立所述应用数据与所述目标服务设备的绑定关系之后,所述方法还包括:Further, after establishing the binding relationship between the application data and the target service device, the method further includes:
获取所述目标服务设备中所述目标应用对应的恢复进度;Obtain the recovery progress corresponding to the target application in the target service device;
在所述恢复进度用于指示所述目标应用恢复完成的情况下,解除与所述历史服务设备之间的绑定关系。When the recovery progress is used to indicate completion of recovery of the target application, the binding relationship with the historical service device is released.
根据本申请实施例的另一方面,还提供了一种服务设备的更新装置,包括:According to another aspect of the embodiment of the present application, a device for updating service equipment is also provided, including:
接收模块,用于接收设备对接请求;The receiving module is used to receive device docking requests;
确定模块,用于基于所述设备对接请求确定当前时刻与所述存储设备对接的目标服务设备,并获取所述目标服务设备对应的第一版本信息;A determination module configured to determine the target service device that is connected to the storage device at the current moment based on the device connection request, and obtain the first version information corresponding to the target service device;
获取模块,用于在所述第一版本信息高于所述存储设备对接的历史服务设备对应的第二版本信息的情况下,获取所述历史服务设备中部署的目标应用在所述存储设备中存储的应用数据;An acquisition module configured to obtain the target application deployed in the historical service device in the storage device when the first version information is higher than the second version information corresponding to the historical service device connected to the storage device. Stored application data;
迁移模块,用于建立所述应用数据与所述目标服务设备的绑定关系,以使所述目标服务设备基于所述绑定关系读取应用数据,并按照所述应用数据恢复所述目标应用完成设备更新。A migration module, configured to establish a binding relationship between the application data and the target service device, so that the target service device reads the application data based on the binding relationship and restores the target application according to the application data. Complete device update.
根据本申请实施例的另一方面,还提供了一种存储介质,该存储介质包括存储的程序,程序运行时执行上述的步骤。According to another aspect of the embodiment of the present application, a storage medium is also provided. The storage medium includes a stored program, and the above steps are executed when the program is run.
根据本申请实施例的另一方面,还提供了一种电子装置,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;其中:存储器,用于存放计算机程序;处理器,用于通过运行存储器上所存放的程序来执行上述方法中的步骤。According to another aspect of the embodiment of the present application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: The memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述方法中的步骤。Embodiments of the present application also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the above method.
本申请实施例提供的上述技术方案与现有技术相比具有如下优点:本申请通过存储设备存储服务设备的应用数据,当存在版本信息更高的服务设备时,直接将存储的应用数据与版本信息更高的服务设备服务设备对接,不再需要将应用数据直接从原始版本的服务设备迁移至新版本的服务设备,提高了服务效率。The above technical solution provided by the embodiment of the present application has the following advantages compared with the existing technology: the present application stores the application data of the service device through the storage device. When there is a service device with higher version information, the stored application data is directly compared with the version information. Service equipment interconnection with higher information eliminates the need to migrate application data directly from the original version of the service equipment to the new version of the service equipment, improving service efficiency.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to describe the embodiments or the prior art. Obviously, for those of ordinary skill in the art, It is said that other drawings can be obtained based on these drawings without exerting creative labor.
图1为本申请实施例提供的一种服务设备的更新方法的流程图;Figure 1 is a flow chart of a service device updating method provided by an embodiment of the present application;
图2为本申请另一实施例提供的一种服务设备的更新方法的流程图;Figure 2 is a flow chart of a method for updating service equipment provided by another embodiment of the present application;
图3为本申请实施例提供的一种服务设备的更新装置的框图;Figure 3 is a block diagram of an update device for service equipment provided by an embodiment of the present application;
图4为本申请实施例提供的一种电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请的一部分实施例,而不是全部的实施例,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments They are part of the embodiments of the present application, rather than all the embodiments. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个类似的实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as “first” and “second” are only used to distinguish one entity or operation from another similar entity or operation, and do not necessarily require that either Any such actual relationship or ordering between these entities or operations is implied. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or apparatus that includes the stated element.
本申请实施例提供了一种服务设备的更新方法、装置、电子设备及存储介质。本发明实施例所提供的方法可以应用于任意需要的电子设备,例如,可以为服务器、终端等电子设备,在此不做具体限定,为描述方便,后续简称为电子设备。Embodiments of the present application provide a method, device, electronic device, and storage medium for updating service equipment. The method provided by the embodiment of the present invention can be applied to any required electronic equipment, for example, it can be a server, a terminal and other electronic equipment, which are not specifically limited here. For convenience of description, they will be referred to as electronic equipment for short in the following.
根据本申请实施例的一方面,提供了一种服务设备的更新方法的方法实施例。图1为本申请实施例提供的一种服务设备的更新方法的流程图,如图1所示,该方法包括:According to one aspect of the embodiments of the present application, a method embodiment of a service device updating method is provided. Figure 1 is a flow chart of a service device update method provided by an embodiment of the present application. As shown in Figure 1, the method includes:
步骤S11,接收设备对接请求。Step S11: Receive a device docking request.
本申请实施例提供的方法应用于存储设备。存储设备中部署有多个数据盘,每个数据盘中存储有当前与存储设备已建立对接关系的服务设备的应用数据。其中服务设备可以是OpenStack云计算管理平台,在此不做具体限定。The method provided by the embodiment of this application is applied to storage devices. Multiple data disks are deployed in the storage device, and each data disk stores application data of the service device that is currently connected to the storage device. The service device can be the OpenStack cloud computing management platform, which is not specifically limited here.
在本申请实施例中,设备对接请求可以是开发人员最新部署的服务设备发起的。设备对接请求是服务设备部署完毕后,会基于部署在服务设备内部的激活程序向存储设备发送对接请求。In this embodiment of the present application, the device docking request may be initiated by the service device newly deployed by the developer. The device connection request is a connection request sent to the storage device based on the activation program deployed inside the service device after the service device is deployed.
步骤S12,基于设备对接请求确定当前时刻与存储设备对接的目标服务设备,并获取目标服务设备对应的第一版本信息。Step S12: Determine the target service device currently connected to the storage device based on the device connection request, and obtain the first version information corresponding to the target service device.
在本申请实施例中,步骤S12,基于设备对接请求当前时刻与存储设备对接的目标服务设备,包括以下步骤A1-A2:In the embodiment of this application, step S12, based on the device docking request for the target service device currently connected to the storage device, includes the following steps A1-A2:
步骤A1,基于设备对接请求获取设备认证信息。Step A1: Obtain device authentication information based on the device connection request.
在本申请实施例中,存储设备对从设备对接请求中提取设备认证信息,设备认证信息中包括:最新部署服务设备的服务设备信息,服务设备信息可以是服务设备的设备类型、标识等信息。In this embodiment of the present application, the storage device pair extracts device authentication information from the device docking request. The device authentication information includes: service device information of the latest deployed service device. The service device information may be the device type, identification and other information of the service device.
步骤A2,在设备认证信息与存储设备中存储的预设认证信息相匹配的情况下,确定设备对接请求认证通过,并基于设备对接请求当前时刻与存储设备对接的目标服务设备。Step A2: When the device authentication information matches the preset authentication information stored in the storage device, determine that the device docking request is authenticated and determine the target service device that is docked with the storage device at the current moment based on the device docking request.
在本申请实施例中,存储设备在确定设备认证信息后,会将该设备认证信息与本地存储的预设认证信息进行匹配,如果匹配成功,则去存储设备会确认设备对接请求认证通过,此时可以确定当前与存储设备对接的目标服务设备,其中,预设认证信息可以包括存储设备能够进行对接的设备类型等等。In the embodiment of this application, after the storage device determines the device authentication information, it will match the device authentication information with the locally stored preset authentication information. If the match is successful, the storage device will confirm that the device docking request authentication has passed. The target service device currently connected to the storage device can be determined, where the preset authentication information can include the type of device that the storage device can connect to, and so on.
在本申请实施例中,存储设备在确定目标服务设备后,会向目标服务设备发送查询请求,用于查询目标服务设备的第一版本信息。其中,第一版本信息可以是目标服务设备的版本号,以及该版本号的发布日期等等。In this embodiment of the present application, after determining the target service device, the storage device sends a query request to the target service device to query the first version information of the target service device. The first version information may be the version number of the target service device, the release date of the version number, and so on.
另外,第一版本信息也可以携带在设备对接请求中,在存储设备对设备对接请求携带的设备对接信息认证通过后,直接从设备对接请求中获取目标服务设备的第一版本信息。In addition, the first version information can also be carried in the device interconnection request. After the storage device passes the authentication of the device interconnection information carried in the device interconnection request, the first version information of the target service device is directly obtained from the device interconnection request.
步骤S13,在第一版本信息高于存储设备对接的历史服务设备对应的第二版本信息的情况下,获取历史服务设备中部署的目标应用在存储设备中存储的应用数据。Step S13: If the first version information is higher than the second version information corresponding to the historical service device connected to the storage device, obtain the application data stored in the storage device of the target application deployed in the historical service device.
在本申请实施例中,步骤S13,获取历史服务设备中部署的目标应用在存储设备中存储的应用数据,包括以下步骤B1-B3:In the embodiment of this application, step S13 is to obtain the application data stored in the storage device of the target application deployed in the historical service device, including the following steps B1-B3:
步骤B1,查询历史服务设备中部署的目标应用对应的目标应用标识。Step B1: Query the target application identifier corresponding to the target application deployed in the historical service device.
在本申请实施例中,存储设备在确定目标服务设备以后,会确定当前已经与存储设备对接的历史服务设备,并读取历史服务设备对应的第二版本信息,同理第二版本信息中包括:历史服务设备对应的版本号以及该版本号的发布日期等等。然后将第一版本信息与第二版本信息进行对比,如果第一版本信息高于第二版本信息,获取历史服务设备中部署的目标应用对应的目标应用标识。In this embodiment of the present application, after determining the target service device, the storage device will determine the historical service device currently connected to the storage device, and read the second version information corresponding to the historical service device. Similarly, the second version information includes : The version number corresponding to the historical service device and the release date of the version number, etc. Then, the first version information is compared with the second version information. If the first version information is higher than the second version information, the target application identification corresponding to the target application deployed in the historical service device is obtained.
步骤B2,基于预设应用标识与数据盘之间的关联关系,确定目标应用标识对应的目标数据盘。Step B2: Based on the association between the preset application identification and the data disk, determine the target data disk corresponding to the target application identification.
在本申请实施例中,由于存储设备中存在多个数据盘,每个数据盘用于存储历史服务设备中某一个应用的应用数据,同时存储设备中除了用于存储应用数据的数据盘,还包括存储其他数据的数据盘,因此本申请实施例在存储设备中还设置了预设应用标识与数据盘之间的对应关系,根据该对应关系确定目标应用标识对应的目标数据盘。In the embodiment of this application, since there are multiple data disks in the storage device, each data disk is used to store application data of a certain application in the historical service device. At the same time, in addition to the data disk used to store application data, the storage device also Including data disks that store other data, therefore, the embodiment of the present application also sets a corresponding relationship between the preset application identification and the data disk in the storage device, and determines the target data disk corresponding to the target application identification based on the corresponding relationship.
步骤B3,将目标数据盘中存储的数据确定为应用数据。Step B3: Determine the data stored in the target data disk as application data.
在本申请实施例中,确定存储设备中的目标数据盘后,将目标数据盘中存储的数据确定为应用数据。In this embodiment of the present application, after determining the target data disk in the storage device, the data stored in the target data disk is determined as application data.
步骤S14,建立应用数据与所述目标服务设备的绑定关系,以使目标服务设备基于绑定关系读取应用数据,并按照应用数据恢复目标应用完成设备更新。Step S14: Establish a binding relationship between the application data and the target service device, so that the target service device reads the application data based on the binding relationship, and restores the target application according to the application data to complete the device update.
在本申请实施例中,步骤S14,,建立应用数据与目标服务设备的绑定关系,以使目标服务设备基于绑定关系读取应用数据,并按照应用数据恢复目标应用完成设备更新,包括以下步骤C1-C3:In the embodiment of this application, step S14 establishes a binding relationship between the application data and the target service device, so that the target service device reads the application data based on the binding relationship, and restores the target application according to the application data to complete the device update, including the following Steps C1-C3:
步骤C1,建立目标数据盘与目标服务设备之间的绑定关系。Step C1: Establish a binding relationship between the target data disk and the target service device.
在本申请实施例中,在确定存储设备中待迁移的应用数据后,存储设备会建立目标数据盘与目标设备设备之间的绑定关系,从而实现存储设备与目标服务设备之间的初步对接。In the embodiment of this application, after determining the application data to be migrated in the storage device, the storage device will establish a binding relationship between the target data disk and the target device, thereby achieving preliminary connection between the storage device and the target service device. .
步骤C2,在确定绑定关系建立完成的情况下,接收目标服务设备的读取指令。Step C2: When it is determined that the binding relationship is established, receive a read instruction from the target service device.
步骤C3,响应于读取指令,向目标服务设备提供满足读取指令的应用数据,以使目标服务设备按照满足读取指令的应用数据恢复目标应用。Step C3: In response to the read instruction, provide application data that satisfies the read instruction to the target service device, so that the target service device restores the target application according to the application data that satisfies the read instruction.
在本申请实施例中,在向目标服务设备提供满足读取指令的应用数据之前,方法还包括以下步骤D1-D2:In this embodiment of the present application, before providing application data that satisfies the read instructions to the target service device, the method further includes the following steps D1-D2:
步骤D1,向历史服务设备发送控制指令,其中,控制指令用于控制历史服务设备中的目标应用停止运行。Step D1: Send a control instruction to the history service device, where the control instruction is used to control the target application in the history service device to stop running.
在本申请实施例中,在确定待进行迁移的数据后,存储设备向历史服务设备发送控制指令,从而控制部署在历史服务设备上的目标应用停止运行,从而保证应用数据迁移的效率,同时也避免了在迁移应用数据的过程中,出现应用不可用的情况。In this embodiment of the present application, after determining the data to be migrated, the storage device sends a control instruction to the historical service device to control the target application deployed on the historical service device to stop running, thereby ensuring the efficiency of application data migration, and at the same time also This avoids application unavailability during the process of migrating application data.
步骤D2,在确定历史服务设备中的目标应用停止运行的情况下,向目标服务设备提供满足读取指令的应用数据。Step D2: When it is determined that the target application in the historical service device has stopped running, application data that satisfies the read instruction is provided to the target service device.
在本申请实施例中,存储设备会监听历史服务设备中的各个目标应用的停运情况,如果确定历史服务设备中的目标应用全部停止运行的情况下,向目标服务设备提供满足读取指令的应用数据。In this embodiment of the present application, the storage device monitors the outage status of each target application in the historical service device. If it is determined that all target applications in the historical service device have stopped running, it provides the target service device with a read command that satisfies the read instruction. application data.
在本申请实施例中,在建立绑定关系后,目标服务设备会向存储设备发送读取指令,读取指令用于从存储设备中各个数据盘中读取用于恢复应用的数据。并在读取到该数据后,依据该数据恢复目标应用。In this embodiment of the present application, after the binding relationship is established, the target service device sends a read instruction to the storage device. The read instruction is used to read data for application recovery from each data disk in the storage device. After reading the data, the target application is restored based on the data.
在本申请实施例中,向目标服务设备提供满足读取指令的应用数据,以使目标服务设备按照满足读取指令的应用数据恢复目标应用,包括以下步骤E1-E2:In this embodiment of the present application, providing application data that satisfies the read instruction to the target service device, so that the target service device restores the target application according to the application data that satisfies the read instruction, includes the following steps E1-E2:
步骤E1,检测应用数据的完整程度。Step E1: Check the completeness of application data.
步骤E2,在完整程度用于指示应用数据完整的情况下,将目标数据盘中的应用数据迁移至目标服务设备,以使目标服务设备根据应用数据恢复目标应用。Step E2: When the integrity level indicates that the application data is complete, the application data in the target data disk is migrated to the target service device, so that the target service device restores the target application based on the application data.
在本申请实施例中,存储设备在提供数据之前,需要检测应用数据的完成程度,从而使目标服务设备根据提供的数据能够顺利的恢复目标应用,且保证目标应用在恢复后能够正常运行。In this embodiment of the present application, the storage device needs to detect the completion degree of the application data before providing data, so that the target service device can successfully restore the target application based on the provided data and ensure that the target application can run normally after restoration.
在本申请实施例中,当应用数据的完整程度小于预设完成程度的情况下,则获取存储设备中的备份数据盘,确定备份数据盘中是否存在完整的应用数据,如果存在完整的应用数据,则将完整的应用数据迁移至相应的数据盘,从而替换该数据盘中不完整的应用数据。In the embodiment of this application, when the completeness of the application data is less than the preset completion level, the backup data disk in the storage device is obtained, and it is determined whether complete application data exists in the backup data disk. If complete application data exists , then migrate the complete application data to the corresponding data disk, thereby replacing the incomplete application data in the data disk.
本申请通过存储设备存储服务设备的应用数据,当存在版本信息更高的服务设备时,直接将存储的应用数据与版本信息更高的服务设备服务设备对接,不再需要将应用数据直接从原始版本的服务设备迁移至新版本的服务设备,提高了服务效率。This application stores the application data of the service device through the storage device. When there is a service device with higher version information, the stored application data is directly connected to the service device with higher version information. It is no longer necessary to directly transfer the application data from the original The service equipment of the new version is migrated to the service equipment of the new version, which improves service efficiency.
图2为本申请另一实施例提供的一种服务设备的更新方法的流程图,如图2所示,在将应用数据迁移至目标服务设备之后,方法还包括:Figure 2 is a flow chart of a service device update method provided by another embodiment of the present application. As shown in Figure 2, after migrating application data to the target service device, the method also includes:
步骤S21,获取目标服务设备中目标应用对应的恢复进度。Step S21: Obtain the recovery progress corresponding to the target application in the target service device.
步骤S22,在恢复进度用于指示目标应用恢复完成的情况下,解除与历史服务设备之间的绑定关系。Step S22: If the recovery progress indicates completion of recovery of the target application, release the binding relationship with the historical service device.
在本申请实施例中,存储设备会监控目标应用对应的恢复进度,从而确定是否解除与历史服务设备之间的绑定关系,从而保证存储设备中的应用数据只能被目标服务设备使用,不会出现多方使用的情况。同时,在确定目标应用恢复完成的情况下,控制部署在目标服务设备中的目标应用进入运行状态。In this embodiment of the present application, the storage device will monitor the recovery progress corresponding to the target application to determine whether to release the binding relationship with the historical service device, thereby ensuring that the application data in the storage device can only be used by the target service device, and cannot be used by the target service device. It may be used by multiple parties. At the same time, when it is determined that the recovery of the target application is completed, the target application deployed in the target service device is controlled to enter the running state.
图3为本申请实施例提供的一种服务设备的更新装置的框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图3所示,该装置包括:Figure 3 is a block diagram of an update device for service equipment provided by an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. As shown in Figure 3, the device includes:
接收模块31,用于接收设备对接请求。The receiving module 31 is used to receive device docking requests.
确定模块32,用于基于设备对接请求确定当前时刻与存储设备对接的目标服务设备,并获取目标服务设备对应的第一版本信息。The determination module 32 is configured to determine the target service device that is connected to the storage device at the current moment based on the device connection request, and obtain the first version information corresponding to the target service device.
获取模块33,用于在第一版本信息高于存储设备对接的历史服务设备对应的第二版本信息的情况下,获取历史服务设备中部署的目标应用在存储设备中存储的应用数据。The acquisition module 33 is configured to acquire the application data stored in the storage device of the target application deployed in the historical service device when the first version information is higher than the second version information corresponding to the historical service device connected to the storage device.
迁移模块34,用于建立所述应用数据与所述目标服务设备的绑定关系,以使所述目标服务设备基于所述绑定关系读取应用数据,并按照所述应用数据恢复所述目标应用完成设备更新。Migration module 34, configured to establish a binding relationship between the application data and the target service device, so that the target service device reads the application data based on the binding relationship, and restores the target according to the application data. The app completes the device update.
在本申请实施例中,确定模块32,用于基于设备对接请求获取设备认证信息;在设备认证信息与存储设备中存储的预设认证信息相匹配的情况下,确定设备对接请求认证通过,并基于设备对接请求当前时刻与存储设备对接的目标服务设备。In the embodiment of this application, the determination module 32 is used to obtain device authentication information based on the device docking request; when the device authentication information matches the preset authentication information stored in the storage device, determine that the device docking request is authenticated, and The target service device that is connected to the storage device at the current moment based on the device connection request.
在本申请实施例中,获取模块33,用于查询历史服务设备中部署的目标应用对应的目标应用标识;基于预设应用标识与数据盘之间的关联关系,确定目标应用标识对应的目标数据盘;将目标数据盘中存储的数据确定为应用数据。In the embodiment of this application, the acquisition module 33 is used to query the target application identifier corresponding to the target application deployed in the historical service device; based on the association between the preset application identifier and the data disk, determine the target data corresponding to the target application identifier. disk; determine the data stored in the target data disk as application data.
在本申请实施例中,迁移模块34,用于建立目标数据盘与目标服务设备之间的绑定关系;在确定绑定关系建立完成的情况下,接收目标服务设备的读取指令;响应于读取指令,向目标服务设备提供满足读取指令的应用数据,以使目标服务设备按照满足读取指令的应用数据恢复目标应用。In the embodiment of the present application, the migration module 34 is used to establish a binding relationship between the target data disk and the target service device; when it is determined that the binding relationship is established, receive a read instruction from the target service device; in response to Read the instruction and provide the target service device with application data that satisfies the read instruction, so that the target service device can restore the target application according to the application data that satisfies the read instruction.
在本申请实施例中,服务设备的更新装置还包括:控制模块,用于向历史服务设备发送控制指令,其中,控制指令用于控制历史服务设备中的目标应用停止运行;在确定历史服务设备中的目标应用停止运行的情况下,将目标数据盘中的应用数据迁移至目标服务设备。In the embodiment of the present application, the updating device of the service equipment further includes: a control module for sending a control instruction to the historical service equipment, where the control instruction is used to control the target application in the historical service equipment to stop running; after determining that the historical service equipment When the target application stops running, migrate the application data in the target data disk to the target service device.
在本申请实施例中,迁移模块34,用于检测满足读取指令的应用数据的完整程度;在完整程度用于指示应用数据完整的情况下,向目标服务设备提供满足读取指令的应用数据。In the embodiment of the present application, the migration module 34 is used to detect the completeness of the application data that satisfies the read instruction; when the completeness indicates that the application data is complete, provide the application data that satisfies the read instruction to the target service device. .
在本申请实施例中,服务设备的更新装置还包括:监控模块,用于获取目标服务设备中目标应用对应的恢复进度;在恢复进度用于指示目标应用恢复完成的情况下,解除与历史服务设备之间的绑定关系。In the embodiment of the present application, the update device of the service equipment also includes: a monitoring module for obtaining the recovery progress corresponding to the target application in the target service equipment; when the recovery progress is used to indicate the completion of the recovery of the target application, cancel the connection with the historical service The binding relationship between devices.
本申请通过存储设备存储服务设备的应用数据,当存在版本信息更高的服务设备时,直接将存储的应用数据与版本信息更高的服务设备服务设备对接,不再需要将应用数据直接从原始版本的服务设备迁移至新版本的服务设备,提高了服务效率。This application stores the application data of the service device through the storage device. When there is a service device with higher version information, the stored application data is directly connected to the service device with higher version information. It is no longer necessary to directly transfer the application data from the original The service equipment of the new version is migrated to the service equipment of the new version, which improves service efficiency.
本申请实施例还提供一种电子设备,如图4所示,电子设备可以包括:处理器1501、通信接口1502、存储器1503和通信总线1504,其中,处理器1501,通信接口1502,存储器1503通过通信总线1504完成相互间的通信。An embodiment of the present application also provides an electronic device. As shown in Figure 4, the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504. The processor 1501, the communication interface 1502, and the memory 1503 pass The communication bus 1504 completes mutual communication.
存储器1503,用于存放计算机程序;Memory 1503, used to store computer programs;
处理器1501,用于执行存储器1503上所存放的计算机程序时,实现上述实施例的步骤。The processor 1501 is used to implement the steps of the above embodiment when executing the computer program stored on the memory 1503.
上述终端提到的通信总线可以是外设部件互连标准(Peripheral ComponentInterconnect,简称PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,简称EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
通信接口用于上述终端与其他设备之间的通信。The communication interface is used for communication between the above terminal and other devices.
存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the aforementioned processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application SpecificIntegrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP). , Application Specific Integrated Circuit (ASIC for short), Field-Programmable Gate Array (FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的一种服务设备的更新方法。In yet another embodiment provided by this application, a computer-readable storage medium is also provided. The computer-readable storage medium stores instructions, which when run on a computer, cause the computer to execute any one of the above embodiments. The described method for updating service equipment.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的一种服务设备的更新方法。In yet another embodiment provided by this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute a service device update method described in any of the above embodiments. .
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘SolidState Disk)等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk), etc.
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。The above descriptions are only preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application are included in the protection scope of this application.
以上所述仅是本申请的具体实施方式,使本领域技术人员能够理解或实现本申请。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。The above descriptions are only specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be practiced in other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111522295.5A CN114327542B (en) | 2021-12-13 | 2021-12-13 | A method, device, electronic device and storage medium for updating service equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111522295.5A CN114327542B (en) | 2021-12-13 | 2021-12-13 | A method, device, electronic device and storage medium for updating service equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114327542A CN114327542A (en) | 2022-04-12 |
CN114327542B true CN114327542B (en) | 2023-11-03 |
Family
ID=81049864
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111522295.5A Active CN114327542B (en) | 2021-12-13 | 2021-12-13 | A method, device, electronic device and storage medium for updating service equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114327542B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201621645A (en) * | 2014-12-08 | 2016-06-16 | 鴻海精密工業股份有限公司 | Management system, method and device for recovering version of application |
CN106445663A (en) * | 2016-09-14 | 2017-02-22 | 广东欧珀移动通信有限公司 | Application data migration method and device |
CN112667259A (en) * | 2020-12-25 | 2021-04-16 | 浪潮思科网络科技有限公司 | SDN controller version upgrading method, device and medium |
-
2021
- 2021-12-13 CN CN202111522295.5A patent/CN114327542B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201621645A (en) * | 2014-12-08 | 2016-06-16 | 鴻海精密工業股份有限公司 | Management system, method and device for recovering version of application |
CN106445663A (en) * | 2016-09-14 | 2017-02-22 | 广东欧珀移动通信有限公司 | Application data migration method and device |
CN112667259A (en) * | 2020-12-25 | 2021-04-16 | 浪潮思科网络科技有限公司 | SDN controller version upgrading method, device and medium |
Also Published As
Publication number | Publication date |
---|---|
CN114327542A (en) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101436138B (en) | Control device and control method for software upgrade and dynamic rolling back | |
CN110968477B (en) | A method, device and medium for obtaining backup BMC version information | |
CN114328029B (en) | A backup method, device, electronic device and storage medium for application resources | |
CN107644075B (en) | Method and device for collecting page information | |
CN104168536B (en) | Data copy method and system between a kind of mobile terminal | |
CN110019158A (en) | A kind of method and apparatus of monitoring data quality | |
CN110674153B (en) | Data consistency detection method and device and electronic equipment | |
US20230214207A1 (en) | Device upgrade control method and apparatus, and computer device and storage medium | |
WO2021136233A1 (en) | Service upgrading method, device and system | |
WO2023165307A1 (en) | Function calling method and apparatus | |
US12061811B2 (en) | Multi-device synchronization systems and methods | |
CN111210349A (en) | Virtual asset transfer hosting method and device, electronic equipment and storage medium | |
CN114327542B (en) | A method, device, electronic device and storage medium for updating service equipment | |
CN114356504A (en) | Data migration method, device, electronic device and storage medium in cluster | |
CN110427245A (en) | Manage virtual machine method and apparatus | |
CN118694756A (en) | Adaptive downloading method, device, electronic device and computer readable medium | |
CN110795211A (en) | Method and device for upgrading configuration of virtual machine, electronic equipment and readable storage medium | |
CN111723369A (en) | A file management method, device and medium of an FTP server | |
CN110768834A (en) | Method, system, device and medium for notification of virtual machine configuration upgrade result | |
CN114115753B (en) | Storage device, request processing method and device based on storage device | |
CN106547485A (en) | Data migration method and device | |
CN116795548A (en) | Interface processing method, device, system and storage medium based on multi-cloud management | |
CN112711466B (en) | Hanging affair inspection method and device, electronic equipment and storage medium | |
CN114726711A (en) | Method and system for collaboratively processing business between devices | |
CN114385484A (en) | Block chain software compatibility testing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |