Page display method and electronic equipment

By obtaining the page size and device screen display range, determining the screen display ratio, and automatically adjusting the display of extra-long pages, the problem of users needing to manually adjust the size is solved, achieving consistent display on different devices and improving user experience.

CN120337858AActive Publication Date: 2025-07-18HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410035724.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-09
Publication Date
2025-07-18
Estimated Expiration
2044-01-09

AI Technical Summary

Technical Problem

In the prior art, ultra-long pages need to be manually adjusted when displayed on electronic devices, resulting in poor user browsing experience.

Method used

By obtaining the page size of the page to be displayed and the on-screen display range of the electronic device, determining the page type and on-screen display ratio, and automatically adjusting the page display to adapt to the on-screen display range of different devices.

Benefits of technology

It realizes consistent display of ultra-long pages on different electronic devices, improving user browsing experience and device versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337858A_ABST
    Figure CN120337858A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a page display method and electronic equipment, relates to the technical field of terminals, and aims at enabling a super-long page to be normally displayed on the electronic equipment and enabling a user to browse page contents of the super-long page more conveniently. The method comprises the steps that pages to be displayed, the page size corresponding to each page in the pages to be displayed and the screen display range of the electronic equipment are acquired; based on the page size corresponding to each page, determining a page type corresponding to each page; determining a screen display proportion based on the page size corresponding to each page, the page type corresponding to each page and the screen display range; and displaying the to-be-displayed page based on the page size corresponding to each page, the page type corresponding to each page and the screen display proportion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the technical field of terminals, and in particular, to a page display method and an electronic device. Background Art

[0002] Text files (such as notes, documents, etc.) may include at least one page. When a text file includes both special pages (such as an extremely long page) and normal pages, the display effect of the text file may be as Figure 1 shown.

[0003] Combined with Figure 1 it can be seen that the special page is displayed on the canvas in a scaled form, and the normal page is displayed on the canvas in its normal size. When a user browses the special page of the text file, the user needs to manually adjust the display size of the special page to make the content of the special page display normally. This display method brings inconvenience to the user browsing and reduces the user experience. Summary of the Invention

[0004] Embodiments of the present disclosure provide a page display method and an electronic device, which can make an extremely long page display normally, thereby facilitating the user to browse the page content of the extremely long page.

[0005] To achieve the above object, the embodiments of the present disclosure adopt the following technical solutions:

[0006] In a first aspect, embodiments of the present disclosure provide a page display method, including: First, obtain a page to be displayed, the page size corresponding to each page in the page to be displayed, and the screen display range of the electronic device; the page to be displayed includes an extremely long page; Then, based on the page size corresponding to each page, determine the page type corresponding to each page; Next, based on the page size corresponding to each page, the page type corresponding to each page, and the screen display range, determine the screen display ratio; Finally, based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio, display the page to be displayed.

[0007] Based on the above page display method, the present disclosure determines the screen display ratio according to the page size, page type, and screen display range corresponding to each page, so as to better adapt to the screen display ranges of different electronic devices by using the screen display ratio. Then, the page to be displayed is displayed according to the page size, page type, and screen display ratio corresponding to each page. In this way, the page content of the page to be displayed not only has good browsability on different electronic devices, but also can achieve consistent display on different electronic devices. Therefore, the user does not need to manually adjust the page to be displayed (that is, the extremely long page in the page to be displayed), and the page to be displayed can automatically adapt to the screen display range of the electronic device.

[0008] In another possible implementation manner in combination with the first aspect, the method further includes: receiving an editing operation of a user; in response to the editing operation, obtaining a screen display range of a view corresponding to the editing operation; projecting the view corresponding to the editing operation according to the screen display range of the electronic device and the screen display range of the view to obtain a projected view; based on a screen display ratio, performing screen display adaptation on the projected view to obtain an adapted view, and displaying the adapted view.

[0009] Based on this solution, by using the screen display range of the electronic device and the screen display range of the view for projection, it can ensure that the view can provide a suitable display effect on different electronic devices; moreover, through this solution, no matter on which electronic device the user performs an editing operation, a consistent view display effect can be obtained, improving the usability and generality of the application.

[0010] In another possible implementation manner in combination with the first aspect, the method further includes: receiving a processing operation performed by the user in the adapted view; the view corresponding to the editing operation includes the view corresponding to a text box, and the adapted view includes the view corresponding to the adapted text box; in response to the processing operation, determining a screen display size and a screen display position coordinate of a cursor in the text box; based on the screen display size and the screen display position coordinate of the cursor, performing processing on the view corresponding to the adapted text box to obtain a processed view; performing inverse calculation processing on the processed view to obtain a display view, and presenting the display view.

[0011] Based on this solution, it can avoid problems such as incorrect screen display size of the cursor and / or incorrect screen display position of the cursor in a text box (or annotation box) after the user performs a processing operation in the adapted view. This solution can achieve precise control and positioning of the cursor position and cursor size by determining the screen display size and the screen display position coordinate of the cursor, enabling the user to accurately perform text editing and processing. In addition, this method can also enable the user to feel real-time feedback and view changes when performing text box editing and processing, improving the user experience.

[0012] In another possible implementation manner in combination with the first aspect, based on the page size corresponding to each page, determining the page type corresponding to each page includes: if the page size corresponding to the page is less than or equal to a screening size, determining that the page type corresponding to the page is a first page type; if the page size corresponding to the page is greater than the screening size, the page type corresponding to the page is a second page type; wherein, the screening size is related to the screen display range. Based on this solution, by determining the page type corresponding to the page and adopting different display methods for different page types in a targeted manner, the display effect of each page can be better.

[0013] In another possible implementation manner in combination with the first aspect, based on the page size corresponding to each page, the page type corresponding to each page, and the screen display range, determining the screen display ratio includes: determining a screen display page among at least one first page according to the page size corresponding to at least one first page in the page to be displayed; the page type of the first page is the first page type, and the screen display page is the page with the largest page size among at least one first page; determining the screen display ratio according to the page size corresponding to the screen display page and the screen display range.

[0014] Based on this solution, taking the page with the largest page size in the first page as the screen display page can not only ensure that all pages in the first page can be normally displayed within the screen display range, but also ensure that other pages in the first page have better readability and visibility, thus helping users better browse and understand the page content. Moreover, determining the screen display ratio according to the page size corresponding to the screen display page and the screen display range can make the page layout more flexible, so as to adapt to a variety of different display environments.

[0015] In another possible implementation manner in combination with the first aspect, based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio, displaying the page to be displayed includes: determining the screen display size corresponding to the first page based on the page size corresponding to the first page and the screen display ratio; displaying the first page according to the screen display size corresponding to the first page.

[0016] Based on this solution, determining the screen display size corresponding to the first page according to the page size corresponding to the first page and the screen display ratio can achieve an adaptive layout of the page; and displaying the first page according to the screen display size corresponding to the first page can make the first page maintain a consistent page display effect on different devices. In this way, no matter on which electronic device (such as a computer, a mobile phone or a tablet, etc.) the user browses the first page, a similar visual experience can be obtained, improving the convenience of user use.

[0017] In another possible implementation manner in combination with the first aspect, based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio, displaying the page to be displayed includes: performing multi-screen division on the second page based on the page size corresponding to the second page in the page to be displayed and the screen display ratio, to obtain the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page; the page type corresponding to the second page is the second page type; displaying the second page in a split-screen manner according to the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page.

[0018] Based on this solution, the second page can be divided into multiple screen display ranges for display through multi-screen division. In this way, not only can the second page be normally displayed, but also the user's reading experience can be improved. At the same time, splitting the second page for display can also increase the interactivity between the user and the second page, making it more convenient for the user to screen and organize information.

[0019] In combination with the first aspect, in another possible implementation, according to the page size corresponding to the screen display page and the screen display range, determine the screen display ratio, including: determining the screen display ratio according to the width and height of the page size corresponding to the screen display page, and the width and height of the screen display range. Provide an example of determining the screen display ratio.

[0020] In combination with the first aspect, in another possible implementation, the screen display ratio satisfies the following expression: R = wi * hj > wj * hi? wj / wi : hj / hi; where R is the screen display ratio; w i is the width of the page size corresponding to the screen display page; h i is the height of the page size corresponding to the screen display page; w j is the width of the screen display range; h j is the height of the screen display range. Provide another specific example of determining the screen display ratio.

[0021] In combination with the first aspect, in another possible implementation, the ultra-long page is a global favorite page and / or a web page favorite page.

[0022] In a second aspect, an embodiment of the present disclosure provides a page display device, which can be applied to an electronic device and is used to implement the method in the first aspect above. The functions of the page display device can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, such as an acquisition module, a determination module, a display module, etc.

[0023] Among them, the acquisition module is configured to acquire the page to be displayed, the page size corresponding to each page in the page to be displayed, and the screen display range of the electronic device; the page to be displayed includes an ultra-long page; the determination module is configured to determine the page type corresponding to each page based on the page size corresponding to each page; and determine the screen display ratio based on the page size corresponding to each page, the page type corresponding to each page, and the screen display range. The display module is configured to display the page to be displayed based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio.

[0024] In combination with the second aspect, in a possible implementation, the page display device further includes a receiving module and a projection module. The receiving module is configured to receive an editing operation of a user. The obtaining module is further configured to, in response to the editing operation, obtain the screen display range of the view corresponding to the editing operation. The projection module is configured to project the view corresponding to the editing operation according to the screen display range of the electronic device and the screen display range of the view, to obtain a projected view; the display module is further configured to perform screen display adaptation on the projected view based on the screen display ratio, to obtain an adapted view, and display the adapted view.

[0025] In combination with the second aspect, in a possible implementation, the receiving module is further configured to receive a processing operation performed by the user in the adapted view; the view corresponding to the editing operation includes the view corresponding to the text box, and the adapted view includes the view corresponding to the adapted text box. The determining module is further configured to, in response to the processing operation, determine the screen display size and the screen display position coordinates of the cursor in the text box; and perform processing on the view corresponding to the adapted text box based on the screen display size and the screen display position coordinates of the cursor, to obtain a processed view. The display module is further configured to perform an inverse calculation process on the processed view, to obtain a display view, and display the display view.

[0026] In combination with the second aspect, in a possible implementation, the determining module is further configured to, if the page size corresponding to the page is less than or equal to the screening size, determine that the page type corresponding to the page is the first page type; if the page size corresponding to the page is greater than the screening size, the page type corresponding to the page is the second page type; wherein, the screening size is related to the screen display range.

[0027] In combination with the second aspect, in a possible implementation, the determining module is further configured to determine a screen display page from at least one first page according to the page size corresponding to at least one first page in the page to be displayed; the page type of the first page is the first page type, and the screen display page is the page with the largest page size among at least one first page; determine the screen display ratio according to the page size corresponding to the screen display page and the screen display range.

[0028] In combination with the second aspect, in a possible implementation, the determining module is further configured to determine the screen display size corresponding to the first page based on the page size corresponding to the first page and the screen display ratio. The display module is further configured to display the first page according to the screen display size corresponding to the first page.

[0029] In combination with the second aspect, in a possible implementation, the determination module is further configured to perform multi-screen division on the second page based on the page size and the screen display ratio corresponding to the second page in the page to be displayed, so as to obtain the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page; the page type corresponding to the second page is the second page type. The display module is further configured to display the second page in a split-screen manner according to the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page.

[0030] In combination with the second aspect, in a possible implementation, the determination module is further configured to determine the screen display ratio according to the width and height of the page size corresponding to the screen display page, and the width and height of the screen display range.

[0031] In combination with the second aspect, in a possible implementation, the screen display ratio satisfies the following expression: R = w i *h j >w j *h i ?w j / w i :h j / h i ; where R is the screen display ratio; w i is the width of the page size corresponding to the screen display page; h i is the height of the page size corresponding to the screen display page; w j is the width of the screen display range; h j is the height of the screen display range.

[0032] In combination with the second aspect, in a possible implementation, the extra-long page is a global favorite page and / or a web page favorite page.

[0033] In a third aspect, the present disclosure provides an electronic device, including: a memory, a display screen, and one or more processors; the memory and the display screen are coupled to the processor. Wherein, the memory is used to store computer program code, and the computer program code includes computer instructions; when the electronic device runs, the processor is used to execute one or more computer instructions stored in the memory, so that the electronic device executes the page display method according to any one of the first aspects above.

[0034] In a fourth aspect, the present disclosure provides a computer storage medium, including computer instructions, which when running on an electronic device, cause the electronic device to execute the page display method according to any one of the first aspects.

[0035] In a fifth aspect, the present disclosure provides a computer program product, which when running on an electronic device, causes the electronic device to execute the page display method according to any one of the first aspects.

[0036] In a sixth aspect, a device (e.g., the device may be a chip system) is provided, which includes a processor for supporting a first terminal device to implement the functions involved in the first aspect above. In a possible design, the device further includes a memory for storing necessary program instructions and data of the first terminal device. When the device is a chip system, it may be composed of chips or may include chips and other discrete devices.

[0037] It should be understood that the beneficial effects of the second to sixth aspects above can be referred to the relevant descriptions in the first aspect above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram showing the display effect of a text file provided for the related art;

[0039] Figure 2 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present disclosure;

[0040] Figure 3 A schematic diagram of the software structure of an electronic device provided by an embodiment of the present disclosure;

[0041] Figure 4 One of the flow schematic diagrams of a page display method provided by an embodiment of the present disclosure;

[0042] Figure 5 A display schematic diagram provided by an embodiment of the present disclosure;

[0043] Figure 6 A display effect diagram of a page provided by an embodiment of the present disclosure;

[0044] Figure 7 Another display effect diagram of a page provided by an embodiment of the present disclosure;

[0045] Figure 8 Yet another display effect diagram of a page provided by an embodiment of the present disclosure;

[0046] Figure 9 A schematic diagram showing the display effect of a text file provided by an embodiment of the present disclosure;

[0047] Figure 10 A schematic diagram of unit conversion provided by an embodiment of the present disclosure;

[0048] Figure 11 A display effect diagram of a cursor provided by an embodiment of the present disclosure;

[0049] Figure 12 Another flow schematic diagram of a page display method provided by an embodiment of the present disclosure;

[0050] Figure 13 A schematic structural diagram of a chip system provided by an embodiment of the present disclosure. Specific embodiments

[0051] Next, the technical solutions in the embodiments of the present disclosure will be described with reference to the accompanying drawings in the embodiments of the present disclosure. Among them, in the description of the present disclosure, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship. For example, A / B may represent A or B; "and / or" in the present disclosure is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations, where A and B can be singular or plural. And, in the description of the present disclosure, unless otherwise specified, "a plurality" means two or more than two. "At least one (item)" or a similar expression thereof refers to any combination of these items, including any combination of single item (s) or plural item (s). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present disclosure, in the embodiments of the present disclosure, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. do not necessarily limit being different. At the same time, in the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present disclosure should not be construed as being more preferred or more advantageous than other embodiments or design solutions. Rather, using words such as "exemplary" or "for example" is intended to present relevant concepts in a specific way for easy understanding.

[0052] In addition, the network architecture and service scenarios described in the embodiments of the present disclosure are for more clearly explaining the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those of ordinary skill in the art know that with the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided by the embodiments of the present disclosure are equally applicable to similar technical problems.

[0053] For the sake of clear and concise description of the following embodiments, a brief introduction to relevant concepts or technologies is given first:

[0054] 1. A canvas refers to an area for drawing graphics and images. The canvas can provide a blank area where users can draw pictures, draw images, or draw other graphics.

[0055] 2. The canvas content refers to the specific graphics, images, or other elements drawn or added on the canvas. The canvas content can be continuously enriched by drawing on the canvas.

[0056] 3. Device independent pixels (dp) is a unit of length used to describe the pixel density on the screen. Dp is commonly used in computer graphics and application development. Dp is device-independent and can be adjusted according to the screen size and resolution of different electronic devices, thus ensuring that the display effect of the application remains consistent on different electronic devices.

[0057] 4. Pixel (px) is used to represent the size and position of an image or graphic element on the screen. A pixel is the smallest unit that makes up a digital image, and each pixel has specific color and brightness information. It should be noted that px is a unit based on the physical pixels of the screen and is related to the screen density. Since different electronic devices may have different screen densities, the same number of px may display different sizes on different electronic devices.

[0058] 5. Pixels Per Inch (PPI) is used to describe the screen or image resolution. PPI represents the number of pixels per inch. The higher the PPI, the higher the clarity of the screen or image.

[0059] A text file refers to a file that stores information in character form. The content contained in a text file can be text, numbers, symbols, pictures, etc. Common text files include PDF, DOC, DOCX, TXT, etc. A text file can include one or more pages.

[0060] Figure 1 Exemplarily, the display effect of a text file is shown. This text file includes two pages, where the first page is an extra-long page and the second page is a normal page. Figure 1 The extra-long page and the normal page are displayed simultaneously. Combining Figure 1 it can be seen that the display width of the extra-long page is less than the width of the display size corresponding to the electronic device. The normal page is displayed normally according to the display size corresponding to the electronic device. Since the display width of the extra-long page is less than the width of the display size corresponding to the electronic device, when the user views the display content of the extra-long page, it generally needs to be magnified to clearly display the extra-long page. This display method greatly affects the user's reading efficiency and usage experience.

[0061] To this end, the present disclosure provides a page display method applied to an electronic device. In this way, an extremely long page can be normally displayed on the electronic device, and users can more conveniently view the page content of the extremely long page.

[0062] For example, the electronic device may be a mobile terminal such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), or may be a professional camera or other device. The specific type of the electronic device is not limited in the embodiments of the present disclosure.

[0063] Exemplarily, Figure 2 FIG. 200 shows a schematic structural diagram of an electronic device 200. The electronic device may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone interface 270D, a sensor module 280, a key 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc.

[0064] Among them, the above-mentioned sensor module 280 may include sensors such as a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor.

[0065] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 200. In other embodiments, the electronic device 200 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0066] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0067] The controller may be the nerve center and command center of the electronic device 200. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0068] A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory may save the instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0069] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0070] It can be understood that the interface connection relationships between the modules illustrated in this embodiment are only illustrative descriptions and do not constitute a structural limitation on the electronic device 200. In other embodiments, the electronic device 200 may also adopt different interface connection manners in the above embodiments, or a combination of multiple interface connection manners.

[0071] The charging management module 240 is configured to receive a charging input from a charger. Herein, the charger may be a wireless charger or a wired charger. While charging the battery 242, the charging management module 240 may also supply power to the electronic device through the power management module 241.

[0072] The power management module 241 is used to connect the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives inputs from the battery 242 and / or the charging management module 240 and supplies power to the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, the wireless communication module 260, etc. In some embodiments, the power management module 241 and the charging management module 240 may also be disposed in the same device.

[0073] The wireless communication function of the electronic device 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modulation and demodulation processor, the baseband processor, etc. In some embodiments, the antenna 1 of the electronic device 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 200 can communicate with the network and other devices through wireless communication technologies.

[0074] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 may be used to cover a single or multiple communication frequency bands. Different antennas may also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 may be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.

[0075] The mobile communication module 250 may provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 250 may receive electromagnetic waves through the antenna 1, perform filtering, amplification, etc. on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

[0076] The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 250 can be disposed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 and at least some modules of the processor 210 can be disposed in the same device.

[0077] The wireless communication module 260 can provide solutions for wireless communications applied to the electronic device 200, including WLAN (such as wireless fidelity, Wi-Fi) networks, Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.

[0078] The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves through the antenna 2, performs frequency modulation and filtering on the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 260 can also receive the signals to be sent from the processor 210, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0079] The electronic device 200 realizes the display function through the GPU, the display screen 294, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change the display information.

[0080] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel.

[0081] The electronic device 200 can realize the shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294, and the application processor, etc. The ISP is used to process the data fed back by the camera 293. The camera 293 is used to capture static images or videos. In some embodiments, the electronic device 200 may include 1 or N cameras 293, where N is a positive integer greater than 1.

[0082] The external memory interface 220 can be used to connect to an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external memory interface 220 to achieve the data storage function. For example, files such as music and videos are saved in the external memory card.

[0083] The internal memory 221 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. For example, in the embodiments of the present disclosure, the processor 210 can execute the instructions stored in the internal memory 221, and the internal memory 221 may include a program storage area and a data storage area.

[0084] Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 200 (such as audio data, phone book, etc.). In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0085] The electronic device 200 can implement audio functions through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone interface 270D, and the application processor, etc. For example, music playback, recording, etc.

[0086] The keys 290 include a power-on key, volume keys, etc. The keys 290 can be mechanical keys or touch keys. The motor 291 can generate a vibration prompt. The motor 291 can be used for incoming call vibration prompts and can also be used for touch vibration feedback. The indicator 292 can be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 295 is used to connect to a SIM card. The SIM card can be inserted into or removed from the SIM card interface 295 to achieve contact and separation from the electronic device 200. The electronic device 200 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.

[0087] In addition, an operating system runs on the above components, such as HarmonyOS, iOS, Android, Windows, etc. Application programs can be installed and run on this operating system. In some other embodiments, there can be multiple operating systems running in the electronic device.

[0088] It should be understood that Figure 2 the hardware modules included in the illustrated electronic device are only described exemplarily and do not limit the specific structure of the electronic device. In fact, the electronic device provided in the embodiments of the present disclosure may also include other hardware modules that have an interaction relationship with the hardware modules schematically shown in the figure, which are not specifically limited here. For example, the electronic device may also include a flashlight, a micro projection device, etc. Another example is that if the electronic device is a PC, then the electronic device may also include components such as a keyboard and a mouse.

[0089] The software system of the above electronic device may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, taking the system of the layered architecture as an example, the software structure of the electronic device is exemplarily described.

[0090] Figure 3 is the software structure block diagram of the electronic device in the embodiments of the present disclosure. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers is through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom are the application layer, the application framework layer, Android runtime and system libraries, and the kernel layer.

[0091] The application layer may include a series of application packages. Exemplarily, the application packages may include applications (APP) such as a camera, a gallery, a calendar, a phone, a map, a navigation, WLAN, Bluetooth, music, video, notes, etc.

[0092] The application framework layer provides application programming interfaces (API) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.

[0093] The application framework layer may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, etc., and the embodiments of the present disclosure do not make any restrictions on this.

[0094] Activity Manager: It is used to manage the life cycle of each application. Applications usually run in the operating system in the form of Activities. For each Activity, there will be a corresponding application record (ActivityRecord) in the Activity Manager, and this ActivityRecord records the status of the Activity of the application. The Activity Manager can use this ActivityRecord as an identifier to schedule the Activity process of the application.

[0095] WindowManagerService: It is used to manage the graphical user interface (GUI) resources used on the screen. Specifically, it can be used for: obtaining the screen size, creating and destroying windows, displaying and hiding windows, window layout, focus management, and input method and wallpaper management, etc.

[0096] The Content Provider is used to store and obtain data, and make this data accessible to application programs. This data can include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc. The Resource Manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, etc.

[0097] The application framework layer can also include a text box module, an editing module, a picture module, a handwriting engine module, and a screen display control module.

[0098] Among them, when the element corresponding to the editing operation is a text box (or comment box), the editing module is used to generate the view corresponding to the adapted text box (or comment box). When the element corresponding to the editing operation is a picture, the picture module is used to generate the view corresponding to the adapted picture. When the element corresponding to the editing operation is a handwriting note, the handwriting engine module is used to generate the view corresponding to the adapted handwriting note. The text box module is also used to generate the screen display size corresponding to the cursor, and receive the screen display position coordinates of the cursor, and display the cursor according to the screen display size corresponding to the cursor and the screen display position coordinates of the received cursor. The editing module is also used to determine the screen display position coordinates of the cursor, and send the screen display position coordinates of the cursor to the text box module. The screen display control module is used to obtain the screen display range and screen display ratio of the electronic device, and project the view corresponding to the editing operation according to the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation to obtain the projected view; based on the screen display ratio, perform screen display adaptation on the projected view to obtain the adapted view, and send the adapted view to the canvas; and receive the processed view, perform inverse calculation processing on the processed view to obtain the inverse calculated view, and based on the inverse calculated view, obtain the display view, and send the display view to the display screen.

[0099] The Android Runtime includes the core libraries and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part is the functional functions that the Java language needs to call, and the other part is the core libraries of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as the management of object life cycles, stack management, thread management, security and exception management, and garbage collection.

[0100] The system libraries can include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing libraries (such as: OpenGL ES), 2D image engines (such as: SGL), etc.

[0101] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media libraries support the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. SGL is the drawing engine for 2D drawing.

[0102] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, etc., and the embodiments of the present disclosure do not make any restrictions on this.

[0103] The methods in the following embodiments can all be implemented in an electronic device having the above-mentioned hardware structure or software structure.

[0104] The following will elaborate in detail a page display method provided by an embodiment of the present disclosure with reference to the accompanying drawings. This method can be applied to the above-mentioned electronic device. As Figure 4 shown, this method specifically includes:

[0105] Step 401, the electronic device obtains the page to be displayed and the page size corresponding to each page in the page to be displayed.

[0106] An electronic device may include a note application. When a user needs to operate on a note through the note application on the electronic device, the user can open the note application on the electronic device, that is, the electronic device can receive the user's operation of opening the note application. For example, the electronic device can receive the user's click operation on the icon corresponding to the note application. Among them, operating on a note may include creating a note or editing a note.

[0107] After the electronic device receives the user's operation of opening the note application, in response, the electronic device can display the interface corresponding to the note application. The interface corresponding to the note application may include the identifiers corresponding to at least one created note, such as the icon corresponding to the created note, the name corresponding to the created note, and the creation time corresponding to the created note, etc. When the user needs to operate on certain notes, the user can trigger the delete control, edit operation, or adjustment control in the note application to delete, edit, or adjust the created notes in the note application.

[0108] In some examples, the interface corresponding to the note application may further include a new note control, and the new note control can be used to trigger the display of the interface corresponding to the newly created note to create a new note. When the user needs to create a new note, the user can trigger the new note control in the interface corresponding to the note application. That is, the electronic device can receive the user's triggering operation on the new note control, such as a click operation, etc.

[0109] After the electronic device receives the user's click operation on the new note control, in response, the electronic device can display the new note. The page size corresponding to the new note can be a preset size. If the user adjusts the page size corresponding to the new note, the page size corresponding to the new note is the adjusted page size. If the user adjusts the number of pages corresponding to the new note, the number of pages corresponding to the new note is the adjusted number of pages.

[0110] In some examples, the interface corresponding to the note application may further include an import control, and the import control can be used to trigger the display of the interface corresponding to the newly imported note. When the user needs to import a note, the user can trigger the import control in the interface corresponding to the note application. That is, the electronic device can receive the user's triggering operation on the import control, such as a click operation, etc.

[0111] After the electronic device receives the user's click operation on the import control, in response, the electronic device can display the imported note. The page size corresponding to the imported note is related to the file size of the imported file. If the user performs an operation on the imported note, for example, the user adds pages or deletes pages in the imported note, the number of pages corresponding to the imported note is the adjusted number of pages.

[0112] For example, as shown in (a) of Figure 5 , the electronic device displays the interface 01 corresponding to the note application. The interface 01 corresponding to the note application includes a create note control 02, and the create note control 02 is used to trigger the electronic device to display the interface corresponding to creating a text note, so that the user can create a new text note; and trigger the electronic device to display the interface corresponding to creating a handwritten note, so that the user can create a new handwritten note. After the electronic device receives the trigger operation of the user on "handwritten note" in the create note control 02, in response, as shown in (b) of Figure 5 , the electronic device can display the interface 03 corresponding to the newly created handwritten note in the interface 01 corresponding to the note application. The interface 03 corresponding to the newly created handwritten note includes a specification control 04. The specification control 04 is used to trigger the electronic device to display the page size corresponding to the selected specification, so that the user can create a handwritten note on different page specifications. After the electronic device receives the trigger operation of the user on "A4" in the specification control 04, in response, as shown in (c) of Figure 5 , the electronic device displays the interface 05 corresponding to the unnamed note. The interface 05 corresponding to the unnamed note includes a setting control 06. The setting control 06 is used to trigger the electronic device to display the interface corresponding to page settings, the page corresponding to paging settings, turn on / off the one-stroke forming function, and turn on / off the function that only allows the use of a pen. After the electronic device receives the trigger operation of the user on "page settings" in the setting control 06, in response, as shown in (d) of Figure 5 , the electronic device displays the interface 07 corresponding to page settings. The interface 07 corresponding to page settings also includes a specification control 04. The user can select a suitable page size through the specification control 04 according to their own needs.

[0113] In some examples, the text file can be a note file. The page to be displayed includes at least one page. For example, the page to be displayed includes the pages in the note. The page size corresponding to each page in the page to be displayed includes the page size corresponding to each page in the note.

[0114] In some scenarios, the user can use the import control of the note application to import a text file in the note application to obtain a note file. In response, the electronic device displays the interface corresponding to the note file in the note application.

[0115] Taking the note file as Note A for example, Note A includes multiple pages. The multiple pages are Page 1, Page 2, and Page 3 respectively. For example, the multiple pages can be global favorite pages and / or web page favorite pages. The page size corresponding to Page 1 is the first size, the page size corresponding to Page 2 is the second size, and the page size corresponding to Page 3 is the third size. The first size, the second size, and the third size are all different. For example, the first size is 21cm * 13cm. The second size is 21cm * 56cm. The third size is 21cm * 90cm.

[0116] Since the third size is different from the preset size, and the height of the third size is much greater than the height of the preset size, the third size can also be called an irregular size. According to the third size corresponding to Page 3, Page 3 can also be called a special page, or an extra-long page.

[0117] In some examples, when the user browses the pages in the note, the user can choose whether to add a page to be added according to their own needs. If the user chooses to add, the pages to be displayed include the pages in the note and the page to be added. The page size corresponding to each page in the pages to be displayed includes the page size corresponding to each page in the note and the page size corresponding to the page to be added. Among them, the page size corresponding to the page to be added is the preset size. The preset size is the size selected by the user when creating the note.

[0118] For example, before the note application imports Note A, if the specification selected by the user is A4, the preset size is the A4 size, that is, the preset size is 21cm * 29.7cm. Therefore, the pages to be displayed obtained by the electronic device include Page 1, Page 2, and Page 3. The page size corresponding to each page in the pages to be displayed includes the first size, the second size, and the third size. If the user adds Page 4 (i.e., the page to be added) when browsing Note A, the pages to be displayed obtained by the electronic device include Page 1, Page 2, Page 3, and Page 4. The page size corresponding to each page in the pages to be displayed includes the first size, the second size, the third size, and the preset size.

[0119] Of course, the user can also adjust the page size corresponding to the page to be added according to their own needs. For example, adjust the page size from A4 to A5. Then, the preset size corresponding to the page to be added is A5.

[0120] That is to say, when the user browses the note file, the user can adjust the pages in the note file according to his own needs. For example, add pages, delete pages, etc. If the user chooses to add a page, the pages to be displayed also include the pages to be added. The page size corresponding to the page to be added is a preset size. Therefore, the pages to be displayed obtained by the electronic device and the page size corresponding to each page in the pages to be displayed are the results after the electronic device summarizes the pages to be displayed in the note file and the page size corresponding to each page in the pages to be displayed after the user adjusts the note file.

[0121] It can be understood that the electronic device may also include other office application programs. When the user operates on the page through other office application programs, the electronic device can also correctly display the pages of other office application programs based on the user's operations.

[0122] Step 402, the electronic device obtains the screen display range of the electronic device.

[0123] Among them, the screen display range refers to the effective display area of the screen, that is, the actual available display area after removing the border and other non-display parts. The measurement unit of the screen display range can be px or inch (in).

[0124] The screen display range is the screen display range of the electronic device for displaying the pages to be displayed. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a handheld computer, a personal computer and other electronic devices with a note application program. It can be understood that the screen display ranges of different models of electronic devices are different.

[0125] In some examples, when the electronic device is started, the operating system initializes the display driver and related hardware so that the display driver can communicate with the screen. The operating system can obtain the screen information of the electronic device through the display driver, and then store the screen information in a register or a specific hardware interface. Based on the obtained screen information, the operating system can calculate the screen display range of the electronic device. Among them, the screen information of the electronic device may include screen resolution, size, pixel density, etc. The process of obtaining the screen display range of the electronic device may be: the electronic device obtains the screen display range through the API provided by the operating system. For example, the screen display range of the electronic device is 21cm * 29.7cm.

[0126] In some examples, the user can also adjust the screen display range of the electronic device according to their own needs. For example, adjusting the display ratio of the screen display; adjusting the display size of the display screen; adjusting the position and range of the display screen, etc. The operating system can monitor the user's adjustment operations on the screen display range in real time. When receiving the user's adjustment operation on the screen display range, in response to this adjustment operation, the operating system can obtain the adjusted screen display range, so that the electronic device can obtain the adjusted screen display range through the API.

[0127] Step 403: The electronic device determines the page type corresponding to each page in the page to be displayed based on the page size corresponding to each page in the page to be displayed.

[0128] Among them, the page type includes a first page type and a second page type.

[0129] After the electronic device obtains the page to be displayed, the page size corresponding to each page in the page to be displayed, and the screen display range of the electronic device, it can obtain the page type corresponding to each page in the page to be displayed based on the page size corresponding to each page in the page to be displayed and a preset rule.

[0130] In some examples, the process by which the electronic device determines the page type corresponding to each page based on the page size corresponding to each page in the page to be displayed can be: determining the page type corresponding to each page based on the page size corresponding to each page and a preset rule.

[0131] Among them, the preset rule is to determine whether the page size corresponding to each page is greater than the screening size. If the page size corresponding to the page is less than or equal to the screening size, the page type corresponding to the page is the first page type; if the page size corresponding to the page is greater than the screening size, the page type corresponding to the page is the second page type; the screening size is related to the screen display range.

[0132] Exemplarily, the width of the screening size is less than or equal to the screen display width in the screen display range, and the width of the screening size is 1.5 times the screen display height in the screen display range. Or, the width of the screening size is less than or equal to the screen display width in the screen display range, and the width of the screening size is 2 times the screen display height in the screen display range.

[0133] For example, in combination with step 401, note A includes page 1, page 2, and page 3, the screen display range is 21 cm * 29.7 cm, the width of the screening size is 21 cm, and the height of the screening size is 59.4 cm. By comparing the first size corresponding to page 1, the second size corresponding to page 2, and the third size corresponding to page 3 with the screening size respectively, it can be known that the page type corresponding to page 1 is the first page type, the page type corresponding to page 2 is the first page type, and the page type corresponding to page 3 is the second page type.

[0134] In some examples, based on the page size corresponding to each page, the first page can be determined; the page type corresponding to the first page is the first page type. Based on the page size corresponding to each page, the second page can also be determined; the page type corresponding to the second page is the second page type.

[0135] In some examples, after the electronic device obtains the page to be displayed, the page size corresponding to each page in the page to be displayed, and the screen display range of the electronic device, the target page with the largest page size in the page to be displayed can be filtered out. Then, it is determined whether the page size corresponding to the target page is greater than the filtering size. If the page size corresponding to the target page is greater than the filtering size, it is determined that the page type corresponding to the target page is the second page type. If the page size corresponding to the target page is less than or equal to the filtering size, the page type corresponding to the target page is the first page type, and the page types corresponding to the other pages in the page to be displayed except the target page are all the first page type.

[0136] When the page type corresponding to the target page is the second page type, it is also necessary to continue to determine whether the page size corresponding to the page with the second largest page size in the page to be displayed except the target page is greater than the filtering size, and so on, until the page types corresponding to all pages in the page to be displayed are determined.

[0137] In some examples, after the electronic device obtains the page to be displayed, the page size corresponding to each page in the page to be displayed, and the screen display range of the electronic device, the target page with the largest page size in the page to be displayed can be filtered out. Then, it is determined whether the page size corresponding to the target page is greater than the filtering size.

[0138] In the case where the page size corresponding to the target page is greater than the filtering size, the target page is eliminated to obtain the filtered page, so the filtered page does not include the target page.

[0139] In the case where the filtered page does not include the target page, it is also necessary to continue to determine whether the page sizes corresponding to the other pages in the page to be displayed except the target page are greater than the filtering size. If there are still pages in the page to be displayed whose page sizes are greater than the filtering size, the filtered page only includes the pages whose page sizes are not greater than the filtering size. If there are no pages in the page to be displayed except the target page whose page sizes are greater than the filtering size, the filtered page includes all the other pages in the page to be displayed except the target page.

[0140] In the case where the page size corresponding to the target page is less than or equal to the filtering size, the target page is not eliminated, so the filtered page includes the target page.

[0141] In the case where the filtered page includes the target page, it indicates that the page sizes corresponding to the other pages in the page to be displayed except the target page are all less than or equal to the filtering size. Therefore, the filtered page includes all the pages in the page to be displayed.

[0142] By determining the page type corresponding to the page, different display methods are adopted for different page types in a targeted manner, so as to make the display effect of each page better.

[0143] Step 404: The electronic device determines the screen display ratio based on the page size corresponding to each page, the page type corresponding to each page, and the screen display range.

[0144] After the electronic device obtains the page size corresponding to each page, the page type corresponding to each page, and the screen display range, the screen display ratio can be obtained according to the page size corresponding to each page, the page type corresponding to each page, and the screen display range. After that, the page to be displayed can be displayed using the screen display ratio.

[0145] In some examples, the process of according to the page size corresponding to each page, the page type corresponding to each page, and the screen display range can be: based on the page size corresponding to each page, at least one first page is determined, and the page type corresponding to the first page is the first page type. The screen display page is determined among at least one first page. Finally, the screen display ratio is obtained according to the page size corresponding to the screen display page and the screen display range.

[0146] Among them, the process of determining the screen display page according to the page size corresponding to the first page among the page sizes corresponding to each page can be: according to the page sizes corresponding to at least one first page, the page with the largest page size among at least one first page is determined as the screen display page.

[0147] For example, combining Step 401 and Step 403, it can be known that the page type corresponding to Page 1 is the first page type, the page type corresponding to Page 2 is the first page type, and the page type corresponding to Page 3 is the second page type. The page size corresponding to Page 1 is the first size, and the page size corresponding to Page 2 is the second size. The first size is 21 cm * 13 cm. The second size is 21 cm * 56 cm. Therefore, the first page includes Page 1 and Page 2. According to the first size corresponding to Page 1 and the second size corresponding to Page 2, the screen display page determined is Page 2.

[0148] The process of obtaining the screen display ratio according to the page size corresponding to the screen display page and the screen display range can be: according to the width and height of the page size corresponding to the screen display page, and the width and height of the screen display range, the screen display ratio is obtained.

[0149] In some examples, the screen display ratio satisfies the following expression:

[0150] R = w i * h j > w j * h i ? w j / w i : h j / h i

[0151] Among them, R is the screen display ratio; w i is the width of the page size corresponding to the screen display page; h i is the height of the page size corresponding to the screen display page; w j is the width of the screen display range; h j is the height of the screen display range.

[0152] Based on the above formula, it can be known that if the width of the page size corresponding to the screen display page multiplied by the height of the screen display range is greater than the width of the screen display range multiplied by the height of the page size corresponding to the screen display page, then the screen display ratio is: the ratio of the width of the screen display range to the width of the page size corresponding to the screen display page. If the width of the page size corresponding to the screen display page multiplied by the height of the screen display range is less than or equal to the width of the screen display range multiplied by the height of the page size corresponding to the screen display page, then the screen display ratio is: the ratio of the height of the screen display range to the height of the page size corresponding to the screen display page.

[0153] For example, the page size corresponding to the screen display page is 21cm * 56cm, and the screen display range is 21cm * 29.7cm. Then the width of the page size corresponding to the screen display page multiplied by the height of the screen display range is: 21 x 29.7 = 623.7. The width of the screen display range multiplied by the height of the page size corresponding to the screen display page is: 21 x 56 = 1176. Since the width of the page size corresponding to the screen display page multiplied by the height of the screen display range (i.e., 623.7) is less than the width of the screen display range multiplied by the height of the page size corresponding to the screen display page (i.e., 1176), the screen display ratio is the ratio of the height of the screen display range to the height of the page size corresponding to the screen display page, that is, 29.7 / 56 = 0.5.

[0154] Through the above processing process, it can be known that taking the page with the largest page size in at least one first page as the screen display page can not only ensure that all pages in the first page can be normally displayed within the screen display range, but also ensure that other pages in the first page have better readability and visibility, thus helping users better browse and understand the page content. Moreover, determining the screen display ratio according to the page size corresponding to the screen display page and the screen display range can make the page layout more flexible, so as to adapt to a variety of different display environments.

[0155] Step 405: The electronic device displays the page to be displayed based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio.

[0156] After the electronic device obtains the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio, the electronic device can display the page to be displayed based on the page size corresponding to each page, the screen display ratio, and the page type corresponding to each page.

[0157] In some examples, the process of the electronic device displaying the page to be displayed based on the screen display ratio and the page type corresponding to each page may be: The electronic device determines the display size of each page in the page to be displayed based on the screen display ratio and the page type corresponding to each page, and displays the page to be displayed based on the display size of each page in the page to be displayed.

[0158] In some examples, the process of the electronic device determining the display size of each page in the page to be displayed based on the screen display ratio and the page type corresponding to each page may be: Based on the screen display ratio and the page size corresponding to the first page, determine the screen display size corresponding to the first page; display the first page according to the screen display size corresponding to the first page.

[0159] Determining the screen display size corresponding to the first page according to the page size and the screen display ratio corresponding to the first page can achieve the adaptive layout of the page; and displaying the first page according to the screen display size corresponding to the first page can make the first page maintain a consistent page display effect on different devices. In this way, no matter on which electronic device (such as a computer, a mobile phone, or a tablet, etc.) the user browses the first page, a similar visual experience can be obtained, improving the user's convenience of use.

[0160] In some examples, the process of the electronic device determining the display size of each page in the page to be displayed based on the screen display ratio and the page type corresponding to each page may be: Based on the page size corresponding to each page, determine the second page; the page type corresponding to the second page is the second page type; based on the screen display ratio and the page size corresponding to the second page, perform multi-screen division on the second page to obtain the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page; display the second page in a split-screen manner according to the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page.

[0161] Among them, the process of performing multi-screen division on the second page based on the screen display ratio and the page size corresponding to the second page to obtain the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page can be: based on the screen display ratio and the page size corresponding to the second page, obtain the screen display size corresponding to the second page; according to the screen display size corresponding to the second page, perform multi-screen division on the second page to obtain the multi-screen division result corresponding to the second page.

[0162] The process of performing multi-screen division on the second page according to the screen display size corresponding to the second page to obtain the multi-screen division result corresponding to the second page can be: perform multi-screen division on the second page according to the height in the screen display size corresponding to the second page to obtain the multi-screen division result corresponding to the second page. The multi-screen division result is used to indicate the number of screen display ranges corresponding to the content of the second page. For example, the multi-screen division result is used to indicate that the content of the second page is to be displayed in 1.5 screen display ranges.

[0163] The process of performing multi-screen division on the second page according to the height in the screen display size corresponding to the second page to obtain the multi-screen division result corresponding to the second page can be: determine the ratio of the height in the page size corresponding to the second page to the height of the screen display range according to the height of the screen display range; perform multi-screen division on the second page according to the ratio of the height in the page size corresponding to the second page to the height of the screen display range to obtain the number of screen display ranges corresponding to the content of the second page.

[0164] Through the multi-screen division method, the second page can be divided into multiple screen display ranges for display. In this way, not only can the second page be normally displayed, but also the user's reading experience can be improved. At the same time, the split-screen display of the second page can also increase the interactivity between the user and the second page, making it more convenient for the user to screen and organize information.

[0165] In some examples, the process of the electronic device determining the display size of each page in the pages to be displayed based on the screen display ratio and the page type corresponding to each page can be: based on the screen display ratio, when the pages to be displayed include only one page, determine whether the page type corresponding to the page is the first page type or the second page type. If the page type corresponding to the page is the first page type, it means that the page size corresponding to the page is less than or equal to the screening size. Then, based on the screen display ratio and the page size corresponding to the page, determine the screen display size corresponding to the page, and display the page according to the screen display size corresponding to the page.

[0166] For example, Figure 6 Exemplarily, a display effect diagram of a page is shown. Taking Note B as an example, Note B includes Page 5. The display direction of Page 5 is horizontal. The page type corresponding to Page 5 is the first page type. Figure 6Among them, (a) exemplarily shows the display effect of a page 5. Taking note C as an example, note C includes page 6. The display direction of page 6 is vertical display. The page type corresponding to page 6 is the first page type. Figure 6 Among them, (b) exemplarily shows the display effect of a page 6.

[0167] If the page type corresponding to this page is the second page type, it indicates that the page size corresponding to the page of the second page type is larger than the screening size. Then, based on the screen display ratio and the page size corresponding to this page, the screen display size corresponding to this page is obtained; and according to the screen display size corresponding to this page, multi-screen division is performed on this page to obtain the multi-screen division result corresponding to this page; finally, based on the screen display size corresponding to this page and the multi-screen division result corresponding to this page, this page is displayed.

[0168] When this page is divided into multiple screens, the content of the first line in this page is displayed at the starting position of the first screen. Figure 7 Exemplarily shows the display effect diagram of another page. Taking note D as an example, note D includes page 7. The page type corresponding to page 7 is the second page type. The multi-screen division result corresponding to page 7 is 3.5. That is to say, page 7 can be completely displayed within 3.5 screen display ranges. After that, the user can slide this page up or down through an interaction tool (such as a mouse, keyboard, etc.) so that the user can completely view the content of this page within 3.5 screen display ranges.

[0169] When the page to be displayed includes multiple pages, the page types corresponding to these multiple pages can all be the first page type, or all be the second page type, or can include both the first page type and the second page type.

[0170] When the page types corresponding to multiple pages are all the first page type, the screen display size corresponding to each page can be obtained based on the page size corresponding to each page and the screen display ratio. Finally, according to the display order of multiple pages and the screen display size corresponding to each page, multiple pages are displayed in sequence.

[0171] For example, the page to be displayed includes page 8 and page 9. The page types corresponding to page 8 and page 9 are both the first page type. The page size corresponding to page 8 is w1*h1; the page size corresponding to page 9 is w2*h2; the screen display ratio is r1. Based on the page size corresponding to page 8 (i.e., w1*h1) and the screen display ratio (i.e., r1), the screen display size corresponding to page 8 can be determined. Therefore, the width of the screen display size corresponding to page 8 is w1*r1, and the height is h1*r1. Based on the page size corresponding to page 9 (i.e., w2*h1) and the screen display ratio (i.e., r1), the screen display size corresponding to page 9 can be determined. Therefore, the width of the screen display size corresponding to page 9 is w2*r1, and the height is h2*r1.

[0172] When the page types corresponding to multiple pages are all the second page type, it is also possible to obtain the screen display size corresponding to each page based on the page size and the screen display ratio corresponding to each page in the multiple pages. Then, according to the height and the screen display range of the screen display size corresponding to each page, determine the number of screen display ranges corresponding to each page. Finally, display the multiple pages in sequence according to the display order of the multiple pages, the screen display size corresponding to each page, and the number of screen display ranges corresponding to each page.

[0173] For example, the pages to be displayed include page 10 and page 11. The page types corresponding to page 10 and page 11 are both the second page type. The page size corresponding to page 10 is w3*h3; the page size corresponding to page 11 is w4*h4; the screen display ratio is r2. Then, based on the page size corresponding to page 10 (i.e., w3*h3) and the screen display ratio (i.e., r2), the screen display size corresponding to page 10 can be determined. Therefore, the width of the screen display size corresponding to page 10 is w3*r2, and the height is h3*r2. If the screen display range is w5*h5, then the number of screen display ranges corresponding to page 10 is: h3*r2 / h5. Finally, page 10 can be completely displayed in multiple screen display ranges according to the height in the screen display size corresponding to page 10 and the number of screen display ranges corresponding to page 10.

[0174] Based on the page size corresponding to page 11 (i.e., w4*h4) and the screen display ratio (i.e., r2), the screen display size corresponding to page 11 can be determined. Therefore, the width of the screen display size corresponding to page 11 is w4*r2, and the height is h4*r2. If the screen display range is w5*h5, then the number of display screens corresponding to page 11 is: h4*r2 / h5. Finally, page 11 can be completely displayed in multiple screen display ranges according to the height in the screen display size corresponding to page 11 and the number of screen display ranges corresponding to page 11.

[0175] When the page types corresponding to multiple pages include both the first page type and the second page type, it is also possible to obtain the screen display size corresponding to each page based on the page size and the screen display ratio corresponding to each page in the multiple pages. Finally, display the multiple pages in sequence according to the display order of the multiple pages and the screen display size corresponding to each page.

[0176] Combined with steps 401 - 403, it can be seen that the page type corresponding to page 1 in note A is the first page type, the page type corresponding to page 2 is the first page type, and the page type corresponding to page 3 is the second page type. The first size corresponding to page 1 is 21 cm * 13 cm. The second size corresponding to page 2 is 21 cm * 56 cm. The third size corresponding to page 3 is 21 cm * 90 cm; then it can be determined that the target page is page 2.

[0177] When the screen display range is 21 cm * 29.7 cm and the screen display ratio is 0.5, the screen display size corresponding to Page 1 can be obtained based on the first size corresponding to Page 1 and the screen display ratio. The width of the screen display size corresponding to Page 1 is 21 × 0.5 = 10.5; the height is 13 × 0.5 = 6.5. Based on the second size corresponding to Page 2 and the screen display ratio, the screen display size corresponding to Page 2 is obtained. The width of the screen display size corresponding to Page 2 is 21 × 0.5 = 10.5; the height is 56 × 0.5 = 28. Based on the third size corresponding to Page 3 and the screen display ratio, the screen display size corresponding to Page 3 is obtained. The width of the screen display size corresponding to Page 3 is 21 × 0.5 = 10.5; the height is 90 × 0.5 = 45. Since the height in the screen display range is 29.7 cm, the height in the screen display size corresponding to Page 3 can be divided into multiple screen display ranges, and the number of multiple screen display ranges is 45 / 29.7 = 1.5 screens. Finally, according to the display order of Page 1, Page 2, and Page 3, the screen display size corresponding to Page 1, the screen display size corresponding to Page 2, the screen display size corresponding to Page 3, and the number of screen display ranges corresponding to Page 3, Page 1, Page 2, and Page 3 are fully displayed.

[0178] Figure 8 Another display effect diagram of a page can be exemplarily shown. Taking Note E as an example, Note E includes Page 12 and Page 13. The page type corresponding to Page 12 is the second page type, and the page type corresponding to Page 13 is the first page type.

[0179] For Figure 1 the noted file shown, using this solution, it can make Figure 1 the display effect of the text file in Figure 9 as shown. That is, the special page of this text file can be displayed on the canvas according to the normal size. When the user browses the special page of this text file, there is no need to manually adjust the display size of the special page, thereby making it more convenient for the user to browse the text file and improving the user's satisfaction.

[0180] It can be understood that when the electronic device displays the page to be displayed according to the screen display size, if no edit operation of the user on the page to be displayed is received, the display method provided by the present disclosure does not include the content of subsequent Step 406 - Step 413. When the electronic device receives the edit operation of the user, the display method provided by the present disclosure includes the content of subsequent Step 406 - Step 413.

[0181] After the page to be displayed is shown, the user may use editing means such as hand-drawing, inserting pictures, inserting text boxes, etc. to perform secondary editing on the page to be displayed. After performing secondary editing on the page to be displayed, problems such as overlay misalignment and abnormal display size may occur. Therefore, the following steps can be used to solve problems such as overlay misalignment and abnormal display size caused by secondary editing.

[0182] Step 406: The electronic device receives the user's editing operation.

[0183] Among them, the editing operation includes at least any one of inserting a text box (or annotation box), inserting a picture, and inserting a handwritten note.

[0184] After the electronic device correctly displays the page to be displayed according to the screen display size, if the user needs to perform an editing operation on a certain page in the page to be displayed, the user can trigger the editing control in the note to edit the page using the editing control. Among them, the editing control may include a text box control, a picture control, a handwritten note control, and so on.

[0185] In some examples, if the page on which the user performs the editing operation is a blank page (for example, the blank page may be a page in the page to be displayed, or may also be a page to be added inserted in response to the user's operation), the user performs the editing operation on the blank page. If the page on which the user performs the editing operation is a non-blank page, the user performs the editing operation on the non-blank page.

[0186] Since the editing operation performed by the user is executed on the display screen of the electronic device, the electronic device can track, monitor, and perform subsequent processing on the user's editing behavior by obtaining the pixel coordinates, sizes, and changes involved in the user's editing operation. Among them, the pixel coordinates, sizes, and changes obtained by the electronic device can be recorded in px as the measurement unit.

[0187] Step 407: In response to the user's editing operation, the electronic device obtains the screen display range of the view corresponding to the editing operation.

[0188] Among them, the object operated by the editing operation can be called an element, and the element is displayed in the form of each view on the canvas.

[0189] In some examples, the process by which the electronic device obtains the screen display range of the view (i.e., view) corresponding to the editing operation in response to the user's editing operation may be: in response to the user's editing operation, the electronic device obtains the pixel information of the element corresponding to the editing operation. According to the pixel information of the element corresponding to the editing operation, the screen display range of the view corresponding to the editing operation is determined.

[0190] When the electronic device detects a user's editing operation, it can, in response to the user's editing operation, obtain the pixel information of the element corresponding to the editing operation. For example, the element corresponding to the editing operation can be any one of a text box (or annotation box), a picture, or a handwritten note. The pixel information of the element corresponding to the editing operation can include the width information, height information, size, and color of the element, etc.

[0191] Exemplarily, when the element corresponding to the editing operation is a text box (or annotation box), the pixel information of the element corresponding to the editing operation can include the pixel position of the starting point of the text box (or annotation box), the pixel position of the ending point of the text box (or annotation box), the size of the text box (or annotation box), and the color of the text box (or annotation box), etc. The view corresponding to the editing operation is the view corresponding to the text box (or annotation box).

[0192] When the element corresponding to the editing operation is a picture, the pixel information of the element corresponding to the editing operation can include the pixel position of the starting point of the picture, the pixel position of the ending point of the picture, the size of the picture, and the position of the picture, etc. The view corresponding to the editing operation is the view corresponding to the picture.

[0193] When the element corresponding to the editing operation is a handwritten note, the pixel information of the element corresponding to the editing operation can include the pixel position of the starting point of the handwritten note, the pixel position of the starting point of the handwritten note, and the size of the handwritten note, etc. The view corresponding to the editing operation is the view corresponding to the handwritten note. Of course, the element information corresponding to the editing operation can also include other information, and the present disclosure places no limitation thereon.

[0194] Since the screen display ranges of the views corresponding to different editing operations are different, the screen display range of the view corresponding to the editing operation can be obtained based on the pixel information of the element corresponding to the editing operation. Among them, the measurement unit of the pixel information of the element corresponding to the editing operation is px.

[0195] In some examples, the process by which the electronic device obtains the pixel information of the element corresponding to the editing operation can be: The electronic device obtains the pixel information of the element corresponding to the editing operation through the getWidth() function and the getHeight() function. Among them, the getWidth() function is used to obtain the width data of the element corresponding to the editing operation. The getHeight() function is used to obtain the height data of the element corresponding to the editing operation.

[0196] The process of obtaining the screen display range of the view corresponding to the editing operation based on the pixel information of the element corresponding to the editing operation can be: Based on the width information and height information in the pixel information of the element corresponding to the editing operation, the screen display range of the view corresponding to the editing operation is obtained.

[0197] Figure 10Exemplarily, a schematic diagram of measurement unit conversion is shown. As Figure 10 shown, the display method of the present disclosure involves conversion between different measurement units. Exemplarily, conversion from px to dp, conversion from dp to cm, conversion from cm to dp, and so on. Among them, the measurement unit of the data involved in the editing operation (for example, the pixel information of the element corresponding to the editing operation) is px. The measurement unit of the data involved in the page to be displayed (for example, the page size corresponding to each page in the page to be displayed) is cm. The measurement unit of the data involved in the view (for example, the screen display range of the view) is dp.

[0198] During the execution of step 407, since the pixel coordinates, sizes, and changes involved in the pixel information of the element corresponding to the editing operation are recorded in px as the measurement unit, while the screen display range of the view corresponding to the editing operation is recorded in dp as the measurement unit, it is also necessary to convert the measurement unit from px to dp. The process of converting the measurement unit from px to dp is as follows: First, obtain the PPI of the screen, then divide the measurement data corresponding to px by the PPI to obtain the conversion factor. Finally, multiply the measurement data corresponding to px by the conversion factor to obtain the data represented in dp as the measurement unit. Among them, the PPI of the screen can be obtained through the software and hardware attributes of the electronic device.

[0199] Step 408: The electronic device projects the view corresponding to the editing operation according to the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation, to obtain the projected view.

[0200] After the electronic device obtains the screen display range of the view corresponding to the editing operation, it can project the view corresponding to the editing operation onto the canvas based on the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation, so as to obtain the projected view.

[0201] For example, when the element corresponding to the editing operation is a text box (or comment box), the projected view is the view corresponding to the projected text box (or comment box). When the element corresponding to the editing operation is a picture, the projected view is the view corresponding to the projected picture. When the element corresponding to the editing operation is a handwritten note, the projected view is the view corresponding to the projected handwritten note.

[0202] In some examples, the process of projecting the view corresponding to the editing operation onto the canvas based on the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation can be as follows: First, calculate the projection ratio according to the screen display range of the electronic device and the screen display range of the view corresponding to the editing operation. Then, calculate the position of the view on the canvas according to the projection ratio and the position of the view on the display screen. Finally, use a graphics drawing library (such as Android's Canvas or iOS's UIKit) to draw the view according to the projection ratio and the position of the view on the canvas, so as to obtain the projected view. Among them, the projection ratio is used to determine how to scale the view on the canvas.

[0203] As Figure 10 shown, the screen display range of the view corresponding to the editing operation is recorded in dp as the measurement unit, while the projected view is in cm as the measurement unit. Therefore, in this process, it is also necessary to convert the measurement unit dp to cm. The process of converting the measurement unit dp to cm is as follows: First, convert dp to in according to the conversion relationship between dp and inch (in); then convert in to cm. Among them, 1dp = 1 / 160in, 1in = 2.54cm.

[0204] By using the screen display range of the electronic device and the screen display range of the view for projection, it can ensure that the view can provide a suitable display effect on different electronic devices; and through this solution, no matter on which electronic device the user performs the editing operation, a consistent view display effect can be obtained, improving the usability and generality of the application.

[0205] Step 409: The electronic device performs screen display adaptation on the projected view based on the screen display ratio to obtain the adapted view.

[0206] After the electronic device obtains the projected view, the electronic device can obtain the screen display ratio, perform screen display adaptation on the projected view according to the screen display ratio, so as to obtain the adapted view, and display the adapted view.

[0207] In some examples, the process of the electronic device performing screen display adaptation on the projected view according to the screen display ratio to obtain the adapted view can be as follows: The electronic device multiplies the size corresponding to the projected view by the screen display ratio to obtain the size corresponding to the adapted view, and then can display the adapted view according to the size corresponding to the adapted view.

[0208] In some examples, when the element corresponding to the editing operation is a text box (or a comment box), the adapted view is the view corresponding to the adapted text box (or comment box). When the element corresponding to the editing operation is a picture, the adapted view is the view corresponding to the adapted picture. When the element corresponding to the editing operation is a handwritten note, the adapted view is the view corresponding to the adapted handwritten note.

[0209] The electronic device may include an editing module, a picture module, and a handwriting engine module. Among them, when the element corresponding to the editing operation is a text box (or a comment box), the editing module is used to generate the view corresponding to the adapted comment box. When the element corresponding to the editing operation is a picture, the picture module is used to generate the view corresponding to the adapted picture. When the element corresponding to the editing operation is a handwritten note, the handwriting engine module is used to generate the view corresponding to the adapted handwritten note.

[0210] For example, when the element corresponding to the editing operation is a text box (or a comment box), the electronic device can obtain the screen display ratio and send the screen display ratio to the editing module. The editing module can obtain the view corresponding to the adapted text box (or comment box) based on the view corresponding to the projected comment box and the screen display ratio. For example, the editing module can multiply the size of the view corresponding to the projected text box (or comment box) by the screen display ratio to obtain the size of the view corresponding to the adapted text box (or comment box).

[0211] When the element corresponding to the editing operation is a picture, the electronic device can obtain the screen display ratio and send the screen display ratio to the picture module. The picture module can obtain the view corresponding to the adapted picture based on the view corresponding to the projected picture and the screen display ratio. For example, the picture module can multiply the size of the view corresponding to the projected picture by the screen display ratio to obtain the size of the view corresponding to the adapted picture.

[0212] When the element corresponding to the editing operation is a handwritten note, the electronic device can obtain the screen display ratio and send the screen display ratio to the handwriting engine module. The handwriting engine module can obtain the view corresponding to the adapted note based on the view corresponding to the projected handwritten note and the screen display ratio. For example, the handwriting engine module can multiply the size of the view corresponding to the projected handwritten note by the screen display ratio to obtain the size of the view corresponding to the adapted handwritten note.

[0213] After forming an adapted view based on the user's editing operation, the adapted view can be displayed. Subsequently, the user can choose whether to perform a processing operation on the adapted view according to the need. If the user does not perform a processing operation on the adapted view, the process ends. If the user performs a processing operation on the adapted view, then based on the user's processing operation, a processed view can be displayed for the user. Therefore, the display method provided by this disclosure further includes the content of subsequent steps 410-step 413.

[0214] Step 410: The electronic device receives the processing operation performed by the user in the adapted view.

[0215] After the electronic device obtains the adapted view, it can display the adapted view. Subsequently, the user can, according to the need, perform corresponding processing operations in the adapted view.

[0216] For example, when the element corresponding to the editing operation is a text box (or a comment box), the processing operation performed by the user in the view corresponding to the adapted (or comment box) can be that the user edits text in the (or comment box). When the element corresponding to the editing operation is a picture, the processing operation performed by the user in the view corresponding to the adapted picture can be that the user performs a zoom-in operation or a zoom-out operation on the picture. When the element corresponding to the editing operation is a handwritten note, the processing operation performed by the user in the view corresponding to the adapted handwritten note can be that the user uses a control to perform erasing or modifying operations on the handwritten note on the canvas. Among them, the data corresponding to the processing operation is recorded in centimeters as the measurement unit.

[0217] Step 411: In response to the processing operation, the electronic device processes the adapted view to obtain a processed view.

[0218] After receiving the processing operation performed by the user on the adapted view, the electronic device can, in response to the processing operation, process the adapted view, thereby obtaining a processed view.

[0219] Exemplarily, when the user performs a processing operation in the adapted view, some problems may occur. For example, the cursor display size in the text box (or comment box) is incorrect, the display position of the cursor in the text box (or comment box) is incorrect, a part of the picture is displayed outside the display range, etc. At this time, it is necessary to process the adapted view to obtain a processed view. Among them, the processed view is recorded in centimeters as the measurement unit.

[0220] Among them, the incorrect cursor display size in the text box (or comment box) can be: the display size of the cursor is too large or the display size of the cursor is too small. Figure 11 Exemplarily shows an effect diagram of the display of a cursor. Specifically, Figure 11Figure (a) exemplarily shows an effect diagram in which the screen display size of the cursor is too small. As Figure 11 shown in (a) of [reference], in response to a user's processing operation (e.g., a text input operation), the electronic device displays an interface 1100. The interface 1100 includes a text box 1101, input text 1102, and a cursor 1103. Based on Figure 11 Figure (a) of [reference], it can be seen that the screen display size of the cursor 1103 is significantly smaller than the screen display size of the input text 1102.

[0221] The incorrect screen display position of the cursor in the text box (or comment box) can be that when the user moves the cursor through other interaction devices (e.g., a mouse, a keyboard, etc.), the screen display position of the cursor does not match the user's processing operation. Figure 11 Figures (b) of [reference] and Figure 11 Figure (c) of [reference] exemplarily shows an effect diagram in which the screen display position of the cursor does not match the user's operation instruction. Before receiving the user's processing operation, Figure 11 Figure (b) of [reference] exemplarily shows the display interface 1104 of the electronic device. The interface 1104 includes the position of the cursor 1105 before movement. When the electronic device receives the user's processing operation (e.g., moving the cursor forward by one position), in response to the user's processing operation, the electronic device displays the interface 1106 as shown in Figure 11 Figure (c) of [reference]. The interface 1106 includes the position of the cursor 1107 after movement. Based on the position of the cursor 1107 after movement, it can be seen that the cursor has moved forward by 2 positions, which does not match the user's processing operation. Based on Figure 11 Figures (b) of [reference] and Figure 11 Figure (c) of [reference], it can be seen that there is a display error in the screen display position of the cursor in the text box.

[0222] Therefore, when the adapted view is the view corresponding to the adapted text box (or comment box), in order to avoid the above problems when the user performs a processing operation in the adapted view, the electronic device can, in response to the processing operation, determine the screen display size and the screen display position coordinates of the cursor corresponding to the text box; and based on the screen display size of the cursor and the screen display position coordinates of the cursor, process the view corresponding to the adapted text box to obtain a processed view.

[0223] In some examples, the process by which an electronic device determines the cursor size corresponding to the cursor in a text box in response to a processing operation may be as follows: First, in response to the processing operation, determine the size of the input text; then, based on the size of the input text, determine the cursor size corresponding to the cursor that matches the input text; next, based on the screen display ratio and the cursor size corresponding to the cursor that matches the input text, obtain the screen display size corresponding to the cursor; finally, display the cursor according to the screen display size corresponding to the cursor. Among them, the size of the input text may be a preset size or a user-defined size, and the present disclosure does not limit this.

[0224] Exemplarily, obtaining the screen display size corresponding to the cursor based on the screen display ratio and the cursor size corresponding to the cursor that matches the input text may be: multiplying the screen display ratio by the cursor size corresponding to the cursor that matches the input text, thereby obtaining the screen display size corresponding to the cursor.

[0225] In some examples, the electronic device includes a text box module for generating the screen display size corresponding to the cursor. The process by which the electronic device determines the screen display size corresponding to the cursor in the text box in response to a processing operation may be: The electronic device, in response to the processing operation, determines the size of the input text and obtains the screen display ratio; then, based on the size of the input text, determines the cursor size corresponding to the cursor that matches the input text; and sends the cursor size corresponding to the cursor that matches the input text and the screen display ratio to the text box module. The text box module receives the cursor size corresponding to the cursor that matches the input text and the screen display ratio, then, based on the screen display ratio and the cursor size corresponding to the cursor that matches the input text, obtains the screen display size corresponding to the cursor, and displays the cursor according to the screen display size corresponding to the cursor.

[0226] In some examples, the process by which an electronic device determines the screen display position coordinates of the cursor in response to a processing operation may be: First, in response to the processing operation, determine the size of the input text, the number of cursor movements, and the cursor movement direction; then, based on the size of the input text, determine the unit movement size of the cursor. Next, based on the unit movement size of the cursor and the number of cursor movements, determine the movement distance of the cursor. Then, based on the cursor movement direction and the movement distance of the cursor, determine the cursor position coordinates; finally, based on the screen display ratio and the cursor position coordinates, obtain the screen display position coordinates of the cursor.

[0227] In some examples, the editing module in the electronic device is further configured to determine the on-screen position coordinates of the cursor. The process by which the electronic device determines the on-screen position coordinates of the cursor in response to a processing operation may be as follows: The electronic device determines the size of the input text, the number of cursor movements, and the cursor movement direction in response to the processing operation, and obtains the on-screen ratio. Then, it sends the size of the input text, the number of cursor movements, the cursor movement direction, and the on-screen ratio to the editing module. The editing module receives the size of the input text, the number of cursor movements, the cursor movement direction, and the on-screen ratio, and determines the unit movement size of the cursor based on the size of the input text. Then, based on the unit movement size of the cursor and the number of cursor movements, it determines the movement distance of the cursor. Next, based on the cursor movement direction and the movement distance of the cursor, it determines the cursor position coordinates. Finally, based on the on-screen ratio and the cursor position coordinates, it obtains the on-screen position coordinates of the cursor and sends the on-screen position coordinates of the cursor to the text box module. The text box module receives the on-screen position coordinates of the cursor and displays the cursor according to the on-screen position coordinates of the cursor.

[0228] After obtaining the on-screen size corresponding to the cursor and the on-screen position coordinates of the cursor, the electronic device can process the view corresponding to the adapted text box based on the adapted view, the on-screen size corresponding to the cursor, and the on-screen position coordinates of the cursor to obtain a processed view.

[0229] In some examples, when the adapted view is the view corresponding to the adapted picture, if the user performs a processing operation in the adapted view such that a part of the picture is displayed outside the on-screen range, the electronic device can perform a cropping process on the view corresponding to the adapted picture according to the user's processing operation, thereby obtaining a processed view to make the processed view match the user's processing operation.

[0230] Through the above processing process, problems such as incorrect on-screen size of the cursor and / or incorrect on-screen position of the cursor in the text box (or comment box) after the user performs a processing operation in the adapted view can be avoided. By determining the on-screen size corresponding to the cursor and the on-screen position coordinates of the cursor, precise control and positioning of the cursor position and cursor size can be achieved, enabling the user to accurately perform text editing and processing. In addition, this method can also enable the user to feel real-time feedback and view changes during text box editing and processing, improving the user experience.

[0231] Step 412: The electronic device performs an inverse calculation process on the processed view to obtain an inversely calculated view.

[0232] Since the processed view is recorded in centimeters as the measurement unit, after obtaining the processed view, an inverse calculation process still needs to be performed on the processed view to obtain an inversely calculated view so that the inversely calculated view is recorded in density-independent pixels (dp) as the measurement unit.

[0233] In some examples, the process of inverse calculation on the processed view can be: converting the measurement unit of the processed view to obtain the inversely calculated view. Among them, if the measurement unit of the processed view is cm, then converting the measurement unit of the processed view means converting the measurement unit of the processed view from cm to dp. After that, the inversely calculated view uses dp as the measurement scale.

[0234] Step 413: Based on the inversely calculated view, obtain the display view and display the display view.

[0235] Since the measurement unit of the inversely calculated view is dp, when displaying the inversely calculated view, it is also necessary to convert the measurement unit of the inversely calculated view from dp to px for display. Therefore, the measurement unit of the display view is px.

[0236] In some examples, as Figure 12 shown, the display screen of the electronic device can receive the user's editing operation. When the screen of the electronic device receives the user's editing operation, the screen can determine the screen display range of the view corresponding to the editing operation according to the user's editing operation, and send the screen display range of the view corresponding to the editing operation to the screen display control module.

[0237] The screen display control module can obtain the screen display range and screen display ratio of the electronic device, and project the view corresponding to the editing operation according to the screen display range of the electronic device and the view corresponding to the editing operation to obtain the projected view. Then, based on the screen display ratio, perform screen display adaptation on the projected view to obtain the adapted view, and send the adapted view to the canvas. The canvas receives and displays the adapted view. If the user performs a processing operation on the adapted view, the canvas can receive the user's processing operation on the adapted view, and in response to the processing operation, process the adapted view to obtain the processed view, and send the processed view to the screen display control module. After receiving the processed view, the screen display control module can perform inverse calculation processing on the processed view to obtain the inversely calculated view, and based on the inversely calculated view, obtain the display view, and send the display view to the display screen. The display screen receives and displays the display view.

[0238] Based on the method provided in the embodiments of the present disclosure, the present disclosure determines the screen display ratio according to the page size, page type, and screen display range corresponding to each page, so as to better be compatible with the screen display ranges of different electronic devices by using the screen display ratio. Then, the page to be displayed is displayed according to the page size, page type, and screen display ratio corresponding to each page. In this way, the page content of the page to be displayed not only has good browsability on different electronic devices, but also can achieve consistent display on different electronic devices. Therefore, the user does not need to manually adjust the page to be displayed (i.e., the overly long page in the page to be displayed), and the page to be displayed can automatically adapt to the screen display range of the electronic device.

[0239] It should be understood that each step in the above method embodiments provided by the present disclosure can be completed by the integrated logic circuit in the hardware of the processor or the instructions in the form of software. The method steps disclosed in combination with the embodiments of the present disclosure can be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor.

[0240] In an example, the units in the above device can be one or more integrated circuits configured to implement the above method. For example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of at least two of these integrated circuit forms.

[0241] Again, when the units in the device can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a CPU or other processors that can call programs. Again, these units can be integrated together and implemented in the form of a system on a chip (SOC).

[0242] In one implementation, the units in the above device that implement the corresponding steps in the above method can be implemented in the form of a processing element scheduler. For example, the device can include a processing element and a storage element. The processing element calls the program stored in the storage element to execute the method of the above method embodiments. The storage element can be a storage element on the same chip as the processing element, that is, an on-chip storage element.

[0243] In another implementation, the program for executing the above method can be in a storage element on a different chip from the processing element, that is, an off-chip storage element. At this time, the processing element calls or loads the program from the off-chip storage element onto the on-chip storage element to call and execute the method of the above method embodiments.

[0244] For example, an embodiment of the present disclosure may further provide a device, such as an electronic device, which may include: a processor and a memory for storing executable instructions of the processor. When the processor is configured to execute the above instructions, the electronic device implements the data processing method as described in the foregoing embodiments. The memory may be located inside the electronic device or outside the electronic device. And the processor includes one or more.

[0245] In another implementation, the units for implementing the respective steps in the above method in the device may be configured as one or more processing elements, and these processing elements may be disposed on the corresponding electronic device as described above. Here, the processing elements may be integrated circuits, for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits may be integrated together to form a chip.

[0246] For example, an embodiment of the present disclosure also provides a chip, as Figure 13 shown, the chip system includes at least one processor 1301 and at least one interface circuit 1302. The processor 1301 and the interface circuit 1302 may be interconnected by a line. For example, the interface circuit 1302 may be used to receive signals from other devices. Again, for example, the interface circuit 1302 may be used to send signals to other devices (such as the processor 1301).

[0247] For example, the interface circuit 1302 may read instructions stored in the memory of the device and send the instructions to the processor 1301. When the instructions are executed by the processor 1301, the electronic device (such as Figure 2 the electronic device 200 shown) may execute the respective steps in the above embodiments. Of course, the chip system may further include other discrete devices, and the embodiments of the present disclosure do not make specific limitations thereto.

[0248] An embodiment of the present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by an electronic device, the electronic device can implement the data processing method as described above.

[0249] An embodiment of the present disclosure also provides a computer program product, including computer instructions for running on the above-mentioned electronic device. When the computer instructions run on the electronic device, the electronic device can implement the data processing method as described above. Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional module is used as an example. In actual applications, the above functions may be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0250] In several embodiments provided by the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.

[0251] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0252] In addition, in each embodiment of the present disclosure, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0253] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product, such as: a program. This software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to enable a terminal device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods in the various embodiments of the present disclosure. And the aforementioned storage medium includes: USB flash drives, mobile hard disks, ROM, RAM, magnetic disks or optical discs and other various media that can store program codes.

[0254] For example, the embodiments of the present disclosure can also provide a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by an electronic device, the electronic device is enabled to implement the data processing method in the foregoing method embodiments.

[0255] The above is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present disclosure should be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A page display method, characterized in that, Applied to an electronic device, the method includes: Obtain a page to be displayed, the page size corresponding to each page in the page to be displayed, and the screen display range of the electronic device; the page to be displayed includes an extra-long page; Based on the page size corresponding to each page, determine the page type corresponding to each page; Based on the page size corresponding to each page, the page type corresponding to each page, and the screen display range, determine the screen display ratio; Based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio, display the page to be displayed.

2. The method according to claim 1, wherein The method further includes: Receive an editing operation of a user; In response to the editing operation, obtain the screen display range of the view corresponding to the editing operation; According to the screen display range of the electronic device and the screen display range of the view, project the view corresponding to the editing operation to obtain the projected view; Based on the screen display ratio, perform screen display adaptation on the projected view to obtain an adapted view, and display the adapted view.

3. The method according to claim 2, characterized in that, The method further includes: Receive a processing operation performed by the user in the adapted view; the view corresponding to the editing operation includes the view corresponding to a text box, and the adapted view includes the view corresponding to the adapted text box; In response to the processing operation, determine the screen display size and the screen display position coordinates of the cursor in the text box; Based on the screen display size of the cursor and the screen display position coordinates of the cursor, process the view corresponding to the adapted text box to obtain a processed view; Perform inverse calculation processing on the processed view to obtain a display view, and display the display view.

4. The method according to claim 1, wherein The determining the page type corresponding to each page based on the page size corresponding to each page includes: If the page size corresponding to a page is less than or equal to a screening size, determine that the page type corresponding to the page is a first page type; If the page size corresponding to a page is greater than the screening size, the page type corresponding to the page is a second page type; Wherein, the screening size is related to the screen display range.

5. The method according to claim 4, wherein The determining the screen display ratio based on the page size corresponding to each page, the page type corresponding to each page, and the screen display range includes: According to the page size corresponding to at least one first page in the page to be displayed, determine a screen display page among the at least one first page; the page type of the first page is the first page type, and the screen display page is the page with the largest page size among the at least one first page; According to the page size corresponding to the screen display page and the screen display range, determine the screen display ratio.

6. The method according to claim 5, wherein The displaying the page to be displayed based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio includes: Based on the page size corresponding to the first page and the screen display ratio, determine the screen display size corresponding to the first page; Display the first page according to the screen display size corresponding to the first page.

7. The method according to claim 5, wherein Displaying the page to be displayed based on the page size corresponding to each page, the page type corresponding to each page, and the screen display ratio, includes: Based on the page size corresponding to the second page in the page to be displayed and the screen display ratio, performing multi-screen division on the second page to obtain the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page; the page type corresponding to the second page is the second page type; Displaying the second page in a split-screen manner according to the screen display size corresponding to the second page and the multi-screen division result corresponding to the second page.

8. The method according to claim 5, wherein The determining the screen display ratio according to the page size corresponding to the screen display page and the screen display range includes: Determining the screen display ratio according to the width and height of the page size corresponding to the screen display page, and the width and height of the screen display range.

9. The method according to claim 8, wherein The screen display ratio satisfies the following expression: R = w i * h j > w j * h i ? w j / w i : h j / h i ; Wherein, R is the screen display ratio; wi is the width of the page size corresponding to the screen display page; hi is the height of the page size corresponding to the screen display page; wj is the width of the screen display range; hj is the height of the screen display range.

10. The method according to claim 1, wherein The ultra-long page is a global favorite page and / or a web page favorite page.

11. An electronic device, characterized in that, Includes: A processor, a memory, a bus, and a communication interface; The memory is used to store computer execution instructions, the processor is connected to the memory through the bus, and when the terminal runs, the processor executes the computer execution instructions stored in the memory, so that the terminal executes the page display method described in any one of claims 1-10.

12. A computer-readable storage medium storing instructions therein, characterized in that, When the instruction runs on the terminal, it causes the terminal to execute the page display method described in any one of claims 1-10.

Citation Information

Patent Citations

  • Page preview method, related device and equipment

    CN113779465A

  • Rem-based page adaptive layout method and device

    CN113934339A

  • Page adaptation method and device, storage medium and electronic equipment

    CN115795192A

  • Annotation page generation method, electronic equipment and storage medium

    CN116204254A

  • Browser page display method and device, equipment, medium and product

    CN116304420A