Method, device and system for updating data

By dividing data into read-only and read-write in the container cloud cluster, and using remote mount and read-write layers, the problems of slow data update speed and large storage space in the container cloud cluster are solved, and fast updates and efficient resource utilization are achieved.

CN114428668BActive Publication Date: 2025-04-04BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210112250.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-29
Publication Date
2025-04-04
Estimated Expiration
2042-01-29

AI Technical Summary

Technical Problem

In a container cloud cluster, multiple containers need to quickly complete a large amount of data updates, but in the prior art, it is usually necessary to manually log in to each container or package the update data into a new container image, resulting in a long update time and error-prone and occupying the host storage space.

Method used

By dividing the data into read-only data and read-write data, and using the user read-only layer data stored by the non-host for remote mounting, a read-write layer is added on the basis of the user read-only layer data to support the update of user data.

Benefits of technology

It realizes rapid update of data to the local area, greatly improving the update speed, avoiding the problem of occupying the host storage space due to mirror downloads, and significantly saving human resources, supporting resource pooling, and improving resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114428668B_ABST
    Figure CN114428668B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device and system for updating data, which relates to the field of computer technology, and in particular to cloud computing technology and container technology. The specific implementation scheme is: mounting the updated user read-only layer data in a read-only manner, wherein the updated user read-only layer data is stored in a non-host machine; adding a readable and writable layer on the basis of the mounted updated user read-only layer data, wherein the readable and writable layer is used to support users to write data corresponding to the updated user read-only layer data. Thereby, the update speed can be greatly improved, and human resources can be significantly saved when updating large quantities of container data. And because there is no need to download the image to the local, it will not be restricted by the storage space of the host machine, and there is no binding relationship between the container and the node, thereby providing a technical basis for resource pooling, which is conducive to improving resource utilization efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to cloud computing technology and container technology, and more particularly to a method, device and system for updating data. Background Art

[0002] Multiple containers in a container cloud cluster will encounter the problem of needing to quickly complete large amounts of data updates for multiple containers.

[0003] In the prior art, on the K8s (Kubernetes) platform, manual logging into each container is often used to update the data in the container, or the data to be updated is packaged into a new container image during each update to regenerate the container based on the new container image. Summary of the invention

[0004] Provided are a method, an apparatus, an electronic device, and a storage medium for updating data.

[0005] According to a first aspect, a method for updating data is provided, the method comprising: mounting updated user read-only layer data in a read-only manner, wherein the updated user read-only layer data is stored in a non-host machine; adding a readable and writable layer based on the mounted updated user read-only layer data, wherein the readable and writable layer is used to support users to write data corresponding to the updated user read-only layer data.

[0006] According to a second aspect, a device for updating data is provided, the device comprising: a mounting unit configured to mount updated user read-only layer data in a read-only manner, wherein the updated user read-only layer data is stored in a non-host machine; an adding unit configured to add a readable and writable layer based on the mounted updated user read-only layer data, wherein the readable and writable layer is used to support a user to write data corresponding to the updated user read-only layer data.

[0007] According to a third aspect, a system for updating data is provided, comprising a master node and at least one slave node running a container; wherein the master node is configured to: write update data to a storage end for storing data to be updated through a preset container for updating, generate updated user read-only layer data, and the update data belongs to a pre-divided read-only data type; the at least one slave node running a container is configured to: execute the method for updating data as described in any implementation manner in the first aspect.

[0008] According to a fourth aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any implementation manner in the first aspect.

[0009] According to a fifth aspect, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method as described in any implementation manner of the first aspect.

[0010] According to a sixth aspect, a computer program product is provided, the computer program product comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in any implementation manner in the first aspect.

[0011] The technology disclosed in the present invention achieves the effect of quickly updating the data for updating to the local by dividing the data for updating into read-only data and read-write data, and remotely mounting the user read-only layer data stored in a non-host machine. A read-write layer is added on the basis of the user read-only layer data to support the updating of user data, thereby greatly improving the updating speed. In addition, since there is no need to download the image to the local machine, it is not restricted by the storage space of the host machine, and human resources can be significantly saved when updating large quantities of container data.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0014] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0015] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;

[0016] Figure 3 is a schematic diagram of an application scenario in which the method for updating data according to an embodiment of the present disclosure can be implemented;

[0017] Figure 4 is a schematic diagram of an apparatus for updating data according to an embodiment of the present disclosure;

[0018] Figure 5is a timing diagram of the interaction between various devices in one embodiment of a system for updating data used to implement an embodiment of the present disclosure;

