Cloud service version updating method and device, equipment and storage medium

By using cloud disks created based on disk images and terraform tools in cloud services for mounting and version updates, the resource consumption and user experience problems caused by large file package transmission and decompression in traditional methods are solved, and stable updates of cloud services are achieved. and user-invisible version upgrades.

CN119336347AActive Publication Date: 2025-01-21HANGZHOU WIZARD GAME TECH CO LTD

Patent Information

Application Number
CN202310893380.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2025-01-21
Estimated Expiration
2043-07-20

AI Technical Summary

Technical Problem

The existing cloud service version update method is high in large-scale scenarios due to the transmission and decompression of large file packages, which affects the user experience, and may lead to unstable cloud services. The traditional service suspension method has poor user experience and is easy to Causes customer churn.

Method used

By obtaining the cloud disk created based on the disk image, using the terraform tool to mount the cloud disk, and updating the version of the currently running cloud service without the user being aware of it or seizing host resources. This method includes steps such as obtaining the cloud disk, mounting the cloud disk, online operation, drive letter assignment and modification, process locking and restarting to complete the version update.

Benefits of technology

It solves the problem of resource consumption caused by the transmission and decompression of large file packages, avoids the negative impact of outage updates on user experience, ensures the stability of cloud services, and reduces the risk of customer churn.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336347A_ABST
    Figure CN119336347A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud service version updating method and device, equipment and a storage medium, and relates to the field of version updating, and the method comprises the steps: obtaining a cloud disk created based on a disk mirror image; the disk mirror image is a mirror image specially used for storing a configuration file and a version to be updated; mounting of the cloud disk and the to-be-updated host and online connection of the operating system and the mounted cloud disk are executed through a form tool, a drive letter is distributed to the online cloud disk, and the drive letter is modified according to disk information and a configuration file corresponding to the to-be-updated host; and determining a current process service operated by the to-be-updated host, if processes corresponding to the current process service are all in an unoccupied state, locking the processes, and restarting the processes after successful locking to load the to-be-updated version so as to complete updating of the cloud service version. Through cloud disk mounting, the problem of transmission of a large file package is solved, and version updating can be performed on the currently running cloud service under the condition that a user does not perceive and does not preempt host resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of version updating, and in particular to a cloud service version updating method, device, equipment and storage medium. Background Art

[0002] In the PC gaming field, most version updates are carried out by suspending services, and players are given a certain amount of gold coins or virtual items as compensation. The suspension of services requires online players to be forced to log off, and players will not be able to enter the system during the suspension and update cycle. In addition, the current version iteration speed is fast, resulting in a high frequency of releases, which can easily have a huge negative impact on the user experience and even cause a large number of customer losses.

[0003] The cloud service version upgrade depends on the installation of the application package. Since the application package is very large, compression is used to optimize the package size. The side effect is that it needs to be decompressed, which is a computationally intensive task. For example, the decompression process of an 8GB compressed file may take up to 1 minute or even longer. The CPU (Central Processing Unit) utilization rate will also be very high, even full; the hard disk read and write load is also high. Regardless of compression or not, the package must be transmitted to the target host. In large-scale scenarios, the amount of data transmitted on the intranet is quite large. Although network storms can be avoided by controlling the transmission rate, the side effect is that the transmission time is extended, and the impact on the server is continuous. Due to the large package size, the network, hard disk, CPU, and memory on the server are all in a resource consumption state during the version update process, which will affect the stability of the running cloud service to a certain extent.

[0004] Downgrading a cloud service version means deleting the application package and reserving enough space for the next version release. Removing such a large package is an extremely time-consuming process. During this period, the hard disk is also busy, which may cause the running service to be unstable to a certain extent. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a cloud service version update method, device, equipment and storage medium, which can solve the transmission problem of large file packages by mounting a cloud disk, and can update the version of the currently running cloud service without user perception and without occupying host resources. The specific scheme is as follows:

[0006] In a first aspect, the present application provides a cloud service version update method, comprising:

[0007] Obtain a cloud disk created based on a disk image; the disk image is an image specifically used to store configuration files and versions to be updated;

