CN114125067A - Front-end and back-end separated gray scale publishing method, front-end server and configuration server - Google Patents

Front-end and back-end separated gray scale publishing method, front-end server and configuration server Download PDF

Info

Publication number
CN114125067A
CN114125067A CN202110184906.3A CN202110184906A CN114125067A CN 114125067 A CN114125067 A CN 114125067A CN 202110184906 A CN202110184906 A CN 202110184906A CN 114125067 A CN114125067 A CN 114125067A
Authority
CN
China
Prior art keywords
gray
access request
page
version
routing information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110184906.3A
Other languages
Chinese (zh)
Inventor
宁溥泰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110184906.3A priority Critical patent/CN114125067A/en
Publication of CN114125067A publication Critical patent/CN114125067A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a front-end and back-end separated gray scale publishing method, a front-end server and a configuration server, and relates to the technical field of computers. One embodiment of the method comprises: sending a page access request; receiving grayscale routing information in response to the page access request; the gray level routing information is determined according to a configured gray level routing strategy and the page access request and is used for indicating version information of the accessed page; and redirecting the page access request to a page corresponding to the gray scale version or returning page data corresponding to a formal version according to the version information indicated by the gray scale routing information. The implementation mode determines whether the page access request needs to be redirected to the page corresponding to the gray scale version based on the version information indicated in the gray scale routing information, realizes independent gray scale release at the front end, and has small code intrusion and small system transformation amount.

Description

Front-end and back-end separated gray scale publishing method, front-end server and configuration server
Technical Field
The invention relates to the technical field of computers, in particular to a front-end and back-end separated gray scale publishing method, a front-end server and a configuration server.
Background
The gray scale distribution refers to a distribution mode capable of smoothly transiting in the software distribution process. For example, assuming that the current software version has old and new versions, when a user sends a request message for the software to the server, the server controls a part of the users to continue using the old version and another part of the users to use the new version. And if the user has no exception in the process of using the new version, gradually expanding the release range of the new version, and finally migrating all the users to the new version.
For a business system or an operation platform with separated front and back ends, the method has the characteristics of more users, wide related functions, strong dependence on system availability and the like. In order to control the influence range of the new version when the new version goes wrong online and improve the user experience, it is necessary to introduce gray release. In the prior art, gray scale publishing is usually realized by setting up a customized gateway or a framework encapsulating RPC (Remote Procedure Call Protocol).
In the process of implementing the invention, the prior art at least has the following problems:
the business system is greatly modified, and a customized gateway or a scheduling platform needs to be built to realize gray scale release.
Disclosure of Invention
In view of this, embodiments of the present invention provide a front-end and back-end separated gray scale publishing method, a front-end server, and a configuration server, where the method determines whether a page access request needs to be redirected to a page corresponding to a gray scale version based on version information indicated in gray scale routing information, so that a single gray scale publishing is implemented at the front end, code intrusion is small, and a system transformation amount is small.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a front-end and back-end separated gray scale distribution method.
The gray level publishing method with separated front and back ends in the embodiment of the invention comprises the following steps: sending a page access request; receiving grayscale routing information in response to the page access request; the gray level routing information is determined according to a configured gray level routing strategy and the page access request and is used for indicating version information of the accessed page; and redirecting the page access request to a page corresponding to the gray scale version or returning page data corresponding to a formal version according to the version information indicated by the gray scale routing information.
Optionally, the grayscale routing information includes a target website corresponding to the version information; the redirecting the page access request to a page corresponding to a grayscale version or returning page data corresponding to a formal version according to the version information indicated by the grayscale routing information includes: judging whether the target website is the same as the request website of the page access request; if the target website is different from the request website, determining that the version information indicated by the gray-scale routing information is a gray-scale version, and redirecting the page access request to a page corresponding to the gray-scale version; and if the target website is the same as the request website, determining that the version information indicated by the gray-scale routing information is a formal version, and returning page data corresponding to the formal version.
Optionally, the grayscale routing information is further used to indicate whether the front end and the back end are simultaneously cut; the method further comprises the following steps: receiving a service access request corresponding to the page access request; determining that the gray routing information indicates simultaneous front and back end cut-off, and if the version information indicated by the gray routing information is a gray version, calling a gray service; and determining that the gray routing information indicates simultaneous cut-off of the front end and the back end, and the version information indicated by the gray routing information is a formal version, and calling formal service.
Optionally, before the step of determining that the grayscale routing information indicates simultaneous front-end and back-end cut-offs, the method further includes: acquiring the gray level routing strategy; after the step of receiving a service access request corresponding to the page access request, the method further includes: determining that the gray-scale routing information indicates different switching values at the front end and the rear end, and judging whether the service access request meets the gray-scale routing strategy; if the service access request meets the gray level routing strategy, calling a gray level service; and if the service access request does not meet the gray-scale routing strategy, calling formal service.
Optionally, the invoking of the grayscale service includes: modifying the request path of the service access request into a path of a gray level service to obtain a new service access request; sending the new service access request according to the path of the gray level service; the calling formal service comprises the following steps: and sending the service access request according to the request path of the service access request.
Optionally, the grayscale routing policy includes at least one of a grayscale white list and a grayscale scale; the determining whether the service access request satisfies the grayscale routing policy includes: acquiring a set access parameter according to the user identifier of the service access request; determining that the access parameter exists in the gray white list, or determining that the mapping proportion of the access parameter after the hash module extraction is smaller than the gray proportion, wherein the service access request meets the gray routing strategy; and determining that the access parameter does not exist in the gray white list, and if the mapping ratio of the access parameter after the hash module extraction is greater than or equal to the gray ratio, the service access request does not meet the gray routing strategy.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a front-end and back-end separated gray scale distribution method.
The gray level publishing method with separated front and back ends in the embodiment of the invention comprises the following steps: receiving a page access request; determining gray level routing information according to the configured gray level routing strategy and the page access request; wherein the grayscale routing information is used to indicate version information of the accessed page; and sending the gray routing information to enable a front-end server to redirect the page access request to a page corresponding to a gray version or return page data corresponding to a formal version according to version information indicated by the gray routing information.
Optionally, the determining gray-scale routing information according to the configured gray-scale routing policy and the page access request includes: judging whether the page access request meets the gray level routing strategy or not, and if the page access request meets the gray level routing strategy, determining that the gray level routing information comprises a target website corresponding to a gray level version; and if the page access request does not meet the gray-scale routing strategy, the determined gray-scale routing information comprises a target website corresponding to the formal version.
Optionally, the grayscale routing information includes a cut amount identifier for indicating whether the front end and the back end are cut at the same time; the grayscale routing policy includes at least one of a grayscale whitelist and a grayscale scale.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a front-end server for gray scale distribution.
The front-end server for gray scale release of the embodiment of the invention comprises: the request sending module is used for sending a page access request; the information receiving module is used for receiving the gray level routing information responding to the page access request; the gray level routing information is determined according to a configured gray level routing strategy and the page access request and is used for indicating version information of the accessed page; and the request processing module is used for redirecting the page access request to a page corresponding to the gray scale version or returning page data corresponding to the formal version according to the version information indicated by the gray scale routing information.
Optionally, the grayscale routing information includes a target website corresponding to the version information; the request processing module is further configured to: judging whether the target website is the same as the request website of the page access request; if the target website is different from the request website, determining that the version information indicated by the gray-scale routing information is a gray-scale version, and redirecting the page access request to a page corresponding to the gray-scale version; and if the target website is the same as the request website, determining that the version information indicated by the gray-scale routing information is a formal version, and returning page data corresponding to the formal version.
Optionally, the grayscale routing information is further used to indicate whether the front end and the back end are simultaneously cut; the front-end server further comprises: the first calling module is used for receiving a service access request corresponding to the page access request; determining that the gray routing information indicates simultaneous front and back end cut-off, and if the version information indicated by the gray routing information is a gray version, calling a gray service; and determining that the gray routing information indicates simultaneous cut-off of the front end and the back end, and if the version information indicated by the gray routing information is a formal version, calling formal service.
Optionally, before the step of determining that the grayscale routing information indicates simultaneous front-end and back-end cut amounts, the front-end server further includes: the acquisition module is used for acquiring the gray level routing strategy; the second calling module is used for determining that the gray routing information indicates that the front end and the rear end have different switching values and judging whether the service access request meets the gray routing strategy or not; if the service access request meets the gray level routing strategy, calling a gray level service; and calling formal service if the service access request does not meet the gray-scale routing policy.
Optionally, the first invoking module is further configured to modify a request path of the service access request into a path of a grayscale service, so as to obtain a new service access request; sending the new service access request according to the path of the gray level service; the first calling module is further configured to send the service access request according to a request path of the service access request.
Optionally, the grayscale routing policy includes at least one of a grayscale white list and a grayscale scale; the second calling module is further used for acquiring the set access parameter according to the user identifier of the service access request; determining that the access parameter exists in the gray white list, or determining that the mapping proportion of the access parameter after the hash module extraction is smaller than the gray proportion, wherein the service access request meets the gray routing strategy; and determining that the access parameter does not exist in the gray white list, and if the mapping ratio of the access parameter after the hash modulus extraction is larger than or equal to the gray ratio, the service access request does not satisfy the gray routing strategy.
Optionally, the grayscale routing policy includes at least one of a grayscale white list and a grayscale scale; the second calling module is further used for acquiring the set access parameter according to the user identifier of the service access request; determining that the access parameter exists in the gray white list, or determining that the mapping proportion of the access parameter after the hash module extraction is smaller than the gray proportion, wherein the service access request meets the gray routing strategy; and determining that the access parameter does not exist in the gray white list, and if the mapping ratio of the access parameter after the hash modulus extraction is larger than or equal to the gray ratio, the service access request does not satisfy the gray routing strategy.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a configuration server for gray scale distribution.
The configuration server for gray scale release of the embodiment of the invention comprises: the request receiving module is used for receiving a page access request; the information determining module is used for determining the gray level routing information according to the configured gray level routing strategy and the page access request; wherein the grayscale routing information is used to indicate version information of the accessed page; and the information sending module is used for sending the gray routing information so that the front-end server redirects the page access request to a page corresponding to a gray version or returns page data corresponding to a formal version according to version information indicated by the gray routing information.
Optionally, the information determining module is further configured to determine whether the page access request meets the grayscale routing policy, and if the page access request meets the grayscale routing policy, the determined grayscale routing information includes a target website corresponding to a grayscale version; and if the page access request does not meet the gray-scale routing strategy, determining that the gray-scale routing information comprises a target website corresponding to the formal version.
Optionally, the grayscale routing information includes a cut amount identifier for indicating whether the front end and the back end are cut at the same time; the grayscale routing policy includes at least one of a grayscale whitelist and a grayscale scale.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement a front-end and back-end separated gray scale publishing method according to an embodiment of the present invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, implements a front-end and back-end separated gray scale distribution method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: determining whether the page access request needs to be redirected to a page corresponding to the gray-scale version based on the version information indicated in the gray-scale routing information, realizing independent gray-scale release at the front end, and having small code intrusion and small system transformation amount; and the target website is used for representing the version information to be accessed, the target website is compared with the request website, and whether the gray-scale version or the formal version is to be accessed is determined, so that the method is simple and reliable to realize.
The field for indicating whether the front end and the rear end are simultaneously cut is arranged in the gray routing information, so that developers can change according to different requirements, and further any one of three modes of front end independent gray distribution, rear end independent gray distribution and front end and rear end simultaneous gray distribution can be flexibly and customizedly realized. When the gray level service is called, the request path of the service access request is modified into the path of the gray level service, so that the request can be conveniently mapped to the corresponding gray level server subsequently, and the gray level issue at the rear end is realized.
The gray level routing information is determined by configuring a gray level routing strategy, so that the flexibility is good, and dynamic addition or reduction of background systems can be supported. The gray white list and the gray scale proportion are combined in the gray routing strategy, so that the combined use of various gray schemes is realized, and the flexibility of gray release is further improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a system architecture of a front-end and back-end separated business system or operating platform;
fig. 2 is a schematic diagram of main steps of a front-end and back-end separated gray scale distribution method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system architecture for implementing a front-end and back-end separated gray scale publishing method according to an embodiment of the present invention;
fig. 4 is a timing diagram of front-end individual gray scale distribution in a front-end and back-end separated gray scale distribution method according to an embodiment of the present invention;
fig. 5 is a timing diagram of back-end individual gray scale distribution in the front-end and back-end separated gray scale distribution method according to the embodiment of the present invention;
fig. 6 is a timing diagram of front-end and back-end simultaneous gray scale distribution in a front-end and back-end separated gray scale distribution method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of the main modules of a front-end server for gray scale publishing in accordance with an embodiment of the present invention;
FIG. 8 is a schematic diagram of the main modules of a configuration server for gray scale publishing in accordance with an embodiment of the present invention;
FIG. 9 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 10 is a schematic diagram of a computer apparatus suitable for use in an electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Technical terms related to the embodiments of the present invention are explained below.
HTML: hyper Text Markup Language.
JS: is an abbreviation for JavaScript, a lightweight, interpreted or just-in-time programming language with function precedence.
CSS: is an abbreviation of caching Style Sheets, which is a computer Language used to represent file styles such as HTML or XML (Extensible Markup Language).
Nginx: is a high-performance HTTP (Hypertext Transfer Protocol) and reverse proxy web server.
Cutting: after the original service is changed, the user traffic accessing the original service needs to be gradually switched to the changed service according to a certain switching policy, and the switching process is called as switching.
ajax: the web page development technology is a web page development technology for creating interactive and rapid dynamic web page application, and can update part of web pages without reloading the whole web page.
Fig. 1 is a schematic system architecture diagram of a front-end and back-end separated business system or operating platform. As shown in fig. 1, a front-end and back-end separated service system or operation platform generally includes: the system comprises a front-end server, a gateway, a background server and a configuration server.
The front-end server provides page display and front-end logic processing. When a user accesses a system page for the first time, all static resources, such as an HTML page, a JS scripting language, a CSS cascading style file, a picture and the like, at the front end are generally acquired. And then, the operation page interacts with a background system (comprising n background servers, wherein n is a positive integer) to finish the acquisition of information and the entry of data.
The front-end server generally needs to obtain services provided by different backend servers, and at this time, the access request from the front-end server needs to be mapped to the corresponding backend server by means of a gateway, such as Nginx. Specifically, the gateway stores a domain name of a background server, for example, a background server for personnel management, the domain name is 1.com, and a background server for task assignment, the domain name is 2. com. The gateway can transfer the access request to the background server corresponding to the domain name according to the access link contained in the access request.
The background server provides specific background services, such as data form query, data storage and the like. The configuration server provides information configuration functions, such as user authority configuration, interface parameter configuration and the like. Aiming at the system architecture, the embodiment of the invention realizes gray scale release by improving the front-end server and the configuration server.
Example one
Fig. 2 is a schematic diagram of main steps of a front-end and back-end separated gray scale distribution method according to an embodiment of the present invention. As shown in fig. 2, the method for issuing a front-end and back-end separated gray scale according to the embodiment of the present invention is implemented by a front-end server, and mainly includes the following steps:
step S201: a page access request is sent. When the front-end server accesses the page, a page access request can be sent to the configuration server through the gateway. In an embodiment, the page access request may include information of the requesting web address and the user initiating the access, such as a user name.
Step S202: grayscale routing information is received in response to the page access request. The configuration server is provided with a gray routing policy which is used for determining whether a current user should access a page of a gray version (hereinafter referred to as a gray page) or a page of a formal version (hereinafter referred to as a formal page) and should access a background service of the gray version (hereinafter referred to as a gray service) or the background service of the formal version (hereinafter referred to as a formal service) when the user accesses the website.
In an embodiment, the grayscale routing policy includes at least one of a grayscale whitelist and a grayscale scale. The gray white list may be set with a user name, an order number, a service group to which the user belongs, and the like, which allow access to the gray page (or gray service). The gray scale can be set by self, the initial value is generally small, such as 10% or 20%, and can be adjusted according to the feedback of the user to the gray page (or gray service).
After receiving the page access request, the configuration server determines the gray level routing information according to the gray level routing strategy and the page access request, and then sends the gray level routing information to the front-end server. The grey scale routing information can be used for indicating version information of the accessed page, and the version information comprises a grey scale version and a formal version.
In an alternative embodiment, the version information of the accessed page may be indicated using the target web address. At this time, the implementation process of determining the grayscale routing information is as follows: judging whether the page access request meets a gray level routing strategy or not, if so, generating gray level routing information comprising a first website, wherein the first website is a target website corresponding to a gray level version; and if the page access request does not meet the gray level routing strategy, generating gray level routing information comprising a second website, wherein the second website is a target website corresponding to the formal version.
In another alternative embodiment, version information indicating the accessed page may also be used. The version identifier is used to represent the grayscale version and the formal version, such as different numbers, letters, or a combination thereof. In an embodiment, the grayscale version may be represented by the number 0 and the formal version by the number 1.
At this time, the implementation process of determining the grayscale routing information is as follows: judging whether the page access request meets a gray level routing strategy or not, if so, generating gray level routing information comprising a first identifier, wherein the first identifier is a version identifier corresponding to a gray level version; and if the page access request does not meet the gray level routing strategy, generating gray level routing information comprising a second identifier, wherein the second identifier is a version identifier corresponding to the formal version.
Step S203: and redirecting the page access request to a page corresponding to the gray scale version or returning page data corresponding to a formal version according to the version information indicated by the gray scale routing information. After receiving the gray routing information, the front-end server judges whether the version information indicated by the gray routing information is a gray version or a formal version, and if the version information indicated by the gray routing information is a gray version, the front-end server redirects a page access request to a corresponding gray page; and if the version information indicated by the gray routing information is a formal version, returning the page data of the formal page to the client.
In an optional embodiment, when the version information indicated by the grayscale routing information is determined to be a grayscale version or a formal version, the comparison between the target website and the request website may be performed. Specifically, whether the target website is the same as the request website is judged, and if the target website is not the same as the request website, the version information indicated by the gray-scale routing information is determined to be a gray-scale version; and if the target website is the same as the request website, determining that the version information indicated by the gray-scale routing information is a formal version.
In another optional embodiment, whether the version information indicated by the grayscale routing information is a grayscale version or a formal version may also be determined according to the version identifier of the grayscale routing information. It should be noted that in this case, the front-end server needs to store the target website corresponding to the grayscale version, and if the determination result is the grayscale version, the page access request is redirected to the page corresponding to the grayscale version according to the target website corresponding to the grayscale version.
According to the embodiment, whether the page access request needs to be redirected to the page corresponding to the gray-scale version is determined based on the version information indicated in the gray-scale routing information, single gray-scale release is realized at the front end, code intrusion is small, the system transformation amount is small, guarantee is provided for the on-line of new functions of the whole service system or the operation platform, and the system stability and the user experience are improved.
Fig. 3 is a schematic system architecture diagram for implementing the front-end and back-end separated gray scale publishing method according to the embodiment of the present invention. As shown in fig. 3, the front-end and back-end separated gray scale distribution system according to the embodiment of the present invention includes: the system comprises a front-end server, a gateway, a background server and a configuration server. The front-end server comprises a gray level selection module, and the configuration server comprises a gray level control module. That is, the invention realizes the gray release of the front-end and back-end separated service system/operation platform by adding the gray selection module and the gray control module in the system architecture shown in fig. 1.
In order to realize gray release, a server in a gray environment needs to be deployed in a background server correspondingly, and the server is mounted on a domain name different from an online formal environment and is provided for a foreground server to select. In the embodiment, the number of the background servers is not limited, and the background servers may be dynamically increased or decreased, and the configuration server is notified that the configuration server provides the grayscale function to the background servers.
In an optional embodiment, in order to perform a gray scale test when a new service function is configured online, a server in a gray scale environment may also be deployed for the configuration server. The grayscale environment refers to a software environment required for running a new version system.
The functions implemented by the grayscale selection module and the grayscale control module are explained below.
And the gray level control module is used for acquiring the currently configured gray level routing strategy and sending the gray level routing information. The grayscale routing policy may be used, for example, to determine whether the current user can use the grayscale function, or to determine whether the current user can use the grayscale function when using a specific background service. The gray routing information is used for indicating whether a user should access a gray version or a formal version of a front-end page, and also used for indicating whether gray service or formal service should be accessed when accessing background service.
And the gray level selection module is used for redirecting when the current accessed page version is inconsistent with the page version which should be accessed according to the page version information which should be accessed and indicated by the gray level routing information. For example, if the user indicates that a gray page should be accessed and logs on to a regular page, the redirection is performed. In addition, the module can also select to call formal service or gray-scale service according to the gray-scale routing strategy.
The information interaction between the gray selection module and the gray control module can be obtained by the front-end server through timing polling, and can also be pushed by the configuration server through a long connection (such as a websocket long connection).
Based on the system architecture of the gray scale publishing system, the embodiment of the invention provides three gray scale publishing modes, namely front-end independent gray scale publishing, rear-end independent gray scale publishing and front-end and rear-end simultaneous gray scale publishing, so as to realize flexible gray scale publishing. The following describes the implementation process of three gray scale publishing modes with reference to the drawings.
Example two
Fig. 4 is a timing diagram of front-end individual gray scale distribution in the front-end and back-end separated gray scale distribution method according to the embodiment of the present invention. As shown in fig. 4, the method for front-end single gray scale publishing in the embodiment of the present invention mainly includes the following steps:
step one, a front-end server sends a page access request to a configuration server through a gateway. When the front-end server accesses the page, the page access request is sent to the gateway through the gray level selection module, and the gateway forwards the page access request to the gray level control module of the configuration server. The page access request includes the web address of the requested access page (i.e., the requesting web address) and an identification of the user initiating the access, such as a username.
In a preferred embodiment, when the front-end server accesses the page for the first time, a page access request is sent to the configuration server through the gateway. When the same page is accessed again subsequently, the page of the corresponding version (namely the page determined in the first access) is directly jumped to. The first access here means that the user enters the system home page or other functional pages for the first time by manually inputting a website, entering from a favorite, clicking a link, and the like.
And step two, the configuration server determines the gray routing information according to the configured gray routing strategy and the page access request, and returns the gray routing information to the front-end server through the gateway. And the gray level control module of the configuration server judges whether the page access request meets a gray level routing strategy or not, and further determines gray level routing information based on the judgment result. The grayscale routing policy includes a grayscale white list and/or a grayscale scale.
The implementation process of determining whether the page access request satisfies the grayscale routing policy may be: analyzing the page access request to obtain a user name and acquiring a set entry parameter; determining that the access parameter exists in the gray white list, or determining that the mapping proportion of the access parameter after Hash modular extraction is smaller than the gray proportion, and then the page access request meets the gray routing strategy; and if the access parameter does not exist in the gray white list and the mapping ratio after the hash modulus extraction is carried out on the access parameter is more than or equal to the gray ratio, the page access request does not meet the gray routing strategy.
In the embodiment, the entry parameter may be set according to a service requirement, such as a user name, an order number, a service group to which the user belongs, and the like. It should be noted that if the access parameter is the user name, the access parameter can be directly obtained from the page access request; if the access parameter is a parameter which is not a user name, such as an order number, a service group to which the user belongs, and the like, the corresponding access parameter needs to be further acquired according to the user name.
And performing hash modulus on the input parameter, namely performing hash operation on the input parameter and then performing modulus operation to limit the range. For example, setting the value range to 0-1024, and setting the value after performing hash operation modulo 540, 540/1024 × 100% is the percentage calculation result after mapping. Comparing the result with a gray scale, such as 20%, it can be determined whether the page access request satisfies the gray routing policy.
In addition, the gray white list is different according to different functions of the service system. For example, if the service system is a user system, the gray white list is a user white list; and if the business system is an order system, the gray white list is an order number white list. Therefore, the above process of determining whether the page access request satisfies the gray level routing policy needs to be implemented in combination with specific contents of the gray level white list, which is described below as an example.
If the gray white list is maintained as a user white list, searching the analyzed user name in the gray white list, and if the user name exists in the gray white list, indicating that the page access request meets a gray routing strategy and the user should access a gray page; if the user name does not exist in the gray white list, the page access request does not meet the gray routing strategy, and the user should access the formal page.
If the gray white list is assumed to maintain an order number white list, inquiring the order number corresponding to the user name in a database, then searching the order number in the gray white list, and if the order number exists in the gray white list, indicating that the page access request meets a gray routing strategy and the user should access a gray page; if the order number does not exist in the gray white list, the page access request does not meet the gray routing strategy, and the user should access the formal page.
After the processing, if the gray level control module of the configuration server determines that the user should access the gray level page, gray level routing information of the website (namely, the target website) carrying the gray level page is generated; and if the user is determined to access the formal page, generating gray-scale routing information carrying the website (namely the request website) of the formal page. And then the gray scale control module sends the gray scale routing information to the gray scale selection module through the gateway.
Step three, the front-end server compares whether the target website in the gray-scale routing information is the same as the request website of the page access request, and if the target website is not the same as the request website, the fourth step is executed; and if the target website is the same as the request website, executing a fifth step.
And step four, the front-end server redirects the page access request, and the process is ended. The redirection is to transfer the page access request to the gray level page according to the target website. In an embodiment, the redirection may be implemented by a page refresh instruction, such as executing window.
And step five, the front-end server returns page data corresponding to the formal version. And if the target website is the same as the request website, returning the page data corresponding to the formal version to the client. And after receiving the page data, the client renders the page, and presents the formal page to the user.
The combination of the gray white list and the gray scale allows a system developer to open the gray white list first and then gradually open and increase the gray scale, so as to realize smooth online of new functions.
In an optional embodiment, the grayscale routing information determined in step two in the second embodiment may be used to indicate whether the front end and the back end are simultaneously cut in addition to the version information of the accessed page. And whether the front end and the rear end are simultaneously cut can be set by the configuration server according to requirements.
In an embodiment, the configuration server may carry a cut identifier in the grayscale routing information to indicate whether the front end and the back end are simultaneously cut. That is, the gray level routing information at this time includes the target website and the cut amount identifier corresponding to the version information. Wherein, the cutting amount identification can be numbers, letters, or the combination of the two, etc. For example, Y represents the front and rear end simultaneous cutting amount, and N represents the front and rear end simultaneous cutting amount.
Correspondingly, the configuration server in the third step returns the gray scale routing information containing the cut identifier to the front end server through the gateway. After receiving the gray routing information, the front-end server needs to continue to execute the scheme of back-end independent gray release or front-end and back-end simultaneous gray release according to the cut identifier when the front-end server needs to access the background service. Specifically, if the cutting amount identifier indicates that the front end and the rear end are different in cutting amount, the first step to the sixth step of the third embodiment are continuously executed; if the cutting amount identification indicates that the front end and the rear end are simultaneously cut, the steps six to eight of the fourth embodiment are continuously executed. The two cases will be described separately with reference to fig. 5 and 6.
EXAMPLE III
Fig. 5 is a timing diagram of back-end individual gray scale distribution in the front-end and back-end separated gray scale distribution method according to the embodiment of the present invention. As shown in fig. 5, the method for back-end individual gray scale distribution according to the embodiment of the present invention mainly includes the following steps:
step one, a front-end server obtains a gray level routing strategy from a configuration server through a gateway. The grayscale selection module of the front-end server may acquire the grayscale routing policy from the configuration server through the gateway in a polling manner. The configuration server can also push the gray scale routing strategy to the gray scale selection module through the gateway in a timing pushing mode.
And step two, the front-end server receives the service access request. After a user opens a page at a client, assuming that services such as data query, data storage and the like need to be carried out, a service access request is generated by page operation triggering and is sent to a front-end server. The service access request, such as an ajax request, includes a path requested to access the service (i.e., a request path) and information of the user initiating the access, such as a username.
Step three, the front-end server judges whether the service access request meets the gray level routing strategy, if the service access request meets the gray level routing strategy, the fourth step is executed; and if the service access request does not meet the gray scale routing strategy, executing a fifth step. The step is used for judging whether the current access to the background server should access the gray level service or the formal service.
After receiving a service access request of a user, a gray level selection module of a front-end server needs to judge whether the service access request meets a gray level routing strategy, and the judging process is as follows: analyzing the service access request to obtain a user name and acquiring a set entry parameter; determining that the access parameter exists in the gray white list, or determining that the mapping proportion of the access parameter after Hash modulus extraction is smaller than the gray proportion, and then the service access request meets the gray routing strategy; and if the access parameter does not exist in the gray white list and the mapping ratio after the hash module extraction is carried out on the access parameter is more than or equal to the gray ratio, the service access request does not meet the gray routing strategy.
In the embodiment, the entry may still be set according to the service requirement, such as a user name, an order number, a service group to which the user belongs, and the like. It should be noted that if the access parameter is a user name, it can be directly obtained from the service access request; if the access parameter is a parameter which is not a user name, such as an order number, a service group to which the user belongs, and the like, the corresponding access parameter needs to be further acquired according to the user name.
Taking a gray white list as an example for maintaining a user white list, if the user white list has a user name obtained by analysis, it indicates that the service access request meets a gray routing policy and should access a gray service; and if the user name obtained by analysis does not exist in the user white list, the service access request is proved not to meet the gray level routing strategy and formal service should be accessed.
And step four, the front-end server calls the gray level service and executes step six. This step is used to map the service access request to the backend server of the grayscale environment. Specifically, a gray level selection module of the front-end server modifies a request path of the service access request into a path of a gray level service to obtain a new service access request; and then, according to the path of the gray scale service, sending a new service access request to a corresponding background server through a gateway.
And step five, the front-end server calls formal services and executes step six. This step is used to map the service access request to the backend server of the formal environment. Namely, the gray selection module of the front-end server sends the background server corresponding to the service access request through the gateway according to the request path of the service access request (the request path is the path of the formal service).
And step six, the background server processes the service access request and feeds back a processing result to the front-end server. For example, for a service access request initiated by a data query service, the processing result fed back here is the corresponding data query result.
Example four
Fig. 6 is a timing diagram of front-end and back-end simultaneous gray scale distribution in the front-end and back-end separated gray scale distribution method according to the embodiment of the present invention. As shown in fig. 6, the method for simultaneously issuing front and back end grays in the embodiment of the present invention mainly includes the following steps:
step one, a front-end server sends a page access request to a configuration server through a gateway.
And step two, the configuration server determines the gray routing information according to the configured gray routing strategy and the page access request, and returns the gray routing information to the front-end server through the gateway. The gray level routing information comprises a target website corresponding to the version information and a cut quantity identifier, and the cut quantity identifier indicates simultaneous cut quantity of the front end and the rear end.
Step three, the front-end server compares whether the target website in the gray-scale routing information is the same as the request website of the page access request, and if the target website is not the same as the request website, the fourth step is executed; and if the target website is the same as the request website, executing a fifth step.
Step four, the front-end server redirects the page access request and executes step six.
And step five, the front-end server returns page data corresponding to the formal version, and step six is executed.
For the specific implementation of the above steps one to five, reference is made to embodiment two, and details are not described here. The following describes steps six to eight in detail.
And step six, the front-end server receives a service access request corresponding to the page access request. The correspondence here means that the user who initiated the service access request is the same as the user who initiated the page access request, i.e. the username of the service access request is the same as the username of the page access request. After a user opens a requested page (namely, a page corresponding to a request website of a page access request) at a client, assuming that further data query, data storage and other services are needed, a service access request is generated by page operation triggering and is sent to a front-end server.
And step seven, the front-end server correspondingly calls the gray-scale service or the formal service according to the comparison result of the step three. And if the target website is different from the request website, calling the gray level service, so that the front-end server maps the service access request to the background server in the gray level environment. Specifically, a gray level selection module of the front-end server modifies a request path of the service access request into a path of a gray level service to obtain a new service access request; and then, according to the path of the gray scale service, sending a new service access request to a corresponding background server through a gateway.
And if the target website is the same as the request website, calling formal service, so that the front-end server maps the service access request to a background server in a formal environment. Namely, the gray selection module of the front-end server sends the background server corresponding to the service access request through the gateway according to the request path of the service access request.
And step eight, the background server processes the service access request and feeds back a processing result to the front-end server. For example, for a service access request initiated by a data query service, the processing result fed back here is the corresponding data query result.
In the embodiment, the gray level selection module only needs to access the background service according to the version information of the page accessed by the front-end server. If the front-end server accesses the gray-scale page, the gray-scale service needs to be accessed when the background service is accessed. If the front-end server accesses the formal page, the formal service needs to be accessed when the background service is accessed.
Fig. 7 is a schematic diagram of main blocks of a front-end server for gray scale distribution according to an embodiment of the present invention. As shown in fig. 7, the front-end server 700 for gray scale distribution according to the embodiment of the present invention mainly includes:
a request sending module 701, configured to send a page access request. When the front-end server accesses the page, a page access request can be sent to the configuration server through the gateway. In an embodiment, the page access request may include information of the requesting web address and the user initiating the access, such as a user name.
An information receiving module 702 is configured to receive grayscale routing information in response to the page access request. The configuration server is provided with a gray routing strategy, and the gray routing strategy is used for determining whether a current user should access a gray page or a formal page and whether gray service or formal service should be accessed when the user accesses a website. In an embodiment, the grayscale routing policy includes at least one of a grayscale whitelist and a grayscale scale.
After receiving the page access request, the configuration server determines the gray level routing information according to the gray level routing strategy and the page access request, and then sends the gray level routing information to the front-end server. The grey scale routing information can be used for indicating version information of the accessed page, and the version information comprises a grey scale version and a formal version.
In an alternative embodiment, the version information of the accessed page may be indicated using the target web address. At this time, the implementation process of determining the grayscale routing information is as follows: judging whether the page access request meets a gray level routing strategy or not, if so, generating gray level routing information comprising a first website, wherein the first website is a target website corresponding to a gray level version; and if the page access request does not meet the gray level routing strategy, generating gray level routing information comprising a second website, wherein the second website is a target website corresponding to the formal version.
The request processing module 703 is configured to redirect the page access request to a page corresponding to the grayscale version according to the version information indicated by the grayscale routing information, or return page data corresponding to the formal version. After receiving the gray routing information, the front-end server judges whether the version information indicated by the gray routing information is a gray version or a formal version, and if the version information indicated by the gray routing information is a gray version, the front-end server redirects a page access request to a corresponding gray page; and if the version information indicated by the gray routing information is a formal version, returning the page data of the formal page to the client.
In addition, the front-end server 700 for gray scale distribution according to the embodiment of the present invention may further include: a first calling module, an obtaining module, and a second calling module (not shown in FIG. 7). The first calling module is used for receiving a service access request corresponding to the page access request; determining that the gray routing information indicates simultaneous front and back end cut-off, and if the version information indicated by the gray routing information is a gray version, calling a gray service; and determining that the gray routing information indicates simultaneous cut-off of the front end and the back end, and if the version information indicated by the gray routing information is a formal version, calling formal service.
And the acquisition module is used for acquiring the gray level routing strategy. The second calling module is used for determining that the gray routing information indicates that the front end and the rear end have different switching values and judging whether the service access request meets the gray routing strategy or not; if the service access request meets the gray level routing strategy, calling a gray level service; and calling formal service if the service access request does not meet the gray-scale routing policy. It will be appreciated that all of the modules described above constitute the grey scale selection module of the front end server.
Fig. 8 is a schematic diagram of main blocks of a configuration server for gray scale distribution according to an embodiment of the present invention. As shown in fig. 8, a configuration server 800 for gray scale distribution according to an embodiment of the present invention mainly includes:
a request receiving module 801, configured to receive a page access request. When the front-end server accesses the page, a page access request can be sent to the configuration server through the gateway. In an embodiment, the page access request may include information of the requesting web address and the user initiating the access, such as a user name.
An information determining module 802, configured to determine grayscale routing information according to the configured grayscale routing policy and the page access request. And after receiving the page access request, the configuration server determines the gray level routing information according to the gray level routing strategy and the page access request. The grey scale routing information can be used for indicating version information of the accessed page, and the version information comprises a grey scale version and a formal version.
An information sending module 803, configured to send the grayscale routing information. And the configuration server sends the determined gray level routing information to the front-end server, so that the front-end server redirects the page access request to a page corresponding to the gray level version according to the version information indicated by the gray level routing information, or returns page data corresponding to the formal version. It is understood that the above three modules constitute the grayscale control module of the configuration server.
As can be seen from the above description, the embodiment determines whether the page access request needs to be redirected to the page corresponding to the grayscale version based on the version information indicated in the grayscale routing information, and realizes separate grayscale release at the front end, so that the code intrusion is small and the system modification amount is small; and the target website is used for representing the version information to be accessed, the target website is compared with the request website, and whether the gray-scale version or the formal version is to be accessed is determined, so that the method is simple and reliable to realize.
Fig. 9 illustrates an exemplary system architecture 900 of a front-end server or front-end separated gray scale publishing method to which embodiments of the present invention may be applied.
As shown in fig. 9, the system architecture 900 may include end devices 901, 902, 903, networks 904, 906, a front-end server 905, and back- end servers 907, 908, 909. Network 904 is the medium used to provide communication links between terminal devices 901, 902, 903 and front-end server 905. Network 906 serves to provide a medium for communication links between front-end servers 905 and back- end servers 907, 908, 909. The networks 904, 906 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may use the terminal devices 901, 902, 903 to interact with a front-end server 905 over a network 904 to receive or send messages, etc. The terminal devices 901, 902, 903 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 901, 902, 903 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The front-end server 905 may be a server that provides various services, such as a background management server that processes a page access request/service access request sent by a user using the terminal devices 901, 902, 903. The background management server can process the page access request based on the gray scale routing information and feed back a processing result (such as page data) to the terminal device.
The back- end servers 907, 908, 909 may also be servers providing various services, including, for example, configuration servers providing grayscale routing policy configuration, determining grayscale routing information, and backend servers responding to service access requests from front-end servers.
It should be noted that the front-end and back-end separated gray scale distribution method provided in the embodiment of the present application is generally executed by the front-end server 905.
It should be understood that the number of terminal devices, networks, front-end servers, and back-end servers in fig. 9 are merely illustrative. There may be any number of terminal devices, networks, front-end servers, and back-end servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the present invention includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement a front-end and back-end separated gray scale publishing method according to an embodiment of the present invention.
The computer-readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements a front-end and back-end separated gray scale distribution method of an embodiment of the present invention.
Referring now to FIG. 10, shown is a block diagram of a computer system 1000 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU)1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the computer system 1000 are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the I/O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, the processes described above with respect to the main step diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated in the main step diagram. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 1001.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, a receiving module, and a processing module. The names of these modules do not in some cases constitute a limitation on the module itself, for example, the sending module may also be described as a "module sending a page access request".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: sending a page access request; receiving grayscale routing information in response to the page access request; the gray level routing information is determined according to a configured gray level routing strategy and the page access request and is used for indicating version information of the accessed page; and redirecting the page access request to a page corresponding to the gray scale version or returning page data corresponding to a formal version according to the version information indicated by the gray scale routing information.
According to the technical scheme of the embodiment of the invention, whether the page access request needs to be redirected to the page corresponding to the gray level version is determined based on the version information indicated in the gray level routing information, so that the independent gray level issue is realized at the front end, the code intrusion is small, and the system transformation amount is small; and the target website is used for representing the version information to be accessed, the target website is compared with the request website, and whether the gray-scale version or the formal version is to be accessed is determined, so that the method is simple and reliable to realize.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. A front-end and back-end separated gray scale release method is characterized by comprising the following steps:
sending a page access request;
receiving grayscale routing information in response to the page access request; the gray level routing information is determined according to a configured gray level routing strategy and the page access request and is used for indicating version information of the accessed page;
and redirecting the page access request to a page corresponding to the gray scale version or returning page data corresponding to a formal version according to the version information indicated by the gray scale routing information.
2. The method according to claim 1, wherein the grayscale routing information includes a target website corresponding to the version information;
the redirecting the page access request to a page corresponding to a grayscale version or returning page data corresponding to a formal version according to the version information indicated by the grayscale routing information includes:
judging whether the target website is the same as the request website of the page access request;
if the target website is different from the request website, determining that the version information indicated by the gray-scale routing information is a gray-scale version, and redirecting the page access request to a page corresponding to the gray-scale version;
and if the target website is the same as the request website, determining that the version information indicated by the gray-scale routing information is a formal version, and returning page data corresponding to the formal version.
3. The method of claim 1, wherein the grayscale routing information is further used to indicate whether front-end and back-end are simultaneously clipped; the method further comprises the following steps:
receiving a service access request corresponding to the page access request;
determining that the gray routing information indicates simultaneous front and back end cut-off, and if the version information indicated by the gray routing information is a gray version, calling a gray service;
and determining that the gray routing information indicates simultaneous cut-off of the front end and the back end, and the version information indicated by the gray routing information is a formal version, and calling formal service.
4. The method of claim 3, wherein prior to the step of determining that the grayscale routing information indicates a front-end concurrent cut, the method further comprises:
acquiring the gray level routing strategy;
after the step of receiving a service access request corresponding to the page access request, the method further includes:
determining that the gray-scale routing information indicates different switching values at the front end and the rear end, and judging whether the service access request meets the gray-scale routing strategy;
if the service access request meets the gray level routing strategy, calling a gray level service; and if the service access request does not meet the gray-scale routing strategy, calling formal service.
5. The method of claim 3 or 4, wherein said invoking a gray scale service comprises:
modifying the request path of the service access request into a path of a gray level service to obtain a new service access request;
sending the new service access request according to the path of the gray level service;
the calling formal service comprises the following steps:
and sending the service access request according to the request path of the service access request.
6. The method of claim 4, wherein the grayscale routing policy includes at least one of a grayscale whitelist and a grayscale scale;
the determining whether the service access request satisfies the grayscale routing policy includes:
acquiring a set access parameter according to the user identifier of the service access request;
determining that the access parameter exists in the gray white list, or determining that the mapping proportion of the access parameter after the hash module extraction is smaller than the gray proportion, wherein the service access request meets the gray routing strategy;
and determining that the access parameter does not exist in the gray white list, and if the mapping ratio of the access parameter after the hash module extraction is greater than or equal to the gray ratio, the service access request does not meet the gray routing strategy.
7. A front-end and back-end separated gray scale release method is characterized by comprising the following steps:
receiving a page access request;
determining gray level routing information according to the configured gray level routing strategy and the page access request; wherein the grayscale routing information is used to indicate version information of the accessed page;
and sending the gray routing information to enable a front-end server to redirect the page access request to a page corresponding to a gray version or return page data corresponding to a formal version according to version information indicated by the gray routing information.
8. The method of claim 7, wherein determining grayscale routing information based on the configured grayscale routing policy and the page access request comprises:
judging whether the page access request meets the gray level routing strategy or not, and if the page access request meets the gray level routing strategy, determining that the gray level routing information comprises a target website corresponding to a gray level version;
and if the page access request does not meet the gray-scale routing strategy, the determined gray-scale routing information comprises a target website corresponding to the formal version.
9. The method according to claim 7 or 8, wherein the grayscale routing information includes a cut amount flag indicating whether front and back ends are simultaneously cut;
the grayscale routing policy includes at least one of a grayscale whitelist and a grayscale scale.
10. A front-end server for gray scale publishing, comprising:
the request sending module is used for sending a page access request;
the information receiving module is used for receiving the gray level routing information responding to the page access request; the gray level routing information is determined according to a configured gray level routing strategy and the page access request and is used for indicating version information of the accessed page;
and the request processing module is used for redirecting the page access request to a page corresponding to the gray scale version or returning page data corresponding to the formal version according to the version information indicated by the gray scale routing information.
11. A configuration server for gray scale publishing, comprising:
the request receiving module is used for receiving a page access request;
the information determining module is used for determining the gray level routing information according to the configured gray level routing strategy and the page access request; wherein the grayscale routing information is used to indicate version information of the accessed page;
and the information sending module is used for sending the gray routing information so that the front-end server redirects the page access request to a page corresponding to a gray version or returns page data corresponding to a formal version according to version information indicated by the gray routing information.
12. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
13. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202110184906.3A 2021-02-10 2021-02-10 Front-end and back-end separated gray scale publishing method, front-end server and configuration server Pending CN114125067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110184906.3A CN114125067A (en) 2021-02-10 2021-02-10 Front-end and back-end separated gray scale publishing method, front-end server and configuration server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110184906.3A CN114125067A (en) 2021-02-10 2021-02-10 Front-end and back-end separated gray scale publishing method, front-end server and configuration server

