Application program service upgrading method and device, equipment and storage medium
By obtaining the tag information of application services, identifying and upgrading target services, we can achieve non-stop service releases, solve the problems of high resource costs and operational risks in existing technologies, and ensure the stability of the application and user experience.
Patent Information
- Application Number
- CN202410350320.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2025-09-26
AI Technical Summary
The existing application service upgrade method results in a doubling of resource costs and poses unknown risks, affecting the normal operation of applications, especially when resources are tight and time zones vary among global users.
By obtaining the service tag information of the application, the target service to be upgraded is determined, and it is upgraded to the second version while other services are operating normally. This method of non-stop service release is adopted to avoid additional resource requests.
It reduces service resource costs, ensures continuous and stable operation of applications, reduces the impact on user experience, and improves system availability and stability.
Smart Images

Figure CN120704701A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for upgrading a service of an application program. Background Art
[0002] As applications continue to iterate and update, optimization operations such as introducing new features, improving performance, fixing vulnerabilities, or adjusting interfaces will be required for the old version (first version). Therefore, it is necessary to upgrade the services of the old version of the application to ensure the normal operation of the functions of the new version (second version).
[0003] In related technologies, a service expansion method is usually used to complete the service upgrade of an application. The method may include three stages: expansion, traffic migration, and reduction. In the expansion stage, based on the number of services of the first version in the current environment, apply for equivalent service resources to deploy the second version of the service. For example, in the current environment, the number of services of the first version may be 4 services, then it is necessary to reapply for another 4 service resources to deploy the second version of the service; in the traffic migration stage, the service traffic of the first version is migrated to the service of the second version, and the number of services of the first version and the number of services of the second version are always the same; in the reduction stage, when all the service traffic of the first version is migrated to the service of the second version, the service of the first version can be offline, and at this time, the environment only contains the service of the second version.
[0004] On the one hand, the above method doubles the cost of service resources required during the service upgrade process. For example, if there are four services to be upgraded, the upgrade process will involve eight service resources. When service resources are in short supply, service upgrades are difficult to implement. On the other hand, when the service scale is large and the service complexity is excessive, the above expansion and contraction operations will generate other unknown risks and affect the normal operation of the application. Summary of the Invention
[0005] The present invention provides a method, apparatus, device, and storage medium for upgrading the service of an application. The technical solutions provided by the present invention are as follows:
[0006] According to one aspect of an embodiment of the present application, a service upgrade method for an application is provided, the method comprising:
[0007] Obtaining tag information for each of N services of an application, wherein the N services are used to provide various functions of the application, each function is provided by one or more of the N services, and the tag information of the service is used to indicate at least one attribute of the service, where N is an integer greater than 1;
[0008] Determining, according to the respective tag information of the N services, at least one target service to be upgraded among the N services, where the target service is in a first version;
[0009] While maintaining that other services among the N services except the target service normally provide corresponding functions, the at least one target service is upgraded from the first version to the second version.
[0010] According to one aspect of an embodiment of the present application, a service upgrade device for an application is provided, the device comprising:
[0011] A first acquisition module is configured to acquire tag information of each of N services of an application, wherein the N services are configured to provide various functions of the application, each function being provided by one or more of the N services, and the tag information of the service is configured to indicate at least one attribute of the service, where N is an integer greater than 1;
[0012] a determination module, configured to determine at least one target service to be upgraded among the N services based on respective tag information of the N services, wherein the target service is in a first version;
[0013] An upgrading module is used to upgrade the at least one target service from the first version to the second version while maintaining that other services among the N services except the target service normally provide corresponding functions.
[0014] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the service upgrade method of the above-mentioned application.
[0015] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the service upgrade method of the above-mentioned application.
[0016] According to one aspect of an embodiment of the present application, a computer program product is provided, the computer program product including a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned application service upgrade method.
[0017] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0018] By obtaining the tag information of multiple services in the application, the target service to be upgraded is determined based on the tag information and then upgraded. This method, on the one hand, does not require the introduction of new service resources, which reduces the cost of service resources compared to related service expansion methods. On the other hand, during the service upgrade process, it ensures the normal operation of other services besides the target service, achieving non-stop service releases and ensuring the continuous and stable operation of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a flowchart of a service upgrade method for an application provided by an embodiment of the present application;
[0020] Figure 2 This is a schematic diagram of a method for implementing service upgrade based on capacity expansion provided by an embodiment of the present application;
[0021] Figure 3 This is a schematic diagram of a method for implementing a service upgrade in multiple batches, provided by an embodiment of the present application;
[0022] Figure 4 is a flowchart of a service upgrade method for an application provided by another embodiment of the present application;
[0023] Figure 5 This is a block diagram of a service upgrade device for an application provided by one embodiment of the present application;
[0024] Figure 6 This is a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0026] In the application service upgrade method provided in the embodiments of the present application, the execution subject of each step may be a computer device, which may be any electronic device with computing and storage capabilities, such as a PC (Personal Computer), a mobile phone, a tablet computer, a server, or other electronic device.
[0027] The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc. For example, the embodiments of the present application can be applied to the scenario of cloud-native deployment architecture in the field of cloud technology. According to the cloud-native deployment architecture and the concept of microservices, the application can be functionally decomposed, and each function of the application is supported by at least one independent service, and each service runs independently in its own container. When a new version of the application needs to be released, only the relevant services can be upgraded without affecting the operation of other services. This service decoupling design makes the release process of the new version of the application more flexible and secure. At the same time, during the release of the new version of the application, it may be necessary to maintain the old version of the service and the new version of the service at the same time. The cloud-native deployment architecture can better manage the coexistence of versions.
[0028] Please refer to Figure 1 , which shows a flow chart of a service upgrade method for an application provided by an embodiment of the present application. The execution subject of each step of the method may be a computer device, for example, the computer device may be a PC. The method may include at least one of the following steps (110-130):
[0029] Step 110, obtain the tag information of each of the N services of the application, wherein the N services are used to provide various functions of the application, each function is provided by one or more of the N services, and the tag information of the service is used to indicate at least one attribute of the service, and N is an integer greater than 1.
[0030] In some embodiments, the application may be a game, social media, e-commerce, or other application, which is not limited in this application. The application may include multiple functions, each of which is provided by at least one service.
[0031] In some embodiments, the application runs on the user's terminal device, which includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, a smart home appliance, a car terminal, an aircraft, etc.
[0032] A service refers to an independent program module that provides data processing, algorithm implementation and other support for specific functions of an application to ensure the normal operation of each function of the application. Each function of an application is implemented by at least one independent program module. In this method, one function is performed by multiple services, each of which runs independently. Multiple services can interact with each other through a lightweight communication mechanism, which is conducive to improving the fault tolerance and scalability of the system. For example, for a game application, the game application may include game matching, real-time battle, ranking statistics and other functions. The services of the application may include game matching services, real-time battle services, ranking statistics services and other services. The game matching function can be supported by the game matching service.
[0033] In some embodiments, services can be divided according to the functional modules of the application. For example, a game application may include a real-time battle function and a game matching function. The real-time battle function can be divided into an independent service, which is responsible for handling the data processing and algorithm implementation of the real-time battle function module. The game matching function can be divided into an independent service, which is responsible for handling the data processing and algorithm implementation of the game matching function module. Considering the performance and scalability requirements of the service, it may be necessary to further subdivide or merge the service modules to achieve better performance and scalability. This application does not limit the service division method of the application.
[0034] In some embodiments, considering that there are a large number of clients and they are widely distributed, N services have the same service. For example, Q of the N services provide function A, and Y of the N services provide function B, where function A and function B are different functions, and Q and Y are positive integers and are less than N.
[0035] In some embodiments, the N services may be distributed across multiple servers. For example, the Q services may be distributed across different servers, which may be distributed discretely, such as across different regions, to enhance system fault tolerance.
[0036] In some embodiments, when N services are deployed on multiple servers, load balancing becomes crucial. Multiple requests from clients can be distributed to different services to ensure that the loads on each server are relatively balanced. Load balancing strategies may include round-robin, minimum number of connections, and performance-based strategies, which are not limited in this application. In some embodiments, N services can be labeled separately based on the different attributes of the services. For example, as shown in Table 1 below:
[0037] Table 1
[0038]
[0039] The columns in the table represent different services, and the rows represent the multiple tags associated with each service. Service1_1, Service1_2, Service2_1, Service2_2, Service3_1, Service3_2, Service4_1, and Service4_2 are different services. Service1_1 and Service1_2 provide the same function, such as Function1; Service2_1 and Service2_2 provide the same function, such as Function2; Service3_1 and Service3_2 provide the same function, such as Function3; and Service4_1 and Service4_2 provide the same function, such as Function4. Function1, Function2, Function3, and Function4 are different functions. For the specific meanings of the multiple tags, please refer to the relevant descriptions below.
[0040] In some embodiments, the tag information is also used to indicate the specific operation content of the service during the upgrade process.
[0041] Service upgrades must consider service availability and data consistency, so the upgrade process involves a series of specific operations. As shown in Table 1, these specific operations may include at least one of: restart, hot update, shared memory cleanup, and communication channel refresh. Restart refers to whether the service needs to be restarted before or after the upgrade. As shown in Table 1, 0 indicates that the service does not need to be restarted, while 1 indicates that it needs to be restarted. Hot update refers to whether the service code or configuration is updated without interrupting the service. As shown in Table 1, 0 indicates that the service is not being hot updated, while 1 indicates that it is being hot updated. Shared memory cleanup refers to whether the shared memory data generated during the service upgrade is cleared. As shown in Table 1, 0 indicates that the service restarts without clearing shared memory, while 1 indicates that the service will clean shared memory. Communication channel refresh refers to whether the service refreshes the communication channel between the service and other services before and / or after the upgrade to maintain data synchronization and smooth communication. As shown in Table 1, 0 indicates that the service does not refresh the communication channel, while 1 indicates that the service will refresh the communication channel. As for the specific operation content, as long as it is the operation involved in the service upgrade process, it can be included, and this application does not limit it.
[0042] The above method can obtain the specific operation content of the service during the upgrade process through tag information, thereby facilitating subsequent service upgrade work.
[0043] In related technologies, application service upgrade methods include service-stopping and service-unstopping release methods. The service-stopping release method involves stopping the currently running application, upgrading the service, and then restarting the service and application after the upgrade is complete. The service-unstopping release method maintains the normal operation of the application while upgrading the service.
[0044] Regarding the service suspension release method, since the service is in a suspended state for a period of time during the upgrade process, it will affect the normal operation of the application and thus reduce the user experience. Especially for applications with the same server globally, due to the time zone differences between different regions of the world, most time periods may correspond to the peak online client time in a certain region, and it is not possible to choose a low online peak (such as the early morning) for service suspension release. Therefore, when a region is at the peak time for user online, service suspension release will cause the application to be suspended and unusable, which will seriously affect the user experience in the region and even cause user loss.
[0045] Methods for upgrading services without service interruption, such as Figure 2 As shown, please refer to the description in the above background technology. The service upgrade method adopted in the relevant technology will cause the cost to double, and when the application is aimed at overseas markets, the service upgrade will be affected due to the shortage of server resources in some overseas regions and the difficulty in coordination.
[0046] The technical solution provided by this application, on the one hand, uses a non-stop service release method to ensure the continued stable operation of the application during the service upgrade process; on the other hand, during the service upgrade process, there is no need to apply for additional service resources, achieving the goal of reducing costs and increasing efficiency. Figure 3 , which shows a schematic diagram of a method for implementing a service upgrade in multiple batches provided by an embodiment of the present application. The service upgrade process may include the following steps:
[0047] (1) Upgrade some of the first version of the service to the second version. At this time, the environment contains the first version of the client, the first version of the service, and the second version of the service, but does not contain the second version of the client. The first version of the client can be supported by the first version of the service.
[0048] (2) The test user upgrades some of the first version of the client to the second version and provides feedback and fixes any issues with the second version of the application until the second version of the application passes acceptance. At this point, the environment includes the first version of the client, the second version of the client, the first version of the service, and the second version of the service. The first version of the client can be supported by the first version of the service, and the second version of the client can be supported by the second version of the service.
[0049] (3) The update prompt of the second version of the client is released to the network. After receiving the prompt, some users will upgrade the client version. At this time, the second version of the client in the environment continues to increase.
[0050] (4) Monitor the load of the second version of the service in the environment. When the load of the second version of the service is too large, execute the above steps in a loop starting from step (1), gradually expand the service capacity of the second version, and reduce the service capacity of the first version.
[0051] (5) When all the client versions in the environment are upgraded to the second version, the remaining first version services in the environment are upgraded to the second version, thus completing the upgrade of the services and clients.
[0052] In some embodiments, in order to speed up the upgrade process of the above-mentioned services and applications, after step (4), when the system detects that the number of first-version clients contained in the environment is lower than a first threshold, the system can force an update of the first-version clients in the environment at this time. The first threshold can be set by technical personnel based on their experience.
[0053] The above service upgrade method does not require application of additional service resources. Assuming that there are four services that need to be upgraded, only these four service resources need to be involved in the upgrade process, and no additional service resources need to be added.
[0054] In some embodiments, for the above step (4), the specific implementation method may include obtaining the load parameter of the service in the second version, where the load parameter is used to indicate the resource utilization of the service in the second version; if the load parameter is greater than a threshold, then starting from the step of determining at least one target service to be upgraded among the N services based on the respective tag information of the N services.
[0055] Load parameters may include at least one of CPU (Central Processing Unit) utilization, memory utilization, and network bandwidth utilization. The CPU utilization indicates the service's CPU workload. Excessive CPU utilization may lead to performance degradation, prolonged response times, or even service crashes. Therefore, a high CPU utilization indicates that the service is overloaded. Memory utilization indicates the service's utilization of memory resources. Excessive memory utilization may lead to insufficient memory resources, impacting service performance and stability. Therefore, a high memory utilization indicates that the service is overloaded. Network bandwidth utilization indicates the service's utilization of network communication resources. Excessive network bandwidth utilization may cause network congestion, impacting the speed and stability of data transmission. Therefore, a high network bandwidth utilization indicates that the service is overloaded. This application does not limit the specific content of the load parameters. For example, monitoring tools such as Zabbix and Prometheus can be used to obtain parameters such as the service's CPU utilization, memory utilization, and network bandwidth utilization. This monitoring tool can be deployed in a distributed environment and collect performance data on each server, such as CPU usage and memory usage. By configuring appropriate monitoring items and alarm rules, for example, when the CPU usage remains above 80%, the system will be alerted, triggering the next batch of service upgrade tasks to ensure stable system operation. This application does not limit the method for obtaining load parameters.
[0056] The above method, based on real-time monitoring of load parameters, can ensure that the system can promptly increase the number of second-version services when facing heavy load pressure, thereby improving the availability and stability of the system, and also enhancing user experience and service quality.
[0057] In some embodiments, the system may also monitor the response time of the second version of the service, which is used to measure the service's processing speed for user requests, that is, the time from receiving the user request to responding to the user request. When the response time of the service is too long, it may lead to a decline in user experience and affect the availability and performance of the system. Therefore, when the response time is too long, it can be considered that the load of the service is too large, thereby increasing the number of services of the second version. Exemplarily, the response time of the service can be obtained by collecting and analyzing the access log of the second service. This application does not limit the method of obtaining the service response time.
[0058] In some embodiments, the threshold setting of the above-mentioned load parameters can be set according to the response time of the first version of the service and the response time of the second version of the service. For example, when the response time of the first version of the service and the response time of the second version of the service are stable at a smaller value, the value of the load parameter of the second service at this time is used as the threshold. This threshold setting strategy based on user experience helps the system to provide stable and efficient services at any time to ensure a good user experience. The threshold setting of the above-mentioned load parameters needs to take into account the meaning of the specific indication of the load parameters, and at the same time, combine experience to make reasonable settings, which is not limited in this application.
[0059] In some embodiments, the load parameter is also used to determine the number of target services to be upgraded. For example, when the value of the load parameter is greater than the second threshold, 20% of the number of services of the first version contained in the environment is used to determine the number of target services to be upgraded; when the value of the load parameter is greater than the third threshold, 40% of the number of services of the first version contained in the environment is used to determine the number of target services to be upgraded; wherein the second threshold is less than the third threshold to ensure that different levels of upgrade requirements can be distinguished under different load levels. The specific threshold values can be reasonably set based on experience and actual conditions to ensure that the system can be upgraded at the right time to cope with the increased load and user demand.
[0060] The above method adjusts the number of target services to be upgraded based on the load parameter values. This method can better adapt to different load conditions in the environment. When the load is not too high, a smaller number of services can be upgraded. When the load is high, the number of upgraded services can be increased appropriately to ensure system performance and stability.
[0061] In some embodiments, load parameters can also be used in load balancing and resource scheduling to ensure load balance in the system. Based on the load parameters of each service, the system can determine the load situation and performance of each service, so as to understand which services are currently heavily loaded or lightly loaded. Based on changes in load conditions and load parameters, the system can dynamically distribute requests to the most suitable services. When a service is heavily loaded, the system can distribute requests to lighter loaded services to balance the load and improve overall performance. Through effective load balancing and resource scheduling, the system can maximize the use of resources of each service and avoid performance degradation caused by unbalanced service loads, thereby improving the overall resource utilization and performance of the system.
[0062] Step 120 : Determine at least one target service to be upgraded among the N services based on the label information of each of the N services, where the target service is in the first version.
[0063] In the above step (1), before upgrading some of the first version services to the second version, this application determines at least one target service to be upgraded based on the tag information of each of the N services. Figure 4 , which shows a flow chart of a service upgrade method for an application provided by another embodiment of the present application. First, based on the tag information, the target service is determined and the target service is upgraded. The system monitors the load of the second version of the service in real time. When the load of the second version of the service is too large, the service upgrade task is triggered. Then, based on the tag information, the target service of the next round is determined and upgraded. The system will continue to monitor the load of the second version of the service and cyclically upgrade the target service until it detects that the first version of the client does not exist in the environment. The last round of upgrades is performed on the remaining first version services in the current environment. When the first version of the service does not exist in the environment, the service upgrade is completed.
[0064] During service upgrades, we should strive to design version-compatible services. This means that the upgraded second version of the service can provide corresponding functionality to both first- and second-version clients. This helps minimize the impact of service upgrades on clients and ensures system stability and availability.
[0065] For version-compatible services, a version-compatible service among N services can be determined as at least one target service based on the version-compatible label in the tag information of each of the N services, wherein the version-compatible label is used to indicate whether the versions are compatible. A version-compatible service refers to a service that can provide corresponding functions to both the first version client and the second version client.
[0066] A client, also known as a user end, typically refers to an application used by a user. It runs on a terminal device and communicates with the server to obtain data or services. Terminal devices include, but are not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, in-vehicle terminals, and aircraft.
[0067] As shown in Table 1 above, a value of 1 can be used to indicate that the service version is compatible, while a value of 0 can be used to indicate that the service version is incompatible. For example, the version compatibility flag of service 1_1 is 1, indicating that service 1_1 is version compatible. For example, the version compatibility flag of service 2_1 is 0, indicating that service 2_1 is version incompatible. Therefore, service 1_1 can be determined as the target service.
[0068] The above method can quickly identify the target service through the version compatibility tags of N services.
[0069] In some embodiments, after identifying version-compatible services among N services as target services, these target services can be upgraded in batches to avoid the potential system overload caused by upgrading all services simultaneously. During the service upgrade process, while designing version-compatible services offers numerous benefits for user experience and system stability, in practice, designing all services as version-compatible may not be feasible due to technical, business, and resource constraints.
[0070] For version-incompatible services, the version-incompatible services refer to services of the second version after upgrading that can only provide corresponding functions for clients of the second version. The step of determining the target service may include: (1) determining M version-incompatible services among the N services based on the version compatibility labels in the label information of each of the N services, wherein the version compatibility labels are used to indicate whether the versions are compatible, and the version-incompatible services refer to services that cannot provide corresponding functions for clients of the first version and clients of the second version at the same time, and M is a positive integer less than or equal to N; (2) determining K minimum granularity clusters corresponding to the M version-incompatible services based on the minimum granularity cluster numbers in the label information of each of the M version-incompatible services, wherein each minimum granularity cluster contains multiple services, and each service belonging to the same minimum granularity cluster is used to provide the same function, and K is a positive integer; (3) selecting at least one service from each minimum granularity cluster as the target service, and in each minimum granularity cluster, there is at least one service that is not selected as the target service.
[0071] For example, as shown in Table 1 above, there are 8 services in the environment, namely service 1_1, service 1_2, service 2_1, service 2_2, service 3_1, service 3_2, service 4_1, and service 4_2. (1) Based on the version compatibility labels, determine the 4 incompatible services among the 8 services, namely service 2_1, service 2_2, service 3_1, and service 3_2, where the minimum granularity cluster number of service 2_1 and service 2_2 is 2, and the minimum granularity cluster number of service 3_1 and service 3_2 is 3. (2) Based on the minimum granularity cluster numbers of the 4 incompatible services, determine the 2 minimum granularity clusters corresponding to the 4 incompatible services. That is, service 2_1 and service 2_2 belong to minimum granularity cluster 2, and service 3_1 and service 3_2 belong to minimum granularity cluster 3. (3) From each minimum granularity cluster, select at least one service as the target service. For the smallest granularity cluster 2, service 2_1 or service 2_2 may be selected as the target service. For the smallest granularity cluster 3, service 3_1 or service 3_2 may be selected as the target service. This application does not limit this.
[0072] The above method ensures that both the first and second versions of the service exist in the environment for different types of application services. This allows clients of the first version to use the first version of the service, and clients of the second version to use the second version of the service. This ensures the normal operation of both the first and second version clients, allowing for a smooth and gradual transition from the first version to the second version of the service.
[0073] In some embodiments, for each minimum granularity cluster, at least one service to be upgraded first is selected as the target service based on the priority reference information in the label information of each service included in the minimum granularity cluster, wherein the priority reference information is used to determine the upgrade priority of each service included in the minimum granularity cluster.
[0074] The priority reference information may include at least one of a network scoring tag and an upgrade priority value, wherein the network scoring tag is used to indicate the degree of improvement of the service after upgrading to the second version compared to the service in the first version, and the upgrade priority value is used to indicate the upgrade priority of the service.
[0075] In some embodiments, the priority reference information may also include a user demand tag, which is used to indicate that the application function provided by the service is the function expected by the user. For example, 1 may be used to indicate that the application function provided by the service is the function expected by the user. By collecting user feedback and needs, understanding the user's expectations and concerns about application functions, and using user demand tags, prioritizing upgrades of services corresponding to user-desired functions, it is beneficial to improve user satisfaction. This application does not limit the specific content of the priority reference information.
[0076] In some embodiments, the network score of a service can be determined based on internal user usage data and survey feedback during the service upgrade process to reflect users' experience and perception of the service improvement. Services with higher network scores can be prioritized for upgrades. For example, as shown in Table 1 above, service 3_1 and service 3_2 belong to the smallest granularity cluster 3. For smallest granularity cluster 3, based on the network score label, since service 3_2 has a higher network score than service 3_1, service 3_2 can be selected as the target service.
[0077] In some embodiments, the importance of a service in a business process can be evaluated to determine the upgrade priority value of the service. For example, the upgrade priority value of a service can be set by evaluating the importance of the service in supporting key business processes (i.e., the key functions of the application), the contribution of the service to the overall stability and performance of the system, and the criticality of the service in meeting user needs and improving user experience (such as newly added functions in response to user needs), such as setting a larger upgrade priority value for the service corresponding to the key functions of the application. When the upgrade priority value is larger, the service can be upgraded first. For example, as shown in Table 1 above, service 2_1 and service 2_2 belong to the smallest granularity cluster 2. For the smallest granularity cluster 2, based on the upgrade priority value label, since the upgrade priority value of service 2_2 is greater than that of service 2_1, service 2_2 can be selected as the target service.
[0078] The above method selects the target service for priority upgrade based on the priority reference information for each minimum granularity cluster. When the priority reference information is the upgrade priority value, it is beneficial to upgrade the service with a large upgrade priority value first. The large upgrade priority value means that the service has a higher degree of support for the stability, performance or key business processes of the entire system. After the service is upgraded, the stability, availability and security of the system can be better improved, while improving user satisfaction. Moreover, when the priority reference information is the network score, by prioritizing the upgrade of the service with a high network score, the high network score means that the service has a greater degree of improvement after upgrading to the second version compared to the service in the first version. The second version of the service can provide users with a better user experience and attract more users to upgrade the client version, thereby promoting system progress and improving user satisfaction.
[0079] In some embodiments, for each minimum granularity cluster, at least one service is selected as a target service based on a location tag in the tag information of each service included in the minimum granularity cluster, where the location tag is used to indicate the location of a device providing the service.
[0080] The location tag may include at least one of a cloud vendor tag, a country tag, a region tag, and a computer room tag. Among them, the cloud vendor tag is used to indicate the cloud vendor where the device providing the service is located; the country tag is used to indicate the country where the device providing the service is located; the region tag is used to indicate the region where the device providing the service is located; and the computer room tag is used to indicate the computer room where the device providing the service is located. As long as it is a tag used to indicate the location of the service (such as a city tag, used to indicate the city where the device providing the service is located) can be included in the location tag, and this application does not limit this. In some embodiments, based on the location tag, the device location of each service can be obtained, and the system can monitor the location of the second version client. When the number of the second version clients at a certain location is large, the service at that location is upgraded first. For example, assuming that the number of the second version clients at the first location (such as region 1) is greater than the number of the second version clients at the second location (such as region 2), the service at the first location (region 1) is upgraded first. This method, based on the service upgrade optimization method of location tags and the number of clients, the system can more intelligently adjust the service upgrade strategy, reduce the service load pressure in areas with a large number of second version clients, and thus better meet the needs of users in different regions.
[0081] In some embodiments, the target service may be determined from the minimum granularity cluster based on the rule that the locations corresponding to the target services selected from the same minimum granularity cluster are dispersedly distributed.
[0082] When selecting target services, the principle of geographically dispersed distribution is based on risk mitigation. On the one hand, by selecting distributed services as target upgrade targets, the probability of simultaneous failures in closely located services is reduced, improving system availability and fault tolerance. Selecting distributed target services also reduces network latency and performance losses associated with cross-region communication. Furthermore, providing services in different geographic locations allows for closer proximity to users and clients, reducing data transmission time and latency.
[0083] For example, assuming that the discrete location distribution of services' cloud vendors is used as a rule, and that services 2_1, 2_2, 2_3, and 2_4 are version-incompatible services and belong to minimum-granularity cluster 2, the cloud vendors of services 2_1 and 2_2 are cloud vendor A, and the cloud vendors of services 2_3 and 2_4 are cloud vendor B, two services need to be upgraded. Based on the discrete location distribution of target services selected from the same minimum-granularity cluster, one of the services with cloud vendor A and one of the services with cloud vendor B can be selected, such as services 2_1 and 2_3, services 2_1 and 2_4, services 2_2 and 2_3, or services 2_2 and 2_4. This is not limited in this application.
[0084] The above method, by selecting services from different cloud vendors, can achieve decentralized distribution of the second version of the service location, thereby improving the system's fault tolerance and availability. By deploying the second version of the service in different countries, cross-national location dispersion can be achieved, and the service in the first country can provide support for the clients in the first country, which can better meet the needs of different countries, reduce network latency, and improve the user's service response speed and experience. The regional label can indicate the geographical area where the service is located. By deploying the second version of the service in different regions, the service in the first region can provide support for the clients in the first region, which can better meet the needs of different regions, reduce network latency, and improve the user's service response speed and experience. The computer room label indicates the specific computer room where the equipment providing the service is located. By deploying the second version of the service in different computer rooms, the risk of service interruption caused by the failure of a single computer room can be reduced, and the system's fault tolerance and reliability can be improved.
[0085] In summary, using at least one of the cloud vendor tag, country tag, region tag, and data center tag to achieve location-distributed distribution of target services helps increase the system's fault tolerance, availability, and stability, and can better adapt to the needs of clients in different geographical locations.
[0086] In some embodiments, the number of first version clients is obtained, and when the number of first version clients is 0, all remaining first version services in the environment are determined as target services.
[0087] Step 130 : While maintaining that other services except the target service among the N services normally provide corresponding functions, upgrade at least one target service from the first version to the second version.
[0088] This application implements a non-stop release method, ensuring that the upgrade of the target service does not affect other services in the environment, and other services continue to support the normal operation of the application. Under this premise, the entire service upgrade process will not affect client usage.
[0089] In some embodiments, after the target service is determined, an upgrade instruction may be sent to a target server, which is a server device where the target service is located. Upon receiving the upgrade instruction, the target server may automatically upgrade the target service based on the second version of the service-related programs and data uploaded by the system administrator or operation and maintenance engineer.
[0090] In some embodiments, the target service can be upgraded using the SSH (Secure Shell) protocol. Connect to the target service via SSH and execute corresponding commands or scripts on the target service, thereby remotely achieving the upgrade of the target server.
[0091] In some embodiments, the target service may be backed up before upgrading so that it can be restored to a previous reliable version if a failure occurs during the upgrade process. For example, data such as databases and system configurations may be backed up.
[0092] In some embodiments, the number of services in the first version or the number of services in the second version is obtained. When the number of services in the first version is 0 or the number of services in the second version is N, it is determined that N services have completed the upgrade. In some embodiments, the system can introduce a prediction algorithm for the number of clients in the second version. This can detect trends before the number of clients in the second version fluctuates abnormally and perform service upgrades in advance. This can effectively prevent service overload or service shortages and ensure system stability and availability. For example, time series analysis techniques, such as the autoregressive integrated moving average (ARIMA) model or seasonal decomposition method, can be used to predict the number of clients in the second version. This method first requires collecting data on the historical number of clients in the second version. Then, an ARIMA model can be used to fit this historical data. The model can be used to predict the number of clients in the second version over a period of time in the future. Finally, a corresponding service upgrade strategy can be formulated based on the prediction results. In addition to the ARIMA model, machine learning algorithms, such as neural network-based models or ensemble learning methods, can also be considered to predict the number of clients in the second version. These methods can generally more accurately capture the complex characteristics and nonlinear relationships of the data, thereby improving the accuracy and reliability of the prediction.
[0093] The technical solution provided by the embodiment of the present application obtains the tag information of multiple services of the application, determines the target service to be upgraded based on the tag information, and upgrades the target service. On the one hand, this method does not require the introduction of new service resources, which reduces the cost of service resources compared to the service expansion method of related technologies. On the other hand, during the service upgrade process, it can ensure the normal operation of other services except the target service, and realize the non-stop service release to ensure the continuous and stable normal operation of the application.
[0094] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0095] Please refer to Figure 5 , which shows a block diagram of a service upgrade device for an application provided by an embodiment of the present application. The device has the function of implementing the above method example, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the computer device described above, or it can be set in a computer device. Figure 5 As shown, the apparatus 500 may include: a first acquisition module 510 , a determination module 520 and an upgrade module 530 .
[0096] The first acquisition module 510 is used to obtain the tag information of each of N services of the application, wherein the N services are used to provide various functions of the application, each function is provided by one or more of the N services, and the tag information of the service is used to indicate at least one attribute of the service, and N is an integer greater than 1.
[0097] The determination module 520 is configured to determine at least one target service to be upgraded among the N services according to the respective tag information of the N services, where the target service is in the first version.
[0098] The upgrading module 530 is configured to upgrade the at least one target service from the first version to the second version while maintaining that other services among the N services except the target service normally provide corresponding functions.
[0099] In some embodiments, the determination module 520 is used to determine a version-compatible service among the N services as the at least one target service based on a version compatibility tag in the tag information of each of the N services, wherein the version compatibility tag is used to indicate whether the versions are compatible, and the version-compatible service refers to a service that can provide corresponding functions for both the first version client and the second version client.
[0100] In some embodiments, the determining module 520 includes: a first determining unit, a second determining unit, and a selecting unit ( Figure 5 not shown).
[0101] A first determination unit is used to determine M version-incompatible services among the N services based on the version compatibility tag in the tag information of each of the N services, wherein the version compatibility tag is used to indicate whether the versions are compatible, and the version-incompatible service refers to a service that cannot provide corresponding functions for the first version client and the second version client at the same time, and M is a positive integer less than or equal to N.
[0102] The second determination unit is used to determine K minimum granularity clusters corresponding to the M version-incompatible services based on the minimum granularity cluster numbers in the label information of each of the M version-incompatible services, wherein each of the minimum granularity clusters contains multiple services, and the services belonging to the same minimum granularity cluster are used to provide the same function, and K is a positive integer.
[0103] The selection unit is configured to select at least one service from each of the minimum granularity clusters as the target service, and at least one service in each of the minimum granularity clusters is not selected as the target service.
[0104] In some embodiments, the selection unit is used to select at least one service to be upgraded first as the target service for each of the minimum granularity clusters based on the priority reference information in the label information of each service contained in the minimum granularity cluster, wherein the priority reference information is used to determine the upgrade priority of each service contained in the minimum granularity cluster.
[0105] In some embodiments, the priority reference information includes at least one of the following: a network score tag indicating the degree of improvement of the service after upgrading to the second version compared to the service in the first version; an upgrade priority value indicating the upgrade priority of the service.
[0106] In some embodiments, the selection unit is used to select at least one service as the target service for each of the minimum granularity clusters based on the location tag in the label information of each service contained in the minimum granularity cluster, wherein the location tag is used to indicate the location of the device providing the service.
[0107] In some embodiments, the locations corresponding to the target services selected from the same minimum granularity cluster are dispersedly distributed.
[0108] In some embodiments, the location tag includes at least one of the following: a cloud vendor tag, used to indicate the cloud vendor where the device providing the service is located; a country tag, used to indicate the country where the device providing the service is located; a region tag, used to indicate the region where the device providing the service is located; a computer room tag, used to indicate the computer room where the device providing the service is located.
[0109] In some embodiments, the apparatus 500 further includes: a second acquisition module ( Figure 5 not shown).
[0110] The second acquisition module is used to obtain the load parameter of the service in the second version, and the load parameter is used to indicate the resource utilization of the service of the second version; if the load parameter is greater than the threshold, the execution starts from the step of determining at least one target service to be upgraded among the N services based on the respective tag information of the N services, and the target service is in the first version.
[0111] In some embodiments, the tag information is also used to indicate specific operation content of the service during the upgrade process.
[0112] The technical solution provided by the embodiment of the present application obtains the tag information of multiple services of the application, determines the target service to be upgraded based on the tag information, and upgrades the target service. On the one hand, this method does not require the introduction of new service resources, which reduces the cost of service resources compared to the service expansion method of related technologies. On the other hand, during the service upgrade process, it can ensure the normal operation of other services except the target service, and realize the non-stop service release to ensure the continuous and stable normal operation of the application.
[0113] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0114] Please refer to Figure 6 , which shows a structural block diagram of a computer device 600 provided in one embodiment of the present application.
[0115] Typically, the computer device 600 includes a processor 610 and a memory 620 .
[0116] The processor 610 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 610 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 810 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 610 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 610 may also include an AI processor for processing computing operations related to machine learning.
[0117] The memory 620 may include one or more computer-readable storage media, which may be non-transitory. The memory 620 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 620 is used to store a computer program, which is configured to be executed by one or more processors to implement the service upgrade method of the above-mentioned application program.
[0118] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the computer device 600, and the computer device 600 may include more or fewer components than shown in the figure, or combine some components, or adopt a different component arrangement.
[0119] In some embodiments, a computer-readable storage medium is further provided, wherein the storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the service upgrade method of the above-mentioned application program.
[0120] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or an optical disk, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0121] In some embodiments, a computer program product is also provided, which includes a computer program stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the service upgrade method of the above-mentioned application.
[0122] It should be noted that the collection and processing of relevant data in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0123] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.
[0124] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A service upgrade method for an application, characterized in that: The method comprises: Obtaining tag information for each of N services of an application, wherein the N services are used to provide various functions of the application, each function is provided by one or more of the N services, and the tag information of the service is used to indicate at least one attribute of the service, where N is an integer greater than 1; Determining, according to the respective tag information of the N services, at least one target service to be upgraded among the N services, where the target service is in a first version; While maintaining that other services among the N services except the target service normally provide corresponding functions, the at least one target service is upgraded from the first version to the second version.
2. The method according to claim 1, characterized in that The determining, based on the respective tag information of the N services, at least one target service to be upgraded among the N services includes: According to the version compatibility tag in the tag information of each of the N services, a version-compatible service among the N services is determined as the at least one target service, wherein the version compatibility tag is used to indicate whether the versions are compatible, and the version-compatible service refers to a service that can provide corresponding functions for both the first version client and the second version client.
3. The method according to claim 1, characterized in that The determining, based on the respective tag information of the N services, at least one target service to be upgraded among the N services includes: Determining, based on the version compatibility tag in each of the tag information of the N services, M version-incompatible services among the N services, where the version compatibility tag is used to indicate whether the versions are compatible, and the version-incompatible service is a service that cannot provide corresponding functions for both the first version client and the second version client, where M is a positive integer less than or equal to N; Determine, based on the minimum granularity cluster number in the label information of each of the M version-incompatible services, K minimum granularity clusters corresponding to the M version-incompatible services, where each of the minimum granularity clusters includes multiple services, and each service belonging to the same minimum granularity cluster is used to provide the same function, and K is a positive integer; At least one service is selected from each of the minimum granularity clusters as the target service, and at least one service in each of the minimum granularity clusters is not selected as the target service.
4. The method according to claim 3, characterized in that The selecting at least one service as the target service from each of the minimum granularity clusters includes: For each of the minimum granularity clusters, at least one service to be upgraded first is selected as the target service based on the priority reference information in the label information of each service included in the minimum granularity cluster, wherein the priority reference information is used to determine the upgrade priority of each service included in the minimum granularity cluster.
5. The method according to claim 4, characterized in that The priority reference information includes at least one of the following: a network score tag, used to indicate a degree of improvement of the service after upgrading to the second version compared to the service in the first version; The upgrade priority value is used to indicate the upgrade priority of the service.
6. The method according to claim 3, characterized in that The selecting at least one service as the target service from each of the minimum granularity clusters includes: For each of the minimum granularity clusters, at least one service is selected as the target service according to a location tag in the tag information of each service included in the minimum granularity cluster, wherein the location tag is used to indicate the location of a device providing the service.
7. The method according to claim 6, characterized in that The locations corresponding to the target services selected from the same minimum granularity cluster are dispersedly distributed.
8. The method according to claim 6, characterized in that The location tag includes at least one of the following: Cloud vendor tag, used to indicate the cloud vendor where the device providing the service is located; A country tag indicating the country where the equipment providing the service is located; A region tag indicating the region where the device providing the service is located; The equipment room label is used to indicate the equipment room where the equipment providing the service is located.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Acquire a load parameter of the service in the second version, where the load parameter is used to indicate resource utilization of the service in the second version; If the load parameter is greater than the threshold, the step of determining at least one target service to be upgraded among the N services based on the respective tag information of the N services, where the target service is in the first version, is executed.
10. The method according to any one of claims 1 to 8, characterized in that The tag information is also used to indicate the specific operation content of the service during the upgrade process.
11. A service upgrade device for an application, characterized in that: The device comprises: A first acquisition module is configured to acquire tag information of each of N services of an application, wherein the N services are configured to provide various functions of the application, each function being provided by one or more of the N services, and the tag information of the service is configured to indicate at least one attribute of the service, where N is an integer greater than 1; a determination module, configured to determine at least one target service to be upgraded among the N services based on respective tag information of the N services, wherein the target service is in a first version; An upgrading module is used to upgrade the at least one target service from the first version to the second version while maintaining that other services among the N services except the target service normally provide corresponding functions.
12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium. A processor reads and executes the computer program from the computer-readable storage medium to implement the method according to any one of claims 1 to 10.