[0019] Figure 6 The present invention is a block diagram of an electronic device for implementing the method for updating data according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0021] Figure 1 1 is a schematic diagram 100 showing a first embodiment of the present disclosure. The method for updating data comprises the following steps:

[0022] S101, mounting the updated user read-only layer data in read-only mode.

[0023] In this embodiment, the execution subject of the method for updating data (eg, a node running a container) can mount the updated user read-only layer data in a read-only manner, wherein the updated user read-only layer data can be stored in a non-host machine.

[0024] In this embodiment, the user read-only layer data may include various data for providing users with read-only permissions. The updated user read-only layer data may refer to the data itself or data mirroring (Mirroring) updated based on the user read-only layer data. As an example, the user read-only layer data may be, for example, an installation file (version 1.0) of a cloud game. The updated user read-only layer data may be an installation file (version 2.0) of a cloud game.

[0025] It should be noted that the updated user read-only layer data is usually stored in a storage medium other than the host machine, such as other electronic devices that are communicatively connected. The host machine may refer to the physical machine where the execution subject is located.

[0026] S102, adding a read-write layer based on the mounted updated user read-only layer data.

[0027] In this embodiment, the execution subject may add a readable and writable layer based on the updated user read-only layer data mounted in step S101 in various ways. The readable and writable layer may be used to support the user to write data corresponding to the updated user read-only layer data.

[0028] In this embodiment, as an example, the execution subject may perform the operation of adding a readable and writable layer through an AUFS (Advanced Multi-Layered Unification File system) file system or an overlay file system.

[0029] In this embodiment, the data corresponding to the updated user read-only layer data may include various data associated with the updated user read-only layer data that need to support user reading and writing. As an example, the data corresponding to the user read-only layer data may be, for example, a configuration file of a cloud game, which may include personalized data such as user archives.

[0030] The method provided by the above-mentioned embodiment of the present disclosure divides the data for updating into read-only data and read-write data, and remotely mounts the user read-only layer data stored in a non-host machine to achieve the effect of quickly updating to the local machine. A read-write layer is added on the basis of the user read-only layer data to support the update of user data, thereby greatly improving the update speed. Since there is no need to download the image to the local machine, it is not restricted by the storage space of the host machine, and human resources can be significantly saved when updating large quantities of container data.

[0031] In some optional implementations of this embodiment, the updated user read-only layer data may include an updated data snapshot.

[0032] In these implementations, the updated data snapshot may be a data snapshot generated based on data used to update user read-only data.

[0033] Based on the above optional implementation methods, this solution can support data recovery at a corresponding time point by mounting data snapshots instead of original data.

[0034] Optionally, based on the above optional implementation, the updated user read-only layer data can be stored based on a network storage end; and the above updated data snapshot is generated in response to determining that the user read-only layer data stored in the above network storage end is updated.

[0035] In these implementations, the network storage end may include various distributed storage services, such as Ceph, GlusterFS or public cloud storage. In response to determining that the user read-only layer data stored in the distributed storage service is updated, the execution subject for creating the data snapshot (such as the k8s control node) may perform a snapshot operation, thereby generating the updated data snapshot on the network storage end.

[0036] Based on the above optional implementation methods, this solution can store updated user read-only layer data based on a highly available and reliable network storage terminal, greatly reducing the storage space requirements for the host node; moreover, since the above updated user read-only layer data is stored in a non-host machine, there is no binding relationship between the container and the node, thus supporting resource pooling, thereby improving resource utilization efficiency.

[0037] Continue to see Figure 2 , Figure 2 200 is a schematic diagram according to a second embodiment of the present disclosure. The method for updating data comprises the following steps:

[0038] S201, mounting the user read-only layer data stored in a non-host machine in a read-only manner.

[0039] In this embodiment, the execution subject of the method for updating data (eg, a node running a container) may mount the user read-only layer data stored in a non-host machine in a read-only manner.

[0040] In this embodiment, the user read-only layer data may include various data itself or data mirroring for providing the user with read-only permissions. As an example, the user read-only layer data may be, for example, an installation file (version 1.0) of a cloud game.

[0041] It should be noted that the user read-only layer data is usually stored in a storage medium other than the host machine, such as other electronic devices that are communicatively connected. The host machine may refer to the physical machine where the execution subject is located.

[0042] In this embodiment, the user read-only layer data is generated based on the initialization container writing the initialization data into the storage end for storing the data to be updated. The data to be updated belongs to the pre-classified read-only data type. The storage end for storing the data to be updated may be a storage medium other than the host machine.