[0008] Determine the target disk information corresponding to the host to be updated based on the correspondence between the pre-acquired host information to be updated and the disk information through the terraform tool, and perform the mounting operation of the cloud disk and the host to be updated, and perform the online operation of the operating system installed in the host to be updated and the mounted cloud disk, then allocate a drive letter for the online cloud disk, and perform the drive letter modification operation according to the target disk information and the configuration file in the online cloud disk;

[0009] Determine the current process service running on the host to be updated. If the processes corresponding to the current process service are all in an unoccupied state, lock the process corresponding to the current process service. After the locking is successful, restart the process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version.

[0010] Optionally, before obtaining the cloud disk created based on the disk image, the method further includes:

[0011] Creating a cloud host with the same specifications as the host to be updated through a preset cloud platform, and installing the application, dependent libraries, configuration files and the version to be updated on the cloud host;

[0012] A system snapshot is taken of the cloud host through the preset cloud platform to generate a disk image, and a cloud disk is created based on the disk image.

[0013] Optionally, the determining the current process service running on the host to be updated, if all processes corresponding to the current process service are in an unoccupied state, locking the process corresponding to the current process service includes:

[0014] Determine the current process service running on the host to be updated, and judge whether the current process service is a preset cloud service; the preset cloud service includes a group battle service and a chicken-eating service; the group battle service is a cloud service with a game map size smaller than a preset size; the chicken-eating service is a cloud service with a game map size greater than or equal to the preset size;

[0015] Determine a preset number of processes corresponding to the current process service on the host to be updated based on the judgment result, and obtain the occupancy status corresponding to each of the preset number of processes from the reporting center;

[0016] If the preset number of processes are all in an unoccupied state, a locking operation is performed on the preset number of processes to obtain a preset number of locked processes.

[0017] Optionally, before the restarting of the process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version, the method further includes:

[0018] Obtaining the occupancy statuses corresponding to the preset number of locked processes respectively through the server interface;

[0019] If the preset number of locked processes are all in an unoccupied state, the preset number of locked processes are stopped, and the configuration file is obtained from the online cloud disk to use the configuration file to perform an update operation of the configuration information.

[0020] Optionally, after acquiring the occupancy statuses corresponding to the preset number of locked processes respectively through the server interface, the method further includes:

[0021] If there are processes in an occupied state among the preset number of locked processes, a lock release operation is performed on the preset number of locked processes, and the process jumps again to the step of determining the current process service running on the host to be updated.

[0022] Optionally, the restarting of the process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version includes:

[0023] Restarting the preset number of locked processes, and loading the to-be-updated version corresponding to the current process service in the online cloud disk into the host memory;

[0024] The current version information corresponding to the current process service is obtained from the reporting center. If the current version information is consistent with the version information corresponding to the version to be updated, it is determined that the update operation of the cloud service version has been completed.

[0025] Optionally, after obtaining the current version information corresponding to the current process service from the reporting center, the method further includes:

[0026] If the current version information is inconsistent with the version information corresponding to the version to be updated, it is determined that the update operation of the cloud service version is not completed, and the lock release operation is performed on the preset number of locked processes, and the current number of failures is recorded;

[0027] Determine whether the current number of failures reaches the preset number threshold. If not, jump back to the step of determining the current process service running on the host to be updated until the current number of failures reaches the preset number threshold, so as to output a prompt message indicating that the cloud service version update has failed.

[0028] In a second aspect, the present application provides a cloud service version update device, including:

[0029] A cloud disk acquisition module, used to acquire a cloud disk created based on a disk image; the disk image is an image specifically used to store configuration files and versions to be updated;

[0030] The cloud disk mounting module is used to determine the target disk information corresponding to the host to be updated based on the correspondence between the host information to be updated and the disk information obtained in advance through the terraform tool, and perform the mounting operation of the cloud disk and the host to be updated, and perform the online operation of the operating system installed in the host to be updated and the mounted cloud disk, and then allocate a drive letter for the online cloud disk, and perform the drive letter modification operation according to the target disk information and the configuration file in the online cloud disk;

[0031] The version update module is used to determine the current process service running on the host to be updated. If the processes corresponding to the current process service are all in an unoccupied state, the process corresponding to the current process service is locked. After the locking is successful, the process is restarted to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version.

[0032] In a third aspect, the present application provides an electronic device, including:

[0033] Memory, used to store computer programs;

[0034] A processor is used to execute the computer program to implement the aforementioned cloud service version update method.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the aforementioned cloud service version update method when executed by a processor.

[0036] In the present application, a cloud disk created based on a disk image is obtained; the disk image is an image specifically used to store configuration files and versions to be updated; the target disk information corresponding to the host to be updated is determined by the terraform tool based on the correspondence between the pre-acquired host information to be updated and the disk information, and the mounting operation of the cloud disk and the host to be updated is performed, and the online operation of the operating system installed in the host to be updated and the mounted cloud disk is performed, and then a drive letter is allocated for the online cloud disk, and the drive letter modification operation is performed according to the target disk information and the configuration files in the online cloud disk; the current process service running on the host to be updated is determined, and if the processes corresponding to the current process service are all in an unoccupied state, the process corresponding to the current process service is locked, and after the locking is successful, the version to be updated corresponding to the current process service in the online cloud disk is loaded into the host memory by restarting the process to complete the update operation of the cloud service version. It can be seen that the present application creates a cloud disk based on a disk image specifically used to store configuration files and versions to be updated, and then performs the cloud disk mounting operation through the terraform tool, which can solve the network transmission problem and security problem of large file packages, and can alleviate the problem of resource preemption, as well as alleviate the instability problem caused to the running cloud service; secondly, the present application generates a correspondence between the host information to be updated and the disk information in advance, and transmits it to the terraform tool, so as to avoid the problem of long mounting time and large resource occupation caused by the generation of the correspondence by the terraform tool when mounting the cloud disk, thereby improving the mounting efficiency; in addition, the present application locks the process corresponding to the current process service when the processes corresponding to the current process service running on the host to be updated are all in an unoccupied state, so as to avoid the allocation system from assigning tasks to the process corresponding to the current process service, so that after the process is successfully locked, the update operation of the cloud service version is completed by restarting the process and loading the updated version in the cloud disk after the online connection into the host memory, so as to avoid the problem of poor user experience caused by the service stop update, and the version of the currently running cloud service can be updated without user perception and without occupying host resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0038] Figure 1 A flow chart of a cloud service version update method disclosed in this application;

[0039] Figure 2 A flowchart of a specific cloud service version update method disclosed in this application;

[0040] Figure 3 This is a schematic diagram of the structure of a cloud service version update device disclosed in this application;

[0041] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] In the field of terminal games, most versions are updated by stopping services, which requires online players to be forced offline. Players will not be able to access the system during the downtime update period. In addition, the current version iteration speed is fast, resulting in a high frequency of version releases, which can easily have a great negative impact on user experience and even cause a large number of customers to churn out. In addition, the upgrade and downgrade of cloud service versions can easily preempt host resources, causing the running service to be in an unstable state. To this end, this application provides a cloud service version update method that can solve the transmission problem of large file packages by mounting a cloud disk, and can update the version of the currently running cloud service without user perception and without preempting host resources.

[0044] See also Figure 1 As shown, an embodiment of the present invention discloses a cloud service version update method, including:

[0045] Step S11, obtaining a cloud disk created based on a disk image; the disk image is an image specifically used to store configuration files and versions to be updated.

[0046] In this embodiment, before obtaining the cloud disk created based on the disk image, it can also include creating a cloud host with the same specifications as the host to be updated through a preset cloud platform, and installing applications, dependent libraries, configuration files and versions to be updated on the cloud host; taking a system snapshot of the cloud host through the preset cloud platform to generate a disk image, and creating a cloud disk based on the disk image. It can be understood that the current method of updating the cloud service version by downloading a compressed package and decompressing the compressed package is prone to network crashes and host resource grabbing problems. Therefore, the present application creates a cloud host with the same specifications as the host to be updated on a preset cloud platform, and installs applications, dependent libraries, configuration files and versions to be updated, and then takes a snapshot of the entire system to generate an independent disk image. Next, the disk image can be uploaded to the disk market provided by the preset cloud platform, and a customized cloud disk for the disk image can be created. When the cloud service version of the host to be updated needs to be updated, it is necessary to first obtain a cloud disk created based on the disk image from the disk market. Since the disk image is a special image for storing configuration files and versions to be updated, the configuration files and versions to be updated are also stored in the cloud disk accordingly. In this way, by obtaining the cloud disk that stores the configuration file and the version to be updated, the updated version can be delivered as an independent data disk.

