Display method and device of picture list and terminal equipment

文档序号:1737499 发布日期:2019-12-20 浏览:39次 中文

阅读说明:本技术 图片列表的显示方法、装置及终端设备 (Display method and device of picture list and terminal equipment ) 是由 刘畅 于 2019-08-19 设计创作,主要内容包括:本发明提供一种图片列表的显示方法、装置及终端设备。该图片列表的显示方法包括获取的图片列表的框架数据,渲染图片列表的列表结构;基于用户的操作指令,确定目标位置;根据该列表结构,获取与该目标位置对应的待显示图片的详细信息;根据该详细信息显示待显示图片。该方法节省了用户的时间,提高了浏览图片列表的效率,提高了用户体验。(The invention provides a display method and device of a picture list and terminal equipment. The display method of the picture list comprises the steps of obtaining frame data of the picture list and rendering a list structure of the picture list; determining a target position based on an operation instruction of a user; acquiring detailed information of a picture to be displayed corresponding to the target position according to the list structure; and displaying the picture to be displayed according to the detailed information. The method saves the time of the user, improves the efficiency of browsing the picture list and improves the user experience.)

1. A method for displaying a picture list, comprising:

rendering a list structure of the picture list according to the acquired frame data of the picture list; the list structure comprises a corresponding relation between the identification and the position of each picture in the picture list, and the frame data comprises the identification and the width and height information of each picture;

determining a target position based on an operation instruction of a user;

acquiring detailed information of a picture to be displayed corresponding to the target position according to the list structure;

and displaying the picture to be displayed according to the detailed information.

2. The method according to claim 1, wherein the rendering the list structure of the picture list according to the obtained frame data of the picture list comprises:

sending a first request to a server, wherein the first request is used for requesting the frame data;

receiving the frame data sent by the server;

and rendering a list structure of the picture list according to the frame data.

3. The method according to claim 1 or 2, wherein the obtaining of the detailed information of the picture to be displayed corresponding to the target position according to the list structure comprises:

determining the identifier of the picture to be displayed corresponding to the target position according to the list structure;

sending a second request to a server, wherein the second request carries an identifier of the picture to be displayed, and the second request is used for requesting detailed information of the picture to be displayed;

and receiving the detailed information of the picture to be displayed sent by the server.

4. The method of claim 2, wherein the receiving the frame data sent by the server comprises:

receiving first frame data sent by the server;

sending at least one third request to the server, where the at least one third request is used to request second frame data, and the second frame data is other frame data in the frame data of the picture list except the first frame data;

and receiving second frame data corresponding to each third request sent by the server.

5. The method of claim 4, wherein the receiving the first frame data sent by the server comprises:

and receiving first frame data sent by the server through a main thread.

6. The method according to claim 4 or 5, wherein the receiving second frame data corresponding to each third request sent by the server includes:

and receiving the second frame data corresponding to each third request sent by the server through the sub-thread.

7. The method according to claim 4 or 5, wherein the rendering the list structure of the picture list according to the obtained frame data of the picture list comprises:

rendering a first list structure according to the identification and the width and height information of each picture in the first frame data;

rendering a second list structure according to the identification and the width and height information of each picture in the second frame data;

and adding the second list structure into the first list structure to obtain the list structure of the picture list.

8. The method according to claim 1, wherein the rendering the list structure of the picture list according to the obtained frame data of the picture list comprises:

grouping the frame data according to a preset rule to obtain at least one group, wherein pictures in each group in the at least one group have the same attribute;

and for each group in the at least one group, rendering the group according to the identification and the width and height information of the pictures in the group to obtain a list structure of the picture list.

9. The method of claim 8, wherein before, for each of the at least one group, rendering the group according to the identification of the pictures in the group and the aspect information, the method further comprises:

ordering the at least one packet;

the rendering, for each of the at least one packet, the packet according to the identification of the pictures in the packet and the aspect information, comprising:

and for each group in the at least one group after sequencing, rendering the group according to the identification and the width and height information of the pictures in the group.

10. The method according to claim 8 or 9, wherein before the obtaining of the detailed information of the picture to be displayed corresponding to the target position according to the list structure, the method further comprises:

recording the position of each group in the list structure;

the obtaining of the detailed information of the picture to be displayed corresponding to the target position according to the list structure includes:

determining a group to be displayed corresponding to the target position according to the position of each group in the list structure;

and acquiring detailed information of the pictures to be displayed in the groups to be displayed.

11. The method according to claim 10, wherein the determining the to-be-displayed group corresponding to the target position according to the position of each group in the list structure comprises:

determining the sliding direction of the operation according to the operation instruction of the user;

if the sliding direction is upward, determining a target group corresponding to the target position and a first number of groups before the target position as the group to be displayed;

and if the sliding direction is downward, determining the target group corresponding to the target position and a second number of groups behind the target position as the group to be displayed.

12. The method of claim 10, wherein after said recording the position of said each packet in said list structure, said method further comprises:

generating a directory according to the attribute of each group; each directory entry in the directory corresponds to each group one to one;

the determining the target position based on the operation instruction of the user comprises the following steps:

receiving an operation instruction input by a user, wherein the operation instruction comprises a target directory item selected by the user;

and determining the target position of the grouping corresponding to the target directory entry.

13. A picture list display apparatus, comprising:

the rendering module is used for rendering the list structure of the picture list according to the acquired frame data of the picture list; the list structure comprises a corresponding relation between the identification and the position of each picture in the picture list, and the frame data comprises the identification and the width and height information of each picture;

the determining module is used for determining a target position based on a first operation instruction of a user;

the acquisition module is used for acquiring detailed information of the picture to be displayed corresponding to the target position according to the list structure;

and the display module is used for displaying the picture to be displayed according to the detailed information.

14. A terminal device comprising a memory and a processor; the memory is connected with the processor;

the memory for storing a computer program;

the processor, when being executed by a computer program, is configured to implement the method for displaying a picture list according to any one of claims 1 to 12.

15. A storage medium having stored thereon a computer program for implementing a method of displaying a picture list according to any one of claims 1 to 12 when executed by a processor.

Technical Field

The present invention relates to computer software technologies, and in particular, to a method and an apparatus for displaying a picture list, and a terminal device.

Background

Currently, many application software have a picture list page for displaying a large number of pictures of a user in a batch manner, such as a personal photo album in various types of social software.

Disclosure of Invention

The invention provides a display method and device of a picture list and terminal equipment, which are used for improving the picture browsing efficiency of a user and improving the user experience.

In a first aspect, the present invention provides a method for displaying a picture list, including:

rendering a list structure of the picture list according to the acquired frame data of the picture list; the list structure comprises a corresponding relation between the mark and the position of each picture in the picture list, and the frame data comprises the mark and the width and height information of each picture;

determining a target position based on an operation instruction of a user;

acquiring detailed information of a picture to be displayed corresponding to the target position according to the list structure;

and displaying the picture to be displayed according to the detailed information.

Optionally, rendering a list structure of the picture list according to the obtained frame data of the picture list, including:

sending a first request to a server, wherein the first request is used for requesting the frame data;

receiving the frame data sent by the server;

and rendering a list structure of the picture list according to the frame data.

Optionally, obtaining detailed information of the to-be-displayed picture corresponding to the target position according to the list structure includes:

determining the identifier of the picture to be displayed corresponding to the target position according to the list structure;

sending a second request to a server, wherein the second request carries an identifier of a picture to be displayed, and the second request is used for requesting detailed information of the picture to be displayed;

and receiving the detailed information of the picture to be displayed sent by the server.

Optionally, the receiving the frame data sent by the server includes:

receiving first frame data sent by the server;

sending at least one third request to the server, wherein the at least one third request is used for requesting second frame data, and the second frame data is other frame data except the first frame data in the frame data of the picture list;

and receiving second frame data corresponding to each third request sent by the server.

Optionally, the receiving the first frame data sent by the server includes:

and receiving first frame data sent by the server through the main thread.

Optionally, the receiving second frame data corresponding to each third request sent by the server includes:

and receiving the second frame data corresponding to each third request sent by the server through the sub-thread.

Optionally, rendering a list structure of the picture list according to the obtained frame data of the picture list, including:

rendering a first list structure according to the identification and the width and height information of each picture in the first frame data;

rendering a second list structure according to the identification and the width and height information of each picture in the second frame data;

and adding the second list structure into the first list structure to obtain a list structure of the picture list.

Optionally, rendering a list structure of the picture list according to the obtained frame data of the picture list, including:

grouping the frame data according to a preset rule to obtain at least one group; wherein pictures within each of the at least one group have the same attributes;

and for each group in the at least one group, rendering the group according to the identification and the width and height information of the pictures in the group to obtain a list structure of the picture list.

Optionally, for each of the at least one group, before rendering the group according to the identification of the picture in the group and the width and height information, the method further includes:

ordering the at least one packet;

for each of the at least one group, rendering the group according to the identification of the pictures in the group and the aspect information, including:

and for each group in the at least one group after sequencing, rendering the group according to the identification and the width and height information of the pictures in the group.

Optionally, before acquiring the detailed information of the to-be-displayed picture corresponding to the target position according to the list structure, the method further includes:

recording the position of each packet in the list structure;

according to the list structure, acquiring the detailed information of the picture to be displayed corresponding to the target position, wherein the detailed information comprises the following steps:

determining a group to be displayed corresponding to the target position according to the position of each group in the list structure;

and acquiring detailed information of the pictures to be displayed in the groups to be displayed.

Optionally, determining the to-be-displayed packet corresponding to the target location according to the location of each packet in the list structure, including:

determining the sliding direction of the operation according to the operation instruction of the user;

if the sliding direction is upward, determining a target group corresponding to the target position and a first number of groups before the target position as groups to be displayed;

and if the sliding direction is downward, determining the target group corresponding to the target position and a second number of groups behind the target position as the groups to be displayed.

Optionally, after recording the position of each packet in the list structure, the method further includes:

generating a directory according to the attribute of each group; each directory entry in the directory corresponds to each group one to one;

the determining of the target position based on the operation instruction of the user comprises the following steps:

receiving an operation instruction input by a user, wherein the operation instruction comprises a target directory item selected by the user;

and determining the target position of the grouping corresponding to the target directory entry.

In a second aspect, the present invention provides a display device for a picture list, including:

the rendering module is used for rendering the list structure of the picture list according to the acquired frame data of the picture list; the list structure comprises a corresponding relation between the mark and the position of each picture in the picture list, and the frame data comprises the mark and the width and height information of each picture;

the determining module is used for determining a target position based on an operation instruction of a user;

the acquisition module is used for acquiring the detailed information of the picture to be displayed corresponding to the target position according to the list structure;

and the display module is used for displaying the picture to be displayed according to the detailed information.

Optionally, the rendering module is configured to:

sending a first request to a server, wherein the first request is used for requesting the frame data;

receiving the frame data sent by the server;

and rendering a list structure of the picture list according to the frame data.

Optionally, the obtaining module is configured to:

determining the identifier of the picture to be displayed corresponding to the target position according to the list structure;

sending a second request to a server, wherein the second request carries an identifier of a picture to be displayed, and the second request is used for requesting detailed information of the picture to be displayed;

and receiving the detailed information of the picture to be displayed sent by the server.

Optionally, the rendering module is further specifically configured to:

receiving first frame data sent by the server;

sending at least one third request to the server, wherein the at least one third request is used for requesting second frame data, and the second frame data is other frame data except the first frame data in the frame data of the picture list;

and receiving second frame data corresponding to each third request sent by the server.

Optionally, the rendering module is further specifically configured to:

and receiving first frame data sent by the server through the main thread.

Optionally, the rendering module is further specifically configured to:

and receiving the second frame data corresponding to each third request sent by the server through the sub-thread.

Optionally, the rendering module is configured to:

rendering a first list structure according to the identification and the width and height information of each picture in the first frame data;

rendering a second list structure according to the identification and the width and height information of each picture in the second frame data;

and adding the second list structure into the first list structure to obtain a list structure of the picture list.

Optionally, the rendering module is configured to:

grouping the frame data according to a preset rule to obtain at least one group; wherein pictures within each of the at least one group have the same attributes;

and for each group in the at least one group, rendering the group according to the identification and the width and height information of the pictures in the group to obtain a list structure of the picture list.

Optionally, for each of the at least one group, before rendering the group according to the identification of the picture in the group and the width and height information, the rendering module is further configured to:

ordering the at least one packet;

correspondingly, the rendering module is further configured to:

and for each group in the at least one group after sequencing, rendering the group according to the identification and the width and height information of the pictures in the group.

Optionally, the rendering module is further configured to record a position of each group in the list structure before the obtaining module obtains the detailed information of the to-be-displayed picture corresponding to the target position according to the list structure;

the acquisition module is configured to:

determining a group to be displayed corresponding to the target position according to the position of each group in the list structure;

and acquiring detailed information of the pictures to be displayed in the groups to be displayed.

Optionally, the obtaining module is further configured to:

determining the sliding direction of the operation according to the operation instruction of the user;

if the sliding direction is upward, determining a target group corresponding to the target position and a first number of groups before the target position as groups to be displayed;

and if the sliding direction is downward, determining the target group corresponding to the target position and a second number of groups behind the target position as the groups to be displayed.

Optionally, the rendering module is further configured to, after recording a position of each packet in the list structure, generate a directory according to an attribute of each packet; each directory entry in the directory corresponds to each group one to one; the determination module is to:

