Interface data refreshing method, display screen and storage medium
By setting data containers with different refresh intervals on the touch screen and adjusting the refresh interval according to the number of data changes, the problem of inappropriate interface data refresh is solved, CPU resource consumption is reduced, and user experience is improved.
Patent Information
- Application Number
- CN202211399749.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2042-11-09
AI Technical Summary
In existing technologies, the refresh time of touch screen interface data is inappropriate, resulting in unnecessary CPU resource consumption and a degraded user experience, especially when erroneous data is displayed when the data source device is disconnected.
By setting multiple data containers with different refresh intervals, the refresh interval of data on the interface is adjusted according to the number of data changes, data is moved to the appropriate data container in a timely manner, unnecessary refreshes are avoided, and labels are hidden or left empty when data is lost.
It reduces CPU resource consumption, improves the smoothness of touch screen operation, avoids displaying old data on the interface, and enhances the user experience.
Smart Images

Figure CN115599489B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of data refresh, and more particularly to a method for refreshing interface data. Background Technology
[0002] With the widespread use of electronic devices, people obtain most of their information from the interfaces displayed on screens.
[0003] Taking touchscreen displays as an example, a large portion of the current touchscreen interface data refresh is accomplished through timers. These timers are fixed intervals defined in the programming, ensuring all data on the same screen is refreshed simultaneously. However, in actual use, it's found that not all data changes within the same time interval, making such refreshes unnecessary and consuming CPU resources, hindering a smooth touchscreen experience. Secondly, since the UI (user interface) program is written at the initial design stage, if some devices providing data to the touchscreen stop sending data, the touchscreen continues to display that data, degrading the user experience. For example, if the data source device providing voltage detection results has disconnected from the touchscreen, no voltage data is being provided, yet current technology still displays a voltage of 15V on the screen, resulting in inaccurate readings.
[0004] Therefore, how to provide a method that can refresh corresponding data based on the rate of data change is a technical problem that the industry needs to solve. Summary of the Invention
[0005] To address the technical problem of inappropriate refresh time for interface data in existing technologies, this invention proposes a method for refreshing interface data, a display screen, and a storage medium.
[0006] The interface data refresh method proposed in this invention includes:
[0007] Configure multiple data containers with different refresh intervals;
[0008] Write the data that needs to be refreshed on the interface into at least one data container, and refresh the display of the data on the interface based on the refresh time interval of the data container where the data is located.
[0009] Compare whether the number of changes in the data in the data container during the corresponding refresh time interval meets its corresponding preset range;
[0010] If the corresponding preset range is not met, the data will be moved to a data container with a larger or smaller refresh interval, based on the relationship between the number of times the data in the data container changes during the corresponding refresh interval and the size of the preset range corresponding to the data container.
[0011] Furthermore, if the number of changes in the data in the data container is less than the minimum value of the preset range corresponding to the data container, the corresponding data is moved to a data container with a larger refresh interval.
[0012] Furthermore, if the number of changes in the data in the data container during the corresponding refresh interval is greater than the maximum value of the corresponding preset range, then the data whose number of changes is equal to the preset range of the current data container will be moved to a data container with a smaller refresh interval.
[0013] Furthermore, if the number of changes in the data in the data container during the corresponding refresh time interval meets the preset range corresponding to the data container, then the corresponding data will continue to be retained in the data container.
[0014] Furthermore, if the number of changes in the data in the data container with the maximum refresh time interval is less than the minimum value of the preset range corresponding to the current data container, the corresponding data will continue to be retained in the data container.
[0015] Furthermore, if the number of times the data in the data container with the minimum refresh time interval changes during the corresponding refresh time interval is greater than the maximum value of the preset range corresponding to the current data container, the corresponding data will continue to be retained in the data container.
[0016] Furthermore, the preset range is [first maximum number of changes, second maximum number of changes].
[0017] Furthermore, it also includes querying all data in the data container with the largest refresh interval according to the maximum query time. If the corresponding data is not received, the label of the corresponding data on the interface will be hidden or left empty.
[0018] Furthermore, the data container is a data display label table.
[0019] The display screen proposed in this invention includes a controller, which refreshes the interface data of the display screen using the interface data refresh method described in the above technical solution.
[0020] Furthermore, the display screen is a touch display screen.
[0021] The present invention proposes a computer-readable storage medium for storing a computer program, wherein the computer program executes the interface data refresh method described in the above technical solution when running.
[0022] This invention assigns different refresh intervals to data on the same interface by setting data containers (such as data display tab tables) with different refresh intervals. Furthermore, it adjusts the data to the corresponding data display tab table based on the number of data changes, thereby adjusting the data refresh interval in a timely manner. This invention reduces CPU resource consumption by using the same timer to refresh interface data without changing the original display screen or touchscreen interface layout. In a further embodiment, this invention can also proactively clear data display tabs that have lost data sources, preventing old data remaining on the interface from causing information misunderstanding for the user. Attached Figure Description
[0023] The present invention will now be described in detail with reference to the embodiments and accompanying drawings, wherein:
[0024] Figure 1 This is a flowchart of an embodiment of the present invention.
[0025] Figure 2 This is a flowchart of another embodiment of the present invention. Detailed Implementation
[0026] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0027] Therefore, a feature pointed out in this specification is used to describe one feature of one embodiment of the invention, and does not imply that every embodiment of the invention must have the described feature. Furthermore, it should be noted that this specification describes many features. Although certain features may be combined to illustrate possible system designs, these features may also be used in other combinations not explicitly stated. Therefore, unless otherwise stated, the described combinations are not intended to be limiting.
[0028] The interface data refresh method of the present invention is based on the principle of selecting an appropriate refresh time interval according to the speed of data change. Different refresh time intervals correspond to different speeds of data change, thereby avoiding unnecessary refreshes and providing a smooth operating experience for devices such as touch screens.
[0029] The interface data refresh method of the present invention sets multiple data containers with different refresh time intervals, writes the data to be refreshed on the interface into at least one data container, and refreshes the display of the data on the interface based on the refresh time interval of the data container. A fixed time can be set to compare whether the number of changes of the data in the data container in the corresponding refresh time interval meets its corresponding preset range; if it does not meet the corresponding preset range, the data is moved to a data container with a larger or smaller refresh time interval according to the relationship between the number of changes of the data in the data container in the corresponding refresh time interval and the corresponding preset range of the data container.
[0030] If the number of changes in the data in the data container during the corresponding refresh interval is less than the minimum value of the preset range corresponding to the data container, then the corresponding data will be moved to a data container with a larger refresh interval.
[0031] If the number of times the data in the data container changes within the corresponding refresh interval exceeds the maximum value of the preset range of the data container, then the corresponding data will be moved to a data container with a smaller refresh interval.
[0032] If the number of changes in the data in the data container during the corresponding refresh time interval meets the preset range of the data container, then the corresponding data will continue to be retained in the data container.
[0033] In one embodiment, the preset range can be [first maximum number of changes, second maximum number of changes], that is, when it is greater than or equal to the first maximum number of changes and less than the second maximum number of changes, the preset range is satisfied.
[0034] like Figure 1 As shown, the main steps of a basic embodiment of the present invention are described below.
[0035] Step 1: Set multiple data containers with different refresh intervals. Each data container can contain the following: interface number, data label (e.g., the name of the container of the interface that carries the data, such as the name of the button, the name of the content box, etc.), refresh interval (i.e., the refresh interval corresponding to the data container), and first maximum number of changes.
[0036] Step 2: Write the data that needs to be refreshed on the interface into at least one data container, and refresh the display of the data on the interface based on the refresh time interval of the data container.
[0037] Step 3: Determine if the number of changes in the data within the data container during the corresponding refresh interval is less than its corresponding first maximum number of changes, i.e., less than the minimum value within a preset range. It's important to note that data reception and data display do not occur simultaneously; data reception is not equivalent to data display. The actual process is to receive data first, and then display it. Data reception is determined by the send / receive interval, or it can be received in real-time. As long as the data source is sending data, the data is received immediately, thus having one change count. The refresh of the data display on the interface is determined by the refresh interval of the data container containing the data. Taking a data display tab table as an example, if the refresh interval for a data display tab table is once every 3 seconds, and data is received in the first second with a change count of 1, and in the second second with a change count of 2, then the data received in the first second will be refreshed and displayed in the corresponding position on the interface in the third second. The data received in the second second will be refreshed and displayed in the corresponding position on the interface in the sixth second. This example is merely to distinguish between the number of data changes and the data refresh interval, and is not intended to illustrate the inventive concept of this invention. In fact, the data refresh interval in this example is unreasonable relative to its number of changes, and therefore needs to be solved by the technical solution of this invention.
[0038] Step 4: If the number of changes in data within a data container during the corresponding refresh interval is less than its corresponding first maximum number of changes, then the data with a number of changes less than the first maximum number of changes in its current data container is moved to a data container with a larger refresh interval. For example, if the refresh interval of the data display label table is 3 seconds, and its corresponding first maximum number of changes is 1, if data A changes 0 times within 3 seconds (i.e., no data A is received within 3 seconds), then data A needs an increased refresh interval. Therefore, data A can be moved to a data display label table with a larger refresh interval, such as a data display label table with a refresh interval of 5 seconds, thereby achieving the allocation of a reasonable refresh interval for the data.
[0039] The above technical solution describes adjusting the data refresh interval in one direction (the direction of increasing refresh interval) when the number of data changes is relatively small compared to the refresh interval. By moving data with inappropriate refresh intervals to a data display label table with larger refresh intervals, the system load can be reduced.
[0040] In a further embodiment, the interface data refresh method of the present invention may further include steps 5 and 6. In this embodiment, each data container may contain the following: interface number, data label (e.g., the name of the container of the interface carrying the data, such as the name of a button, the name of a content box, etc.), data refresh time interval (i.e., the refresh time interval corresponding to the data container), first maximum number of changes, and second maximum number of changes.
[0041] In the above technical solution, if in step 3 the number of changes in the data in the data container is greater than or equal to its corresponding first maximum number of changes, that is, greater than the maximum value of the preset range, then step 5 is executed to determine the next maximum number of changes (second maximum number of changes).
[0042] Step 5: Determine whether the number of changes in the data in the data container during the corresponding refresh time interval is greater than or equal to the corresponding second maximum number of changes. The second maximum number of changes is greater than the first maximum number of changes.
[0043] Step 6: If so, move data with a change count greater than or equal to the second largest change count in the current data container to a data container with a smaller refresh interval. Moving data with inappropriate refresh intervals to a data container with a smaller refresh interval ensures that data with a faster change count is refreshed promptly, improving the user experience.
[0044] Steps 5 and 6 describe adjusting the data refresh interval in another direction (the direction in which the refresh interval decreases) when the number of data changes is relatively large compared to the refresh interval. In this embodiment, the refresh interval is adjusted in different directions based on the number of data changes within the corresponding refresh interval, thereby finding a more suitable refresh interval for the data.
[0045] For example, if the refresh interval of a data display tab is 3 seconds, and its second maximum number of changes is 2, and data A changes 3 times within 3 seconds (meaning data A is received three times within 3 seconds), exceeding the second maximum number of changes for the data display tab containing data A, then if the refresh interval for data A is not changed promptly, it means that the third received data A will only be displayed after 9 seconds. If data A is continuously received within 9 seconds, the refresh rate of data A will lag significantly behind its changes, resulting in a noticeable display delay and a poor user experience. Therefore, the refresh interval for data A needs to be increased. This can be achieved by moving data A to a data display tab with a shorter refresh interval, such as a data display tab with a refresh interval of 1 second.
[0046] In the above technical solution, assuming that in step 5, the number of changes in the data in the data container during the corresponding refresh time interval is less than the corresponding second maximum number of changes, then the corresponding data will continue to be retained in the data container. Taking data A as an example, the number of changes of data A within 3 seconds should be greater than or equal to the first maximum number of changes and less than the second maximum number of changes. For example, if the number of changes of data A within 3 seconds is 1, it will continue to be retained in the data display label table.
[0047] In the above technical solution, assuming that in step 4, the number of changes of the data in the data container with the largest refresh time interval is still less than the number of changes of its corresponding first maximum change, then there is no data container with a larger refresh time interval than the data container where the data is currently located, and the data will still be retained in the current data container.
[0048] Similarly, in the above technical solution, assuming that in step 6, the number of changes of the data in the data container with the smallest refresh interval is greater than or equal to the number of changes of its corresponding second largest refresh interval, the data will still be retained in the current data container since there is no data container with a smaller refresh interval than the data container where the data is currently located.
[0049] Steps 3 to 6 above can be executed within each refresh interval of each data container (such as a data display label table). In other embodiments, the corresponding steps can also be executed within two or more refresh intervals for each data display label table. For example, for a data display label table with a refresh interval of 3 seconds, the data contained within it can be updated every 3 seconds, moving incompatible data to a data display label table with a more suitable refresh interval. Alternatively, the data can be updated every 6 seconds, 9 seconds, or other times, moving incompatible data to a data display label table with a more suitable refresh interval. For example, if data A typically changes once within 3 seconds, and occasionally changes twice or more within 3 seconds, then determining whether data A needs to be removed from the current data display label table within multiple refresh intervals might, over a longer timeframe, suggest that data A is more suitable to remain in the data display label table. This might cause occasional delays in refresh, but it can significantly reduce the system load. Determining the refresh interval at each refresh interval makes the data refresh interval more accurate, but it also relatively increases the system's decision-making burden.
[0050] In a further embodiment, the interface data refresh method of the present invention further includes step 7.
[0051] Step 7: Query all data in the data container with the largest refresh interval according to the maximum query time. If the corresponding data is not received, hide or leave the label of the corresponding data on the interface empty.
[0052] Taking data A as an example, suppose data A is in the data display label table with the largest refresh interval, and the maximum query time is 1 hour. When querying data A, if data A is not received after 1 hour, the label of the corresponding data on the interface will be hidden or left empty. For example, if data A is displayed through a content box, then the content box corresponding to data A will be hidden or left empty to match the actual reception of data A and avoid misunderstanding of data or information for the user. "Leave empty" is a special term in software page design, which means setting the content of the content box corresponding to data A to null.
[0053] The above embodiments of the present invention can be combined to form more logically complete embodiments, which also fall within the protection scope of the present invention. The steps described above are merely for clearly illustrating the logical concept of the present invention. In reality, some steps are executed only once, such as step 1, while others need to be executed at regular intervals, such as steps 3 and 4. For example, the first execution of step 2 only requires writing and refreshing; thereafter, the data in the data container is refreshed at corresponding time intervals. Furthermore, the execution intervals for each step can be the same or different. For instance, the step comparing the number of data changes with a preset range and the data refresh interval can be the same or different. Therefore, the order of the above steps does not represent the order of steps executed multiple times consecutively in the present invention.
[0054] Figure 2 An embodiment of the present invention is shown, which describes adjusting the data refresh time interval only in one direction (the direction in which the refresh time interval increases).
[0055] Multiple data display labels are set to display different refresh intervals for the current interface. For each data display label, a first maximum number of changes n is set, and a maximum query time Tmax is set.
[0056] All data that needs to be refreshed on the interface is written to the data display tab table. In one embodiment, data can be randomly written to the data display tab table; in another embodiment, all data that needs to be refreshed on the interface can be written to the data display tab table with the shortest refresh interval, i.e., in step 2 of the above embodiment, all data that needs to be refreshed on the interface is written to the data display tab table with the shortest refresh interval. This method is more suitable for... Figure 2This example illustrates a unidirectional adjustment of the data refresh interval. First, all data is refreshed at the fastest refresh rate, and then the refresh interval is adjusted according to the rapid progression of data changes. In other embodiments, data can be assigned to appropriate data display labels based on historical data of data change frequency; this method is more suitable for data with relatively regular change frequencies.
[0057] Within the refresh interval corresponding to the data display label table, obtain the number of times the data changes, N. For example, if the refresh interval of the data display label table is 3 seconds, then obtain the number of times the data changes, N, within this 3-second refresh interval.
[0058] If the number of data changes N is greater than or equal to the first maximum number of changes n, then the data is retained in the current data display label table. Otherwise, the data is moved to a data display label table with a longer refresh interval.
[0059] If none of the data in any of the data display label tables can satisfy N greater than or equal to n, then all the data should be stored in the data display label table with the largest refresh interval.
[0060] The maximum query time Tmax is used to query all data in the data display label table within the maximum refresh time interval. If no corresponding data is received within the maximum query time interval, the label of the corresponding data on the interface is hidden or set to empty.
[0061] In the above embodiments, the data display label table with a larger refresh interval in step 4 is specifically the data display label table with a larger refresh interval adjacent to the data display label table currently containing the data, based on the refresh interval size. For example, three data display label tables are set up with refresh intervals of 1 second, 5 seconds, and 10 seconds, respectively. When data in the data display label table with a refresh interval of 1 second needs to be moved to the data display label table with a larger refresh interval, it is first moved to the data display label table with a refresh interval of 5 seconds, realizing the sequential adjustment of the refresh interval and avoiding disordered adjustment or chaotic adjustment logic.
[0062] Similarly, in the above embodiments, the data display label table with a smaller refresh interval in step 5 is specifically sorted according to the refresh interval size, and is the data display label table with a smaller refresh interval adjacent to the data display label table where the data is currently located. For example, if data in the data display label table with a refresh interval of 10 seconds needs to be moved to the data display label table with a smaller refresh interval, it will be moved to the data display label table with a refresh interval of 5 seconds first, so as to realize the gradual adjustment of the refresh interval and avoid disordered adjustment or chaotic adjustment logic.
[0063] The data containers in all the embodiments of the present invention are described using a data display label table as an example. However, the present invention does not limit the specific form of the data container. In other embodiments, the data container may also adopt other commonly used computer data structures.
[0064] The present invention also protects a display screen, which includes a controller that refreshes the interface data of the display screen using the interface data refresh method of the above-described technical solution.
[0065] The display screen of this invention includes, but is not limited to, a touch display screen.
[0066] The present invention also protects a computer-readable storage medium for storing a computer program that, when executed, performs the interface data refresh method of the above-described technical solution.
[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for refreshing interface data, characterized in that, include: Multiple data containers with different refresh intervals are configured; the data containers are data display tag tables. Write the data that needs to be refreshed on the interface into at least one data container, and refresh the display of the data on the interface based on the refresh time interval of the data container where the data is located. Compare whether the number of changes in the data in the data container during the corresponding refresh time interval meets its corresponding preset range; the preset range is [first maximum number of changes, second maximum number of changes]. If the corresponding preset range is not met, then based on the relationship between the number of times the data in the data container changes during the corresponding refresh time interval and the size of the preset range corresponding to the data container, the data is moved to a data container with a larger or smaller refresh time interval, including at least: If the number of changes in the data in the data container during the corresponding refresh time interval is less than the minimum value of the preset range corresponding to the data container, then the corresponding data is moved to a data container with a larger refresh time interval. If the number of changes in the data in the data container during the corresponding refresh interval exceeds the maximum value of the corresponding preset range, then the corresponding data will be moved to the data container with a smaller refresh interval.
2. The method for refreshing interface data as described in claim 1, characterized in that, If the number of changes in the data in the data container during the corresponding refresh time interval meets the preset range corresponding to the data container, then the corresponding data will continue to be retained in the data container.
3. The method for refreshing interface data as described in claim 1, characterized in that, If the number of changes in the data in the data container with the maximum refresh time interval is less than the minimum value of the preset range corresponding to the current data container, the corresponding data will continue to be retained in the data container.
4. The method for refreshing interface data as described in claim 1, characterized in that, If the number of times the data in the data container with the minimum refresh interval changes during the corresponding refresh interval exceeds the maximum value of the preset range corresponding to the current data container, the corresponding data will continue to be retained in the data container.
5. The method for refreshing interface data as described in any one of claims 1 to 4, characterized in that, Also includes: The system queries all data in the data container with the longest refresh interval based on the maximum query time. If the corresponding data is not received, the label of the corresponding data on the interface is hidden or left blank.
6. A display screen, comprising a controller, characterized in that, The controller refreshes the interface data of the display screen using the interface data refresh method as described in any one of claims 1 to 5.
7. The display screen as described in claim 6, characterized in that, The display screen is a touch screen.
8. A computer-readable storage medium for storing a computer program, characterized in that, The computer program executes the interface data refresh method as described in any one of claims 1 to 5 during runtime.
Citation Information
Patent Citations
Method and device for dynamically refreshing progress bar in multiple data units
CN107273275A
Display control method, display control device, and display device for display panel
CN109272931A