[0047] Step S12: Determine the target disk information corresponding to the host to be updated based on the correspondence between the pre-acquired host information to be updated and the disk information through the terraform tool, and perform the mounting operation of the cloud disk and the host to be updated, and perform the online operation of the operating system installed in the host to be updated and the mounted cloud disk, then assign a drive letter to the online cloud disk, and perform the drive letter modification operation according to the target disk information and the configuration file in the online cloud disk.

[0048] In this embodiment, considering that usually when the cloud host is mounted with a disk, the relevant interface of the cloud vendor needs the user to provide host information and disk information. Taking the mounting interface provided by the terraform cloud vendor as an example, if a large number of hosts need to be mounted with a disk, the realization logic of the mounting interface provided by the cloud vendor is to generate the corresponding relationship between the host information and the disk information through the terraform tool, but the existing mounting interface of the cloud vendor will take up a large amount of CPU and memory resources in actual use, resulting in a long time for the entire mounting process. The essential reason is that when the terraform tool generates the corresponding relationship between the host information and the disk information, it is necessary to connect the API (Application Programming Interface) of the cloud vendor, and query and obtain the status and characteristics of the corresponding resources in the background. This process involves a large number of network requests and processing, which generates a considerable load on the API interface of the cloud vendor. At the same time, when performing resource query and state transmission, it is necessary to occupy a large amount of CPU and memory resources, which easily leads to a bottleneck in CPU performance and causes a long time for the mounting process. Therefore, the present application synchronizes the host information and disk information to be updated to the data storage in advance to generate a host list and a disk list to be updated, and generates a correspondence between the host information to be updated and the disk information in advance before mounting the cloud disk. Then, when mounting the cloud disk through the terraform tool, the correspondence generated in advance is passed to the terraform tool, so that the terraform tool can obtain the target disk information corresponding to the host to be updated from the correspondence, and then execute the mounting operation of the cloud disk and the host to be updated, thereby avoiding the correspondence from occurring when the cloud disk is mounted, improving the mounting efficiency, and avoiding the consumption of host resources. Furthermore, after the cloud disk and the host to be updated are mounted, it is necessary to further perform the online operation of the operating system installed in the host to be updated and the mounted cloud disk, and then assign a drive letter to the online cloud disk, and perform the drive letter modification operation based on the target disk information corresponding to the host to be updated determined based on the correspondence and the configuration file in the online cloud disk. Since the cloud disk stores the configuration file and the version to be updated, after the cloud disk is mounted, connected, and the drive letter modification operation is completed, the configuration file and the version to be updated in the online cloud disk can be obtained. In this way, through the cloud disk mounting operation, the network transmission and security issues of large file packages are solved, and the resource preemption problem and the instability problem caused to the running cloud service can be alleviated.

[0049] Step S13, determine the current process service running on the host to be updated. If the processes corresponding to the current process service are all in an unoccupied state, lock the process corresponding to the current process service. After the locking is successful, restart the process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version.

[0050] In this embodiment, after obtaining the version to be updated in the cloud disk after being connected, it is necessary to first determine the current process service running on the host to be updated, and determine whether the current process service is a group battle service or a chicken-eating service. Based on the judgment result, determine the preset number of processes corresponding to the current process service, and further determine whether the preset number of processes are all in an unoccupied state. If there are processes in the preset number of processes that are in an occupied state, jump back to the above step of determining the current process service running on the host to be updated; if the preset number of processes are all in an unoccupied state, lock the preset number of processes to prevent the allocation system from allocating tasks to the process corresponding to the current process service, and after the preset number of processes are successfully locked, stop the successfully locked preset number of processes, and restart the process to load the configuration file in the cloud disk after being connected and the version to be updated into the host memory, thereby completing the update operation of the cloud service version. It should be noted that the present application is applicable to both the upgrade and downgrade of cloud service versions. For downgrade of cloud service versions, if the cloud disk storing the old cloud service version has not been deleted from the host to be updated after the online connection, step S13 can be directly executed to downgrade the cloud service version. Furthermore, the present application is also applicable to updating a large number of cloud service versions, by setting the parallel number, to update the cloud service versions in batches, and the update steps for each cloud service version are the same as the above steps.

