A page management method and device
By receiving page requests in the H5 mobile application and determining whether the user ID is in the whitelist configuration item, it solves the problem of difficulty in providing an online verification environment and unsatisfactory extraction of new and old page traffic data, and achieves reduced R&D and maintenance costs and control. The effect of the new page's online coverage.
Patent Information
- Application Number
- CN202010389911.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-09
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2040-05-09
AI Technical Summary
The prior art is difficult to provide an online verification environment and unsatisfactory data extraction of new and old pages in H5 mobile applications.
By receiving the page request, we obtain the user ID and the path information of the request address, determine whether the user ID is in the whitelist configuration item, and return the new version of the page or the old version of the page based on the judgment result.
It provides an online testing and verification environment, reduces R&D and maintenance costs, and extracts the traffic data of the new and old versions of the page in the same environment. Subsequently, the online coverage of the new version of the page can be controlled based on the traffic data ratio.
Smart Images

Figure CN113626068B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a page management method and device. Background Art
[0002] There is often a need to revise existing pages in H5 mobile applications. There are currently two main ways to achieve this:
[0003] Method 1: Under the premise of ensuring that the request link accessed by the user remains unchanged, the jump logic of the request link is processed to replace the page template address returned to the user from the old version to the new version. After the requirement is completed and launched, the user can view the new version of the page by accessing the original request link, but cannot view the old version of the page.
[0004] Method 2: Provide a new request link that directly points to the page template address of the new version of the page. After the requirement is completed and launched, users can view the new version of the page by accessing the new request link, and can also view the old version of the page by accessing the old request link.
[0005] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems:
[0006] The first method of replacing the old version with the new one and launching the entire version online cannot provide an online verification environment for testing, nor can it extract the traffic data (such as clicks / views) of the old version of the page in the same environment (referring to the production environment of the mobile application). Therefore, it is difficult to explain the positive conversion rate brought by the new version of the page being better than the old version of the page.
[0007] The second method of coexistence of the old and new pages also cannot provide an online verification environment for testing. Although the traffic data of the new and old versions of the pages can be extracted in the same environment, the new and old pages are running online at the same time. Accessing different request links may reduce the user experience, increase R&D and maintenance costs, and occupy excessive system resources. Summary of the invention
[0008] In view of this, an embodiment of the present invention provides a page management method and device, which can at least solve the problem that the prior art cannot provide an online verification environment and the extraction of new and old page traffic data is not ideal.
[0009] To achieve the above object, according to one aspect of an embodiment of the present invention, a page management method is provided, comprising:
[0010] Receive a page request, and obtain the user identifier and path information of the request address contained in the page request;
[0011] Obtaining a whitelist configuration item from a configuration service through a controller corresponding to the path information; wherein the controller is located in the server and is used to process business logic;
[0012] It is determined whether the user identifier has been configured in the whitelist configuration item, and whether to return to the new version page or the old version page according to the determination result.
[0013] Optionally, before obtaining the whitelist configuration item from the configuration service, the method further includes:
[0014] Obtain qualification information corresponding to the user identifier, verify the qualification information based on the qualification verification logic of the application, and if the verification fails, return an exception page and jump out of the controller; wherein the page request is a request to load a page in the application.
[0015] Optionally, the determining whether the user identifier has been configured in the whitelist configuration item further includes:
[0016] The user identifier in the page request is preprocessed according to the preset format of the user identifier in the whitelist configuration item, and then it is determined whether the preprocessed user identifier has been configured in the whitelist configuration item.
[0017] Optionally, the configuration service further includes a cut amount configuration item, the cut amount configuration item includes a cut amount threshold, and the cut amount threshold represents the online coverage of the new version of the page;
[0018] Determining whether to return to the new version page or the old version page according to the judgment result includes:
[0019] If the result of the judgment is that it exists, return to the new version page;
[0020] If the judgment result is that it does not exist, the user identifier is processed based on a hash function to obtain a cut value, and it is judged whether the cut value is greater than the cut threshold;
[0021] If it is greater, it is determined that the user is not targeted and the old version of the page is returned; otherwise, the new version of the page is returned.
[0022] Optionally, also include:
[0023] According to the returned new version page or old version page, the first flow of the new version page and the second flow of the old version page within a predetermined time period are counted;
[0024] Calculating a ratio of the first flow rate to the second flow rate, determining a ratio range of the ratio and a first cut-off threshold corresponding to the ratio range;
[0025] If the first cut amount threshold is different from the cut amount threshold, the cut amount threshold is replaced with the first cut amount threshold.
[0026] To achieve the above object, according to another aspect of an embodiment of the present invention, a page management device is provided, comprising:
[0027] A receiving module, used for receiving a page request and obtaining the user identification and path information of the request address contained in the page request;
[0028] An acquisition module, used to acquire whitelist configuration items from a configuration service through a controller corresponding to the path information; wherein the controller is located in the server and is used to process business logic;
[0029] The judgment module is used to judge whether the user identification has been configured in the whitelist configuration item, and then determine whether to return to the new version page or the old version page according to the judgment result.
[0030] Optionally, a verification module is also included, which is used to:
[0031] Obtain qualification information corresponding to the user identifier, verify the qualification information based on the qualification verification logic of the application, and if the verification fails, return an exception page and jump out of the controller; wherein the page request is a request to load a page in the application.
[0032] Optionally, the judging module is further used to:
[0033] The user identifier in the page request is preprocessed according to the preset format of the user identifier in the whitelist configuration item, and then it is determined whether the preprocessed user identifier has been configured in the whitelist configuration item.
[0034] Optionally, the configuration service further includes a cut amount configuration item, the cut amount configuration item includes a cut amount threshold, and the cut amount threshold represents the online coverage of the new version of the page;
[0035] The judging module is used for:
[0036] If the result of the judgment is that it exists, return to the new version page;
[0037] If the judgment result is that it does not exist, the user identifier is processed based on a hash function to obtain a cut value, and it is judged whether the cut value is greater than the cut threshold;
[0038] If it is greater, it is determined that the user is not targeted and the old version of the page is returned; otherwise, the new version of the page is returned.
[0039] Optionally, an update module is also included to:
[0040] According to the returned new version page or old version page, the first flow of the new version page and the second flow of the old version page within a predetermined time period are counted;
[0041] Calculating a ratio of the first flow rate to the second flow rate, determining a ratio range of the ratio and a first cut-off threshold corresponding to the ratio range;
[0042] If the first cut amount threshold is different from the cut amount threshold, the cut amount threshold is replaced with the first cut amount threshold.
[0043] To achieve the above objective, according to another aspect of an embodiment of the present invention, a page management electronic device is provided.
[0044] The electronic device of the embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the page management methods described above.
[0045] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above page management methods is implemented.
[0046] According to the solution provided by the present invention, an embodiment of the above invention has the following advantages or beneficial effects: it is also applicable to the situation where new and old pages coexist, whitelisted or targeted users access the new version of the page, and non-whitelisted and non-targeted users access the old version of the page. Only one request link, two judgments and fewer processing steps are required to complete the determination and return of the new version page / old version page, providing an online testing and verification environment and reducing R&D and maintenance costs; traffic data of the new and old versions of the pages can be extracted in the same environment, and the online coverage of the new version of the page can be controlled based on the ratio of the traffic data of the two.
[0047] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0049] Figure 1 This is a schematic diagram of the main process of a page management method according to an embodiment of the present invention;
[0050] Figure 2 is a flow chart of an optional page management method according to an embodiment of the present invention;
[0051] Figure 3 is a flowchart of another optional page management method according to an embodiment of the present invention;
[0052] Figure 4is a schematic diagram of main modules of a page management device according to an embodiment of the present invention;
[0053] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0054] Figure 6 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0056] The full launch mentioned in the present invention can be understood as all business functions are online, that is, the code has been deployed on all online servers of the current application, and users can access the business functions implemented by the code.
[0057] The online environment mentioned here is the production environment. The actual test environment is not the real application environment. Even if the test data is created through mock, it is difficult to cover all business scenarios. Using real data in the online environment can effectively test the online functions of the page.
[0058] See also Figure 1 , which shows a main flow chart of a page management method provided by an embodiment of the present invention, including the following steps:
[0059] S101: receiving a page request, and obtaining a user identifier and path information of a request address included in the page request;
[0060] S102: Obtaining a whitelist configuration item from a configuration service through a controller corresponding to the path information; wherein the controller is located in the server and is used to process business logic;
[0061] S103: Determine whether the user identifier has been configured in the whitelist configuration item, and then determine whether to return to the new version page or the old version page according to the determination result.
[0062] In the above implementation, for step S101, whitelist function: the user unique identifier is configured in the whitelist configuration item, and such users can directly view the new version of the page. The whitelist function is used to provide an online verification environment for testing.
[0063] When a user accesses the URL address of an H5 mobile application or an H5 page, the server receives a page request for the page (such as an http request) and obtains the user ID contained in the request, the path information of the request address, etc. The user ID represents the unique identity information of the user in the mobile application, which can be a user account, such as the user name displayed in Application A-Settings-Account Settings.
[0064] For steps S102 and S103, the server searches for the specified controller through the path information in the request address. If the specified controller is not found, a system error page is returned. If the specified controller is found, the business code in the controller is continued to be executed.
[0065] The controller is set in advance for the same path, for example, the path hao.xxx.com-controller 1-query function controller 1.1, add, delete and modify function controller 1.2 in https: / / hao.xxx.com / ?wd=1001.
[0066] First, verify the legitimacy of the user ID. If the verification fails, it means that the user ID does not exist in the current application database and its qualification information (such as credit score, real name) does not meet the standards. Even if the user can access the new version of the page, the page will not show any recommended information related to the user or the user can view but cannot enjoy the benefits, so if the verification fails, it will directly return to the abnormal page and jump out of the controller.
[0067] Then determine whether the user ID is in the whitelist configuration item, and obtain the whitelist configuration item from the zookeeper (or other configuration system) configuration service:
[0068] 1) If it exists, the page template address returned to the user is the new version page address, and the user can view the new version page;
[0069] 2) If it does not exist, you need to further determine the user ID. For details, see the following Figure 2 Description shown.
[0070] Furthermore, the configuration content in the whitelist configuration item is the user ID, which is usually configured in a specified format, such as a comma-separated string, such as user-176, user-021. Therefore, before determining whether the current user ID is in the whitelist configuration item, the current user ID needs to be formatted according to the predetermined format.
[0071] The method provided in the above embodiment also provides a way for new and old pages to coexist. For the same request link, whether the new version page or the old version page is returned can be determined based on whether its user identifier is in the whitelist. Compared with the existing technology, it effectively reduces the R&D / maintenance cost and resource usage, and solves the problem of not being able to provide an online verification environment for testing.
[0072] See also Figure 2 , shows a schematic flow chart of an optional page management method according to an embodiment of the present invention, comprising the following steps:
[0073] S201: receiving a page request, and obtaining a user identifier and path information of a request address included in the page request;
[0074] S202: Obtaining a whitelist configuration item and a cut-off configuration item from a configuration service through a controller corresponding to the path information; wherein the controller is located in the server and is used to process business logic; the cut-off configuration item includes a cut-off threshold, and the cut-off threshold represents the online coverage of the new version of the page;
[0075] S203: Determine whether the user identifier has been configured in the whitelist configuration item;
[0076] S204: If the result of the judgment is that the new version exists, return to the new version page;
[0077] S205: If the judgment result is that the user identifier does not exist, the user identifier is processed based on a hash function to obtain a cutoff value, and it is judged whether the cutoff value is greater than the cutoff threshold;
[0078] S206: If it is greater than, it is determined that the user is not targeted and the old version page is returned;
[0079] S207: Otherwise, return to the new version page.
[0080] In the above embodiment, for steps S201 and S203, see Figure 1 The description of steps S101 and S103 is not repeated here.
[0081] In the above implementation, for steps S202, S204 to S207, although the new version of the page has been launched, not all users can be hit to access it, so it is necessary to determine the range of the number of users who can access the new version of the page.
[0082] Therefore, in addition to the whitelist configuration item, the Zookeeper configuration service also includes a cut-off configuration item, which is the cut-off threshold (or cut-off standard value), indicating the online coverage of the new version of the page, such as 20%. The cut-off threshold can be adjusted reasonably, see the subsequent Figure 3 Description shown.
[0083] The logic of the cutoff value judgment is: use the hash function to calculate the user ID to obtain a value, that is, the cutoff value.
[0084] 1) If the cut value is less than or equal to the cut threshold configured in the cut configuration item, it is determined that the user has been cut, and the page template address returned to the user is the address of the new version of the page;
[0085] 2) If not, it is determined that the user is not targeted, and the page template address returned to the user is the address of the old version of the page.
[0086] For example, usually the cut value is within the range of 1 to 100. If the cut value calculated this time is 10, which is less than the configured cut threshold of 20, then the user is considered to be within the cut range (the online coverage of the new version of the page).
[0087] It should be noted that, in addition to the hash function, other functions may also be considered, but since the hash function has a faster execution speed and less conflict with the execution logic of other steps, the present invention selects the hash function.
[0088] The method provided in the above embodiment can determine whether a non-whitelist user is within the coverage of the new version of the page based on the segmentation judgment logic, and can be regarded as another whitelist configuration service as a whole.
[0089] See also Figure 3 , shows a schematic flow chart of another optional page management method according to an embodiment of the present invention, comprising the following steps:
[0090] S301: according to the returned new version page or old version page, counting the first flow of the new version page and the second flow of the old version page within a predetermined time period;
[0091] S302: Calculate the ratio of the first flow rate to the second flow rate, determine the ratio range of the ratio and a first cut-off threshold corresponding to the ratio range;
[0092] S303: If the first cut amount threshold is different from the cut amount threshold, replace the cut amount threshold with the first cut amount threshold.
[0093] In the above implementation, for steps S301 to S303, this implementation mainly describes the step of adjusting the cut-off threshold. The cut-off threshold actually also represents the online coverage of the new version of the page. For example, if the value configured in the cut-off configuration item is 20, that is, the cut-off threshold is 20, it can be considered that the coverage is 20%, and users within the coverage can access the new version of the page.
[0094] Pre-install traffic points on the page, and count the first traffic to the new version page and the second traffic to the old version page within a predetermined period of time based on the new version page / old version page returned to the user. Data analysts compare the ratio of the first traffic to the second traffic. If the ratio is large, it indicates that the exposure rate of the new version page is high in the recent period, and the result is relatively positive.
[0095] Establish the correspondence between the ratio range and the cut-off threshold in advance, for example, (0-5]-cut-off threshold 10, (5-30]-cut-off threshold 20. If the current calculated ratio is 6, the current cut-off threshold 10 needs to be replaced with 20. If you need to adjust the cut-off threshold later, you can modify the cut-off configuration item on the zookeeper configuration service.
[0096] The method provided in the above embodiment reasonably adjusts the cut-off threshold in the cut-off configuration item according to the traffic data of the new and old versions of the page under the same environment to control the online coverage of the new version of the page.
[0097] Compared with the prior art, the method provided by the embodiment of the present invention has at least the following beneficial effects:
[0098] 1) The old and new pages coexist. After the new version of the page is launched, the request link for access remains unchanged, so the user only needs to click one request link;
[0099] 2) Set up a whitelist to provide an online verification environment for testing. Users on the whitelist can access the new version of the page;
[0100] 3) When whitelisted or targeted users access the new version of the page, and non-whitelisted and non-targeted users access the old version of the page, only two judgments and fewer processing steps are required to complete the determination and return of the new version page / old version page, reducing R&D and maintenance costs;
[0101] 4) Extract the traffic data of the new and old versions of the page under the same environment, and then control the online coverage of the new functions in the new version of the page based on the traffic data ratio of the new and old versions of the page.
[0102] See also Figure 4 , which shows a schematic diagram of main modules of a page management device 400 provided by an embodiment of the present invention, including:
[0103] The receiving module 401 is used to receive a page request and obtain the user identification and the path information of the request address contained in the page request;
[0104] The acquisition module 402 is used to acquire the whitelist configuration item from the configuration service through the controller corresponding to the path information; wherein the controller is located in the server and is used to process the business logic;
[0105] The judgment module 403 is used to judge whether the user identification has been configured in the whitelist configuration item, and then determine whether to return to the new version page or the old version page according to the judgment result.
[0106] The implementation device of the present invention further includes a verification module 404 (not shown in the figure), which is used to:
[0107] Obtain qualification information corresponding to the user identifier, verify the qualification information based on the qualification verification logic of the application, and if the verification fails, return an exception page and jump out of the controller; wherein the page request is a request to load a page in the application.
[0108] In the implementation device of the present invention, the judgment module 403 is also used for:
[0109] The user identifier in the page request is preprocessed according to the preset format of the user identifier in the whitelist configuration item, and then it is determined whether the preprocessed user identifier has been configured in the whitelist configuration item.
[0110] In the implementation device of the present invention, the configuration service further includes a cut amount configuration item, the cut amount configuration item includes a cut amount threshold, and the cut amount threshold represents the online coverage of the new version of the page;
[0111] The determination module 403 is used to:
[0112] If the result of the judgment is that it exists, return to the new version page;
[0113] If the judgment result is that it does not exist, the user identifier is processed based on a hash function to obtain a cut value, and it is judged whether the cut value is greater than the cut threshold;
[0114] If it is greater, it is determined that the user is not targeted and the old version of the page is returned; otherwise, the new version of the page is returned.
[0115] The implementation device of the present invention further includes an updating module 405 (not shown in the figure), which is used to:
[0116] According to the returned new version page or old version page, the first flow of the new version page and the second flow of the old version page within a predetermined time period are counted;
[0117] Calculating a ratio of the first flow rate to the second flow rate, determining a ratio range of the ratio and a first cut-off threshold corresponding to the ratio range;
[0118] If the first cut amount threshold is different from the cut amount threshold, the cut amount threshold is replaced with the first cut amount threshold.
[0119] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.
[0120] Figure 5 An exemplary system architecture 500 is shown in which embodiments of the present invention may be applied.
[0121] like Figure 5 As shown, the system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505 (just an example). The network 504 is used to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0122] The user can use the terminal devices 501, 502, 503 to interact with the server 505 through the network 504 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 501, 502, 503.
[0123] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0124] The server 505 may be a server that provides various services, such as a background management server that provides support for websites browsed by users using the terminal devices 501 , 502 , and 503 (only an example).
[0125] It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the device is generally set in the server 505 .
[0126] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0127] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0128] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0129] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0130] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0131] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0132] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0133] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a receiving module, an acquisition module, and a judgment module. The names of these modules do not constitute limitations on the modules themselves in certain circumstances. For example, the acquisition module may also be described as a "module for acquiring configuration items."
[0134] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0135] Receive a page request, and obtain the user identifier and path information of the request address contained in the page request;
[0136] Obtaining a whitelist configuration item from a configuration service through a controller corresponding to the path information; wherein the controller is located in the server and is used to process business logic;
[0137] It is determined whether the user identifier has been configured in the whitelist configuration item, and whether to return to the new version page or the old version page according to the determination result.
[0138] The technical solution according to the embodiment of the present invention is also applicable to the situation where new and old pages coexist. Whitelisted or targeted users access the new version of the page, and non-whitelisted and untargeted users access the old version of the page. Only one request link, two judgments and fewer processing steps are required to complete the determination and return of the new version page / old version page, providing an online testing and verification environment and reducing R&D and maintenance costs. In the same environment, the traffic data of the new and old versions of the pages can be extracted, and the online coverage of the new version of the page can be controlled based on the ratio of the traffic data of the two.
[0139] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A page management method, characterized in that: include: Receive a page request, and obtain the user identifier and path information of the request address contained in the page request; Obtaining a whitelist configuration item and a cut-off configuration item from a configuration service through a controller corresponding to the path information; wherein the controller is located in a server and is used to process business logic; the cut-off configuration item includes a cut-off threshold, and the cut-off threshold indicates the online coverage of the new version of the page; Determine whether the user identifier has been configured in the whitelist configuration item, and then determine whether to return to the new version page or the old version page according to the determination result; According to the returned new version page or old version page, the first flow of the new version page and the second flow of the old version page within a predetermined time period are counted; Calculating a ratio of the first flow rate to the second flow rate, determining a ratio range of the ratio and a first cut-off threshold corresponding to the ratio range; If the first cut amount threshold is different from the cut amount threshold, the cut amount threshold is replaced with the first cut amount threshold.
2. The method according to claim 1, characterized in that Before obtaining the whitelist configuration items from the configuration service, the method further includes: Obtain qualification information corresponding to the user identifier, verify the qualification information based on the qualification verification logic of the application, and if the verification fails, return an exception page and jump out of the controller; wherein the page request is a request to load a page in the application.
3. The method according to claim 1, characterized in that The determining whether the user identifier has been configured in the whitelist configuration item further includes: The user identifier in the page request is preprocessed according to the preset format of the user identifier in the whitelist configuration item, and then it is determined whether the preprocessed user identifier has been configured in the whitelist configuration item.
4. The method according to claim 1, characterized in that: Determining whether to return to the new version page or the old version page according to the judgment result includes: If the result of the judgment is that it exists, return to the new version page; If the judgment result is that it does not exist, the user identifier is processed based on a hash function to obtain a cut value, and it is judged whether the cut value is greater than the cut threshold; If it is greater, it is determined that the user is not targeted and the old version of the page is returned; otherwise, the new version of the page is returned.
5. A page management device, characterized in that: include: A receiving module, used for receiving a page request and obtaining the user identification and path information of the request address contained in the page request; An acquisition module, used to acquire whitelist configuration items and cut-off configuration items from a configuration service through a controller corresponding to the path information; wherein the controller is located in the server and is used to process business logic; the cut-off configuration item includes a cut-off threshold, and the cut-off threshold represents the online coverage of the new version of the page; A judgment module, used to judge whether the user identifier has been configured in the whitelist configuration item, and then determine whether to return to the new version page or the old version page according to the judgment result; An updating module is used to count the first flow of the new version page and the second flow of the old version page within a predetermined time period according to the returned new version page or old version page; Calculating a ratio of the first flow rate to the second flow rate, determining a ratio range of the ratio and a first cut-off threshold corresponding to the ratio range; If the first cut amount threshold is different from the cut amount threshold, the cut amount threshold is replaced with the first cut amount threshold.
6. The device according to claim 5, characterized in that The judging module is used for: If the result of the judgment is that it exists, return to the new version page; If the judgment result is that it does not exist, the user identifier is processed based on a hash function to obtain a cut value, and it is judged whether the cut value is greater than the cut threshold; If it is greater, it is determined that the user is not targeted and the old version of the page is returned; otherwise, the new version of the page is returned.
7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Gray release method and device
CN105653440A
Version release system and method and electronic equipment
CN110399147A
Application service management method and device and storage medium
CN110602212A