Gray routing method, device, equipment, medium and product

By modifying the client request path on the server and routing it to the corresponding container, the problem of grayscale identification due to cross-domain transmission of cookies is solved, and the application's accurate grayscale release and efficient resource utilization are achieved.

CN119676155AActive Publication Date: 2025-03-21INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, grayscale identification has problems with cross-domain transmission of cookies, resulting in unstable grayscale routing, low resource utilization efficiency, and complex client grayscale implementation.

Method used

After receiving the client's access request on the server, modify the request path and send it back to the client. The client re-initiates the request based on the modified request path and routes it to a grayscale container or a non-grayscale container.

Benefits of technology

It realizes the differentiated deployment of applications at the physical level and precise control of request flow, avoids the problem of cross-domain transmission of cookies due to cookies, improves resource utilization efficiency, and simplifies the grayscale implementation of the client.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676155A_ABST
    Figure CN119676155A_ABST
Patent Text Reader

Abstract

The invention discloses a gray routing method, device and equipment, a medium and a product, and relates to the field of distributed technologies. The method comprises the following steps: receiving a first access request, sent by a client, for a target product in an application program; 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; and receiving a second access request re-initiated by the client, and routing the second access request to the gray container. According to the technical scheme provided by the invention, different versions of the application program are deployed on the physical level in a differentiated manner, and the request flow direction is accurately controlled, so that the resource utilization efficiency can be improved; and the gray scale realization of the client can be simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed technology, and in particular to a grayscale routing method, device, equipment, medium and product. Background Art

[0002] With the rapid development of Internet technology, the market has put forward higher requirements for the stability of scientific and technological systems, and grayscale publishing technology has become an important guarantee for the stability of application systems. In the grayscale implementation method, the existing method is to put the grayscale logo in the Cookie of the Hyper Text Transfer Protocol (Http) request. For example, the grayscale logo is added to the Cookie, and the server load balancer determines whether to route the Http request to the grayscale container or the non-grayscale container according to the grayscale logo in the Cookie.

[0003] However, due to cross-domain restrictions on cookies, if the page is embedded in an inline frame of another application, the cookie will become invalid. Different browsers may handle cookies differently, and some privacy modes or plug-ins may prevent cookies from being stored. Therefore, it is urgent to design a grayscale routing method to avoid grayscale identification problems caused by cross-domain transmission of cookies. Summary of the invention

[0004] The present application provides a grayscale routing method, apparatus, device, medium and product, which can differentiate and deploy different versions of applications at the physical level and accurately control the request flow, thereby avoiding the problems caused by cross-domain transmission of cookies in grayscale identification and improving resource utilization efficiency; it can also simplify the grayscale implementation of the client.

[0005] In a first aspect, the present application provides a grayscale routing method, which is applied to a server, and the method includes:

[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 the pre-configured grayscale product list, modifying the request path in the 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] Receive the second access request re-initiated by the client, and route the second access request to the grayscale container.

[0010] Furthermore, the request path in the URL corresponding to the first access request is modified to obtain the target request path, including: adding a grayscale identifier to the request path of the first access request to obtain the target request path, the grayscale identifier is used to represent the target container for processing the access request, and the target container is a grayscale container or a non-grayscale container.

[0011] Furthermore, before routing the second access request to the grayscale container, it also includes: determining through a reverse proxy whether the URL corresponding to the second access request contains the grayscale identifier; if so, routing the second access request to the grayscale container.

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

[0013] Furthermore, the method also includes: when receiving a login request for the application sent by the client, using a non-grayscale container to execute a login task for the application.

[0014] Furthermore, a front-end framework and a back-end framework are deployed in the target container.

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

[0016] A request receiving module, used for receiving a first access request for a target product in an application program sent by a client;

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

[0018] A path sending module, used for sending 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 is used to receive the second access request re-initiated by the client and route the second access request to the grayscale container.

[0020] In a third aspect, the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; 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 so that the at least one processor can execute the grayscale routing method described in any embodiment of the present application.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the grayscale routing method described in any embodiment of the present application when executed.

[0022] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the grayscale routing method described in any embodiment of the present application.

[0023] In order to solve the defects of the prior art in the background technology, the embodiment of the present application provides a grayscale routing method, and the execution of the method can bring the following beneficial effects: the present application configures a grayscale product list in advance, lists the product information (such as identification code) currently undergoing grayscale testing, and can accurately control the products participating in the grayscale testing and the user traffic accessing these products. After receiving the first access request, the server will check whether it is in the grayscale product list based on the identification code of the target product. If it is confirmed that the target product is in the grayscale product list, it is necessary to modify the request path in the URL corresponding to the first access request, and then obtain the target request path. The server sends the modified target request path back to the client. After the client receives the new target request path, it will initiate a second access request based on it again. After the server receives the second access request re-initiated by the client, it will guide this request to the grayscale container specifically used for grayscale testing for processing through the internal routing mechanism. This application deploys different versions of the application at the physical level and accurately controls the request flow, which can avoid the problems caused by cross-domain transmission of cookies for grayscale identification and improve resource utilization efficiency. This application can also simplify the grayscale implementation of the client, and access grayscale tested products by automatically refreshing the page and requesting grayscale and non-grayscale static resources.

[0024] It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium, wherein the computer-readable storage medium may be packaged together with the processor of the grayscale routing device, or may be packaged separately from the processor of the grayscale routing device, which is not limited in this application.

[0025] The description of the second, third, ..., and fifth aspects in this application can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second, third, ..., and fifth aspects 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 section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description.

[0027] It is understandable that before using the technical solutions disclosed in the embodiments of this application, the type, scope of use, and usage scenarios of the personal information involved in this application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0029] Figure 1 A first flow chart of a grayscale routing method provided in an embodiment of the present application;

[0030] Figure 2 A second flow chart of a grayscale routing method provided in an embodiment of the present application;

[0031] Figure 3 A schematic diagram of the structure of a grayscale routing device provided in an embodiment of the present application;

[0032] Figure 4 It is a block diagram of an electronic device used to implement a grayscale routing method in an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0034] It should be noted that the terms "first", "second", "target", and "original" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, 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 "including", "having", and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0035] Figure 1 A first flow diagram of a grayscale routing method provided in an embodiment of the present application is provided. This embodiment can be applied to a scenario where, when an application is grayscale released, access requests are routed to corresponding processing containers according to the request path of the access request. A grayscale routing method provided in this embodiment can be executed by a grayscale routing device provided in an embodiment of the present application. The device can be implemented in software and / or hardware and integrated in an electronic device that executes the method. The method is applied to the server.

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

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

[0038] Among them, the client can be a common browser web page, mobile application, etc. The application can include multiple products, which can be divided into products in the gray test stage (such as the target product in this embodiment) and normal versions of products. The application can be a sales and trading platform for an enterprise to bring its products to the market, or it can be a service management platform for an organization to serve users. The application can be in the form of application software or mini-programs. An access request is a business-related request initiated by a user or a device module in a business system. Business requests depend on the business system, and the specific content of the business requests corresponding to different business systems will be different.

[0039] In the embodiment of the present application, the user clicks on the target product in the application in the interactive interface of the client to trigger, and the client generates a first access request to access the target product, the purpose of which is to obtain or operate resources or functions related to the target product. The client then 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 grayscale product list, the request path in the Uniform Resource Locator (URL) corresponding to the first access request is modified to obtain a target request path.

[0041] In an embodiment of the present application, a pre-configured grayscale product list may exist in the operating environment of an application system. The grayscale product list may be a list of product information that is undergoing grayscale testing (such as product name, number, etc., which are used to uniquely identify the product). When the client sends a first access request for a target product to the server, the server checks whether the target product is in the grayscale product list. If the verification finds that the target product is indeed in the grayscale product list, the server performs a specific modification operation on the request path portion of the URL corresponding to the first access request, and the new path obtained after the modification is the target request path.

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

[0043] Exemplarily, the request path can be modified by adding a grayscale identifier to distinguish the grayscale environment, such as adding " / gray" in front of the original request path. Assuming the original request path is " / products / watch" (indicating access to watch product-related resources under the product directory), it may become " / gray / products / watch" after modification, and the modified path is the target request path.

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

[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, a grayscale identifier (such as / gray) is added to the request path of the first access request to obtain the target request path, and redirected to the client. The client generates a second access request based on the target request path, that is, the client modifies the browser address to a URL with / gray. The difference between the first access request and the second access request in this embodiment is that the URL corresponding to the second access request contains a grayscale identifier.

[0047] S140: Receive a second access request re-initiated by the client, and route the second access request to the grayscale container.

[0048] In an embodiment of the present application, the client re-initiates a 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 grayscale container. All other subsequent requests under the target product will be forwarded to the grayscale container by the reverse proxy. The grayscale container is generally an operating environment where services related to the corresponding grayscale version of the product are deployed.

[0049] Furthermore, before routing the second access request to the grayscale container, it also includes: determining through a reverse proxy whether the URL corresponding to the second access request contains a grayscale identifier; if so, routing the second access request to the grayscale container.

[0050] For example, if the grayscale identifier is / gray, if the URL corresponding to the client request contains / gray, such as / gray / app, then the reverse proxy will forward the request to the grayscale container where the latest version of the program is deployed for processing; if the URL corresponding to the request does not contain / gray, such as / app, it is a regular request. The reverse proxy will forward the request to the non-gray container where the old version of the program is deployed for processing.

[0051] In this way, different user requests can be directed to different versions of the application according to different request paths, achieving the purpose of grayscale release, gradually allowing new functions or new versions to be tested and used within a controllable range, and then smoothly transitioning to a full update.

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

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

[0054] The technical solution provided in this embodiment receives a first access request for a target product in an application sent by a client; if it is determined that the target product is in a pre-configured grayscale product list, the request path in the URL corresponding to the first access request is modified to obtain the target request path; the target request path is sent to the client so that the client generates a second access request based on the target request path; the second access request re-initiated by the client is received, and the second access request is routed to the grayscale container. This application configures a grayscale product list in advance, which lists the product information (such as identification codes) currently undergoing grayscale testing, and can accurately control the products participating in the grayscale testing and the user traffic accessing these products. After receiving the first access request, the server will check whether it is in this grayscale product list based on the identification code of the target product. If it is confirmed that the target product is in the grayscale product list, it is necessary to modify the request path in the URL corresponding to the first access request to obtain the target request path. The server sends the modified target request path back to the client. After receiving this new target request path, the client will initiate a second access request based on it again. After the server receives the second access request re-initiated by the client, it will direct this request to the grayscale container specifically used for grayscale testing for processing through the internal routing mechanism. This application deploys different versions of the application at the physical level and accurately controls the request flow, which can avoid the problems caused by the cross-domain transmission of cookies for grayscale identification and improve resource utilization efficiency; this application can also simplify the grayscale implementation of the client, by automatically refreshing the page and requesting grayscale and non-grayscale static resources to access grayscale test products.

[0055] The grayscale routing method provided by the embodiment of the present application is further described below. Figure 2 A second flow chart of a grayscale routing method provided in an embodiment of the present application. The embodiment of the present application is optimized on the basis of the above embodiments, and the specific optimization is as follows: the embodiment explains in detail the complete process of routing access requests.

[0056] See also Figure 2 The method of this embodiment includes but is not limited to the following steps:

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

[0058] S220: Obtain an identification code of the target product.

[0059] In one 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 viewing product details or adding to a shopping cart, the product identification code is often included in the relevant data of the request. Taking an HTTP request as an example, the identification code may be included in the URL path parameter or request body of the request.

[0060] In another embodiment, the system database generally stores detailed information of all products, including basic attributes of the products and corresponding identification codes, etc. If you want to obtain the identification code of the target product, you can query it in the database table based on other known relevant information (such as product name, category, etc.). In some application scenarios, the identification codes and related important information of some products may be pre-stored in the configuration file to facilitate the system to quickly read.

[0061] S230: Search whether the target product is in the grayscale product list based on the identification code.

[0062] The grayscale product list is a list pre-organized and maintained by system-related operation and maintenance personnel, development teams, etc. based on business needs and test plans. It can exist in many forms, such as being stored in a specific data table in the database, where the fields may contain product identification codes, product names, grayscale test start time, expected end time, and other related information; it may also exist in the form of a configuration file, such as a configuration file in JSON format.

[0063] In one embodiment, if the grayscale product list is stored in a database, the database is searched based on the identification code. The process is: when determining whether a target product is in the grayscale product list, first obtain the identification code of the target product (for example, through the aforementioned client request, database record, etc.). The search can be performed in the database table storing the grayscale product list by writing a structured query language (SQL) statement.

[0064] In another embodiment, if the grayscale product list is in the form of a configuration file, the configuration file is searched based on the identification code. The process is: the configuration file content can be read and parsed into a corresponding data structure (such as an array, dictionary, etc. in a programming language), and then the data structure is traversed to compare the values ​​of the preset fields with the identification code of the target product one by one. For example, a common programming language is used to search (assuming that the configuration file content has been read into a variable and is a data structure parsed in a legal lightweight data interaction format (JavaScript Object Notation, JSON), usually in the form of a list nested dictionary).

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

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

[0067] In an embodiment of the present application, if the target product is not in the grayscale product list, indicating that the target product is a normal version of a non-grayscale tested product, then the first access request should be processed by the non-grayscale container, and all subsequent requests under the target product will be forwarded by the non-grayscale container by the reverse proxy.

[0068] S250: If it is determined that the target product is in the pre-configured grayscale product list, the request path in the URL corresponding to the first access request is modified to obtain the target request path.

[0069] In an embodiment of the present application, if the target product is in the grayscale product list, indicating that the target product is a grayscale tested product, then a grayscale identifier is added to the request path of the first access request to obtain the target request path.

[0070] S260: Send the target request path to the client, so that the client generates a second access request based on the target request path.

[0071] S270: Receive a second access request re-initiated by the client.

[0072] S280. Determine, through the reverse proxy, whether the URL corresponding to the second access request contains a grayscale identifier.

[0073] S290. If included, route the second access request to the grayscale container.

[0074] In an embodiment of the present application, the request sent by the client is forwarded through 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 solution provided in this embodiment is to receive a first access request for a target product in an application sent by a client; obtain an identification code of the target product; search whether the target product is in the grayscale product list based on the identification code; if it is determined that the target product is not in the grayscale product list, the first access request is routed to a non-grayscale container; if it is determined that the target product is in a pre-configured grayscale product list, the request path in the URL corresponding to the first access request is modified to obtain a target request path; the target request path is sent to the client so that the client generates a second access request based on the target request path; receive a second access request re-initiated by the client; determine whether the URL corresponding to the second access request contains a grayscale identifier through a reverse proxy; if it does, the second access request is routed to a grayscale container. This application configures a grayscale product list in advance, which lists product information (such as identification codes) currently undergoing grayscale testing, and can accurately control the products participating in the grayscale test and the user traffic accessing these products. After receiving the first access request, the server will verify whether the target product is in this grayscale product list based on its identification code. If it is confirmed that the target product is in the grayscale product list, then it is necessary to modify the request path in the URL corresponding to the first access request to obtain the target request path. The server sends the modified target request path back to the client. After the client receives the new target request path, it will initiate a second access request based on it again. After the server receives the second access request re-initiated by the client, it will use the internal routing mechanism to direct the request to a grayscale container specifically used for grayscale testing for processing. This application deploys different versions of the application at the physical level and accurately controls the request flow, which can avoid the problems caused by cross-domain transmission of cookies for grayscale identification and improve resource utilization efficiency; this application can also simplify the grayscale implementation of the client by automatically refreshing the page and requesting grayscale and non-grayscale static resources to access grayscale tested products.

[0076] Figure 3 A schematic diagram of the structure of a grayscale routing device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the device 300 is integrated in the server and may include:

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

[0078] A path modification module 320 is configured to modify the request path in the URL corresponding to the first access request to obtain a target request path if it is determined that the target product is in the pre-configured grayscale product list;

[0079] A path sending module 330, 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 used to receive the second access request re-initiated by the client and route the second access request to the grayscale container.

[0081] Furthermore, the path modification module 320 may be specifically configured to add a grayscale identifier to the request path of the first access request to obtain the target request path, wherein the grayscale identifier is used to characterize a target container for processing the access request, and the target container may be a grayscale container or a non-grayscale container.

[0082] Furthermore, the above-mentioned request routing module 340 can also be used to: after receiving the first access request for the target product in the application sent by the client, obtain the identification code of the target product; based on the identification code, search whether the target product is in the grayscale product list; if it is determined that the target product is not in the grayscale product list, route the first access request to the non-grayscale container.

[0083] Furthermore, the request routing module 340 may also be used to: when receiving a login request for the application sent by a client, use a non-grayscale container to execute a login task for the application.

[0084] In one embodiment, a front-end framework and a back-end framework are deployed in the target container.

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

[0086] Figure 4 It is a block diagram of an electronic device for implementing a grayscale routing method of an embodiment of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0087] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. 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] A number of 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, speakers, etc.; a storage unit 18, such as a 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 may be a variety of general and / or special 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 dedicated 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 the various methods and processes described above, such as the grayscale routing method.

[0090] In some embodiments, the grayscale routing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on 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 may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the grayscale routing method in any other appropriate manner (e.g., by means of firmware).

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

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

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

[0094] To provide interaction with a user, the systems and techniques described herein may 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 trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0095] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server) or a computing system that includes middleware components (e.g., an application server) or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein) or a computing system that includes any combination of such backend components, middleware components, or frontend 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] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may 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 difficult management and weak business scalability in traditional physical hosts and VPS services.

[0097] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, 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 various forms of processes shown above to reorder, add, or delete steps; the steps recorded in the present application can be performed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution of the present application can be achieved, and this document does not limit them here.

[0098] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A grayscale routing method, characterized in that: Applied to the server, the method includes: 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 the pre-configured grayscale product list, modifying the request path in the uniform resource locator 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; Receive the second access request re-initiated by the client, and route the second access request to the grayscale container.

2. The grayscale routing method according to claim 1, characterized in that: Modifying the request path in the URL corresponding to the first access request to obtain a target request path includes: The target request path is obtained by adding a grayscale identifier to the request path of the first access request, wherein the grayscale identifier is used to represent a target container for processing the access request, and the target container is a grayscale container or a non-grayscale container.

3. The grayscale routing method according to claim 2, characterized in that: Before routing the second access request to the grayscale container, the method further includes: Determine, by a reverse proxy, whether the URL corresponding to the second access request contains the grayscale identifier; If included, the second access request is routed to the grayscale container.

4. The grayscale routing method according to claim 1, characterized in that: After receiving a first access request for a target product in an application sent by a client, the method further includes: Obtaining an identification code of the target product; Searching whether the target product is in the grayscale product list based on the identification code; If it is determined that the target product is not in the grayscale product list, the first access request is routed to a non-grayscale container.

5. The grayscale routing method according to claim 1, characterized in that: The method further comprises: When a login request for the application is received from the client, a non-grayscale container is used to execute the login task for the application.

6. The grayscale routing method according to claim 2, characterized in that: A front-end framework and a back-end framework are deployed in the target container.

7. A grayscale routing device, characterized in that: Integrated in the server, the device includes: A request receiving module, used for receiving a first access request for a target product in an application program sent by a client; A path modification module, configured to modify the request path in the URL corresponding to the first access request to obtain a target request path if it is determined that the target product is in the pre-configured grayscale product list; A path sending module, used for sending the target request path to the client, so that the client generates a second access request based on the target request path; A request routing module is used to receive the second access request re-initiated by the client and route the second access request to the grayscale container.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to 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 so that the at least one processor can execute the grayscale routing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the grayscale routing method according to any one of claims 1 to 6 when executed.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the grayscale routing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Gray release method, application server and gray release system

    CN113014651A

  • 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

  • Information processing apparatus, method for controlling information processing apparatus, and storage medium

    US20110154136A1