Application gray level shunting method and computer program product

By requesting and routing configuration information to process business requests when the application starts, the problem of high server computing pressure during the transition between old and new versions is solved, achieving resource saving and a smooth transition.

CN121349513APending Publication Date: 2026-01-16SHENZHEN DACHENG COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511423919.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

During application version updates, existing technologies struggle to achieve a smooth transition between old and new versions, resulting in high server computing pressure and wasted resources.

Method used

When the application starts, it requests traffic splitting configuration information from the server and processes business requests based on this information, reducing the canary calculation for each business request and lowering the computing pressure on the server.

Benefits of technology

By requesting traffic splitting configuration information when the application starts, the computational pressure on the server is reduced, computing resources are saved, and a smooth transition between old and new versions is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121349513A_ABST
    Figure CN121349513A_ABST
Patent Text Reader

Abstract

The invention provides a gray level shunting method of an application and a computer program product, and belongs to the technical field of computers. The method comprises the steps that when an application in a terminal is started, a first shunting request is sent to a server, the application is used for providing multiple services of different versions, and the first shunting request is used for requesting to distribute services for the terminal; first shunting configuration information sent by the server is received, the first shunting configuration information is used for representing service information of a first service allocated to the terminal, and the first service is a service of a target version; and when the application has a service request, processing the service request through the first service based on the first shunting configuration information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an application of a grayscale splitting method and a computer program product. Background Technology

[0002] To ensure a smooth transition between the new and old versions of an application, a phased rollout will be implemented, allowing some users to continue using the old version while others switch to the new version. If users do not object to the new version, the number of users using the new version will be gradually increased until all users have migrated to the new version. Summary of the Invention

[0003] This application provides an application-specific grayscale splitting method and computer program product. The technical solution is as follows:

[0004] On the one hand, a grayscale splitting method for an application is provided, the method comprising:

[0005] When an application starts on the terminal, it sends a first traffic allocation request to the server. The application is used to provide multiple services of different versions. The first traffic allocation request is used to request the allocation of services to the terminal.

[0006] The terminal receives first traffic splitting configuration information sent by the server. The first traffic splitting configuration information is used to characterize the service information of the first service allocated to the terminal. The first service is the target version of the service.

[0007] When the application has a business request, the business request is processed through the first service based on the first traffic splitting configuration information.

[0008] On the other hand, a grayscale splitting method is provided, the method comprising:

[0009] The receiving terminal receives a first traffic splitting request, which is triggered when the application on the terminal starts. The application is used to provide multiple services of different versions, and the first traffic splitting request is used to request the allocation of services to the terminal.

[0010] Based on the first traffic splitting request, first traffic splitting configuration information is allocated to the terminal. The first traffic splitting configuration information is used to characterize the service information of the first service allocated to the terminal. The first service is the target version of the service.

[0011] The first traffic splitting configuration information is sent to the terminal, so that when the application has a business request, the terminal processes the application's business request through the first service based on the first traffic splitting configuration information.

[0012] On the other hand, a grayscale splitter is provided, the device comprising:

[0013] The first sending module is used to send a first traffic allocation request to the server when an application in the terminal starts. The application is used to provide multiple services of different versions. The first traffic allocation request is used to request the allocation of services to the terminal.

[0014] The first receiving module is configured to receive first traffic splitting configuration information sent by the server. The first traffic splitting configuration information is used to characterize the service information of the first service allocated to the terminal. The first service is a target version of the service.

[0015] The processing module is used to process the business request through the first service based on the first traffic splitting configuration information when the application has a business request.

[0016] On the other hand, a grayscale splitter is provided, the device comprising:

[0017] The fourth receiving module is used to receive a first traffic splitting request from the terminal. The first traffic splitting request is triggered when the application on the terminal starts. The application is used to provide multiple services of different versions. The first traffic splitting request is used to request the allocation of services to the terminal.

[0018] The allocation module is used to allocate first traffic allocation configuration information to the terminal based on the first traffic allocation request. The first traffic allocation configuration information is used to characterize the service information of the first service allocated to the terminal. The first service is a target version of the service.

[0019] The third sending module is used to send the first traffic splitting configuration information to the terminal, so that when the application has a service request, the terminal processes the application's service request through the first service based on the first traffic splitting configuration information.

[0020] On the other hand, a terminal is provided, the terminal including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to implement the grayscale splitting method of the application described above.

[0021] On the other hand, a server is provided, the server including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to implement the grayscale splitting method of the application described above.

[0022] On the other hand, a computer-readable storage medium is provided, wherein at least one piece of program code is stored in the storage medium, the at least one piece of program code being loaded and executed by a processor to implement the grayscale splitting method of the application described above.

[0023] On the other hand, a computer program product is provided, which stores at least one piece of program code for execution by a processor to implement the grayscale splitting method of the application described above.

[0024] In this embodiment, when the application in the terminal starts, it requests the server to allocate the first traffic splitting configuration information. In this way, when the application has a business request, it directly requests the corresponding first service to process the business request based on the first traffic splitting configuration information. It is not necessary to perform canary calculation for each business request. Instead, the application requests the first traffic splitting configuration information from the server once when it starts, which reduces the computing pressure on the server and saves the server's computing resources. Attached Figure Description

[0025] Figure 1 A schematic diagram illustrating the implementation environment of the grayscale splitting method of the application shown in an exemplary embodiment of this application is provided.

[0026] Figure 2 A flowchart illustrating a grayscale splitting method for an application shown in an exemplary embodiment of this application is provided.

[0027] Figure 3 A flowchart illustrating a grayscale splitting method for an application shown in another exemplary embodiment of this application is presented;

[0028] Figure 4 A flowchart illustrating a grayscale splitting method for an application shown in another exemplary embodiment of this application is presented;

[0029] Figure 5 A framework diagram of a grayscale splitting method for an application illustrated in another exemplary embodiment of this application is shown;

[0030] Figure 6 A flowchart illustrating a grayscale splitting method for an application shown in another exemplary embodiment of this application is presented;

[0031] Figure 7 A schematic diagram of a proportional scheduling interface for an application, as illustrated in another exemplary embodiment of this application, is shown.

[0032] Figure 8 A schematic diagram of a user scheduling interface for an application, as illustrated in another exemplary embodiment of this application, is shown.

[0033] Figure 9A schematic diagram of an application version scheduling interface of an application, as illustrated in another exemplary embodiment of this application, is shown.

[0034] Figure 10 A schematic diagram of a regional scheduling interface for an application illustrated in another exemplary embodiment of this application is shown;

[0035] Figure 11 A flowchart illustrating a grayscale splitting method for an application shown in another exemplary embodiment of this application is presented;

[0036] Figure 12 A schematic diagram illustrating the configuration of gateway instructions for an application, as shown in another exemplary embodiment of this application, is illustrated.

[0037] Figure 13 A flowchart illustrating a grayscale splitting method for an application shown in another exemplary embodiment of this application is presented;