[0051] It can be seen that the present application creates a cloud disk based on a disk image specifically used to store configuration files and versions to be updated, and then performs the cloud disk mounting operation through the terraform tool, which can solve the network transmission problem and security problem of large file packages, and can alleviate the problem of resource preemption, as well as alleviate the instability problem caused to the running cloud service; secondly, the present application generates a correspondence between the host information to be updated and the disk information in advance, and transmits it to the terraform tool, so as to avoid the problem of long mounting time and large resource occupation caused by the generation of the correspondence by the terraform tool when mounting the cloud disk, thereby improving the mounting efficiency; in addition, the present application locks the process corresponding to the current process service when the processes corresponding to the current process service running on the host to be updated are all in an unoccupied state, so as to avoid the allocation system from assigning tasks to the process corresponding to the current process service, so that after the process is successfully locked, the update operation of the cloud service version is completed by restarting the process and loading the updated version in the cloud disk after the online connection into the host memory, so as to avoid the problem of poor user experience caused by the service stop update, and the version of the currently running cloud service can be updated without user perception and without occupying host resources.

[0052] Based on the previous embodiment, this application describes the complete process of cloud disk mounting and cloud service version update. Next, this application will elaborate on how to update the cloud service version using the configuration file in the cloud disk after online connection and the version to be updated. Figure 2 As shown, an embodiment of the present invention discloses a process for updating a cloud service version, including:

[0053] Step S21, determine the current process service running on the host to be updated, and determine whether the current process service is a preset cloud service; the preset cloud service includes a team battle uniform and a chicken-eating uniform; the team battle uniform is a cloud service with a game map size smaller than a preset size; the chicken-eating uniform is a cloud service with a game map size greater than or equal to the preset size.

[0054] In this embodiment, in order to maximize the performance utilization of the host to be updated and to flexibly adjust the deployed services, the host to be updated used in this application is a unified configuration, which can enable two processes for the group battle server and only one process for the chicken-eating server. Therefore, in order to ensure that the cloud service version is updated without user perception and without occupying host resources, it is necessary to first determine the current process service running on the host to be updated, and determine whether the current process service running on the host to be updated is a group battle server or a chicken-eating server. Among them, group battle servers generally refer to small and medium-sized maps or cloud services with general server performance requirements; chicken-eating servers generally refer to large maps or cloud services with high server performance requirements.

[0055] Step S22: determining a preset number of processes corresponding to the current process service on the host to be updated based on the judgment result, and obtaining the occupancy status corresponding to the preset number of processes from a reporting center.

[0056] Step S23: If the preset number of processes are all in an unoccupied state, a locking operation is performed on the preset number of processes to obtain a preset number of locked processes.

[0057] In this embodiment, if it is a group battle service, it is necessary to obtain the occupancy status of the two processes corresponding to the current process service from the reporting center. If both are in an unoccupied state, the two processes are locked to obtain two locked processes corresponding to the current process service. If it is a chicken-eating service, it is necessary to obtain the occupancy status of a process corresponding to the current process service from the reporting center. If it is in an unoccupied state, a process is locked to obtain a locked process corresponding to the current process service. It should be noted that the locked process will no longer be assigned system-assigned tasks. If there is an occupied process in the process corresponding to the current process service, jump back to the above-mentioned step of determining the current process service running on the host to be updated to re-obtain the status of the host to be updated.

[0058] Step S24, obtaining the occupancy status corresponding to the preset number of locked processes through the server interface; if the preset number of locked processes are all in an unoccupied state, stopping the preset number of locked processes, and obtaining a configuration file from the cloud disk after being online, so as to use the configuration file to update the configuration information.

[0059] In this embodiment, the occupancy status corresponding to a preset number of locked processes is obtained through the server interface. If there are processes in an occupied state among the preset number of locked processes, the lock release operation is performed on the preset number of locked processes, and the process is jumped again to the above-mentioned step of determining the current process service running on the host to be updated.

[0060] In this embodiment, since the process occupancy status obtained by the reporting center and the server interface may be inconsistent due to the time difference, this application needs to further obtain the occupancy status corresponding to the locked process through the server interface to check the process occupancy status again. Specifically, if it is a team battle server, the occupancy status corresponding to the two locked processes is obtained through the server interface. If both are in an unoccupied state, the two locked processes are stopped, and the preset escort program is started to obtain the configuration file from the cloud disk after the connection, and the configuration information is updated using the configuration file, wherein the configuration file includes the new drive letter assigned to the cloud disk after the connection and the version to be updated; if there is an occupied process in the two locked processes, the two locked processes need to be released, and jump back to the above-mentioned step of determining the current process service running on the host to be updated to re-obtain the status of the host to be updated. It should be noted that the steps of checking the occupancy status of the locked process through the server interface in the chicken-eating server and the team battle server are similar.

