Page sliding mode adaptation method and device and readable storage medium
By dynamically evaluating the performance of the device processor and configuring a suitable sliding mode, the sliding switching lag and delay problems caused by differences in device computing capabilities in the prior art are solved, and the user experience and processor operation efficiency are improved.
Patent Information
- Application Number
- CN202411729911.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art has failed to effectively adjust the page sliding switching mode according to the computing power differences of the device's main control chip, resulting in lag and delays when sliding the page switching, affecting the user experience.
By obtaining processor identifier information, analyzing core parameters, calculating processor performance values, and configuring a suitable sliding mode according to the performance values. Specifically, it includes configuring the casual sliding mode on devices with higher performance to respond to sliding operations in real time; configuring a limited sliding mode on devices with lower performance to trigger sliding switching only when specific determination conditions are met.
It realizes dynamic adjustment of the sliding mode according to the computing performance of the device processor, which improves the user experience, reduces the computing process of the processor, and improves the running efficiency of the processor. Especially on devices with weak computing performance, the smoothness of sliding switching is increased by more than 50%.
Smart Images

Figure CN119668719A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, specifically to a method, apparatus, and readable storage medium for adapting page scrolling modes. Background Technology
[0002] With the rapid development of mobile device technology, users have increasingly higher demands for the smoothness and responsiveness of interface operations. Currently, most mobile devices on the market use touchscreen-based user interfaces, with page swiping being a common interaction method. However, existing page swiping technologies typically employ a uniform switching mode, failing to fully consider the differences in the computing power of the device's main control chip. Different processors have significantly different computing capabilities, and on devices with weaker computing power, stuttering and lag may occur when swiping to switch pages. Currently, most systems lack the ability to dynamically adjust the swiping switching mode based on the device's computing power, thus impacting the user experience.
[0003] Therefore, there is an urgent need for a method that can dynamically adjust and adapt to different sliding modes based on the different computing performance of the processors on the devices. Summary of the Invention
[0004] In order to solve the problems existing in the prior art, the purpose of this application is to provide a page sliding mode adaptation method, device and readable storage medium, which can dynamically adjust and adapt to different sliding modes according to the computing power of the processor on the device and set different sliding judgment conditions for device screens with different resolutions, thereby improving the user experience.
[0005] To achieve the above objectives, in a first aspect, embodiments of this application provide a page scrolling mode adaptation method, comprising:
[0006] Obtain processor identifier information;
[0007] Parse the core parameters in the processor identifier information, and calculate the first performance value of the processor based on the core parameters;
[0008] Configure the sliding mode based on the processor's first performance value.
[0009] According to the page sliding mode adaptation method of the present invention, after the device is powered on, the self-starting script first obtains the processor identifier information, obtains the first performance value of the processor according to the core parameters parsed from the identifier information and according to the preset calculation formula, and then obtains the sliding mode corresponding to the first performance value of the processor according to the preset range value for configuration. The whole process can be completed quickly on the device, effectively evaluating the computing performance of the embedded device.
[0010] Preferably, the first performance value is obtained using a first formula, which is: First performance value = processor's basic computing power value * architecture weight value.
[0011] Preferably, the core parameters include the number of cores, the core frequency, and the architecture type. The basic computing power value of the processor is obtained using a second formula, which is: Basic computing power value of the processor = Number of cores * Core frequency.
[0012] Preferably, the architecture weight value is a pre-set relative performance value of different architecture types under the same test conditions.
[0013] Preferably, the number of cores refers to the number of physical cores or logical cores of the processor; the core frequency refers to the operating frequency of the processor.
[0014] Preferably, configuring the sliding mode based on the processor's first performance value includes:
[0015] When the first performance value is greater than the first threshold, it is configured to be in the free swipe mode. In the free swipe mode, the page changes are displayed in real time following the hand swipe position, and the processor responds to the swipe and renders in real time.
[0016] When the first performance value is less than or equal to the first threshold, it is configured as a limited sliding mode. In the limited sliding mode, the page changes are slid and rendered according to the hand sliding position and the judgment conditions.
[0017] According to the page sliding mode adaptation method of the present invention, the sliding mode is divided according to the performance value of different processors based on the calculation of core parameters. This enables different sliding modes to be adapted for processors with different performance, so that users can get a suitable sliding switching experience when performing sliding operations on the terminal device display screen. At the same time, the sliding mode corresponds to different processor performance values, which is more in line with the processor's computing power and improves the processor's operating efficiency.
[0018] Preferably, the defined sliding mode specifically includes:
[0019] A square region with a side length of 2R is formed with the starting point of the slide as the center. When the ending point of the slide exceeds the boundary of the square region, the slide action is deemed valid and the slide switch is triggered.
[0020] If the sliding endpoint is located within the boundary of the square area, the sliding action is deemed invalid and the sliding switch is not triggered.
[0021] Preferably, R is obtained using a third formula: R = S * Δ, where S is the number of pixels corresponding to the smaller dimension in the device screen resolution, and Δ is 0.05-0.07.
[0022] Preferably, determining that the swipe action is valid and triggering the swipe switch includes triggering page switching and UI rendering, specifically:
[0023] If the angle between the end point and the beginning point of the slide is (0, 45°) or (315°, 360°), it is determined that the right slide switches the screen.
[0024] The angle between the sliding endpoint and the sliding start point is (45°, 135°), which is determined to be a swipe-up screen switch;
[0025] The angle between the sliding endpoint and the sliding start point is (135°, 225°), which is determined to be a left swipe to switch screens;
[0026] The angle between the sliding endpoint and the sliding start point is (225°, 315°), which is determined to be a sliding screen transition.
[0027] According to the page sliding mode adaptation method of the present invention, by limiting the sliding trigger conditions and rendering conditions, the sliding display screen will only trigger the sliding event after certain set requirements are met, and there will be no page display in the middle of the sliding process, which improves the user experience and reduces the processor's calculation process, thereby improving processing efficiency.
[0028] Secondly, embodiments of this application provide a page scrolling mode adaptation device, comprising:
[0029] The acquisition module is used to acquire processor identifier information;
[0030] The parsing module is used to parse the core parameters in the processor identifier information and calculate the first performance value of the processor based on the core parameters;
[0031] A configuration module is used to configure a sliding mode based on a first performance value of the processor.
[0032] Thirdly, embodiments of this application provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the page sliding mode adaptation method described in any of the first aspects.
[0033] The present invention has the following beneficial effects:
[0034] (1) The page sliding mode adaptation method of this application obtains the core parameters in the processor identification information, evaluates the processor's performance value, and configures a suitable sliding mode according to the evaluation results. The entire process can be completed quickly on the device, effectively evaluating the computing performance of the embedded device. It eliminates the need for manual setting of different sliding modes for devices with different processors, thus improving the intelligent setting and management of the device. It enables the adaptation of different sliding modes for processors with different performance, allowing users to obtain a suitable sliding switching experience when performing sliding operations on the terminal device's display screen. At the same time, the sliding mode corresponds to different processor performance values, which better matches the processor's computing power and improves the processor's operating efficiency.
[0035] (2) The page sliding mode adaptation method of this application, when adapting to the limited sliding mode of processors with lower performance, avoids page chaos caused by the processor's slow response speed failing to achieve real-time response and keep up with the real-time rendering frequency. By limiting the sliding trigger conditions and rendering conditions, the sliding display screen will only trigger the sliding event after certain set requirements are met, and there will be no page display during the sliding process, which improves the user experience and reduces the processor's calculation process, thereby improving processing efficiency.
[0036] (3) The page sliding mode adaptation method of this application was tested on a variety of devices. The results showed that the smoothness of page sliding switching was improved by more than 50% on devices with weak computing performance, which significantly improved the user experience. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating the page sliding mode adaptation method disclosed in an embodiment of the present invention. Figure 1 ;
[0038] Figure 2 This is a flowchart illustrating the page sliding mode adaptation method disclosed in an embodiment of the present invention. Figure 2 ;
[0039] Figure 3 This is a flowchart illustrating the page sliding mode adaptation method disclosed in an embodiment of the present invention. Figure 3 ;
[0040] Figure 4 This is a schematic diagram of the sliding switching angle range of the page sliding mode adaptation method disclosed in the embodiment of the present invention.
[0041] Figure 5 This is a schematic diagram of the page sliding mode adaptation device disclosed in an embodiment of the present invention. Detailed Implementation
[0042] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0043] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0044] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed steps or modules, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The naming or numbering of steps in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved. The division of modules in this application is a logical division; in practical applications, other division methods may be used. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the modules or sub-modules described as separate components may or may not be physically separate, may or may not be physical modules, or may be distributed among multiple circuit modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this application.
[0045] The page sliding mode adaptation method involved in the embodiments of this application is mainly applied to terminal touch screen devices, such as smartphones, smart wearable devices, tablet computers, smart voice interaction devices, etc., and is not limited thereto.
[0046] In this invention, users perform touch operations on the display screen of a terminal device using their fingers. The movement of the finger on the screen corresponds to the swiping and switching of displayed pages. Generally, the swiping or switching of displayed pages is calculated in real time based on the length of the finger's movement on the screen according to a preset conversion strategy. However, existing page swiping and switching technologies typically use a uniform switching mode, failing to fully consider the differences in the computing power of the device's main control chip. Different processors have significantly different computing capabilities, and for devices with weaker computing power, stuttering and latency may occur when swiping and switching pages. Currently, most systems lack the function of dynamically adjusting the swiping and switching mode according to the device's computing power, thus affecting the user experience.
[0047] Therefore, embodiments of this application provide a page scrolling mode adaptation method, please refer to... Figure 1 , Figure 1 This is a flowchart illustrating the page sliding mode adaptation method provided in this application embodiment. The execution entities for each step in the page sliding mode adaptation method can be the same or different.
[0048] In one embodiment, the method may include the following steps:
[0049] Step 11, obtain processor identifier information;
[0050] Step 12: Parse the core parameters in the processor identifier information and calculate the first performance value of the processor based on the core parameters;
[0051] Step 13: Configure the sliding mode according to the first performance value of the processor.
[0052] In this invention, after the device is powered on, the startup script first obtains the processor identifier information. Based on the core parameters parsed from the identifier information, it calculates the processor's first performance value according to a preset formula. Then, it configures the sliding mode corresponding to the processor's first performance value according to a preset range. The entire process can be completed quickly on the device, effectively evaluating the computing performance of the embedded device. This allows for the adaptation of different sliding modes to processors with different performance levels, ensuring a suitable sliding experience for users when performing sliding operations on the terminal device's display screen. Furthermore, the sliding modes correspond to different processor performance values, better matching the processor's computing power and improving its operating efficiency. On devices with strong computing performance, the system can fully utilize hardware performance to provide an exceptional sliding experience; while on devices with weaker computing performance, the system optimizes resource utilization by limiting the range of sliding operations, ensuring stable system operation.
[0053] Preferably, the core parameters include the number of cores, core frequency, and architecture type. This invention indicates processor performance values by setting a calculation relationship between the number of cores, core frequency, and architecture.
[0054] In some embodiments, the core parameters also include the processor model, which can be obtained in the following ways:
[0055] In Linux systems, processor-related information can be obtained by reading the system file / proc / cpuinfo, parsing the file content, and extracting key fields such as processor (core number), CPU MHz (core frequency), and model name (processor model).
[0056] In an RTOS or microcontroller environment, information such as processor model and frequency can be obtained by accessing dedicated hardware registers or system interfaces, or through system interfaces (such as get_cpu_info() or read_core_frequency()).
[0057] The number of processor cores refers to the number of processing cores within the central processing unit, also known as the number of physical cores. Each core is an independent processing unit that can perform calculations simultaneously, thereby improving CPU efficiency. Increasing the number of cores can improve CPU performance and speed because multi-core processors can distribute multiple tasks across different cores for parallel processing. The more cores a CPU has, the more tasks it can handle simultaneously, resulting in higher performance.
[0058] For example, desktop computers and servers often use quad-core or octa-core CPUs, while mobile devices often use dual-core or quad-core CPUs.
[0059] The core frequency (also known as clock speed) of a processor refers to the number of instructions a processor can execute per unit of time. It is typically measured in Hertz (Hz) or gigahertz (GHz). A higher core frequency means more instructions can be executed per second, resulting in faster processing speeds. Processor architecture refers to the design and organization of a computer processor, encompassing its internal structure, data paths, instruction sets, register configuration, memory management, and input / output—a comprehensive reflection of design principles and technologies.
[0060] Processor architecture refers to the design and organization of a computer processor, encompassing a range of design principles and technologies, including its internal structure, data paths, instruction sets, register configuration, memory management, and input / output. Understanding processor architecture helps developers better utilize hardware resources when writing efficient code, and different processor architectures have a decisive impact on processor performance.
[0061] In some embodiments, such as Figure 2 As shown, the first performance value is obtained using the first formula, which is: First performance value = processor's basic computing power value * architecture weight value.
[0062] The processor's basic computing power value is obtained using a second formula, which is: processor's basic computing power value = number of cores * core frequency.
[0063] In this invention, the number of cores refers to the number of physical cores or logical cores of the processor; the core frequency refers to the operating frequency of the processor.
[0064] Preferably, the architecture weight value is a pre-set relative performance value of different architecture types under the same test conditions.
[0065] In this invention, the architecture weight value is a relative performance value of different processor architectures set under the same testing conditions, as exemplified in Table 1:
[0066] Table 1: Weight values for different architectures
[0067] Architecture type weight value RISC-V 1.0 ARM Cortex-M 0.5 ARM Cortex-R5 1.2 ARM Cortex-A 1.5 …… ……
[0068] In the table, the weight value of the RISC-V architecture is set to 1.0, serving as the benchmark for comparison. While ARM Cortex-A and RISC-V perform similarly in some benchmark tests, ARM Cortex-A has an advantage in multitasking, therefore its weight value is set to 1.5. ARM Cortex-A outperforms ARM Cortex-M by more than three times, therefore its weight value is set to 0.5. By applying architecture weights, the performance differences between different architectures can be comprehensively considered, improving the accuracy of computing power assessment.
[0069] It should be noted that the architecture weight in this invention is set as a relative performance ratio based on the performance of processors with different architectures under the same test conditions and the results of actual applications. This value can be changed according to the needs of the application effect.
[0070] Because processors with different performance levels have varying response speeds and processing efficiencies when handling user-generated swipe gestures on the display, the swipe operation effect and user experience differ. Therefore, this invention evaluates the performance of different processors and, based on their actual effects, configures different swipe modes for devices using different processors. This allows the device to execute the most suitable swipe operation response, improving processor response efficiency and user experience.
[0071] Preferably, such as Figure 2 As shown, configuring the sliding mode based on the processor's first performance value includes:
[0072] When the first performance value is greater than the first threshold, it is configured to be in the free swipe mode. In the free swipe mode, the page changes are displayed in real time following the hand swipe position, and the processor responds to the swipe and renders in real time.
[0073] When the first performance value is less than or equal to the first threshold, it is configured as a limited sliding mode. In the limited sliding mode, the page changes are slid and rendered according to the hand sliding position and the judgment conditions.
[0074] In this invention, the first threshold is an empirical critical value, which is set according to the different processor types in the specific applicable system. When the first performance value is greater than the first threshold, the processor's performance is sufficient to adapt to the swipe mode; when the first performance value is less than or equal to the first threshold, the processor's performance in the swipe mode will experience stuttering, switching delays, and errors. Therefore, a limited swipe mode is adapted for the processor.
[0075] Limited swipe mode is designed to prevent situations where slow processor response times lead to page freezes on a non-target screen when a user touches and swipes on the device's display, or where page clutter occurs due to insufficient processing speed to keep up with real-time rendering. In this mode, the swipe event is triggered only after the user swipes the screen for a certain period, and there is no page display during the swipe process. It is suitable for lower-end processors.
[0076] like Figure 3 As shown, the specific limited sliding mode is as follows:
[0077] A square region with a side length of 2R is formed with the starting point of the slide as the center. When the ending point of the slide exceeds the boundary of the square region, the slide action is deemed valid and the slide switch is triggered.
[0078] If the sliding endpoint is located within the boundary of the square area, the sliding action is deemed invalid and the sliding switch is not triggered.
[0079] In this invention, the inventors discovered that in order to avoid device lag caused by low-performance processors frequently calculating and processing sliding operation responses, by limiting the positional relationship between the starting point and the ending point of the user's hand sliding on the display screen, and by determining this positional relationship to decide whether to trigger the sliding response, the processor's sliding response efficiency can be further improved, and the user experience can be enhanced.
[0080] Furthermore, such as Figure 4 As shown, R is obtained using the third formula, which is: R = S * Δ, where S is the number of pixels corresponding to the smaller dimension in the device screen resolution, and Δ is 0.05-0.07.
[0081] In this invention, under the limited sliding mode, the screen resolution parameter is obtained, for example, through the display driver interface. Specifically, in a Linux system, the resolution can be obtained by reading relevant information about the frame buffer device. In an embedded graphics library, the screen resolution can be obtained through library functions. In some embedded systems, the screen resolution may be fixed and stored in a configuration file, which can be read and parsed programmatically. For minimalist embedded systems, if the resolution is fixed and cannot be dynamically obtained through a driver or interface, it can also be defined directly in the code.
[0082] The value of S depends on the shape of the device resolution: if the screen resolution has different lengths and widths, S is the number of pixels corresponding to the smaller dimension of the screen resolution; if the screen resolution has the same length and width, S can be the number of pixels in any dimension of the screen. For example, if the resolution is 1920x1080, then the dimension represented by 1080 pixels is S. Δ is an empirically revised value, obtained through the third formula, which calculates 2R of pixels as the side length to form a square area. Sliding within this square area with a side length of 2R, centered on the sliding start point, does not trigger processor processing or rendering. Sliding is only triggered when the sliding terminal is outside the square area, and page rendering for the changed position only occurs after the sliding is detected to have ended; the screen remains unchanged during the process.
[0083] It should be noted that when using the third formula, R is an integer value rounded down from the calculated result.
[0084] In some embodiments, the user's sliding coordinate position on the touchscreen can be obtained through the lvgl interface, including lv_indev_t*indev=lv_indev_get_act(); lv_indev_get_point(indev,&ext->point_last). The coordinates are written to ext->point_last through the above two interfaces, and then the specific position relationship is determined.
[0085] Preferably, such as Figure 4 As shown, determining that the swipe action is valid and triggering the swipe switch includes triggering page switching and UI rendering, specifically:
[0086] If the angle between the end point and the beginning point of the slide is (0, 45°) or (315°, 360°), it is determined that the right slide switches the screen.
[0087] The angle between the sliding endpoint and the sliding start point is (45°, 135°), which is determined to be a swipe-up screen switch;
[0088] The angle between the sliding endpoint and the sliding start point is (135°, 225°), which is determined to be a left swipe to switch screens;
[0089] The angle between the sliding endpoint and the sliding start point is (225°, 315°), which is determined to be a sliding screen transition.
[0090] In this invention, since the trajectory of horizontal or vertical swiping is not a straight line of 180 degrees, a certain angle value needs to be set to identify the swiping direction. The switching direction of page swiping is determined by the straight-line angle range between the swiping endpoint and the swiping start point. The angle range for switching in different directions is relatively large, which can improve the switching accuracy and facilitate user operation. Meanwhile, unlike the free swipe mode which displays the swiping process in real time, the limited swiping mode only renders the page after the swiping is detected to have ended. The screen does not display any changes during the intermediate process. By determining the swiping position relationship and rendering at the endpoint, the amount of processing time required by the processor is effectively reduced, improving the processor's efficiency.
[0091] Secondly, such as Figure 5 As shown, an embodiment of this application provides a page scrolling mode adaptation device, including:
[0092] 21. Acquisition module, used to acquire processor identifier information;
[0093] 22. Parsing module, used to parse the core parameters in the processor identifier information and calculate the first performance value of the processor based on the core parameters;
[0094] 23. Configuration module, used to configure a sliding mode based on a first performance value of the processor.
[0095] In a further explanation of this invention, the acquisition module is used to first obtain processor identifier information via a startup script after the device is powered on. For example, in a Linux system, this information can be obtained by reading the system file / proc / cpuinfo. In an RTOS or microcontroller environment, information such as processor model and frequency can be obtained by accessing dedicated hardware registers or system interfaces.
[0096] In a further explanation of the present invention, the parsing module, in the process of parsing the core parameters in the processor identifier information and calculating the processor's first performance value based on the core parameters, is specifically used for:
[0097] Read and parse the number of cores, core frequency, and architecture type from the processor identifier information;
[0098] The architecture weight value is set for the processor architecture based on the relative performance values of different architecture types under the same test conditions, which are pre-defined.
[0099] The basic computing power value of the processor is obtained using the second formula, which is: Basic computing power value of processor = Number of cores * Core frequency;
[0100] The first performance value of the processor is obtained using the first formula: First performance value = Basic computing power value of the processor * Architecture weight value;
[0101] In a further explanation of the present invention, the configuration module, in configuring the sliding mode according to the first performance value of the processor, is specifically used for:
[0102] When the first performance value is greater than the first threshold, it is configured to be in the free swipe mode. In the free swipe mode, the page changes are displayed in real time following the hand swipe position, and the processor responds to the swipe and renders in real time.
[0103] When the first performance value is less than or equal to the first threshold, it is configured as a limited sliding mode. In the limited sliding mode, the page changes are slid and rendered according to the hand sliding position and the judgment conditions.
[0104] The specific limited sliding mode is as follows:
[0105] A square region with a side length of 2R is formed with the starting point of the slide as the center. When the ending point of the slide exceeds the boundary of the square region, the slide action is deemed valid and the slide switch is triggered.
[0106] If the sliding endpoint is located within the boundary of the square area, the sliding action is deemed invalid and the sliding switch is not triggered.
[0107] Thirdly, embodiments of this application provide a readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the page sliding mode adaptation method described in any of the first aspects, for example including: obtaining processor identifier information; parsing core parameters in the processor identifier information; calculating a first performance value of the processor based on the core parameters; and configuring a sliding mode based on the first performance value of the processor.
[0108] The readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).
[0109] Example 1
[0110] After device A is powered on, the startup script obtains the processor identifier information and parses the core parameters as follows: number of cores is 4, core frequency is 2.0GHz, architecture type is ARM Cortex-A, and processor model is ARM Cortex-A55.
[0111] The basic computing power value A1 of the processor is calculated according to the second formula, A1 = 4 x 2.0 = 8; according to Table 1, the architecture type ARM Cortex-A is matched in the pre-stored architecture type weight value database, and the weight value of the architecture type ARM Cortex-A is 1.5. Then, the first performance value A2 is calculated according to the first formula, A2 = 8 x 1.5 = 12.
[0112] Based on the empirical value, the preset first threshold is 1.5. A2 is compared with the first threshold, and the result determines that the sliding mode of the device processor is the free sliding mode.
[0113] Example 2
[0114] After device B is powered on, the startup script obtains the processor identifier information and parses the core parameters as follows: number of cores is 1, core frequency is 832MHz, architecture type is ARM Cortex-R5, and processor model is ASR3603C.
[0115] The processor's basic computing power value B1 is calculated according to the second formula, B1 = 1 x 0.832 = 0.832; according to Table 1, the architecture type ARM Cortex-R5 is matched in the pre-stored architecture type weight value database, and the weight value of the architecture type ARM Cortex-R5 is 1.2. Then, the first performance value B2 is calculated according to the first formula, B2 = 0.832 x 1.2 = 0.9984.
[0116] Based on the empirical value, the preset first threshold is 1.5. B2 is compared with the first threshold, and the result determines that the sliding mode of the device processor is the limited sliding mode.
[0117] Determining the swipe trigger range in limited swipe mode:
[0118] The screen resolution of device B is found to be 480x640, meaning S is 480. Δ is selected as 0.06. According to the third formula, R = 480 x 0.06 = 28.8, and R is rounded down to 28. A square area is formed with the sliding starting point as the center and 2R = 56 pixels as the side length.
[0119] After detecting a user's hand swiping on the display screen, the system acquires the coordinates of the starting and ending points of the swipe, determines the distance between them, and if the ending point is within the boundary of the square area, the swipe action is deemed invalid and no swipe switch is triggered; if the ending point exceeds the boundary of the square area, the swipe action is deemed valid and a swipe switch is triggered. Simultaneously, the system acquires the angle range between the ending and starting points of the swipe, and performs a swipe switch according to the mapping relationship between the angle range and the swipe direction. Once the swipe stops, the page is rendered.
[0120] Test case
[0121] I. Test objects: 1. Device B' with the free swipe mode set, 2. Device B with the limited swipe mode set in Example 2.
[0122] Device B' has the same hardware configuration as Device B, with 1 core, a core frequency of 832MHz, an ARM Cortex-R5 architecture, an ASR3603C processor, and a screen resolution of 480*640. Both Device B' and Device B use an RTOS operating system and the LVGL sliding detection library.
[0123] II. Testing Methods:
[0124] 1. Test metrics include:
[0125] 1.1 Page response time: The time from when a finger swipes to when the target page is fully displayed (unit: milliseconds);
[0126] 1.2 CPU utilization: Average CPU utilization (percentage) during the sliding operation;
[0127] 1.3 Frame Rate: The average refresh rate (FPS) of the screen during scrolling;
[0128] 1.4 Subjective fluency rating: Testers rate the fluency based on their experience during the swiping process (0-100 points).
[0129] 2. Test steps:
[0130] Step 1: Load the same test page on device B' and device B;
[0131] Step 2: The tester performs 10 swipes on the screen, each time swiping up from the bottom of the screen to switch pages. Record the following data:
[0132] Page response time: Use system logs to record the time it takes for scroll events to trigger and for the page to complete;
[0133] CPU utilization: Detected using embedded performance monitoring tools;
[0134] Frame rate: Statistically determined using LVGL or equivalent tools;
[0135] Subjective rating: The ratings were completed by 5 test takers, and the average value was taken.
[0136] Step 3: Repeat the test 3 times, take the average value of each indicator, and record the results in Table 2.
[0137] Table 2: Comparison of performance test parameters between device B' and device B
[0138] Test parameters Device B' (Swipe-to-use mode) Device B (Limited Sliding Mode) Increase Page response time 500ms 250ms +50% (reduction) CPU utilization 80% 50% +37.5% (decreased) Frame rate 15FPS 30FPS +100% (Increase) Subjective fluency 60 points 90 points +50% (increase)
[0139] 3. Test Results:
[0140] As shown in Table 2, compared to Device B, Device B' in the free swipe mode experiences increased computation and latency due to the need for real-time rendering of the swipe animation, resulting in longer swipe response times. The frequent UI refreshes during real-time rendering lead to high load, resulting in higher CPU utilization during swipes. Limited computing resources may cause frame rate instability, leading to significant fluctuations. Stuttering in the swipe animation negatively impacts the smoothness of the experience, resulting in a lower subjective user experience rating. Therefore, considering Device B's hardware parameters, using a limited swipe mode can effectively improve the smoothness of swipe transitions and reduce processor computation frequency, thereby improving work efficiency.
[0141] The test results show that the page sliding mode adaptation method of this invention can obtain the core parameters in the processor identification information, evaluate the processor's performance value, and automatically configure a suitable sliding mode according to the evaluation results. The entire process can be completed quickly on the device, effectively evaluating the computing performance of the embedded device. There is no need to manually set different sliding modes for devices with different processors, which improves the intelligent setting and management of the device, effectively saves labor costs, and improves work efficiency.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0143] Finally, it should be noted that the above embodiments are only preferred embodiments of the present invention, and the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A page sliding mode adaptation method, characterized in that: include: Get processor identifier information; Parsing the core parameters in the processor identifier information, and calculating a first performance value of the processor according to the core parameters; A sliding mode is configured according to a first performance value of the processor.
2. The page sliding mode adaptation method according to claim 1, characterized in that: The first performance value is obtained by using a first formula, and the first formula is: first performance value=basic computing capability value of processor*architecture weight value.
3. The page sliding mode adaptation method according to claim 2, characterized in that: The core parameters include the number of cores, core frequency and architecture type. The basic computing capability value of the processor is obtained using a second formula, which is: basic computing capability value of the processor = number of cores * core frequency.
4. The page sliding mode adaptation method according to claim 2, characterized in that: The architecture weight value is a preset relative performance value of different architecture types under the same test conditions.
5. The page sliding mode adaptation method according to claim 3, characterized in that: The core quantity is the number of physical cores or logical cores of the processor; the core frequency is the operating frequency of the processor.
6. The page sliding mode adaptation method according to claim 1, characterized in that: The configuring the sliding mode according to the first performance value of the processor includes: When the first performance value is greater than the first threshold, the user is configured to enter a free-hand sliding mode. In the free-hand sliding mode, page changes are displayed in real time following the hand sliding position, and the processor responds to the sliding and renders in real time. When the first performance value is less than or equal to the first threshold, it is configured as a limited sliding mode. In the limited sliding mode, the page changes are slid and rendered according to the hand sliding position and the judgment conditions.
7. The page sliding mode adaptation method according to claim 6, characterized in that: The limited sliding mode is specifically: A square area with a side length of 2R is formed with the sliding starting point as the center. When the sliding end point exceeds the boundary of the square area, the sliding action is determined to be valid and the sliding switch is triggered; If the sliding end point is within the boundary of the square area, the sliding action is determined to be invalid and the sliding switch is not triggered.
8. The page sliding mode adaptation method according to claim 7, characterized in that: The R is obtained using a third formula, which is: R=S*Δ, where S is the number of pixels corresponding to a smaller dimension in the device screen resolution, and Δ is 0.05-0.
07.
9. The page sliding mode adaptation method according to claim 7, characterized in that: The determining that the sliding action is valid and triggering the sliding switch includes triggering the page switch and UI screen rendering, specifically: If the angle between the sliding end point and the sliding start point is (0, 45°] or (315°, 360°], it is determined as a right swipe to switch screens; The angle between the sliding end point and the sliding start point is (45°, 135°], which is determined as sliding up to switch the screen; The angle between the sliding end point and the sliding start point is (135°, 225°], which is determined as a left swipe to switch screens; The angle interval between the sliding end point and the sliding start point is (225°, 315°], which is determined as a sliding down screen switching.
10. A page sliding mode adaptation device, characterized in that: include: An acquisition module, used for acquiring processor identifier information; A parsing module, configured to parse core parameters in the processor identifier information, and calculate a first performance value of the processor according to the core parameters; A configuration module is used to configure a sliding mode according to a first performance value of the processor.
11. A readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method described in any one of claims 1 to 9 is implemented.