Page font scaling method and device based on progressive front-end framework

By using a progressive front-end framework to detect user behavior and dynamically adjust the font size of web pages, this solves the display errors and user mismatch issues caused by existing font scaling solutions, and achieves a more stable and user-friendly font scaling method.

CN120929692APending Publication Date: 2025-11-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511127726.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

The existing web page font scaling solution is applied globally, resulting in display errors on different devices, and the font size does not meet user needs, especially for the elderly.

Method used

Based on a progressive front-end framework, the system detects the usage information of target users, sets font scaling attributes for each page individually, and dynamically adjusts the font size when it receives the user's zoom ratio, supporting a gradual approach to font scaling.

Benefits of technology

It reduces the difficulty and risk of font scaling, improves the user experience, especially the convenience of use for the elderly, and reduces the intrusion into business code and the amount of development work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929692A_ABST
    Figure CN120929692A_ABST
Patent Text Reader

Abstract

The invention provides a page font scaling method and device based on a progressive front-end framework. The page font scaling method and device can be applied to the technical field of servers, the technical field of financial science and technology or other related technical fields. The method comprises the steps that a target page meeting a preset condition is determined from multiple pages based on use condition information of a target user on the multiple pages, the font scaling attribute of each page is a first attribute value, and the first attribute values represent that the pages do not support font scaling; the font scaling attribute of the target page is modified into a second attribute value, and the second attribute value represents that the target page supports font scaling; and in response to a received target font scaling ratio of the target user for the target page, adjusting the font size of the target page according to the target font scaling ratio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of server technology, financial technology technology or other related technical fields, and in particular to a method and apparatus for scaling page fonts based on a progressive front-end framework. Background Technology

[0002] Web page (World Wide Web Page) font scaling typically uses media queries or viewport units to dynamically display different font sizes based on the size of the current display area. However, existing web page font scaling solutions are all globally applied, which significantly impacts existing pages and can easily lead to display errors on different devices. Furthermore, the font size is automatically determined based on the system's analysis of device parameters, and this determined font size may not necessarily meet the user's needs.

[0003] Furthermore, with the rapid development of mobile internet, small-screen mobile devices such as smartphones have become the primary devices for accessing the internet. However, as the proportion of elderly people among mobile internet users continues to increase, they often encounter many inconveniences when using these devices. Therefore, making web pages age-friendly is also a challenge in web page design. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a method and apparatus for scaling page fonts based on a progressive front-end framework.

[0005] According to the first aspect of this disclosure, a method for scaling page fonts based on a progressive front-end framework is provided, comprising:

[0006] Based on the target user's usage information of multiple pages, target pages that meet preset conditions are determined from the multiple pages. The font scaling attribute of each of the multiple pages is a first attribute value, and the first attribute value indicates that the page does not support font scaling.

[0007] Modify the font scaling attribute of the target page to the second attribute value, whereby the second attribute value indicates that the target page supports font scaling.

[0008] In response to the target user's target font scaling ratio for the target page, the font size of the target page is adjusted according to the target font scaling ratio.

[0009] According to embodiments of this disclosure, the aforementioned usage information includes the number of times the target user uses the aforementioned page. The process of determining a target page that meets preset conditions from among the multiple pages based on the target user's usage information for multiple pages includes:

[0010] If the target user uses the page more times than a preset number of times, the page will be identified as the target page.

[0011] According to embodiments of this disclosure, the aforementioned usage information includes the proportion of the target user among the users using the aforementioned page. The process of determining the target page that meets preset conditions from the multiple pages based on the target user's usage information across multiple pages includes:

[0012] If the proportion of the target users among the users using the above page is greater than a preset proportion, then the above page will be designated as the target page.

[0013] According to embodiments of this disclosure, the above-described page font scaling method based on a progressive front-end framework further includes:

[0014] Set up separate route lists for the above multiple pages, which include monitoring functions and font size calculation functions.

[0015] According to embodiments of this disclosure, the above-mentioned response to the received target user's target font scaling ratio for the target page, adjusting the font size of the target page according to the target font scaling ratio, includes:

[0016] By calling the font size calculation function mentioned above, the first target font size for the target page is determined based on the target font scaling ratio and the initial value of the page font.

[0017] Adjust the font size of the target page to match the font size of the first target page.

[0018] According to embodiments of this disclosure, the above-described page font scaling method based on a progressive front-end framework further includes:

[0019] Before navigating from the first page to the second page, read the font scaling properties of the second page.

[0020] If the font scaling attribute of the second page indicates that the second page supports font scaling, then the above monitoring function is invoked;

[0021] If the font scaling ratio of the target user on the second page is detected, the font size calculation function is called to determine the second target font size for the second page based on the font scaling ratio.

[0022] Adjust the font size of the second page to match the second target font size.

[0023] According to embodiments of this disclosure, before receiving the target font scaling ratio for the target page from the target user, the page font scaling method based on a progressive front-end framework further includes:

[0024] The font size of the target page is adjusted within the preset font scaling range to obtain the page display status of the target page within the preset font scaling range.

[0025] When the above-mentioned page display status indicates an abnormal page display, the above-mentioned target page will be subject to pre-defined processing, which includes one of the following: hiding part of the text, or adding a line break.

[0026] The second aspect of this disclosure provides a page font scaling device based on a progressive front-end framework, comprising: a determining module, a modifying module, and an adjusting module. The determining module is configured to determine a target page from the multiple pages that meets preset conditions based on information about a target user's usage of multiple pages, wherein the font scaling attribute of each of the multiple pages is a first attribute value, the first attribute value indicating that the page does not support font scaling; the modifying module is configured to modify the font scaling attribute of the target page to a second attribute value, wherein the second attribute value indicating that the target page supports font scaling; the adjusting module is configured to adjust the font size of the target page according to the target font scaling ratio received from the target user for the target page.

[0027] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.

[0028] A fourth aspect of this disclosure also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0029] The fifth aspect of this disclosure also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0030] According to the page font scaling method and apparatus based on the progressive front-end framework provided in this disclosure, since each page has its own font scaling attribute set in advance, and the pre-set font scaling attribute indicates that the page does not support font scaling, it is possible to support font scaling by progressively advancing the page, which reduces the difficulty and risk of support. Furthermore, for pages frequently used by the target users, font scaling can be supported first, thereby improving the user experience in a targeted manner. Attached Figure Description

[0031] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0032] Figure 1 The illustration shows an application scenario of a page font scaling method based on a progressive front-end framework according to an embodiment of the present disclosure.

[0033] Figure 2 A flowchart illustrating a page font scaling method based on a progressive front-end framework according to an embodiment of the present disclosure is shown schematically.

[0034] Figure 3 The flowchart illustrating the setting, testing, and application of page font scaling according to embodiments of the present disclosure is shown in the illustration.

[0035] Figure 4 A schematic diagram illustrates a structural block diagram of a page font scaling device based on a progressive front-end framework according to an embodiment of the present disclosure; and

[0036] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing a page font scaling method based on a progressive front-end framework, according to an embodiment of the present disclosure. Detailed Implementation

[0037] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0038] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0039] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0040] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0041] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.

[0042] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this disclosure all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.

[0043] In realizing this disclosure, it was discovered that age-friendly design refers to the process of creating environments and social systems suitable for older adults to live, work, and participate in social activities, thereby meeting their needs in terms of housing, living, health, and social participation, and improving their quality of life and well-being. Various measures can be taken in the process of age-friendly design. In product design, emphasis can be placed on usability and accessibility to ensure that older adults can easily use and operate the products. Therefore, supporting larger font sizes across web pages is one practical solution for age-friendly design.

[0044] However, existing web page font scaling solutions are all globally effective, which has a significant impact on existing pages and can easily lead to display errors on different devices. Furthermore, the page font size is automatically determined by the system based on the analysis of device parameters, and the font size determined in this way may not meet the user's needs.

[0045] Therefore, embodiments of this disclosure provide a page font scaling method based on a progressive front-end framework, which enables configuration of whether dynamic font scaling is supported on a single page dimension, and the scaling ratio can be selected by the user within a certain range to dynamically adjust the font size, thereby increasing the stability and ease of use of the system, and also allowing for gradual optimization to adapt to aging.

[0046] Figure 1 The illustration shows an application scenario of a page font scaling method based on a progressive front-end framework according to an embodiment of the present disclosure.

[0047] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0048] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0049] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0050] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0051] For example, server 105 can determine the target page that meets preset conditions from multiple pages based on the target user's usage information of multiple pages. Then, the font scaling attribute of the target page can be modified to a second attribute value. This allows the target page's font size to be adjusted according to the target user's desired font scaling ratio. Here, the font scaling attribute of each of the multiple pages is a first attribute value, indicating that the page does not support font scaling, while the second attribute value indicates that the target page supports font scaling.

[0052] It should be noted that the page font scaling method based on a progressive front-end framework provided in this disclosure can generally be executed by server 105. Correspondingly, the page font scaling device based on a progressive front-end framework provided in this disclosure can generally be located in server 105. The page font scaling method based on a progressive front-end framework provided in this disclosure can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the page font scaling device based on a progressive front-end framework provided in this disclosure can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0053] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0054] The following will be based on Figure 1 The described scene, through Figures 2-3 The present disclosure provides a detailed description of the page font scaling method based on a progressive front-end framework according to embodiments of the present disclosure.

[0055] Figure 2 A flowchart illustrating a page font scaling method based on a progressive front-end framework according to an embodiment of the present disclosure is shown.

[0056] like Figure 2 As shown, the method 200 includes operations S210 to S230.

[0057] According to embodiments of this disclosure, the page font scaling method 200 is executed within a progressive front-end framework.

[0058] Specifically, the page font scaling method disclosed herein uses a route manager under a progressive front-end framework.

[0059] In operation S210, based on the target user's usage information of multiple pages, the target page that meets the preset conditions is determined from the multiple pages.

[0060] Among them, the font scaling attribute of each of the multiple pages is the first attribute value, which indicates that the page does not support font scaling; scaling font refers to the dynamic adjustment of the font-size of all text on the page.

[0061] According to embodiments of this disclosure, multiple pages can be pre-added with their own font scaling attributes to support configuration of whether dynamic font scaling is supported at the single-page level. Furthermore, the font scaling attributes of each of the multiple pages are first set to a first attribute value to indicate that the page does not support font scaling.

[0062] Specifically, a font scaling attribute (fontUnScale) can be added to the routing information of the page provided by the route manager. The font scaling attribute can be used to control font scaling.

[0063] Furthermore, the routing information contains a meta object, into which the font scaling attribute `fontUnScale` can be directly added.

[0064] According to embodiments of this disclosure, the first attribute value can be "true", which indicates that the page does not support font scaling, and the second attribute value can be "false", which indicates that the page supports font scaling.

[0065] Based on the above, in the initial stage, many pages did not support font scaling by default.

[0066] The target page can be defined as a page that the target user frequently uses.

[0067] According to embodiments of this disclosure, since page font scaling must meet age-appropriate requirements, the target user can be used to represent elderly people. Furthermore, based on the target user's usage information across multiple pages, a target page that meets preset conditions is determined from among the multiple pages. This determined target page that meets the preset conditions can represent pages frequently used by elderly people.

[0068] The target page may include at least one page.

[0069] In one embodiment, regarding age-friendliness, the target user can be characterized as an elderly person. In addition, the target user can also be characterized as other users as needed.

[0070] In operation S220, the font scaling attribute of the target page is modified to the second attribute value.

[0071] The second attribute value indicates that the target page supports font scaling.

[0072] According to embodiments of this disclosure, after determining the target page based on the target user's page usage information, the font scaling attribute of the target page can be modified to a second attribute value, that is, the font scaling attribute of the target page can be modified to "false" so that the target page can support font scaling.

[0073] In operation S230, in response to the target user's target font scaling ratio for the target page, the font size of the target page is adjusted according to the target font scaling ratio.

[0074] According to embodiments of this disclosure, for a target page, when a target user is browsing the page, they will first select a suitable target font scaling ratio. This allows the target user to browse the target page and, in response to the target user's target font scaling ratio, adjust the font size of the target page according to the target font scaling ratio, so that the target user can browse the target page with the adjusted font size.

[0075] According to the embodiments of this disclosure, since each page has its own font scaling attribute set in advance, and the font scaling attribute set in advance all indicate that the page does not support font scaling, the page can support font scaling in a step-by-step manner, which reduces the difficulty and risk of supporting font scaling. Furthermore, for pages frequently used by the target user, font scaling can be supported first, thereby improving the user experience in a targeted manner.

[0076] Furthermore, the use of the route manager enables page font scaling from 0.8 to 1.2 times in most scenarios, and the page font changes do not require modification of the business code itself. This greatly reduces the development workload while minimizing intrusion into the business code.

[0077] According to embodiments of this disclosure, a target page that meets preset conditions is determined from multiple pages based on the target user's usage information of multiple pages, including: determining the page as the target page when the number of times the target user uses the page is greater than a preset number.

[0078] The usage information includes the number of times the target user uses the page. The preset condition can indicate that the number of times the target user uses the page is greater than the preset number, which is set as needed.

[0079] According to embodiments of this disclosure, the number of times a target user uses each page can be obtained. For each page, the number of times the target user uses that page can be compared with a preset number of times. If the number of times the target user uses that page is greater than the preset number of times, then that page can be identified as the target page.

[0080] According to embodiments of this disclosure, a target page is selected from multiple pages based on the target user's usage information of multiple pages, so as to prioritize the target page to support font scaling, thereby improving the user experience in a targeted manner.

[0081] According to embodiments of this disclosure, determining a target page that meets preset conditions from multiple pages based on the target user's usage information of multiple pages includes: determining the page as the target page if the proportion of the target user among the users using the page is greater than a preset proportion.

[0082] The usage information includes the percentage of target users among the users using the page. The preset condition indicates that the percentage of target users among the users using the page is greater than a preset ratio, which is set as needed.

[0083] According to embodiments of this disclosure, the percentage of target users among users using each page can be obtained. For each page, the percentage of target users among users using the page can be compared with a preset ratio. If the percentage of target users among users using the page is greater than the preset ratio, then the page can be determined as the target page.

[0084] According to embodiments of this disclosure, a target page is selected from multiple pages based on the target user's usage information of multiple pages, so as to prioritize the target page to support font scaling, thereby improving the user experience in a targeted manner.

[0085] Based on the above, it can be seen that the target user's page usage information can characterize the target user's page usage and reflect whether the target user frequently uses the page.

[0086] According to embodiments of this disclosure, the target page can be continuously updated based on the target user's page usage information. Therefore, based on the target user's page usage information, page-by-page font scaling can be supported, achieving a rapid, incremental update effect.

[0087] According to embodiments of this disclosure, the page font scaling method based on a progressive front-end framework further includes: setting separate routing lists for multiple pages, wherein the routing lists include monitoring functions and font size calculation functions.

[0088] According to embodiments of this disclosure, while adding font scaling attributes to each page, a separate routing list is also set for each page.

[0089] In one embodiment, the routing list can be represented by AAAA, and the routing list may include a monitoring function BBBB and a font size calculation function CCCC.

[0090] Therefore, the monitoring functions and font size calculation functions in the routing list can be used to adjust the page font size.

[0091] Specifically, the monitoring function can be used to monitor user actions related to font scaling on the page, i.e., whether the user has adjusted the font size on the page. The font size calculation function can be used to calculate the desired font size for the page.

[0092] Building upon this, a list of routes for each page can be imported into the main routing configuration file. Specifically, the route list can be imported into the main routing configuration file of the route manager. This allows for centralized route configuration in the main routing configuration file, ensuring clearer and easier-to-maintain route management throughout the system.

[0093] According to embodiments of this disclosure, by setting a separate route list for each page, i.e. by importing the route list into the route manager, it is possible to support configuration of whether to support dynamic font scaling at the single-page level. Furthermore, it is possible to monitor the font scaling of the page by calling a monitoring function based on the route list. If it is detected that the font scaling of the page needs to change, a font size calculation function is called to calculate the font size that needs to be adjusted.

[0094] According to embodiments of this disclosure, in response to a target user's target font scaling ratio for a target page, adjusting the font size of the target page according to the target font scaling ratio includes: determining a first target font size for the target page based on the target font scaling ratio and the initial value of the page font by calling a font size calculation function; and adjusting the font of the target page to the first target font size.

[0095] According to embodiments of this disclosure, based on the determination of the target page, during the process of the target user browsing the page, when the target user browses to the target page, in response to the received target font scaling ratio of the target user for the target page, a font size calculation function can be called to determine the first target font size for the target page based on the target font scaling ratio and the initial value of the page font.

[0096] In one embodiment, the first target font size = target font scaling ratio × initial page font value. Here, the initial page font value represents the initial font size of the target page before it is viewed.

[0097] According to embodiments of this disclosure, given a first target font size for a target page, the font of the target page can be adjusted to the first target font size.

[0098] The target font scaling ratio can be selected by the target user within a certain range, meaning the target font scaling ratio is a ratio that the target user can choose.

[0099] In one embodiment, the target user can select the target font scaling ratio before starting to browse, or during the browsing process.

[0100] According to embodiments of this disclosure, by calling a font size calculation function, the font size of the target page can be dynamically adjusted based on the target font scaling ratio selected by the target user, thereby improving the user experience.

[0101] According to embodiments of this disclosure, the page font scaling method based on a progressive front-end framework further includes: reading the font scaling attribute of the second page before jumping from the first page to the second page; if the font scaling attribute of the second page indicates that the second page supports font scaling, calling a monitoring function; if the font scaling ratio of the target user for the second page is detected, calling a font size calculation function to determine a second target font size for the second page based on the font scaling ratio; and adjusting the font of the second page to the second target font size.

[0102] According to embodiments of this disclosure, during a target user's browsing process, navigation occurs from one page to another. Because a route list for each page is included in the main routing configuration file, functions within the route list can be called in the global navigation guard to ensure that the font scaling properties of a page are read before navigation to another page, and that functions in the route list are called when necessary.

[0103] Taking the first and second adjacent pages as an example, before jumping from the first page to the second page, the font scaling attribute of the second page can be read first, and the font scaling attribute of the second page can be used to determine whether the second page supports font scaling.

[0104] According to embodiments of this disclosure, when the font scaling attribute of the second page indicates that the second page supports font scaling, the routing list of the second page can be read based on the placement of the font scaling attribute of the second page, so as to call the monitoring function and font size calculation function in the routing list.

[0105] According to embodiments of this disclosure, when the font scaling attribute of the second page indicates that the second page supports font scaling, a monitoring function can be called to monitor whether the target user has received the font scaling ratio of the second page, that is, to monitor whether the user has performed an operation to adjust the font scaling ratio of the page.

[0106] In one embodiment, the monitoring function BBBB in the route list of the second page is called in the global navigation guard to register the corresponding monitoring event. The monitoring event can be an operation performed by the user to adjust the scaling of the page font. The monitoring event can be represented by XXXX('YYYY', AAAA.CCCC). Here, XXXX can represent the method used to register the event listener to listen for specific events; YYYY can represent the event of a change in the page font size, which is triggered when the user adjusts the scaling of the page font; AAAA.CCCC can represent the function executed when the YYYY event is triggered, which is specifically the font size calculation function CCCC in the route list AAAA.

[0107] According to embodiments of this disclosure, upon detecting the font scaling ratio of the target user on the second page, a font size calculation function is invoked. Using this function, based on the received font scaling ratio for the second page and the initial font size of the second page, a second target font size for the second page can be calculated. Therefore, the font on the second page can be adjusted to the second target font size.

[0108] In one embodiment, if the font scaling attribute of the second page indicates that the second page does not support font scaling, even if the target user receives a font scaling ratio for the second page, the font size of the second page will not change and will remain the original font size.

[0109] According to embodiments of this disclosure, since the font scaling attribute of the target page has been modified to support font scaling, during the target user's browsing process, before jumping from the first page to the second page, the font scaling attribute of the second page will be read to determine whether the second page supports font scaling. If the second page supports font scaling, by calling the monitoring function and the font size calculation function, the font of the second page can be adjusted to the font size required by the target user based on the font scaling ratio selected by the target user for the second page, thereby meeting the target user's needs and improving the target user's experience.

[0110] According to embodiments of this disclosure, before receiving the target font scaling ratio for the target page from the target user, the page font scaling method based on a progressive front-end framework further includes: adjusting the font size of the target page within a preset font scaling range to obtain the page display status of the target page within the preset font scaling range; and performing pre-defined processing on the target page when the page display status indicates an abnormal page display, wherein the pre-defined processing includes one of the following: hiding part of the text or adding a line break.

[0111] Because adjusting the font size on a page can easily cause page errors, it is necessary to test the font size adjustment on the target page before applying it in practice.

[0112] Therefore, after modifying the font scaling attribute of the target page to support font scaling, before receiving the target user's target font scaling ratio for the target page, that is, before deploying the application, the font size of the target page is adjusted within the preset font scaling range to test whether the target page can be displayed normally within the preset font scaling range.

[0113] According to embodiments of this disclosure, by adjusting the font size of the target page within a preset font scaling range, the page display status of the target page under various preset font scaling sizes within the preset font scaling range can be obtained. When the page display status indicates an abnormal display, pre-processing can be performed on the target page, such as hiding some files on the target page or wrapping the text on the target page, so that the target page can be displayed normally under the preset font scaling size. According to embodiments of this disclosure, when the page display status indicates a normal display, no pre-processing is required on the target page.

[0114] In one embodiment, the target font scaling ratio in operation S230 is within a preset font scaling range.

[0115] According to the embodiments of this disclosure, by testing the page display status of the target page within a preset font scaling range before actual application, it is ensured that the target page can be displayed normally in response to the target user's target font scaling ratio during actual application, avoiding abnormal display and improving user experience.

[0116] Figure 3 The flowchart illustrating the setup, testing, and application of page font scaling according to embodiments of the present disclosure is shown in the illustration.

[0117] like Figure 3 As shown, this embodiment 300 includes operations S310 to S391.

[0118] When operating S310, add font scaling attributes to multiple pages, with the font scaling attribute being the first attribute value; set separate route lists for each page.

[0119] In operation S320, based on the target user's usage information of multiple pages, the target page that meets the preset conditions is determined from the multiple pages.

[0120] In operation S330, the font scaling attribute of the target page is modified to the second attribute value.

[0121] According to embodiments of this disclosure, operations S310 to S330 are pre-setting operations for page font scaling. Each page has its own pre-set font scaling attribute, and these pre-set attributes all indicate that the page does not support font scaling. This allows for a gradual, page-by-page approach to enable font scaling, reducing the difficulty and risk of supporting font scaling. Furthermore, target pages frequently used by the target user are given priority for font scaling support. Additionally, a route list for each page is pre-set for subsequent calculation of the page font size by calling functions in the route list.

[0122] In operation S340, the font size of the target page is adjusted within the preset font scaling range to obtain the page display status of the target page within the preset font scaling range.

[0123] When operating S350, does the page display status indicate any abnormality in the page display?

[0124] According to the embodiments of this disclosure, if the page display status indicates an abnormal page display, operation S360 is executed; if the page display status does not indicate an abnormal page display, that is, if the page display status indicates a normal page display, operation S370 is executed.

[0125] When operating S360, perform pre-processing on the target page.

[0126] According to embodiments of this disclosure, operations S340 and S350 are detection operations for page font scaling. Since adjusting the page font size can easily cause page misalignment, it is necessary to test the font size adjustment on the target page before practical application.

[0127] When operating S370, before jumping from the first page to the second page, read the font scaling properties of the second page.

[0128] When operating S380, does the font scaling attribute of the second page indicate that the second page supports font scaling?

[0129] According to the embodiments of this disclosure, if the font scaling attribute of the second page indicates that the second page supports font scaling, operation S390 is executed; if the font scaling attribute of the second page does not indicate that the second page supports font scaling, that is, if the font scaling attribute of the second page indicates that the second page does not support font scaling, operation S391 is executed.

[0130] When operating S390, the monitoring function is called. If the font scaling ratio of the target user on the second page is detected, the font size calculation function is called to determine the second target font size for the second page based on the font scaling ratio; and the font on the second page is adjusted to the second target font size.

[0131] Operation S391, end.

[0132] According to embodiments of this disclosure, operations S370 to S391 are application operations for page font scaling. Operations S370 and S380 are executed before navigating from one page to another.

[0133] Based on the above, the page font scaling method disclosed herein, by utilizing a route manager, allows for easy definition of routing rules, mapping different URLs (Uniform Resource Locators) to different progressive front-end framework components, achieving page refresh-free navigation and component reuse. The route manager also supports advanced features such as lazy loading and route guards, further enhancing application performance and user experience. Furthermore, this page font scaling method based on a progressive front-end framework overcomes the shortcomings of existing production problem analysis and potential risk prediction solutions, providing a simple, easy-to-use, low-cost, and faster-to-deploy dynamic font scaling method.

[0134] Based on the aforementioned page font scaling method using a progressive front-end framework, this disclosure also provides a page font scaling device based on a progressive front-end framework. The following will combine... Figure 4 The device is described in detail.

[0135] Figure 4 A schematic diagram illustrates a structural block diagram of a page font scaling device based on a progressive front-end framework according to an embodiment of the present disclosure.

[0136] like Figure 4 As shown, the page font scaling device 400 based on the progressive front-end framework in this embodiment includes a determining module 410, a modifying module 420, and an adjusting module 430.

[0137] The determining module 410 is used to determine a target page that meets preset conditions from multiple pages based on the target user's usage information of multiple pages. The font scaling attribute of each of the multiple pages is a first attribute value, which indicates that the page does not support font scaling. In one embodiment, the determining module 410 can be used to perform the operation S210 described above, which will not be repeated here.

[0138] The modification module 420 is used to modify the font scaling attribute of the target page to a second attribute value, wherein the second attribute value indicates that the target page supports font scaling. In one embodiment, the modification module 420 can be used to perform the operation S220 described above, which will not be repeated here.

[0139] The adjustment module 430 is used to adjust the font size of the target page according to the target font scaling ratio received from the target user. In one embodiment, the adjustment module 430 can be used to perform the operation S230 described above, which will not be repeated here.

[0140] According to embodiments of this disclosure, the usage information includes the number of times a target user uses the page, and the determination module 410 includes a first determination unit.

[0141] The first determining unit is used to determine the page as the target page if the number of times the target user uses the page is greater than a preset number.

[0142] According to embodiments of this disclosure, the usage information includes the percentage of target users among users using the page, and the determination module 410 includes a second determination unit.

[0143] The second determining unit is used to determine the target page when the proportion of the target user among the users using the page is greater than a preset proportion.

[0144] According to embodiments of this disclosure, the page font scaling device 400 based on a progressive front-end framework further includes a setting module.

[0145] The settings module is used to set up separate route lists for multiple pages. The route lists include monitoring functions and font size calculation functions.

[0146] According to embodiments of this disclosure, the adjustment module 430 includes a determining unit and an adjusting unit.

[0147] The determination unit is used to determine the first target font size for the target page by calling the font size calculation function, based on the target font scaling ratio and the initial value of the page font.

[0148] The adjustment unit is used to adjust the font of the target page to the first target font size.

[0149] According to embodiments of this disclosure, the page font scaling device 400 based on a progressive front-end framework further includes a reading module, a first calling module, a second calling module, and an adjustment module.

[0150] The read module is used to read the font scaling properties of the second page before navigating from the first page to the second page.

[0151] The first calling module is used to call the monitoring function when the font scaling attribute of the second page indicates that the second page supports font scaling.

[0152] The second calling module is used to call the font size calculation function when the font scaling ratio of the target user on the second page is detected, so as to determine the second target font size for the second page according to the font scaling ratio.

[0153] The adjustment module is used to adjust the font size of the second page to match the font size of the second target page.

[0154] According to embodiments of this disclosure, before receiving the target font scaling ratio for the target page from the target user, the page font scaling device 400 based on the progressive front-end framework further includes an acquisition module and a processing module.

[0155] The module is used to adjust the font size of the target page within a preset font scaling range, thereby obtaining the page display status of the target page within the preset font scaling range.

[0156] The processing module is used to perform pre-defined processing on the target page when the page display status indicates an abnormality. The pre-defined processing includes one of the following: hiding part of the text or adding a line break.

[0157] According to embodiments of this disclosure, any plurality of modules among the determining module 410, modifying module 420, and adjusting module 430 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules can be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the determining module 410, modifying module 420, and adjusting module 430 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the determining module 410, modifying module 420, and adjusting module 430 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[0158] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing a page font scaling method based on a progressive front-end framework, according to an embodiment of the present disclosure.

[0159] like Figure 5 As shown, an electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage portion 508 into a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0160] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 502 and / or RAM 503. It should be noted that the programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0161] According to embodiments of this disclosure, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the input / output (I / O) interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.

[0162] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0163] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 502 and / or RAM 503 and / or one or more memories other than ROM 502 and RAM 503 described above.

[0164] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the page font scaling method based on a progressive front-end framework provided in embodiments of this disclosure.

[0165] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0166] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0167] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0168] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0169] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0170] Those skilled in the art will understand that the features described in the various embodiments of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0171] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A method for scaling page fonts based on a progressive front-end framework, characterized in that, The method includes: Based on the target user's usage information of multiple pages, a target page that meets preset conditions is determined from the multiple pages, wherein the font scaling attribute of each of the multiple pages is a first attribute value, and the first attribute value indicates that the page does not support font scaling; Modify the font scaling attribute of the target page to a second attribute value, wherein the second attribute value indicates that the target page supports font scaling; In response to the target user's target font scaling ratio for the target page, the font size of the target page is adjusted according to the target font scaling ratio.

2. The method according to claim 1, characterized in that, The usage information includes the number of times the target user uses the page. The step of determining the target page that meets preset conditions from the multiple pages based on the target user's usage information across multiple pages includes: If the target user uses the page more than a preset number of times, the page will be identified as the target page.

3. The method according to claim 1, characterized in that, The usage information includes the percentage of the target user among the users using the page. The step of determining the target page that meets preset conditions from the multiple pages based on the target user's usage information across multiple pages includes: If the proportion of the target user among the users using the page is greater than a preset proportion, the page is determined to be the target page.

4. The method according to claim 1, characterized in that, The method further includes: Set up separate route lists for the multiple pages, wherein the route lists include monitoring functions and font size calculation functions.

5. The method according to claim 4, characterized in that, The step of responding to the received target font scaling ratio of the target user for the target page, and adjusting the font size of the target page according to the target font scaling ratio, includes: By calling the font size calculation function, a first target font size for the target page is determined based on the target font scaling ratio and the initial value of the page font. Adjust the font of the target page to the size of the first target font.

6. The method according to claim 4, characterized in that, The method further includes: Before navigating from the first page to the second page, read the font scaling properties of the second page; If the font scaling attribute of the second page indicates that the second page supports font scaling, then the monitoring function is invoked; If the font scaling ratio of the target user on the second page is detected, the font size calculation function is invoked to determine the second target font size for the second page based on the font scaling ratio. Adjust the font size of the second page to match the target font size.

7. The method according to claim 1, characterized in that, Before receiving the target font scaling ratio for the target page from the target user, the method further includes: The font size of the target page is adjusted within a preset font scaling range to obtain the page display status of the target page within the preset font scaling range; When the page display status indicates an abnormal page display, the target page is subject to pre-defined processing, which includes one of the following: hiding part of the text or adding a line break.

8. A page font scaling device based on a progressive front-end framework, characterized in that, The device includes: The determination module is used to determine a target page that meets preset conditions from the multiple pages based on the target user's usage information of multiple pages, wherein the font scaling attribute of each of the multiple pages is a first attribute value, and the first attribute value indicates that the page does not support font scaling; The modification module is used to modify the font scaling attribute of the target page to a second attribute value, wherein the second attribute value indicates that the target page supports font scaling; An adjustment module is used to adjust the font size of the target page according to the target font scaling ratio received from the target user for the target page.

9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.