receiving an operation instruction input by a user, wherein the operation instruction comprises a target directory item selected by the user;

and determining the target position of the grouping corresponding to the target directory entry.

In a third aspect, the present invention provides a terminal device, comprising a memory and a processor; the memory is connected with the processor;

the memory for storing a computer program;

the processor is configured to implement the method for displaying a picture list as in the first aspect described above when the computer program is executed.

In a fourth aspect, the present invention provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the method of displaying a picture list as in the first aspect described above.

According to the display method, the display device and the terminal equipment of the picture list, the list structure of the picture list is rendered through the acquired frame data of the picture list; determining a target position based on an operation instruction of a user; acquiring detailed information of a picture to be displayed corresponding to the target position according to the list structure; and displaying the picture to be displayed according to the detailed information. According to the method, the list structure is rendered through the integral frame data of the picture list, when a user browses the picture list, the user can browse the picture corresponding to the position directly through an operation instruction, for example, a sliding screen reaches the position to be browsed, multiple operations are not needed, the picture list is waited to be loaded page by page, the time of the user is saved, the efficiency of browsing the picture list is improved, and the user experience is improved. In addition, the method can also generate the catalog according to the grouping, and the list can be quickly positioned and rolled to the corresponding target position through the operation of clicking the catalog by the user, so that the efficiency of browsing the picture list by the user is further improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

Fig. 1 is a first schematic flow chart of a method for displaying a picture list according to the present invention;

FIG. 2 is a first diagram illustrating a display of a picture list according to the present invention;

fig. 3 is a flowchart illustrating a second method for displaying a picture list according to the present invention;

FIG. 4 is a second schematic view illustrating a display of a picture list according to the present invention;

FIG. 5 is a schematic diagram illustrating a display device for providing a picture list according to the present invention;

fig. 6 is a schematic structural diagram of a terminal device provided in the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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.

At present, many application software have a picture list page for displaying a large number of pictures of a user in batch, for example, a personal photo album in various types of social software, and the user can browse the picture list by means of a sliding screen or the like. In order to avoid waiting for page loading of pictures for a long time in the browsing process of a user, improve the browsing efficiency of the user and improve the user experience, the list structure of the picture list is generated in a mode of pre-loading the whole frame data of the picture list, and then the detailed information of the pictures at the corresponding positions of the list structure is loaded along with the operation of the user, so that the time cost wasted in page turning of the user is fundamentally avoided. Therefore, the invention provides a display method of a picture list. The execution subject of the method is a display device of the picture list, and the device can be realized in a software and/or hardware manner, for example, the device can be a terminal device.

Fig. 1 is a first flowchart illustrating a method for displaying a picture list according to the present invention. As shown in fig. 1, the method includes:

s101, rendering a list structure of the picture list according to the acquired frame data of the picture list.

The list structure comprises the corresponding relation between the mark and the position of each picture in the picture list, and the frame data comprises the mark and the width and height information of each picture.

The list structure of the picture list is the overall layout of the picture list, and the list structure only shows the position of each picture in the picture list. The frame data of the picture list comprises the identification and the width and height information of each picture in the picture list, and after the frame data of the picture list is obtained, the list structure of the picture list can be rendered according to the identification and the width and height information of each picture, namely the position of each picture in the picture list is obtained. For example, if the picture list includes 19000 pictures, the frame data of the 19000 pictures is obtained, and the list structure of the picture category can be rendered according to the identifier and the width and height information of each picture in the 19000 pictures, that is, the position of each picture in the 19000 pictures is determined.

And S102, determining a target position based on an operation instruction of a user.

When browsing the picture list, the user may input an operation instruction through the terminal device, for example, browse the pictures in the picture list by sliding a screen of the terminal device or clicking the screen, and the position of the picture that the user wants to browse, that is, the target position, may be determined according to the operation instruction of the user.

And S103, acquiring detailed information of the picture to be displayed corresponding to the target position according to the list structure.

And S104, displaying the picture to be displayed according to the detailed information.

The list structure includes the corresponding relationship between the identification and the position of the picture, so that after the target position is determined, the picture to be displayed corresponding to the target position can be determined. The list structure obtained according to the frame data is only the overall layout of the picture list and does not include the detailed information of each picture, so that the detailed information of the picture to be displayed needs to be obtained, the detailed information is used for displaying the specific content of the picture, the exemplified detailed information can be picture links, picture resources, description characters on the picture and the like, and the picture to be displayed can be displayed according to the detailed information after the detailed information is obtained.

Fig. 2 is a schematic diagram illustrating a display of a picture list according to the present invention. As shown in fig. 2, the pictures displayed in the screen of the terminal device at the beginning are pictures 1 to 7 in the picture list, and since the complete list structure of the picture list is loaded, the user can directly slide the mobile phone screen to any position in the whole list structure, for example, the user slides the screen to a position corresponding to pictures 801 to 806 in the picture list, and at this time, the screen of the terminal device displays frames of the pictures 801 to 806 in the list structure, and then the terminal device obtains detailed information of the pictures 801 to 806 to display the pictures 801 to 806.

According to the display method of the picture list, the list structure of the picture list is rendered through the acquired frame data of the picture list; determining a target position based on an operation instruction of a user; acquiring detailed information of a picture to be displayed corresponding to the target position according to the list structure; and displaying the picture to be displayed according to the detailed information. According to the method, the list structure is rendered through the integral frame data of the picture list, when a user browses the picture list, the user can browse the picture corresponding to the position directly through an operation instruction, for example, a sliding screen reaches the position to be browsed, multiple operations are not needed, the picture list is waited to be loaded page by page, the time of the user is saved, the efficiency of browsing the picture list is improved, and the user experience is improved.

On the basis of the foregoing embodiment, a list structure for rendering a picture list according to acquired frame data of the picture list in S101 is further described, where the frame data in this embodiment may be stored locally on a display device of the picture list, or may also be stored in a remote server, for example, may be stored in a cloud server. If the frame data is stored in the server, S101 may include: sending a first request to a server, wherein the first request is used for requesting the frame data; receiving frame data sent by a server; and rendering a list structure of the picture list according to the frame data.

Further, in consideration of the processing capacity and performance pressure of the server, in order to ensure the loading speed of the picture list, the frame data may be processed in batches, and specifically, the receiving the frame data sent by the server includes: receiving first frame data sent by the server; sending at least one third request to the server, wherein the at least one third request is used for requesting second frame data, and the second frame data is other frame data except the first frame data in the frame data of the picture list; and receiving second frame data corresponding to each third request sent by the server.

Illustratively, 19000 pictures are included in the picture list, a display device of the picture list, such as a terminal device, sends a first request to a server to request frame data of the picture list, the server first sends 1000 pieces of frame data to the server, and simultaneously returns to the terminal device, the picture list has 19000 pictures in total, and the 1000 pieces of frame data are frame data of the previous 1000 pictures in the 19000 pictures, that is, the first frame data. And then, the terminal equipment sends a third request to the server side to request other frame data except the first frame data. Specifically, the server may configure the number of pieces of frame data to be sent each time, for example, the server is configured to send 1000 pieces of data for the first time, and then send 5000 pieces of data each time, the terminal device sends four third requests to the server to obtain all the frame data, and the four third requests may be processed in parallel to increase the loading speed.

In a specific implementation, the terminal device and the server may implement the above-mentioned process of controlling the number of transmitted data pieces through parameters carried in the request and the response. For example, a request sent by the terminal device to the server may carry two parameters, namely, a boundary and a length, where the boundary is used to indicate a start value of requested frame data, and the length is used to indicate the number of requested frame data, and if both of the two parameters are empty, the server defaults that the terminal device requests frame data for the first time, that is, the request is the first request. For example, if the two parameters in the first request sent by the terminal device to the server are both null, the server sends the 1000 pieces of frame data to the server according to the configuration of sending 1000 pieces of data for the first time, and also returns three parameters, namely, next _ boundary, page _ length, and total, to the terminal device, where the next _ boundary is used to indicate the boundary that the terminal device needs to request next time, the page _ length is used to indicate the number of pieces of frame data sent by the server each time after the first time, and the total is the total number of pieces of frame data. In the above example, the server sends the first frame data, that is, the first 1000 frame data, to the terminal device, and returns next _ boundary of 1001, page _ length of 5000, and total of 19000 to the terminal device. After the terminal equipment receives the frame data, the terminal equipment can calculate that all the frame data can be obtained only by sending a third request for three times according to the parameters. If the boundary is 1001 and the length is 5000 in a third request sent by the terminal device, 5000 pieces of data, namely 1001 and 6000, sent by the server can be received.

The method reduces the pressure of the server side for processing the data by returning the frame data in batches, and simultaneously can load the list structure of the part of data more quickly because the number of the frame data returned for the first time is less.

In order to further improve the user experience, the frame data may be requested by different threads in this embodiment. Optionally, the first frame data sent by the server is received through the main thread. After receiving the first frame data, at least one third request for requesting second frame data can be sent by the sub-thread, and the second frame data corresponding to each third request sent by the server side is received by the sub-thread. The at least one third request may be requested concurrently, and since the third request is processed by the child thread, it does not block the main thread, and jamming of the user browsing interface may be avoided.

Corresponding to receiving the frame data in batches, the terminal device may render the list structure according to the frame data received in batches, and specifically, rendering the list structure of the picture list according to the obtained frame data of the picture list in S101 may include: rendering a first list structure according to the identification and the width and height information of each picture in the first frame data; rendering a second list structure according to the identification and the width and height information of each picture in the second frame data; and adding the second list structure into the first list structure to obtain a list structure of the picture list.

By the aid of the batch rendering list structure, for a user, when the user browses pictures included in the first list structure, the subsequent second list structure is automatically loaded, the first list structure is loaded at a higher speed, the user cannot perceive the loading process of the second list structure, and user experience is further improved.

On the basis of the foregoing embodiment, further description is made on acquiring detailed information of the picture to be displayed corresponding to the target position according to the list structure in S103, where the detailed information of the picture in this embodiment may be stored locally on a display device of the picture list, such as a terminal device, or may also be stored in a remote server, for example, may be stored in a cloud server.

If the detailed information of the picture is stored in the server, S103 includes: determining the identifier of the picture to be displayed corresponding to the target position according to the list structure; sending a second request to a server, wherein the second request carries an identifier of a picture to be displayed, and the second request is used for requesting detailed information of the picture to be displayed; and receiving the detailed information of the picture to be displayed sent by the server. If the user slides the mobile phone screen to a certain position in the picture list, and the position corresponds to the 100 th plus 105 pictures in the picture list, the terminal device sends a second request carrying the identifier of the 100 th plus 105 pictures to the server, and the server receives the request and then sends the detailed information of the 100 th plus 105 pictures to the terminal device.

Fig. 3 is a flowchart illustrating a second method for displaying a picture list according to the present invention. As shown in fig. 3, in S101, rendering a list structure of the picture list according to the acquired frame data of the picture list includes:

s301, grouping the frame data according to a preset rule to obtain at least one group.

Wherein the pictures within each of the at least one group have the same attributes.

In practical applications, the picture list is usually displayed according to a certain rule, for example, the picture list is displayed in groups according to time and place. In this embodiment, the frame data further includes a time and a place corresponding to each picture in the picture list, and after the frame data is acquired, the frame data is grouped according to the time and the place corresponding to the pictures by traversing all the pictures, so that the pictures with the same time and place are divided into one group. Thus, each group includes information on the time, place, and all pictures of the group. For example, the time may be in the form of a year-month, which may be calculated from the time stamp of the picture. It is to be understood that the grouping of the frame data is not limited to the grouping according to the time and the place corresponding to the pictures, and may also be performed according to any other attributes of the pictures, for example, the grouping is performed according to the size of the pictures, the grouping is performed according to the author of the pictures, the grouping is performed according to the type of the pictures, and the like, which is not specifically limited by the present invention.

S302, aiming at each group in the at least one group, rendering the group according to the identification and the width and height information of the pictures in the group, and obtaining a list structure of the picture list.

After grouping is finished, layout rendering can be carried out on all pictures in each group according to the width and height information of the pictures, the rendering can be carried out by adopting a preset layout template, and the list structure of the picture list can be obtained by finishing the rendering of all the groups.

According to the display method of the picture list, the frame data are grouped, the grouped frame data are selected, a list structure arranged according to the groups is obtained, a user can browse according to the groups conveniently, and the user experience is improved.

Optionally, on the basis of the foregoing embodiment, before rendering, in S302, for each of the at least one group, the group according to the identification of the picture in the group and the aspect information, the method further includes: the at least one packet is ordered.

In S302, for each of the at least one group, rendering the group according to the identifier of the picture in the group and the aspect information includes: and for each group in the at least one group after sequencing, rendering the group according to the identification and the width and height information of the pictures in the group.

After the frame data is grouped according to time and place in S301, the groups may be sorted according to time first, and then each sorted group is rendered, so that the obtained list structure is a list structure sequentially arranged according to time-place.

On the basis of grouping the frame data to generate a list structure arranged according to the grouping, optionally, before acquiring detailed information of the to-be-displayed picture corresponding to the target position according to the list structure in S103, the method further includes: the position of each packet in the list structure is recorded.

Correspondingly, in S103, according to the list structure, obtaining detailed information of the to-be-displayed picture corresponding to the target position includes: determining a group to be displayed corresponding to the target position according to the position of each group in the list structure; and acquiring detailed information of the pictures to be displayed in the groups to be displayed.

