Display control method, electronic equipment and storage medium
By obtaining the proportion of text and image content of the target page in electronic devices and dynamically adjusting the initial speed gain coefficient 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
- CN202311868160.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-08
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 adjusting the initial velocity gain coefficient and friction coefficient in the sliding strategy to control the page sliding effect to meet user expectations.
Improves the user's sliding experience in different usage scenarios, ensuring that the sliding effect is more in line with user expectations.
Smart Images

Figure CN120276644A_ABST
Abstract
Description
Technical Field
[0001] The application relates to the technical field of terminals, and particularly to a display control method, an electronic device, and a storage medium. Background Art
[0002] With the development of electronic device technology, users can perform sliding operations on the display screens of electronic devices such as mobile phones, so that the display screens of the electronic devices can scroll to display corresponding content. In some possible scenarios of throwing and sliding away from the hand, when the user raises the hand to end the sliding operation on the display screen, the page displayed on the display screen will continue to slide a certain distance before stopping based on the sliding speed (i.e., the speed when leaving the hand) when the user leaves the hand. During the sliding process, the content displayed on the page will also change accordingly.
[0003] However, in the prior art, in the scenario of throwing and sliding away from the hand, the electronic device controls the page sliding based on a single sliding curve or sliding strategy, which cannot be applied to different usage scenarios or display scenarios. Summary of the Invention
[0004] 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 more meets the user's expectations and improves the user experience.
[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:
[0006] 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 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 responds to the leaving action of the user's sliding operation on the target page, and controls the target page to slide based on the target sliding strategy.
[0007] Based on the technical solution provided in this application, the target sliding strategy for the electronic device to control 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 speed gain coefficient and negatively correlated with the target friction coefficient; the proportion of image content is negatively correlated with the initial speed 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 speed, duration, and distance of the electronic device to control the sliding of the target page based on the target sliding strategy. Specifically, the more text content there is, the greater the initial speed of the target page sliding and the longer the sliding duration; the more image content there is, the smaller the initial speed of the target page sliding and the shorter 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 usage scenario when the user views the target page, making the sliding effect of the target page more in line with the user's expectations and improving the user's experience.
[0008] In a possible design 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 view tree of the target page; the electronic device determines, according to the feature information of the leaf view nodes in the view tree, the first ratio 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 the second ratio of the sum of the areas of all leaf image view nodes to the area of the target page; where 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 ratio as the first ratio and the second ratio as the second ratio.
[0009] Based on the above design, the electronic device can obtain the first ratio and the second ratio of the target page based on the view tree corresponding to the target page. Based on these two ratios, the electronic device can subsequently obtain the target sliding strategy that best meets the user's needs in the usage scenario of viewing the target page, improving the user's experience.
[0010] In a possible design 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.
[0011] Based on the above design method, 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 proportion and the second proportion of the target page based on the historical sliding display data. Based on these two proportions, the electronic device can then obtain the target sliding strategy that best meets the user's needs in the usage scenario of viewing the target page, improving the user's experience.
[0012] 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 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 in all content, and the fourth proportion is the proportion of image content in all content; the electronic device determines the average value of the third proportions of all the first pictures as the first proportion, and determines the average value of the fourth proportions of all the first pictures as the second proportion.
[0013] Based on the above design method, the electronic device can infer the first proportion and the second proportion of the target page by using the historical sliding display data of the proportion of text content and image content in each frame of the first picture displayed by the electronic device during the previous sliding process of the target page. Based on these two proportions, the electronic device can then obtain the target sliding strategy that best meets the user's needs in the usage scenario of viewing the target page, improving the user's 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 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 proportion is the proportion of text content in all content, and the fourth proportion is the proportion of image content in all content; the electronic device determines the average value of the third proportions of all the first pictures as the first proportion, and determines the average value of the fourth proportions of all the first pictures as the second proportion.
[0015] Based on the above design method, the electronic device can infer the first proportion and the second proportion of the target page by using the historical sliding display data of the proportion of text content and image content in 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. Based on these two proportions, the electronic device can then obtain the target sliding strategy that best meets the user's needs in the usage scenario of viewing the target page, improving the user's experience.
[0016] In a possible design of the first aspect, the electronic device determines a first ratio and a second ratio of the target page based on the historical sliding display data of the target page, including: The electronic device obtains a fifth ratio and a 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 the sixth ratio as the second ratio.
[0017] Based on the above design, the electronic device can infer the first ratio and the second ratio of the target page by using the historical sliding display data of the ratio of the text content and the image content in the historical content displayed on the target page during the previous sliding process of the target page. Based on these two ratios, the electronic device can subsequently obtain the target sliding strategy that best meets the user's needs in the usage scenario of viewing the target page, improving the user experience.
[0018] In a possible design of the first aspect, the electronic device determines a first ratio and a second ratio of the target page based on the historical sliding display data of the target page, including: The electronic device obtains a fifth ratio and a 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 the sixth ratio as the second ratio.
[0019] Based on the above design, the electronic device can infer the first ratio and the second ratio of the target page by using the historical sliding display data of the ratio of the text content and the image content in the historical content displayed on the target page at the current moment and within the first preset time period before the current moment. Based on these two ratios, the electronic device can subsequently obtain the target sliding strategy that best meets the user's needs in the usage scenario of viewing the target page, improving the user experience.
[0020] In a possible design of the first aspect, 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 the 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 the second preset formula.
[0021] Wherein, the first preset formula is:
[0022] v = v t *p t +v p *pp ;
[0023] Among them, v is the target initial speed gain, v t is the text initial speed gain, v p is the image initial speed gain, v t is greater than v p , p t is the first ratio, p p is the second ratio;
[0024] The first preset formula is:
[0025] f = f t *p t + f p *p p ;
[0026] 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 .
[0027] Based on the above design method, the target initial speed gain coefficient that is positively correlated with the first ratio and negatively correlated with the second ratio can be successfully obtained; and the target friction coefficient that is negatively correlated with the first ratio and positively correlated with the second ratio can be obtained. In this way, the mobile phone can control the target page to perform a sliding effect that is more in line with the user's expectations based on the target sliding strategy.
[0028] In a second aspect, an embodiment of the present application further provides an electronic device, and the functions of the electronic device can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, for example, an acquisition module, a processing module, and a control module.
[0029] Among them, the acquisition module is used to acquire the first ratio and the second ratio of the target page; among them, the first ratio is used to represent the proportion of the text content in the target page in all the content in the target page, and the second ratio is used to represent the proportion of the image content in the target page in all the content in the target page. The processing module is used to determine the target sliding strategy based on the first ratio and the second ratio acquired by the acquisition module; among them, 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 correlated with the second ratio. The control module is used to, in response to the leaving action of the user's sliding operation on the target page, control the target page to slide based on the target sliding strategy determined by the processing module.
[0030] In a third aspect, the present application provides an electronic device, which includes 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. When the computer instructions are executed by the processor, the electronic device is caused 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, which includes computer instructions. When the computer instructions run on an electronic device, the electronic device is caused to execute 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. When the computer program product runs on an electronic device, the electronic device is caused to execute the display control method provided in the first aspect and any possible design thereof.
[0033] It can be understood that for the beneficial effects that can be achieved by the technical solutions provided in the second aspect to the fifth aspect above, reference can be made to the beneficial effects in the first aspect and any possible design thereof, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 Schematic diagram of the sliding curve provided by an embodiment of the present application;
[0035] Figure 2 Schematic diagram of the change of the sliding curve provided by an embodiment of the present application;
[0036] Figure 3 Schematic diagram of the sliding curve obtained from the human factors experiment provided by an embodiment of the present application;
[0037] Figure 4 Schematic diagram of the hardware architecture of an electronic device provided by an embodiment of the present application;
[0038] Figure 5 Schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application;
[0039] Figure 6 Schematic diagram of the flow of a display control method provided by an embodiment of the present application Figure 1 ;
[0040] Figure 7 Schematic diagram of the flow of a display control method provided by an embodiment of the present application Figure 2 ;
[0041] Figure 8 Schematic diagram of a view tree structure provided by an embodiment of the present application;
[0042] Figure 9 Flow schematic of a display control method provided by an embodiment of the present application Figure 3 ;
[0043] Figure 10 Flow schematic of a display control method provided by an embodiment of the present application Figure 4 ;
[0044] Figure 11 Flow schematic of a display control method provided by an embodiment of the present application Figure 5 ;
[0045] Figure 12 Flow schematic of a display control method provided by an embodiment of the present application Figure 6 ;
[0046] Figure 13 Schematic structural diagram of an electronic device provided by an embodiment of the present application;
[0047] Figure 14 Schematic structural diagram of a chip system provided by an embodiment of the present application. Detailed implementation manners
[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 limit the present application. As used in the specification and appended claims of the present application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that " / " means "or", for example, A / B may mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. These three situations.
[0049] Referring to "embodiment" in the present application means that a specific feature, structure, or characteristic described in combination with the embodiment may be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described in the present application may be combined with other embodiments.
[0050] In the following embodiments of this application, the terms "first" and "second" are only used for descriptive purposes and should not be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0051] First, the nouns involved in the embodiments of this application are described as follows:
[0052] Sliding strategy (which can also be called sliding curve strategy or sliding processing strategy): Specifically, the sliding strategy refers to the strategy by which the operating system of an electronic device controls the specific process of page sliding (such as the sliding speed, sliding time, sliding distance, etc.) when the user performs a sliding operation by finger on the touch screen. That is to say, based on the sliding strategy, the electronic device can adjust the page sliding effect during the page sliding process 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 page sliding process based on a pre-configured sliding curve. Exemplarily, the sliding curve can specifically include, for example, Figure 1 the speed-time curve shown in (a) in Figure 1 and the distance-time curve shown in (b) in
[0053] The sliding curve can be obtained from a specific curve function (or called curve model), and this curve function can be a function reflecting the relationship between the duration after the user releases the hand, the sliding speed, and the sliding distance. In this curve function, the two most critical parameters can be the initial speed gain coefficient (or called speed gain coefficient) and the friction coefficient.
[0054] Among them, the initial speed gain coefficient is mainly used to determine the initial speed of page sliding after the user releases the hand during the sliding operation; the friction coefficient is used to determine how fast the page sliding speed decreases after the user releases the hand during the sliding operation, so as to simulate the physical effects in the real implementation. The larger the initial speed gain coefficient, the greater the initial speed of page sliding; the larger the friction coefficient, the faster the page sliding speed decreases.
[0055] Exemplarily, taking the curve shown in (a) in Figure 2 as an example of the speed-time curve of the sliding curve, if the initial speed gain coefficient corresponding to the sliding curve is increased, the speed-time curve will become the curve shown in (b) in Figure 2 . Compared with the Figure 2 speed-time curve described in (a) in Figure 2In the velocity-time curve shown in (b), the initial velocity of the page sliding increases, and at the same time, the sliding duration required for the page sliding to end becomes longer, that is, the duration required for the sliding velocity of the page sliding to decrease to zero becomes longer.
[0056] If the friction coefficient corresponding to the sliding curve is increased, the velocity-time curve becomes the curve shown in Figure 2 (c). Compared with Figure 2 the velocity-time curve described in (a), Figure 2 in the velocity-time curve shown in (c), the initial velocity of the page sliding remains unchanged, and the sliding duration required for the page sliding to end becomes smaller.
[0057] Similarly, if the initial velocity gain coefficient corresponding to the sliding curve is decreased, the change in the velocity-time curve will be similar to Figure 2 the change from (b) to Figure 2 (a); if the friction coefficient corresponding to the sliding curve is decreased, the change in the velocity-time curve will be similar to Figure 2 the change from (c) to Figure 2 (a).
[0058] In addition, when the initial velocity gain coefficient corresponding to the sliding curve is increased, both the sliding distance and the sliding duration in the distance-time curve increase; when the friction coefficient corresponding to the sliding curve is increased, both the sliding distance and the sliding duration in the distance-time curve decrease; when the initial velocity gain coefficient corresponding to the sliding curve is decreased, both the sliding distance and the sliding duration in the distance-time curve decrease; when the friction coefficient corresponding to the sliding curve is decreased, both the sliding distance and the sliding duration in the distance-time curve increase.
[0059] In practice, in the throwing and sliding scenario, the process of the mobile phone controlling the page sliding based on the sliding curve is essentially the switching of multiple frames of pictures. Specifically, after the user performs the off-hand action, the mobile phone determines, at each preset duration, based on the sliding curve, the distance currentDisance that the page needs to slide and the sliding speed currentVelocity. Then, the mobile phone can determine the content to be displayed in the next frame based on the currentDisance and perform drawing and display. When the determined currentVelocity 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 an application needs to display (generally, the size is larger than the size that the display screen can show at one time) can be divided into multiple sub - regions according to the page content or specific rules, and each sub - region can be called a view node. When an application in an electronic device draws a certain page, it will generate a view tree composed of all view nodes (view nodes) in the entire page based on a pre - configured layout file and a view hierarchy. Among them, the layout file defines information such as the layout of the page, the position, area, and type of each view node, while the view hierarchy describes the parent - child relationship between view nodes. The finally generated view tree can include the position information, area, and content category (or type) of the views corresponding to all view nodes, as well as the list of child nodes of the view nodes.
[0061] With the development of electronic device technology, users can perform sliding operations on the display screen of electronic devices such as mobile phones, so that the display screen of the electronic device can scroll to display corresponding content. In the off - hand throw - slide scenario, when the user performs a sliding operation, the page displayed on the display screen will continue to slide a certain distance before stopping based on the off - hand speed. In the prior art, in the off - hand throw - slide scenario, the electronic device controls the page sliding based on a single sliding strategy or sliding curve.
[0062] However, in the actual usage scenarios of users, there are various usage scenarios for the pages displayed on the display screen, such as pure - text scenarios, pure - image scenarios, and text - image scenarios. Among them, the pure - text scenario refers to a scenario where all or almost all of the content displayed on the page is text, such as an e - book page, a contacts page, etc. The pure - image scenario can refer to a scenario where all or almost all of the content displayed on the page is an image, such as a gallery display page, etc. The text - image scenario can refer to a scenario where the content displayed on the page is a mixture of text and images, such as the shopping page, the page, etc. In the embodiments of the present application, an image can include pictures and videos.
[0063] In different usage scenarios, users have different expectations for the sliding process of the page after leaving the hand. Through a human - factors experiment (which can be understood as a survey experiment similar to a questionnaire survey), it can be obtained that: for the pure - text scenario, users tend to slide fast and stop slowly; for the pure - image scenario, users tend to slide slowly and stop quickly. For the text - image scenario, users tend to slide slowly and stop slowly. Here, sliding fast or slow refers to the speed at which the page slides after the user leaves the hand; sliding fast corresponds to a fast page - sliding speed, and sliding slow corresponds to a slow page - sliding speed. Stopping fast or slow refers to the length of time the sliding continues after the user leaves the hand; stopping fast corresponds to a short sliding - continuation time for the page, and stopping slow corresponds to a long sliding - continuation time for the page.
[0064] Exemplarily, referring to Figure 3 as shown in (a) of 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 text and image scenario, the initial speed of page sliding is medium and the sliding time is longer.
[0065] Referring to Figure 3 as shown in (b) of Figure 3 , it can be seen that in the pure text scenario, the sliding time of the page is the longest, and the change in sliding distance is the fastest and the longest; in the pure image scenario, the sliding time of the page is the shortest, and the change in sliding distance is the slowest and the shortest; in the text and image scenario, the sliding time of the page is longer, and the change in sliding distance is faster and longer.
[0066] In summary, it can be concluded that in the throw-and-slide scenario, the more images there are on the page, the more likely users are to slide at a slower speed and for a shorter time. When there is more text on the page, users tend to slide at a faster speed and with a longer tail.
[0067] Based on this, in the existing throw-and-slide scenario when the hand leaves the device, the sliding strategy or sliding curve used by the electronic device to control page sliding cannot well adapt to different usage scenarios, and thus cannot well meet user needs, resulting in a poor user experience.
[0068] To address the above problems, an embodiment of the present application provides a display control method applied to an electronic device. In this technical solution, the electronic device can first obtain a first ratio and a second ratio of the target page. Among them, 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 on the electronic device or the page to be displayed. In the present application, the image content can be a picture or a video.
[0069] After that, the electronic device can determine a target sliding strategy based on the first ratio and the second ratio. The target sliding strategy can include a target initial speed gain coefficient and a target friction coefficient. Among them, 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. That is to say, 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 correlated with the second ratio.
[0070] Then, the electronic device can, in response to the hand-leaving action of the user's sliding operation on the target page, control the target page to slide based on the target sliding strategy.
[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 there is, the greater the initial velocity of the target page sliding and the longer the sliding duration; the more image content there is, the smaller the initial velocity of the target page sliding and the shorter the sliding duration. In this way, the target sliding strategy for the electronic device to control the target page sliding can be more in line with the usage scenario when the user views the target page, making the sliding effect of the target page more in line with the user's expectations and improving the user's experience.
[0072] The technical solutions provided in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0073] The technical solutions provided in the present application can be applied to electronic devices. In some embodiments, the electronic device may be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, as well as 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, a vehicle-mounted device, a smart home device, and / or a smart city device, etc. The embodiments of the present application do not impose special restrictions on the specific type of the electronic device.
[0074] Exemplarily, taking the electronic device as a mobile phone as an example, Figure 4 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0075] Refer to Figure 4As shown in the figure, 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, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a display screen 193, a subscriber identification module (SIM) card interface 194, and a camera 195, etc. Among them, the sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[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), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0077] The controller may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0078] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[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, etc.
[0080] The charging management module 140 is configured to receive a charging input from a power supply device (such as a charger, laptop power supply, etc.). Among them, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive the 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 supply power to the electronic device through the power management module 141. Among them, the battery 142 can specifically 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 the input from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the display screen 193, the camera 195, the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as the voltage, current, battery cycle count, and battery health status (leakage, impedance) of the battery. In some other embodiments, the power management module 141 can also be disposed in the processor 110.
[0083] The external memory interface 120 can be used to connect to an external non-volatile memory to implement the storage capacity expansion of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external non-volatile memory.
[0084] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 110, and can be used to store the operating system or executable programs of other running programs (such as machine instructions), and can also be used to store user and application data, etc. The non-volatile memory can also store executable programs and store user and application data, etc., and can be pre-loaded into the random access memory for the processor 110 to directly read and write.
[0085] The touch sensor, also known as a "touch control device". The touch sensor can be disposed on the display screen 193, and the touch sensor and the display screen 193 form a touch screen, also known as a "touch control screen". The touch sensor is used to monitor touch operations acting on or near it. The touch sensor can transmit the monitored touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 193. In some other embodiments, the touch sensor can also be disposed on the surface of the electronic device, at a different position from the display screen 193.
[0086] The ambient light sensor is used to sense the ambient light brightness. For example: the ambient light sensor can measure the light intensity of four channels of the ambient light. The ambient light sensor outputs the measured light intensity of the four channels of the ambient light to the processor 110. The processor 110 can process the light intensity of the four channels of the ambient light output by the ambient light sensor to obtain the light intensity of the ambient light. In the screen-on state, the electronic device can adaptively adjust the display screen brightness according to the obtained light intensity of the ambient light.
[0087] The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor may be disposed 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 acts on the display screen 193, the electronic device monitors the intensity of the touch operation according to the pressure sensor. The electronic device can also calculate the position of the touch according to the monitoring signal of the pressure sensor. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may 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 one or N cameras 195, where N is a positive integer greater than 1. In the embodiments of the present application, the types of the cameras 195 can be distinguished according to the hardware configuration and the physical location. For example, the camera disposed on the side of the display screen 193 of the electronic device can be called a front camera, and the camera disposed on 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 large 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 parameter limitations. Therefore, the wide-angle camera and the normal camera are also relative concepts and can be specifically distinguished according to physical parameters such as the focal length and the viewing angle.
[0089] The electronic device realizes the display function through the GPU, the display screen 193, and the application processor, etc. The GPU is a microprocessor for image editing, connecting the display screen 193 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0090] The electronic device can realize the shooting function through the ISP, the camera 195, the video codec, the GPU, the display screen 193, and the application processor, etc. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. In the embodiments of the present application, in the frame drawing process of each image frame, the function of the GPU is used to make the finally displayed picture obtain better display effects and performance.
[0091] The ISP is used to process the data fed back by the camera 195. For example, when taking a photo, the shutter is opened, and light passes through the lens and is transmitted to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also optimize the image noise and brightness through algorithms. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be disposed in the camera 195. The camera 195 is used to capture static images or videos.
[0092] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0093] The display screen 193 is used to display images, videos, etc. The display screen 193 includes a display panel. The display panel can adopt 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, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N display screens 193, where N is a positive integer greater than 1.
[0094] In the embodiments 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 the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem, and the baseband processor, etc.
[0096] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas.
[0097] The mobile communication module 150 may provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to an electronic device. The mobile communication module 150 may receive electromagnetic waves through antenna 1, and perform processing such as filtering and amplification on the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be provided in the same device.
[0098] The modulation and demodulation processor may include a modulator and a demodulator. Among them, 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. Subsequently, the demodulator 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 transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to speaker 170A, receiver 170B, etc.), or displays an image or video through the display screen 193. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
[0099] The wireless communication module 160 may provide solutions for wireless communications applied to an electronic device, 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 technology (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves through antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 may also receive the signal to be transmitted from the processor 110, perform frequency modulation and amplification on it, and convert it into electromagnetic waves through antenna 2 for radiation.
[0100] The SIM card interface 194 is used to connect to the SIM card. The SIM card can be inserted into or removed from the SIM card interface 194 to achieve contact with and separation from the electronic device. The electronic device can support one or more SIM card interfaces. The SIM card interface 194 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 194 simultaneously. The SIM card interface 194 can also be compatible with external memory cards. The electronic device interacts with the network through the SIM card to achieve functions such as calls and data communication. One SIM card corresponds to one user number.
[0101] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of the present application, the electronic device can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0102] Of course, it can be understood that the above Figure 4 is only an exemplary illustration when the form of the electronic device is a mobile phone. When the electronic device is in other forms such as a tablet computer, a handheld computer, a PC, a PDA, a wearable device (such as a smart watch, a smart bracelet), etc., the structure of the electronic device may include fewer structures than those Figure 4 shown, or may include more structures than those Figure 4 shown, which is not limited herein.
[0103] It can be understood that generally, in addition to the support of hardware, the realization of the functions of the electronic device also requires the cooperation of software. The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. The embodiments of the present application take the system of the layered architecture as an example to exemplarily illustrate the software structure of the electronic device.
[0104] Figure 5 is a schematic diagram of the layered architecture of the software system of the electronic device provided in the embodiments of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces (such as APIs).
[0105] In some examples, referring to Figure 5As shown in the figure, in the embodiments of the present application, the software of the electronic device is divided into five layers, from top to bottom, namely the application layer, the framework layer (or called the application framework layer), the system library and Android Runtime, the HAL layer (Hardware Abstraction Layer), and the driver layer (or called the kernel layer). Among them, the system library and Android Runtime can also be called the native framework layer or the native layer.
[0106] Among them, the application layer may include a series of applications. Such as Figure 5 As shown in the figure, the application layer may include applications (Application, APP) such as cameras, galleries, calendars, maps, WLAN, Bluetooth, music, videos, text messages, calls, navigation, instant messaging, galleries, news, wallpapers, etc.
[0107] The framework layer provides application programming interfaces (API) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions 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 telephone manager, a resource manager, a notification manager, a package manager, etc., and the embodiments of the present application do not make any restrictions on this.
[0108] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0109] The content provider is used to store and obtain data, and make this data accessible to applications. This data may include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.
[0110] The main function of the view system is to build and manage the user interface of the application. The view system includes visible controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build the display interface or page of the application. The display interface can be composed of one or more views. For example, the display interface including a text message notification icon may 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 life cycle, drawing, and rendering of views, as well as interacting with other components (such as activities and services).
[0112] Before rendering a certain page, the view system constructs a view tree composed of multiple view nodes based on the layout file and view hierarchy predefined by the application. Specifically, the view system may include a general view management module (such as the listview module), a text view management module (such as the textview module), and an image view management module (such as the imageview module). The text view management module is used to manage all the 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 the image views (views that only include images) in the page that the electronic device needs to display. The general view management module can then obtain information about all the 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 construct a view tree in combination with the predefined layout file and view hierarchy. Each view node in the view tree represents a view. For example, a text view node in the view tree represents a text view, and an image view node represents an image view.
[0113] In the embodiment of the present application, the general view management module is further used to determine, based on the view tree, the proportion of the text views in the page that the electronic device needs to display in all the views of the entire page (i.e., the proportion of the area where the text content is located in the page that the electronic device needs to display in all the areas of the page), and the proportion of all the image views in all the views of the entire page (i.e., the proportion of the area where the picture content is located in the page that the electronic device needs to display in all the areas of the page). Specifically, the general view management module can obtain information about all the 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 among all the leaf view nodes in the sum of the areas of all the leaf view nodes, and the proportion of the area of the picture view nodes among all the leaf view nodes in the sum of the areas of all the leaf view nodes.
[0114] The phone manager is used to provide the communication function of the electronic device. For example, the phone manager can manage the call status of the call application (including initiation, connection, disconnection, etc.).
[0115] The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
[0116] The notification manager enables an application to display notification information in the status bar. It can be used to convey message of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that a download is completed, a message is reminded, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or a scroll bar text, such as the notification of a background-running application, or a notification that appears on the screen in the form of a dialog window. For example, it can prompt text information in the status bar, emit a prompt tone, vibrate the electronic device, blink the indicator light, etc.
[0117] The package manager is used to manage application packages in the system. It allows an application to obtain detailed information about installed applications and their services, permissions, etc. The package manager is also used to manage events such as the installation, uninstallation, and upgrade of applications.
[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 the fusion of 2D and 3D layers for multiple applications. The Media Library supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The Media Library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES is used to implement three-dimensional graphic drawing, image rendering, synthesis, and layer processing, etc. SGL is a drawing engine for 2D drawing.
[0119] Android runtime includes a core library and an ART virtual machine. Android runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of Android. The application layer and the application framework layer run in the ART virtual machine. The ART virtual machine executes the Java files of the application layer and the application framework layer as binary files. The ART virtual machine is used to perform functions such as the management of object life cycles, stack management, thread management, security and exception management, and garbage collection.
[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, 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 the device hardware functions to a higher-level Java API framework (i.e., the framework layer). The HAL layer contains multiple library modules, and each module implements an interface for a specific type of hardware component. For example: the audio HAL audio module, the bluetooth HAL bluetooth module, the camera HAL camera module (which can also be called the camera HAL or the camera hardware abstraction module), and the sensors HAL sensor module (or called the Isensor service, the sensor service).
[0121] The driver layer is the layer between the hardware and the software. The driver layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, a battery driver, etc., which are not limited in this application. Among them, the sensor driver can specifically include the drivers for each sensor included in the electronic device, such as the ambient light sensor driver, etc. Exemplarily, the ambient light sensor driver can send the detection data of the ambient light sensor to the sensing module in a timely manner in response to an indication or instruction from the sensor module to obtain detection data.
[0122] The technical solutions provided in the embodiments of this application can all be implemented in an electronic device having the above-mentioned hardware architecture or software architecture.
[0123] Based on the above Figure 4 shown hardware architecture and Figure 5 shown software architecture, the following will introduce the display control method provided in the embodiments of this application with reference to Figure 6 shown. Figure 6 is a schematic flowchart of a display control method provided in an embodiment of this application. Referring to Figure 6 shown, taking the electronic device as a mobile phone, this display control method may include S601 - S603:
[0124] S601. The mobile phone obtains a first ratio and a second ratio of the target page.
[0125] In the embodiments of this application, the target page can be any page that can be displayed by any application in the mobile phone. The target page can be the page currently being displayed on the mobile phone, or the target page can also be the page that the mobile phone is about to display. The first ratio is used to represent the proportion 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 proportion of the image content in the target page to all the content in the target page. The sum of the first ratio and the second ratio is 1.
[0126] The main purpose of the display control method provided in this application is to enable the mobile phone to adopt a sliding strategy that better suits the usage scenario of the current user viewing the target page to control the sliding of the target page after the user performs a sliding operation and releases the hand. Therefore, the mobile phone first needs to obtain the proportions of the text content and the image content in the target page, and then determine a suitable sliding strategy based on these two proportions.
[0127] In the embodiments of this application, there are two scenarios in which the mobile phone can obtain the first proportion and the second proportion:
[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 during the process of the mobile phone rendering 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. Exemplarily, taking the page shown in (a) of Figure 7 as an example, the view tree can be as shown in (b) of Figure 7 . It should be noted that, Figure 7 the target page shown in (a) of
[0129] is only a schematic representation of the content of the entire page. In reality, if the size of the display screen of the mobile phone is smaller than the area of the target page, then when the mobile phone displays the target page, only a part of the target page can be displayed 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 Figure 1 , view node 2 represents Figure 2 , view node 3 represents Figure 3 , view node 4 represents Figure 4 , view node 5 represents Figure 5 , view node 6 represents Figure 6 , view node 7 represents Figure 7 , view node 8 represents Figure 8 , view node 9 represents Figure 9 , view node 10 represents Figure 10 , view node 11 represents Figure 11 , view node 12 represents Figure 12 , view node 13 represents Figure 13 . View node 5 and view node 6 are the child nodes of view node 2, view node 7, view node 8, and view node 9 are the child nodes of view node 3, and view node 10, view node 11, view node 12, and view node 13 are the child nodes of view node 4.
[0130] Since the view tree records information about view nodes corresponding to all views in the target page, such as size, type, and location. Therefore, the mobile phone can obtain the area ratio of the text view and the image view in the target page based on the information of all leaf nodes (which can be called leaf view nodes) in the view tree. Based on this, in a possible implementation, in combination with Figure 6 , referring to Figure 8 as shown, S601 may specifically include S801 - S803:
[0131] S801. The mobile phone obtains the view tree of the target page.
[0132] Among them, the view tree of the target page includes the feature information of all view nodes in the target page, and each view node represents a view in the target page. The feature information may include the area (or can be called size, dimension, etc.) and type of the view corresponding to the view node. Among them, the type may include a text view or an image view. Of course, in practice, the feature information may also include the location of the view corresponding to the view node, the parent - child relationship between different view nodes, etc. This application does not make specific restrictions on this.
[0133] S802. The mobile phone determines a first ratio of the sum of the areas of the views corresponding to all leaf text view nodes to the total area of the target page, and a second ratio of the sum of the areas of all leaf image view nodes to the area of the target page, based on the feature information of all leaf view nodes in the view tree.
[0134] Among them, all leaf view nodes in the view tree are all leaf nodes in the view tree. Leaf text view nodes are leaf view nodes whose corresponding view type is a text view, and leaf image view nodes are leaf view nodes whose corresponding view type is an image view. Since the views corresponding to all leaf view nodes are all views in the target page divided into 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 views corresponding to 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 views corresponding to all leaf image view nodes is the sum of the areas of all image views in the target page.
[0136] The mobile phone can calculate the first ratio by using the sum of the areas of the views corresponding to all leaf text view nodes and the sum of the areas of the views corresponding to all leaf view nodes; calculate the second ratio by using the sum of the areas of the views corresponding to all leaf image view nodes and the sum of the areas of the views corresponding to all leaf view nodes.
[0137] Further, 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 to say, the first proportion can represent the proportion of the text content in the target page to all the content in the target page, i.e., the first proportion 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 to say, the first proportion can represent the proportion of the image content in the target page to all the content in the target page, i.e., the second proportion can be equivalent to the second ratio. Based on this, the mobile phone can use the first proportion as the first ratio and the second proportion as the second ratio, that is, execute S6013.
[0138] S803. The mobile phone uses the first proportion as the first ratio and the second proportion as the second ratio.
[0139] Based on the technical solutions corresponding to S801 - S803, the mobile phone can obtain the first ratio and the second ratio of the target page based on the view tree corresponding to the target page. Based on these two ratios, the mobile phone can subsequently obtain the target sliding strategy that best meets the user's needs in the usage scenario of the user viewing the target page, improving the user experience.
[0140] In the second possible scenario, if the target page is the page being displayed on the mobile phone (specifically, it can be the page being displayed by any application on the mobile phone), and since the distribution of text content and image content in a page is regular, that is, every time the user performs a sliding operation, among all the content displayed during the page sliding process, the proportion of text content and image content is roughly the same. Therefore, the mobile phone can determine the first ratio and the second ratio based on the historical sliding display data of the target page.
[0141] For example, the mobile phone can determine the first ratio and the second ratio of the target page based on the proportion of text content and image content in each frame of the picture when the mobile phone displays the target page during the previous sliding process of the target page or within the first preset duration before the current moment, or based on the proportion of text content and image content in the part of the content displayed by the mobile phone in the target page to all the content.
[0142] Based on this, in the second possible scenario, S601 can have the following four implementation methods:
[0143] In the first implementation method, combined with Figure 6 , referring to Figure 9 shown, S601 can specifically include S901 and S902:
[0144] S901. The mobile phone obtains the third proportion and the fourth proportion of each first picture displayed by the mobile phone during the previous sliding process of the target page.
[0145] In the embodiment of the present application, the previous 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, a process between the start of the sliding operation implemented by the user and the lifting action implemented by the user.
[0146] Among them, the third ratio refers to the ratio of the text content to all content (specifically, the ratio of the area of the region where the text content is located to the area of a frame of the first screen), and the fourth ratio refers to the ratio of the image content to all content (specifically, the ratio of the area of the region where the text content is located to the area of a frame of the first screen).
[0147] In the embodiment of the present application, the mobile phone can monitor the content of each frame of the first screen in real time and obtain the third ratio and the fourth ratio to implement S901. The specific implementation of the monitoring can be any feasible method, and the present application does not make specific limitations thereto. Of course, the implementation of S901 can also be any other possible implementation method, and the present application does not make specific limitations thereto.
[0148] After the mobile phone obtains the third ratio and the fourth ratio of each frame of the first screen during the previous sliding process of the target page, since each frame of the first screen is a display of part of the content in the target page, the mobile phone can infer the first ratio and the second ratio of the target page based on the third ratio and the fourth ratio of each frame of the first screen, that is, execute S902.
[0149] S902: The mobile phone determines the average value of the third ratios of all the first screens as the first ratio of the target page, and determines the average value of the fourth ratios of all the first screens as the second ratio of the target page.
[0150] Because during the process of the target page sliding again, the third ratio in each frame of the first screen displayed by the mobile phone can reflect to a certain extent the ratio of the text content in the target page to all the content, the average value of all the third ratios can be determined as the first ratio. Similarly, during the process of the target page sliding again, the fourth ratio in each frame of the first screen displayed by the mobile phone can reflect to a certain extent the ratio of the image content in the target page to all the content, so the average value of all the fourth ratios can be determined as the first ratio.
[0151] Based on the technical solutions corresponding to S901 and S902, the mobile phone can use the historical sliding display data of the ratio of the text content and the image content in each frame of the first screen displayed by the mobile phone during the previous sliding process of the target page to infer the first ratio and the second ratio of the target page. Based on these two ratios, subsequently, the mobile phone can obtain the target sliding strategy that best meets the user's needs in the usage scenario of the user viewing the target page, improving the user experience.
[0152] In the second implementation manner, in combination withFigure 6 , with reference to Figure 10 shown in the figure, S601 may specifically include S1001 and S1002:
[0153] S1001. The mobile phone obtains the third ratio and the fourth ratio of each frame of the second screen when the mobile phone displays the target page at the current moment and within the first preset time period before the current moment.
[0154] Exemplarily, the first preset time period may be 2 s.
[0155] The implementation manner for the mobile phone to obtain the third ratio and the fourth ratio in each frame of the second screen in S1001 may refer to the specific implementation of obtaining the third ratio and the fourth ratio in the first screen in S901 in the foregoing embodiments, which will not be elaborated herein.
[0156] S1002. The mobile phone determines the average value of the third ratios of all the second screens as the first ratio of the target page, and determines the average value of the fourth ratios of all the second screens as the second ratio of the target page.
[0157] The reason for obtaining the first ratio and the second ratio by using S1002 may refer to the related description after S902 in the foregoing embodiments, which will not be elaborated herein.
[0158] Based on the technical solutions corresponding to S1001 and S1002, the mobile phone can use the historical sliding display data of the ratio of the text content and the image content in each frame of the second screen when the mobile phone displays the target page at the current moment and within the first preset time period before the current moment to infer the first ratio and the second ratio of the target page. Based on these two ratios, the mobile phone can subsequently obtain the target sliding strategy that best meets the user's needs in the usage scenario of the user viewing the target page, improving the user experience.
[0159] In the third implementation manner, in combination with Figure 6 , with reference to Figure 11 shown in the figure, S601 may specifically include S1101 and S1102:
[0160] S1101. The mobile phone 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.
[0161] The definition of the previous sliding process of the target page may refer to the related description after S901 in the foregoing embodiments, which will not be elaborated herein.
[0162] Among them, the fifth ratio refers to the ratio of the text content to the historical content (specifically, it can be the ratio of the area of the region where the text content is located to the area of the historical content), and the sixth ratio refers to the ratio of the image content to all the content (specifically, it can be the ratio of the area of the region where the text content is located to the area of the first frame of the first screen).
[0163] In the embodiments of the present application, the mobile phone can obtain the fifth ratio and the sixth ratio by monitoring all the content during the display process of the target page in real time, so as to implement S1101. The specific implementation of the monitoring can be any feasible method, and the present application does not make specific limitations on this. Of course, the implementation of S1101 can also be any other possible implementation method, and the present application does not make specific limitations on this.
[0164] S1102. The mobile phone determines the fifth ratio as the first ratio of the target page and determines the sixth ratio as the second ratio of the target page.
[0165] Since the distribution of the text content and the image content in different regions of the target page is similar or the same, the ratio of the text content and the ratio of the image content in a part of the content in the target page can be equivalent to the ratio of the text content and the image content in the entire target page.
[0166] Based on the technical solutions corresponding to S1101 and S1102, the mobile phone can infer the first ratio and the second ratio of the target page by using the historical sliding display data of the ratio of the text content and the image content in the historical content displayed on the target page during the previous sliding process of the target page. Based on these two ratios, the mobile phone can subsequently obtain the target sliding strategy that best meets the user's needs in the usage scenario of the user viewing the target page, improving the user's usage experience.
[0167] In the fourth implementation manner, in combination with Figure 6 , with reference to Figure 12 shown, S601 may specifically include S1201 and S1202:
[0168] S1201. The mobile phone 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 duration before the current moment.
[0169] During the implementation of S1201, the implementation of the mobile phone obtaining the fifth ratio and the sixth ratio can refer to the relevant descriptions after S1101 in the foregoing embodiments, and will not be elaborated here.
[0170] After the mobile phone obtains the fifth and sixth proportions of the historical content displayed during the previous sliding of the target page, since the historical content is itself part of the target page, the proportion of the text content and the proportion of the image content of the two are similar or the same. Therefore, the mobile phone can equate the fifth proportion of the historical content to the first proportion of the target page, and equate 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 the historical sliding display data of the proportion of the text content and the image content in the historical content displayed on the target page at the current moment and within the first preset duration before the current moment to infer the first proportion and the second proportion of the target page. Based on these two proportions, the mobile phone can then obtain the target sliding strategy that best meets the user's needs in the usage scenario of viewing the target page, improving the user's experience.
[0173] It should be noted that in the second possible scenario, in order to avoid the problem of the sliding process being unsmooth due to frequent changes in the sliding strategy during the sliding of the target page, various implementation manners of S601 can be executed when the user does not perform a sliding operation and the sliding of the target page ends. In this way, the same sliding strategy is adopted for each sliding process of the target page, and the sliding process will be relatively smooth and the user experience is better.
[0174] Of course, the above two possible scenarios, as well as the possible implementation manners in each scenario, are all examples. In practice, the mobile phone can also obtain the first proportion and the second proportion in any feasible manner, and this application does not make specific restrictions on this.
[0175] S602. The mobile phone determines the target sliding strategy based on the first proportion and the second proportion.
[0176] Among them, the target sliding strategy may include a target initial speed gain coefficient and a target friction coefficient.
[0177] In some possible implementation manners, the mobile phone can determine the target initial speed gain coefficient in the target sliding strategy according to the first proportion and the second proportion according to the first preset formula, and determine the target friction coefficient in the target sliding strategy according to the second preset formula.
[0178] Exemplarily, the first preset formula is as follows:
[0179] v = v t *p t +v p*p p ;
[0180] wherein, 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.
[0181] Wherein, the text initial velocity gain refers to the initial velocity gain corresponding to the sliding curve with the best user experience in a pure text scenario obtained through a human factors experiment. The image initial velocity gain refers to the initial velocity gain corresponding to the sliding curve with the best user experience in a pure picture scenario obtained through a human factors experiment.
[0182] Exemplarily, the second preset formula is as follows:
[0183] f = f t *p t + f p *p p ;
[0184] wherein, 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 . Wherein, the text friction coefficient refers to the friction coefficient corresponding to the sliding curve with the best user experience in a pure text scenario obtained through a human factors experiment. The image friction coefficient refers to the friction coefficient corresponding to the sliding curve with the best user experience in a pure picture scenario obtained through a human factors experiment.
[0185] Based on the above first preset formula, it can be obtained that 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. Or it can be said that the 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 correlated with the second ratio.
[0186] S603. The mobile phone responds to the hand-off action of the user's sliding operation on the target page, and controls the target page to slide based on the target sliding strategy.
[0187] After the user performs a swiping operation on the target page and then releases the hand, the mobile phone can obtain a corresponding sliding curve according to the preset sliding curve function based on the target initial speed gain coefficient and the target friction coefficient in the target sliding strategy. Then, the target page can be controlled to slide based on this sliding curve, so as to display the content that is not displayed in the target page. Among them, the sliding direction of the target page is the same as the sliding direction of the swiping operation performed by the user on the target page.
[0188] Based on the technical solution provided in the embodiments of the present application, the target sliding strategy for controlling the target page to slide 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 speed gain coefficient and negatively correlated with the target friction coefficient; the proportion of image content is negatively correlated with the initial speed 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 speed, duration, and distance of the mobile phone controlling the target page to slide based on the target sliding strategy. Specifically, the more text content there is, the greater the initial speed of the target page sliding and the longer the sliding duration; the more image content there is, the smaller the initial speed of the target page sliding and the shorter the sliding duration. In this way, the target sliding strategy for the mobile phone to control the target page to slide can be more in line with the usage scenario when the user views the target page, making the sliding effect of the target page more in line with the user's expectations and improving the user experience.
[0189] It can be understood that, in order to implement the above functions, the above electronic device includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed in this article, the embodiments of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraint conditions of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but this implementation should not be considered to exceed the scope of the embodiments of the present application.
[0190] The embodiments of the present application can divide the above electronic device into function modules according to the above method examples. For example, each function can correspond to each function module, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software function module. It should be noted that the division of modules in the embodiments of the present invention is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0191] In the case of dividing each function module corresponding to each function, refer to Figure 13As shown in the figure, an embodiment of the present application further provides an electronic device, which may include: an acquisition module 1301, a processing module 1302, and a control module 1303.
[0192] Among them, the acquisition module 1301 is configured to acquire 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 processing module 1302 is configured to determine a target sliding strategy based on the first ratio and the second ratio acquired 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 or negatively correlated with the second ratio. The control module 1303 is configured to, in response to the leaving action of the user's sliding operation on the target page, control the target page to slide based on the target sliding strategy determined by the processing module 1302.
[0193] In addition, the cooperation of 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 foregoing embodiments, which will not be elaborated herein.
[0194] Regarding the electronic device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments of the display control method in the foregoing embodiments, and will not be specifically elaborated herein. The related beneficial effects can also refer to the related beneficial effects of the foregoing display control method, which will not be elaborated herein.
[0195] An embodiment of the present application further provides an electronic device, which includes: 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 is caused to execute the display control method provided in the foregoing embodiments. The specific structure of this electronic device can refer to Figure 4 the structure of the electronic device shown in
[0196] An embodiment of the present application further provides a computer-readable storage medium, which includes computer instructions, and when the computer instructions run on an electronic device, the electronic device is caused to execute the display control method provided in the foregoing embodiments.
[0197] An embodiment of the present application further provides a computer program product, which includes executable instructions, and when the computer program product runs on an electronic device, the electronic device is caused to execute the display control method provided in the foregoing embodiments.
[0198] The embodiment of the present application further provides a chip system, as Figure 14 shown. 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 through a line. For example, the interface circuit 1402 can be used to receive signals from other devices (such as the 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).
[0199] Exemplarily, the interface circuit 1402 can read the 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 embodiments can be implemented. Of course, the chip system can also include other discrete devices, and the embodiments of the present application do not make specific limitations thereto.
[0200] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and conciseness of description, only the above division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0201] In several embodiments provided by the present application, it should be understood that the disclosed device / equipment and method can be implemented in other ways. For example, the device / equipment embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0202] The units described as separate components may or may not be physically separated. The components displayed as units can be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0203] In addition, in each embodiment of the present application, the functional units may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0204] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which may be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0205] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope 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 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 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 a leaving action of a sliding operation of the user on the target page.
2. The method according to claim 1, wherein The electronic device obtains the first ratio and the second ratio of the target page, including: The electronic device obtains the view tree of the target page; The electronic device determines a first proportion of the sum of the areas of the corresponding views of all the leaf text view nodes in the view tree 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 according to the feature information of the leaf view nodes in the view tree; 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 uses the first proportion as the first ratio and the second proportion as the second ratio.
3. The method according to claim 2, characterized in that 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.
4. The method according to claim 3, characterized in that 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 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 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 third ratio and the fourth ratio of each second frame when the electronic device displays the target page at the current moment and within a first preset duration 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 frames as the first ratio, and determines the average value of the fourth ratios of all the second frames as the second ratio.
6. The method according to claim 3, characterized in that 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 a first preset duration 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
Cited By
Display control method, electronic device, and storage medium
EP4760473A1
Display control method, electronic device, and storage medium
WO2025138732A1