[0038] Figure 14 A block diagram of a grayscale splitter device illustrated in another exemplary embodiment of this application is shown;

[0039] Figure 15 A block diagram of a grayscale splitter device illustrated in another exemplary embodiment of this application is shown;

[0040] Figure 16 A block diagram of a terminal illustrated in an exemplary embodiment of this application is shown;

[0041] Figure 17 A block diagram of a server illustrated in an exemplary embodiment of this application is shown. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0043] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0044] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0045] Please refer to Figure 1 This diagram illustrates an implementation environment for a grayscale splitting method of an application shown in an exemplary embodiment of this application. (Reference) Figure 1 The implementation environment includes multiple terminals 101 and servers 102. Terminals 101 have applications installed and running, providing different versions of various services to support the business operations of terminals 101. Different services correspond to different business operations. These services include new and old versions; the new version can be referred to as the gray-scale environment service, while the old version can be referred to as the production environment service. The main responsibilities of the production environment service include providing stable services, processing business logic, and ensuring performance. Providing stable services means providing stable services to the terminals; processing business logic means handling the terminals' business requests; and ensuring performance means ensuring the stability and performance of the services. The main responsibilities of the gray-scale environment service include new feature testing, issue collection, issue discovery, and rapid iteration; new feature testing means providing new version features for users (also known as gray-scale users) to test; issue collection means collecting user data and feedback; issue discovery means promptly identifying issues in the new version; and rapid iteration means supporting rapid fixes and updates. Furthermore, the new version of the service can be provided by servers 102 in the gray-scale service cluster, and the old version of the service can be provided by servers 102 in the production service cluster.

[0046] To ensure a smooth transition between the new and old versions of the service, some terminals 101 will continue to use the old version, while others will use the new version. The application can be any application installed on the terminal 101; for example, it can be a video application, a browser application, a shopping application, a social application, etc. The service can be a specific function within that application.

[0047] Terminal 101 can be a device such as a mobile phone, tablet computer, in-vehicle terminal, multimedia playback device, wearable device, VR (Virtual Reality) device, AR (Augmented Reality) device, MR (Mixed Reality) device, etc. Terminal 101 is connected to server 102 via a wireless network or wired network; server 102 can be the backend server of the application.

[0048] Please refer to Figure 2 The diagram illustrates a flowchart of a grayscale splitting method for an application shown in an exemplary embodiment of this application. (Reference) Figure 2 The method includes:

[0049] Step 201: When the application in the terminal starts, the terminal sends the first routing request to the server, and the application is used to provide multiple services of different versions.

[0050] The first traffic redirection request is used to request service allocation for the terminal, and the first traffic redirection request carries traffic redirection request parameters, which include at least one of the following: terminal identifier, application version identifier, terminal system version identifier, terminal Internet Protocol IP address, terminal historical behavior data, and terminal geographical location information. The traffic redirection request parameters may also include the terminal model.

[0051] Step 202: The terminal receives the first traffic splitting configuration information sent by the server. The first traffic splitting configuration information is used to characterize the service information of the first service allocated to the terminal.

[0052] The first service is the target version of the service; and the service information of the first service includes the domain name of the first service. The server receives the first traffic splitting request sent by the terminal, determines the first traffic splitting configuration information based on the traffic splitting request parameters carried in the first traffic splitting request and the traffic splitting strategy, and sends the first traffic splitting configuration information to the terminal. After receiving the first traffic splitting configuration information, the terminal stores the first traffic splitting configuration information.

[0053] Step 203: When the application has a business request, the application's business request is processed through the first service based on the first traffic splitting configuration information.

[0054] In this embodiment, when the application in the terminal starts, it requests the server to allocate the first traffic splitting configuration information. In this way, when the application has a business request, it directly requests the corresponding first service to process the business request based on the first traffic splitting configuration information. It is not necessary to perform canary calculation for each business request. Instead, the application requests the first traffic splitting configuration information from the server once when it starts, which reduces the computing pressure on the server and saves the server's computing resources.

[0055] Please refer to Figure 3 The diagram illustrates a flowchart of a grayscale splitting method for an application shown in an exemplary embodiment of this application. (Reference) Figure 3 The method includes:

[0056] Step 301: The server receives the first traffic splitting request from the terminal. The first traffic splitting request is triggered when the terminal's application starts. The application is used to provide multiple services of different versions. The first traffic splitting request is used to request traffic splitting services for the terminal.

[0057] The first traffic redirection request carries traffic redirection request parameters, which include at least one of the following: terminal identifier, application version identifier, terminal system version identifier, terminal Internet Protocol (IP) address, historical behavior data of the terminal, and geographical location information of the terminal. Traffic redirection request parameters may also include the terminal model.

[0058] Step 302: Based on the first traffic splitting request, the server allocates first traffic splitting configuration information to the terminal. The first traffic splitting configuration information is used to represent the service information of the first service allocated to the terminal.

[0059] The first service is the target version of the service; and the service information of the first service includes the domain name of the first service. Based on the first traffic redirection request, the server determines the first traffic redirection configuration information, thereby reducing the difficulty of development and maintenance without requiring large-scale modifications to the existing server system. Furthermore, since the implementation of this process does not involve complex algorithms, this application does not involve the development and maintenance of complex algorithms.

[0060] Step 303: The server sends the first traffic splitting configuration information to the terminal, so that when the application has a business request, the terminal processes the application's business request through the first service based on the first traffic splitting configuration information.

[0061] In this embodiment, when the application in the terminal starts, it requests the server to allocate the first traffic splitting configuration information. In this way, when the application has a business request, it directly requests the corresponding first service to process the business request based on the first traffic splitting configuration information. It is not necessary to perform canary calculation for each business request. Instead, the application requests the first traffic splitting configuration information from the server once when it starts, which reduces the computing pressure on the server and saves the server's computing resources.

[0062] Please refer to Figure 4 The diagram illustrates a flowchart of a grayscale splitting method for an application shown in an exemplary embodiment of this application. (Reference) Figure 4 The method includes:

[0063] Step 401: When the application in the terminal starts, the terminal sends the first routing request to the server, and the application is used to provide multiple services of different versions.

[0064] This application can be any application installed on the terminal, and it must be able to perform at least one service function of the terminal; for example, please refer to... Figure 5The application includes a business layer 501, which comprises multiple services: service A5011, service B5012, and service C5013. Different services implement the functions of different services; for example, multiple versions of service A are used to implement the functions of service A5011, multiple versions of service B are used to implement the functions of service B5012, and multiple versions of service C are used to implement the functions of service C5013.

[0065] Application startup on a terminal falls into two categories. The first is user-triggered application startup. In this case, the terminal immediately sends an initial traffic redirection request to the server upon application startup. The second case involves the server periodically waking up applications on the terminal to update their configuration information. Since the server may wake up a large number of applications on terminals at once, sending initial traffic redirection requests simultaneously from each terminal could put significant pressure on the server. In this case, the terminal does not immediately send an initial traffic redirection request upon application startup; instead, it delays sending the request.

[0066] For example, please continue to refer to Figure 5 The application includes a grayscale management layer 502, which includes a scheduling configuration request 5021 and a request frequency control service 5022. The scheduling configuration request 5021 is used to configure the first diversion request, and the request frequency control service 5022 is used to delay sending the first diversion request to the server, thereby effectively utilizing the server's service resources.

[0067] Please continue to refer to this. Figure 5 The server includes a gateway 503, through which the terminal sends a first traffic splitting request to the server; and the server includes a scheduling service 504, which is used to perform gray-scale traffic splitting; therefore, the terminal sends the first traffic splitting request to the scheduling service 504 through the gateway 503.

[0068] Step 402: The server receives the first traffic splitting request from the terminal, and based on the number of the first traffic splitting requests, allocates first traffic splitting configuration information to the terminal. The first traffic splitting configuration information is used to represent the service information of the first service allocated to the terminal.

[0069] The first service is the target version of the service; and the service information of the first service includes the domain name of the first service. The traffic splitting request parameters include at least one of the following: terminal identifier, application version identifier, terminal system version identifier, terminal Internet Protocol (IP) address, terminal historical behavior data, and terminal geographic location information. The traffic splitting request parameters may also include the terminal model.

[0070] Please continue to refer to this. Figure 5 and Figure 6The terminal includes a scheduling management backend 505, which stores traffic splitting policies. After receiving the first traffic splitting request, the scheduling service 504 retrieves the traffic splitting policy from the scheduling management backend 505, and then allocates the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters and the traffic splitting policy. The traffic splitting policy includes at least one of proportional scheduling 5051, regional scheduling 5052, application version scheduling 5053, device scheduling 5054, and system version scheduling. The traffic splitting policy also includes usage frequency scheduling, device type scheduling, etc.

[0071] In one possible implementation, the traffic splitting request parameters include a terminal identifier, and the server determines the first traffic splitting configuration information through a proportional scheduling method. Accordingly, the step of the server allocating the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters and through a traffic splitting strategy can be as follows: the server determines the hash value of the terminal based on the terminal identifier and hash factor, and allocates the first traffic splitting configuration information to the terminal based on the hash value and a grayscale ratio threshold.

[0072] If the hash value is less than the grayscale ratio threshold, the server allocates first traffic splitting configuration information to the terminal. The first traffic splitting configuration information represents the target version of the first service, which is the first version. If the hash value is greater than or equal to the grayscale ratio threshold, the server allocates first traffic splitting configuration information to the terminal. The first traffic splitting configuration information represents the target version of the first service, which is the second version. The first version is later than the second version.

[0073] The first version can be the latest version, and the second version can be the most recent version. If the target version of the first service is the first version, it means that the first service is a new version service, that is, the first service is a gray-scale environment service; if the target version of the first service is the second version, it means that the first service is an old version service, that is, the first service is a production environment service.

[0074] The hash factor is a key parameter in hash operations; for example, it can be the timestamp of the first request to be split or any pre-set string. For examples, please refer to [link / reference]. Figure 6 The server determines the hash value of the terminal based on the terminal identifier and hash factor using the following formula:

[0075] Formula 1: Hash value = HASH(terminal identifier + hash factor) % 100

[0076] The first traffic splitting configuration information includes the domain name of the first service; if the hash value is less than the grayscale ratio threshold, the scheduling service returns the domain name of the grayscale environment service to the terminal; if the hash value is greater than or equal to the grayscale ratio threshold, the scheduling service returns the domain name of the production environment service to the terminal. For example, please refer to [link / reference]. Figure 5The server includes a service layer 508, which includes at least one service cluster corresponding to a business. For example, the server includes a formal environment service cluster 5081 for business A and a gray-scale environment service cluster 5082 for business A. The formal environment service cluster 5081 for business A includes multiple formal environment services for processing business A, and the gray-scale environment service cluster 5082 for business A includes multiple gray-scale environment services for processing business A. Then, when business A at the terminal sends a first traffic splitting request to the server and the hash value is less than the gray-scale ratio threshold, the scheduling service returns the domain name of the gray-scale environment service in the gray-scale environment service cluster 5082 for business A to the terminal. When business A at the terminal sends a first traffic splitting request to the server and the hash value is greater than or equal to the gray-scale ratio threshold, the scheduling service returns the domain name of the gray-scale environment service in the formal environment service cluster 5081 for business A to the terminal.

[0077] Before this step, the server can be configured with a grayscale ratio threshold; the process can be as follows: Please refer to... Figure 7 The server displays a proportional scheduling interface, which includes an application selection box, a scheduling type selection box, a domain name (i.e., target domain name) input box for the grayscale environment service, and a grayscale ratio threshold selection box. The interface also includes a submit button. The application selection box is used by the user to select an application; the scheduling type selection box is used by the user to select a scheduling type (which can be a domain name); the target domain name input box is used by the user to enter the target domain name; and the grayscale ratio threshold selection box is used by the user to select the grayscale ratio threshold. The grayscale ratio threshold selection box includes an increase option (+) and a decrease option (-). The user can increase the grayscale ratio threshold by increasing the selection and decrease it by decreasing it. After the user has entered or selected the above information, they can click the submit option to trigger the server to retrieve the entered or selected information. Correspondingly, in response to the submit button being triggered, the server retrieves the application from the application selection box, the scheduling type (domain name) selected from the scheduling type selection box, the domain name of the grayscale environment service from the target domain name input box, and the grayscale ratio threshold from the grayscale ratio threshold selection box.

[0078] Since the grayscale environment service cluster includes multiple grayscale environment services, the proportional scheduling interface can include multiple scheduling type selection boxes, multiple domain name (i.e., target domain name) input boxes for grayscale environment services, and multiple grayscale ratio threshold selection boxes. The scheduling type selected by the multiple scheduling type selection boxes is a domain name, and the domain names of the multiple grayscale environment services are different. The grayscale ratio thresholds selected by the multiple grayscale ratio threshold selection boxes can be the same or different. For example, the grayscale ratio threshold selected by the first grayscale ratio threshold selection box is 15%, and the grayscale ratio threshold selected by the second grayscale ratio threshold selection box is 3%.

[0079] The proportional scheduling interface can also configure the domain name (i.e., the original domain name), hash factor, protocol type, port number, and timeout period for the production environment service. The protocol type refers to the protocol type used for information exchange between the terminal and the server. This protocol type can be Hypertext Transfer Protocol Secure (HTTPS). The port number can be the port number used for information exchange between the terminal and the server. The timeout period refers to the timeout period for terminal retransmission. Correspondingly, the proportional scheduling interface also includes an original domain name input box, a hash factor input box, a protocol type selection box, a port selection box, and a timeout input box. The original domain name input box is used by the user to enter the original domain name; the hash factor input box is used by the user to enter the hash factor; the protocol type selection box is used by the user to select the protocol type; the port selection box is used by the user to select the port number; and the timeout input box is used by the user to enter the timeout period. After the user enters or selects the above information, the user can click the submit option to trigger the server to obtain the entered or selected information. In response to the submission option being triggered, the server also obtains the domain name of the production environment service entered in the original domain name input box, the hash factor in the hash factor input box, the protocol type in the protocol type selection box, the port number in the port selection box, and the timeout period in the timeout input box.

[0080] In this embodiment, a unique traffic splitting calculation and control is adopted. The scheduling service uses the calculation method of HASH(device identifier + hash factor)%100 to determine the hash landing point. Based on the hash landing point and the gray scale ratio threshold, the traffic is evenly distributed. At the same time, the scheduling service supports changing the hash factor to adjust the user group for gray scale testing. This allows a portion of users to access the gray scale environment service within a certain period of time according to the gray scale ratio threshold, until the operation and maintenance personnel manually adjust the hash to switch the gray scale user group (the user group accessing the gray scale environment service).

[0081] In another possible implementation, the traffic splitting request parameters include a terminal identifier, and the server determines the first traffic splitting configuration information based on the device scheduling method; correspondingly, the step of the server allocating the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters and the traffic splitting strategy can be: the server obtains the first traffic splitting configuration information that matches the terminal identifier.

[0082] If the terminal identifier is in the terminal list, the server allocates first traffic splitting configuration information to the terminal, and the first traffic splitting configuration information represents the target version of the first service as the first version; if the terminal identifier is not in the terminal list, the server allocates first traffic splitting configuration information to the terminal, and the first traffic splitting configuration information represents the target version of the first service as the second version, where the first version is later than the second version.

[0083] Before this step, the server can be configured with a terminal list; the procedure can be as follows: Please refer to... Figure 8 The server displays the user scheduling configuration interface, which includes an application selection box, a scheduling type selection box, a domain name (i.e., target domain name) input box for the gray-scale environment service, a type selection box, and a terminal list input box. The user scheduling configuration interface also includes a submit button. In response to the submit button being triggered, the server retrieves the application from the application selection box, the scheduling type (domain name) selected from the scheduling type selection box, the domain name of the gray-scale environment service from the target domain name input box, the terminal list selected from the type selection box, and the terminal identifier from the terminal list input box.

[0084] The user scheduling configuration interface also allows configuring the domain name (i.e., the original domain name), protocol type, port number, and timeout for the production environment service. Correspondingly, the user scheduling configuration interface also includes an original domain name input box, a protocol type selection box, a port selection box, and a timeout input box; the server retrieves the domain name of the production environment service entered in the original domain name input box, the protocol type selected in the protocol type selection box, the port number selected in the port selection box, and the timeout time entered in the timeout input box.

[0085] In this embodiment, the server performs gray-scale scheduling based on the terminal identifier of the specified device, enabling the use of internal testing scenarios.

[0086] In another possible implementation, the traffic splitting request parameters include an application version identifier, and the server determines the first traffic splitting configuration information based on the application version scheduling method; correspondingly, the step of the server allocating the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters and the traffic splitting strategy can be: the server obtains the first traffic splitting configuration information that matches the application version identifier.

[0087] If the application version identifier is in the first version list, the server allocates first traffic splitting configuration information to the terminal. The first traffic splitting configuration information represents the target version of the first service, which is the first version. If the application version identifier is not in the first version list, the server allocates first traffic splitting configuration information to the terminal. The first traffic splitting configuration information represents the target version of the first service, which is the second version. The first version is later than the second version. The first version list is used to store the application version identifiers for allocating the latest version of the service. The oldest version of the service can be a production environment service; the latest version of the service can be a gray-scale environment service.

[0088] Before this step, the server can be configured with a first-version list; the process can be as follows: Please refer to... Figure 9The server displays a version scheduling configuration interface, which includes an application selection box, a scheduling type selection box, a domain name (i.e., target domain name) input box for the gray-scale environment service, and a version input box. The version scheduling configuration interface also includes a submit button. In response to the submit button being triggered, the server obtains the application from the application selection box, the scheduling type (domain name) selected from the scheduling type selection box, the domain name of the gray-scale environment service from the target domain name input box, and the application version identifier from the version input box, and combines the application version identifiers from the version input box into a first version list.

[0089] The version scheduling configuration interface also allows you to configure the domain name (i.e., the original domain name), protocol type, port number, and timeout period for the production environment service. Correspondingly, the version scheduling configuration interface also includes an original domain name input box, a protocol type selection box, a port selection box, and a timeout period input box; the server retrieves the domain name of the production environment service entered in the original domain name input box, the protocol type selected in the protocol type selection box, the port number selected in the port selection box, and the timeout period entered in the timeout period input box.

[0090] In another possible implementation, the traffic splitting request parameters include a system version identifier, and the server determines the first traffic splitting configuration information based on the system version scheduling method; correspondingly, the step of the server allocating the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters and the traffic splitting strategy can be: the server obtains the first traffic splitting configuration information that matches the system version identifier.

[0091] If the system version identifier is in the second version list, the server allocates first traffic splitting configuration information to the terminal. The first traffic splitting configuration information represents the target version of the first service, which is the first version. If the system version identifier is not in the second version list, the server allocates first traffic splitting configuration information to the terminal. The first traffic splitting configuration information represents the target version of the first service, which is the second version. The first version is later than the second version. The second version list is used to store the system version identifier of the service that is allocated the latest version.

[0092] In another possible implementation, the traffic splitting request parameters include the terminal's IP address, and the server determines the first traffic splitting configuration information based on the regional scheduling method; correspondingly, the step of the server allocating the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters and the traffic splitting strategy can be: the server determines the first region to which the IP address belongs and obtains the first traffic splitting configuration information that matches the first region.

[0093] When the first region is in the first region list, the server allocates first traffic allocation configuration information to the terminal. The first traffic allocation configuration information represents the target version of the first service, which is the first version. When the first region is not in the first region list, the server allocates first traffic allocation configuration information to the terminal. The first traffic allocation configuration information represents the target version of the first service, which is the second version. The first version is later than the second version. The first region list is used to store region information for allocating the latest version of the service.

[0094] Before this step, the server can be configured with a first region list; the process can be as follows: Please refer to... Figure 10 The server displays a regional scheduling configuration interface, which includes an application selection box, a scheduling type selection box, a domain name (i.e., target domain name) input box for the gray-scale environment service, and a regional selection box. The regional selection box has a region selection box and a province selection box. The region selection box is used to select North China, Southwest China, East China, Northeast China, Central China, South China, Northwest China, or all; the province selection box is used to select the province. The regional scheduling configuration interface also includes a submit button. In response to the submit button being triggered, the server retrieves the application from the application selection box, the scheduling type (domain name) selected from the scheduling type selection box, the domain name of the gray-scale environment service from the target domain name input box, and the region from the regional selection box, and combines these regions into a first regional list.

[0095] The regional scheduling configuration interface also allows configuring the domain name (i.e., the original domain name), protocol type, port number, and timeout period for the production environment service. Correspondingly, the regional scheduling configuration interface also includes an original domain name input box, a protocol type selection box, a port selection box, and a timeout period input box; the server retrieves the domain name of the production environment service entered in the original domain name input box, the protocol type selected in the protocol type selection box, the port number selected in the port selection box, and the timeout period entered in the timeout period input box.

[0096] In this embodiment of the application, the IP address of the terminal can be mapped to the corresponding province or region, supporting regional scheduling based on province and region.

[0097] In another possible implementation, the traffic splitting request parameters include historical behavior data, and the server determines the first traffic splitting configuration information based on the application's usage frequency. Accordingly, the steps for the server to allocate the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters and the traffic splitting strategy can be as follows: the server determines the application's usage frequency based on historical behavior data and obtains the first traffic splitting configuration information that matches the usage frequency.

[0098] When the usage frequency is higher than the frequency threshold, the server allocates first traffic allocation configuration information to the terminal. The first traffic allocation configuration information represents the target version of the first service, which is the first version. When the usage frequency is lower than or equal to the frequency threshold, the server allocates first traffic allocation configuration information to the terminal. The first traffic allocation configuration information represents the target version of the first service, which is the second version. The first version is later than the second version. The first region list is used to store region information for allocating the latest version of the service.

[0099] In this application embodiment, for users who frequently use the application, they are given priority to experience the latest version of the application's functions, that is, they are given priority to gray-scale testing.

[0100] In another possible implementation, the traffic splitting request parameters include historical behavior data, and the server determines the first traffic splitting configuration information based on the regional scheduling method; correspondingly, the step of the server allocating the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters and the traffic splitting strategy can be: the server determines the second region to which the geographical location information belongs, and obtains the first traffic splitting configuration information that matches the second region.

[0101] If the second region is in the second region list, the server allocates first traffic allocation configuration information to the terminal. The first traffic allocation configuration information represents the target version of the first service, which is the first version. If the second region is not in the second region list, the server allocates first traffic allocation configuration information to the terminal. The first traffic allocation configuration information represents the target version of the first service, which is the second version. The first version is later than the second version. The second region list is used to store region information for allocating the latest version of the service.

[0102] When the traffic splitting request parameters include multiple parameters such as the terminal identifier, application version identifier, system version identifier, IP address, historical behavior data, and geographical location information, the server can determine the first traffic splitting configuration information based on multiple methods mentioned above. If the first traffic splitting configuration information determined by multiple methods is the same, the server does not need to perform any additional processing. If the first traffic splitting configuration information determined by multiple methods is different, for ease of description, the first traffic splitting configuration information determined by multiple methods is called candidate traffic splitting configuration information. The final first traffic splitting configuration information sent to the terminal is determined from multiple candidate traffic splitting configuration information.

[0103] The steps for the server to determine the first traffic distribution configuration information to be sent to the terminal from multiple candidate traffic distribution configuration information can be as follows: The server determines the candidate traffic distribution configuration information with the highest priority from the multiple candidate traffic distribution configuration information to obtain the first traffic distribution configuration information to be sent to the terminal. For example, the multiple candidate traffic distribution configuration information are traffic distribution configuration information determined based on terminal identifier scheduling method and application version scheduling method, respectively. Since the priority of the candidate traffic distribution configuration information determined based on application version scheduling method is higher than that determined based on terminal identifier scheduling method, the candidate traffic distribution configuration information determined based on application version scheduling method is determined as the first traffic distribution configuration information to be sent to the terminal. Or,

[0104] The server divides the identical candidate traffic splitting configuration information among multiple candidate traffic splitting configuration information into the same group, obtaining multiple groups of candidate traffic splitting configuration information. From the multiple groups of candidate traffic splitting configuration information, the server determines the target group traffic splitting configuration information with the most information and determines the traffic splitting configuration information in the target group traffic splitting configuration information as the first traffic splitting configuration information to be finally sent to the terminal.

[0105] In another possible implementation, the traffic splitting request parameter also includes the terminal model, and the server determines the first traffic splitting configuration information based on the model scheduling method; the step of the server allocating the first traffic splitting configuration information to the terminal based on the traffic splitting request parameter and the traffic splitting strategy can be: the server obtains the first traffic splitting configuration information that matches the model;

[0106] If the terminal's model is in the model list, the server allocates first traffic allocation configuration information to the terminal. The first traffic allocation configuration information represents the target version of the first service, which is the first version. If the terminal's model is not in the model list, the server allocates first traffic allocation configuration information to the terminal. The first traffic allocation configuration information represents the target version of the first service, which is the second version. The first version is later than the second version. The model list is used to store the terminal identifiers for allocating the latest version of the service.

[0107] In this embodiment, the first traffic splitting request sent to the server upon application startup carries multi-dimensional information such as terminal identifier, application version identifier, device model, and system version identifier, enabling the server to implement a more precise traffic splitting strategy based on this multi-dimensional information. Furthermore, the traffic splitting strategy of this application does not require complex infrastructure modifications, thus achieving lightweight canary rollout. It also supports reconfiguration of the traffic splitting strategy, allowing for dynamic adjustments to the user base.

[0108] Step 403: The server sends the first traffic splitting configuration information to the terminal.

[0109] The server sends the first traffic splitting configuration information to the terminal through the gateway.

[0110] In one possible implementation, this solution can be combined with A / B testing; among gray users (users testing a new version of the service), different functional interfaces or business logics are displayed for different user groups; correspondingly, the process can be as follows: when the first version is the latest version, the server sets the first service of the first version to include a first functional interface and a second functional interface, sends the first functional interface of the first service to the terminal, and sends the second functional interface of the first service to another terminal.

[0111] Furthermore, the server can collect behavioral data and feedback information from the first functional interface and the second functional interface, optimize the first functional interface based on the behavioral data and feedback information from the first functional interface, and optimize the second functional interface based on the behavioral data and feedback information from the second functional interface; or, determine the target functional interface based on the behavioral data and feedback information from the first functional interface and the second functional interface, wherein the target functional interface is the functional interface with better feedback.

[0112] In this embodiment of the application, by collecting user behavior data and feedback, the effects of different solutions are compared, providing stronger data support for product optimization.

[0113] Step 404: The terminal receives the first traffic splitting configuration information sent by the server. The first traffic splitting configuration information is used to characterize the service information of the first service allocated to the terminal.

[0114] Please continue to refer to this. Figure 5 The terminal also includes a gateway instruction interception service 506; the terminal receives the first traffic splitting configuration information sent by the server through the gateway instruction interception service 506; and the grayscale management layer 502 includes a scheduling configuration cache service 5025; the terminal stores the first traffic splitting configuration information through the scheduling configuration cache service 5025.

[0115] Step 405: When an application has a business request, the terminal processes the application's business request through the first service based on the first traffic splitting configuration information.

[0116] The first traffic routing configuration information includes the domain name of the first service; therefore, when an application has a business request, the terminal sends the business request to the first service based on the domain name of the first service, requesting the first service to process the business request. For example, please refer to [link / reference]. Figure 5 The grayscale management layer 502 also includes a scheduling management service 5023. The terminal sends a business request to the first service based on the domain name of the first service through the scheduling management service 5023, in order to request the first service to process the business request.

[0117] Within the current process lifecycle of the application, when a business request arises, the terminal's business request is processed through the first service based on the first traffic routing configuration information. For example, please refer to [link / reference]. Figure 5 The grayscale management layer 502 also includes the consistency management service 5024. The consistency management service 5024 is used to control the application to access a fixed first service during its current lifecycle, thereby avoiding inconsistent user experience caused by accessing different services before and after, or avoiding abnormal business logic caused by accessing different services before and after, thus achieving consistency guarantee.

[0118] For example, please continue to refer to Figure 6 The application caches the first traffic routing configuration information and accesses the fixed first service within the current process lifecycle of the application.

[0119] The server obtains system performance metrics and terminal feedback information when a terminal accesses the first service. These system performance metrics can be at least one of server load and interface response time. Based on these metrics, the server adjusts the traffic distribution strategy. For example, the server adjusts the grayscale ratio threshold based on these metrics; for instance, if the server load is too high, the grayscale ratio threshold is reduced to decrease the number of grayscale users, thereby ensuring stable system operation.

[0120] Step 406: When a disaster recovery rollback event for the first service is detected, the server determines that the first service has failed and sends a disaster recovery instruction to the terminal.

[0121] The disaster recovery command instructs the terminal to send a second traffic redirection request to the server, which requests a reassignment of services to the terminal. Furthermore, the disaster recovery command also allows the terminal to clear its stored first traffic redirection configuration information. In one possible implementation, the disaster recovery command carries a target effectiveness identifier, indicating that the disaster recovery command takes effect immediately. In another possible implementation, the disaster recovery command does not carry a target effectiveness identifier.

[0122] For example, please continue to refer to Figure 5 The server includes a gateway command management backend 507, which includes a traffic scheduling immediate-effective service 5071. This service sends disaster recovery commands to the terminal, carrying a target effectiveness identifier. The terminal also includes a Hyper Text Markup Language (HTML) 5 container 509, which can load the web version of the first service. The grayscale management layer 502 includes a disaster recovery response service 5026, which responds to disaster recovery commands. If the disaster recovery command does not carry a target effectiveness identifier, it can be responded to through other scenario services 5072.

[0123] For example, please refer to Figure 11 The operations and maintenance personnel trigger a disaster recovery rollback event to the gateway command management backend; the gateway command management backend pushes a gateway command to the gateway, which carries a target effectiveness identifier; the gateway sends a disaster recovery command to the terminal, which also carries the target effectiveness identifier. The disaster recovery command can be a response header message from a business interface or a configuration interface. Whether a gateway command carries a target effectiveness identifier can be indicated by its command version; for example, if the command version is the target version, it means the gateway command carries a target effectiveness identifier; if the command version is not the target version, it means the gateway command does not carry a target effectiveness identifier.

[0124] The server also supports configuring gateway commands, the process of which can be described as follows: Please refer to... Figure 12 The server displays a command configuration interface, which includes a command input box, a command version input box, and an application selection box. The command configuration interface also includes a confirmation button. In response to the confirmation button being triggered, the server retrieves the gateway command from the command input box, the command version from the command version input box, and the application from the application input box. In addition, the command configuration interface also includes a description of the gateway command.

[0125] In this embodiment, the server has disaster recovery capability. When a problem occurs in the first service (the gray version of the service), the disaster recovery instruction carries a target effective identifier, which enables the terminal to immediately update the traffic distribution configuration information, breaks conventional restrictions, achieves rapid rollback, ensures the normal operation of the business, and reduces the impact on users caused by problems in the gray version of the service.

[0126] Step 407: Upon receiving the disaster recovery instruction from the server, send a second traffic diversion request to the server. The disaster recovery instruction is triggered when the first service fails.

[0127] Upon receiving a disaster recovery command from the server, the terminal clears the stored first traffic splitting configuration information and sends a second traffic splitting request to the server. If the terminal receives a disaster recovery command from the server that includes a target activation identifier, it clears the stored first traffic splitting configuration information and sends a second traffic splitting request to the server. If the terminal receives a disaster recovery command from the server but does not include a target activation identifier, it may clear the stored first traffic splitting configuration information and send a second traffic splitting request to the server at other times. These other times could be during idle periods, etc.

[0128] Step 408: The server receives the second traffic splitting request and, based on the traffic splitting request, sends the second traffic splitting configuration information to the terminal. The second traffic splitting configuration information is used to characterize the service information of the second service allocated to the terminal. The version of the second service is different from the target version of the first service.

[0129] The second traffic splitting configuration information includes the domain name of the second service, and may also include the target activation identifier.

[0130] Step 409: The terminal receives the second traffic splitting configuration information and processes the application's business requests through the second service based on the second traffic splitting configuration information.

[0131] For example, please continue to refer to Figure 11 After receiving the second traffic splitting configuration information, the terminal stores the second traffic splitting configuration information to update the local cache; when the application has a business request, it processes the application's business request through the second service based on the second traffic splitting configuration information.

[0132] For example, please refer to Figure 13 When an application starts on a terminal, it requests the server to configure traffic splitting (a first traffic splitting request, carrying traffic splitting request parameters); it receives the server's traffic splitting response, which carries the first traffic splitting configuration information, and caches this information; then, it accesses the first service based on the first traffic splitting configuration information, continuing to use the cached first traffic splitting configuration to access the first service within the application's current process lifecycle; upon receiving a gateway instruction, it clears the cached first traffic splitting configuration information, re-acquires the second traffic splitting configuration information, stores the second traffic splitting configuration information to update the configuration, and accesses the second service based on the second traffic splitting configuration information; when the application's current lifecycle ends, the terminal clears the cached second traffic splitting configuration information. Specifically, the application's current lifecycle ends when it exits. In this embodiment, lightweight and efficient canary traffic splitting can be achieved, thus ensuring both consistent user experience and good disaster recovery capabilities.

[0133] Please refer to Figure 14 This application illustrates a grayscale splitting device according to an exemplary embodiment of the present application. The device includes:

[0134] The first sending module 1401 is used to send a first traffic allocation request to the server when an application in the terminal starts. The application is used to provide multiple services of different versions. The first traffic allocation request is used to request the allocation of services to the terminal.

[0135] The first receiving module 1402 is used to receive first traffic splitting configuration information sent by the server. The first traffic splitting configuration information is used to characterize the service information of the first service allocated to the terminal. The first service is the target version of the service.

[0136] The processing module 1403 is used to process the business request through the first service based on the first traffic splitting configuration information when the application has a business request.

[0137] In one possible implementation, the processing module 1403 is configured to process the terminal's service request through the first service based on the first traffic splitting configuration information when the application has a service request during the application's process lifecycle.

[0138] In another possible implementation, the first traffic splitting request carries traffic splitting request parameters, enabling the server to allocate the first traffic splitting configuration information to the terminal based on the traffic splitting request parameters. The traffic splitting request parameters include at least one of the following: the terminal identifier of the terminal, the application version identifier of the application, the system version identifier of the terminal, the Internet Protocol IP address of the terminal, the historical behavior data of the terminal, and the geographical location information of the terminal.

[0139] In another possible implementation, the device further includes:

[0140] The second sending module is used to send a second traffic diversion request to the server when it receives a disaster recovery instruction sent by the server. The disaster recovery instruction is triggered when the first service fails. The second traffic diversion request is used to request the reallocation of services to the terminal.

[0141] The third receiving module is used to receive the second traffic splitting configuration information sent by the server. The second traffic splitting configuration information is used to characterize the service information of the second service allocated to the terminal. The version of the second service is different from the target version of the first service.

[0142] The processing module 1403 is further configured to process the application's business requests through the second service based on the second traffic splitting configuration information.

[0143] In another possible implementation, the second sending module is configured to send a second traffic diversion request to the server upon receiving a disaster recovery instruction sent by the server, wherein the disaster recovery instruction carries a target effectiveness identifier, and the target effectiveness identifier is used to indicate that the disaster recovery instruction takes effect immediately.

[0144] In this embodiment, when the application in the terminal starts, it requests the server to allocate the first traffic splitting configuration information. In this way, when the application has a business request, it directly requests the corresponding first service to process the business request based on the first traffic splitting configuration information. It is not necessary to perform canary calculation for each business request. Instead, the application requests the first traffic splitting configuration information from the server once when it starts, which reduces the computing pressure on the server and saves the server's computing resources.

[0145] It should be noted that the grayscale splitting device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal can be divided into different functional modules to complete all or part of the functions described above. In addition, the grayscale splitting device provided in the above embodiments and the applied grayscale splitting method embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0146] Please refer to Figure 15 This application illustrates a grayscale splitting device according to an exemplary embodiment of the present application. The device includes:

[0147] The fourth receiving module 1501 is used to receive a first traffic splitting request from the terminal. The first traffic splitting request is triggered when the application on the terminal starts. The application is used to provide multiple services of different versions. The first traffic splitting request is used to request the allocation of services to the terminal.

[0148] The allocation module 1502 is used to allocate first traffic allocation configuration information to the terminal based on the first traffic allocation request. The first traffic allocation configuration information is used to characterize the service information of the first service allocated to the terminal. The first service is a target version of the service.

[0149] The third sending module 1503 is used to send the first traffic splitting configuration information to the terminal, so that when the application has a service request, the terminal processes the application's service request through the first service based on the first traffic splitting configuration information.

[0150] In one possible implementation, the first traffic splitting request carries traffic splitting request parameters, which include at least one of the following: terminal identifier of the terminal, application version identifier of the application, system version identifier of the terminal, Internet Protocol IP address of the terminal, historical behavior data of the terminal, and geographical location information of the terminal.

[0151] The allocation module 1502 is used to determine the hash value corresponding to the terminal based on the terminal identifier and hash factor, and allocate the first traffic splitting configuration information to the terminal based on the hash value and grayscale ratio threshold; or, to obtain the first traffic splitting configuration information that matches the terminal identifier.

[0152] The allocation module 1502 is used to obtain the first traffic splitting configuration information that matches the application version identifier;

[0153] The allocation module 1502 is used to obtain the first traffic splitting configuration information that matches the system version identifier;

[0154] The allocation module 1502 is used to determine the first region to which the IP address belongs and to obtain the first traffic splitting configuration information that matches the first region;

[0155] The allocation module 1502 is used to determine the usage frequency of the application based on the historical behavior data, and obtain the first traffic splitting configuration information that matches the usage frequency.

[0156] The allocation module 1502 is used to determine the second region to which the geographical location information belongs, and to obtain the first diversion configuration information that matches the second region.

[0157] In another possible implementation, the allocation module 1502 is configured to allocate the first traffic splitting configuration information to the terminal when the hash value is less than the grayscale ratio threshold, wherein the target version of the first service represented by the first traffic splitting configuration information is a first version; and to allocate the first traffic splitting configuration information to the terminal when the hash value is greater than or equal to the grayscale ratio threshold, wherein the target version of the first service represented by the first traffic splitting configuration information is a second version, wherein the first version is later than the second version.

[0158] In another possible implementation, the device further includes:

[0159] The fourth sending module is used to determine that the first service has failed when a disaster recovery rollback event for the first service is detected, and to send a disaster recovery instruction to the terminal. The disaster recovery instruction is used to instruct the terminal to send a second diversion request to the server. The second diversion request is used to request the reallocation of services for the terminal.

[0160] The fifth sending module is used to receive the second diversion request and, based on the diversion request, send second diversion configuration information to the terminal. The second diversion configuration information is used to characterize the service information of the second service allocated to the terminal. The version of the second service is different from the target version of the first service, so that the application's business request is processed through the second service based on the second diversion configuration information.

[0161] In this embodiment, when the application in the terminal starts, it requests the server to allocate the first traffic splitting configuration information. In this way, when the application has a business request, it directly requests the corresponding first service to process the business request based on the first traffic splitting configuration information. It is not necessary to perform canary calculation for each business request. Instead, the application requests the first traffic splitting configuration information from the server once when it starts, which reduces the computing pressure on the server and saves the server's computing resources.

[0162] It should be noted that the grayscale splitting device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the server can be divided into different functional modules to complete all or part of the functions described above. In addition, the grayscale splitting device provided in the above embodiments and the grayscale splitting method embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0163] Please refer to Figure 16 The diagram illustrates a block diagram of a terminal 1600 according to an exemplary embodiment of this application. The terminal 1600 in this application may include one or more of the following components: a processor 1611, a memory 1620, and a display screen 1630.

[0164] The processor 1611 connects various parts within the terminal 1600 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1620, and by calling data stored in the memory 1620. Optionally, the processor 1611 can be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1611 can integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), Neural-network Processing Unit (NPU), and modem. Specifically, the CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required to be displayed on the display screen 1630; the NPU is used to implement Artificial Intelligence (AI) functions; and the modem is used for wireless communication. It is understandable that the aforementioned modem may also not be integrated into the processor 1611, but may be implemented separately through a computer program product.

[0165] The memory 1620 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 1620 may include a non-transitory computer-readable storage medium. The memory 1620 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 1620 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described below, etc.; the data storage area may store data created based on the use of the terminal 1600 (such as audio data, phone book, etc.).

[0166] Display screen 1630 is a display component used to display a user interface. Optionally, display screen 1630 is a touch-enabled display screen, through which users can use their fingers, styluses, or any suitable object to perform touch operations on display screen 1630.

[0167] The display screen 1630 is typically located on the front panel of the terminal 1600. The display screen 1630 can be designed as a full-screen, curved screen, irregularly shaped screen, dual-sided screen, or foldable screen. The display screen 1630 can also be designed as a combination of a full-screen and a curved screen, or a combination of an irregularly shaped screen and a curved screen, etc., but this embodiment does not limit it in this way.

[0168] In addition, those skilled in the art will understand that the structure of the terminal 1600 shown in the above figures does not constitute a limitation on the terminal 1600. The terminal 1600 may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the terminal 1600 also includes a Wireless Fidelity (WiFi) module, an audio acquisition device, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a Bluetooth module, a power supply, and other components, which will not be described in detail here.

[0169] Please refer to Figure 17 , Figure 17 A structural block diagram of a cloud server 1700 provided in an exemplary embodiment of this application is shown. The cloud server 1700 includes a central processing unit (CPU) 1701 and a memory 1702. The memory 1702 stores at least one line of program code, which is loaded and executed by the processor 1701 to implement the grayscale splitting method of the application provided in the various method embodiments described above. Of course, the cloud server 1700 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input / output. The cloud server 1700 may also include other components for implementing device functions, which will not be elaborated here.

[0170] Those skilled in the art will understand that Figure 17 The structure shown does not constitute a limitation on the cloud server 1700 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0171] This application also provides a computer-readable medium storing at least one piece of program code, which is loaded and executed by a processor to implement the grayscale splitting method of the application shown in the above embodiments.

[0172] This application also provides a computer program product that stores at least one piece of program code, which is loaded and executed by a processor to implement the grayscale splitting method of the application shown in the above embodiments.

[0173] In some embodiments, the computer program product involved in the present application can be deployed and executed on a server, or on multiple servers located in one location, or on multiple servers distributed in multiple locations and interconnected through a communication network. Multiple servers distributed in multiple locations and interconnected through a communication network can form a blockchain system.

[0174] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0175] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for gray scale splitting of an application, characterized by, The method comprises: When an application in a terminal starts, a first offloading request is sent to a server, the application is used to provide multiple services of different versions, and the first offloading request is used to request allocation of services for the terminal; First offloading configuration information sent by the server is received, the first offloading configuration information is used to represent service information of a first service allocated for the terminal, and the first service is a service of a target version; When the application has a service request, the service request is processed through the first service based on the first offloading configuration information.

2. The method of claim 1, wherein, The processing of the service request through the first service based on the first offloading configuration information when the application has the service request comprises: In the process life cycle of the application, when the application has a service request, the service request of the terminal is processed through the first service based on the first offloading configuration information.

3. The method of claim 1, wherein, The first offloading request carries offloading request parameters, so that the server allocates the first offloading configuration information for the terminal based on the offloading request parameters, and the offloading request parameters comprise at least one of a terminal identifier of the terminal, an application version identifier of the application, a system version identifier of the terminal, an Internet protocol (IP) address of the terminal, historical behavior data of the terminal, and geographic location information of the terminal.

4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: In the case of receiving a disaster recovery instruction sent by the server, a second offloading request is sent to the server, the disaster recovery instruction is triggered when the first service fails, and the second offloading request is used to request re-allocation of services for the terminal; Second offloading configuration information sent by the server is received, the second offloading configuration information is used to represent service information of a second service allocated for the terminal, and the version of the second service is different from the target version of the first service; The service request of the application is processed through the second service based on the second offloading configuration information.

5. The method of claim 4, wherein, The sending of the second offloading request to the server in the case of receiving the disaster recovery instruction sent by the server comprises: In the case of receiving the disaster recovery instruction sent by the server and the disaster recovery instruction carrying a target validity identifier, the second offloading request is sent to the server, and the target validity identifier is used to indicate that the disaster recovery instruction takes effect immediately.

6. A method for gray scale splitting of an application, characterized by, The method comprises: A first offloading request of a terminal is received, the first offloading request is triggered when an application of the terminal starts, the application is used to provide multiple services of different versions, and the first offloading request is used to request allocation of services for the terminal; First offloading configuration information is allocated for the terminal based on the first offloading request, the first offloading configuration information is used to represent service information of a first service allocated for the terminal, and the first service is a service of a target version; The first offloading configuration information is sent to the terminal, so that the terminal processes a service request of the application through the first service based on the first offloading configuration information when the application has the service request.

7. The method of claim 6, wherein, The first offloading request carries offloading request parameters, and the offloading request parameters include at least one of a terminal identifier of the terminal, an application version identifier of the application, a system version identifier of the terminal, an Internet Protocol (IP) address of the terminal, historical behavior data of the terminal, and geographical location information of the terminal. The first offloading configuration information allocated to the terminal based on the first offloading request includes at least one of the following: Based on the terminal identifier and a hash factor, a hash value corresponding to the terminal is determined, and based on the hash value and a gray scale proportion threshold, the first offloading configuration information is allocated to the terminal; or the first offloading configuration information matching the terminal identifier is obtained. The first offloading configuration information matching the application version identifier is obtained. The first offloading configuration information matching the system version identifier is obtained. A first region to which the IP address belongs is determined, and the first offloading configuration information matching the first region is obtained. Based on the historical behavior data, a use frequency of the application is determined, and the first offloading configuration information matching the use frequency is obtained. A second region to which the geographical location information belongs is determined, and the first offloading configuration information matching the second region is obtained.

8. The method of claim 7, wherein, The first offloading configuration information allocated to the terminal based on the hash value and the gray scale proportion threshold includes: In a case where the hash value is less than the gray scale proportion threshold, the first offloading configuration information is allocated to the terminal, and a target version of the first service represented by the first offloading configuration information is a first version; In a case where the hash value is greater than or equal to the gray scale proportion threshold, the first offloading configuration information is allocated to the terminal, and a target version of the first service represented by the first offloading configuration information is a second version, and the first version is later than the second version.

9. The method according to any one of claims 6-8, characterized in that, The method further includes: When a disaster recovery rollback event of the first service is detected, it is determined that the first service fails, and a disaster recovery instruction is sent to the terminal, the disaster recovery instruction being used to instruct the terminal to send a second offloading request to the server, the second offloading request being used to request to allocate a second service to the terminal; The second offloading request is received, and based on the offloading request, second offloading configuration information is sent to the terminal, the second offloading configuration information being used to represent service information of the second service allocated to the terminal, a version of the second service being different from a target version of the first service, so that the application business request is processed through the second service based on the second offloading configuration information.

10. A computer program product, characterised in that, The computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the gray scale offloading method of the application in any one of claims 1 to 9.