A grayscale routing method, device, apparatus, medium and product

By modifying the URL path on the server side and using a reverse proxy to route requests, the problem of cross-domain transmission of canary release indicators was solved, thereby improving the stability and resource utilization efficiency of canary releases.

CN119676155BActive Publication Date: 2025-11-04INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411880882.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-11-04
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In existing technologies, grayscale identification suffers from problems caused by cross-domain transmission of cookies, affecting the stability of grayscale deployment and the efficiency of resource utilization.

Method used

By receiving client access requests on the server side, modifying the URL path to add a grayscale indicator, and using a reverse proxy to determine and route requests to the appropriate grayscale or non-grayscale container, the problem of cross-domain cookie transmission is avoided.

Benefits of technology

It enables precise control of request flow at the physical level, avoids the problem of cross-domain transmission of cookies for grayscale indicators, improves resource utilization efficiency, and simplifies the implementation of grayscale on the client side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676155B_ABST
    Figure CN119676155B_ABST
Patent Text Reader

Abstract

The application discloses a gray-scale routing method and device, equipment, medium and product, and relates to the technical field of distribution. The method comprises the following steps: receiving a first access request for a target product in an application program sent by a client; if it is determined that the target product is in a pre-configured gray-scale product list, modifying a request path in a URL corresponding to the first access request to obtain a target request path; sending the target request path to the client, so that the client generates a second access request based on the target request path; receiving the second access request reinitiated by the client, and routing the second access request to a gray-scale container. The technical scheme provided by the application can improve resource utilization efficiency by differentiating the deployment of different versions of the application program at the physical level and accurately controlling the request flow direction, and can also simplify the gray-scale implementation of the client.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of distribution, and particularly relates to a gray release method, device, equipment, medium and product. BACKGROUND

[0002] With the rapid development of Internet technology, the market puts forward higher requirements for the stability of technology systems, and the gray release technology has become an important guarantee for the stability of application systems. In the method for realizing gray release, the existing method is to place the gray release identifier in the Cookie of the Hyper Text Transfer Protocol (Http) request, such as adding the gray release identifier in the Cookie, and the server load balancer judges whether to route the Http request to the gray release container or the non-gray release container according to the gray release identifier in the Cookie.

[0003] However, since the Cookie has cross-domain restrictions, if the page is embedded in the inline frame of other applications, the Cookie will be invalid. Different browsers may have different processing of the Cookie, and some privacy modes or plug-ins may prevent the storage of the Cookie. Therefore, it is urgent to design a gray release method to avoid the problem caused by the cross-domain transmission of the gray release identifier due to the Cookie. SUMMARY

[0004] The present application provides a gray release method, device, equipment, medium and product, which can distinguish different versions of application programs at the physical level, accurately control the request flow direction, avoid the problem caused by the cross-domain transmission of the gray release identifier due to the Cookie, and improve the resource utilization efficiency. The gray release method can also simplify the gray release implementation of the client.

[0005] In a first aspect, the present application provides a gray release method applied to a server side, which comprises the following steps.

[0006] receiving a first access request for a target product in an application program sent by a client;

[0007] if it is determined that the target product is in a pre-configured gray product list, modifying a request path in a URL corresponding to the first access request to obtain a target request path;

[0008] sending the target request path to the client, so that the client generates a second access request based on the target request path;

[0009] receiving the second access request re-initiated by the client, and routing the second access request to a gray release container.

[0010] Further, the method further includes: when receiving a login request for the application sent by the client, performing a login task for the application by using the non-gray container.

[0011] Further, before routing the second access request to the gray container, the method further includes: determining, by the reverse proxy, whether the URL corresponding to the second access request contains the gray identifier; and if the URL contains the gray identifier, routing the second access request to the gray container.

[0012] Further, after receiving the first access request for a target product in an application sent by the client, the method further includes: obtaining an identification code of the target product; determining, based on the identification code, whether the target product is in the gray product list; and if it is determined that the target product is not in the gray product list, routing the first access request to a non-gray container.

[0013] Further, the method further includes: when receiving a login request for the application sent by the client, performing a login task for the application by using the non-gray container.

[0014] Further, the target container is deployed with a front-end framework and a back-end framework.

[0015] In a second aspect, the present application provides a gray routing device integrated in a server, which includes:

[0016] a request receiving module configured to receive a first access request for a target product in an application sent by a client;

[0017] a path modifying module configured to, if it is determined that the target product is in a pre-configured gray product list, modify a request path in a URL corresponding to the first access request to obtain a target request path;

[0018] a path sending module configured to send the target request path to the client, so that the client generates a second access request based on the target request path;

[0019] a request routing module configured to receive the second access request re-initiated by the client, and route the second access request to a gray container.

[0020] In a third aspect, the present application provides an electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the gray-scale routing method according to any of the embodiments of the present application.

[0021] In a fourth aspect, the present application provides a computer readable storage medium, which stores computer instructions for enabling a processor to implement the gray-scale routing method according to any of the embodiments of the present application when the processor executes the computer instructions.

[0022] In a fifth aspect, the present application provides a computer program product comprising a computer program, which implements the gray-scale routing method according to any of the embodiments of the present application when executed by a processor.

[0023] To solve the defects of the prior art in the background art, the embodiments of the present application provide a gray-scale routing method, and the execution of the method can bring the following beneficial effects: the present application configures a gray-scale product list in advance, which lists the product information (such as identification code) currently undergoing gray-scale testing, so that the products participating in the gray-scale testing and the user traffic accessing these products can be accurately controlled. After receiving the first access request, the server checks whether the target product is in the gray-scale product list according to the identification code of the target product. If it is confirmed that the target product is in the gray-scale product list, the request path in the URL corresponding to the first access request needs to be modified to obtain a target request path. The server sends the modified target request path back to the client. After receiving the new target request path, the client initiates a second access request based on it. After receiving the second access request re-initiated by the client, the server guides the request to a gray-scale container specially used for gray-scale testing for processing through an internal routing mechanism. The present application distinguishes different versions of application programs at the physical level and accurately controls the request flow, which can avoid the problems caused by the cross-domain transmission of the Cookie, and can improve the resource utilization efficiency; the present application can also simplify the gray-scale implementation of the client, and access the products for gray-scale testing by automatically refreshing the page and requesting gray-scale and non-gray-scale static resources.

[0024] It should be noted that the above computer instructions can be stored on the computer readable storage medium in whole or in part. The computer readable storage medium can be packaged together with the processor of the gray-scale routing device, or can be packaged separately from the processor of the gray-scale routing device, and the present application does not limit this.

[0025] The description of the second aspect, the third aspect, the fourth aspect, and the fifth aspect in the present application can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second aspect, the third aspect, the fourth aspect, and the fifth aspect can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.

[0026] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description.

[0027] It can be understood that, before using the technical solutions disclosed in the embodiments of the present application, the type, scope of use, and use scenario of the personal information involved in the present application should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0029] Figure 1 The first flowchart of a gray routing method provided by the embodiments of the present application;

[0030] Figure 2 The second flowchart of a gray routing method provided by the embodiments of the present application;

[0031] Figure 3 The structure diagram of a gray routing device provided by the embodiments of the present application;

[0032] Figure 4 The block diagram of an electronic device for implementing a gray routing method according to the embodiments of the present application. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0034] It should be noted that the terms "first", "second", "target", and "original" and the like in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include", "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0035] Figure 1 A first flowchart of a gray-scale routing method provided by an embodiment of the present application, the embodiment can be applied to the scenario of routing an access request to a corresponding processing container according to the request path of the access request when a gray-scale release of an application program is performed. The gray-scale routing method provided by the embodiment can be executed by a gray-scale routing device provided by the embodiment, which can be implemented in software and / or hardware and integrated in an electronic device that executes the method. The method is applied to a server.

[0036] Referring to Figure 1 The method of the embodiment includes but is not limited to the following steps:

[0037] S110, receiving a first access request for a target product in an application program sent by a client.

[0038] The client can be a common browser webpage, a mobile phone application program, etc. The application program can include multiple products, which can be divided into products in a gray-scale test phase (such as the target product in the embodiment) and normal version products. The application program can be a transaction platform for selling products to the market by an enterprise, or a service management platform for serving users by an institution. The application program can be in the form of application software or a mini program. The access request is a request related to a business initiated by a user or a device module in a business system. The business request varies with the business system, and the specific content of the business request corresponding to different business systems will be different.

[0039] In the embodiment of the present application, the user triggers the target product in the application program by clicking the interactive interface of the client. The client generates a first access request for accessing the target product, and the purpose is to obtain or operate resources or functions related to the target product. The client sends the first access request to the server. The server receives the first access request sent by the client.

[0040] S120, if it is determined that the target product is in the pre-configured gray product list, modifying a request path in a uniform resource locator (URL) corresponding to the first access request to obtain a target request path.

[0041] In the embodiments of the present application, in the running environment of an application system, there can be a pre-configured gray product list. The gray product list can list product information (such as product name, number, etc. to uniquely identify the product) that is being tested in gray. When the client sends a first access request to the server for a target product, the server checks whether the target product is in the gray product list. If it is found that the target product is indeed in the gray product list, the server performs a specific modification operation on the request path part in the URL corresponding to the first access request, and the new path obtained after modification is the target request path.

[0042] Specifically, the modification of the request path in the URL corresponding to the first access request to obtain the target request path includes adding a gray identifier to the request path of the first access request to obtain the target request path. The gray identifier is used to represent a target container for processing the access request, and the target container is a gray container or a non-gray container. The gray identifier can be a string of characters, and can also be a binary value or more, for example: / gray.

[0043] For example, the modification of the request path can be to add a gray identifier to distinguish the gray environment, such as adding “ / gray” in front of the original request path. Assuming that the original request path is “ / products / watch” (indicating access to product directory related resources of watch products), the modified path can become “ / gray / products / watch”, and the modified path is the target request path.

[0044] Optionally, the target container is deployed with a pre-set front-end framework (such as Vue.js) and a pre-set back-end framework (such as SpringBoot), and the front-end and back-end applications can be packaged together and deployed as a whole. This is usually achieved by a build tool to package front-end resources and back-end code into one or more executable jar or war files. The advantage of this is that it can simplify the deployment process and reduce problems caused by environment differences, but it may also bring some challenges such as resource competition and environment isolation. Since the page compiled by Vue.js is a static js file, the present application can also simplify the implementation of client-side gray, and access the products under gray test by automatically refreshing the page and requesting gray and non-gray static resources.

[0045] S130, send the target request path to the client, so that the client generates a second access request based on the target request path.

[0046] In the embodiment of the present application, the target request path is obtained by adding the gray identification (such as / gray) in the request path of the first access request, and is redirected to the client, and the client generates a second access request based on the target request path, that is, the client modifies the browser address to the URL with / gray. The difference between the first access request and the second access request in the embodiment is that the URL corresponding to the second access request contains the gray identification.

[0047] S140, receiving the second access request reinitiated by the client, and routing the second access request to the gray container.

[0048] In the embodiment of the present application, the client reinitiates the second access request, and sends the first access request to the server. The server receives the second access request sent by the client, and routes the second access request to the gray container. Subsequently, all other requests under the target product will be forwarded to the gray container by the reverse proxy. The gray container is generally a running environment in which the services related to the corresponding gray version product are deployed.

[0049] Further, before routing the second access request to the gray container, it further includes: judging whether the URL corresponding to the second access request contains the gray identification through the reverse proxy; if yes, routing the second access request to the gray container.

[0050] For example, if the gray identification is / gray, if the URL corresponding to the request of the client contains / gray, such as / gray / app, then the reverse proxy will forward the request to the gray container in which the latest version program is deployed, and let it process; if the URL corresponding to the request does not contain / gray, such as / app, that is, the normal request. The reverse proxy will forward the request to the non-gray container in which the old version program is deployed to process.

[0051] In this way, different user requests are directed to different versions of application programs according to different request paths, the purpose of gray release is achieved, new functions or new versions are gradually tested and used in a controllable range, and then a smooth transition to full update is achieved.

[0052] In an optional embodiment, the gray routing method of the present application further includes: when receiving the login request for the application program sent by the client, using the non-gray container to perform the login task for the application program.