[0043] In this embodiment, the data may be divided into a read-only data type and a read-write data type in advance. Then, the node running the initialization container may write the initialization data in the initialization container to a storage end for storing the data to be updated. The initialization data is usually also of the read-only type. Optionally, the data to be updated may be the same as the initialization data.

[0044] S202, adding a readable and writable layer based on the mounted user read-only layer data.

[0045] In this embodiment, the execution subject may add a readable and writable layer based on the user read-only layer data mounted in step S201 in various ways, wherein the readable and writable layer may be used to support the user to write data corresponding to the user read-only layer data.

[0046] In this embodiment, as an example, the execution subject may perform the operation of adding a readable and writable layer through an AUFS (Advanced Multi-Layered Unification File system) file system or an overlay file system.

[0047] In this embodiment, the data corresponding to the user read-only layer data may include various data associated with the user read-only layer data that need to support user reading and writing. As an example, the data corresponding to the user read-only layer data may be, for example, a configuration file of a cloud game, which may include personalized data such as user archives.

[0048] S203, mounting the updated user read-only layer data in read-only mode.

[0049] S204, adding a read-write layer based on the mounted updated user read-only layer data.

[0050] The above S203 and S204 may be respectively consistent with S101 and S102 and their optional implementations in the aforementioned embodiments. The above description of S101, S102 and their optional implementations is also applicable to SS203 and S204, which will not be repeated here.

[0051] Optionally, the user read-only layer data described in the first step may include an initialization data snapshot generated based on the initialization data.

[0052] In these implementations, the initialization data snapshot may be a data snapshot generated by performing a snapshot operation on the initialization data.

[0053] Based on the above optional implementation methods, this solution can support data recovery at a corresponding time point by mounting data snapshots instead of original data.

[0054] Optionally, based on the above optional implementation, the above user read-only layer data can be stored based on a network storage end; and the above initialization data snapshot is generated in response to determining that the data stored in the above network storage end has completed initialization.

[0055] In these implementations, the network storage end may include various distributed storage services, such as Ceph, GlusterFS or public cloud storage. In response to determining that the data stored in the distributed storage service has completed initialization, the execution subject for creating the data snapshot (such as the K8s control node) may perform a snapshot operation, thereby generating the initialization data snapshot on the network storage end.

[0056] Based on the above optional implementation methods, this solution can store initialized user read-only layer data based on a high-availability and reliable network storage terminal, greatly reducing the storage space requirements for the host node; moreover, since the above initialized user read-only layer data is stored in a non-host machine, there is no binding relationship between the container and the node, thus supporting resource pooling, thereby improving resource utilization efficiency.

[0057] from Figure 2 It can be seen that the process 200 of the method for updating data in this embodiment embodies the steps of mounting the user read-only layer data stored in the non-host machine in a read-only manner, and the steps of adding a readable and writable layer based on the mounted user read-only layer data. Therefore, the scheme described in this embodiment can use the initialization container to write the initialization data to the non-host machine, and quickly synchronize the above user read-only layer data to the local machine by remote mounting, and support the user to write data by adding a readable and writable layer, so as to realize the rapid initialization of multiple containers and significantly save human resources.

[0058] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of a method for updating data according to an embodiment of the present disclosure. Figure 3 In the application scenario, optionally, the user can update the user read-only layer data 305 by accessing the remote storage 304 in a read-write manner through the node 301 running the container. Optionally, the data snapshot 0 before the user read-only layer data 305 is updated can be as follows: Figure 3 As shown in 306. The updated data snapshot 1 of the user read-only layer data 305 can be as shown in Figure 3 Afterwards, the nodes 302 and 303 running the container can mount the updated user read-only layer data 305 or data snapshot 1 (such as Figure 3 Then, the nodes 302 and 303 running the container can add a readable and writable layer based on the mounted updated user read-only layer data to support the user to write data corresponding to the updated user read-only layer data.

[0059] At present, one of the existing technologies often uses manual login to each container to update the data in the container or packages the data to be updated into a new container image at each update to regenerate the container based on the new container image. Therefore, when a large amount of data is updated, it takes a long time and is prone to errors because the manual update of each container in turn takes a long time, and the updated data or downloading of the new container image needs to occupy the storage space of the node host, which limits the hardware (especially the storage space) of the host. The method provided by the above-mentioned embodiment of the present disclosure divides the data for updating into read-only data and read-write data, and remotely mounts the user read-only layer data stored in a non-host machine to achieve the effect of rapid update to the local, and adds a read-write layer on the basis of the user read-only layer data to support the update of user data, thereby greatly improving the update speed, and can significantly save human resources when updating large quantities of container data. And because there is no need to download the image locally, it is not restricted by the host's storage space. And because the user read-only layer data is stored in a non-host storage instead of saving the data locally on the host, there is no binding relationship between the container and the node, which provides a technical basis for resource pooling and helps improve resource utilization efficiency.

[0060] Further references Figure 4 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for updating data. Figure 1 or Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0061] like Figure 4 As shown, the apparatus 400 for updating data provided in this embodiment includes a mounting unit 401 and an adding unit 402. The mounting unit 401 is configured to mount the updated user read-only layer data in a read-only manner, wherein the updated user read-only layer data is stored in a non-host machine; the adding unit 402 is configured to add a readable and writable layer on the basis of the mounted updated user read-only layer data, wherein the readable and writable layer is used to support the user to write data corresponding to the updated user read-only layer data.

[0062] In the device 400 for updating data in this embodiment, the specific processing of the mounting unit 401 and the adding unit 402 and the technical effects thereof can be referred to in Figure 1 The relevant descriptions of steps S101 and S102 in the corresponding embodiment are not repeated here.

[0063] In some optional implementations of this embodiment, the updated user read-only layer data includes an updated data snapshot.

[0064] In some optional implementations of this embodiment, the updated user read-only layer data is stored based on a network storage end; and the updated data snapshot is generated in response to determining that the user read-only layer data stored in the network storage end is updated.

[0065] In some optional implementations of the present embodiment, the above-mentioned mounting unit 401 can be further configured to: mount the user read-only layer data stored in a non-host machine in a read-only manner, wherein the user read-only layer data is generated based on the initialization container writing the initialization data to the storage end for storing the data to be updated, and the data to be updated belongs to a pre-divided read-only data type; the above-mentioned adding unit 402 can be further configured to: add a readable and writable layer on the basis of the mounted user read-only layer data, wherein the readable and writable layer is used to support the user to write data corresponding to the user read-only layer data.

[0066] In some optional implementations of this embodiment, the user read-only layer data may include an initialization data snapshot generated based on the initialization data.

[0067] In some optional implementations of this embodiment, the user read-only layer data may be stored based on a network storage terminal. The initialization data snapshot may be generated in response to determining that the data stored in the network storage terminal has completed initialization.

[0068] The device provided by the above-mentioned embodiment of the present disclosure can achieve the effect of rapid update to the local by dividing the data for update into read-only data and read-write data, and remotely mounting the user read-only layer data stored in a non-host machine through the mounting unit 401, and adding a read-write layer to support the update of user data on the basis of the user read-only layer data through the adding unit 402, thereby greatly improving the update speed, and significantly saving human resources for large-scale container data updates. In addition, since there is no need to download the image to the local machine, it will not be restricted by the storage space of the host machine, and since the user read-only layer data stored in a non-host machine is used instead of storing the data locally in the host machine, there is no binding relationship between the container and the node, thereby providing a technical basis for resource pooling, which is conducive to improving resource utilization efficiency.

[0069] Further references Figure 5, which shows a timing diagram 500 of the interaction between various devices in an embodiment of a system for updating data. The system for updating data may include: a master node (e.g., a control node of K8s) and at least one slave node running a container (e.g., a Worker node of K8s). Among them, the above-mentioned master node can be configured to: write the update data to the storage end for storing the data to be updated through a preset container for updating, generate updated user read-only layer data, and the update data belongs to a pre-divided read-only data type. The above-mentioned at least one slave node running a container can be configured to: execute the method for updating data as described in the above-mentioned embodiment.

[0070] In some optional implementations of this embodiment, the master node may also be configured to: write the initialization data to the storage end through a preset initialization container to generate user read-only layer data.

[0071] like Figure 5 As shown, in step 501, the master node writes the update data into the storage end for storing the data to be updated through the preset container for updating, and generates updated user read-only layer data.

[0072] In this embodiment, the master node may pre-create a container for updating (running on the slave node 1), that is, a preset container. Afterwards, the master node may write the update data to the storage end for storing the data to be updated through the preset container for updating, and generate updated user read-only layer data. The update data may belong to the pre-classified read-only data type.

[0073] It should be noted that the updated user read-only layer data and the related contents on the storage end may be consistent with the description in the above embodiment, and will not be repeated here. The updated data may include the data itself or the data snapshot used to update the user read-only data.

[0074] In step 502, the master node starts a container running on the slave node 2, and the container mounts the updated user read-only layer data in a read-only manner.

[0075] In step 503, the container running on the slave node 2 adds a readable and writable layer based on the mounted updated user read-only layer data.

[0076] The above-mentioned step 502 and step 503 are respectively consistent with step 101 and step 102 and their optional implementation methods in the aforementioned embodiment. The above description of step 101 and step 102 and their optional implementation methods also applies to step 502 and step 503, and will not be repeated here.

[0077] In some optional implementations of this embodiment, before creating a container for updating, the master node may also pre-create an initialization container, that is, a preset initialization container. Afterwards, the master node may write the initialization data to the storage end through the preset initialization container to generate user read-only layer data.

[0078] Optionally, after data initialization is completed, the master node can launch the above initialization container.

[0079] It should be noted that the above-mentioned method of generating user read-only layer data may be consistent with the corresponding description in the optional implementation method of the aforementioned embodiment, and will not be repeated here.

[0080] The above-mentioned embodiment of the present application provides a system for updating data. First, the master node writes the update data belonging to the pre-divided read-only data type into the storage end for storing the data to be updated through the preset container for updating, and generates updated user read-only layer data. Then, at least one slave node running a container mounts the updated user read-only layer data stored in a non-host machine in a read-only manner; on the basis of the mounted updated user read-only layer data, a read-write layer is added to support the user to write data corresponding to the updated user read-only layer data. Thereby, the update speed can be greatly improved, and human resources can be significantly saved when updating large quantities of container data. And because there is no need to download the image to the local, it will not be restricted by the storage space of the host machine, and because the user read-only layer data stored in the non-host machine is used instead of saving the data locally in the host machine, there is no binding relationship between the container and the node, thereby providing a technical basis for resource pooling, which is conducive to improving resource utilization efficiency.

[0081] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0082] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0083] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0084] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0085] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0086] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a method for updating data. For example, in some embodiments, the method for updating data may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method for updating data described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform a method for updating data in any other appropriate manner (e.g., by means of firmware).

[0087] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0088] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0089] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0090] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0091] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0092] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0093] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0094] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for updating data, comprising: Mounting user read-only layer data stored in a non-host machine in a read-only manner, wherein the user read-only layer data is generated based on the initialization container writing initialization data into a storage end for storing data to be updated, and the data to be updated belongs to a pre-classified read-only data type; Adding a readable and writable layer based on the mounted user read-only layer data, wherein the readable and writable layer is used to support the user to write data corresponding to the user read-only layer data; Mounting the updated user read-only layer data in a read-only manner, wherein the updated user read-only layer data is stored in a non-host machine; A readable and writable layer is added based on the mounted updated user read-only layer data, wherein the readable and writable layer is used to support a user to write data corresponding to the updated user read-only layer data.

2. The method according to claim 1, wherein: The updated user read-only layer data includes an updated data snapshot.

3. The method according to claim 2, wherein: The updated user read-only layer data is stored based on a network storage terminal; and The updated data snapshot is generated in response to determining that the update of the user read-only layer data stored in the network storage end is completed.

4. The method according to claim 1, wherein: The user read-only layer data includes an initialization data snapshot generated based on the initialization data.

5. The method according to claim 4, wherein: The user read-only layer data is stored based on a network storage end; and the initialization data snapshot is generated in response to determining that the data stored in the network storage end has completed initialization.

6. A device for updating data, comprising: A first mounting unit is configured to mount user read-only layer data stored in a non-host machine in a read-only manner, wherein the user read-only layer data is generated based on the initialization container writing initialization data into a storage end for storing data to be updated, and the data to be updated belongs to a pre-classified read-only data type; A first adding unit is configured to add a readable and writable layer based on the mounted user read-only layer data, wherein the readable and writable layer is used to support a user to write data corresponding to the user read-only layer data; A second mounting unit is configured to mount the updated user read-only layer data in a read-only manner, wherein the updated user read-only layer data is stored in a non-host machine; The second adding unit is configured to add a readable and writable layer based on the mounted updated user read-only layer data, wherein the readable and writable layer is used to support the user to write data corresponding to the updated user read-only layer data.

7. A system for updating data, comprising a master node and at least one slave node running a container; in, The master node is configured to: write the update data into a storage end for storing the to-be-updated data through a preset container for updating, to generate the updated user read-only layer data, wherein the update data belongs to the pre-divided read-only data type; The at least one slave node running a container is configured to execute the method for updating data as claimed in any one of claims 1 to 5.

8. The system according to claim 7, wherein: The master node is also configured to: The initialization data is written into the storage end through a preset initialization container to generate user read-only layer data.

9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.

11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and system for operating multiple virtual machines

    CN102521016A

  • Distributed data reading and writing method, device and system

    CN109254958A