Publications (1)

Publication Number Publication Date
CN114125067A true CN114125067A (en) 2022-03-01

Family

ID=80359335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110184906.3A Pending CN114125067A (en) 2021-02-10 2021-02-10 Front-end and back-end separated gray scale publishing method, front-end server and configuration server

Country Status (1)

Country Link
CN (1) CN114125067A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002227A (en) * 2022-05-19 2022-09-02 青岛海尔科技有限公司 User access request response method, storage medium and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099988A (en) * 2014-04-24 2015-11-25 阿里巴巴集团控股有限公司 Method used for supporting gray releasing, access method, devices and system
CN108470001A (en) * 2018-03-16 2018-08-31 北京腾云天下科技有限公司 A kind of web application gray scale dissemination method, server and system
CN109376322A (en) * 2018-09-07 2019-02-22 平安科技(深圳)有限公司 A kind of grayscale version page access method, apparatus, computer equipment and computer storage medium
CN109787830A (en) * 2019-01-21 2019-05-21 北京京东尚科信息技术有限公司 Gray scale distribution control method, device, system, electronic equipment and storage medium
CN109871224A (en) * 2019-02-13 2019-06-11 北京炎黄新星网络科技有限公司 A kind of gray scale dissemination method, system, medium and equipment based on user identifier
CN110661835A (en) * 2018-06-29 2020-01-07 马上消费金融股份有限公司 Gray level publishing method and processing method thereof, node and system and storage device
CN111736853A (en) * 2020-06-24 2020-10-02 中国平安财产保险股份有限公司 Gray scale distribution method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099988A (en) * 2014-04-24 2015-11-25 阿里巴巴集团控股有限公司 Method used for supporting gray releasing, access method, devices and system
CN108470001A (en) * 2018-03-16 2018-08-31 北京腾云天下科技有限公司 A kind of web application gray scale dissemination method, server and system
CN110661835A (en) * 2018-06-29 2020-01-07 马上消费金融股份有限公司 Gray level publishing method and processing method thereof, node and system and storage device
CN109376322A (en) * 2018-09-07 2019-02-22 平安科技(深圳)有限公司 A kind of grayscale version page access method, apparatus, computer equipment and computer storage medium
CN109787830A (en) * 2019-01-21 2019-05-21 北京京东尚科信息技术有限公司 Gray scale distribution control method, device, system, electronic equipment and storage medium
CN109871224A (en) * 2019-02-13 2019-06-11 北京炎黄新星网络科技有限公司 A kind of gray scale dissemination method, system, medium and equipment based on user identifier
CN111736853A (en) * 2020-06-24 2020-10-02 中国平安财产保险股份有限公司 Gray scale distribution method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002227A (en) * 2022-05-19 2022-09-02 青岛海尔科技有限公司 User access request response method, storage medium and electronic device
CN115002227B (en) * 2022-05-19 2024-03-22 青岛海尔科技有限公司 User access request response method, storage medium and electronic device

Similar Documents

Publication Publication Date Title
RU2503056C2 (en) Xml-based web feed for web access of remote sources
CN110120917B (en) Routing method and device based on content
US11134040B2 (en) Managing customer relationship using multiple chat servers designed to interface with service applications
CN110830374B (en) Method and device for gray level release based on SDK
CN109032797A (en) For providing the method and apparatus of web page access
CN106874471B (en) Information pushing method and device
CN107844324B (en) Client page jump processing method and device
US11799849B2 (en) Secure web application delivery platform
CN110990736A (en) Page loading method and device, terminal equipment and storage medium
CN115668894A (en) Service worker configured to service a plurality of single-page applications
US8972477B1 (en) Offline browsing session management
CN112579928A (en) Page jump method, page jump device, computer equipment and computer readable storage medium
CN114125067A (en) Front-end and back-end separated gray scale publishing method, front-end server and configuration server
CN113760274B (en) Front-end assembly logic injection method and device
CN114186156A (en) Access method, device, medium and equipment for sub-application
CN116861397A (en) Request processing method, device, electronic equipment and computer readable medium
CN112929453A (en) Method and device for sharing session data
CN113779122A (en) Method and apparatus for exporting data
CN112000313A (en) Request response method, device, equipment and storage medium
CN112306984A (en) Data source routing method and device
CN115577200B (en) Page loading method, device, equipment and storage medium
CN113901377B (en) Service calling method, device, storage medium and equipment of legacy system
CN108984189B (en) Module parsing method and device
CN111291284A (en) Method and device for redirecting multi-level page
CN115146202A (en) Page form generation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination