CN110489068B - Data display method and equipment, storage medium and application server thereof - Google Patents
Data display method and equipment, storage medium and application server thereof Download PDFInfo
- Publication number
- CN110489068B CN110489068B CN201810462880.2A CN201810462880A CN110489068B CN 110489068 B CN110489068 B CN 110489068B CN 201810462880 A CN201810462880 A CN 201810462880A CN 110489068 B CN110489068 B CN 110489068B
- Authority
- CN
- China
- Prior art keywords
- data
- application
- application data
- cache
- thread
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Processing Or Creating Images (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The embodiment of the invention discloses a data display method and equipment, a storage medium and an application server thereof, wherein the method comprises the following steps: acquiring a pull instruction of application data in a terminal application interface, and requesting the stored first application data from an application server based on the pull instruction; controlling a first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, and storing the typesetting data into a cache space; and controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data. By adopting the invention, the data can be processed by multiple threads, the fluency of data display is improved, and the user experience is improved.
Description
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a data display method, a device thereof, a storage medium, and an application server.
Background
With the continuous development and improvement of electronic technology, terminals such as mobile phones and tablet computers become an indispensable part of people's lives, and people can communicate with the terminals and can also transmit files, pick up images, play games and the like.
The social application program in the terminal equipment, such as a QQ space, is composed of different data streams of various characters, pictures, videos and the like, and each data stream needs to be measured, laid out and drawn in three stages from loading to displaying, wherein the measurement is the most time-consuming operation in the three stages. The current mainstream scheme is to use the time sequence of the system to operate, that is, pull down to refresh the pull data, trigger measurement and layout when sliding the list, and display characters, pictures and videos through drawing operation. If a simple data stream is loaded, the data stream can be quickly loaded in the terminal equipment, but if some data streams with complex layout are encountered, the main thread of a user can be blocked due to too long measurement, a feeling of blocking can be caused to the user during display, and the experience of the user is reduced.
Disclosure of Invention
Embodiments of the present invention provide a data display method and device, a storage medium, and an application server, which can process data using multiple threads, improve fluency of data display, and improve user experience.
An aspect of an embodiment of the present invention provides a data display method, which may include:
acquiring a pull instruction of application data in a terminal application interface, and requesting the stored first application data from an application server based on the pull instruction;
controlling the first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, and storing the typesetting data into a cache space;
and controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
After the obtaining of the pull instruction for the application data in the terminal application interface and the request of the stored first application data from the application server based on the pull instruction, the method further includes:
and controlling a first thread to acquire cache data of the first application data by adopting the data attribute of the first application data, and storing the cache data of the first application data into a cache space.
The controlling the first thread to obtain the cache data of the first application data by adopting the data attribute of the first application data and store the cache data of the first application data to a cache space includes:
and controlling a first thread to acquire component quantity information corresponding to a component type in the first application data, calculating cache data of the first application data according to the component quantity information and weight data corresponding to the component type, and storing the cache data of the first application data into a cache space.
Wherein, still include:
acquiring an updating instruction of the application data in a terminal application interface, and requesting the stored second application data from an application server based on the updating instruction;
controlling a second thread to acquire verification data of second application data by adopting data attributes of the second application data;
controlling the second thread to acquire cache data from the cache space, and matching the cache data with the check data to acquire a matching result;
and controlling the second thread to acquire the typesetting data corresponding to the first application data in a cache space according to the matching result, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
The controlling the second thread to obtain the typesetting data corresponding to the first application data in a cache space according to the matching result, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data includes:
if the matching result is that the check data is the same as the cache data, controlling a second thread to obtain typesetting data corresponding to the first application data from the cache space, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data;
and if the matching result is that the check data is different from the cache data, controlling a second thread to perform format measurement on the second application data so as to obtain typesetting data corresponding to the second application data, and performing layout display on the second application data by adopting the typesetting data corresponding to the second application data.
After the obtaining of the update instruction for the application data in the terminal application interface and the request of the stored second application data to the application server based on the update instruction, the method further includes:
the method comprises the steps of obtaining a first time label of first application data and a second time label of second application data, and obtaining time interval information of the first time label and the second time label.
Wherein, still include:
and when the time interval information is larger than the time threshold information, determining the second application data as first application data, and performing a step of controlling a first thread to acquire cache data of the first application data by adopting the data attribute of the first application data and storing the cache data of the first application data into a cache space.
Wherein, still include:
and when the time interval information is less than or equal to the time threshold information, executing a step of controlling a second thread to acquire the verification data of the second application data by adopting the data attribute of the second application data.
Wherein, still include:
and when the time interval information is larger than the time threshold information and the matching result is that the check data is the same as the cache data, executing a step of controlling a second thread to acquire typesetting data corresponding to the first application data from the cache space, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
Wherein, still include:
and when the time interval information is larger than time threshold information and the matching result is that the check data is different from the cache data, determining the second application data as first application data, and executing a step of controlling a first thread to acquire the cache data of the first application data by adopting the data attribute of the first application data and storing the cache data of the first application data into a cache space.
An aspect of an embodiment of the present invention provides a data display device, which may include:
the first data request unit is used for acquiring a pull instruction of the application data in a terminal application interface and requesting the stored first application data from an application server based on the pull instruction;
the data measurement unit is used for controlling the first thread to carry out format measurement on the first application data so as to obtain typesetting data corresponding to the first application data, and storing the typesetting data into a cache space;
and the first data display unit is used for controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
Wherein, still include:
the cache data acquisition unit is used for controlling a first thread to acquire the cache data of the first application data by adopting the data attribute of the first application data and storing the cache data of the first application data into a cache space.
The cache data obtaining unit is specifically configured to control a first thread to obtain component quantity information corresponding to a component type in the first application data, calculate cache data of the first application data according to the component quantity information and weight data corresponding to the component type, and store the cache data of the first application data in a cache space.
Wherein, still include:
the second data request unit is used for acquiring an update instruction of the application data in the terminal application interface and requesting the stored second application data from the application server based on the update instruction;
the verification data acquisition unit is used for controlling a second thread to acquire the verification data of the second application data by adopting the data attribute of the second application data;
the data matching unit is used for controlling the second thread to acquire cache data from the cache space and matching the cache data with the check data to acquire a matching result;
and the second data display unit is used for controlling the second thread to acquire the typesetting data corresponding to the first application data in a cache space according to the matching result and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
Wherein the second data display unit is specifically configured to:
if the matching result is that the check data is the same as the cache data, controlling a second thread to obtain typesetting data corresponding to the first application data from the cache space, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data;
and if the matching result is that the check data is different from the cache data, controlling a second thread to perform format measurement on the second application data so as to obtain typesetting data corresponding to the second application data, and performing layout display on the second application data by adopting the typesetting data corresponding to the second application data.
Wherein, still include:
the time tag obtaining unit is used for obtaining a first time tag of first application data and a second time tag of second application data, and obtaining time interval information of the first time tag and the second time tag.
Wherein, still include:
when the time interval information is larger than the time threshold information, the data determining unit determines the second application data as first application data, and the cache data acquiring unit controls the first thread to acquire cache data of the first application data by adopting the data attribute of the first application data and store the cache data of the first application data into a cache space.
Wherein, still include:
and when the time interval information is less than or equal to the time threshold information, the check data acquisition unit controls the second thread to acquire the check data of the second application data by adopting the data attribute of the second application data.
Wherein, still include:
and when the time interval information is larger than the time threshold information and the matching result is that the check data is the same as the cache data, the second data display unit controls the second thread to acquire the typesetting data corresponding to the first application data from the cache space, and layout display is carried out on the second application data by adopting the typesetting data corresponding to the first application data.
Wherein, still include:
when the time interval information is larger than time threshold information and the matching result is that the check data is different from the cache data, the data determining unit determines the second application data as first application data, and the cache data acquiring unit controls a first thread to acquire the cache data of the first application data by adopting the data attribute of the first application data and store the cache data of the first application data into a cache space.
An aspect of the embodiments of the present invention provides a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
An aspect of an embodiment of the present invention provides an application server, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the steps of:
acquiring a pull instruction of application data in a terminal application interface, and requesting the stored first application data from an application server based on the pull instruction;
controlling the first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, and storing the typesetting data into a cache space;
and controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multiple threads to process data, the fluency of data display is improved, and the user experience is well improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data display method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data display method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a data display method according to an embodiment of the present invention;
FIG. 4 is a flow chart of a data display method according to an embodiment of the present invention;
FIG. 5 is a flow chart of a data display method according to an embodiment of the present invention;
FIG. 6 is a flow chart of a data display method according to an embodiment of the present invention;
FIG. 7 is an exemplary diagram of a data display provided by an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a data display device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a data display device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a data display device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a data display device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an application server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The data display method provided by the embodiment of the invention will be described in detail below with reference to fig. 1 to 7.
Referring to fig. 1, a flow chart of a data display method according to an embodiment of the present invention is schematically shown. As shown in fig. 1, the method of the embodiment of the present invention may include the following steps S101 to S103.
S101, a pull instruction for the application data is obtained in a terminal application interface, and the stored first application data is requested to an application server based on the pull instruction.
Optionally, the data display device obtains a pull instruction for the application data in the terminal application interface, and requests the application server for the stored first application data based on the pull instruction, where it can be understood that the data display device obtains the pull instruction for the application data in the terminal application interface, and the data display device may include: terminal equipment with data stream display, such as tablet personal computers, smart phones, Personal Computers (PCs), notebook computers, palm computers, mobile internet equipment (MIDs) and the like, the terminal application interface is an application interface of a terminal application in the terminal, the terminal application can be a social application, a video application, a news media application, the pull instruction is an instruction for acquiring application data when a user enters the terminal application, the trigger condition of the pull instruction can be that the user enters the terminal application for the first time or the user pulls down to refresh and acquire the application data in the terminal application, the application data may comprise text data, picture data, video data, the data display device requests the stored first application data from the application server based on the pull instruction, the application server stores application data to be pulled by a user in a terminal application interface.
S102, controlling a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and storing the typesetting data into a cache space.
Optionally, the data display device controls the first thread to perform format measurement on the first application data to obtain the typesetting data corresponding to the first application data, and stores the typesetting data in the cache space, it is understood that the data display device controls the first thread to perform format measurement on the first application data to obtain the typesetting data corresponding to the first application data, the first thread is a process for processing tasks in the data display device, the data display device may run one process or simultaneously start multiple processes to process different tasks, the format measurement is a typesetting mode for obtaining the first application data according to attributes of various data types in the first application data, the first application data may include text data, picture data, and video data, and the data display device stores the typesetting data in the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
S103, controlling a second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
Optionally, the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performs layout display on the first application data by using the typesetting data corresponding to the first application data, it is understood that the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, the second thread and the first thread are two parallel threads in the data display device, the data display device can simultaneously run the process first thread and the second thread, after the second thread obtains the typesetting data corresponding to the first application data, the data display device adopts the typesetting data corresponding to the first application data to perform layout display on text data, picture data, and text data in the first application data, And laying out the video data and displaying the layout result on the terminal equipment.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multiple threads to process data, the fluency of data display is improved, and the user experience is well improved.
Referring to fig. 2, a flow chart of a data display method according to an embodiment of the invention is shown. As shown in fig. 2, the method of the embodiment of the present invention may include the following steps S201 to S208.
S201, a pull instruction for the application data is obtained in a terminal application interface, and the stored first application data is requested to an application server based on the pull instruction.
S202, controlling a first thread to acquire cache data of first application data by adopting data attributes of the first application data, and storing the cache data of the first application data into a cache space.
Optionally, the data display device controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, and stores the cache data of the first application data in the cache space, where it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the data display device controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, different application data correspond to different cache data, and the data display device stores the cache data of the first application data in the cache space.
Specifically, the data display device controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the text data corresponds to the weight data of the text data, the picture data corresponds to the weight data of the picture data, the data display device controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
S203, controlling a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and storing the typesetting data into a cache space.
S204, controlling a second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
S205, an updating instruction of the application data is obtained in the terminal application interface, and the stored second application data is requested to the application server based on the updating instruction.
Optionally, the data display device obtains an update instruction for the application data in the terminal application interface, and requests the application server for the stored second application data based on the update instruction, it can be understood that the update instruction for the application data is obtained in the terminal application interface, and requests the stored second application data based on the update instruction from the application server, where the terminal application interface may be an application interface of a terminal application such as a social application, a video application, a news media application, and the like, the update instruction is an instruction for a user to obtain the application data in the terminal application for update display, a trigger condition of the update instruction may be that the user pulls down to refresh or clicks to load more, the second application data may include text data, picture data, and video data, and the data display device requests the stored second application data from the application server based on the update instruction, the application server stores application data to be pulled by a user in a terminal application interface.
And S206, controlling the second thread to acquire the verification data of the second application data by adopting the data attribute of the second application data.
Optionally, the data display device controls the second thread to acquire the check data of the second application data by using the data attribute of the second application data, it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data and video data, the second application data includes data of at least one component type, such as text data, picture data and video data, each component type corresponds to a weight data, for example, the weight data of the text data corresponds to the text data, the weight data of the picture data corresponds to the picture data, the data display device controls the second thread to acquire the check data of the second application data by using the data attribute of the second application data, the check data is an identifier corresponding to the second application data, and different application data correspond to different check data, specifically, the data display device controls a second thread to obtain component quantity information corresponding to each component type in the second application data, and obtains verification data of the second application data through a weighting algorithm according to the component quantity information and weight data corresponding to the component type.
And S207, controlling the second thread to acquire cache data from the cache space, and matching the cache data with the check data to acquire a matching result.
Optionally, the data display device controls the second thread to obtain cache data from the cache space, and matches the cache data with the check data to obtain a matching result, where it is understood that the cache data corresponds to first application data, the check data corresponds to second application data, and the data display device controls the second thread to obtain cache data from the cache space, and matches the cache data with the check data, so as to determine whether the first application data and the second application data are the same, and obtain a matching result.
And S208, controlling the second thread to acquire the typesetting data corresponding to the first application data in a cache space according to the matching result, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
Optionally, the data display device controls the second thread to obtain the typesetting data corresponding to the first application data in a cache space according to the matching result, and performs layout display on the second application data by using the typesetting data corresponding to the first application data, it can be understood that the matching result is that the check data is the same as the cache data or the check data is different from the cache data, if the check data is the same as the cache data, it is determined that the first application data is the same as the second application data, the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing a task in the data display device, and the second thread and the first thread are two parallel threads in the data display device, after the second thread acquires the typesetting data corresponding to the first application data, the data display equipment adopts the typesetting data corresponding to the first application data to carry out layout on the character data, the picture data and the video data in the second application data and displays the layout result on the terminal equipment.
Specifically, if the matching result is that the check data is the same as the cache data, the second thread is controlled to obtain the typesetting data corresponding to the first application data from the cache space, and the second application data is subjected to layout display by using the typesetting data corresponding to the first application data.
If the matching result is that the check data is different from the cache data, controlling a second thread to perform format measurement on the second application data to acquire typesetting data corresponding to the second application data, and performing layout display on the second application data by adopting the typesetting data corresponding to the second application data, wherein it can be understood that if the check data is different from the cache data, it is determined that the first application data is different from the second application data, the data display device controls the second thread to perform format measurement on the second application data to acquire the typesetting data corresponding to the second application data, the second thread is a process for processing tasks in the data display device, and the format measurement is a typesetting mode for acquiring the second application data according to attributes of various data types in the second application data, the second application data can comprise character data, picture data and video data, the typesetting data is the typesetting mode of the second application data, the data display equipment adopts the typesetting data corresponding to the second application data to carry out layout display on the second application data, and the typesetting data is directly obtained from the buffer space, so that the process of carrying out format measurement on the application data is reduced, the time for layout display is shortened, and the display efficiency is improved.
Steps S201, S203, and S204 in the embodiment of the present invention refer to specific descriptions of steps S101, S102, and S103 in the embodiment shown in fig. 1, and are not described herein again.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multiple threads to process data, the fluency of data display is improved, the user experience is well improved, the process of format measurement of application data is reduced by directly acquiring typesetting data from the buffer space, the time for layout display is shortened, and the display efficiency is improved.
Referring to fig. 3, a flow chart of a data display method according to an embodiment of the invention is shown. As shown in fig. 3, the method of the embodiment of the present invention may include the following steps S301 to S308.
S301, a pull instruction for the application data is obtained in a terminal application interface, and the stored first application data is requested to an application server based on the pull instruction.
Optionally, the data display device obtains a pull instruction for the application data in the terminal application interface, and requests the application server for the stored first application data based on the pull instruction, where it can be understood that the data display device obtains the pull instruction for the application data in the terminal application interface, and the data display device may include: the terminal equipment comprises a tablet computer, a smart phone, a PC (personal computer), a notebook computer, a palm computer, an MID (mobile Internet device) and the like, wherein the terminal application interface is an application interface of terminal application in a terminal, the terminal application can be social application, video application and news media application, a pull instruction is an instruction for acquiring application data when a user enters the terminal application, a trigger condition of the pull instruction can be that the user enters the terminal application for the first time or the user pulls down and refreshes in the terminal application to acquire the application data, the application data can comprise character data, picture data and video data, the data display equipment requests the stored first application data from an application server based on the pull instruction, and the application server stores the application data to be pulled in the terminal application interface by the user.
S302, controlling a first thread to acquire cache data of first application data by adopting data attributes of the first application data, and storing the cache data of the first application data into a cache space.
Optionally, the data display device controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, and stores the cache data of the first application data in the cache space, where it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the data display device controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, different application data correspond to different cache data, and the data display device stores the cache data of the first application data in the cache space.
Specifically, the data display device controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the text data corresponds to the weight data of the text data, the picture data corresponds to the weight data of the picture data, the data display device controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
S303, controlling a first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, and storing the typesetting data into a cache space.
Optionally, the data display device controls the first thread to perform format measurement on the first application data to obtain the typesetting data corresponding to the first application data, and stores the typesetting data in the cache space, it is understood that the data display device controls the first thread to perform format measurement on the first application data to obtain the typesetting data corresponding to the first application data, the first thread is a process for processing tasks in the data display device, the data display device may run one process or simultaneously start multiple processes to process different tasks, the format measurement is a typesetting mode for obtaining the first application data according to attributes of various data types in the first application data, the first application data may include text data, picture data, and video data, and the data display device stores the typesetting data in the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
S304, controlling a second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
Optionally, the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performs layout display on the first application data by using the typesetting data corresponding to the first application data, it is understood that the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, the second thread and the first thread are two parallel threads in the data display device, the data display device can simultaneously run the process first thread and the second thread, after the second thread obtains the typesetting data corresponding to the first application data, the data display device adopts the typesetting data corresponding to the first application data to perform layout display on text data, picture data, and text data in the first application data, And laying out the video data and displaying the layout result on the terminal equipment.
S305, an updating instruction of the application data is obtained in the terminal application interface, and the stored second application data is requested to the application server based on the updating instruction.
Optionally, the data display device obtains an update instruction for the application data in the terminal application interface, and requests the application server for the stored second application data based on the update instruction, it can be understood that the update instruction for the application data is obtained in the terminal application interface, and requests the stored second application data based on the update instruction from the application server, where the terminal application interface may be an application interface of a terminal application such as a social application, a video application, a news media application, and the like, the update instruction is an instruction for a user to obtain the application data in the terminal application for update display, a trigger condition of the update instruction may be that the user pulls down to refresh or clicks to load more, the second application data may include text data, picture data, and video data, and the data display device requests the stored second application data from the application server based on the update instruction, the application server stores application data to be pulled by a user in a terminal application interface.
S306, acquiring a first time label of the first application data and a second time label of the second application data, and acquiring time interval information of the first time label and the second time label.
Optionally, the data display device obtains a first time tag of the first application data and a second time tag of the second application data, and obtains time interval information of the first time tag and the second time tag, it can be understood that the data display device obtains the first time tag of the first application data and the second time tag of the second application data, the time tags may be time data of pulling the application data by the data display device, or may be time data of displaying the application data by the data display device, the first time tag corresponds to the first application data, the second time tag corresponds to the second application data, the first time tag corresponds to the second time tag, and both the first time tag and the second time tag may be time data of pulling the application data by the data display device, or both the first time tag and the second time tag may be time data of pulling the application data by the data display device, and the data display equipment acquires time interval information according to the first time label and the second time label.
S307, when the time interval information is larger than the time threshold information, determining the second application data as first application data, and performing a step of controlling a first thread to acquire cache data of the first application data by using a data attribute of the first application data, and storing the cache data of the first application data in a cache space.
Optionally, when the time interval information is greater than the time threshold information, the data display device determines the second application data as the first application data, and controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, and stores the cache data of the first application data in the cache space, it can be understood that, when the time interval information is greater than the time threshold information, the data display device determines the second application data as the first application data, the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the data display device controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, and different application data correspond to different cache data, and the data display equipment stores the cache data of the first application data into a cache space.
Specifically, the data display device controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the text data corresponds to the weight data of the text data, the picture data corresponds to the weight data of the picture data, the data display device controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
The data display device controls a first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data and stores the typesetting data into a cache space, and it can be understood that the data display device controls the first thread to perform format measurement on the first application data to acquire the typesetting data corresponding to the first application data, the first thread is a process for processing tasks in the data display device, the data display device can operate one process and can also simultaneously start a plurality of processes to process different tasks, the format measurement is a typesetting mode for acquiring the first application data according to attributes of various data types in the first application data, the first application data can comprise text data, picture data and video data, and the data display device stores the typesetting data into the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
The data display device controls the second thread to acquire the typesetting data corresponding to the first application data from the cache space and adopts the typesetting data corresponding to the first application data to perform layout display on the first application data, and it can be understood that the data display device controls the second thread to acquire the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, the second thread and the first thread are two parallel threads in the data display device, the data display device can simultaneously run the first thread and the second thread, after the second thread acquires the typesetting data corresponding to the first application data, the data display device adopts the typesetting data corresponding to the first application data to perform typesetting display on text data and picture data in the first application data, And laying out the video data and displaying the layout result on the terminal equipment.
S308, when the time interval information is less than or equal to the time threshold information, the step of controlling a second thread to acquire the verification data of the second application data by adopting the data attribute of the second application data is executed.
Optionally, when the time interval information is less than or equal to the time threshold information, the data display device controls the second thread to acquire the check data of the second application data by using the data attribute of the second application data, it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the second application data includes data of at least one component type, such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the text data corresponds to the weight data of the text data, the picture data corresponds to the weight data of the picture data, the data display device controls the second thread to acquire the check data of the second application data by using the data attribute of the second application data, and the check data is an identifier corresponding to the second application data, the different application data correspond to different verification data, specifically, the data display device controls a second thread to obtain component quantity information corresponding to each component type in the second application data, and obtains the verification data of the second application data through a weighting algorithm according to the component quantity information and the weight data corresponding to the component type.
The data display device controls the second thread to obtain cache data from the cache space, matches the cache data with the check data to obtain a matching result, and it can be understood that the cache data corresponds to first application data, the check data corresponds to second application data, and the data display device controls the second thread to obtain the cache data from the cache space, matches the cache data with the check data, and further determines whether the first application data and the second application data are the same, and obtains the matching result.
The data display device controls the second thread to obtain the typesetting data corresponding to the first application data in a cache space according to the matching result, and adopts the typesetting data corresponding to the first application data to perform layout display on the second application data, it can be understood that the matching result is that the check data is the same as the cache data or the check data is different from the cache data, if the check data is the same as the cache data, the first application data is determined to be the same as the second application data, the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, the second thread and the first thread are two parallel threads in the data display device, and after the second thread obtains the typesetting data corresponding to the first application data, the data display equipment adopts the typesetting data corresponding to the first application data to lay out the text data, the picture data and the video data in the second application data and displays the layout result on the terminal equipment, and the cache data is controlled to be updated according to the time interval information, so that the probability of hitting the cache data is improved, and the display efficiency is improved.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multithreading to process the data, the fluency of data display is improved, the experience of a user is well improved, the cache data is controlled to be updated according to the time interval information, the probability of hitting the cache data is improved, and the display efficiency is improved.
Referring to fig. 4, a flow chart of a data display method according to an embodiment of the invention is shown. As shown in fig. 4, the method of the embodiment of the present invention may include the following steps S401 to S408.
S401, a pull instruction for the application data is obtained in a terminal application interface, and the stored first application data is requested to an application server based on the pull instruction.
Optionally, the data display device obtains a pull instruction for the application data in the terminal application interface, and requests the application server for the stored first application data based on the pull instruction, where it can be understood that the data display device obtains the pull instruction for the application data in the terminal application interface, and the data display device may include: the terminal equipment comprises a tablet computer, a smart phone, a PC (personal computer), a notebook computer, a palm computer, an MID (mobile Internet device) and the like, wherein the terminal application interface is an application interface of terminal application in a terminal, the terminal application can be social application, video application and news media application, a pull instruction is an instruction for acquiring application data when a user enters the terminal application, a trigger condition of the pull instruction can be that the user enters the terminal application for the first time or the user pulls down and refreshes in the terminal application to acquire the application data, the application data can comprise character data, picture data and video data, the data display equipment requests the stored first application data from an application server based on the pull instruction, and the application server stores the application data to be pulled in the terminal application interface by the user.
S402, controlling a first thread to acquire cache data of first application data by adopting data attributes of the first application data, and storing the cache data of the first application data into a cache space.
Optionally, the data display device controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, and stores the cache data of the first application data in the cache space, where it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the data display device controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, different application data correspond to different cache data, and the data display device stores the cache data of the first application data in the cache space.
Specifically, the data display device controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the text data corresponds to the weight data of the text data, the picture data corresponds to the weight data of the picture data, the data display device controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
S403, controlling a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and storing the typesetting data into a cache space.
Optionally, the data display device controls the first thread to perform format measurement on the first application data to obtain the typesetting data corresponding to the first application data, and stores the typesetting data in the cache space, it is understood that the data display device controls the first thread to perform format measurement on the first application data to obtain the typesetting data corresponding to the first application data, the first thread is a process for processing tasks in the data display device, the data display device may run one process or simultaneously start multiple processes to process different tasks, the format measurement is a typesetting mode for obtaining the first application data according to attributes of various data types in the first application data, the first application data may include text data, picture data, and video data, and the data display device stores the typesetting data in the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
S404, controlling a second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
Optionally, the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performs layout display on the first application data by using the typesetting data corresponding to the first application data, it is understood that the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, the second thread and the first thread are two parallel threads in the data display device, the data display device can simultaneously run the process first thread and the second thread, after the second thread obtains the typesetting data corresponding to the first application data, the data display device adopts the typesetting data corresponding to the first application data to perform layout display on text data, picture data, and text data in the first application data, And laying out the video data and displaying the layout result on the terminal equipment.
S405, an updating instruction of the application data is obtained in the terminal application interface, and the stored second application data is requested to the application server based on the updating instruction.
Optionally, the data display device obtains an update instruction for the application data in the terminal application interface, and requests the application server for the stored second application data based on the update instruction, it can be understood that the update instruction for the application data is obtained in the terminal application interface, and requests the stored second application data based on the update instruction from the application server, where the terminal application interface may be an application interface of a terminal application such as a social application, a video application, a news media application, and the like, the update instruction is an instruction for a user to obtain the application data in the terminal application for update display, a trigger condition of the update instruction may be that the user pulls down to refresh or clicks to load more, the second application data may include text data, picture data, and video data, and the data display device requests the stored second application data from the application server based on the update instruction, the application server stores application data to be pulled by a user in a terminal application interface.
S406, acquiring a first time label of the first application data and a second time label of the second application data, and acquiring time interval information of the first time label and the second time label.
Optionally, the data display device obtains a first time tag of the first application data and a second time tag of the second application data, and obtains time interval information of the first time tag and the second time tag, it can be understood that the data display device obtains the first time tag of the first application data and the second time tag of the second application data, the time tags may be time data of pulling the application data by the data display device, or may be time data of displaying the application data by the data display device, the first time tag corresponds to the first application data, the second time tag corresponds to the second application data, the first time tag corresponds to the second time tag, and both the first time tag and the second time tag may be time data of pulling the application data by the data display device, or both the first time tag and the second time tag may be time data of pulling the application data by the data display device, and the data display equipment acquires time interval information according to the first time label and the second time label.
S407, when the time interval information is greater than the time threshold information and the matching result is that the check data is the same as the cache data, executing a step of controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
Optionally, when the time interval information is greater than the time threshold information and the matching result is that the check data is the same as the cache data, the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and the second application data is displayed in a layout manner by using the typesetting data corresponding to the first application data, it can be understood that the matching result is that the check data is the same as the cache data or the check data is different from the cache data, if the check data is the same as the cache data, it is determined that the first application data is the same as the second application data, the data display device controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and the second thread is a process for processing a task in the data display device, the second thread and the first thread are two parallel threads in the data display device, after the second thread obtains the typesetting data corresponding to the first application data, the data display device adopts the typesetting data corresponding to the first application data to lay out the text data, the picture data and the video data in the second application data and displays the layout result on the terminal device.
S408, when the time interval information is larger than the time threshold information and the matching result is that the check data is different from the cache data, determining the second application data as the first application data, and performing a step of controlling a first thread to acquire the cache data of the first application data by using the data attribute of the first application data and storing the cache data of the first application data into a cache space.
Optionally, when the time interval information is greater than the time threshold information and the matching result is that the check data is different from the cache data, the data display device determines the second application data as first application data, controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data and stores the cache data of the first application data in the cache space, where it is understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the data display device controls the first thread to acquire the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, and different application data correspond to different cache data, and the data display equipment stores the cache data of the first application data into a cache space.
Specifically, the data display device controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the text data corresponds to the weight data of the text data, the picture data corresponds to the weight data of the picture data, the data display device controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
The data display device controls a first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data and stores the typesetting data into a cache space, and it can be understood that the data display device controls the first thread to perform format measurement on the first application data to acquire the typesetting data corresponding to the first application data, the first thread is a process for processing tasks in the data display device, the data display device can operate one process and can also simultaneously start a plurality of processes to process different tasks, the format measurement is a typesetting mode for acquiring the first application data according to attributes of various data types in the first application data, the first application data can comprise text data, picture data and video data, and the data display device stores the typesetting data into the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
The data display device controls the second thread to acquire the typesetting data corresponding to the first application data from the cache space and adopts the typesetting data corresponding to the first application data to perform layout display on the first application data, and it can be understood that the data display device controls the second thread to acquire the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, the second thread and the first thread are two parallel threads in the data display device, the data display device can simultaneously run the first thread and the second thread, after the second thread acquires the typesetting data corresponding to the first application data, the data display device adopts the typesetting data corresponding to the first application data to perform typesetting display on text data and picture data in the first application data, The video data are distributed, the distribution result is displayed on the terminal equipment, and the cache data are updated according to the time interval information and the verification result of the cache data, so that the probability of hitting the cache data is improved, and the display efficiency is improved.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multithreading to process the data, the fluency of data display is improved, the experience of a user is well improved, the cache data is updated according to the time interval information and the verification result of the cache data, the probability of hitting the cache data is improved, and the display efficiency is improved.
A specific implementation scenario of the data display method according to the embodiment of the present invention will be described below, where the data display method according to the embodiment of the present invention may be applied to data display of a terminal application, where the terminal application may be a social application, a video application, or a news media application, specifically, as shown in fig. 5, a terminal application device obtains a pull instruction for application data in a terminal application interface, requests an application server for stored first application data based on the pull instruction, controls a first thread to obtain cache data of the first application data by using a data attribute of the first application data, stores the cache data of the first application data in a cache space, controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and stores the typesetting data in the cache space, and controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
In a conventional system timing loading scheme, as shown in fig. 6, a terminal application device obtains a pull instruction for application data in a terminal application interface, requests an application server for stored first application data based on the pull instruction, controls a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and performs layout display on the first application data by using the typesetting data corresponding to the first application data.
Specifically, comparing the present invention with the conventional system time sequence loading scheme with reference to fig. 7, the left image in fig. 7 is the display result of the present invention, and the right image is the display result of the conventional system time sequence loading scheme, and for a partially complicated squared figure data stream, the present invention is displayed more smoothly compared with the conventional system time sequence loading scheme.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multiple threads to process data, the fluency of data display is improved, and the user experience is well improved.
Hereinafter, a data display device according to an embodiment of the present invention will be described in detail with reference to fig. 8 to 11. It should be noted that the apparatuses shown in fig. 8-11 are used for executing the method according to the embodiments of the present invention shown in fig. 1-7, and for convenience of description, only the parts related to the embodiments of the present invention are shown, and details of the technology are not disclosed, please refer to the embodiments of the present invention shown in fig. 1-7.
Referring to fig. 8, a schematic structural diagram of a data display device according to an embodiment of the present invention is provided. As shown in fig. 8, the data display device 1 according to the embodiment of the present invention may include: a first data request unit 11, a data measurement unit 12, and a first data display unit 13.
The first data requesting unit 11 is configured to obtain a pull instruction for the application data in the terminal application interface, and request the stored first application data from the application server based on the pull instruction.
Optionally, the first data requesting unit 11 obtains a pull instruction for the application data in a terminal application interface, and requests the application server for the stored first application data based on the pull instruction, it is understood that the first data requesting unit 11 obtains the pull instruction for the application data in the terminal application interface, the terminal application interface is an application interface of a terminal application in the terminal, the terminal application may be a social application, a video application, or a news media application, the pull instruction is an instruction for obtaining the application data when the user enters the terminal application, the trigger condition of the pull instruction may be that the user first enters the terminal application or the user pulls down to refresh and obtain the application data in the terminal application, the application data may include text data, picture data, and video data, the first data requesting unit 11 requests the application server for the stored first application data based on the pull instruction, the application server stores application data to be pulled by a user in a terminal application interface.
The data measurement unit 12 is configured to control a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and store the typesetting data in a cache space.
Optionally, the data measurement unit 12 controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and stores the typesetting data in a cache space, it is understood that the data measurement unit 12 controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, the first thread is a process of processing tasks in a data display device, the data display device can run one process or simultaneously start multiple processes to process different tasks, the format measurement is a typesetting mode of the first application data according to attributes of various data types in the first application data, the first application data may include text data, picture data, and video data, and the data measurement unit 12 stores the typesetting data in the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
And the first data display unit 13 is configured to control the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and perform layout display on the first application data by using the typesetting data corresponding to the first application data.
Optionally, the first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performs layout display on the first application data by using the typesetting data corresponding to the first application data, it can be understood that the first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing a task in the data display device, the second thread and the first thread are two parallel threads in the data display device, the data display device can simultaneously run a first thread and a second thread, after the second thread obtains the typesetting data corresponding to the first application data, the first data display unit 13 adopts the typesetting data corresponding to the first application data to the text data in the first application data, And laying out the picture data and the video data and displaying the layout result on the terminal equipment.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multiple threads to process data, the fluency of data display is improved, and the user experience is well improved.
Fig. 9 is a schematic structural diagram of a data display device according to an embodiment of the present invention. As shown in fig. 9, the data display device 1 according to the embodiment of the present invention may include: the system comprises a first data request unit 11, a data measurement unit 12, a first data display unit 13, a cache data acquisition unit 14, a second data request unit 15, a verification data acquisition unit 16, a data matching unit 17 and a second data display unit 18.
The first data requesting unit 11 is configured to obtain a pull instruction for the application data in the terminal application interface, and request the stored first application data from the application server based on the pull instruction.
The cache data obtaining unit 14 is configured to control the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and store the cache data of the first application data in the cache space.
Optionally, the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and stores the cache data of the first application data in the cache space, where it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, different application data correspond to different cache data, and the data display device stores the cache data of the first application data in the cache space.
Specifically, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the weight data of the text data corresponds to the text data, the weight data of the picture data corresponds to the picture data, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
The data measurement unit 12 is configured to control a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and store the typesetting data in a cache space.
And the first data display unit 13 is configured to control the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and perform layout display on the first application data by using the typesetting data corresponding to the first application data.
And a second data requesting unit 15, configured to obtain an update instruction for the application data in the terminal application interface, and request the stored second application data from the application server based on the update instruction.
Optionally, the second data requesting unit 15 obtains an update instruction for the application data in the terminal application interface, and requests the stored second application data from the application server based on the update instruction, it is understood that the second data requesting unit 15 obtains the update instruction for the application data in the terminal application interface, and requests the stored second application data from the application server based on the update instruction, the terminal application interface may be an application interface of a terminal application such as a social application, a video application, a news media application, etc., the update instruction is an instruction for a user to obtain and update and display the application data in the terminal application, a trigger condition of the update instruction may be user pull-down refresh or click-to-load more, the second application data may include text data, picture data, and video data, the second data requesting unit 15 requests the stored second application data from the application server based on the update instruction, the application server stores application data to be pulled by a user in a terminal application interface.
And the check data acquisition unit 16 is configured to control the second thread to acquire the check data of the second application data by using the data attribute of the second application data.
Optionally, the check data obtaining unit 16 controls the second thread to obtain the check data of the second application data by using the data attribute of the second application data, it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data and video data, the second application data includes data of at least one component type such as text data, picture data and video data, each component type corresponds to a weight data, for example, the text data corresponds to the weight data of the text data, the picture data corresponds to the weight data of the picture data, the check data obtaining unit 16 controls the second thread to obtain the check data of the second application data by using the data attribute of the second application data, the check data is an identifier corresponding to the second application data, and different application data correspond to different check data, specifically, the verification data obtaining unit 16 controls a second thread to obtain component quantity information corresponding to each component type in the second application data, and obtains the verification data of the second application data through a weighting algorithm according to the component quantity information and the weight data corresponding to the component type.
And a data matching unit 17, configured to control the second thread to obtain cache data from the cache space, and match the cache data with the check data to obtain a matching result.
Optionally, the data matching unit 17 controls the second thread to obtain cache data from the cache space, and matches the cache data with the check data to obtain a matching result, it can be understood that the cache data corresponds to first application data, the check data corresponds to second application data, and the data matching unit 17 controls the second thread to obtain cache data from the cache space, and matches the cache data with the check data, so as to determine whether the first application data and the second application data are the same, and obtain the matching result.
And a second data display unit 18, configured to control the second thread to obtain the typesetting data corresponding to the first application data in a cache space according to the matching result, and perform layout display on the second application data by using the typesetting data corresponding to the first application data.
Optionally, the second data display unit 18 controls the second thread to obtain the typesetting data corresponding to the first application data in a cache space according to the matching result, and performs layout display on the second application data by using the typesetting data corresponding to the first application data, it can be understood that the matching result is that the check data is the same as the cache data or the check data is different from the cache data, if the check data is the same as the cache data, it is determined that the first application data is the same as the second application data, the second data display unit 18 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, and the second thread and the first thread are two parallel threads in the data display device, after the second thread acquires the typesetting data corresponding to the first application data, the second data display unit 18 lays out the text data, the picture data and the video data in the second application data by using the typesetting data corresponding to the first application data and displays the layout result on the terminal device.
Specifically, if the matching result is that the check data is the same as the cache data, the second thread is controlled to obtain the typesetting data corresponding to the first application data from the cache space, and the second application data is subjected to layout display by using the typesetting data corresponding to the first application data, it can be understood that, if the check data is the same as the cache data, it is determined that the first application data is the same as the second application data, the second data display unit 18 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and the second application data is subjected to layout display by using the typesetting data corresponding to the first application data.
If the matching result is that the check data is different from the cache data, controlling a second thread to perform format measurement on the second application data to acquire typesetting data corresponding to the second application data, and performing layout display on the second application data by using the typesetting data corresponding to the second application data, wherein it can be understood that if the check data is different from the cache data, it is determined that the first application data is different from the second application data, the second data display unit 18 controls the second thread to perform format measurement on the second application data to acquire typesetting data corresponding to the second application data, the second thread is a process for processing tasks in the data display device, and the format measurement is a typesetting mode for acquiring the second application data according to attributes of various data types in the second application data, the second application data may include text data, picture data, and video data, the composition data is a composition mode of the second application data, the second data display unit 18 performs layout display on the second application data by using the composition data corresponding to the second application data, and the composition data is directly obtained from the buffer space, thereby reducing a process of performing format measurement on the application data, shortening a time for the layout display, and improving display efficiency.
In the steps of the embodiment of the present invention, the first data requesting unit 11, the data measuring unit 12, and the first data displaying unit 13 refer to the specific description of the embodiment shown in fig. 8, which is not repeated herein.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multiple threads to process data, the fluency of data display is improved, the user experience is well improved, the process of format measurement of application data is reduced by directly acquiring typesetting data from the buffer space, the time for layout display is shortened, and the display efficiency is improved.
Fig. 10 is a schematic structural diagram of a data display device according to an embodiment of the present invention. As shown in fig. 10, the data display device 1 according to the embodiment of the present invention may include: the system comprises a first data request unit 11, a data measurement unit 12, a first data display unit 13, a cache data acquisition unit 14, a second data request unit 15, a verification data acquisition unit 16, a data matching unit 17, a second data display unit 18, a time tag acquisition unit 19 and a data determination unit 20.
The first data requesting unit 11 is configured to obtain a pull instruction for the application data in the terminal application interface, and request the stored first application data from the application server based on the pull instruction.
Optionally, the first data requesting unit 11 obtains a pull instruction for the application data in a terminal application interface, and requests the application server for the stored first application data based on the pull instruction, it is understood that the first data requesting unit 11 obtains the pull instruction for the application data in the terminal application interface, the terminal application interface is an application interface of a terminal application in the terminal, the terminal application may be a social application, a video application, or a news media application, the pull instruction is an instruction for obtaining the application data when the user enters the terminal application, the trigger condition of the pull instruction may be that the user first enters the terminal application or the user pulls down to refresh and obtain the application data in the terminal application, the application data may include text data, picture data, and video data, the first data requesting unit 11 requests the application server for the stored first application data based on the pull instruction, the application server stores application data to be pulled by a user in a terminal application interface.
The cache data obtaining unit 14 is configured to control the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and store the cache data of the first application data in the cache space.
Optionally, the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and stores the cache data of the first application data in the cache space, where it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, different application data correspond to different cache data, and the cache data obtaining unit 14 stores the cache data of the first application data in the cache space.
Specifically, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the weight data of the text data corresponds to the text data, the weight data of the picture data corresponds to the picture data, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
The data measurement unit 12 is configured to control a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and store the typesetting data in a cache space.
Optionally, the data measurement unit 12 controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and stores the typesetting data in a cache space, it is understood that the data measurement unit 12 controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, the first thread is a process of processing tasks in a data display device, the data display device can run one process or simultaneously start multiple processes to process different tasks, the format measurement is a typesetting mode of the first application data according to attributes of various data types in the first application data, the first application data may include text data, picture data, and video data, and the data measurement unit 12 stores the typesetting data in the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
And the first data display unit 13 is configured to control the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and perform layout display on the first application data by using the typesetting data corresponding to the first application data.
Optionally, the first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performs layout display on the first application data by using the typesetting data corresponding to the first application data, it can be understood that the first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing a task in the data display device, the second thread and the first thread are two parallel threads in the data display device, the data display device can simultaneously run a first thread and a second thread, after the second thread obtains the typesetting data corresponding to the first application data, the first data display unit 13 adopts the typesetting data corresponding to the first application data to the text data in the first application data, And laying out the picture data and the video data and displaying the layout result on the terminal equipment.
And a second data requesting unit 15, configured to obtain an update instruction for the application data in the terminal application interface, and request the stored second application data from the application server based on the update instruction.
Optionally, the second data requesting unit 15 obtains an update instruction for the application data in the terminal application interface, and requests the stored second application data from the application server based on the update instruction, it is understood that the second data requesting unit 15 obtains the update instruction for the application data in the terminal application interface, and requests the stored second application data from the application server based on the update instruction, the terminal application interface may be an application interface of a terminal application such as a social application, a video application, a news media application, etc., the update instruction is an instruction for a user to obtain and update and display the application data in the terminal application, a trigger condition of the update instruction may be user pull-down refresh or click-to-load more, the second application data may include text data, picture data, and video data, the second data requesting unit 15 requests the stored second application data from the application server based on the update instruction, the application server stores application data to be pulled by a user in a terminal application interface.
The time tag obtaining unit 19 is configured to obtain a first time tag of the first application data and a second time tag of the second application data, and obtain time interval information of the first time tag and the second time tag.
Optionally, the time tag obtaining unit 19 obtains a first time tag of the first application data and a second time tag of the second application data, and obtains time interval information of the first time tag and the second time tag, it is understood that the time tag obtaining unit 19 obtains the first time tag of the first application data and the second time tag of the second application data, the time tags may be time data of pulling the application data by the data display device, or may be time data of displaying the application data by the data display device, the first time tag corresponds to the first application data, the second time tag corresponds to the second application data, the first time tag corresponds to the second time tag, and may be the same time data of pulling the application data by the data display device, or may simultaneously display the time data of the application data by the data display device, the time stamp obtaining unit 19 obtains time interval information according to the first time stamp and the second time stamp.
A data determining unit 20, configured to determine the second application data as the first application data when the time interval information is greater than the time threshold information, and perform a step of controlling the first thread to acquire the cache data of the first application data by using the data attribute of the first application data by using the cache data acquiring unit 14, and store the cache data of the first application data in a cache space.
Optionally, when the time interval information is greater than the time threshold information, the data determining unit 20 determines the second application data as the first application data, and the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and store the cache data of the first application data in the cache space, it is understood that, when the time interval information is greater than the time threshold information, the data determining unit 20 determines the second application data as the first application data, the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, and the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, different application data correspond to different cache data, and the data display device stores the cache data of the first application data into a cache space.
Specifically, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the weight data of the text data corresponds to the text data, the weight data of the picture data corresponds to the picture data, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
The data measurement unit 12 controls a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and stores the typesetting data in a cache space, it is understood that the data measurement unit 12 controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, the first thread is a process for processing tasks in a data display device, the data display device can run one process or simultaneously start multiple processes to process different tasks, the format measurement is a typesetting mode for obtaining the first application data according to attributes of various data types in the first application data, the first application data may include text data, picture data, and video data, and the data measurement unit 12 stores the typesetting data in the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
The first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and the typesetting data corresponding to the first application data is adopted to perform layout display on the first application data, it can be understood that the first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, the second thread and the first thread are two parallel typesetting threads in the data display device, the data display device can simultaneously run a first thread and a second thread, after the second thread obtains the typesetting data corresponding to the first application data, the first data display unit 13 adopts the typesetting data corresponding to the first application data to perform layout display on the text data in the first application data, And laying out the picture data and the video data and displaying the layout result on the terminal equipment.
And a check data obtaining unit 16, configured to, when the time interval information is smaller than or equal to the time threshold information, shift to a step of controlling a second thread to obtain check data of second application data by using a data attribute of the second application data.
Optionally, when the time interval information is less than or equal to the time threshold information, the check data obtaining unit 16 controls the second thread to obtain the check data of the second application data by using the data attribute of the second application data, it is understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the second application data includes data of at least one component type, such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the weight data of the text data corresponds to the weight data of the text data, the picture data corresponds to the weight data of the picture data, the check data obtaining unit 16 controls the second thread to obtain the check data of the second application data by using the data attribute of the second application data, and the check data is an identifier corresponding to the second application data, the different application data correspond to different verification data, specifically, the verification data obtaining unit 16 controls a second thread to obtain component quantity information corresponding to each component type in the second application data, and obtains the verification data of the second application data through a weighting algorithm according to the component quantity information and the weight data corresponding to the component type.
The data matching unit 17 controls the second thread to obtain cache data from the cache space, and matches the cache data with the check data to obtain a matching result, it can be understood that the cache data corresponds to first application data, the check data corresponds to second application data, and the data matching unit 17 controls the second thread to obtain cache data from the cache space, and matches the cache data with the check data, thereby determining whether the first application data and the second application data are the same, and obtaining a matching result.
The second data display unit 18 controls the second thread to obtain the typesetting data corresponding to the first application data in a cache space according to the matching result, and performs layout display on the second application data by using the typesetting data corresponding to the first application data, it can be understood that the matching result is that the check data is the same as the cache data or the check data is different from the cache data, if the check data is the same as the cache data, it is determined that the first application data is the same as the second application data, the second data display unit 18 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, and the second thread and the first thread are two parallel threads in the data display device, after the second thread acquires the typesetting data corresponding to the first application data, the second data display unit 18 performs layout on the text data, the picture data and the video data in the second application data by using the typesetting data corresponding to the first application data and displays the layout result on the terminal device, and updates the cache data according to the time interval information, so that the probability of hitting the cache data is improved, and the display efficiency is improved.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multithreading to process the data, the fluency of data display is improved, the experience of a user is well improved, the cache data is controlled to be updated according to the time interval information, the probability of hitting the cache data is improved, and the display efficiency is improved.
Fig. 11 is a schematic structural diagram of a data display device according to an embodiment of the present invention. As shown in fig. 11, the data display device 1 according to the embodiment of the present invention may include: the system comprises a first data request unit 11, a data measurement unit 12, a first data display unit 13, a cache data acquisition unit 14, a second data request unit 15, a verification data acquisition unit 16, a data matching unit 17, a second data display unit 18, a time tag acquisition unit 19 and a data determination unit 20.
The first data requesting unit 11 is configured to obtain a pull instruction for the application data in the terminal application interface, and request the stored first application data from the application server based on the pull instruction.
Optionally, the first data requesting unit 11 obtains a pull instruction for the application data in a terminal application interface, and requests the application server for the stored first application data based on the pull instruction, it is understood that the first data requesting unit 11 obtains the pull instruction for the application data in the terminal application interface, the terminal application interface is an application interface of a terminal application in the terminal, the terminal application may be a social application, a video application, or a news media application, the pull instruction is an instruction for obtaining the application data when the user enters the terminal application, the trigger condition of the pull instruction may be that the user first enters the terminal application or the user pulls down to refresh and obtain the application data in the terminal application, the application data may include text data, picture data, and video data, the first data requesting unit 11 requests the application server for the stored first application data based on the pull instruction, the application server stores application data to be pulled by a user in a terminal application interface.
The cache data obtaining unit 14 is configured to control the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and store the cache data of the first application data in the cache space.
Optionally, the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and stores the cache data of the first application data in the cache space, where it can be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data, and video data, the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, the cache data is an identifier corresponding to the first application data, different application data correspond to different cache data, and the data display device stores the cache data of the first application data in the cache space.
Specifically, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the weight data of the text data corresponds to the text data, the weight data of the picture data corresponds to the picture data, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
The data measurement unit 12 is configured to control a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and store the typesetting data in a cache space.
Optionally, the data measurement unit 12 controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and stores the typesetting data in a cache space, it is understood that the data measurement unit 12 controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, the first thread is a process of processing tasks in a data display device, the data display device can run one process or simultaneously start multiple processes to process different tasks, the format measurement is a typesetting mode of the first application data according to attributes of various data types in the first application data, the first application data may include text data, picture data, and video data, and the data measurement unit 12 stores the typesetting data in the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
And the first data display unit 13 is configured to control the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and perform layout display on the first application data by using the typesetting data corresponding to the first application data.
Optionally, the first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and performs layout display on the first application data by using the typesetting data corresponding to the first application data, it can be understood that the first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing a task in the data display device, the second thread and the first thread are two parallel threads in the data display device, the data display device can simultaneously run a first thread and a second thread, after the second thread obtains the typesetting data corresponding to the first application data, the first data display unit 13 adopts the typesetting data corresponding to the first application data to the text data in the first application data, And laying out the picture data and the video data and displaying the layout result on the terminal equipment.
And a second data requesting unit 15, configured to obtain an update instruction for the application data in the terminal application interface, and request the stored second application data from the application server based on the update instruction.
Optionally, the second data requesting unit 15 obtains an update instruction for the application data in the terminal application interface, and requests the stored second application data from the application server based on the update instruction, it is understood that the second data requesting unit 15 obtains the update instruction for the application data in the terminal application interface, and requests the stored second application data from the application server based on the update instruction, the terminal application interface may be an application interface of a terminal application such as a social application, a video application, a news media application, etc., the update instruction is an instruction for a user to obtain and update and display the application data in the terminal application, a trigger condition of the update instruction may be user pull-down refresh or click-to-load more, the second application data may include text data, picture data, and video data, the second data requesting unit 15 requests the stored second application data from the application server based on the update instruction, the application server stores application data to be pulled by a user in a terminal application interface.
The time tag obtaining unit 19 is configured to obtain a first time tag of the first application data and a second time tag of the second application data, and obtain time interval information of the first time tag and the second time tag.
Optionally, the time tag obtaining unit 19 obtains a first time tag of the first application data and a second time tag of the second application data, and obtains time interval information of the first time tag and the second time tag, it is understood that the time tag obtaining unit 19 obtains the first time tag of the first application data and the second time tag of the second application data, the time tags may be time data of pulling the application data by the data display device, or may be time data of displaying the application data by the data display device, the first time tag corresponds to the first application data, the second time tag corresponds to the second application data, the first time tag corresponds to the second time tag, and may be the same time data of pulling the application data by the data display device, or may simultaneously display the time data of the application data by the data display device, the time stamp obtaining unit 19 obtains time interval information according to the first time stamp and the second time stamp.
And a second data display unit 18, configured to, when the time interval information is greater than the time threshold information and the matching result is that the check data is the same as the cache data, switch to executing a step of controlling a second thread to obtain the layout data corresponding to the first application data from the cache space, and perform layout display on the second application data by using the layout data corresponding to the first application data.
Optionally, when the time interval information is greater than the time threshold information and the matching result is that the check data is identical to the cache data, the second data display unit 18 controls the second thread to obtain the composition data corresponding to the first application data from the cache space, and the composition data corresponding to the first application data is used to perform layout display on the second application data, it can be understood that the matching result is that the check data is identical to the cache data or the check data is not identical to the cache data, if the check data is identical to the cache data, it is determined that the first application data is identical to the second application data, the second data display unit 18 controls the second thread to obtain the composition data corresponding to the first application data from the cache space, and the second thread is a process for processing a task in the data display device, the second thread and the first thread are two parallel threads in a data display device, after the second thread obtains the typesetting data corresponding to the first application data, the second data display unit 18 adopts the typesetting data corresponding to the first application data to layout the text data, the picture data and the video data in the second application data and displays the layout result on the terminal device.
And a data determining unit 20, configured to determine the second application data as the first application data when the time interval information is greater than the time threshold information and the matching result is that the check data is different from the cache data, and perform a step of executing a cache data obtaining unit 14 to control the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and store the cache data of the first application data in a cache space.
Optionally, when the time interval information is greater than the time threshold information and the matching result is that the check data is different from the cache data, the data determining unit 20 determines the second application data as the first application data, the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data and store the cache data of the first application data in the cache space, it may be understood that the data attribute includes a data type and a number corresponding to the data type, the data type includes text data, picture data and video data, the cache data obtaining unit 14 controls the first thread to obtain the cache data of the first application data by using the data attribute of the first application data, and the cache data is an identifier corresponding to the first application data, the different application data correspond to different cache data, and the cache data obtaining unit 14 stores the cache data of the first application data into the cache space.
Specifically, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to the component type in the first application data, calculates the cache data of the first application data according to the component number information and the weight data corresponding to the component type, and stores the cache data of the first application data in the cache space, it can be understood that the first application data includes data of at least one component type such as text data, picture data, and video data, each component type corresponds to a weight data, for example, the weight data of the text data corresponds to the text data, the weight data of the picture data corresponds to the picture data, the cache data obtaining unit 14 controls the first thread to obtain the component number information corresponding to each component type in the first application data, and obtains the cache data of the first application data through a weighting algorithm according to the component number information and the weight data corresponding to the component type, and storing the cache data to a cache space.
The data measurement unit 12 controls a first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, and stores the typesetting data in a cache space, it is understood that the data measurement unit 12 controls the first thread to perform format measurement on the first application data to obtain typesetting data corresponding to the first application data, the first thread is a process for processing tasks in a data display device, the data display device can run one process or simultaneously start multiple processes to process different tasks, the format measurement is a typesetting mode for obtaining the first application data according to attributes of various data types in the first application data, the first application data may include text data, picture data, and video data, and the data measurement unit 12 stores the typesetting data in the cache space, the layout data is a layout mode of the first application data, and the cache space is used for storing the layout data and the cache data.
The first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, and the typesetting data corresponding to the first application data is adopted to perform layout display on the first application data, it can be understood that the first data display unit 13 controls the second thread to obtain the typesetting data corresponding to the first application data from the cache space, the second thread is a process for processing tasks in the data display device, the second thread and the first thread are two parallel typesetting threads in the data display device, the data display device can simultaneously run a first thread and a second thread, after the second thread obtains the typesetting data corresponding to the first application data, the first data display unit 13 adopts the typesetting data corresponding to the first application data to perform layout display on the text data in the first application data, The picture data and the video data are arranged, the arrangement result is displayed on the terminal equipment, and the cache data are updated according to the time interval information and the verification result of the cache data, so that the probability of hitting the cache data is improved, and the display efficiency is improved.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multithreading to process the data, the fluency of data display is improved, the experience of a user is well improved, the cache data is updated according to the time interval information and the verification result of the cache data, the probability of hitting the cache data is improved, and the display efficiency is improved.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the method steps in the embodiments shown in fig. 1 to 7, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 1 to 7, which are not described herein again.
Fig. 12 is a schematic structural diagram of an application server according to an embodiment of the present invention. As shown in fig. 12, the application server 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), and the optional user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 12, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a data display application program.
In the terminal 1000 shown in fig. 12, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1001 may be configured to call the data display application stored in the memory 1005, and specifically perform the following operations:
acquiring a pull instruction of application data in a terminal application interface, and requesting the stored first application data from an application server based on the pull instruction;
controlling a first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, and storing the typesetting data into a cache space;
and controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data.
In one embodiment, after executing the pull instruction for acquiring the application data in the terminal application interface and requesting the stored first application data from the application server based on the pull instruction, the processor 1001 further performs the following operations:
and controlling a first thread to acquire cache data of the first application data by adopting the data attribute of the first application data, and storing the cache data of the first application data into a cache space.
In an embodiment, when executing the control of the first thread to acquire the cache data of the first application data by using the data attribute of the first application data and store the cache data of the first application data in the cache space, the processor 1001 specifically executes the following operations:
and controlling a first thread to acquire component quantity information corresponding to a component type in the first application data, calculating cache data of the first application data according to the component quantity information and weight data corresponding to the component type, and storing the cache data of the first application data into a cache space.
In one embodiment, the processor 1001 further performs the following operations:
acquiring an updating instruction of the application data in a terminal application interface, and requesting the stored second application data from an application server based on the updating instruction;
controlling a second thread to acquire verification data of second application data by adopting data attributes of the second application data;
controlling the second thread to acquire cache data from the cache space, and matching the cache data with the check data to acquire a matching result;
and controlling the second thread to acquire the typesetting data corresponding to the first application data in a cache space according to the matching result, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
In an embodiment, when the processor 1001 executes and controls the second thread to obtain the typesetting data corresponding to the first application data in a cache space according to the matching result, and performs layout display on the second application data by using the typesetting data corresponding to the first application data, the following operations are specifically executed:
if the matching result is that the check data is the same as the cache data, controlling a second thread to obtain typesetting data corresponding to the first application data from the cache space, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data;
and if the matching result is that the check data is different from the cache data, controlling a second thread to perform format measurement on the second application data so as to obtain typesetting data corresponding to the second application data, and performing layout display on the second application data by adopting the typesetting data corresponding to the second application data.
In one embodiment, after executing the update instruction for obtaining the application data in the terminal application interface and requesting the stored second application data from the application server based on the update instruction, the processor 1001 further performs the following operations:
the method comprises the steps of obtaining a first time label of first application data and a second time label of second application data, and obtaining time interval information of the first time label and the second time label.
In one embodiment, the processor 1001 further performs the following operations:
and when the time interval information is larger than the time threshold information, determining the second application data as first application data, and performing a step of controlling a first thread to acquire cache data of the first application data by adopting the data attribute of the first application data and storing the cache data of the first application data into a cache space.
In one embodiment, the processor 1001 further performs the following operations:
and when the time interval information is less than or equal to the time threshold information, executing a step of controlling a second thread to acquire the verification data of the second application data by adopting the data attribute of the second application data.
In one embodiment, the processor 1001 further performs the following operations:
and when the time interval information is larger than the time threshold information and the matching result is that the check data is the same as the cache data, executing a step of controlling a second thread to acquire typesetting data corresponding to the first application data from the cache space, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
In one embodiment, the processor 1001 further performs the following operations:
and when the time interval information is larger than time threshold information and the matching result is that the check data is different from the cache data, determining the second application data as first application data, and executing a step of controlling a first thread to acquire the cache data of the first application data by adopting the data attribute of the first application data and storing the cache data of the first application data into a cache space.
In the embodiment of the invention, a pull instruction for application data is acquired in a terminal application interface, stored first application data is requested to an application server based on the pull instruction, the first thread is controlled to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, the typesetting data is stored in a cache space, a second thread is controlled to acquire the typesetting data corresponding to the first application data from the cache space, and the first application data is subjected to layout display by adopting the typesetting data corresponding to the first application data. By using multiple threads to process data, the fluency of data display is improved, and the user experience is well improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.
Claims (13)
1. A method of displaying data, comprising:
acquiring a pull instruction of application data in a terminal application interface, and requesting the stored first application data from an application server based on the pull instruction;
controlling a first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, and storing the typesetting data into a cache space;
controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data;
acquiring an updating instruction of the application data in a terminal application interface, and requesting the stored second application data from an application server based on the updating instruction;
controlling a second thread to acquire verification data of second application data by adopting data attributes of the second application data;
controlling the second thread to acquire cache data from the cache space, and matching the cache data with the check data to acquire a matching result; the cache data is cache data of the first application data;
and controlling the second thread to acquire the typesetting data corresponding to the first application data in a cache space according to the matching result, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
2. The method of claim 1, wherein after obtaining a pull instruction for the application data in the terminal application interface and requesting the stored first application data from the application server based on the pull instruction, further comprising:
and controlling a first thread to acquire cache data of the first application data by adopting the data attribute of the first application data, and storing the cache data of the first application data into a cache space.
3. The method of claim 2, wherein controlling the first thread to obtain the cache data of the first application data using the data attribute of the first application data and store the cache data of the first application data to the cache space comprises:
and controlling a first thread to acquire component quantity information corresponding to a component type in the first application data, calculating cache data of the first application data according to the component quantity information and weight data corresponding to the component type, and storing the cache data of the first application data into a cache space.
4. The method of claim 2, wherein the controlling the second thread to obtain the layout data corresponding to the first application data in a cache space according to the matching result, and to perform layout display on the second application data by using the layout data corresponding to the first application data comprises:
if the matching result is that the check data is the same as the cache data, controlling a second thread to obtain typesetting data corresponding to the first application data from the cache space, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data;
and if the matching result is that the check data is different from the cache data, controlling a second thread to perform format measurement on the second application data so as to obtain typesetting data corresponding to the second application data, and performing layout display on the second application data by adopting the typesetting data corresponding to the second application data.
5. The method of claim 2, wherein after obtaining the update instruction for the application data in the terminal application interface and requesting the stored second application data from the application server based on the update instruction, the method further comprises:
the method comprises the steps of obtaining a first time label of first application data and a second time label of second application data, and obtaining time interval information of the first time label and the second time label.
6. The method of claim 5, further comprising:
and when the time interval information is larger than the time threshold information, determining the second application data as first application data, and performing a step of controlling a first thread to acquire cache data of the first application data by adopting the data attribute of the first application data and storing the cache data of the first application data into a cache space.
7. The method of claim 5, further comprising:
and when the time interval information is less than or equal to the time threshold information, executing a step of controlling a second thread to acquire the verification data of the second application data by adopting the data attribute of the second application data.
8. The method of claim 5, further comprising:
and when the time interval information is larger than the time threshold information and the matching result is that the check data is the same as the cache data, executing a step of controlling a second thread to acquire typesetting data corresponding to the first application data from the cache space, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
9. The method of claim 5, further comprising:
and when the time interval information is larger than time threshold information and the matching result is that the check data is different from the cache data, determining the second application data as first application data, and executing a step of controlling a first thread to acquire the cache data of the first application data by adopting the data attribute of the first application data and storing the cache data of the first application data into a cache space.
10. A data display device, comprising:
the first data request unit is used for acquiring a pull instruction of the application data in a terminal application interface and requesting the stored first application data from an application server based on the pull instruction;
the data measurement unit is used for controlling a first thread to carry out format measurement on the first application data so as to obtain typesetting data corresponding to the first application data, and storing the typesetting data into a cache space;
the first data display unit is used for controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data;
the second data request unit is used for acquiring an update instruction of the application data in the terminal application interface and requesting the stored second application data from the application server based on the update instruction;
the verification data acquisition unit is used for controlling a second thread to acquire the verification data of the second application data by adopting the data attribute of the second application data;
the data matching unit is used for controlling the second thread to acquire cache data from the cache space and matching the cache data with the check data to acquire a matching result; the cache data is cache data of the first application data;
and the second data display unit is used for controlling the second thread to acquire the typesetting data corresponding to the first application data in a cache space according to the matching result and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
11. The apparatus of claim 10, further comprising:
the cache data acquisition unit is used for controlling a first thread to acquire the cache data of the first application data by adopting the data attribute of the first application data and storing the cache data of the first application data into a cache space.
12. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 9.
13. An application server, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the steps of:
acquiring a pull instruction of application data in a terminal application interface, and requesting the stored first application data from an application server based on the pull instruction;
controlling a first thread to perform format measurement on the first application data to acquire typesetting data corresponding to the first application data, and storing the typesetting data into a cache space;
controlling a second thread to acquire the typesetting data corresponding to the first application data from the cache space, and performing layout display on the first application data by adopting the typesetting data corresponding to the first application data;
acquiring an updating instruction of the application data in a terminal application interface, and requesting the stored second application data from an application server based on the updating instruction;
controlling a second thread to acquire verification data of second application data by adopting data attributes of the second application data;
controlling the second thread to acquire cache data from the cache space, and matching the cache data with the check data to acquire a matching result; the cache data is cache data of the first application data;
and controlling the second thread to acquire the typesetting data corresponding to the first application data in a cache space according to the matching result, and performing layout display on the second application data by adopting the typesetting data corresponding to the first application data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810462880.2A CN110489068B (en) | 2018-05-15 | 2018-05-15 | Data display method and equipment, storage medium and application server thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810462880.2A CN110489068B (en) | 2018-05-15 | 2018-05-15 | Data display method and equipment, storage medium and application server thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110489068A CN110489068A (en) | 2019-11-22 |
CN110489068B true CN110489068B (en) | 2021-09-28 |
Family
ID=68544897
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810462880.2A Active CN110489068B (en) | 2018-05-15 | 2018-05-15 | Data display method and equipment, storage medium and application server thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110489068B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102446279A (en) * | 2010-10-12 | 2012-05-09 | 深圳迈瑞生物医疗电子股份有限公司 | Method and device for browsing and composing image |
CN104598438A (en) * | 2014-12-31 | 2015-05-06 | 深圳市英威诺科技有限公司 | Typesetting computing method for completely displaying message information |
CN107589962A (en) * | 2016-07-14 | 2018-01-16 | 广州市动景计算机科技有限公司 | A kind of method for displaying user interface and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9978095B2 (en) * | 2014-08-30 | 2018-05-22 | Digimarc Corporation | Methods and arrangements including data migration among computing platforms, E.G. through use of steganographic screen encoding |
-
2018
- 2018-05-15 CN CN201810462880.2A patent/CN110489068B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102446279A (en) * | 2010-10-12 | 2012-05-09 | 深圳迈瑞生物医疗电子股份有限公司 | Method and device for browsing and composing image |
CN104598438A (en) * | 2014-12-31 | 2015-05-06 | 深圳市英威诺科技有限公司 | Typesetting computing method for completely displaying message information |
CN107589962A (en) * | 2016-07-14 | 2018-01-16 | 广州市动景计算机科技有限公司 | A kind of method for displaying user interface and device |
Also Published As
Publication number | Publication date |
---|---|
CN110489068A (en) | 2019-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109388317B (en) | Picture loading method, terminal device and storage medium | |
CN111816139B (en) | Screen refresh rate switching method and electronic equipment | |
US20150347377A1 (en) | Method for processing contents and electronic device thereof | |
CN112416346B (en) | Interface color scheme generation method, device, equipment and storage medium | |
US20110145730A1 (en) | Utilization of Browser Space | |
CN110069191B (en) | Terminal-based image dragging deformation implementation method and device | |
CN110020300B (en) | Browser page synthesis method and terminal | |
CN111796825B (en) | Bullet screen drawing method, bullet screen drawing device, bullet screen drawing equipment and storage medium | |
US10198147B2 (en) | Object management and visualization using a computing device | |
CN114443189B (en) | Image processing method and electronic equipment | |
CN114168793A (en) | Anchor display method, device, equipment and storage medium | |
US10643252B2 (en) | Banner display method of electronic device and electronic device thereof | |
CN104133869B (en) | A kind of Webpage method for refreshing | |
CN112449230B (en) | Character string display processing method, device, terminal and storage medium | |
CN110134905B (en) | Page update display method, device, equipment and storage medium | |
CN112596820A (en) | Resource loading method, device, equipment and storage medium | |
CN112581589A (en) | View list layout method, device, equipment and storage medium | |
CN110489068B (en) | Data display method and equipment, storage medium and application server thereof | |
CN112492399A (en) | Information display method and device and electronic equipment | |
CN112949850B (en) | Super-parameter determination method, device, deep reinforcement learning framework, medium and equipment | |
CN109429101A (en) | The desktop loading method and device of Interactive Internet TV | |
CN113986168A (en) | Image display method, device, equipment and readable storage medium | |
CN113763552A (en) | Three-dimensional geographic model display method and device, computer equipment and storage medium | |
US9787816B2 (en) | Method for reproducing contents and an electronic device thereof | |
US20170185270A1 (en) | Animation display method for view and terminal device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |