A method for optimizing data display
By using the blacklist file in the App to compare the unique identification of data and update time, the problem of duplication of data display is solved, the display effect and user experience are improved, and the display priority of new versions of data and the continuity of polling display are ensured. .
Patent Information
- Application Number
- CN202111662966.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the App, the data display issued by the server is prone to repeated display, which affects the user experience and display effect.
By using the blacklist file to compare the unique identification and update time of the data before and after displaying the data, delete or store duplicate data to ensure the uniqueness and updateability of the displayed data, thereby avoiding repeated display.
It effectively avoids repeated display of data, improves the display effect and user experience, ensures the display priority of new versions of data, and clears blacklist files in polling display to prepare for the next round of display.
Smart Images

Figure CN114398323B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer data display, and in particular to a method for optimizing data display. Background Art
[0002] Currently, some pages and windows in the App are used for data display, such as some advertising and promotional display data. These display data are generally sent from the server to the App for display. However, these display data are prone to repeated display. For example, after sending five display data a, b, c, d, and e to the App, the two display data a and b may be played repeatedly, resulting in poor display of other sent display data, which also affects the user experience. Summary of the invention
[0003] 1. Technical issues to be resolved
[0004] In order to solve the above problems in the prior art, the present invention provides a method for optimizing data display to improve the display effect of display data sent by the server.
[0005] (II) Technical solution
[0006] In order to achieve the above object, the technical solution adopted by the present invention is: a method for optimizing data display, comprising:
[0007] S1. Before the server sends the display data for display, the display data is obtained from the server, where the display data is accompanied by a unique identifier and an update time;
[0008] S2. Compare the display data with List data units in the blacklist file in the memory one by one to determine whether there is a List data unit in the blacklist file that is identical to the unique identifier of the display data;
[0009] If it exists, determine whether the update time of the display data is consistent with the update time of the List data unit; if not, delete the List data unit;
[0010] S3, judging whether all the display data exist in the List of the blacklist file according to the unique identifier and update time of the display data, and if so, clearing the List of the blacklist file;
[0011] S4. When the server sends the display data for display, the display data is compared with the List data units in the List in the blacklist file one by one to determine whether there is a List data unit in the List that has the same unique identifier as the display data;
[0012] If it does not exist, then display the display data and store the display data in the List of the blacklist file;
[0013] If it exists, the display data will not be displayed.
[0014] (III) Beneficial effects
[0015] The beneficial effects of the present invention are as follows: before data display, the blacklist file is compared with the display data obtained by the server, and the display data of the old version in the blacklist can be deleted to avoid affecting the display work of the display data of the new version; and when the display data has been stored in the blacklist file, it means that the display file has completed a round of polling display, and the blacklist file can be cleared for the next round of polling display, avoiding the situation where individual display data is repeatedly displayed multiple times, and the display data can be polled for display. When displaying data, the displayed display data can be stored in the blacklist to avoid repeated display of the display data that has been displayed in this polling, thereby ensuring the display effect and user experience of the display data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention is a flowchart of a method for optimizing data display. DETAILED DESCRIPTION
[0017] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.
[0018] Please refer to Figure 1 As shown, a method for optimizing data display includes:
[0019] S1. Before the server sends the display data for display, the display data is obtained from the server, where the display data is accompanied by a unique identifier and an update time;
[0020] S2. Compare the display data with List data units in the blacklist file in the memory one by one to determine whether there is a List data unit in the blacklist file that is identical to the unique identifier of the display data;
[0021] If it exists, determine whether the update time of the display data is consistent with the update time of the List data unit; if not, delete the List data unit;
[0022] S3, judging whether all the display data exist in the List of the blacklist file according to the unique identifier and update time of the display data, and if so, clearing the List of the blacklist file;
[0023] S4. When the server sends the display data for display, the display data is compared with the List data units in the List in the blacklist file one by one to determine whether there is a List data unit in the List that has the same unique identifier as the display data;
[0024] If it does not exist, then display the display data and store the display data in the List of the blacklist file;
[0025] If it exists, the display data will not be displayed.
[0026] From the above description, it can be seen that the beneficial effects of the present invention are: before data display, the blacklist file is compared with the display data obtained by the server, and the old version of the display data in the blacklist can be deleted to avoid affecting the display of the new version of the display data; and when the display data has been stored in the blacklist file, it means that the display file has completed a round of polling display, and the blacklist file can be cleared for the next round of polling display, avoiding the situation where individual display data is repeatedly displayed multiple times, and allowing the display data to be polled and displayed. When displaying data, the displayed display data can be stored in the blacklist to avoid repeated display of the display data that has been displayed in this polling, thereby ensuring the display effect and user experience of the display data.
[0027] Further, if the display data does not exist in S4, then displaying the display data, and storing the display data in the List of the blacklist file includes:
[0028] If not, display the display data, add the display data to the List, and determine whether there is a blacklist file;
[0029] If yes, write the List into the blacklist file;
[0030] If not, a blacklist file is created and the List is written into the blacklist file.
[0031] From the above description, it can be seen that when displaying data during storage, if it is determined that there is no blacklist file, a blacklist file can be automatically created to ensure the normal polling display function of the displayed data.
[0032] Furthermore, the step S1 includes:
[0033] S0. When the App starts, read the local blacklist file, including the following steps:
[0034] S01, determine whether there is sdcard permission;
[0035] If yes, read the file information of the sdcard public directory;
[0036] If not, read the file information of the sdcard cache directory;
[0037] S02, judging whether there is a blacklist file according to the read file information;
[0038] If yes, read the blacklist file and create a List in the blacklist file to store the display data;
[0039] If not, a blacklist file is created in the read directory, and a List is created in the App memory to display the added data.
[0040] From the above description, it can be seen that when the App is started, in the process of reading the local blacklist file, it can judge whether there is sdcard permission to read the file information of the corresponding directory, and perform corresponding actions according to whether there is a blacklist file in the directory, to ensure that the blacklist file and List exist before and during the display operation.
[0041] Embodiment 1
[0042] Please refer to Figure 1 As shown, a method for optimizing data display includes:
[0043] S1. Before the server sends the display data for display, the display data is obtained from the server, where the display data is accompanied by a unique identifier and an update time;
[0044] S2. Compare the display data with List data units in the blacklist file in the memory one by one to determine whether there is a List data unit in the blacklist file that is identical to the unique identifier of the display data;
[0045] If it exists, determine whether the update time of the display data is consistent with the update time of the List data unit; if not, delete the List data unit;
[0046] S3, judging whether all the display data exist in the List of the blacklist file according to the unique identifier and update time of the display data, and if so, clearing the List of the blacklist file;
[0047] S4. When the server sends the display data for display, the display data is compared with the List data units in the List in the blacklist file one by one to determine whether there is a List data unit in the List that has the same unique identifier as the display data;
[0048] If it does not exist, then display the display data and store the display data in the List of the blacklist file;
[0049] If it exists, the display data will not be displayed.
[0050] If the S4 does not exist, then displaying the display data, and storing the display data in the List of the blacklist file includes:
[0051] If not, display the display data, add the display data to the List, and determine whether there is a blacklist file;
[0052] If yes, write the List into the blacklist file;
[0053] If not, a blacklist file is created and the List is written into the blacklist file.
[0054] Wherein, the S1 includes:
[0055] S0. When the App starts, read the local blacklist file, including the following steps:
[0056] S01, determine whether there is sdcard permission;
[0057] If yes, read the file information of the sdcard public directory;
[0058] If not, read the file information of the sdcard cache directory;
[0059] S02, judging whether there is a blacklist file according to the read file information;
[0060] If yes, read the blacklist file and create a List in the blacklist file to store the display data;
[0061] If not, a blacklist file is created in the read directory, and a List is created in the App memory to display the added data.
[0062] In summary, the present invention provides an implementation method for optimizing data display. Before data display, the blacklist file is compared with the display data obtained by the server, and the display data of the old version in the blacklist can be deleted to avoid affecting the display of the new version of the display data; and when the display data has been stored in the blacklist file, it means that the display file has completed a round of polling display, and the blacklist file can be cleared for the next round of polling display, avoiding the situation where individual display data is repeatedly displayed multiple times, and allowing the display data to be polled and displayed. When displaying data, the displayed display data can be stored in the blacklist to avoid repeated display of the display data that has been displayed in this polling, thereby ensuring the display effect and user experience of the display data.
[0063] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for optimizing data display, characterized in that: include: S1. Before the server sends the display data for display, the display data is obtained from the server, where the display data is accompanied by a unique identifier and an update time; S2. Compare the display data with List data units in the blacklist file in the memory one by one to determine whether there is a List data unit in the blacklist file that is identical to the unique identifier of the display data; If it exists, determine whether the update time of the display data is consistent with the update time of the List data unit; if not, delete the List data unit; S3, judging whether all the display data exist in the List of the blacklist file according to the unique identifier and update time of the display data, and if so, clearing the List of the blacklist file; S4. When the server sends the display data for display, the display data is compared with the List data units in the List in the blacklist file one by one to determine whether there is a List data unit in the List that has the same unique identifier as the display data; If it does not exist, then display the display data and store the display data in the List of the blacklist file; If it exists, the display data is not displayed; If the display data does not exist in S4, then displaying the display data and storing the display data in the List of the blacklist file includes: If not, display the display data, add the display data to the List, and determine whether there is a blacklist file; If yes, write the List into the blacklist file; If not, create a blacklist file and write the List into the blacklist file; The S1 previously includes: S0. When the App starts, read the local blacklist file, including the following steps: S01, determine whether there is sdcard permission; If yes, read the file information of the sdcard public directory; If not, read the file information of the sdcard cache directory; S02, judging whether there is a blacklist file according to the read file information; If yes, read the blacklist file and create a List in the blacklist file to store the display data; If not, a blacklist file is created in the read directory, and a List is created in the App memory to display the added data.
Citation Information
Patent Citations
A method and apparatus for document display
CN109213879A
Intelligent television advertisement frequency control system and method
CN109218778A