[0061] Step S25, restarting the process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version.

[0062] In this embodiment, the restarting of the process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version may include restarting the preset number of locked processes, and loading the updated version corresponding to the current process service in the online cloud disk into the host memory; obtaining the current version information corresponding to the current process service from the reporting center, and if the current version information is consistent with the version information corresponding to the updated version, then determining that the update operation of the cloud service version has been completed. If the current version information is inconsistent with the version information corresponding to the updated version, then determining that the update operation of the cloud service version has not been completed, and performing a lock release operation on the preset number of locked processes, and recording the current number of failures; determining whether the current number of failures reaches the preset number threshold, if not, then jumping back to the step of determining the current process service running on the host to be updated, until the current number of failures reaches the preset number threshold, so as to output a prompt message that the cloud service version update failed. It is understandable that the preset escort program will restart the locked process and load the version to be updated and the new drive letter address into the host memory. The new drive letter is also the drive letter assigned by the cloud disk after the connection. If the restart is successful, the current version information corresponding to the current process service is obtained from the reporting center, and it is determined whether the current version information is consistent with the version information corresponding to the version to be updated. If they are consistent, it means that the cloud service version update is successful; if they are inconsistent, it means that the cloud service version update has failed, and the locked process corresponding to the current process service is released, and the current number of failures is recorded; if the current number of failures is less than the preset number threshold, it will jump back to the above step of determining the current process service running on the host to be updated; if the current number of failures is greater than or equal to the preset number threshold, it means that there are unpredictable circumstances that cause the cloud service version update to fail. At this time, a prompt message of update failure is returned and it is handled through manual intervention.

[0063] It can be seen that the present application first determines the current process service running on the host to be updated, and when the processes corresponding to the current process service are in an unoccupied state, locks the process corresponding to the current process service, thereby preventing the allocation system from allocating tasks to the process corresponding to the current process service. After the process is locked successfully, the update operation of the cloud service version is completed by restarting the process and loading the updated version in the cloud disk after the online connection into the host memory, thereby avoiding the problem of poor user experience caused by service suspension updates, and updating the version of the currently running cloud service without user perception and without occupying host resources.

[0064] See also Figure 3 As shown, an embodiment of the present invention discloses a cloud service version updating device, comprising:

[0065] A cloud disk acquisition module 11 is used to acquire a cloud disk created based on a disk image; the disk image is an image specifically used to store configuration files and versions to be updated;

[0066] The cloud disk mounting module 12 is used to determine the target disk information corresponding to the host to be updated based on the correspondence between the host information to be updated and the disk information obtained in advance through the terraform tool, and perform the mounting operation of the cloud disk and the host to be updated, and perform the online operation of the operating system installed in the host to be updated and the mounted cloud disk, and then allocate a drive letter for the online cloud disk, and perform a drive letter modification operation according to the target disk information and the configuration file in the online cloud disk;

[0067] The version update module 13 is used to determine the current process service running on the host to be updated. If the processes corresponding to the current process service are all in an unoccupied state, the process corresponding to the current process service is locked. After the locking is successful, the process is restarted to load the updated version corresponding to the current process service in the cloud disk after the connection into the host memory to complete the update operation of the cloud service version.

[0068] It can be seen that the present application creates a cloud disk based on a disk image specifically used to store configuration files and versions to be updated, and then performs the cloud disk mounting operation through the terraform tool, which can solve the network transmission problem and security problem of large file packages, and can alleviate the problem of resource preemption, as well as alleviate the instability problem caused to the running cloud service; secondly, the present application generates a correspondence between the host information to be updated and the disk information in advance, and transmits it to the terraform tool, so as to avoid the problem of long mounting time and large resource occupation caused by the generation of the correspondence by the terraform tool when mounting the cloud disk, thereby improving the mounting efficiency; in addition, the present application locks the process corresponding to the current process service when the processes corresponding to the current process service running on the host to be updated are all in an unoccupied state, so as to avoid the allocation system from assigning tasks to the process corresponding to the current process service, so that after the process is successfully locked, the update operation of the cloud service version is completed by restarting the process and loading the updated version in the cloud disk after the online connection into the host memory, so as to avoid the problem of poor user experience caused by the service stop update, and the version of the currently running cloud service can be updated without user perception and without occupying host resources.

