Weex page loading method and device, computer equipment and storage medium
By dynamically obtaining the page grayscale increase rules between the user terminal and the application server, we judge whether the triggering instructions of the target link comply with the rules, and selecting the downloaded and rendered lx files based on the judgment results, solving the problem of user experience decline caused by full increase in volume after the page is published, and the protection of the Weex page grayscale increase in volume and user experience is achieved.
Patent Information
- Application Number
- CN202510372715.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, the pages are released and the entire number of users reaches the latest page, which may cause a sharp decline in the experience of a large number of users and even lead to user loss.
By dynamically obtaining the current page grayscale increase rule between the user terminal and the application server, it is determined whether the triggering instruction of the target link complies with the rule. If it matches, download and render the first lx file to load the target Weex page. If it doesn't match, download and render the second lx file to load the original page different from the target Weex page.
The grayscale volume of Weex page has been achieved, avoiding the sharp decline in user experience caused by the full volume after the page is released, and reducing the risk of user loss.
Smart Images

Figure CN120216802A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a Weex page loading method, device, computer equipment and storage medium. Background Art
[0002] With the development of the company's business and Internet technology, the update of websites and applications has become the norm to ensure the continuous optimization of user experience and the continuous improvement of service functions.
[0003] Currently, if an application page is updated, all users will be directed to the latest page as soon as it is released. However, the launch of new features or the modification of existing features in the new page is often accompanied by potential risks, including functional defects, performance degradation, or user discomfort. If all users are directed to the latest page as soon as the page is released, it may cause a sharp decline in the experience of a large number of users, or even lead to user loss. Summary of the invention
[0004] The embodiments of the present application provide a Weex page loading method, apparatus, computer device, and storage medium, which are intended to solve the problem in the prior art that once a page is published, all users are directed to the latest page, which may cause a sharp decline in the experience of a large number of users and even lead to user loss.
[0005] In a first aspect, an embodiment of the present application provides a Weex page loading method, which is applied to a user terminal and includes:
[0006] When an application startup instruction for a target application is obtained from a user, a grayscale volume release rule for a current page of the target application is obtained from an application server corresponding to the target application;
[0007] When a trigger instruction for a target link in the target application is obtained, judging whether the trigger instruction complies with the grayscale volume rule of the current page according to the application configuration information of the target application;
[0008] When the trigger instruction meets the grayscale release rule of the current page, a first lx file download request is sent to the application server, and a first lx file returned by the application server based on the first lx file download request is received, and a target Weex page corresponding to the target link is rendered based on the first lx file;
[0009] When the trigger instruction does not meet the grayscale release rule of the current page, a second lx file download request is sent to the application server, and a second lx file returned by the application server based on the second lx file download request is received, and the target link is rendered based on the second lx file to obtain an original page different from the target Weex page.
[0010] In a second aspect, an embodiment of the present application provides a Weex page loading method, which is applied to an application server. The method includes:
[0011] When receiving an application start instruction for a target application sent by a user terminal, send the current page gray-scale release rule of the target application to the user terminal, so that when the user terminal receives a trigger instruction for a target link in the target application, it determines whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application;
[0012] When the trigger instruction conforms to the current page gray-scale release rule, receive a first lx file download request sent by the user terminal, and in response to the first lx file download request, return a first lx file to the user terminal, so that the user terminal renders the target Weex page corresponding to the target link based on the first lx file;
[0013] When the trigger instruction does not conform to the current page gray-scale release rule, receive a second lx file download request sent by the user terminal, and in response to the second lx file download request, return a second lx file to the user terminal, so that the user terminal renders the target link based on the second lx file to obtain an original page different from the target Weex page.
[0014] In a third aspect, an embodiment of the present application further provides a Weex page loading device. The Weex page loading device is a first Weex page loading device or a second Weex page loading device. The first Weex page loading device is configured in the user terminal, and the second Weex page loading device is configured in the application server. The first Weex page loading device includes a first transceiver unit and a first processing unit, and the second Weex page loading device includes a second transceiver unit and a second processing unit, where:
[0015] The first transceiver unit is configured to obtain an application start instruction for a target application by a user, and send the application start instruction to the second Weex page loading device;
[0016] The second transceiver unit is configured to receive the application start instruction sent by the first Weex page loading device, and return the current page gray-scale release rule of the target application to the first Weex page loading device;
[0017] The first processing unit is configured to determine whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application when obtaining a trigger instruction for a target link in the target application;
[0018] The first transceiver unit is further configured to send a first lx file download request to the second Weex page loading device when the trigger instruction conforms to the current page gray scale release rule; or send a second lx file download request to the second Weex page loading device when the trigger instruction does not conform to the current page gray scale release rule;
[0019] The second transceiver unit is further configured to receive the first lx file download request or the second lx file download request sent by the first Weex page loading device;
[0020] The second processing unit is configured to determine a first lx file corresponding to the first lx file download request; or determine a second lx file corresponding to the second lx file download request;
[0021] The second transceiver unit is further configured to send the first lx file or the second lx file to the first Weex page loading device;
[0022] The first transceiver unit is further configured to receive the first lx file or the second lx file sent by the second Weex page loading device;
[0023] The first processing unit is further configured to render the target Weex page corresponding to the target link based on the first lx file, or render the target link based on the second lx file to obtain an original page different from the target Weex page.
[0024] In a fourth aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor. A computer program is stored on the memory, and when the processor executes the computer program, the methods in the first aspect or the second aspect are implemented.
[0025] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium. The storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the methods in the first aspect or the second aspect can be implemented.
[0026] The embodiments of the present application provide a Weex page loading method, apparatus, computer device, and storage medium. Among them, the method includes: when receiving an application startup instruction from a user for a target application, the user terminal obtains the current page gray-scale release rule of the target application from the application server corresponding to the target application; when receiving a trigger instruction from the user for a target link in the target application, it determines whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application; when the trigger instruction conforms to the current page gray-scale release rule, it sends a first lx file download request to the application server, and receives the first lx file returned by the application server based on the first lx file download request, and renders the target Weex page corresponding to the target link based on the first lx file; when the trigger instruction does not conform to the current page gray-scale release rule, it sends a second lx file download request to the application server, and receives the second lx file returned by the application server based on the second lx file download request, and renders the target link to obtain an original page different from the target Weex page. In this embodiment, when starting the target application, the user terminal dynamically obtains the current page gray-scale release rule from the application server, and determines whether to load the first lx file or the second lx file for the current Weex page based on the current page gray-scale release rule, realizing the gray-scale release of the Weex page, and avoiding the problem of a sharp decline in the user experience of a large number of users caused by full-scale release after page publishing, resulting in user loss. Description of the Drawings
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0028] Figure 1 It is a schematic diagram of the application scenario of the Weex page loading method provided by the embodiments of the present application;
[0029] Figure 2 It is a schematic flowchart of the Weex page loading method provided by the embodiments of the present application;
[0030] Figure 3 It is a schematic flowchart of the Weex page loading method provided by another embodiment of the present application;
[0031] Figure 4 It is a schematic diagram of the interaction process of the Weex page loading method provided by the embodiments of the present application;
[0032] Figure 5A schematic block diagram of the first Weex page loading device provided by an embodiment of the present application;
[0033] Figure 6 A schematic block diagram of the second Weex page loading device provided by an embodiment of the present application;
[0034] Figure 7 A schematic block diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0035] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0036] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprise" indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0037] It should also be understood that the terms used in this specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0038] It should be further understood that the term "and / or" used in this specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0039] The embodiments of the present application provide a Weex page loading method, device, computer device and storage medium.
[0040] The execution subject of the Weex page loading method may be the Weex page loading device provided in the embodiments of the present application, or a computer device integrated with the Weex page loading device. Among them, the Weex page loading device includes a first Weex page loading device and a second Weex page loading device. The computer device is a user terminal or an application server, and the first Weex page loading device is configured in the user terminal, and the second Weex page loading device is configured in the application server. Specifically, the user terminal may specifically be an electronic device such as a smart phone, a tablet computer, a handheld computer, or a notebook computer that can install the target application.
[0041] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the application scenario of the Weex page loading method provided in the embodiments of the present application. Specifically, when an application start instruction for the target application is obtained from a user, the user terminal 10 obtains the current page gray-scale release rule of the target application from the application server 20 corresponding to the target application; when a trigger instruction for a target link in the target application is obtained, it is determined whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application; when the trigger instruction conforms to the current page gray-scale release rule, a first lx file download request is sent to the application server 20, and the first lx file returned by the application server 20 based on the first lx file download request is received, and the target Weex page corresponding to the target link is rendered based on the first lx file; when the trigger instruction does not conform to the current page gray-scale release rule, a second lx file download request is sent to the application server 20, and the second lx file returned by the application server 20 based on the second lx file download request is received, and the target link is rendered based on the second lx file to obtain an original page different from the target Weex page.
[0042] The following first analyzes some terms related to the present application:
[0043] Weex: Weex is a framework for developing high-performance native applications using a popular Web development experience. Weex is committed to enabling developers to build Android, iOS, and Web applications based on a common cross-platform Web development language and development experience, making the interactive experience of the page approach the native experience.
[0044] lx File: Developers generate an lx file for each Weex page in the target application based on Weex. The lx file contains all the logic and styles of the corresponding Weex page. When the user accesses the Weex page within the APP and obtains the corresponding lx file, the APP will parse the lx file and render the parsed lx file.
[0045] bundle File: Developers package the H5 page into a bundle file (including bundle.js file and bundle.css file) based on Weex. The bundle file contains all the logic and styles of the H5 page. When the user accesses the H5 page through the system browser and the system browser obtains the corresponding bundle file, it parses and renders the bundle file.
[0046] In this embodiment, the application server includes a code release system and a Weex configuration system. Among them, when developers complete the development of the Weex page of the target application based on Weex and obtain the corresponding page code, they submit the page code to the code release system of the application server. Through the code release system, the code construction operation of the target application is performed, and the submitted page code is packaged into an lx file and a bundle file. Then, developers configure Weex for the Weex page corresponding to the packaged lx file through the Weex configuration system. Among them, the Weex configuration includes the configuration of the page path and the configuration of the page gray-scale release rule.
[0047] Embodiment 1:
[0048] This embodiment describes in detail the Weex page loading method provided by this application with the user terminal as the execution subject. Among them, the target application is installed in the user terminal, and the target application is developed based on Weex and can perform dynamic update and gray-scale release of Weex pages.
[0049] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of the Weex page loading method provided by the embodiment of this application. As Figure 2 shown, the method includes the following steps S110 - S140.
[0050] S110. When an application start instruction for the target application is obtained, obtain the current page gray-scale release rule of the target application from the application server corresponding to the target application.
[0051] In this embodiment, each time the user starts the target application, the latest current page gray-scale release rule is obtained from the corresponding application server.
[0052] Specifically, when it is detected that the user starts the target application, an application start instruction carrying the application identifier of the target application is generated, and then the application start instruction is sent to the application server, so that the application server can find the current page gray-scale release rule corresponding to the target application based on the application identifier carried in the application start instruction, and return the current page gray-scale release rule to the user terminal. Multiple application data of different applications can be stored in the application server.
[0053] Among them, if the user terminal closes the target application, the obtained current page gray-scale release rule needs to be deleted and obtained from the application server again at the next startup, so as to ensure that the page can be loaded according to the latest gray-scale release rule. The application server can gradually increase the page recovery release based on the dynamic gray-scale release rule.
[0054] S120. When a trigger instruction for a target link in the target application is obtained, it is determined whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application. If so, step S130 is executed; if not, step S140 is executed.
[0055] In this embodiment, after the user opens the target application and clicks on the target link (specifically, it can be packaged as a control corresponding to the function in the application main interface) to open the secondary page corresponding to the target link, the user terminal will determine whether to obtain the second lx file or the first lx file according to the current page gray-scale release rule obtained when the current application is started, so as to achieve the gray-scale release of the updated page.
[0056] Specifically, the current page gray-scale release rule includes an operating system release sub-rule, an application version release sub-rule, a page link release sub-rule, and a user label release sub-rule. The application configuration information includes the target operating system information corresponding to the target application, the target application version information corresponding to the target application, the target link, and the target user label currently logged in to the target application. Among them, the target user label includes the current user login account of the target application, the login area, and user attribute information, etc. The user attribute information includes the user's age and gender.
[0057] Further, the page link release sub-rule includes a page link regular matching rule, and the user label release sub-rule includes at least one of an account single-tail number release rule, an account double-tail number release rule, a random release rule, and a regional release rule.
[0058] Specifically, step S120 includes: determining whether the target operating system information conforms to the operating system release sub - rule; determining whether the target application version information conforms to the application version release sub - rule; determining whether the target link conforms to the page link release sub - rule; and determining whether the target user tag conforms to the user tag release sub - rule. If all of them conform, it is determined that the trigger instruction conforms to the current page gray - scale release rule; otherwise, it is determined that the trigger instruction does not conform to the current page gray - scale release rule.
[0059] In this embodiment, the target application includes at least one Weex page that needs to be gray - scale released. Different Weex pages can be configured with the same or different current page gray - scale release rules. When different Weex pages are configured with different current page gray - scale release rules and the target application includes multiple Weex pages that need to be gray - scale released, at this time, when the user terminal obtains an application start instruction for the target application, it is necessary to obtain multiple current page gray - scale release rules of the target application from the application server corresponding to the target application, and different current page gray - scale release rules carry the page links of the corresponding Weex pages. At this time, step S120 includes: when obtaining a trigger instruction for the target link in the target application, determining the target page gray - scale release rule corresponding to the target link from the obtained multiple current page gray - scale release rules, and determining whether the trigger instruction conforms to the target page gray - scale release rule according to the application configuration information of the target application.
[0060] In addition, when obtaining a trigger instruction for the target link in the target application, it is also necessary to detect whether the page currently opened by the user is a Weex page. If it is not a Weex page, there is no need to perform gray - scale loading, and a normal page download request is directly generated. If it is a Weex page, it is further determined whether the obtained multiple current page gray - scale release rules include the current page gray - scale release rule corresponding to this Weex page. If the corresponding current page gray - scale release rule is not included, there is no need to perform gray - scale loading either, and a normal page download request is directly generated. If the current page gray - scale release rule corresponding to this Weex page is included, then step S120 needs to be executed to determine whether the current trigger instruction conforms to the corresponding current page gray - scale release rule.
[0061] S130. Send a first lx file download request to the application server, receive the first lx file returned by the application server based on the first lx file download request, and render the target Weex page corresponding to the target link based on the first lx file.
[0062] In this embodiment, when the trigger instruction conforms to the current page gray-scale release rule, a first lx file download request is generated, which is used to request to download the first lx file from the application server. Specifically, a gray-scale label can be added to the generated lx file download request to obtain the first lx file download request, and the first lx file download request is sent to the application server. After receiving the first lx file download request, the application server detects that the first lx file download request carries a gray-scale label, then finds the first lx file corresponding to the gray-scale label, and returns the first lx file to the user terminal.
[0063] S140. Send a second lx file download request to the application server, and receive the second lx file returned by the application server based on the second lx file download request, and render the target link based on the second lx file to obtain an original page different from the target Weex page.
[0064] In this embodiment, when the trigger instruction does not conform to the current page gray-scale release rule, a second lx file download request is generated. The second lx file download request does not need to be labeled with a gray scale, or an original loading label is added to the second lx file download request, and then the second lx file download request is sent to the application server. After receiving the second lx file download request, the application server does not detect a gray-scale label or detects an original loading label. At this time, the application server returns the second lx file to the user terminal.
[0065] For example, when the user starts the target application in the user terminal, the user terminal obtains the latest current page gray-scale release rule of the target application from the application server. After the application server starts, the application main interface is displayed, and multiple different function controls (encapsulating different secondary page links) are displayed in the application main interface. When the user clicks the function control corresponding to the target link, the target link is triggered. At this time, the user terminal determines whether the current trigger instruction conforms to the current page gray-scale release rule. If it conforms, a request for the first lx file is sent to the application server to render the target Weex page based on the first lx file; if it does not conform, a request for the second lx file is sent to the application server to render an original page different from the target Weex page based on the second lx file.
[0066] Among them, the target Weex page can be an updated page of the original page.
[0067] To improve the smoothness of page switching, after obtaining the trigger instruction of the user for the target link in the target application and before rendering the target Weex page, the method further includes:
[0068] Obtain the page transition animation from the local database; play the page transition animation.
[0069] In this embodiment, the application server stores a first lx file and a second lx file corresponding to the Weex page, and both the first lx file and the second lx file are associated with the target link. Different users can load the first lx file or the second lx file through the same target link in the target application of different user terminals. It can be seen that the Weex page in this embodiment supports loading different versions of the page through the same link, and flexibly controls the display of different versions of the page.
[0070] In summary, in this embodiment, when the target application is started, the user terminal dynamically obtains the current page gray-scale release rule from the application server, and determines whether to load the first lx file or the second lx file for the current Weex page based on the current page gray-scale release rule, realizing the gray-scale release of the Weex page, and avoiding the problem of a sharp decline in the user experience of a large number of users caused by full-scale release after the page is published, resulting in user loss.
[0071] Embodiment Two:
[0072] This embodiment describes in detail the Weex page loading method provided by this application with the application server as the execution subject. Among them, the application server stores page data of at least one application including the target application and the page gray-scale release rule of the Weex page that needs to be gray-scale released.
[0073] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of the Weex page loading method provided by another embodiment of this application. As Figure 3 shown, this method includes the following steps S210-S230.
[0074] S210. When receiving the application start instruction for the target application sent by the user terminal, send the current page gray-scale release rule of the target application to the user terminal, so that when the user terminal receives the trigger instruction for the target link in the target application, it determines whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application.
[0075] In this embodiment, when it is detected that the target application in the user terminal is started, the current page gray-scale release rule corresponding to the target application is returned to the corresponding user terminal, where the current page gray-scale release rule includes the current (latest) page gray-scale release rules of each Weex page that needs to be gray-scale released in the target application, and each previous page gray-scale release rule includes an operating system release sub-rule, an application version release sub-rule, a page link release sub-rule, and a user label release sub-rule.
[0076] S220. When the trigger instruction conforms to the current page gray-scale release rule, receive the first lx file download request sent by the user terminal, and in response to the first lx file download request, return the first lx file to the user terminal, so that the user terminal renders the target Weex page corresponding to the target link based on the first lx file.
[0077] In this embodiment, when receiving the first lx file download request sent by the user terminal, first determine whether the first lx file download request comes from the APP. If it does not come from the APP but from the web page, directly return the latest page file (bundle file) of the page link corresponding to the download request to the user terminal. If it comes from the APP, further determine whether the request carries a gray-scale label. If it carries a gray-scale label, return the first lx file to the user terminal.
[0078] S230. When the trigger instruction does not conform to the current page gray-scale release rule, receive the second lx file download request sent by the user terminal, and in response to the second lx file download request, return the second lx file to the user terminal, so that the user terminal renders the target link based on the second lx file to obtain an original page different from the target Weex page.
[0079] In this embodiment, when receiving the second lx file download request sent by the user terminal, first determine whether the second lx file download request comes from the APP. If it does not come from the APP but from the web page, directly return the latest page file (bundle file) of the page link corresponding to the download request to the user terminal. If it comes from the APP, further determine whether the request carries a gray-scale label. If it does not carry a gray-scale label, and / or carries an original loading label, return the second lx file to the user terminal.
[0080] Further, to achieve dynamic control of the grayscale release (if the page is stable, gradually increase the grayscale release range; if the page is unstable, reduce or even close the grayscale release range), a grayscale release adjustment rule is set in the application server of this embodiment. The application server will detect the abnormal feedback ratio corresponding to each Weex page in the target application within a preset period (for example, within 24 hours) in real time, and then dynamically adjust the current page grayscale release rule of each Weex page according to the abnormal feedback ratio of each Weex page.
[0081] In addition, if the file download request received by the application server is sent by the user terminal based on a web page, at this time, the latest page file (bundle file) of the page link corresponding to the download request is directly returned to the user terminal.
[0082] Embodiment 3:
[0083] This embodiment describes the interaction of the Weex page loading method provided by this application with the application server and the user terminal as the execution entities.
[0084] Please refer to Figure 4 , Figure 4 which is the interaction process schematic diagram of the Weex page loading method provided by the embodiment of this application. As Figure 4 shown, this method includes the following steps S310 - S390.
[0085] S310. When receiving an application start instruction from the user for the target application, the user terminal sends the application start instruction to the application server.
[0086] S320. In response to the application start instruction, the application server returns the current page grayscale release rule corresponding to the target application to the user terminal.
[0087] S330. When receiving a trigger instruction from the user for the target link in the target application, the user terminal determines whether the trigger instruction conforms to the current page grayscale release rule according to the application configuration information of the target application. If so, execute steps S340 - S360; if not, execute steps S370 - S390.
[0088] S340. The user terminal sends a first lx file download request to the application server
[0089] S350. The application server receives the first lx file download request sent by the user terminal and returns the first lx file to the user terminal in response to the first lx file download request.
[0090] S360. The user terminal receives the first lx file returned by the application server, and renders the target Weex page corresponding to the target link based on the first lx file.
[0091] S370. The user terminal sends a second lx file download request to the application server.
[0092] S380. The application server receives the second lx file download request sent by the user terminal, and returns the second lx file to the user terminal in response to the second lx file download request.
[0093] S390. The user terminal receives the second lx file returned by the application server, and renders the target link based on the second lx file to obtain an original page different from the target Weex page.
[0094] In summary, in this embodiment, when the target application is started, the user terminal dynamically obtains the current page gray-scale release rule from the application server, and determines whether to load the first lx file or the second lx file for the current Weex page based on the current page gray-scale release rule, realizing the gray-scale release of the Weex page, and avoiding the problem of a sharp decline in the user experience of a large number of users caused by full-scale release after the page is published, resulting in user loss.
[0095] Corresponding to the above Weex page loading method, the present application further provides a Weex page loading device. The Weex page loading device is the first Weex page loading device 500 or the second Weex page loading device 600. The first Weex page loading device 500 is configured in the user terminal, and the second Weex page loading device 600 is configured in the application server. As Figure 5 shown, the first Weex page loading device 500 includes a first transceiver unit 501 and a first processing unit 502. As Figure 6 shown, the second Weex page loading device 600 includes a second transceiver unit 601 and a second processing unit 602, where:
[0096] The first transceiver unit 501 is configured to obtain an application start instruction of the user for the target application, and send the application start instruction to the second Weex page loading device 600.
[0097] The second transceiver unit 601 is configured to receive the application start instruction sent by the first Weex page loading device 500, and return the current page gray-scale release rule of the target application to the first Weex page loading device 500.
[0098] The first processing unit 502 is configured to, when a trigger instruction for a target link in the target application is obtained, determine whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application;
[0099] The first transceiver unit 501 is further configured to, when the trigger instruction conforms to the current page gray-scale release rule, send a first lx file download request to the second Weex page loading device 600; or, when the trigger instruction does not conform to the current page gray-scale release rule, send a second lx file download request to the second Weex page loading device 600;
[0100] The second transceiver unit 601 is further configured to receive the first lx file download request or the second lx file download request sent by the first Weex page loading device 500;
[0101] The second processing unit 602 is configured to determine a first lx file corresponding to the first lx file download request; or determine a second lx file corresponding to the second lx file download request;
[0102] The second transceiver unit 601 is further configured to send the first lx file or the second lx file to the first Weex page loading device 500;
[0103] The first transceiver unit 501 is further configured to receive the first lx file or the second lx file sent by the second Weex page loading device 600;
[0104] The first processing unit 502 is further configured to render the target Weex page corresponding to the target link based on the first lx file, or render the target link based on the second lx file to obtain an original page different from the target Weex page.
[0105] In some embodiments, the first processing unit 502 is further configured to obtain a page transition animation from a local database; play the page transition animation.
[0106] In some embodiments, the second processing unit 602 is further configured to obtain, through the second transceiver unit 601, the abnormal feedback ratio corresponding to each Weex page in the target application; update the current page gray-scale release rule according to the abnormal feedback ratio based on a preset gray-scale release adjustment rule.
[0107] In summary, in this embodiment, when the target application is launched, the first Weex page loading device 500 dynamically obtains the current page gray-scale release rule from the second Weex page loading device 600, and determines whether the first lx file or the second lx file needs to be loaded for the current Weex page based on the current page gray-scale release rule, thereby implementing the gray-scale release of the Weex page and avoiding the problem of a sharp decline in the user experience of a large number of users caused by full-scale release after the page is published, resulting in user loss.
[0108] It should be noted that those skilled in the art can clearly understand the specific implementation processes of the above-mentioned Weex page loading device and each unit. They can refer to the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and brevity of description, they will not be elaborated here.
[0109] The above-mentioned Weex page loading device can be implemented in the form of a computer program, and this computer program can run on a computer device as shown in Figure 7 Figure.
[0110] Please refer to Figure 7 , Figure 7 which is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 700 is a user terminal or an application server. The user terminal can be an electronic device with a communication function such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be an independent server or a server cluster composed of multiple servers.
[0111] Refer to Figure 7 , the computer device 700 includes a processor 702, a memory, and a network interface 705 connected through a system bus 701. Among them, the memory can include a non-volatile storage medium 703 and an internal memory 704.
[0112] The non-volatile storage medium 703 can store an operating system 7031 and a computer program 7032. The computer program 7032 includes program instructions. When the program instructions are executed, the processor 702 can be made to execute a Weex page loading method.
[0113] The processor 702 is used to provide computing and control capabilities to support the operation of the entire computer device 700.
[0114] The internal memory 704 provides an environment for the operation of the computer program 7032 in the non-volatile storage medium 703. When the computer program 7032 is executed by the processor 702, the processor 702 can be made to execute a Weex page loading method.
[0115] The network interface 705 is used for network communication with other devices. Those skilled in the art can understand that Figure 7 The structure shown in Figure 7 is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device 700 to which the solution of this application is applied. Specifically, the computer device 700 may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0116] Wherein, when the computer device 700 is a user terminal, the processor 702 is used to run the computer program 7032 stored in the memory to implement the following steps:
[0117] When an application start instruction for a target application is obtained from a user, obtain the current page gray-scale release rule of the target application from the application server corresponding to the target application;
[0118] When a trigger instruction for a target link in the target application is obtained from a user, determine whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application;
[0119] When the trigger instruction conforms to the current page gray-scale release rule, send a first lx file download request to the application server, and receive the first lx file returned by the application server based on the first lx file download request, and render the target Weex page corresponding to the target link based on the first lx file;
[0120] When the trigger instruction does not conform to the current page gray-scale release rule, send a second lx file download request to the application server, and receive the second lx file returned by the application server based on the second lx file download request, and render the target link based on the second lx file to obtain an original page different from the target Weex page.
[0121] When the computer device 700 is an application server, the processor 702 is used to run the computer program 7032 stored in the memory to implement the following steps:
[0122] When an application start instruction for a target application sent by a user terminal is obtained, send the current page gray-scale release rule of the target application to the user terminal, so that when the user terminal obtains a trigger instruction for a target link in the target application, it can determine whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application;
[0123] When the trigger instruction conforms to the current page gray-scale release rule, receive the first lx file download request sent by the user terminal, and in response to the first lx file download request, return the first lx file to the user terminal, so that the user terminal renders the target Weex page corresponding to the target link based on the first lx file;
[0124] When the trigger instruction does not conform to the current page gray-scale release rule, receive the second lx file download request sent by the user terminal, and in response to the second lx file download request, return the second lx file to the user terminal, so that the user terminal renders the target link to obtain the original page different from the target Weex page.
[0125] It should be understood that in the embodiment of the present application, the processor 702 may be a central processing unit (CPU), and the processor 702 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0126] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the above methods.
[0127] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, where the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the following steps:
[0128] When an application start instruction for a target application is obtained from a user, obtain the current page gray-scale release rule of the target application from an application server corresponding to the target application;
[0129] When a trigger instruction for a target link in the target application is obtained, it is determined whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application;
[0130] When the trigger instruction conforms to the current page gray-scale release rule, a first lx file download request is sent to the application server, and a first lx file returned by the application server based on the first lx file download request is received, and the target Weex page corresponding to the target link is rendered based on the first lx file;
[0131] When the trigger instruction does not conform to the current page gray-scale release rule, a second lx file download request is sent to the application server, and a second lx file returned by the application server based on the second lx file download request is received, and the target link is rendered based on the second lx file to obtain an original page different from the target Weex page.
[0132] Or, when an application start instruction for the target application sent by the user terminal is obtained, the current page gray-scale release rule of the target application is sent to the user terminal, so that when the user terminal obtains a trigger instruction for a target link in the target application, it is determined whether the trigger instruction conforms to the current page gray-scale release rule according to the application configuration information of the target application;
[0133] When the trigger instruction conforms to the current page gray-scale release rule, a first lx file download request sent by the user terminal is received, and a first lx file is returned to the user terminal in response to the first lx file download request, so that the user terminal renders the target Weex page corresponding to the target link based on the first lx file;
[0134] When the trigger instruction does not conform to the current page gray-scale release rule, a second lx file download request sent by the user terminal is received, and a second lx file is returned to the user terminal in response to the second lx file download request, so that the user terminal renders the target link based on the second lx file to obtain an original page different from the target Weex page.
[0135] The storage medium can be various computer-readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc that can store program codes.
[0136] Those of ordinary skill in the art will realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of the examples have been generally described in terms of function in the above description. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0137] In several embodiments provided by this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0138] The steps in the method embodiments of this application can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of this application can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0139] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of this application.
[0140] As described above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A Weex page loading method, characterized in that: The method is applied to a user terminal, and the method comprises: When an application startup instruction for a target application is obtained from a user, a grayscale release rule for the current page of the target application is obtained from an application server corresponding to the target application, and the current logged-in user of the target application is the target user; When a trigger instruction for a target link in the target application is obtained, judging whether the trigger instruction complies with the grayscale volume rule of the current page according to the application configuration information of the target application; When the trigger instruction meets the grayscale release rule of the current page, a first lx file download request is sent to the application server, and a first lx file returned by the application server based on the first lx file download request is received, and a target Weex page corresponding to the target link is rendered based on the first lx file; When the trigger instruction does not meet the grayscale release rule of the current page, a second lx file download request is sent to the application server, and a second lx file returned by the application server based on the second lx file download request is received, and the target link is rendered based on the second lx file to obtain an original page different from the target Weex page.
2. The method according to claim 1, characterized in that: The current page grayscale release rules include operating system release sub-rules, application version release sub-rules, page link release sub-rules and user tag release sub-rules, and the application configuration information includes target operating system information corresponding to the target application, target application version information corresponding to the target application, the target link and the target user tag of the target user.
3. The method according to claim 1, characterized in that The page link release sub-rule includes a page link regular matching rule, and the user tag release sub-rule includes at least one of an account single-tail number release rule, an account double-tail number release rule, a random release rule, and a regional release rule.
4. The method according to claim 1, characterized in that: After obtaining a trigger instruction from a user for a target link in the target application, the method further includes rendering a target Weex page corresponding to the target link based on the first lx file, or before rendering the target Weex page based on the second lx file: Get the page jump animation from the local database; Play the page jump animation.
5. A Weex page loading method, characterized in that: The method is applied to an application server, and the method comprises: When an application startup instruction for a target application sent by a user terminal is obtained, the grayscale release rule of the current page of the target application is sent to the user terminal, so that when the user terminal obtains a trigger instruction for a target link in the target application, it determines whether the trigger instruction complies with the grayscale release rule of the current page according to the application configuration information of the target application, and the current logged-in user of the target application is the target user; When the trigger instruction meets the grayscale volume rule of the current page, a first lx file download request sent by the user terminal is received, and in response to the first lx file download request, a first lx file is returned to the user terminal, so that the user terminal renders the target Weex page corresponding to the target link based on the first lx file; When the trigger instruction does not meet the grayscale release rule of the current page, a second lx file download request sent by the user terminal is received, and a second lx file is returned to the user terminal in response to the second lx file download request, so that the user terminal renders the target link based on the second lx file to obtain an original page different from the target Weex page.
6. The method according to claim 5, characterized in that The method further comprises: Obtain the abnormal feedback ratio corresponding to each Weex page in the target application; Based on the preset grayscale volume adjustment rule, the current page grayscale volume rule is updated according to the abnormal feedback ratio.
7. The method according to claim 5, characterized in that The current page grayscale release rules include operating system release sub-rules, application version release sub-rules, page link release sub-rules and user tag release sub-rules, and the application configuration information includes target operating system information corresponding to the target application, target application version information corresponding to the target application, the target link and the target user tag of the target user.
8. A Weex page loading device, characterized in that: The Weex page loading device is a first Weex page loading device or a second Weex page loading device, the first Weex page loading device is configured in a user terminal, the second Weex page loading device is configured in an application server, the first Weex page loading device includes a first transceiver unit and a first processing unit, the second Weex page loading device includes a second transceiver unit and a second processing unit, wherein: The first transceiver unit is used to obtain an application startup instruction from a user for a target application, and send the application startup instruction to the second Weex page loading device, where the currently logged-in user of the target application is the target user; The second transceiver unit is used to receive the application startup instruction sent by the first Weex page loading device, and return the current page grayscale volume release rule of the target application to the first Weex page loading device; The first processing unit is configured to, when obtaining a trigger instruction from a user for a target link in the target application, determine whether the trigger instruction complies with the grayscale volume increase rule of the current page according to the application configuration information of the target application; The first transceiver unit is further configured to send a first lx file download request to the second Weex page loading device when the trigger instruction meets the grayscale volume release rule of the current page; or send a second lx file download request to the second Weex page loading device when the trigger instruction does not meet the grayscale volume release rule of the current page; The second transceiver unit is further configured to receive the first lx file download request or the second lx file download request sent by the first Weex page loading device; The second processing unit is used to determine a first lx file corresponding to the first lx file download request; or determine a second lx file corresponding to the second lx file download request; The second transceiver unit is further used to send the first lx file or the second lx file to the first Weex page loading device; The first transceiver unit is further configured to receive the first lx file or the second lx file sent by the second Weex page loading device; The first processing unit is further configured to render a target Weex page corresponding to the target link based on the first lx file, or to render the target link based on the second lx file to obtain an original page different from the target Weex page.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the Weex page loading method according to any one of claims 1-4 or 5-7 is implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the Weex page loading method according to any one of claims 1 to 4 or 5 to 7.