A page management method and device
By analyzing native routing protocol and page configuration information at the Flutter container layer, a unified Flutter volume control and page downgrade solution is realized, which solves the stability and cost of Flutter services, reduces communication and coordination costs, and ensures Flutter services stability and normal operation.
Patent Information
- Application Number
- CN202110042778.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-13
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-01-13
AI Technical Summary
In the prior art, the volume control and page downgrade control of Flutter services are scattered, and the cost is high and the stability of Flutter services cannot be guaranteed.
Before opening the Flutter page on the native side, parse the native routing protocol at the Flutter container layer, combine the acquired page configuration information to achieve volume cutting control, provide a unified Flutter cutting implementation solution, reduce costs, and provide a page downgrade solution at the Flutter container layer. Ensure the stability of Flutter business.
Through the customized native routing protocol, the function of evoking new pages on the native side is realized, which facilitates subsequent volume control and page downgrade, ensures the normal opening and downgrade of Flutter pages, reduces communication and coordination costs, and ensures the stability of Flutter business sex.
Smart Images

Figure CN113760278B_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] Flutter is an open source UI (User Interface) toolkit from Google that helps developers efficiently build multi-platform applications (Application, APP) through a set of code bases, supporting mobile, Web, desktop and embedded platforms. Currently, the use of Flutter technology in APP generally integrates the Flutter function into the main APP as a business module on the Native side.
[0003] In order to ensure user experience, it is necessary to control the user access flow to the pages in the APP, and downgrade the page when the page crashes or loses response. However, since an APP usually contains multiple business modules, and these business modules are developed by multiple teams, it takes a lot of communication and coordination costs to perform operations such as traffic control and page downgrade.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0005] The control of Flutter business volume and page degradation is decentralized, costly, and cannot guarantee the stability of Flutter business. Summary of the invention
[0006] In view of this, an embodiment of the present invention provides a page management method and device, which parses the native routing protocol at the Flutter container layer before opening the Flutter page on the native end, and then implements volume control in combination with the obtained page configuration information, providing a unified Flutter volume control solution to reduce costs.
[0007] To achieve the above objective, according to one aspect of an embodiment of the present invention, a page management method is provided.
[0008] A page management method according to an embodiment of the present invention comprises: obtaining a corresponding user identifier after a user starts an application, and obtaining preset page configuration information; wherein the application comprises a Flutter service; when a page opening instruction is obtained, opening a container carrying a Flutter page through a defined native routing protocol, and using the container to parse the native routing protocol to obtain routing information; wherein the routing information comprises a target routing identifier; calculating the access traffic when pre-jumping to a Flutter page corresponding to the target routing identifier, determining that any one of the user identifier and the access traffic successfully matches the page configuration information, and opening the Flutter page corresponding to the target routing identifier.
[0009] Optionally, the page configuration information includes downgraded route mapping information, and the downgraded route mapping information includes a source route and a corresponding new route; before the step of calculating the access traffic when pre-jumping to the Flutter page corresponding to the target route identifier, the method also includes: matching the target route identifier with the source route, determining that the target route identifier matches the source route successfully, and jumping to the downgrade page corresponding to the new route.
[0010] Optionally, the syntax format of the native routing protocol includes a transmission protocol field used, a host domain name field for storing resources, and a query field for transmitting the routing information; the method also includes: defining the native routing protocol in a configuration file according to the syntax format; wherein the value of the path in the configuration file is the query field.
[0011] Optionally, before the step of opening the Flutter page corresponding to the target route identifier, the method also includes: querying the target route identifier in the saved route registration information, determining that the target route identifier is not included in the route registration information, and feeding back abnormal information; opening the Flutter page corresponding to the target route identifier, including: determining that the route registration information includes the target route identifier, and opening the Flutter page corresponding to the target route identifier.
[0012] Optionally, jumping to the degraded page corresponding to the new route includes: jumping to the degraded page corresponding to the new route according to a page jump mode defined in the Flutter service.
[0013] Optionally, the routing information also includes routing parameters; opening the Flutter page corresponding to the target routing identifier includes: passing the routing parameters to the Flutter page corresponding to the target routing identifier, querying the page data corresponding to the routing parameters; and loading the page data to the Flutter page corresponding to the target routing identifier.
[0014] Optionally, the page configuration information includes a user whitelist and a grayscale ratio of the cut volume corresponding to the Flutter service, and determining that any one of the user identifier and the access traffic successfully matches the page configuration information includes: determining that the user identifier exists in the user whitelist, or that the proportion of the access traffic in the total access traffic is less than the grayscale ratio of the cut volume; wherein the total access traffic is the sum of the historical access traffic of the original page corresponding to the target routing identifier; the method also includes: when it is determined that the user identifier does not exist in the user whitelist and the access traffic does not meet the grayscale ratio of the cut volume, opening the original page corresponding to the target routing identifier.
[0015] To achieve the above objective, according to another aspect of an embodiment of the present invention, a page management device is provided.
[0016] A page management device according to an embodiment of the present invention includes: an information acquisition module, which is used to obtain a corresponding user identifier after a user starts an application program, and obtain preset page configuration information; wherein the application program includes a Flutter service; a protocol parsing module, which is used to open a container carrying a Flutter page through a defined native routing protocol when a page opening instruction is obtained, and use the container to parse the native routing protocol to obtain routing information; wherein the routing information includes a target routing identifier; a page opening module, which is used to calculate the access traffic when pre-jumping to a Flutter page corresponding to the target routing identifier, determine that any one of the user identifier and the access traffic successfully matches the page configuration information, and open the Flutter page corresponding to the target routing identifier.
[0017] Optionally, the page configuration information includes downgrade route mapping information, and the downgrade route mapping information includes a source route and a corresponding new route; the device also includes: a downgrade processing module, used to match the target route identifier with the source route, determine that the target route identifier matches the source route successfully, and jump to the downgrade page corresponding to the new route.
[0018] Optionally, the syntax format of the native routing protocol includes a transmission protocol field used, a host domain name field for storing resources, and a query field for transmitting the routing information; the device also includes: a protocol definition module, used to define the native routing protocol in a configuration file according to the syntax format; wherein the value of the path in the configuration file is the query field.
[0019] Optionally, the device also includes: a query processing module, used to query the target route identifier in the saved route registration information, determine that the target route identifier is not included in the route registration information, and feedback abnormal information; the page opening module is also used to determine that the route registration information includes the target route identifier, and open the Flutter page corresponding to the target route identifier.
[0020] Optionally, the degradation processing module is further used to jump to the degradation page corresponding to the new route according to the page jump mode defined in the Flutter service.
[0021] Optionally, the routing information also includes routing parameters; the page opening module is also used to pass the routing parameters to the Flutter page corresponding to the target routing identifier, query the page data corresponding to the routing parameters; and load the page data to the Flutter page corresponding to the target routing identifier.
[0022] Optionally, the page configuration information includes a user whitelist and a grayscale ratio of the cut volume corresponding to the Flutter service, and the page opening module is also used to determine whether the user identifier exists in the user whitelist, or the proportion of the access traffic in the total access traffic is less than the grayscale ratio of the cut volume; wherein the total access traffic is the sum of the historical access traffic of the original page corresponding to the target routing identifier; the device also includes: a determination opening module, which is used to determine that the user identifier does not exist in the user whitelist and the access traffic does not meet the grayscale ratio of the cut volume, and then open the original page corresponding to the target routing identifier.
[0023] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.
[0024] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement a page management method according to an embodiment of the present invention.
[0025] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.
[0026] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, a page management method according to an embodiment of the present invention is implemented.
[0027] One embodiment of the above invention has the following advantages or beneficial effects: before opening the Flutter page on the native side, the native routing protocol is parsed at the Flutter container layer, and then the volume control is implemented in combination with the obtained page configuration information, providing a unified Flutter volume control implementation solution to reduce costs. When it is determined that the page needs to be downgraded according to the page configuration information, the downgraded page is opened, and a unified Flutter page downgrade solution is provided at the Flutter container layer to ensure that the page can be downgraded when an error occurs in the Flutter business, thereby ensuring the stability of the online Flutter business and reducing costs.
[0028] Through the customized native routing protocol, the function of calling up a new page on the native side is realized, which is convenient for subsequent volume control and page degradation. All the page information of the APP is maintained through the routing registration information, so that when the routing identifier is parsed, it can be determined whether the routing identifier exists in the routing registration information, thereby ensuring the normal opening of the page.
[0029] By defining the page jump method, the business can decide how to jump to the page by itself, which improves flexibility. The parameters required to open the Flutter page are passed through the routing parameters to ensure the normal opening of the Flutter page. According to the page configuration information, when it is determined that the conditions for jumping to the Flutter page are met, the Flutter page is opened; when it is determined that the conditions for jumping to the Flutter page are not met, the native page is directly opened to ensure the correctness of the cut control.
[0030] 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
[0031] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0032] Figure 1 is a schematic diagram of the main steps of the page management method according to an embodiment of the present invention;
[0033] Figure 2 is a schematic diagram of the implementation principle of the page management method according to an embodiment of the present invention;
[0034] Figure 3 is a schematic diagram of the main flow of the page management method according to an embodiment of the present invention;
[0035] Figure 4 is a schematic diagram of main modules of a page management device according to an embodiment of the present invention;
[0036] Figure 5is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0037] Figure 6 It is a schematic diagram of the structure of a computer device suitable for implementing an electronic device of an embodiment of the present invention. DETAILED DESCRIPTION
[0038] 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.
[0039] The technical terms involved in the embodiments of the present invention are explained below.
[0040] Native side: The native side is an application based on the local operating system of smart devices, such as iOS, Android, and WP, and is written and run using native programs.
[0041] Traffic switching: 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 traffic switching strategy. This switching process is called traffic switching.
[0042] Grayscale ratio of cut volume: the value is a percentage or a value between 0-100.
[0043] Page degradation: When the current page crashes or loses response, jump to other predefined pages.
[0044] Grayscale release: It is a release method with a smooth transition. 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.
[0045] Figure 1 FIG. 1 is a schematic diagram of the main steps of the page management method according to an embodiment of the present invention. Figure 1 As shown, the page management method of the embodiment of the present invention mainly includes the following steps:
[0046] Step S101: After the user starts the application, obtain the corresponding user ID and obtain the preset page configuration information. Among them, the application includes one or more Flutter services, and the user ID is the unique ID such as the user name and account registered by the user on the application. The page configuration information is used to maintain the volume cut and downgrade strategy of the Flutter service. In the embodiment, it may include the user whitelist and grayscale ratio of the volume cut corresponding to the Flutter service. The page configuration information can be dynamically sent from the server to the application. The user whitelist includes user identifiers that are allowed to open the new version page.
[0047] Step S102: When the page opening instruction is obtained, the container carrying the Flutter page is opened through the defined native routing protocol, and the native routing protocol is parsed by the container to obtain routing information. When the user needs to jump from the current page to the next page, click the corresponding control in the user interface of the application, such as a button, picture, etc. When the application monitors the above click action, the page opening instruction of the next page is obtained.
[0048] After getting the page opening instruction, open the container that hosts the Flutter page through the custom native routing protocol. Among them, the Android side uses the ViewController container to host the Flutter page, and the iOS side uses the Activity container to host the Flutter page. The native routing protocol is a string used to call up a new page on the native side, which can be customized. By parsing the native routing protocol, you can get the routing information of the target page to jump to, which can include the target routing identifier.
[0049] Step S103: Calculate the access traffic when pre-jumping to the Flutter page corresponding to the target route identifier, determine that any one of the user identifier and the access traffic successfully matches the page configuration information, and open the Flutter page corresponding to the target route identifier.
[0050] After parsing the route information, match the user ID, access traffic, and page configuration information. If any one of them matches successfully, the Flutter page corresponding to the target route ID is opened. If neither of them matches successfully, the original page corresponding to the target route ID is opened. The original page is the old version page, and the Flutter page is the new version page.
[0051] Match the user ID with the page configuration information, that is, determine whether the user ID is in the user whitelist of the page configuration information. If the user ID is in the user whitelist, it means the match is successful; if the user ID is not in the user whitelist, it means the match fails.
[0052] To match the access traffic with the page configuration information, it is necessary to assume that the page corresponding to the target route identifier in the routing information is jumped to, and the access traffic to the page is calculated at this time. Then, the ratio of the access traffic to the total access traffic (that is, the sum of the historical access traffic of the original page corresponding to the target route identifier) is calculated. If the ratio is less than the grayscale ratio of the cut volume (for example, 10%), it means that the match is successful; otherwise, the match fails. It should be noted that when calculating the access traffic, it is a pre-jump to the Flutter page, not a real jump to the Flutter page.
[0053] In the above embodiment, before opening the Flutter page on the native side, the native routing protocol is parsed at the Flutter container layer, and then the truncation control is implemented in combination with the obtained page configuration information. For the case where the APP includes multiple Flutter services, a unified online Flutter truncation implementation solution is provided, grayscale release is realized, and communication and coordination costs are reduced. Of course, for the case where the APP has only one Flutter service, truncation control can also be performed online.
[0054] Figure 2 FIG. 1 is a schematic diagram showing the implementation principle of the page management method according to an embodiment of the present invention. Figure 2 As shown, the page management method of the embodiment of the present invention is implemented in a client APP, which includes multiple business modules, such as an order module, a shopping cart module, a settlement module, etc., and these business modules can be implemented based on Flutter technology. In this embodiment, the business module implemented based on Flutter technology is called a Flutter module.
[0055] Formulate the slicing and downgrade strategies for each Flutter module respectively, and maintain the above strategies in the unified slicing and downgrade control center, which will dynamically send the slicing and downgrade strategies (i.e., page configuration information) of each Flutter module. When the application is started, the container that hosts the Flutter page can be used to read the page configuration information, parse the native routing protocol, perform downgrade, control slicing, and other processing processes (see steps S302-S307 for details).
[0056] Figure 3 FIG. 1 is a schematic diagram of the main flow of the page management method according to an embodiment of the present invention. Figure 3 As shown, the page management method of the embodiment of the present invention mainly includes the following steps:
[0057] Step S301: The application starts, obtains the user ID of the user who starts the application, and the preset page configuration information, and persists the page configuration information locally. The unified slicing and degradation control center will dynamically send the page configuration information of each Flutter module of the application. For example, on the Web backend or desktop development tool, set the page configuration information in real time, select the release and effective time, and it will take effect in time or be sent to the APP end at the specified time. After the APP end updates to the page configuration information, it can be saved locally.
[0058] It is understandable that the page configuration information can be obtained when the application is started, or at any time after the application is started and before the Flutter page is opened.
[0059] Step S302: When the page opening instruction is obtained, the container carrying the Flutter page is opened through the defined native routing protocol. The native routing protocol is a protocol for invoking a new page on the native side, such as the scheme protocol (a native protocol for implementing internal page jumps). The syntax format of the protocol can be customized, and the embodiment includes the transmission protocol field used, the host domain name field for storing resources, and the query field for transmitting the routing information.
[0060] For example, you can define the following string to call up the order details page:
[0061] schemeapp: / / appname? params={"goodsId":"1001","type":"FlutterPage","flutterRouterName":"orderDetail"}
[0062] Among them, schemeapp is the transmission protocol used, appname is the host domain name, and params is the query field used to pass routing information. Routing information includes routing identifiers and can also include routing parameters (i.e., parameters required to enter the Flutter page corresponding to the target routing identifier). For example, to jump from the order page to the order details page, you need to pass the order id (i.e., routing parameters) to the order details page, and then query the corresponding order data through the order id, and display the order data on the target order page to be checked in.
[0063] The above native routing protocol can be defined in the configuration file. For example, on the Android side, the following content can be defined in its configuration file AndroidManifest.xml:
[0064] <data android:scheme="schemeapp"android:host="appname"android:path=" / params={"goodsId":"1001","type":"FlutterPage","flutterRouterName":"orderDetail"}" / >
[0065] The path value in the above configuration file is the query field, where orderDetail is the route identifier and goodsId is the route parameter.
[0066] In this embodiment, the native routing protocol is implemented through startActivity on the Android side and through UINavigationController on the iOS side.
[0067] Step S303: Use the container to parse the native routing protocol to obtain routing information. Taking the Android end as an example, the defined native routing protocol can be obtained in the following way:
[0068] Uri data=getIntent().getData();
[0069] data.getHost() is: schemeapp;
[0070] data.getPath() is:
[0071] params={"goodsId":"1001","type":"FlutterPage","flutterRouterName":"orderDetail"}
[0072] By parsing the native routing protocol at the native end, the target routing identifier (such as routing name) and routing parameters can be obtained, and then in step S307, the page of the target routing identifier can be jumped to by calling the native routing API (Application Program Interface).
[0073] Step S304: Match the routing information with the downgrade routing mapping information in the page configuration information. The downgrade routing mapping information is used to indicate the page that needs to be downgraded and to which page it is downgraded, including: the source route (corresponding to the page that needs to be downgraded) and the corresponding new route (corresponding to the page to be downgraded), for example: {"flutter_order_detail":'new_order_detail'}. If the target route in the parsed routing information is identified as flutter_order_detail, which is the same as the source route in the downgrade routing mapping information, it means that the two match.
[0074] Step S305: Determine whether downgrading is required based on the matching result. If downgrading is required, execute step S306; if downgrading is not required, execute step S307.
[0075] Step S306: Downgrade to the downgrade page corresponding to the new route, and end this process. As shown in the above example, since the two match, the flutter_order_detail page needs to be downgraded to the new_order_detail page.
[0076] Step S307: Open the Flutter page corresponding to the target route identifier according to the user whitelist and the grayscale ratio of the cut amount in the page configuration information. In the embodiment, this step first determines whether the acquired user identifier exists in the user whitelist of the page configuration information. If the user identifier exists in the user whitelist, the Flutter page corresponding to the target route identifier is opened.
[0077] If the user ID does not exist in the user whitelist, the access traffic when pre-jumping to the Flutter page corresponding to the target routing ID is further calculated, and the ratio of the access traffic to the historical total access traffic of the original page corresponding to the target routing ID is calculated. If the ratio is less than the grayscale ratio of the cut volume, the Flutter page corresponding to the target routing ID is opened; if the ratio is greater than or equal to the grayscale ratio of the cut volume, the original page corresponding to the target routing ID is opened.
[0078] It is understandable that only one of the user whitelist and the grayscale ratio of the amount cut can be satisfied, that is, it is also possible to first determine whether the ratio satisfies the grayscale ratio of the amount cut. If not, it is then determined whether the obtained user identifier exists in the user whitelist.
[0079] In a preferred embodiment, the Flutter service stores route registration information (i.e., registered routes, which can be maintained through a mapping table). Before opening the Flutter page corresponding to the target route identifier, the target route identifier must be queried in the route registration information. If the target route identifier is not included in the route registration information, it means that the page does not exist, and an exception message is fed back; if the target route identifier is included in the route registration information, it means that the page can be opened normally, and then the Flutter page corresponding to the target route identifier is opened.
[0080] The page routing framework of each APP may be different. In order to meet the differences in different APP environments and improve flexibility, in another preferred embodiment, if the judgment result of step S305 is that downgrade is required, it can also be processed according to the business logic customized by the Flutter business. There may be multiple page jump methods in an APP, and there are differences in functions, such as the rolling animation of the page pop-up, etc. The business can decide how to jump the page. Specifically, the page jump method can be defined in the Flutter business. When the page jumps, it jumps to the downgraded page corresponding to the new route according to the defined page jump method.
[0081] For another example, you can also perform custom logic processing at the location where the downgrade route mapping information is obtained and the location where the downgrade method callback is called. For example, after obtaining the downgrade route mapping information, you may need to encrypt the route URL (Uniform Resource Locator) and then perform the page jump logic.
[0082] The page management method of the embodiment is described below in conjunction with application scenarios.
[0083] Assume that the order details page of the order module needs to launch a part of the Flutter page to verify the online performance of the Flutter page. At this time, it is necessary to let some users experience the newly launched Flutter page, and there is also a fallback strategy when the Flutter page fails, so that it can be downgraded to the specified page to improve the user experience. At this time, the unified cutting and downgrade control center can be used to control the display volume of the online order details page based on Flutter and the display volume of the native order details page, as well as the configuration of the downgrade route mapping information.
[0084] Assume that the order details page has 100,000 user views (i.e., total access traffic), set 10% of grayscale users (i.e., users using the new version of the page) to experience the Flutter page, and the rest of the users keep the native page display. At this time, you can issue the grayscale ratio of the cut volume in the unified cut volume and degradation control center, set the user whitelist, and obtain the user whitelist before the APP opens the page, and match it on the APP side.
[0085] If the currently logged-in user is in the user whitelist, or the ratio of the access traffic when pre-jumping to the order details page implemented by Flutter to the total access traffic is less than 10%, the order details page implemented by Flutter is opened in the order module; if the currently logged-in user is not in the user whitelist, and the ratio of the access traffic when pre-jumping to the order details page implemented by Flutter to the total access traffic is greater than or equal to 10%, the original routing logic is maintained.
[0086] When an error occurs on the order details page of the order module, you can configure the downgrade route mapping information in the unified cut-off and downgrade control center, for example, configure it as: {"flutter_order_detail":'new_order_detail'}. The APP obtains the above downgrade route mapping information and stores it locally. It searches the route table (i.e., route registration information) registered by the Flutter page for flutter_order_detail to see if it exists. If it exists, the downgrade logic is executed on the APP and routed to the downgrade page new_order_detail.
[0087] It can be seen from the page management method of the embodiment of the present invention that by adding a unified slicing switch and degradation processing in the ViewController or Activity container of Flutter, the slicing of each Flutter service is uniformly controlled, thereby solving the problem of decentralized Flutter slicing control in the prior art. At the same time, it ensures that the page can be downgraded when an error occurs in the Flutter service, thereby ensuring the stability of the online Flutter service.
[0088] Figure 4 Schematic diagram of the main modules of the page management device according to an embodiment of the present invention. Figure 4 As shown, the page management device 400 of the embodiment of the present invention mainly includes:
[0089] The information acquisition module 401 is used to obtain the corresponding user identification after the user starts the application and obtain the preset page configuration information. Among them, the application includes one or more Flutter services, and the user identification is the unique identification of the user name, account, etc. registered by the user on the application. The page configuration information is used to maintain the cut-off and downgrade strategy of the Flutter service. In the embodiment, it may include the user whitelist and cut-off grayscale ratio corresponding to the Flutter service. The page configuration information can be dynamically sent from the server to the application. The user whitelist includes user identifiers that are allowed to open the new version page.
[0090] The protocol parsing module 402 is used to open the container carrying the Flutter page through the defined native routing protocol when the page opening instruction is obtained, and use the container to parse the native routing protocol to obtain routing information. When the user needs to jump from the current page to the next page, click the corresponding control in the user interface of the application, such as a button, picture, etc. When the application monitors the above click action, it obtains the page opening instruction of the next page.
[0091] After getting the page opening instruction, open the container that hosts the Flutter page through the custom native routing protocol. Among them, the Android side uses the ViewController container to host the Flutter page, and the iOS side uses the Activity container to host the Flutter page. The native routing protocol is a string used to call up a new page on the native side, which can be customized. By parsing the native routing protocol, you can get the routing information of the target page to jump to, which can include the target routing identifier.
[0092] The page opening module 403 is used to calculate the access traffic when pre-jumping to the Flutter page corresponding to the target routing identifier, determine that any one of the user identifier and the access traffic successfully matches the page configuration information, and open the Flutter page corresponding to the target routing identifier.
[0093] After parsing the route information, match the user ID, access traffic, and page configuration information. If any one of them matches successfully, the Flutter page corresponding to the target route ID is opened. If neither of them matches successfully, the original page corresponding to the target route ID is opened. The original page is the old version page, and the Flutter page is the new version page.
[0094] Match the user ID with the page configuration information, that is, determine whether the user ID is in the user whitelist of the page configuration information. If the user ID is in the user whitelist, it means the match is successful; if the user ID is not in the user whitelist, it means the match fails.
[0095] To match the access traffic with the page configuration information, it is necessary to assume that the page corresponding to the target route identifier in the routing information is jumped to, and the access traffic to the page is calculated at this time. Then, the ratio of the access traffic to the total access traffic (that is, the sum of the historical access traffic of the original page corresponding to the target route identifier) is calculated. If the ratio is less than the grayscale ratio of the cut volume (for example, 10%), it means that the match is successful; otherwise, the match fails. It should be noted that when calculating the access traffic, it is a pre-jump to the Flutter page, not a real jump to the Flutter page.
[0096] In addition, the page management device 400 of the embodiment of the present invention may also include: a downgrade processing module, a protocol definition module, a query processing module and a determination opening module. The downgrade processing module is used to match the target route identifier with the source route, determine that the target route identifier matches the source route successfully, and jump to the downgrade page corresponding to the new route.
[0097] A protocol definition module is used to define the native routing protocol in a configuration file according to the syntax format; wherein the value of the path in the configuration file is the query field. A query processing module is used to query the target routing identifier in the saved routing registration information, determine that the routing registration information does not include the target routing identifier, and feedback abnormal information. A determination opening module is used to open the original page corresponding to the target routing identifier when it is determined that the user identifier does not exist in the user whitelist and the access traffic does not meet the grayscale ratio of the cut volume.
[0098] From the above description, it can be seen that before the Flutter page is opened on the native side, the native routing protocol is parsed at the Flutter container layer, and then the volume control is implemented in combination with the obtained page configuration information. For the case where the APP includes multiple Flutter services, a unified online Flutter volume control solution is provided, which realizes grayscale release and reduces communication and coordination costs.
[0099] Figure 5 An exemplary system architecture 500 to which the page management method or the page management apparatus according to the embodiment of the present invention can be applied is shown.
[0100] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0101] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0102] 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.
[0103] The server 505 may be a server that provides various services, such as a background management server that processes information acquisition requests sent by administrators using the terminal devices 501, 502, and 503. The background management server may feed back page configuration information corresponding to the request to the terminal device.
[0104] It should be noted that the page management method provided in the embodiment of the present application is generally executed by the terminal devices 501 , 502 , 503 , and accordingly, the page management device is generally arranged in the terminal devices 501 , 502 , 503 .
[0105] 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.
[0106] According to an embodiment of the present invention, the present invention also provides an electronic device and a computer-readable medium.
[0107] The electronic device of the present invention comprises: 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 a page management method of an embodiment of the present invention.
[0108] The computer-readable medium of the present invention stores a computer program, and when the program is executed by a processor, a page management method of an embodiment of the present invention is implemented.
[0109] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 suitable for implementing an electronic device of an embodiment of the present invention. Figure 6 The electronic 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.
[0110] 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 computer 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.
[0111] 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.
[0112] In particular, according to the embodiments disclosed in the present invention, the process described in the main step diagram above 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 main step diagram. 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.
[0113] 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.
[0114] 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.
[0115] 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, it may be described as: a processor includes an information acquisition module, a protocol parsing module and a page opening module. The names of these modules do not constitute a limitation on the modules themselves under certain circumstances. For example, the information acquisition module may also be described as "a module for obtaining a corresponding user identifier and obtaining preset page configuration information after the user starts the application."
[0116] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by a device, the device includes: obtaining the corresponding user identifier after the user starts the application, and obtaining the preset page configuration information; wherein the application includes a Flutter service; when the page opening instruction is obtained, the container carrying the Flutter page is opened through the defined native routing protocol, and the native routing protocol is parsed by the container to obtain the routing information; wherein the routing information includes a target routing identifier; calculate the access traffic when pre-jumping to the Flutter page corresponding to the target routing identifier, determine that any one of the user identifier and the access traffic successfully matches the page configuration information, and open the Flutter page corresponding to the target routing identifier.
[0117] According to the technical solution of the embodiment of the present invention, before the Flutter page is opened on the native end, the native routing protocol is parsed at the Flutter container layer, and then the volume control is implemented in combination with the obtained page configuration information. For the case where the APP includes multiple Flutter services, a unified online Flutter volume control solution is provided, which realizes grayscale release and reduces communication and coordination costs.
[0118] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0119] 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: After the user starts the application, a corresponding user identifier is obtained, and preset page configuration information is obtained; wherein the application includes a Flutter service; When the page opening instruction is obtained, the container carrying the Flutter page is opened through the defined native routing protocol, and the native routing protocol is parsed by the container to obtain routing information; wherein the routing information includes a target routing identifier; Calculate the access traffic when pre-jumping to the Flutter page corresponding to the target routing identifier, and determine whether any one of the user identifier and the access traffic successfully matches the page configuration information, including: determining that the user identifier exists in the user whitelist, or the proportion of the access traffic in the total access traffic is less than the grayscale ratio of the cut volume; wherein the total access traffic is the sum of the historical access traffic of the original page corresponding to the target routing identifier, and the page configuration information includes the user whitelist and the grayscale ratio of the cut volume corresponding to the Flutter service; Open the Flutter page corresponding to the target route identifier.
2. The method according to claim 1, characterized in that The page configuration information includes downgraded route mapping information, and the downgraded route mapping information includes a source route and a corresponding new route; Before the step of calculating the access traffic when pre-jumping to the Flutter page corresponding to the target route identifier, the method further includes: The target route identifier is matched with the source route, it is determined that the target route identifier matches the source route successfully, and the page corresponding to the new route is jumped to.
3. The method according to claim 1, characterized in that The syntax format of the native routing protocol includes a transport protocol field used, a host domain name field storing resources, and a query field for transmitting the routing information; The method further includes: defining the native routing protocol in a configuration file according to the grammatical format; wherein the value of the path in the configuration file is the query field.
4. The method according to claim 1, characterized in that: Before the step of opening the Flutter page corresponding to the target route identifier, the method further includes: Querying the target route identifier in the saved route registration information, determining that the target route identifier is not included in the route registration information, and feeding back abnormal information; Open the Flutter page corresponding to the target route identifier, including: Determine that the route registration information includes the target route identifier, and open a Flutter page corresponding to the target route identifier.
5. The method according to claim 2, characterized in that: Jump to the downgrade page corresponding to the new route, including: According to the page jump mode defined in the Flutter service, jump to the downgrade page corresponding to the new route.
6. The method according to claim 1 or 4, characterized in that: The routing information also includes routing parameters; opening the Flutter page corresponding to the target routing identifier includes: Pass the routing parameters to the Flutter page corresponding to the target routing identifier, and query the page data corresponding to the routing parameters; The page data is loaded into the Flutter page corresponding to the target route identifier.
7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When it is determined that the user identifier does not exist in the user whitelist and the access traffic does not meet the grayscale ratio of the cut volume, the original page corresponding to the target routing identifier is opened.
8. A page management device, characterized in that: include: An information acquisition module, used to obtain a corresponding user identifier and preset page configuration information after a user starts an application; wherein the application includes a Flutter service; The protocol parsing module is used to open the container carrying the Flutter page through the defined native routing protocol when the page opening instruction is obtained, and use the container to parse the native routing protocol to obtain routing information; wherein the routing information includes a target routing identifier; The page opening module is used to calculate the access traffic when pre-jumping to the Flutter page corresponding to the target routing identifier, and determine that any one of the user identifier and the access traffic successfully matches the page configuration information, including: determining that the user identifier exists in the user whitelist, or the proportion of the access traffic in the total access traffic is less than the grayscale ratio of the cut volume; wherein the total access traffic is the sum of the historical access traffic of the original page corresponding to the target routing identifier, and the page configuration information includes the user whitelist and the grayscale ratio of the cut volume corresponding to the Flutter business; opening the Flutter page corresponding to the target routing identifier.
9. The device according to claim 8, characterized in that The page configuration information also includes downgrade route mapping information, and the downgrade route mapping information includes a source route and a corresponding new route; the device also includes: a downgrade processing module for The target route identifier is matched with the source route, it is determined that the target route identifier matches the source route successfully, and the page corresponding to the new route is jumped to.
10. 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 7.
11. 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 7 is implemented.