[0069] In some specific embodiments, the cloud service version updating device may further include:

[0070] A cloud host creation unit, used to create a cloud host with the same specifications as the host to be updated through a preset cloud platform, and install the application, dependent library, configuration file and the version to be updated on the cloud host;

[0071] The cloud disk creation unit is used to take a system snapshot of the cloud host through the preset cloud platform to generate a disk image, and create a cloud disk based on the disk image.

[0072] In some specific embodiments, the version update module 13 may specifically include:

[0073] A service determination unit, used to determine the current process service running on the host to be updated, and determine whether the current process service is a preset cloud service; the preset cloud service includes a group battle service and a chicken-eating service; the group battle service is a cloud service with a game map size smaller than a preset size; the chicken-eating service is a cloud service with a game map size greater than or equal to the preset size;

[0074] A first state acquisition unit, configured to determine a preset number of processes corresponding to the current process service on the host to be updated based on the judgment result, and acquire occupancy states respectively corresponding to the preset number of processes from a reporting center;

[0075] The process locking unit is used to lock the preset number of processes if all of the preset number of processes are in an unoccupied state, so as to obtain a preset number of locked processes.

[0076] In some specific embodiments, the cloud service version updating device may further include:

[0077] A second status acquisition unit, configured to acquire, through a server interface, the occupancy statuses corresponding to the preset number of locked processes;

[0078] The configuration information updating unit is used to stop the preset number of locked processes if all of the preset number of locked processes are in an unoccupied state, and obtain the configuration file from the online cloud disk to perform a configuration information update operation using the configuration file.

[0079] In some specific embodiments, the cloud service version updating device may further include:

[0080] The lock release unit is used to perform a lock release operation on the preset number of locked processes if there is an occupied process among the preset number of locked processes, and jump again to the step of determining the current process service running on the host to be updated.

[0081] In some specific embodiments, the version update module 13 may specifically include:

[0082] A process restarting unit, used to restart the preset number of locked processes, and load the to-be-updated version corresponding to the current process service in the online cloud disk into the host memory;

[0083] The version information acquisition unit is used to obtain the current version information corresponding to the current process service from the reporting center. If the current version information is consistent with the version information corresponding to the version to be updated, it is determined that the update operation of the cloud service version has been completed.

[0084] In some specific embodiments, the cloud service version updating device may further include:

[0085] a failure count recording unit, configured to determine that the update operation of the cloud service version is not completed if the current version information is inconsistent with the version information corresponding to the version to be updated, and to perform a lock release operation on the preset number of locked processes, and to record the current failure count;

[0086] The step jump unit is used to determine whether the current number of failures reaches the preset number threshold. If not, it jumps back to the step of determining the current process service running on the host to be updated until the current number of failures reaches the preset number threshold, so as to output a prompt message that the cloud service version update has failed.

[0087] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be considered as any limitation on the scope of use of the present application.

[0088] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the cloud service version update method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0089] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0090] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0091] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, which may be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs that can be used to complete the cloud service version update method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.

[0092] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed cloud service version update method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0093] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0094] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0095] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0096] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0097] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A cloud service version update method, characterized in that: include: Get the cloud disk created based on the disk image; The disk image is a special image for storing configuration files and versions to be updated; Determine the target disk information corresponding to the host to be updated based on the correspondence between the pre-acquired host information to be updated and the disk information through the terraform tool, and perform the mounting operation of the cloud disk and the host to be updated, and perform the online operation of the operating system installed in the host to be updated and the mounted cloud disk, then allocate a drive letter for the online cloud disk, and perform the drive letter modification operation according to the target disk information and the configuration file in the online cloud disk; Determine the current process service running on the host to be updated. If the processes corresponding to the current process service are all in an unoccupied state, lock the process corresponding to the current process service. After the locking is successful, restart the process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version.