[0053] When a client logs in a browser or an application, the default is to a non-gray container (i.e., the URL path does not contain a gray identifier), and when the page is operated, if the gray switch is triggered (the drop-down list selects the gray product), the front end modifies the URL path, adds / gray, actively refreshes the page (if the URL already contains / gray, it means that it is currently gray, and it does not need to be refreshed), and then the request is automatically forwarded to the gray container by the reverse proxy, and is processed by the gray container. When the gray is switched to non-gray, the reverse processing is performed, that is, the gray identifier in the URL path is deleted, and the page is refreshed.

[0054] The technical scheme provided by the embodiment comprises the following steps: receiving a first access request for a target product in an application program sent by a client; if it is determined that the target product is in a pre-configured gray product list, modifying a request path in a URL corresponding to the first access request to obtain a target request path; sending the target request path to the client, so that the client generates a second access request based on the target request path; and receiving the second access request reinitiated by the client and routing the second access request to a gray container. The application pre-configures a gray product list, which lists product information (such as an identifier code) that is currently being tested in gray, so that the products participating in the gray test and the user traffic accessing the products can be accurately controlled. After receiving the first access request, the server checks whether the target product is in the gray product list according to the identifier code of the target product. If it is confirmed that the target product is in the gray product list, the request path in the URL corresponding to the first access request needs to be modified to obtain the target request path. The server sends the modified target request path back to the client. After receiving the new target request path, the client initiates the second access request again based on it. After receiving the second access request reinitiated by the client, the server guides the request to the gray container for processing through an internal routing mechanism. The application distinguishes different versions of the application program at the physical layer and accurately controls the request flow direction, so that the problem caused by the cross-domain transmission of the gray identifier due to the cookie can be avoided, and the resource utilization efficiency can be improved. The application can also simplify the gray implementation of the client, and access the products tested in gray by automatically refreshing the page and requesting gray and non-gray static resources.

[0055] The gray routing method provided by the embodiment of the application is further described below, Figure 2 The second flowchart of the gray routing method provided by the embodiment of the application is shown in the figure. The embodiment of the application is optimized on the basis of the above-mentioned embodiments, and the complete process of routing the access request is explained in detail.

[0056] Referring to Figure 2 The method of the embodiment comprises but is not limited to the following steps:

[0057] S210, receiving a first access request for a target product in an application sent by a client.

[0058] S220, obtaining an identification code of the target product.

[0059] In an embodiment, if a user initiates an operation request for a product through a client (such as a browser webpage or a mobile application), such as a product detail viewing request, a shopping cart adding request, or the like, the product identification code is often carried in the relevant data of the request. For example, in an HTTP request, the identification code can be included in a URL path parameter or a request body.

[0060] In another embodiment, the database of the system generally stores detailed information of all products, including basic attributes of the products and corresponding identification codes, and the like. If the identification code of the target product is to be obtained, the database table can be queried according to other known relevant information (such as a product name, a category, and the like). In some application scenarios, the identification codes and relevant important information of some products can be pre-stored in a configuration file for facilitating the system to quickly read.

[0061] S230, determining whether the target product is in the gray product list based on the identification code.

[0062] The gray product list is a list pre-compiled and maintained by system related operation and maintenance personnel, development teams, and the like according to business requirements and test plans. It can exist in various forms, such as being stored in a specific data table of a database, and the fields in the table can include product identification codes, product names, gray test start times, estimated end times, and the like. It can also exist in the form of a configuration file, for example, a JSON format configuration file.

[0063] In an embodiment, if the gray product list is stored in a database, the identification code is searched in the database. The process is as follows: when it is determined whether a target product is in the gray product list, the identification code of the target product is first obtained (for example, by the above-mentioned methods of obtaining the identification code from a client request, a database record, and the like). A structured query language (SQL) statement can be written to search in the database table storing the gray product list.

[0064] In another embodiment, if the grayscale product list is in the form of a configuration file, the identification code is looked up in the configuration file. The process is as follows: the content of the configuration file can be read, parsed into a corresponding data structure (for example, parsed into an array, a dictionary, etc. in a programming language), and then the data structure is traversed to compare the value of the preset field with the identification code of the target product one by one. For example, the following is an example of using a commonly used programming language to look up (assuming that the content of the configuration file has been read into a variable, and is a data structure parsed after a legal lightweight data interaction format (JavaScript Object Notation, JSON), which is usually in the form of a list nested dictionary).

[0065] When the target product is not in the grayscale product list, step S240 is performed; when the target product is in the grayscale product list, step S250 is performed.

[0066] S240, if it is determined that the target product is not in the grayscale product list, the first access request is routed to the non-grayscale container.

[0067] In the embodiments of the present application, if the target product is not in the grayscale product list, it indicates that the target product is a normal version of a non-grayscale test product, and therefore the first access request should be processed by the non-grayscale container, and all other requests under the target product will be forwarded to the non-grayscale container by the reverse proxy.

[0068] S250, if it is determined that the target product is in the preconfigured grayscale product list, the target request path is obtained by modifying the request path in the first access request URL.

[0069] In the embodiments of the present application, if the target product is in the grayscale product list, it indicates that the target product is a grayscale test product, and therefore a grayscale identifier is added to the request path of the first access request to obtain the target request path.

[0070] S260, the target request path is sent to the client to enable the client to generate a second access request based on the target request path.

[0071] S270, the second access request reinitiated by the client is received.

[0072] S280, the reverse proxy determines whether the second access request URL contains a grayscale identifier.

[0073] S290, if yes, the second access request is routed to the grayscale container.

[0074] In the embodiments of the present application, the request from the client is forwarded by the reverse proxy, and the request containing the grayscale identifier in the URL is forwarded to the grayscale container, and the request not containing the grayscale identifier in the URL is forwarded to the non-grayscale container.

[0075] The technical scheme provided by the embodiment comprises the following steps: receiving a first access request for a target product in an application program sent by a client; obtaining an identification code of the target product; determining whether the target product is in a gray product list based on the identification code; if it is determined that the target product is not in the gray product list, routing the first access request to a non-gray container; if it is determined that the target product is in the pre-configured gray product list, modifying a request path in a URL corresponding to the first access request to obtain a target request path; sending the target request path to the client, so that the client generates a second access request based on the target request path; receiving the second access request re-initiated by the client; determining whether the URL corresponding to the second access request contains a gray identification through a reverse proxy; if the URL contains the gray identification, routing the second access request to a gray container. The application pre-configures a gray product list, which lists product information (such as an identification code) that is currently being tested in gray, so that the product participating in the gray test and the user traffic accessing the product can be accurately controlled. After receiving the first access request, the server checks whether the target product is in the gray product list according to the identification code of the target product. If it is confirmed that the target product is in the gray product list, the request path in the URL corresponding to the first access request needs to be modified to obtain a target request path. The server sends the modified target request path back to the client. After receiving the new target request path, the client initiates a second access request based on it. After receiving the second access request re-initiated by the client, the server guides the request to a gray container specially used for gray test through an internal routing mechanism. The application distinguishes different versions of the application program at the physical level, accurately controls the request flow, can avoid the problem caused by the cross-domain transmission of the gray identification due to the cookie, and can improve the resource utilization efficiency. The application can also simplify the gray implementation of the client, and access the product tested in gray by automatically refreshing the page and requesting gray and non-gray static resources.

[0076] Figure 3 The structure diagram of the gray routing device provided by the embodiment of the application is shown in FIG. 3. Figure 3 As shown in FIG. 3, the device 300 is integrated in the server and can comprise the following components:

[0077] The request receiving module 310 is configured to receive a first access request for a target product in an application program sent by a client.

[0078] The path modifying module 320 is configured to modify a request path in a URL corresponding to the first access request to obtain a target request path if it is determined that the target product is in a pre-configured gray product list.

[0079] The path sending module 330 is configured to send the target request path to the client, so that the client generates a second access request based on the target request path.

[0080] The request routing module 340 is configured to receive the second access request reinitiated by the client, and route the second access request to the gray container.

[0081] Further, the path modification module 320 can be specifically configured to add a gray identifier in the request path of the first access request to obtain the target request path, where the gray identifier is used to represent a target container for processing the access request, and the target container is a gray container or a non-gray container.

