WEB terminal grayscale publishing method, device and system
By obtaining and matching the access request and grayscale parameters of the WEB side, using the SDK to generate grayscale version information, the problem of grayscale release failure under the CDN cache strategy is solved, flexible grayscale release and local control are realized, and grayscale release is improved. flexibility.
Patent Information
- Application Number
- CN202011339170.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-25
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-11-25
AI Technical Summary
The existing technology cannot realize grayscale release when using CDN cache strategy, and local grayscale strategy cannot be implemented, and the applied grayscale objects, grayscale rules and grayscale results cannot be controlled, making the grayscale release more flexible. Low.
By obtaining access requests and grayscale parameters of the WEB side, using the SDK to generate matching grayscale version information, and obtain and load the traffic entrance file and static resource file of the target grayscale version in the CDN or server to realize grayscale release, and accordingly, the traffic entrance file of the target grayscale version is obtained and Pre-configured grayscale pre-operations and rules perform local grayscale policy control.
Grayscale release is realized while adopting the CDN cache strategy, and the flexibility of grayscale release is improved, ensuring that users can obtain the correct traffic entrance files and can control local grayscale policy according to grayscale rules.
Smart Images

Figure CN112486550B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a WEB-side grayscale publishing method, device and system. Background Art
[0002] Grayscale release (also known as canary release) is a release method that can smoothly transition between black and white. A / B testing can be performed on it, that is, some users continue to use product feature A, and some users start using product feature B. If users have no objection to B, then gradually expand the scope and migrate all users to B. Grayscale release can ensure the stability of the overall system. Problems can be discovered and adjusted during the initial grayscale to ensure their impact.
[0003] In the prior art, the grayscale of the WEB side is mostly controlled by the Nginx server, and the traffic is diverted according to the Nginx server to select a certain grayscale version. However, if the network traffic adopts the CDN cache strategy, some cached files will no longer be requested to the Nginx server, which will cause the grayscale to fail. However, if the CDN cache strategy is not adopted, it will cause excessive pressure on the server and be unable to carry online traffic. In addition, in the prior art, it is impossible to implement a local grayscale strategy, and the grayscale objects, grayscale rules and grayscale results of the application cannot be controlled, which makes the flexibility of grayscale release low.
[0004] Therefore, how to achieve grayscale publishing and improve the flexibility of grayscale publishing while adopting the CDN caching strategy is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a WEB-side grayscale publishing method, device and system to solve the problem that grayscale publishing cannot be achieved when using a CDN caching strategy in the prior art, and that local grayscale strategies cannot be implemented in the prior art, and the grayscale objects, grayscale rules and grayscale results of the application cannot be controlled, resulting in low flexibility of grayscale publishing.
[0006] To achieve the above objectives, the present invention adopts the following technical solutions:
[0007] A method for grayscale publishing on a web terminal, comprising:
[0008] Get the access request carrying the access identifier sent by the current WEB client;
[0009] Obtaining a grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end;
[0010] According to the grayscale parameters and the pre-acquired grayscale rules, the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request is matched to determine the target grayscale version information corresponding to the current WEB end;
[0011] The target grayscale version information is sent to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the corresponding version of the target grayscale version information from the CDN or server.
[0012] Furthermore, in the above-mentioned WEB end grayscale publishing method, before obtaining the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation on the current WEB end, it also includes:
[0013] The pre-configured grayscale pre-operation information and the pre-configured grayscale rule corresponding to the grayscale pre-operation are obtained.
[0014] Furthermore, in the above-mentioned WEB end grayscale publishing method, before obtaining the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation on the current WEB end, it also includes:
[0015] Bind the domain name automatically claimed by SDK using pre-acquired application information;
[0016] Initialize the current environment;
[0017] Obtain the preset version information and the traffic entry file corresponding to the version information, and generate a grayscale version corresponding to the traffic entry file based on the SDK;
[0018] The grayscale version includes: the traffic entry file and the currently released version content; the version content includes: the static resource file of the corresponding version currently released.
[0019] Furthermore, in the above-mentioned WEB-side grayscale publishing method, before matching the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request according to the grayscale parameters and the pre-acquired grayscale rules, and determining the target grayscale version information corresponding to the current WEB side, it also includes:
[0020] According to the grayscale rule, determining whether the grayscale parameter is within the grayscale operation range;
[0021] Correspondingly, according to the grayscale parameters and the pre-acquired grayscale rules, the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request is matched to determine the target grayscale version information corresponding to the current WEB end, including:
[0022] If the grayscale parameter is within the grayscale operation range, the grayscale version generated based on the SDK corresponding to the current traffic entry file that matches the access request is matched according to the grayscale parameter and the pre-acquired grayscale rules to determine the target grayscale version information corresponding to the current WEB end.
[0023] Furthermore, the above-mentioned WEB-side grayscale publishing method also includes:
[0024] If the grayscale parameter is not within the grayscale operation range, the original version information is sent to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file corresponding to the original version information from the CDN or server.
[0025] The present invention also provides a WEB-side grayscale publishing device, comprising: a first acquisition module, a second acquisition module, a grayscale version matching module and a sending module;
[0026] The first acquisition module is used to acquire the access request carrying the access identifier sent by the current WEB end;
[0027] The second acquisition module is used to acquire the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end;
[0028] The grayscale version matching module is used to match the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request according to the grayscale parameters and the pre-acquired grayscale rules, and determine the target grayscale version information corresponding to the current WEB end;
[0029] The sending module is used to send the target grayscale version information to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the corresponding version of the target grayscale version information from the CDN or server.
[0030] Furthermore, the above-mentioned WEB-side grayscale publishing device further includes: a third acquisition module;
[0031] The third acquisition module is used to acquire pre-configured grayscale pre-operation information and pre-configured grayscale rules corresponding to the grayscale pre-operation.
[0032] Furthermore, the above-mentioned WEB-side grayscale publishing device also includes: a binding module, an initialization module and a grayscale version generation module;
[0033] The binding module is used to bind the domain name automatically claimed based on the SDK using the pre-acquired application information;
[0034] The initialization module is used to initialize the current environment;
[0035] The grayscale version generation module is used to obtain the preset version information and the traffic entry file corresponding to the version information, and generate a grayscale version corresponding to the traffic entry file based on the SDK; the grayscale version includes: the traffic entry file and the currently released version content; the version content includes: the static resource file of the corresponding version currently released.
[0036] Furthermore, the above-mentioned WEB-side grayscale publishing device also includes: a judgment module;
[0037] The judging module is used to judge whether the grayscale parameter is within the grayscale operation range according to the grayscale rule;
[0038] The grayscale version matching module is specifically used to match the grayscale version generated based on the SDK corresponding to the current traffic entry file that matches the access request if the grayscale parameter is within the grayscale operation range, according to the grayscale parameter and the pre-acquired grayscale rules, to determine the target grayscale version information corresponding to the current WEB end.
[0039] The present invention also provides a WEB-side grayscale publishing system, comprising: a processor and a memory connected to the processor;
[0040] The memory is used to store a computer program, and the computer program is at least used to execute the above-mentioned WEB-side grayscale publishing method;
[0041] The processor is used for calling and executing the computer program.
[0042] A method, device and system for grayscale publishing on a WEB end, which obtains an access request carrying an access identifier sent by the current WEB end; obtains the grayscale parameters corresponding to the current WEB end determined by the current WEB end through grayscale pre-operation; matches the grayscale version generated based on SDK corresponding to the current traffic entry file matching the access request according to the grayscale parameters and the pre-acquired grayscale rules, and determines the target grayscale version information corresponding to the current WEB end; sends the target grayscale version information to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the version corresponding to the target grayscale version information from the CDN or server. By adopting the technical solution of the present invention, the target grayscale version information can be determined first, and then the traffic entry file and static resource file of the version corresponding to the target grayscale version information can be obtained and loaded from the CDN or server according to the target grayscale version information, wherein different versions of traffic entry files and static resource files are in different folders, and even if the CDN caches the static resource files, the user can obtain the correct traffic entry file, thereby realizing grayscale publishing when the CDN cache strategy is adopted. Furthermore, a local grayscale strategy can be implemented according to the obtained pre-configured grayscale pre-operation and grayscale rules to control the grayscale distribution, thereby improving the flexibility of grayscale publishing.
[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 It is a flow chart provided by an embodiment of the WEB-side grayscale publishing method of the present invention;
[0046] Figure 2 It is a structural diagram provided by an embodiment of a WEB-side grayscale publishing device of the present invention;
[0047] Figure 3 It is a structural diagram provided by an embodiment of the WEB-side grayscale publishing system of the present invention. DETAILED DESCRIPTION
[0048] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0049] Figure 1 This is a flow chart provided by an embodiment of the WEB-side grayscale publishing method of the present invention. Figure 1 As shown, the WEB-side grayscale publishing method of this embodiment specifically includes the following steps:
[0050] S101, obtaining an access request carrying an access identifier sent by the current WEB terminal;
[0051] In this embodiment, the user can send an access request through the WEB terminal, and the access request carries an access identifier. The access identifier can be a URL address of a website, etc. The server obtains the access request carrying the access identifier sent by the current WEB terminal. The server is preferably an Nginx server.
[0052] S102, obtaining the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end;
[0053] After the user sends an access request through the current WEB end, the current WEB end will perform a grayscale pre-operation, wherein the grayscale pre-operation is a custom operation that can be pre-configured by the user or developer, and the user can directly configure the grayscale pre-operation through the current WEB end. After the current WEB end performs the grayscale pre-operation, the grayscale parameters corresponding to the current WEB end will be determined. Among them, the grayscale pre-operation can be an operation to obtain user information, an operation to obtain browser information, and an operation to obtain operating system information. The corresponding grayscale parameters can be the user information, browser information, and operating system information corresponding to the current WEB end. In this embodiment, the server can obtain the grayscale parameters corresponding to the current WEB end determined by the current WEB end through the grayscale pre-operation.
[0054] S103, according to the grayscale parameters and the pre-acquired grayscale rules, the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request is matched, and the target grayscale version information corresponding to the current WEB end is determined;
[0055] In this embodiment, the user or developer can also pre-set grayscale rules, wherein the grayscale rules can be set according to grayscale parameters or can be set independently. The user can specify that the value of any key is equal to, contains, is greater than or is less than the grayscale parameters or the parameters set independently. After the grayscale rules are set, the current WEB end can send the grayscale rules to the server. In addition, the server also stores the grayscale versions corresponding to each pre-created traffic entry file, wherein the grayscale versions are generated based on the software development kit SDK. The server can determine the current traffic entry file that matches the access request obtained in the above step, and match all grayscale versions corresponding to the current traffic entry file according to the grayscale parameters and grayscale rules, and match the target grayscale version information corresponding to the current WEB end from all grayscale versions corresponding to the current traffic entry file. When matching, it is necessary to match the target grayscale version information that matches the grayscale parameters according to the grayscale rules.
[0056] S104. Send the target grayscale version information to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the version corresponding to the target grayscale version information from the CDN or server.
[0057] After the server determines the target grayscale version information corresponding to the current WEB end, it sends the target grayscale version information to the current WEB end. The current WEB end obtains the traffic entry file and static resource file of the corresponding version of the target grayscale version information from the CDN based on the target grayscale version information. If the above files are not cached in the CDN, the CDN requests the server to return the source to obtain the above files from the server. After the current WEB end obtains the traffic entry file and static resource file of the corresponding version of the target grayscale version information, it loads the above files to complete the grayscale release operation. Among them, the traffic entry file and the corresponding version of the static resource file are stored in the folder of the corresponding version, and different versions of the grayscale version include the corresponding version of the traffic entry file and static resource file.
[0058] The grayscale publishing method of the WEB end of this embodiment obtains the access request carrying the access identifier sent by the current WEB end; obtains the grayscale parameters corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end; matches the grayscale version generated based on the SDK corresponding to the current traffic entry file that matches the access request according to the grayscale parameters and the pre-acquired grayscale rules, and determines the target grayscale version information corresponding to the current WEB end; sends the target grayscale version information to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the version corresponding to the target grayscale version information from the CDN or server. Using the technical solution of this embodiment, the target grayscale version information can be determined first, and then the traffic entry file and static resource file of the version corresponding to the target grayscale version information can be obtained and loaded from the CDN or server according to the target grayscale version information, wherein different versions of traffic entry files and static resource files are in different folders, and even if the CDN caches the static resource files, the user can obtain the correct traffic entry file, thereby realizing grayscale publishing when the CDN cache strategy is adopted. Furthermore, a local grayscale strategy can be implemented according to the obtained pre-configured grayscale pre-operation and grayscale rules to control the grayscale distribution, thereby improving the flexibility of grayscale publishing.
[0059] Furthermore, the WEB end grayscale publishing method of this embodiment, before obtaining the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end, further includes:
[0060] The pre-configured grayscale pre-operation information and the pre-configured grayscale rule corresponding to the grayscale pre-operation are obtained.
[0061] Users or developers can pre-configure grayscale pre-operation information and grayscale rules, and the server obtains the pre-configured grayscale pre-operation information and grayscale rules sent by the current WEB end. Users and developers can implement local grayscale strategies by pre-configuring grayscale pre-operation information and grayscale rules, control grayscale objects, grayscale rules and grayscale results, and improve the flexibility of grayscale publishing.
[0062] Furthermore, the WEB end grayscale publishing method of this embodiment, before obtaining the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end, further includes:
[0063] First, bind the domain name automatically claimed by SDK using pre-acquired application information;
[0064] This embodiment can use SDK to create an application based on the application information pre-entered by the developer, and automatically apply for a domain name. The server binds the domain name to achieve domain name mapping.
[0065] Second, initialize the current environment;
[0066] After completing the domain name application and binding, initialize the current environment of the server. For example, if the server is an Nginx server, initialize the environment on the Nginx server. After completing the environment initialization, you can push the traffic entry file to the directory mapped by the Nginx server to create the application.
[0067] Third, obtain the preset version information and the traffic entry file corresponding to the version information, and generate a grayscale version corresponding to the traffic entry file based on the SDK;
[0068] After completing the application creation, the developer can enter the version information and push the traffic entry file corresponding to the version information to the server. The server uses the SDK to generate the grayscale version corresponding to the traffic entry file based on the obtained version information and the traffic entry file corresponding to the version information, thereby realizing the generation of the grayscale version. Among them, the grayscale version includes the traffic entry file and the currently released version content; the version content includes the static resource file of the corresponding version currently released. And the version content carries the currently released version identifier. Developers can create multiple grayscale versions with different version identifiers based on each traffic entry file.
[0069] Furthermore, this embodiment can also perform a deletion operation on the grayscale version, thereby deleting all files corresponding to the grayscale version and taking the version offline.
[0070] Furthermore, the WEB-side grayscale publishing method of this embodiment, before matching the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request according to the grayscale parameters and the pre-acquired grayscale rules, and determining the target grayscale version information corresponding to the current WEB side, further includes:
[0071] According to the grayscale rule, determine whether the grayscale parameters are within the grayscale operation range.
[0072] In this embodiment, the grayscale rule can be set according to the grayscale parameter setting or can be set autonomously. The user can specify that the value of any key is equal to, contains, is greater than or is less than the grayscale parameter or the autonomously set parameter. Therefore, the server can determine whether the grayscale parameter obtained in the above step is within the grayscale operation range specified by the grayscale rule, where the grayscale operation range is the range of the WEB end that needs to perform grayscale operation specified by the grayscale rule. If the server determines whether the grayscale parameter obtained in the above step is within the grayscale operation range specified by the grayscale rule, step S103 is executed.
[0073] In this embodiment, the grayscale rule can set the grayscale operation range according to the number of grayscale versions corresponding to the current traffic entry file. For example, if there is only one grayscale version corresponding to the current traffic entry file, set the range of grayscale parameters greater than the preset parameters as the grayscale operation range, and the range not greater than the preset parameters as the non-grayscale operation range. If the grayscale parameters obtained in advance are within the grayscale operation range, the target grayscale version information corresponding to the current WEB end can be determined based on the unique grayscale version; if there are multiple grayscale versions corresponding to the current traffic entry file, the grayscale rule will divide the grayscale operation range in detail, and define the range corresponding to each grayscale version, and then match the grayscale parameters with the detailed divided range to determine the target grayscale version information.
[0074] Furthermore, if the grayscale parameter is not within the grayscale operation range (i.e., within the non-grayscale operation range), it means that the current WEB end corresponding to the grayscale parameter does not need to perform grayscale operation, so the current WEB end needs to work according to the original version. Then, the server needs to send the original version information to the current WEB end, so that the current WEB end can obtain and load the traffic entry file and static resource file of the version corresponding to the original version information from the CDN or the server. Among them, the current WEB end needs to first obtain the traffic entry file and static resource file of the version corresponding to the original version information from the CDN. If the above files are not cached in the CDN, then the CDN will request the server to return to the source, thereby obtaining the above files from the server, so that the current WEB end can load the above files and complete the page display. With this embodiment, local grayscale control can be performed on the WEB end to improve the flexibility of grayscale publishing.
[0075] For the purpose of being more comprehensive, corresponding to the WEB-side grayscale publishing method provided in the embodiment of the present invention, the present application also provides a WEB-side grayscale publishing device.
[0076] Figure 2 FIG. 1 is a schematic diagram of a structure provided by an embodiment of a WEB-side grayscale publishing device of the present invention. Figure 2 As shown, the WEB-side grayscale publishing device of this embodiment includes a first acquisition module 101 , a second acquisition module 102 , a grayscale version matching module 103 and a sending module 104 .
[0077] The first acquisition module 101 is used to acquire the access request carrying the access identifier sent by the current WEB end;
[0078] The second acquisition module 102 is used to acquire the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end;
[0079] The grayscale version matching module 103 is used to match the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request according to the grayscale parameters and the pre-acquired grayscale rules, and determine the target grayscale version information corresponding to the current WEB end;
[0080] The sending module 104 is used to send the target grayscale version information to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the corresponding version of the target grayscale version information from the CDN or server.
[0081] The WEB-side grayscale publishing device of this embodiment, the first acquisition module 101 acquires the access request carrying the access identifier sent by the current WEB end; the second acquisition module 102 acquires the grayscale parameters corresponding to the current WEB end determined by the current WEB end through the grayscale pre-operation; the grayscale version matching module 103 matches the grayscale version generated based on the SDK corresponding to the current traffic entry file that matches the access request according to the grayscale parameters and the pre-acquired grayscale rules, and determines the target grayscale version information corresponding to the current WEB end; the sending module 104 sends the target grayscale version information to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the version corresponding to the target grayscale version information from the CDN or server. By adopting the technical solution of this embodiment, the target grayscale version information can be determined first, and then the traffic entry file and static resource file of the corresponding version of the target grayscale version information can be obtained and loaded from the CDN or server according to the target grayscale version information, wherein different versions of traffic entry files and static resource files are in different folders, and even if the CDN caches the static resource files, the user can obtain the correct traffic entry file, thereby realizing grayscale release under the condition of adopting the CDN cache strategy. In addition, the local grayscale strategy can be implemented according to the obtained pre-configured grayscale pre-operation and grayscale rules, and the grayscale distribution can be controlled, thereby improving the flexibility of grayscale release.
[0082] Furthermore, the WEB-side grayscale publishing device of this embodiment also includes a third acquisition module.
[0083] The third acquisition module is used to acquire pre-configured grayscale pre-operation information and pre-configured grayscale rules corresponding to the grayscale pre-operation.
[0084] Furthermore, the WEB-side grayscale publishing device of this embodiment further includes: a binding module, an initialization module and a grayscale version generation module;
[0085] A binding module is used to bind domain names automatically claimed based on SDK using pre-acquired application information;
[0086] Initialization module, used to initialize the current environment;
[0087] The grayscale version generation module is used to obtain the preset version information and the traffic entry file corresponding to the version information, and generate the grayscale version corresponding to the traffic entry file based on the SDK; the grayscale version includes: the traffic entry file and the currently released version content; the version content includes: the static resource file of the corresponding version currently released.
[0088] Furthermore, the WEB-side grayscale publishing device of this embodiment further includes: a judgment module;
[0089] A judgment module, used to judge whether the grayscale parameter is within the grayscale operation range according to the grayscale rule;
[0090] The grayscale version matching module is specifically used to match the grayscale version generated based on the SDK corresponding to the current traffic entry file that matches the access request if the grayscale parameters are within the grayscale operation range, according to the grayscale parameters and the pre-acquired grayscale rules, to determine the target grayscale version information corresponding to the current WEB end.
[0091] Furthermore, in the WEB-side grayscale publishing device of this embodiment, the sending module 104 is also used to send the original version information to the current WEB end if the grayscale parameters are not within the grayscale operation range, so that the current WEB end obtains and loads the traffic entry file and static resource file corresponding to the original version information from the CDN or server.
[0092] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0093] Figure 3 FIG. 1 is a schematic diagram of a structure provided by an embodiment of a WEB-side grayscale publishing system of the present invention. Figure 3 As shown, the WEB-side grayscale publishing system of this embodiment includes a processor 21 and a memory 22 connected to the processor 21;
[0094] The memory 22 is used to store a computer program, and the computer program is at least used to execute the WEB-side grayscale publishing method of the above embodiment;
[0095] The processor 21 is used to call and execute the computer program.
[0096] The WEB-side grayscale publishing system of this embodiment can first determine the target grayscale version information, and then obtain and load the traffic entry file and static resource file of the corresponding version of the target grayscale version information from the CDN or server according to the target grayscale version information, wherein different versions of traffic entry files and static resource files are in different folders, and even if the CDN caches the static resource files, the user can obtain the correct traffic entry file, thereby realizing grayscale publishing under the condition of adopting the CDN cache strategy. In addition, it is also possible to implement a local grayscale strategy based on the obtained pre-configured grayscale pre-operation and grayscale rules, realize the control of grayscale distribution, and improve the flexibility of grayscale publishing.
[0097] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0098] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0099] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0100] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0101] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0102] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0103] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0104] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0105] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for grayscale publishing on a WEB terminal, characterized in that: include: Get the access request carrying the access identifier sent by the current WEB client; Obtaining a grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end; According to the grayscale parameters and the pre-acquired grayscale rules, the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request is matched to determine the target grayscale version information corresponding to the current WEB end; Sending the target grayscale version information to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the version corresponding to the target grayscale version information from the CDN; According to the grayscale parameters and the pre-acquired grayscale rules, matching the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request, and determining the target grayscale version information corresponding to the current WEB end, it also includes: According to the grayscale rule, determining whether the grayscale parameter is within the grayscale operation range; Correspondingly, according to the grayscale parameters and the pre-acquired grayscale rules, the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request is matched to determine the target grayscale version information corresponding to the current WEB end, including: If the grayscale parameter is within the grayscale operation range, then according to the grayscale parameter and the pre-acquired grayscale rule, the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request is matched to determine the target grayscale version information corresponding to the current WEB end; Also includes: If the grayscale parameter is not within the grayscale operation range, the original version information is sent to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the version corresponding to the original version information from the CDN; Before obtaining the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation on the current WEB end, the method further includes: Obtaining pre-configured grayscale pre-operation information and pre-configured grayscale rules corresponding to the grayscale pre-operation; Before obtaining the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation on the current WEB end, the method further includes: Bind the domain name automatically claimed by SDK using pre-acquired application information; Initialize the current environment; Obtain the preset version information and the traffic entry file corresponding to the version information, and generate a grayscale version corresponding to the traffic entry file based on the SDK; The gray version includes: the traffic entry file and the currently released version content; the version content includes: the static resource file of the corresponding version currently released; Among them, different versions of traffic entry files and static resource files are in different folders. Even if CDN caches the static resource files, users can obtain the correct traffic entry files, thereby achieving grayscale release when using the CDN cache strategy.
2. A WEB-side grayscale publishing device, applied to a WEB-side grayscale publishing method as claimed in claim 1, characterized in that: include: A first acquisition module, a second acquisition module, a grayscale version matching module and a sending module; The first acquisition module is used to acquire the access request carrying the access identifier sent by the current WEB end; The second acquisition module is used to acquire the grayscale parameter corresponding to the current WEB end determined by the grayscale pre-operation of the current WEB end; The grayscale version matching module is used to match the grayscale version generated based on the SDK corresponding to the current traffic entry file matching the access request according to the grayscale parameters and the pre-acquired grayscale rules, and determine the target grayscale version information corresponding to the current WEB end; The sending module is used to send the target grayscale version information to the current WEB end, so that the current WEB end obtains and loads the traffic entry file and static resource file of the corresponding version of the target grayscale version information from the CDN or server.
3. The WEB-side grayscale publishing device according to claim 2, characterized in that: Also includes: The third acquisition module; The third acquisition module is used to acquire pre-configured grayscale pre-operation information and pre-configured grayscale rules corresponding to the grayscale pre-operation.
4. The WEB-side grayscale publishing device according to claim 2, characterized in that: Also includes: Binding module, initialization module and grayscale version generation module; The binding module is used to bind the domain name automatically claimed based on the SDK using the pre-acquired application information; The initialization module is used to initialize the current environment; The grayscale version generation module is used to obtain the preset version information and the traffic entry file corresponding to the version information, and generate the grayscale version corresponding to the traffic entry file based on the SDK; The grayscale version includes: the traffic entry file and the currently released version content; the version content includes: the static resource file of the corresponding version currently released.
5. The WEB-side grayscale publishing device according to claim 2, characterized in that: Also includes: Judgment module; The judging module is used to judge whether the grayscale parameter is within the grayscale operation range according to the grayscale rule; The grayscale version matching module is specifically used to match the grayscale version generated based on the SDK corresponding to the current traffic entry file that matches the access request if the grayscale parameter is within the grayscale operation range, according to the grayscale parameter and the pre-acquired grayscale rules, to determine the target grayscale version information corresponding to the current WEB end.
6. A WEB-side grayscale publishing system, characterized in that: include: A processor and a memory connected to the processor; The memory is used to store a computer program, and the computer program is at least used to execute the WEB-side grayscale publishing method according to claim 1; The processor is used for calling and executing the computer program.