2. The cloud service version update method according to claim 1, characterized in that: Before obtaining the cloud disk created based on the disk image, the method further includes: Creating a cloud host with the same specifications as the host to be updated through a preset cloud platform, and installing the application, dependent libraries, configuration files and the version to be updated on the cloud host; A system snapshot is taken of the cloud host through the preset cloud platform to generate a disk image, and a cloud disk is created based on the disk image.

3. The cloud service version update method according to claim 1 or 2, characterized in that: The determining the current process service running on the host to be updated, and if all processes corresponding to the current process service are in an unoccupied state, locking the process corresponding to the current process service, includes: Determine the current process service running on the host to be updated, and judge whether the current process service is a preset cloud service; the preset cloud service includes a group battle service and a chicken-eating service; the group battle service is a cloud service with a game map size smaller than a preset size; the chicken-eating service is a cloud service with a game map size greater than or equal to the preset size; Determine a preset number of processes corresponding to the current process service on the host to be updated based on the judgment result, and obtain the occupancy status corresponding to each of the preset number of processes from the reporting center; If the preset number of processes are all in an unoccupied state, a locking operation is performed on the preset number of processes to obtain a preset number of locked processes.

4. The cloud service version update method according to claim 3, characterized in that: Before the restarting process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version, the method further includes: Obtaining the occupancy statuses corresponding to the preset number of locked processes respectively through the server interface; If the preset number of locked processes are all in an unoccupied state, the preset number of locked processes are stopped, and the configuration file is obtained from the online cloud disk to use the configuration file to perform an update operation of the configuration information.

5. The cloud service version update method according to claim 4, characterized in that: After obtaining the occupancy statuses corresponding to the preset number of locked processes respectively through the server interface, the method further includes: If there are processes in an occupied state among the preset number of locked processes, a lock release operation is performed on the preset number of locked processes, and the process jumps again to the step of determining the current process service running on the host to be updated.

6. The cloud service version update method according to claim 4, characterized in that: The restarting process to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version includes: Restarting the preset number of locked processes, and loading the to-be-updated version corresponding to the current process service in the online cloud disk into the host memory; The current version information corresponding to the current process service is obtained from the reporting center. If the current version information is consistent with the version information corresponding to the version to be updated, it is determined that the update operation of the cloud service version has been completed.

7. The cloud service version update method according to claim 6, characterized in that: After obtaining the current version information corresponding to the current process service from the reporting center, the method further includes: If the current version information is inconsistent with the version information corresponding to the version to be updated, it is determined that the update operation of the cloud service version is not completed, and the lock release operation is performed on the preset number of locked processes, and the current number of failures is recorded; Determine whether the current number of failures reaches the preset number threshold. If not, jump back to the step of determining the current process service running on the host to be updated until the current number of failures reaches the preset number threshold, so as to output a prompt message indicating that the cloud service version update has failed.

8. A cloud service version updating device, characterized in that: include: The cloud disk acquisition module is used to obtain the cloud disk created based on the disk image; The disk image is a special image for storing configuration files and versions to be updated; The cloud disk mounting module is used to determine the target disk information corresponding to the host to be updated based on the correspondence between the host information to be updated and the disk information obtained in advance through the terraform tool, and perform the mounting operation of the cloud disk and the host to be updated, and perform the online operation of the operating system installed in the host to be updated and the mounted cloud disk, and then allocate a drive letter for the online cloud disk, and perform the drive letter modification operation according to the target disk information and the configuration file in the online cloud disk; The version update module is used to determine the current process service running on the host to be updated. If the processes corresponding to the current process service are all in an unoccupied state, the process corresponding to the current process service is locked. After the locking is successful, the process is restarted to load the updated version corresponding to the current process service in the online cloud disk into the host memory to complete the update operation of the cloud service version.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the cloud service version update method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the cloud service version update method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for mounting cloud hard disk on bare metal server and server

    CN111694519A

  • Method and device for upgrading component, equipment and storage medium

    CN112099825A

  • Cloud host creation method, device and system, equipment and readable storage medium

    CN112468545A

  • Application disk hot update method and device based on cloud application, medium and equipment

    CN113741945A

  • Service version updating method and device, electronic equipment and storage medium

    CN115145618A

Cited By

  • Data synchronization method, mirror image mounting method, equipment and medium

    CN120448358A

  • Software updating method of semiconductor device, semiconductor device and storage medium

    CN122018952A