[0082] Further, the request routing module 340 can be further configured to: after receiving the first access request for a target product in an application sent by the client, obtain an identification code of the target product; search whether the target product is in the gray product list based on the identification code; and if it is determined that the target product is not in the gray product list, route the first access request to a non-gray container.

[0083] Further, the request routing module 340 can be further configured to: when receiving a login request for the application sent by the client, perform a login task for the application by using a non-gray container.

[0084] In an embodiment, the target container is deployed with a front-end framework and a back-end framework.

[0085] The gray routing device provided in the embodiment can be applied to the gray routing method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0086] Figure 4 is a block diagram of an electronic device that implements a gray routing method according to an embodiment of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (such as headsets, glasses, watches, and other similar devices), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.

[0087] As Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., communicatively connected to the at least one processor 11, where the memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0088] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0089] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the grayscale routing method.

[0090] In some embodiments, the grayscale routing method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the grayscale routing method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the grayscale routing method by any other appropriate means, such as by means of firmware.

[0091] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip systems (SOCs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0092] Computer programs used to implement the processes of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program

[0093] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0094] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

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

[0096] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0097] Note that the above merely describes preferred embodiments of the present application and the principles of the technology applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described here, and that various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. For example, those skilled in the art can use the above-mentioned various forms of flow, reorder, add or delete steps; can perform the steps described in the present application in parallel, sequentially or in different order, as long as the desired results of the technical solutions of the present application can be achieved, which is not limited herein.

[0098] The foregoing detailed description has not been limited to specific details regarding the application. It should be apparent that various modifications, combinations, sub-combinations, and alternatives can be made to the disclosed embodiments. Any modifications, changes, and improvements that come within the spirit and scope of the application should be considered as falling within the scope of the application.

Claims

1. A gray-scale routing method characterized by, Applied to a server, the method comprises: Receiving a first access request for a target product in an application program sent by a client; If it is determined that the target product is in a pre-configured gray product list, modifying a request path in a uniform resource locator (URL) corresponding to the first access request to obtain a target request path; Sending the target request path to the client to enable the client to generate a second access request based on the target request path; Receiving the second access request re-initiated by the client and routing the second access request to a gray container.

2. The gray-scale routing method of claim 1, wherein, Modifying the request path in the URL corresponding to the first access request to obtain the target request path comprises: Adding a gray identifier to the request path in the first access request to obtain the target request path, the gray identifier being used to represent a target container for processing an access request, the target container being a gray container or a non-gray container.

3. The gray-scale routing method of claim 2, wherein, Before routing the second access request to the gray container, the method further comprises: Determining, by a reverse proxy, whether the URL corresponding to the second access request contains the gray identifier; If yes, routing the second access request to the gray container.

4. The gray-scale routing method of claim 1, wherein, After receiving the first access request for the target product in the application program sent by the client, the method further comprises: Obtaining an identification code of the target product; Based on the identification code, determining whether the target product is in the gray product list; If it is determined that the target product is not in the gray product list, routing the first access request to a non-gray container.

5. The gray-scale routing method of claim 1, wherein, The method further comprises: When receiving a login request for the application program sent by the client, using a non-gray container to perform a login task for the application program.

6. The gray-scale routing method of claim 2, wherein, The target container is deployed with a front-end framework and a back-end framework.

7. A gray route apparatus, characterized by, Integrated in a server, the device comprises: A request receiving module configured to receive a first access request for a target product in an application program sent by a client; A path modifying module configured to, if it is determined that the target product is in a pre-configured gray product list, modify a request path in a uniform resource locator (URL) corresponding to the first access request to obtain a target request path; A path sending module configured to send the target request path to the client to enable the client to generate a second access request based on the target request path; A request routing module configured to receive the second access request re-initiated by the client and route the second access request to a gray container.

8. An electronic device, comprising: The electronic device comprises: At least one processor; and a memory connected in communication with the at least one processor; The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the gray routing method in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling a processor to execute the gray routing method in any one of claims 1 to 6 when executed.

10. A computer program product comprising a computer program which, when executed by a processor, implements the grey route method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Front-end and rear-end separated gray release method, front-end server and configuration server

    CN114125067A

  • Gray release method and device, computer equipment and storage medium

    CN117407046A