Display control method, electronic device, and storage medium
By obtaining the proportion of text and image content of the target page and dynamically adjusting the initial velocity gain and friction coefficient in the sliding strategy, the problem that the sliding strategy in the existing technology cannot adapt to different usage scenarios and improves the user experience.
Patent Information
- Application Number
- PCT/CN2024/106583
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-07-19
- Publication Date
- 2025-07-03
AI Technical Summary
In the prior art, in the off-hand slip scenario, electronic devices cannot dynamically adjust the sliding strategy according to different usage scenarios, resulting in poor user experience.
By obtaining the proportion of text and image content in the target page, dynamically adjust the initial velocity gain coefficient and friction coefficient in the sliding strategy to match the user's usage scenario needs.
Improve the user experience, and the sliding process is more in line with user expectations. When the text content is too much, the sliding speed is fast and the time is long, and when the image content is too much, the sliding speed is slow and the time is short.
Smart Images

Figure CN2024106583_03072025_PF_FP_ABST
Abstract
Description
Display control method, electronic device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 29, 2023, with application number 202311868160.3 and invention name “A display control method, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The application relates to the field of terminal technology, and in particular to a display control method, electronic device and storage medium. Background Art
[0003] With the development of electronic device technology, users can slide on the display screens of electronic devices such as mobile phones, so that the display screens of electronic devices can scroll to display corresponding content. In some possible hand-off sliding scenarios, when the user lifts his hand to end the sliding operation on the display screen, the page displayed on the display screen will continue to slide for a distance before stopping based on the sliding speed when the user lifts his hand (i.e., the hand-off speed). During the sliding process, the content displayed on the page will also change accordingly.
[0004] However, in the prior art, in the hand-off swiping scenario, the electronic device controls page sliding based on a single sliding curve or sliding strategy, which cannot be applied to different usage scenarios or display scenarios.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a display control method, an electronic device, and a storage medium, which can dynamically adjust the sliding strategy according to the different content displayed on the page, so that the sliding process of the page is more in line with the user's expectations and improves the user experience.
[0007] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0008] In a first aspect, an embodiment of the present application provides a display control method, which is applied to an electronic device. The method includes: the electronic device obtains a first ratio and a second ratio of a target page; wherein the first ratio is used to represent the proportion of text content in the target page to all contents in the target page, and the second ratio is used to represent the proportion of image content in the target page to all contents in the target page; the electronic device determines a target sliding strategy based on the first ratio and the second ratio; wherein the target sliding strategy includes a target initial velocity gain coefficient and a target friction coefficient; the target initial velocity gain coefficient is positively correlated with the first ratio and negatively correlated with the second ratio; the target friction coefficient is negatively correlated with the first ratio and positively and negatively correlated with the second ratio; the electronic device controls the target page to slide based on the target sliding strategy in response to the user's hand-off action of the sliding operation on the target page.
[0009] Based on the technical solution provided by the present application, the target sliding strategy for controlling the sliding of the target page by the electronic device is determined based on the proportion of text content and image content in the target page. Moreover, since the proportion of text content is positively correlated with the initial velocity gain coefficient and negatively correlated with the target friction coefficient; the proportion of image content is negatively correlated with the initial velocity gain coefficient and positively correlated with the target friction coefficient. Therefore, the proportion of text content and image content in the target page will directly affect the initial velocity, duration and distance of the target page sliding controlled by the electronic device based on the target sliding strategy. Specifically, the more text content, the greater the initial velocity of the target page sliding and the longer the sliding duration; the more image content, the smaller the initial velocity of the target page sliding and the longer the sliding duration. In this way, the target sliding strategy for controlling the sliding of the target page by the electronic device can be more in line with the user's usage scenario when viewing the target page, so that the effect of the target page sliding is more in line with the user's expectations, thereby improving the user's usage experience.
[0010] In a possible design method of the first aspect, the electronic device obtains a first proportion and a second proportion of the target page, including: the electronic device obtains a view tree of the target page; the electronic device determines, based on characteristic information of the leaf view nodes in the view tree, a first proportion of the sum of the areas of the corresponding views of all leaf text view nodes to the total area of the target page, and a second proportion of the sum of the areas of all leaf image view nodes to the area of the target page; wherein the characteristic information includes the area and type of the view corresponding to the view node, and the type includes a text view or an image view; the leaf view node is a leaf node in the view tree, the leaf text view node is a leaf node whose corresponding view type is a text view, and the leaf image view node is a leaf node whose corresponding view type is an image view; the electronic device uses the first proportion as the first proportion, and uses the second proportion as the second proportion.
[0011] Based on the above design, the electronic device can determine the first and second scales of the target page based on the view tree corresponding to the target page. Based on these two scales, the electronic device can then determine the target sliding strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0012] In a possible design method of the first aspect, the electronic device obtains the first ratio and the second ratio of the target page, including: the electronic device obtains the historical sliding display data of the target page; the electronic device determines the first ratio and the second ratio of the target page based on the historical sliding display data of the target page.
[0013] Based on the above design approach, since the historical sliding display data can reflect the proportion of text content and image content in the target page, the electronic device can determine the first ratio and second ratio of the target page based on the historical sliding display data. Based on these two ratios, the electronic device can subsequently determine the target sliding strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0014] In a possible design method of the first aspect, the electronic device determines the first proportion and the second proportion of the target page based on the historical sliding display data of the target page, including: the electronic device obtains the third proportion and the fourth proportion of each frame of the first screen displayed by the electronic device during the last sliding process of the target page; wherein the third proportion is the proportion of text content in all contents, and the fourth proportion is the proportion of image content in all contents; the electronic device determines the average value of the third proportions of all first screens as the first proportion, and determines the average value of the fourth proportions of all first screens as the second proportion.
[0015] Based on this design, the electronic device can use historical data on the ratio of text content to image content in each first frame displayed by the electronic device during the previous scrolling process on the target page to infer the first and second ratios of the target page. Based on these two ratios, the electronic device can subsequently determine the target scrolling strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0016] In a possible design method of the first aspect, the electronic device determines the first proportion and the second proportion of the target page based on the historical sliding display data of the target page, including: the electronic device obtains the third proportion and the fourth proportion of the second screen of each frame when the electronic device displays the target page at the current moment and within a first preset time period before the current moment; wherein the third proportion is the proportion of text content in all contents, and the fourth proportion is the proportion of image content in all contents; the electronic device determines the average value of the third proportions of all first screens as the first proportion, and determines the average value of the fourth proportions of all first screens as the second proportion.
[0017] Based on the above design, the electronic device can use historical sliding display data, which shows the ratio of text content to image content in each second frame of the target page displayed by the electronic device at the current moment and within a first preset time period before the current moment, to infer the first and second ratios of the target page. Based on these two ratios, the electronic device can subsequently determine the target sliding strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0018] In a possible design method of the first aspect, the electronic device determines the first proportion and the second proportion of the target page based on the historical sliding display data of the target page, including: the electronic device obtains the fifth proportion and the sixth proportion of the historical content displayed on the target page during the last sliding process of the target page; wherein the fifth proportion is the proportion of text content in the historical content, and the sixty-fourth proportion is the proportion of image content in the historical content; the electronic device determines the fifth proportion as the first proportion, and determines the sixth proportion as the second proportion.
[0019] Based on this design, the electronic device can use historical scrolling display data (the ratio of text content to image content within the target page's displayed content during the previous scrolling process) to infer the first and second ratios of the target page. Based on these two ratios, the electronic device can subsequently determine the target scrolling strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0020] In a possible design method of the first aspect, the electronic device determines the first proportion and the second proportion of the target page based on the historical sliding display data of the target page, including: the electronic device obtains the fifth proportion and the sixth proportion of the historical content displayed on the target page at the current moment and within a first preset time period before the current moment; wherein the fifth proportion is the proportion of text content in the historical content, and the sixty-fourth proportion is the proportion of image content in the historical content; the electronic device determines the fifth proportion as the first proportion, and determines the sixth proportion as the second proportion.
[0021] Based on this design, the electronic device can use historical sliding display data, which shows the ratio of text content to image content within the target page's historical content displayed at the current moment and within a first preset time period before the current moment, to infer the first and second ratios of the target page. Based on these two ratios, the electronic device can then determine the target sliding strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0022] In a possible design of the first aspect, the electronic device determines the target sliding strategy based on the first ratio and the second ratio, including: the electronic device determines a target initial velocity gain coefficient in the target sliding strategy according to a first preset formula based on the first ratio and the second ratio; and the electronic device determines a target friction coefficient in the target sliding strategy according to a second preset formula based on the first ratio and the second ratio.
[0023] The first preset formula is: v = v t *p t +v p *p p ;
[0024] Among them, v is the target initial velocity gain, v t is the initial speed gain of the text, v p is the initial velocity gain of the image, v t Greater than v p , p t is the first ratio, p p is the second ratio;
[0025] The first preset formula is: f=f t *p t +f p *p p ;
[0026] Where f is the target friction coefficient, f t is the text friction coefficient, f p is the image friction coefficient, f p Greater than f t .
[0027] Based on this design, we can successfully obtain a target initial velocity gain coefficient that is positively correlated with the first ratio and negatively correlated with the second ratio; we can also obtain a target friction coefficient that is negatively correlated with the first ratio and positively correlated with the second ratio. This allows the phone to control the target page based on the target sliding strategy, achieving a sliding effect that better meets the user's expectations.
[0028] In a second aspect, embodiments of the present application further provide an electronic device, the functions of which may 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 processing module, and a control module.
[0029] The acquisition module is used to acquire a first ratio and a second ratio of the target page; wherein the first ratio is used to represent the ratio of the text content in the target page to all the content in the target page, and the second ratio is used to represent the ratio of the image content in the target page to all the content in the target page. The processing module is used to determine a target sliding strategy based on the first ratio and the second ratio acquired by the acquisition module; wherein the target sliding strategy includes a target initial velocity gain coefficient and a target friction coefficient; the target initial velocity gain coefficient is positively correlated with the first ratio and negatively correlated with the second ratio; the target friction coefficient is negatively correlated with the first ratio and positively and negatively correlated with the second ratio. The control module is used to control the target page to slide based on the target sliding strategy determined by the processing module in response to the user's hand-off action during the sliding operation on the target page.
[0030] In a third aspect, the present application provides an electronic device comprising a display screen, a memory, and one or more processors; the display screen, the memory, and the processor are coupled; wherein the memory stores computer program code, and the computer program code comprises computer instructions, which, when executed by the processor, enables the electronic device to execute the display control method provided in the first aspect and any possible design thereof.
[0031] In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the display control method provided in the first aspect and any possible design thereof.
[0032] In a fifth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the display control method provided in the first aspect and any possible design thereof.
[0033] It can be understood that the beneficial effects that can be achieved by the technical solutions provided in the second to fifth aspects mentioned above can be referred to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] FIG1 is a schematic diagram of a sliding curve provided in an embodiment of the present application;
[0035] FIG2 is a schematic diagram of a sliding curve variation according to an embodiment of the present application;
[0036] FIG3 is a schematic diagram of a sliding curve obtained from an ergonomic experiment provided in an embodiment of the present application;
[0037] FIG4 is a schematic diagram of the hardware architecture of an electronic device provided in an embodiment of the present application;
[0038] FIG5 is a schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0039] FIG6 is a flow chart of a display control method according to an embodiment of the present application;
[0040] FIG7 is a second flow chart of a display control method provided in an embodiment of the present application;
[0041] FIG8 is a schematic diagram of a view tree structure provided in an embodiment of the present application;
[0042] FIG9 is a third flow chart of a display control method provided in an embodiment of the present application;
[0043] FIG10 is a fourth flow chart of a display control method provided in an embodiment of the present application;
[0044] FIG11 is a fifth flow chart of a display control method provided in an embodiment of the present application;
[0045] FIG12 is a sixth flow chart of a display control method provided in an embodiment of the present application;
[0046] FIG13 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0047] FIG14 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that " / " means or, for example, A / B can mean A or B; "and / or" in the text is merely a description of an association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0049] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0050] The terms "first" and "second" in the following embodiments of this application are used for descriptive purposes only and should not be understood as implying or suggesting relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0051] First, the nouns involved in the embodiments of this application are explained as follows:
[0052] Sliding strategy (also called sliding curve strategy or sliding processing strategy): The sliding strategy specifically refers to the strategy that the operating system of the electronic device wants to use for the user's sliding operation when the user slides his finger on the touch screen to control the specific process of page sliding (for example, controlling the sliding speed, sliding time, sliding distance, etc. during the page sliding process). In other words, the electronic device can adjust the page sliding effect during the page sliding process based on the sliding strategy to achieve a smoother and more natural sliding effect. This can improve the user experience and make the sliding operation smoother and more responsive. Specifically, in practice, the sliding strategy can be that the electronic device controls the sliding process of the page based on a preconfigured sliding curve. Exemplarily, the sliding curve can specifically include a speed-time curve as shown in Figure 1 (a), and a distance-time curve as shown in Figure 1 (b).
[0053] The sliding curve can be derived from a specific curve function (or curve model), which can reflect the relationship between the time after the user releases the touch and the sliding speed and distance. In this curve function, the two most critical parameters can be the initial velocity gain coefficient (or speed gain coefficient) and the friction coefficient.
[0054] The initial velocity gain factor determines the initial velocity of the page after the user releases the scrolling action. The friction coefficient determines how quickly the page's velocity decreases after the user releases the scrolling action, simulating the physical effects of real-world applications. A larger initial velocity gain factor increases the initial velocity of the page, while a larger friction coefficient results in a faster decrease in the page's velocity.
[0055] For example, if the speed-time curve of the sliding curve is the curve shown in Figure 2(a), if the initial speed gain coefficient corresponding to the sliding curve is increased, the speed-time curve becomes the curve shown in Figure 2(b). Compared with the speed-time curve shown in Figure 2(a), the speed-time curve shown in Figure 2(b) shows that the initial speed of the page sliding increases, and the sliding time required for the page sliding to complete is longer, that is, the time required for the sliding speed of the page sliding to decrease to zero is longer.
[0056] If the friction coefficient corresponding to the sliding curve is increased, the speed-time curve becomes the curve shown in Figure 2(c). Compared with the speed-time curve shown in Figure 2(a), the speed-time curve shown in Figure 2(c) maintains the same initial speed of the page sliding, but the sliding time required to complete the page sliding is reduced.
[0057] Similarly, if the initial velocity gain coefficient corresponding to the sliding curve is reduced, the change in the velocity-time curve will produce a change similar to that from Figure 2 (b) to Figure 2 (a); if the friction coefficient corresponding to the sliding curve is reduced, the change in the velocity-time curve will produce a change similar to that from Figure 2 (c) to Figure 2 (a).
[0058] In addition, when the initial velocity gain coefficient corresponding to the sliding curve is increased, the sliding distance and sliding duration in the distance-time curve are both increased; when the friction coefficient corresponding to the sliding curve is increased, the sliding distance and sliding duration in the distance-time curve are both reduced; when the initial velocity gain coefficient corresponding to the sliding curve is reduced, the sliding distance and sliding duration in the distance-time curve are both reduced; when the friction coefficient corresponding to the sliding curve is reduced, the sliding distance and sliding duration in the distance-time curve are both increased.
[0059] In practice, in the throwing and sliding scenario, the mobile phone controls the page sliding process based on the sliding curve, which is actually the switching of multiple frames. Specifically, after the user performs the hand-off action, the mobile phone or each preset duration determines the distance currentDisance that the page needs to slide, and the sliding speed currentVelocity based on the sliding curve. Afterwards, the mobile phone can determine the content to be displayed in the next frame based on the currentDisance, and display it after drawing. When the currentVelocity determined at a certain time is less than the set threshold, the entire sliding process ends. Among them, the preset duration is related to the refresh rate when the mobile phone displays the page. For example, if the refresh rate is 120Hz, the preset duration can be 8.3ms.
[0060] View tree: In practice, the entire area of a page that the application needs to display (generally, the size will be larger than the size of the area that the display can display at one time) can be divided into multiple sub-areas according to the page content or specific rules, and each sub-area can be called a view node. When an application in an electronic device draws a page, a view tree consisting of all view nodes (view nodes) in the entire page is generated based on a pre-configured layout file and view hierarchy. Among them, the layout file defines the layout of the page and the position, area, type and other information of each view node, while the view hierarchy describes the parent-child relationship between view nodes. The view tree finally generated can include the position information, area and content category (or type) of the views corresponding to all view nodes, as well as a list of child nodes of the view node.
[0061] With the development of electronic device technology, users can now slide on the display screens of electronic devices such as mobile phones, causing the display screens of electronic devices to scroll and display corresponding content. In a hand-off swipe scenario, after the user performs a swipe operation, the page displayed on the display screen will continue to slide for a certain distance based on the hand-off speed before stopping. In the prior art, electronic devices control page sliding in hand-off swipe scenarios based on a single sliding strategy or sliding curve.
[0062] However, in actual user usage scenarios, the pages displayed on the display screen will have a variety of usage scenarios, such as pure text scenarios, pure image scenarios, and image and text scenarios. Among them, the pure text scenario refers to the scenario where the content displayed on the page is all or almost all text, such as e-book pages, contact pages, etc. The pure image scenario refers to the scenario where the content displayed on the page is all or almost all images, such as gallery display pages, etc. The image and text scenario refers to the scenario where the content displayed on the page is a mixture of text and images, such as Shopping page, Pages, etc. In the embodiment of the present application, images may include pictures and videos.
[0063] In different usage scenarios, users have different expectations for the page sliding process after they let go of their hands. Through human factors experiments (which can be understood as survey experiments similar to questionnaires), it can be concluded that: for pure text scenarios, users tend to slide quickly and stop slowly; for pure image scenarios, users tend to slide slowly and stop quickly. For graphic and text scenarios, users tend to slide slowly and stop slowly. Here, sliding speed refers to the speed at which the page slides after the user lets go of the hand; sliding quickly corresponds to a fast page sliding speed, and sliding slowly corresponds to a slow page sliding speed. Stopping speed refers to the length of time the sliding continues after the user lets go of the hand; stopping quickly corresponds to a short page sliding time, and stopping quickly corresponds to a long page sliding time.
[0064] For example, referring to (a) in Figure 3, it can be seen that in the pure text scenario, the initial speed of page sliding is the largest and the sliding time is the longest; in the pure image scenario, the initial speed of page sliding is the smallest and the sliding time is the shortest; in the graphic and text scenario, the initial speed of page sliding is medium and the sliding time is longer.
[0065] As shown in (b) of Figure 3, it can be seen that in the pure text scenario, the page sliding time is the longest, and the sliding distance changes the fastest and is the longest; in the pure image scenario, the page sliding time is the shortest, and the sliding distance changes the slowest and is the shortest; in the image and text scenario, the page sliding time is longer, and the sliding distance changes faster and is longer.
[0066] In summary, we can conclude that in the scrolling scenario, when the page contains more images, users tend to scroll slower and the scrolling duration is shorter. When the page contains more text, users tend to scroll faster and the scrolling duration is longer.
[0067] Based on this, in the existing hand-off swiping scenario, the sliding strategy or sliding curve used by the electronic device to control page sliding cannot be well used in different usage scenarios, and thus cannot well meet user needs, and the user experience is not good enough.
[0068] To address the above issues, an embodiment of the present application provides a display control method for use in an electronic device. In this technical solution, the electronic device can first obtain a first ratio and a second ratio of a target page. The first ratio is used to represent the proportion of text content in the target page to all content in the target page, and the second ratio is used to represent the proportion of image content in the target page to all content in the target page. The target page can be the page currently displayed by the electronic device or the page to be displayed soon. In this application, the image content can be a picture or a video.
[0069] The electronic device can then determine a target sliding strategy based on the first ratio and the second ratio. The target sliding strategy may include a target initial velocity gain coefficient and a target friction coefficient. The larger the first ratio, the larger the initial velocity gain coefficient and the smaller the target friction coefficient; the larger the second ratio, the smaller the initial velocity gain coefficient and the larger the target friction coefficient. In other words, the target initial velocity gain coefficient is positively correlated with the first ratio and negatively correlated with the second ratio; the target friction coefficient is negatively correlated with the first ratio and positively or negatively correlated with the second ratio.
[0070] Thereafter, the electronic device may control the target page to slide based on the target sliding strategy in response to the user's lifting-up action of the sliding operation on the target page.
[0071] Since the target sliding strategy for controlling the sliding of the target page in this application is determined based on the proportion of text content and image content in the target page. Moreover, since the proportion of text content is positively correlated with the initial velocity gain coefficient and negatively correlated with the target friction coefficient; the proportion of image content is negatively correlated with the initial velocity gain coefficient and positively correlated with the target friction coefficient. Therefore, the proportion of text content and image content in the target page will directly affect the initial velocity, duration and distance of the target page sliding controlled by the electronic device based on the target sliding strategy. Specifically, the more text content, the greater the initial velocity of the target page sliding and the longer the sliding duration; the more image content, the smaller the initial velocity of the target page sliding and the longer the sliding duration. In this way, the target sliding strategy for the electronic device to control the sliding of the target page can be more in line with the user's usage scenario when viewing the target page, so that the effect of the target page sliding is more in line with the user's expectations, thereby improving the user's usage experience.
[0072] The technical solutions provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0073] The technical solutions provided in this application can be applied to electronic devices. In some embodiments, the electronic device can be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device, etc. The embodiments of this application do not impose any special restrictions on the specific type of the electronic device.
[0074] For example, taking the electronic device as a mobile phone as an example, FIG4 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0075] 4 , the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a display 193, a subscriber identification module (SIM) card interface 194, and a camera 195. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air 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, a bone conduction sensor, and the like.
[0076] The processor 110 may include one or more processing units. For example, the processor 110 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). The different processing units may be independent devices or integrated into one or more processors.
[0077] The controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller can generate operation control signals to complete the control of instruction fetching and execution.
[0078] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0079] In some embodiments, the processor 110 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.
[0080] The charging management module 140 is used to receive charging input from a power supply device (e.g., a charger, laptop charger, etc.). The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through the wireless charging coil of the electronic device.
[0081] While charging the battery 142, the charging management module 140 can also power the electronic device through the power management module 141. Specifically, the battery 142 can be composed of multiple batteries connected in series. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110.
[0082] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 and provides power to the processor 110, the internal memory 121, the display 193, the camera 195, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery voltage, current, battery cycle count, and battery health status (leakage, impedance). In other embodiments, the power management module 141 can also be provided in the processor 110.
[0083] The external memory interface 120 can be used to connect to an external non-volatile memory device to expand the storage capacity of the electronic device. The external non-volatile memory device communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory device.
[0084] The internal memory 121 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data, and can be pre-loaded into the RAM for direct reading and writing by the processor 110.
[0085] A touch sensor, also known as a "touch control device," can be provided on the display screen 193. The touch sensor and the display screen 193 form a touch screen, also known as a "touch screen." The touch sensor is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided via the display screen 193. In other embodiments, the touch sensor can also be provided on the surface of the electronic device, at a location different from that of the display screen 193.
[0086] The ambient light sensor is used to sense ambient light brightness. For example, the ambient light sensor can measure the light intensity of four channels of ambient light. The ambient light sensor outputs the measured light intensities of the four channels of ambient light to processor 110. Processor 110 can process the light intensities of the four channels of ambient light output by the ambient light sensor to obtain the ambient light intensity. In the bright screen mode, the electronic device can adaptively adjust the display brightness based on the obtained ambient light intensity.
[0087] The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor can be set on the display screen 193. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. When a touch operation is applied to the display screen 193, the electronic device monitors the touch operation intensity based on the pressure sensor. The electronic device can also calculate the position of the touch based on the monitoring signal of the pressure sensor. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
[0088] In some embodiments, the electronic device may include 1 or N cameras 195, where N is a positive integer greater than 1. In an embodiment of the present application, the type of camera 195 can be distinguished based on the hardware configuration and physical location. For example, the camera provided on the side of the display screen 193 of the electronic device can be called a front camera, and the camera provided on the side of the back cover of the electronic device can be called a rear camera; for another example, a camera with a short focal length and a larger viewing angle can be called a wide-angle camera, and a camera with a long focal length and a small viewing angle can be called a normal camera. Among them, the length of the focal length and the size of the viewing angle are relative concepts, and there are no specific parameters to limit them. Therefore, wide-angle cameras and normal cameras are also relative concepts, and can be specifically distinguished based on physical parameters such as focal length and viewing angle.
[0089] The electronic device implements display functionality through a GPU, display screen 193, and an application processor. The GPU is a microprocessor for image processing that connects display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0090] The electronic device can implement a shooting function through an ISP, a camera 195, a video codec, a GPU, a display screen 193, and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information. In the embodiment of the present application, the GPU function is used during the frame drawing process of each image frame to achieve better display effects and performance of the final displayed image.
[0091] The ISP processes data fed back by camera 195. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be incorporated into camera 195. Camera 195 is used to capture still images or video.
[0092] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency, the DSP performs a Fourier transform on the frequency energy.
[0093] Display screen 193 is used to display images, videos, and the like. Display screen 193 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device can include one or N display screens 193, where N is a positive integer greater than one.
[0094] In the embodiment of the present application, the display screen 193 can be used to display the page that the user needs to view (for example, the target page, etc.).
[0095] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem and baseband processor.
[0096] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0097] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter, amplify, and perform other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0098] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 193. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0099] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0100] SIM card interface 194 is used to connect a SIM card. A SIM card can be connected to and disconnected from the electronic device by inserting or removing it from the SIM card interface 194. An electronic device may support one or more SIM card interfaces. SIM card interface 194 can support Nano SIM cards, Micro SIM cards, and SIM cards. Multiple cards can be inserted into the same SIM card interface 194 simultaneously. SIM card interface 194 is also compatible with external memory cards. Electronic devices interact with the network through SIM cards to implement functions such as call and data communications. Each SIM card corresponds to one user number.
[0101] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0102] Of course, it is understood that FIG4 is merely an example of an electronic device in the form of a mobile phone. If the electronic device is a tablet computer, handheld computer, PC, PDA, wearable device (such as a smart watch, smart bracelet), or other device form factors, the structure of the electronic device may include fewer or more structures than shown in FIG4, and this is not limited here.
[0103] It is understandable that, in general, the realization of electronic device functions requires not only hardware support but also software cooperation. The software system of the electronic device can adopt a layered architecture, event-driven architecture, micro-core architecture, micro-service architecture, or cloud architecture. Taking the system as an example, the software structure of the electronic device is illustrated.
[0104] Figure 5 is a schematic diagram of the layered architecture of the software system of the electronic device provided in an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces (e.g., APIs).
[0105] In some examples, as shown in FIG5 , in an embodiment of the present application, the software of an electronic device is divided into five layers, namely, from top to bottom, the application layer, the framework layer (or application framework layer), the system library and Android runtime (Android runtime), the HAL layer (hardware abstraction layer), and the driver layer (or kernel layer). Among them, the system library and Android runtime can also be called the local framework layer or native layer.
[0106] The application layer may include a series of applications. As shown in Figure 5, the application layer may include applications (APPs) such as camera, gallery, calendar, map, WLAN, Bluetooth, music, video, short message, call, navigation, instant messaging, gallery, news, wallpaper, etc.
[0107] The framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions or services. For example, the application framework layer may include an activity manager, a window manager, a content provider, an audio service, a view system, a telephony manager, a resource manager, a notification manager, a package manager, etc., but the embodiments of this application do not impose any restrictions on this.
[0108] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0109] Content providers are used to store and retrieve data and make it accessible to applications. This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0110] The view system is primarily used to build and manage the application's user interface. The view system includes visual controls, such as those for displaying text and images. The view system can be used to construct an application's display interface, or pages. A display interface can be composed of one or more views. For example, a display interface for a text notification icon might include a text view for displaying text and an image view for displaying images.
[0111] The view system provides a series of classes and interfaces for creating, laying out, and displaying views, as well as handling user interaction events. The view system is also responsible for managing the view lifecycle, drawing and rendering, and interacting with other components (such as activities and services).
[0112] Before drawing a page, the view system will build a view tree consisting of multiple view nodes based on the layout file and view hierarchy pre-defined by the application. Specifically, the view system may include a general view management module (such as a listview module), a text view management module (such as a textview module) and an image view management module (such as an imageview module). The text view management module is used to manage all text views (views that only include text) in the page that the electronic device needs to display, and the image view is used to manage all image views (views that only include images) in the page that the electronic device needs to display. The general view management module can obtain information about all text views and image views in the page that the electronic device needs to display from the text view management module and the image view management module, and then build a view tree in combination with the pre-defined layout file and view hierarchy. Each view node in the view tree represents a view. For example, the text view node in the view tree represents a text view, and the image view node represents an image view.
[0113] In an embodiment of the present application, the total view management module is also used to determine, based on the view tree, the proportion of text views in the page that the electronic device needs to display to all views of the entire page (that is, the proportion of the area where the text content in the page that the electronic device needs to display to all areas of the page), and the proportion of all image views in the entire page (that is, the proportion of the area where the picture content in the page that the electronic device needs to display to all areas of the page). Specifically, the total view management module can obtain information about all leaf view nodes from the view tree, and based on the information of the leaf view nodes, determine the proportion of the area of the text view nodes in the leaf view nodes to the sum of the areas of all leaf view nodes, and the proportion of the area of the picture view nodes in the leaf view nodes to the sum of the areas of all leaf view nodes.
[0114] The phone manager is used to provide communication functions for electronic devices. For example, the phone manager can manage the call status of the call application (including initiation, connection, and hang up).
[0115] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0116] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0117] Package Manager on Android The system is used to manage application packages. It allows applications to obtain detailed information about installed applications and their services, permissions, etc. The package manager is also used to manage events such as application installation, uninstallation, and upgrades.
[0118] The system library can include multiple functional modules. For example: surface manager, media libraries, Open Graphics Library Embedded Systems (OpenGL ES), Simple Graphics Library (SGL), etc. The surface manager is used to manage the display subsystem and provides 2D and 3D layer fusion for multiple applications. The media library supports playback and recording of various common audio and video formats, as well as static image files. The media library can support multiple audio and video encoding 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. SGL is the drawing engine for 2D drawing.
[0119] The Android runtime consists of core libraries and the ART virtual machine. The Android runtime is responsible for scheduling and management of the Android system. The core libraries consist of two parts: one for Java-based functions and the other for the Android core library. The application layer and application framework layer run in the ART virtual machine. The ART virtual machine executes Java files from the application layer and application framework layer as binary files. The ART virtual machine is responsible for performing functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0120] The HAL layer is an interface layer located between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable across multiple platforms. The HAL layer provides a standard interface to display device hardware capabilities to the higher-level Java API framework (i.e., the framework layer). The HAL layer contains multiple library modules, each of which implements an interface for a specific type of hardware component, such as the audio HAL audio module, the bluetooth HAL Bluetooth module, the camera HAL camera module (also known as the camera HAL or camera hardware abstraction module), and the sensors HAL sensor module (or sensor service).
[0121] The driver layer is the layer between hardware and software. The driver layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, a battery driver, and the like, though this application does not limit these functions. Specifically, the sensor driver may include drivers for each sensor included in the electronic device, such as an ambient light sensor driver. For example, the ambient light sensor driver may respond to an instruction or command from the sensor module to acquire detection data and promptly send the detection data from the ambient light sensor to the sensing module.
[0122] The technical solutions provided in the embodiments of this application can be implemented in electronic devices having the above-mentioned hardware architecture or software architecture.
[0123] Based on the hardware architecture shown in FIG4 and the software architecture shown in FIG5, the display control method provided by the embodiment of the present application is introduced below in conjunction with FIG6. FIG6 is a flow chart of a display control method provided by the embodiment of the present application. Referring to FIG6, taking the electronic device as a mobile phone, the display control method may include S601-S603:
[0124] S601: The mobile phone obtains a first ratio and a second ratio of a target page.
[0125] In the embodiment of the present application, the target page can be a page that can be displayed by any application on the mobile phone. The target page can be the page currently displayed on the mobile phone, or the target page can be the page that the mobile phone will soon display. The first ratio is used to represent the proportion of text content in the target page to all content on the target page, and the second ratio is used to represent the proportion of image content in the target page to all content on the target page. The sum of the first ratio and the second ratio is 1.
[0126] The display control method provided in this application is primarily intended to enable a mobile phone to use a sliding strategy that better suits the user's current usage scenario of viewing the target page after the user has swiped and released the mobile phone. Therefore, the mobile phone first needs to obtain the proportions of text content and image content on the target page, and then determine the appropriate sliding strategy based on these two proportions.
[0127] In the embodiment of the present application, the mobile phone may obtain the first ratio and the second ratio in the following two scenarios:
[0128] In the first possible scenario, if the target page is the page that the mobile phone is about to display (specifically, it can be the page of any application in the mobile phone), then when the mobile phone is drawing the target page, the view system in the mobile phone can generate a view tree corresponding to the target page, and the view tree can include all view nodes in the target page. For example, taking the complete target page as shown in Figure 7 (a) as an example, the view tree can be as shown in Figure 7 (b). It should be noted that the target page shown in Figure 7 (a) is only a schematic representation of the content of the entire page. In practice, if the display screen size of the mobile phone is smaller than the area of the target page, when the mobile phone displays the target page, it can only display a part of the target page at a time, rather than the entire target page.
[0129] Among them, the root view node represents the entire target page, view node 1 represents view 1, view node 2 represents view 2, view node 3 represents view 3, view node 4 represents view 4, view node 5 represents view 5, view node 6 represents view 6, view node 7 represents view 7, view node 8 represents view 8, view node 9 represents view 9, view node 10 represents view 10, view node 11 represents view 11, view node 12 represents view 12, and view node 13 represents view 13. View nodes 5 and 6 are child nodes of view node 2, view nodes 7, 8, and 9 are child nodes of view node 3, and view nodes 10, 11, 12, and 13 are child nodes of view node 4.
[0130] Since the view tree records the information of the view nodes corresponding to all views in the target page, such as size, type, and position, the mobile phone can derive the area ratio of the text view and image view in the target page based on the information of all leaf nodes (also called leaf view nodes) in the view tree. Based on this, in a possible implementation, in combination with Figure 6 and as shown in Figure 8, S601 may specifically include S801-S803:
[0131] S801. The mobile phone obtains the view tree of the target page.
[0132] The view tree of the target page includes characteristic information of all view nodes in the target page, and each view node refers to a view in the target page. The characteristic information may include the area (or size, dimensions, etc.) and type of the view corresponding to the view node. The type may include a text view or an image view. Of course, in practice, the characteristic information may also include the position of the view corresponding to the view node, the parent-child relationship between different view nodes, and other content, and this application does not impose specific restrictions on this.
[0133] S802. The mobile phone determines, based on the characteristic information of all leaf view nodes in the view tree, a first proportion of the sum of the areas of the corresponding views of all leaf text view nodes to the total area of the target page, and a second proportion of the sum of the areas of all leaf image view nodes to the area of the target page.
[0134] All leaf view nodes in the view tree are leaf nodes in the view tree. Leaf text view nodes are leaf view nodes whose corresponding view type is text view, and leaf image view nodes are leaf view nodes whose corresponding view type is image view. Since the views corresponding to all leaf view nodes are all views in the target page after being divided at the smallest granularity, the sum of the areas of the views corresponding to all leaf view nodes is the total area of the target page.
[0135] Similarly, the sum of the areas of the corresponding views of all leaf text view nodes is the sum of the areas of all text views in the target page; the sum of the areas of the corresponding views of all leaf image view nodes is the sum of the areas of all image views in the target page.
[0136] The mobile phone can use the sum of the areas of the corresponding views of all leaf text view nodes and the sum of the areas of the corresponding views of all leaf view nodes to calculate the first proportion; and use the sum of the areas of the corresponding views of all leaf image view nodes and the sum of the areas of the corresponding views of all leaf view nodes to calculate the second proportion.
[0137] Furthermore, the first proportion can be considered as the proportion of the sum of the areas of all text views in the target page to the total area of the target page, that is, the first proportion can represent the proportion of the text content in the target page to all the contents of the target page, that is, the first ratio can be equivalent to the first ratio. Similarly, the second proportion can be considered as the proportion of the sum of the areas of all image views in the target page to the total area of the target page, that is, the first proportion can represent the proportion of the image content in the target page to all the contents of the target page, that is, the second ratio can be equivalent to the second ratio. Based on this, the mobile phone can use the first proportion as the first proportion and the second proportion as the second proportion, that is, execute S6013.
[0138] S803. The mobile phone uses the first proportion as the first proportion and the second proportion as the second proportion.
[0139] Based on the technical solutions corresponding to S801-S803, the mobile phone can determine the first and second scales of the target page based on the view tree corresponding to the target page. Based on these two scales, the mobile phone can subsequently determine the target sliding strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0140] In the second possible scenario, if the target page is the page currently displayed on the phone (specifically, it can be the page currently displayed by any application on the phone), and the distribution of text content and image content on a page is regular, that is, after each swipe operation by the user, the ratio of text content to image content in all the content displayed during the swipe is roughly the same, the phone can determine the first ratio and the second ratio based on the historical swipe display data of the target page.
[0141] For example, the mobile phone can determine the first proportion and the second proportion of the target page based on the proportion of text content and image content in all contents in each frame when the mobile phone displays the target page during the last sliding process of the target page or within a first preset time period before the current moment, or the proportion of text content and image content in all contents in the partial content of the target page displayed by the mobile phone.
[0142] Based on this, in the second possible scenario, S601 can be implemented in the following four ways:
[0143] In the first implementation, in combination with FIG6 and referring to FIG9 , S601 may specifically include S901 and S902:
[0144] S901. The mobile phone obtains the third ratio and the fourth ratio of each frame of the first picture displayed by the mobile phone during the last sliding process of the target page.
[0145] In an embodiment of the present application, the last sliding process of the target page refers to a process from the start of sliding to the stop of sliding of the target page before the current moment, specifically, it can be the process from the start of the user's sliding operation to the user's hand-raising action.
[0146] Among them, the third proportion refers to the proportion of text content in all content (specifically, it can be the proportion of the area of the region where the text content is located in the area of the first frame of the picture), and the fourth proportion refers to the proportion of image content in all content (specifically, it can be the proportion of the area of the region where the text content is located in the area of the first frame of the picture).
[0147] In the embodiment of the present application, the mobile phone can implement S901 by monitoring the content of each first frame in real time and obtaining the third and fourth percentages. The specific monitoring implementation can be any feasible method, and this application does not impose any specific restrictions on this. Of course, the implementation of S901 can also be any other possible implementation method, and this application does not impose any specific restrictions on this.
[0148] After the mobile phone obtains the third proportion and the fourth proportion of the first picture of each frame during the last sliding process of the target page, because the first picture of each frame displays part of the content of the target page, the mobile phone can infer the first proportion and the second proportion of the target page based on the third proportion and the fourth proportion of the first picture of each frame, that is, execute S902.
[0149] S902: The mobile phone determines an average value of the third proportions of all first screens as a first proportion of the target page, and determines an average value of the fourth proportions of all first screens as a second proportion of the target page.
[0150] Because the third ratio of each first frame displayed on the mobile phone during another scrolling of the target page can reflect, to a certain extent, the proportion of text content in the target page's total content, the average of all third ratios can be determined as the first ratio. Similarly, the fourth ratio of each first frame displayed on the mobile phone during another scrolling of the target page can reflect, to a certain extent, the proportion of image content in the target page's total content, so the average of all fourth ratios can be determined as the first ratio.
[0151] Based on the corresponding technical solutions of S901 and S902, the mobile phone can use the historical sliding display data of the ratio of text content to image content in each first frame displayed by the phone during the previous sliding process of the target page to infer the first and second ratios of the target page. Based on these two ratios, the mobile phone can subsequently determine the target sliding strategy that best meets the user's needs in the user's use scenario of viewing the target page, thereby improving the user experience.
[0152] In the second implementation, in combination with FIG6 and referring to FIG10 , S601 may specifically include S1001 and S1002:
[0153] S1001. The mobile phone obtains a third proportion and a fourth proportion of each frame of the second picture when the mobile phone displays a target page at the current moment and within a first preset time period before the current moment.
[0154] Exemplarily, the first preset duration may be 2 seconds.
[0155] The implementation method of the mobile phone obtaining the third proportion and the fourth proportion in each frame of the second picture in S1001 can refer to the specific implementation of obtaining the third proportion and the fourth proportion in the first picture in S901 in the above embodiment, which will not be repeated here.
[0156] S1002: The mobile phone determines an average value of the third proportions of all second screens as a first proportion of the target page, and determines an average value of the fourth proportions of all second screens as a second proportion of the target page.
[0157] The reason why the first ratio and the second ratio can be obtained by using S1002 can be referred to the relevant description after S902 in the above embodiment, and will not be repeated here.
[0158] Based on the technical solutions corresponding to S1001 and S1002, the mobile phone can use historical sliding display data, including the ratio of text content to image content in each second frame of the target page displayed at the current moment and within a first preset time period before the current moment, to infer the first and second ratios of the target page. Based on these two ratios, the mobile phone can subsequently determine the target sliding strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0159] In the third implementation, in combination with FIG6 and referring to FIG11 , S601 may specifically include S1101 and S1102:
[0160] S1101. The mobile phone obtains the fifth and sixth proportions of historical content displayed on the target page during the last sliding process of the target page.
[0161] The definition of the last sliding process of the target page can refer to the relevant description after S901 in the above embodiment, and will not be repeated here.
[0162] Among them, the fifth proportion refers to the proportion of text content to historical content (specifically, it can be the proportion of the area of the area where the text content is located to the area of the historical content), and the sixth proportion refers to the proportion of image content to all content (specifically, it can be the proportion of the area of the area where the text content is located to the area of the first frame).
[0163] In the embodiment of the present application, the mobile phone can obtain the fifth and sixth percentages by real-time monitoring of all contents during the display of the target page, thereby implementing S1101. The specific monitoring implementation can be any feasible method, and this application does not impose any specific restrictions on this. Of course, the implementation of S1101 can also be any other possible implementation method, and this application does not impose any specific restrictions on this.
[0164] S1102: The mobile phone determines the fifth proportion as the first proportion of the target page, and determines the sixth proportion as the second proportion of the target page.
[0165] Because the distribution of text content and image content in different areas of the target page is similar or identical, the proportion of text content and the proportion of image content in a part of the target page can be equated with the proportion of text content and image content in the entire target page.
[0166] Based on the technical solutions corresponding to S1101 and S1102, the mobile phone can use historical sliding display data, including the ratio of text content to image content within the target page's historical content displayed during the previous sliding process, to infer the first and second ratios of the target page. Based on these two ratios, the mobile phone can subsequently determine the target sliding strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0167] In a fourth implementation, in combination with FIG6 and referring to FIG12 , S601 may specifically include S1201 and S1202:
[0168] S1201. The mobile phone obtains the fifth and sixth proportions of historical content displayed on the target page at the current time and within a first preset time period before the current time.
[0169] During the implementation of S1201, the implementation of the mobile phone obtaining the fifth proportion and the sixth proportion can refer to the relevant description after S1101 in the above embodiment, which will not be repeated here.
[0170] After the mobile phone obtains the fifth and sixth proportions of the historical content displayed during the last scrolling of the target page, because the historical content itself is part of the target page, the proportions of text content and image content of the historical content and image content are similar or identical. Therefore, the mobile phone can set the fifth proportion of the historical content to the first proportion of the target page and the sixth proportion of the historical content to the second proportion of the target page, that is, execute S1202.
[0171] S1202: The mobile phone determines the fifth proportion as the first proportion of the target page, and determines the sixth proportion as the second proportion of the target page.
[0172] Based on the technical solutions corresponding to S1201 and S1202, the mobile phone can use historical sliding display data, which includes the ratio of text content to image content within the target page's historical content displayed at the current moment and within a first preset period of time before the current moment, to infer the first and second ratios of the target page. Based on these two ratios, the mobile phone can subsequently determine the target sliding strategy that best meets the user's needs when viewing the target page, thereby improving the user experience.
[0173] It should be noted that in the second possible scenario, in order to avoid the problem of frequent changes in the sliding strategy during the sliding of the target page, which may cause the sliding process to be unsmooth, various implementations of S601 can be performed when the user has not performed a sliding operation and the sliding of the target page has ended. In this way, the same sliding strategy is used every time the target page is slid, the sliding process will be smoother, and the user experience will be better.
[0174] Of course, the above two possible scenarios and the possible implementation methods in each scenario are only examples. In practice, the mobile phone can obtain the first ratio and the second ratio in any feasible manner, and this application does not impose any specific restrictions on this.
[0175] S602: The mobile phone determines a target sliding strategy based on the first ratio and the second ratio.
[0176] The target sliding strategy may include a target initial velocity gain coefficient and a target friction coefficient.
[0177] In some possible implementations, the mobile phone can determine the target initial velocity gain coefficient in the target sliding strategy according to the first ratio and the second ratio according to the first preset formula, and determine the target friction coefficient in the target sliding strategy according to the second preset formula.
[0178] For example, the first preset formula is as follows: v=v t *p t +v p *p p ;
[0179] Among them, v is the target initial velocity gain, v t is the initial speed gain of the text, v p is the initial velocity gain of the image, v t Greater than v p , p t is the first ratio, p p The second ratio.
[0180] The text initial speed gain refers to the initial speed gain corresponding to the sliding curve that provides the best user experience in pure text scenarios, as determined through human factors experiments. The image initial speed gain refers to the initial speed gain corresponding to the sliding curve that provides the best user experience in pure image scenarios, as determined through human factors experiments.
[0181] For example, the second preset formula is as follows: f=f t *p t +f p *p p ;
[0182] Where f is the target friction coefficient, f t is the text friction coefficient, f p is the image friction coefficient, f p Greater than f t The text friction coefficient refers to the friction coefficient corresponding to the sliding curve with the best user experience in pure text scenarios, obtained through human factors experiments. The image friction coefficient refers to the friction coefficient corresponding to the sliding curve with the best user experience in pure image scenarios, obtained through human factors experiments.
[0183] Based on the first preset formula above, it can be concluded that the larger the first ratio, the larger the initial speed gain coefficient and the smaller the target friction coefficient; the larger the second ratio, the smaller the initial speed gain coefficient and the larger the target friction coefficient. Alternatively, the initial speed gain coefficient is positively correlated with the first ratio and negatively correlated with the second ratio; the target friction coefficient is negatively correlated with the first ratio and positively and negatively correlated with the second ratio.
[0184] S603: In response to the user releasing the hand from the sliding operation on the target page, the mobile phone controls the target page to slide based on the target sliding strategy.
[0185] After the user swipes on the target page and releases the swipe, the phone can generate a corresponding sliding curve based on the target initial velocity gain coefficient and target friction coefficient in the target sliding strategy according to a preset sliding curve function. The target page can then be slid based on this sliding curve, thereby displaying any content not displayed on the target page. The target page slides in the same direction as the user swiped on the target page.
[0186] Based on the technical solution provided in the embodiment of the present application, the target sliding strategy for controlling the sliding of the target page is determined based on the proportion of text content and image content in the target page. Moreover, since the proportion of text content is positively correlated with the initial velocity gain coefficient and negatively correlated with the target friction coefficient; the proportion of image content is negatively correlated with the initial velocity gain coefficient and positively correlated with the target friction coefficient. Therefore, the proportion of text content and image content in the target page will directly affect the initial velocity, duration and distance of the target page sliding controlled by the mobile phone based on the target sliding strategy. Specifically, the more text content, the greater the initial velocity of the target page sliding and the longer the sliding duration; the more image content, the smaller the initial velocity of the target page sliding and the longer the sliding duration. In this way, the target sliding strategy for controlling the sliding of the target page by the mobile phone can be more in line with the usage scenario when the user views the target page, so that the effect of the target page sliding is more in line with the user's expectations, thereby improving the user experience.
[0187] It is understandable that, in order to realize the above functions, the above electronic device includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0188] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0189] In the case of dividing each functional module into corresponding functional modules, as shown in Figure 13, an embodiment of the present application also provides an electronic device, which may include: an acquisition module 1301, a processing module 1302 and a control module 1303.
[0190] Among them, the acquisition module 1301 is used to obtain the first ratio and the second ratio of the target page; wherein the first ratio is used to represent the ratio of the text content in the target page to all the content in the target page, and the second ratio is used to represent the ratio of the image content in the target page to all the content in the target page. The processing module 1302 is used to determine the target sliding strategy based on the first ratio and the second ratio obtained by the acquisition module 1301; wherein the target sliding strategy includes a target initial speed gain coefficient and a target friction coefficient; the target initial speed gain coefficient is positively correlated with the first ratio and negatively correlated with the second ratio; the target friction coefficient is negatively correlated with the first ratio and positively and negatively correlated with the second ratio. The control module 1303 is used to control the target page to slide based on the target sliding strategy determined by the processing module 1302 in response to the user's hand-off action of the sliding operation on the target page.
[0191] In addition, the cooperation among the acquisition module 1301 , the processing module 1302 and the control module 1303 can implement any step of the display control method provided in the aforementioned embodiment, which will not be described in detail here.
[0192] Regarding the electronic device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the display control method in the above embodiment, and will not be further elaborated here. The relevant beneficial effects thereof can also refer to the relevant beneficial effects of the above display control method, and will not be repeated here.
[0193] The present application also provides an electronic device comprising: a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the display control method provided in the aforementioned embodiment. The specific structure of the electronic device can be referred to the structure of the electronic device shown in FIG4 .
[0194] An embodiment of the present application further provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the display control method provided in the aforementioned embodiment.
[0195] An embodiment of the present application further provides a computer program product, which includes executable instructions. When the computer program product is run on an electronic device, the electronic device executes the display control method provided in the aforementioned embodiment.
[0196] The present application also provides a chip system, as shown in FIG14 , wherein the chip system 1400 includes at least one processor 1401, a memory, and at least one interface circuit 1402. The processor 1401 and the interface circuit 1402 can be interconnected via a line. For example, the interface circuit 1402 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 1402 can be used to send signals to other devices (such as the processor 1401).
[0197] For example, the interface circuit 1402 can read instructions or computer programs stored in the memory and send the instructions or computer programs to the processor 1401. When the instructions or computer programs are executed by the processor 1401, the various steps of the display control method provided in the above embodiment can be implemented. Of course, the chip system can also include other discrete components, which are not specifically limited in this embodiment of the application.
[0198] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0199] In the several embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0200] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0202] 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 embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0203] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A display control method, characterized in that, Applied to an electronic device, the method includes: The electronic device obtains a first ratio and a second ratio of a target page; wherein, the first ratio is used to represent the proportion of text content in the target page to all content in the target page, and the second ratio is used to represent the proportion of image content in the target page to all content in the target page; The electronic device determines a target sliding strategy based on the first ratio and the second ratio; wherein, the target sliding strategy includes a target initial speed gain coefficient and a target friction coefficient; the target initial speed gain coefficient is positively correlated with the first ratio and negatively correlated with the second ratio; the target friction coefficient is negatively correlated with the first ratio and positively or negatively correlated with the second ratio; The electronic device controls the target page to slide based on the target sliding strategy in response to the off-hand action of the user's sliding operation on the target page.
2. The method according to claim 1, wherein The electronic device obtaining the first ratio and the second ratio of the target page includes: The electronic device obtains the view tree of the target page; The electronic device determines, according to the feature information of the leaf view nodes in the view tree, a first proportion of the sum of the areas of the corresponding views of all the leaf text view nodes to the total area of the target page, and a second proportion of the sum of the areas of all the leaf image view nodes to the area of the target page; wherein, the feature information includes the area and type of the view corresponding to the view node, and the type includes a text view or an image view; the leaf view node is a leaf node in the view tree, the leaf text view node is a leaf node whose corresponding view type is a text view, and the leaf image view node is a leaf node whose corresponding view type is an image view; The electronic device takes the first proportion as the first ratio and the second proportion as the second ratio.
3. The method according to claim 2, wherein The electronic device obtaining the first ratio and the second ratio of the target page includes: The electronic device obtains the historical sliding display data of the target page; The electronic device determines the first ratio and the second ratio of the target page based on the historical sliding display data of the target page.
4. The method according to claim 3, characterized in that The electronic device determining the first ratio and the second ratio of the target page based on the historical sliding display data of the target page includes: The electronic device obtains a third proportion and a fourth proportion of each first frame of the first picture displayed by the electronic device during the previous sliding process of the target page; wherein, the third proportion is the proportion of text content to all content, and the fourth proportion is the proportion of image content to all content; The electronic device determines the average value of the third proportions of all the first pictures as the first ratio and the average value of the fourth proportions of all the first pictures as the second ratio.
5. The method according to claim 3, wherein The electronic device determining the first ratio and the second ratio of the target page based on the historical sliding display data of the target page includes: The electronic device obtains the third ratio and the fourth ratio of each frame of the second picture when the electronic device displays the target page at the current moment and within the first preset time period before the current moment; wherein, the third ratio is the ratio of the text content to all the content, and the fourth ratio is the ratio of the image content to all the content; The electronic device determines the average value of the third ratios of all the second pictures as the first ratio, and determines the average value of the fourth ratios of all the second pictures as the second ratio.
6. The method according to claim 3, wherein The electronic device determines the first ratio and the second ratio of the target page based on the historical sliding display data of the target page, including: The electronic device obtains the fifth ratio and the sixth ratio in the historical content displayed in the target page during the previous sliding process of the target page; wherein, the fifth ratio is the ratio of the text content to the historical content, and the sixth ratio is the ratio of the image content to the historical content; The electronic device determines the fifth ratio as the first ratio and determines the sixth ratio as the second ratio.
7. The method according to claim 3, wherein The electronic device determines the first ratio and the second ratio of the target page based on the historical sliding display data of the target page, including: The electronic device obtains the fifth ratio and the sixth ratio in the historical content displayed in the target page at the current moment and within the first preset time period before the current moment; wherein, the fifth ratio is the ratio of the text content to the historical content, and the sixth ratio is the ratio of the image content to the historical content; The electronic device determines the fifth ratio as the first ratio and determines the sixth ratio as the second ratio.
8. The method according to any one of claims 1 to 7, characterized in that The electronic device determines a target sliding strategy based on the first ratio and the second ratio, including: The electronic device determines the target initial velocity gain coefficient in the target sliding strategy according to the first ratio and the second ratio based on a first preset formula; The electronic device determines the target friction coefficient in the target sliding strategy according to the first ratio and the second ratio based on a second preset formula; Wherein, the first preset formula is: v = v t *p t + v p *p p ; Among them, v is the target initial velocity gain, v t is the text initial velocity gain, v p is the image initial velocity gain, v t is greater than v p , p t is the first ratio, p p is the second ratio; The first preset formula is: f = f t *p t + f p *p p ; Among them, f is the target friction coefficient, f t is the text friction coefficient, f p is the image friction coefficient, f p is greater than f t .
9. An electronic device, characterized in that, Including: A display screen, a memory, and one or more processors; the display screen and the memory are coupled to the processor; wherein, computer program code is stored in the memory, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the display control method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, Including computer instructions, and when the computer instructions run on the electronic device, the electronic device executes the display control method according to any one of claims 1-8.
Citation Information
Patent Citations
Display control method, electronic equipment and storage medium
CN120276644A
Page output method and apparatus
CN105354292A
Content acquisition method and device, electronic equipment and storage medium
CN111427504A
Interface rolling speed determination method and device, intelligent equipment and storage medium
CN117058565A
Controlling acceleration of mouse cursor movement based on screen segments and image features
US20130139097A1