Method, device, electronic device and storage medium for adjusting page text size

By obtaining the actual value of the text size of the previous page of the application, calculating the proportion coefficient and adjusting the text size of the current page, the problem of inconsistent display of different types of application pages on the mobile side is solved, and adaptive page text adjustment is achieved, improving the user experience.

CN113761421BActive Publication Date: 2025-08-19BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110132746.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-29
Publication Date
2025-08-19
Estimated Expiration
2041-01-29

AI Technical Summary

Technical Problem

In mobile web development, when the H5 page embeds the font size set by the user in the App, the style layout of the embedded page will change with the font size setting, and even the page style is incorrect. The font size of the H5 page sometimes does not change with the font size set in the App, which cannot meet the user's needs to change the font size.

Method used

By obtaining the actual value of the text size of the previous page of the application, calculating the scale coefficient, and adjusting the text size of the current page based on the scale coefficient, including setting thresholds and user input instructions, ensuring that different types of mobile applications can adaptively display the text size of the page.

Benefits of technology

It realizes the adaptability of different types of mobile applications when displaying application pages, improves the user experience, and meets the user's personalized customization needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761421B_ABST
    Figure CN113761421B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for adjusting text size on a page, comprising: in response to a user opening a current page of an application, obtaining the actual text size of the previous page of the application; calculating the ratio of the actual text size to a preset text size to obtain a scaling factor; and adjusting the text size of the current page based on the scaling factor; wherein the previous and current pages are application pages of the same application opened via different types of mobile applications. The present disclosure also provides a device for adjusting text size on a page, an electronic device, and a computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a method, device, electronic device, and computer storage medium for adjusting page text size. Background Art

[0002] With the increasing popularity of mobile devices, more and more users are choosing to use them to browse the internet. On mobile devices, users can choose to browse different applications through different types of mobile apps. For example, a user can browse a shopping app through a browser app, WeChat mini-program, or native app.

[0003] While implementing the concepts of this disclosure, the inventors discovered at least the following problems with the related art: During mobile web development, when an H5 page is embedded in a font size set by the user in the app, the style and layout of the embedded page often changes with the font size setting, even causing the page style to become distorted, requiring a jump to the native app for normal page display. Furthermore, the font size of the H5 page sometimes does not change at all with the font size set in the app, failing to meet the user's need to change the font size. Summary of the Invention

[0004] In view of this, the present disclosure provides a method and apparatus capable of adaptively adjusting the text size of a page displayed through different types of mobile applications.

[0005] One aspect of the present disclosure provides a method for adjusting the text size of a page, comprising: in response to a user opening a current page of an application, obtaining an actual value of the text size of a previous page of the application; calculating a ratio of the actual value to a preset value to obtain a proportional coefficient; and adjusting the text size of the current page based on the proportional coefficient; wherein the previous page and the current page are application pages opened by the same application through different types of mobile applications.

[0006] According to an embodiment of the present disclosure, adjusting the text size of the current page based on the proportional coefficient includes: judging the size of the proportional coefficient; when the proportional coefficient is less than or equal to a first threshold, adjusting the text size of the current page based on the first threshold; when the proportional coefficient is greater than or equal to a second threshold, adjusting the text size of the current page based on the second threshold; when the proportional coefficient is greater than the first threshold and less than the second threshold, adjusting the text size of the current page based on the proportional coefficient.

[0007] According to an embodiment of the present disclosure, in response to the user's operation of opening the current page of the application, obtaining the actual value of the text size of the previous page of the application includes: in response to the user's operation of opening the current page of the application, obtaining identification information of the current page, the identification information including device information displaying the current page and / or user information performing the operation of opening the current page; obtaining historical setting information associated with the device information and / or the user information, the historical setting information including the actual value of the text size set for the historical page; and obtaining the actual value of the text size of the previous page from the historical setting information.

[0008] According to an embodiment of the present disclosure, adjusting the text size of the current page based on the proportional coefficient also includes: detecting whether the user has saved the actual value of the text size set for the previous page; if the user has saved the actual value of the text size set for the previous page, adjusting the text size of the current page based on the proportional coefficient; if the user has not saved the actual value of the text size set for the previous page, asking the user whether to adjust the text size of the current page, and adjusting the text size of the current page in response to the instruction input by the user.

[0009] According to an embodiment of the present disclosure, adjusting the text size of the current page in response to an instruction input by the user includes: if the instruction input by the user is to disagree with adjusting the text size of the current page, displaying the current page according to the default text size set for the current page; if the instruction input by the user is to agree to adjust the text size of the current page, adjusting the text size of the current page according to the proportional coefficient.

[0010] According to an embodiment of the present disclosure, adjusting the text size of the current page in response to an instruction input by the user further includes: the user inputting a customized text font size; and adjusting the text size of the current page based on the customized text font size.

[0011] According to an embodiment of the present disclosure, the method further includes: when the user opens the application page of the application again, adjusting the text size of the application page based on the instruction.

[0012] Another aspect of the present disclosure provides a device for controlling the text size of a page, comprising: an acquisition module for acquiring, in response to a user's operation of opening a current page of an application, an actual value of the text size of a previous page of the application; a calculation module for calculating a ratio of the actual value to a preset value to obtain a proportional coefficient; and an adjustment module for adjusting the text size of the current page based on the proportional coefficient; wherein the previous page and the current page are application pages opened by the same application through different types of mobile applications.

[0013] Another aspect of the present disclosure provides an electronic device, comprising one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described above.

[0014] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method described above when executed.

[0015] According to the embodiments of the present disclosure, because a technical means of adjusting the page text size according to the proportional coefficient of text scaling of different pages is adopted, the technical problem of adjusting the text size of application pages opened through different types of mobile applications is at least partially overcome, thereby achieving the technical effect that different types of mobile applications can adaptively display application pages and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0017] Figure 1 An exemplary system architecture to which the method and apparatus for adjusting the size of text on a page of the present disclosure may be applied is schematically shown;

[0018] Figure 2 A flowchart of a method for adjusting the page text size according to an embodiment of the present disclosure is schematically shown;

[0019] Figure 3 A flowchart schematically illustrates a method for obtaining the actual value of the text size of a previous page according to an embodiment of the present disclosure;

[0020] Figure 4A A flowchart of a method for adjusting the text size of a current page according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 4B A flowchart of a method for adjusting the text size of a current page according to another embodiment of the present disclosure is schematically shown;

[0022] Figure 5 A flowchart of a method for adjusting the size of text on a page according to another embodiment of the present disclosure is schematically shown;

[0023] Figure 6 A block diagram schematically illustrates a device for adjusting the size of text on a page according to an embodiment of the present disclosure;

[0024] Figure 7Schematically shows a block diagram of an acquisition module according to an embodiment of the present disclosure;

[0025] Figure 8A Schematically shows a block diagram of an adjustment module according to an embodiment of the present disclosure;

[0026] Figure 8B A block diagram schematically illustrates an adjustment module according to another embodiment of the present disclosure; and

[0027] Figure 9 A block diagram of an electronic device suitable for implementing an apparatus for adjusting the size of text on a page according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0030] 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 should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0031] When expressions such as “at least one of A, B, and C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, “a system having at least one of A, B, and C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.). When expressions such as “at least one of A, B, or C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, “a system having at least one of A, B, or C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.).

[0032] The present disclosure provides a method and apparatus capable of adaptively adjusting the text size of pages displayed through different types of mobile applications. The method includes a process of determining a text scaling coefficient and a process of adjusting the text size. In the process of determining the scaling coefficient, in response to a user opening the current page of an application, the actual value of the text size of the previous page of the application is obtained, and the ratio of the actual value to a preset value is calculated to obtain the scaling coefficient. After determining the scaling coefficient, the text size of the current page is adjusted based on the scaling coefficient. The previous page and the current page are application pages opened by the same application through different types of mobile applications.

[0033] Figure 1 The following schematically illustrates an exemplary system architecture 100 to which the method and apparatus for adjusting the page text size according to an embodiment of the present disclosure can be applied. Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments or scenarios.

[0034] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

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

[0036] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0037] Server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using terminal devices 101, 102, and 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal device.

[0038] It should be noted that the method for adjusting the page text size provided by the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the device for adjusting the page text size provided by the embodiment of the present disclosure can generally be set in the server 105. The method for adjusting the page text size provided by the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the device for adjusting the page text size provided by the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Alternatively, the method for adjusting the page text size provided by the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, or 103, or can also be executed by other terminal devices different from the terminal devices 101, 102, or 103. Accordingly, the device for adjusting the page text size provided by the embodiment of the present disclosure may also be provided in the terminal device 101 , 102 , or 103 , or in other terminal devices different from the terminal device 101 , 102 , or 103 .

[0039] For example, the application is stored in any one of the terminal devices 101, 102, or 103 (for example, terminal device 101, but not limited thereto), or is stored on an external storage device and can be imported into the terminal device 101. The terminal device 101 can then locally execute the page text size adjustment method provided by the embodiment of the present disclosure, or send the application to another terminal device, server, or server cluster, and the other terminal device, server, or server cluster that receives the application executes the page text size adjustment method provided by the embodiment of the present disclosure.

[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0041] Figure 2 The flowchart of the method for adjusting the text size of a page according to an embodiment of the present disclosure is schematically shown.

[0042] like Figure 2 As shown, the method includes operations S201 to S203.

[0043] In operation S201 , in response to a user operation of opening a current page of an application, an actual value of a text size of a previous page of the application is acquired.

[0044] In operation S202 , a ratio of the actual value to the preset value is calculated to obtain a proportional coefficient.

[0045] In operation S203 , the text size of the current page is adjusted based on the scale factor.

[0046] In the embodiment of the present disclosure, the previous page and the current page are application pages of the same application opened through different types of mobile applications. It is understandable that the previous page is the application page of the application opened through the native app of the application, and the current page is the application page of the same application opened through a browser app. It should also be noted that the time when the application page is opened through the native app of the application and the time when the application page of the same application is opened through a browser app do not need to be the same, nor do they need to be within the same time period. Specifically, the time when the user opens the previous page can be Monday, and the time when the operation of opening the current page of the application is performed can be Wednesday. It is not limited to whether the previous page has been closed when the operation of opening the current page of the application is performed, but the user has not opened the application page of the application between Monday and Wednesday. The time interval between the user opening the previous page and the current page is not limited to the above example, but it should be noted that the user has not opened the application through any mobile application during the time period between the time when the previous page and the current page are opened.

[0047] On mobile devices, users can choose different types of mobile apps to browse and use a particular application. Most users will choose to browse and use that application through a specific native app developed for that application. For example, when shopping online, users can choose to open the app page through a shopping app or through a browser app. For browser apps, developers generally develop page display methods based on the HTML5 standard, and pages opened through browser apps are called H5 pages. The display method of H5 pages differs from the way native apps display application pages, mainly because browser apps and native apps are different types of mobile applications.

[0048] It should be noted that mobile applications can be categorized into native apps, hybrid apps, and web apps. For native apps, developers must develop specific apps for different operating systems. For example, developers may need to develop two mobile apps for the same application on iOS and Android. Because different mobile apps display their pages differently, compatibility issues exist. Even if a user customizes the app page in the native app, the web app may not display the same page accurately. For example, if a user customizes the text size on a page in a native app and then opens the page in a browser app, the browser app may not be able to accommodate the settings, resulting in distorted page layout. The reasons for this distorted layout vary between iOS and Android. Alternatively, developers may prevent users from customizing the text size on the app page to avoid distorted page layout, significantly reducing the user experience. In order to better solve this type of problem and enable different types of mobile applications to adaptively adjust the text size of the page, the text size adjustment method of the H5 page can be designed.

[0049] The developer pre-creates a designated DOM node and writes a font-size into it as a preset value. When a user opens the current H5 page, the actual text size of the previous page (i.e., the user-defined text size) is compared with the preset value to determine whether the current H5 page's text size needs to be scaled. The developer then adjusts the text size of the current H5 page according to the scaling ratio. The adjusted page is then displayed to the user.

[0050] Through this embodiment, the actual value of the text size of the previous page is obtained in the mobile application that opens the current page, and the text size of the current page is adjusted by the proportional coefficient of the text scaling of different pages, rather than directly adjusting the text size of the current page according to the text font size set in the previous mobile application in the mobile application that displays the current page. This makes it possible to adaptively display the application page when opening the application page through different types of mobile applications, meet the different page personalization customization needs of users, and improve the technical effect of user experience.

[0051] Reference below Figures 3 to 5 , combined with specific embodiments Figure 2 The method shown is further explained.

[0052] Figure 3The flowchart of the method for obtaining the actual value of the text size of the previous page according to an embodiment of the present disclosure is schematically shown.

[0053] like Figure 3 As shown, in response to the user's operation of opening the current page of the application, obtaining the actual value of the text size of the previous page of the application includes operations S301 to S303.

[0054] In operation S301 , in response to a user's operation of opening a current page of an application, identification information of the current page is acquired, where the identification information includes information of a device displaying the current page and / or information of a user who performs the operation of opening the current page.

[0055] In operation S302 , historical setting information associated with device information and / or user information is acquired, where the historical setting information includes an actual value of a text size set in a historical page.

[0056] In operation S303, the actual value of the text size of the previous page is acquired from the historical setting information.

[0057] In this embodiment, the relevant information of the previous page is determined using the identification information of the current page. For most applications, users need to log in to their personal accounts when using them. Therefore, regardless of the type of mobile application used by the user, the server's database can store a record of every operation performed by the user. For example, if a user sets the text size of an application page to 14xp in a native app, and then uses the app through a browser app to open the application page, the server will retrieve from the database the user's operation to set the text size of the previous page to 14xp, and then obtain the actual value of the text size of the previous page (14xp).

[0058] Alternatively, the server can also record information about the mobile device that opened the application page. For example, if a user opens the application page of an application through a native app on a mobile phone and sets the text size of the application page to 14xp in the native app, the server will record the serial number of the mobile phone, such as the IMEI, in the database. When the user uses the application through the browser app of the same mobile phone, the server will retrieve the database and find that the user has set the text size of the previous page to 14xp on the same mobile device, and then obtain the actual text size value of the previous page (14xp).

[0059] The present disclosure does not limit the specific content of the logo information, nor does it limit the user information to a personal account or the device information to the serial number of a mobile phone. Technicians in this field can set any relevant information of the current page as the identification information of the current page according to actual conditions to determine the actual value of the text size of the previous page.

[0060] Specifically, a font-size of 10px is written to the style of the specified DOM node, and this is used as the default font-size value. After the specified DOM node renders the page text, the window.getComputedStyle API is used to obtain the style value of this DOM node. The style value includes various attribute values of the page text, such as text size, font style, and text color. The getPropertyValue API is then used to obtain the actual font-size value of the text after the DOM is rendered from the style value.

[0061] Figure 4A The flowchart of the method for adjusting the text size of the current page according to an embodiment of the present disclosure is schematically shown.

[0062] like Figure 4A As shown, adjusting the text size of the current page based on the scale factor includes operations S401 to S404.

[0063] In operation S401, the size of the proportional coefficient is determined. If the proportional coefficient is less than or equal to the first threshold, operation S402 is performed; if the proportional coefficient is greater than or equal to the second threshold, operation S403 is performed; if the proportional coefficient is greater than the first threshold and less than the second threshold, operation S404 is performed.

[0064] In operation S402 , the text size of the current page is adjusted based on a first threshold.

[0065] In operation S403 , the text size of the current page is adjusted based on the second threshold.

[0066] In operation S404 , the text size of the current page is adjusted based on the scale factor.

[0067] In the embodiments of the present disclosure, different apps have different ratios for font enlargement or reduction. In order to improve the user experience and avoid scaling the text size too large or too small, it is necessary to limit the range of the enlargement or reduction ratio. Specifically, the scaling range can be set to 0.8 to 1.5 times the original default text size. That is, the first threshold is 0.8, and the second threshold is 1.5. However, when the proportional coefficient exceeds the range, it is not guaranteed to improve the user experience, and the page size is adjusted according to the first threshold or the second threshold. Those skilled in the art can set the threshold size according to the page display method of the mobile application itself, and the present disclosure does not limit the specific value of the threshold.

[0068] Figure 4B The flowchart of a method for adjusting the text size of a current page according to another embodiment of the present disclosure is schematically shown.

[0069] like Figure 4B As shown, adjusting the text size of the current page based on the scale factor includes operations S405 to S407.

[0070] In operation S405, it is detected whether the user has saved the actual value of the text size set for the previous page. If the user has saved the actual value of the text size set for the previous page, operation S406 is executed; if the user has not saved the actual value of the text size set for the previous page, operation S407 is executed.

[0071] In operation S406 , the text size of the current page is adjusted based on the scale factor.

[0072] In operation S407 , the user is asked whether to adjust the text size of the current page, and the text size of the current page is adjusted in response to an instruction input by the user.

[0073] In the embodiment of the present disclosure, since the user is in the previous page, the operation of modifying the page text size may be an erroneous operation. When it is detected whether the user has saved the actual value of the text size set for the previous page, the text size of the current page is adjusted according to the determined proportional coefficient. When it is detected that the user has not saved the modified setting of the text size of the previous page, it can be considered that the user's setting operation may be an erroneous operation, or the user does not want to scale the text size in other applications. Therefore, before adjusting the page text size, it is necessary to ask the user whether to adjust the text size of the current page, and then adjust the text size of the current page based on the instruction input by the user.

[0074] Specifically, if the instruction input by the user is to disagree with adjusting the text size of the current page, the current page will be displayed according to the default text size set for the current page. If the instruction input by the user is to agree to adjust the text size of the current page, the text size of the current page will be adjusted according to the proportional coefficient. The instruction input by the user can also be a customized text font size, in which case the text size of the current page will be adjusted according to the user-customized text font size. Alternatively, different text font sizes can be provided for users to choose from to meet the user's personalized needs. Those skilled in the art can set different instruction input methods according to actual conditions to meet the needs of users, and this disclosure does not limit the content of the instructions.

[0075] It should also be noted that after the user enters the instruction, the system needs to save the instruction content entered by the user and save the instruction content to the user's preference settings to record the user's various personalized settings and improve the user's experience.

[0076] Among them, in order to facilitate the system to accurately adjust the size of the page text, the preset value written in the DOM can be set to be the same as the default value of the page. After determining the scale factor, the page text size can be adjusted directly according to the scale factor. Specifically, a solution based on REM layout can be used to change the entire project in a responsive manner. After determining the scale factor, the outer container of the entire project, document.documentElement, is called to dynamically modify the font-size value of the document.documentElement element. That is, the font-size value is multiplied by the corresponding scale factor. The text size of the entire project can be modified accordingly, thereby adjusting the text size of the page.

[0077] In actual use, the preset value and the default value are not necessarily the same. Generally, the preset value is set to 10xp to facilitate the calculation of the scale factor. If the default value of the H5 page is 12xp, the scale factor needs to be converted before adjusting the page text size. For example, the actual value of the previous page is 14xp, the preset value is 10xp, and the default value of the H5 page is 12xp. Determine that the scale factor is 1.4, which is within the pre-set threshold range, and then convert the scale factor to 1.17. Optionally, you can also set a threshold range for the converted scale factor according to the page display method of different mobile applications to avoid the problem of over-scaling.

[0078] Figure 5 The flowchart of a method for adjusting the text size of a page according to another embodiment of the present disclosure is schematically shown.

[0079] like Figure 5 As shown, the method for adjusting the page text size further includes operation S501.

[0080] In operation S501 , when the user reopens the application page of the application program, the text size of the application page is adjusted based on an instruction.

[0081] In the embodiment of the present disclosure, since the content of the instruction is saved to the setting preferences belonging to the user after the user enters the instruction, the text size of the application page can be adjusted based on the instruction when the user opens the application next time. For example, the user enters a customized text font size of 14xp, then when the user opens the application page of the application again, 14xp is used as the actual value of the previous page, the scale factor is determined, and the text size of the current page is adjusted based on the scale factor. Before the user modifies the setting of the page text size, the user can use the font size of 14xp to display the application page every time he opens the page of the application, which is convenient for the user without having to set it multiple times, thereby improving the user's experience.

[0082] Figure 6A block diagram schematically shows a device for adjusting the size of text on a page according to an embodiment of the present disclosure.

[0083] like Figure 6 As shown, the apparatus 600 for adjusting the page text size includes an acquisition module 610 , a calculation module 620 and an adjustment module 630 .

[0084] The acquisition module 610 is configured to acquire the actual value of the text size of the previous page of the application in response to the user opening the current page of the application.

[0085] The calculation module 620 is used to calculate the ratio of the actual value to the preset value to obtain a proportional coefficient.

[0086] The adjustment module 630 is configured to adjust the text size of the current page based on the scale factor.

[0087] According to the embodiments of the present invention, any number of modules, sub-modules, units, and sub-units, or at least part of the functions of any number of them, can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, sub-modules, units, and sub-units can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, sub-modules, units, and sub-units can be at least partially implemented as a hardware circuit, 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 a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, sub-modules, units, and sub-units can be at least partially implemented as a computer program module, which can perform the corresponding functions when the computer program module is executed.

[0088] For example, any multiple of the acquisition module 610, the calculation module 620, and the adjustment module 630 can be combined into a single module / unit / sub-unit, or any one of these modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functionality of one or more of these modules / units / sub-units can be combined with at least part of the functionality of other modules / units / sub-units and implemented in a single module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the acquisition module 610, the calculation module 620, and the adjustment module 630 can be at least partially implemented as a hardware circuit, 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 a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware by any other reasonable means of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of these. Alternatively, at least one of the acquisition module 610 , the calculation module 620 , and the adjustment module 630 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.

[0089] like Figure 7 As shown, the acquisition module 610 includes a first acquisition unit 6101, which is used to obtain identification information of the current page in response to a user's operation of opening the current page of the application. The identification information includes information about the device displaying the current page and / or information about the user who performed the operation of opening the current page. A second acquisition unit 6102 is used to obtain historical setting information associated with the device information and / or user information. The historical setting information includes the actual value of the text size set for the historical page. A third acquisition unit 6103 is used to obtain the actual value of the text size of the previous page from the historical setting information.

[0090] like Figure 8A As shown, the adjustment module 630 includes a judgment unit 6301 for judging the size of the proportional coefficient. A first adjustment unit 6302 is configured to adjust the text size of the current page based on the first threshold if the proportional coefficient is less than or equal to a first threshold. A second adjustment unit 6303 is configured to adjust the text size of the current page based on the second threshold if the proportional coefficient is greater than or equal to a second threshold. A third adjustment unit 6304 is configured to adjust the text size of the current page based on the proportional coefficient if the proportional coefficient is greater than the first threshold and less than the second threshold.

[0091] like Figure 8BAs shown, the adjustment module 630 further includes a detection unit 6305 for detecting whether the user has saved the actual value of the text size set for the previous page. A fourth adjustment unit 6306 is configured to adjust the text size of the current page based on the scale factor if the user has saved the actual value of the text size set for the previous page. A fifth adjustment unit 6307 is configured to inquire the user whether to adjust the text size of the current page if the user has not saved the actual value of the text size set for the previous page, and adjust the text size of the current page in response to the instruction input by the user.

[0092] It should be noted that the device for adjusting the page text size in the embodiment of the present disclosure corresponds to the method for adjusting the page text size in the embodiment of the present disclosure. The description of the device for adjusting the page text size refers to the method for adjusting the page text size, which will not be repeated here.

[0093] Figure 9 A block diagram of an electronic device suitable for implementing the above-described method according to an embodiment of the present disclosure is schematically shown. Figure 9 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0094] like Figure 9 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 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.

[0095] Various programs and data required for the operation of the system 700 are stored in the RAM 703. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The processor 701 executes the programs in the ROM 702 and / or RAM 703 to perform various operations of the method flow according to the embodiment of the present disclosure. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also execute the programs stored in the one or more memories to perform various operations of the method flow according to the embodiment of the present disclosure.

[0096] According to an embodiment of the present disclosure, system 700 may further include an input / output (I / O) interface 705, which is also connected to bus 704. System 700 may also include one or more of the following components connected to I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or modem. Communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to I / O interface 705 as needed. Removable media 711, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 710 as needed, so that computer programs read from the removable media can be installed into storage section 708 as needed.

[0097] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0098] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0099] According to embodiments of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples include, but are not limited to, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0100] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .

[0101] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

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

[0103] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for adjusting the text size of a page, comprising: In response to a user opening a current page of an application, obtaining an actual value of a text size customized by the user on a previous page of the application, wherein the current page is an application page of the application opened through a browser, and the previous page is an application page of the application opened through a native application; Calculating a ratio of the actual value to a preset value to obtain a proportional coefficient, wherein the preset value represents a text size defined during development of the current page of the application; Adjusting the text size of the current page based on the scale factor; The adjusting the text size of the current page based on the scale factor includes: Determining the size of the proportional coefficient; When the proportional coefficient is less than or equal to a first threshold, adjusting the text size of the current page based on the first threshold; When the proportional coefficient is greater than or equal to a second threshold, adjusting the text size of the current page based on the second threshold; When the proportional coefficient is greater than a first threshold and less than a second threshold, the text size of the current page is adjusted based on the proportional coefficient.

2. The method according to claim 1, wherein The step of obtaining the actual value of the text size of the previous page of the application in response to the user opening the current page of the application includes: In response to a user opening a current page of the application, obtaining identification information of the current page, the identification information including information of a device displaying the current page and / or information of a user performing the operation of opening the current page; Acquire historical setting information associated with the device information and / or the user information, the historical setting information including an actual value of a text size set on a historical page; The actual value of the text size of the previous page is obtained from the historical setting information.

3. The method according to claim 1, wherein The adjusting the text size of the current page based on the scale factor further includes: Detecting whether the user has saved the actual value of the text size set for the previous page; If the user has saved the actual value of the text size set for the previous page, adjusting the text size of the current page based on the scale factor; If the user has not saved the actual value of the text size set for the previous page, the user is asked whether to adjust the text size of the current page, and the text size of the current page is adjusted in response to an instruction input by the user.

4. The method according to claim 3, wherein: The adjusting the text size of the current page in response to an instruction input by the user includes: If the user inputs an instruction not to adjust the text size of the current page, the current page is displayed according to the default text size set for the current page; If the instruction input by the user is to agree to adjust the text size of the current page, the text size of the current page is adjusted according to the proportional coefficient.

5. The method according to claim 3, wherein The adjusting the text size of the current page in response to an instruction input by the user further includes: User-defined text font size input; Based on the customized text font size, the text size of the current page is adjusted.

6. The method according to claim 4 or 5, wherein: Also includes: When the user opens the application page of the application again, the text size of the application page is adjusted based on the instruction.

7. A device for adjusting the size of text on a page, comprising: an acquisition module, configured to, in response to a user opening an operation of a current page of an application, acquire an actual value of a text size customized by the user on a previous page of the application, wherein the current page is an application page of the application opened through a browser, and the previous page is an application page of the application opened through a native application; a calculation module, configured to calculate a ratio of the actual value to a preset value to obtain a proportional coefficient, wherein the preset value represents a text size defined during development of the current page of the application; An adjustment module, configured to adjust the text size of the current page based on the scale factor; The adjusting the text size of the current page based on the scale factor includes: Determining the size of the proportional coefficient; When the proportional coefficient is less than or equal to a first threshold, adjusting the text size of the current page based on the first threshold; When the proportional coefficient is greater than or equal to a second threshold, adjusting the text size of the current page based on the second threshold; When the proportional coefficient is greater than a first threshold and less than a second threshold, the text size of the current page is adjusted based on the proportional coefficient.

8. An electronic device comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Display font size adjustment method and apparatus, and terminal device

    CN106383689A

  • Method and device used for text size adjustment of page rendering

    CN107590240A