Illustratively, when a user browses a picture list, the screen is slid to a certain position of the list, a group to be displayed corresponding to the position is a 10 th group in the list structure, the time of the group is 10 months in 2018, a place is a background, the group includes 10 pictures, then the terminal device further acquires detailed information of the 10 pictures in the group to display the pictures, and specifically, the terminal device may send a second request to the server according to the identifier of the 10 pictures to request the server for the detailed information of the 10 pictures. By the method, when the user browses the picture list, the pictures in the whole group can be directly displayed according to the browsing position of the user, so that the user can browse conveniently. In addition, the detailed information of the picture acquired by the terminal device from the server can be cached in the local of the terminal device, when the user slides to the same position next time, the user does not need to request the server for data again, and the data can be directly loaded, so that the display speed of the picture list is increased, and the network data use consumption of the user is also saved.

On this basis, in order to further facilitate browsing of the user, the picture to be browsed by the user may be preloaded, and optionally, the determining the group to be displayed corresponding to the target position according to the position of each group in the list structure includes: determining the sliding direction of the operation according to the operation instruction of the user; if the sliding direction is upward, determining a target group corresponding to the target position and a first number of groups before the target position as groups to be displayed; and if the sliding direction is downward, determining the target group corresponding to the target position and a second number of groups behind the target position as the groups to be displayed.

When a user operates a terminal device to browse, a first group displayed at the top of a current screen is recorded by setting an identifier, specifically, the first group can be recorded by the index number of the group, when the user slides the screen, the sliding behavior of the user is monitored, when the sliding speed of the user is within a preset speed value range, the first group displayed in the screen after the user slides the screen is compared with the previously recorded group, the identifier is updated to the index number of the first group displayed in the screen after the user slides the screen, and the sliding operation of the user can be judged to be upward sliding or downward sliding by comparing the index numbers of the groups displayed in the screen after the user slides the screen.

When the sliding operation of the user is upward sliding, the user may continue to browse upward except for browsing the picture at the corresponding position after the user slides the screen, and therefore the target group corresponding to the target position after the user slides the screen and the first number of groups before the target position are determined as the groups to be displayed, and the first number may be set according to actual needs, for example, may be set to three. When the sliding operation of the user is downward sliding, the user may continue to browse downward in addition to browsing the picture at the corresponding position after the screen is slid, and therefore, the target group corresponding to the target position after the screen is slid by the user and the second number of groups after the target position are determined as the groups to be displayed. Therefore, if the user slides the list at a normal speed for browsing the list, the picture content which the user needs to see next can be automatically loaded, and the waiting time for loading the detailed picture information after the sliding is effectively avoided.

On the basis of the above embodiment, the method further includes: generating a directory according to the attribute of each group; each directory entry in the directory corresponds one-to-one to each grouping. Specifically, after the frame data packets are sorted, all the packets are traversed again to generate a series of directory entries, where an element corresponding to each directory entry is an attribute of a picture in the packet, such as time and place of each packet. It is to be understood that the directory entries in this embodiment are not limited to a two-dimensional structure based on time and place, and a one-dimensional structure or a three-dimensional structure may be produced according to actual needs. The catalog may also be generated, for example, based on picture type, picture participants, etc.

Correspondingly, the step S102 of determining the target position based on the operation instruction of the user includes: receiving an operation instruction input by a user, wherein the operation instruction comprises a target directory item selected by the user; and determining the target position of the grouping corresponding to the target directory entry.

The user can select a directory entry in the directory by clicking the screen, the directory entry corresponds to a group in the list structure, and the target position selected by the user can be determined according to the group. Fig. 4 is a schematic diagram illustrating a display of a picture list according to a second embodiment of the present invention. As shown in fig. 4, the directory of the picture list includes a plurality of directory entries, and the user clicks the screen to select the directory entry "beijing 5 months in 2019", so that the terminal device can determine the position of the corresponding group in the picture list according to the directory entry, and then quickly scroll the screen to that position, assuming that the corresponding grouping for that position includes pictures 350-380, the screen scrolls to the position of the frame of picture 350 in the list structure, due to the limitation of the screen size of the terminal device, such as the frame of the picture 350-the frame of the picture 355 displayed on the picture screen, and then the terminal device can display the pictures 350-380 after obtaining the detailed information of the pictures 350-380, and also because the terminal device is limited by the size of the screen, the pictures 350-355 are displayed on the screen, and the user continues to display the pictures after the pictures 355 after sliding the screen, such as displaying the pictures 356-362. Therefore, by clicking the directory, the list can be quickly positioned and rolled to the corresponding target position, the efficiency of browsing the picture list by the user is improved, and the user experience is improved.

Fig. 5 is a schematic structural diagram of a display device for providing a picture list according to the present invention. As shown in fig. 5, the display device 50 for picture lists includes:

a rendering module 501, configured to render a list structure of the picture list according to the obtained frame data of the picture list; the list structure comprises a corresponding relation between the mark and the position of each picture in the picture list, and the frame data comprises the mark and the width and height information of each picture;

a determining module 502, configured to determine a target location based on an operation instruction of a user;

an obtaining module 503, configured to obtain detailed information of the to-be-displayed picture corresponding to the target position according to the list structure;

and a display module 504, configured to display a picture to be displayed according to the detailed information.

Optionally, the rendering module 501 is configured to:

sending a first request to a server, wherein the first request is used for requesting the frame data;

receiving the frame data sent by the server;

and rendering a list structure of the picture list according to the frame data.

Optionally, the obtaining module 503 is configured to:

determining the identifier of the picture to be displayed corresponding to the target position according to the list structure;

sending a second request to a server, wherein the second request carries an identifier of a picture to be displayed, and the second request is used for requesting detailed information of the picture to be displayed;

and receiving the detailed information of the picture to be displayed sent by the server.

Optionally, the rendering module 501 is further specifically configured to:

receiving first frame data sent by the server;

sending at least one third request to the server, wherein the at least one third request is used for requesting second frame data, and the second frame data is other frame data except the first frame data in the frame data of the picture list;

and receiving second frame data corresponding to each third request sent by the server.

Optionally, the rendering module 501 is further specifically configured to:

and receiving first frame data sent by the server through the main thread.

Optionally, the rendering module 501 is further specifically configured to:

and receiving the second frame data corresponding to each third request sent by the server through the sub-thread.

Optionally, the rendering module 501 is configured to:

rendering a first list structure according to the identification and the width and height information of each picture in the first frame data;

rendering a second list structure according to the identification and the width and height information of each picture in the second frame data;

and adding the second list structure into the first list structure to obtain a list structure of the picture list.

Optionally, the frame data further includes a time and a place corresponding to each picture in the picture list; the rendering module 501 is configured to:

grouping the frame data according to a preset rule to obtain at least one group; wherein pictures within each of the at least one group have the same attributes;

and for each group in the at least one group, rendering the group according to the identification and the width and height information of the pictures in the group to obtain a list structure of the picture list.

Optionally, the rendering module 501 is further configured to, before rendering each of the at least one group according to the identification of the pictures in the group and the aspect information,

ordering the at least one packet;

accordingly, the rendering module 501 is further configured to:

and for each group in the at least one group after sequencing, rendering the group according to the identification and the width and height information of the pictures in the group.

Optionally, the rendering module 501 is further configured to record the position of each group in the list structure before the obtaining module 503 obtains the detailed information of the picture to be displayed corresponding to the target position according to the list structure;

the obtaining module 503 is configured to:

determining a group to be displayed corresponding to the target position according to the position of each group in the list structure;

and acquiring detailed information of the pictures to be displayed in the groups to be displayed.

Optionally, the obtaining module 503 is further configured to:

determining the sliding direction of the operation according to the operation instruction of the user;

if the sliding direction is upward, determining a target group corresponding to the target position and a first number of groups before the target position as groups to be displayed;

and if the sliding direction is downward, determining the target group corresponding to the target position and a second number of groups behind the target position as the groups to be displayed.

Optionally, the rendering module 501 is further configured to, after recording the position of each packet in the list structure, generate a directory according to the attribute of each packet; each directory entry in the directory corresponds to each group one to one; the determination module 502 is configured to:

receiving an operation instruction input by a user, wherein the operation instruction comprises a target directory item selected by the user;

and determining the target position of the grouping corresponding to the target directory entry.

The apparatus of this embodiment may be configured to implement the technical solution of any of the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.

Fig. 6 is a schematic structural diagram of a terminal device provided in the present invention. As shown in fig. 6, the terminal device 60 includes a memory 601 and a processor 602; the memory 601 is connected to the processor 602.

A memory 601 for storing a computer program;

a processor 602, configured to implement the method for displaying a picture list according to any of the above method embodiments when the computer program is executed.

The present invention provides a storage medium having stored thereon a computer program which, when executed by a processor, implements a method of displaying a picture list as in any of the above-described method embodiments.

Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:图像处理效果的显示方法、装置、电子设备以及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!