Waterfall flow layout method and device
By receiving the image storage address and shape information provided by the server on the user side, calculating the waterfall flow layout height, the problem of low waterfall flow layout efficiency is solved, and the default information is used to ensure layout stability when the picture is lost, improving the waterfall flow layout overall efficiency.
Patent Information
- Application Number
- CN202411080411.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-26
AI Technical Summary
Waterfall layout is less efficient when implemented, mainly because the original height of the picture can only be obtained after loading, resulting in limited layout efficiency.
By sending display instructions to the server, receiving the storage address information and shape information of the picture, the user calculates the height of the picture in the waterfall flow layout based on this information, realizes the waterfall flow layout, and uses the shape information of the default image when the picture is lost. layout.
It improves the efficiency of waterfall layout, avoids the inefficiency of layout caused by network problems that cannot load image shape information in time, and ensures the stability of layout when pictures are lost.
Smart Images

Figure CN119025769A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network technology, and in particular to a waterfall flow layout method and device. Background Art
[0002] In web development, waterfall layout is a common display method, especially suitable for displaying multimedia content such as pictures. Waterfall can better adapt to devices with different screen sizes and improve user experience. It effectively displays content such as pictures and text, allowing users to browse web pages conveniently and bringing better visual effects and layout aesthetics to the website.
[0003] The main feature of the waterfall layout is that each element has a different height but the same width, presenting a waterfall-like layout effect. Usually, the actual height of the image needs to be calculated based on the original height of the image. However, the original height of the image can only be obtained after the image is loaded, resulting in low efficiency in implementing the waterfall layout.
[0004] Therefore, how to improve the efficiency of implementing waterfall flow layout is an urgent problem that needs to be solved. Summary of the invention
[0005] The embodiments of the present invention provide a waterfall flow layout method and device for improving the efficiency of implementing waterfall flow layout.
[0006] In a first aspect, an embodiment of the present invention provides a waterfall flow layout method, including:
[0007] Sending a display instruction to a server, and receiving picture information sent by the server in response to the display instruction, wherein the display instruction indicates obtaining a picture to be displayed, and the picture information includes storage address information and shape information of at least one picture, and the shape information indicates the width and height of the picture;
[0008] A waterfall layout of the at least one picture is implemented according to the storage address information, the shape information and the interface width.
[0009] In the above technical solution, when the user opens the client on the terminal device, a display instruction is triggered and the display instruction is sent to the server. After receiving the display instruction, the server will send the picture information to the user terminal in response to the display instruction. The picture information includes the storage address information and shape information of at least one picture to be displayed. After receiving the picture information, the user terminal can directly calculate the height of each picture in the waterfall layout based on the shape information of at least one picture to realize the waterfall layout. This avoids the situation where the picture cannot be loaded in time due to network problems, the shape information of the picture cannot be obtained, and the height of the picture in the waterfall layout cannot be determined, which affects the efficiency of realizing the waterfall layout.
[0010] Optionally, the shape information is determined and stored by the server based on a picture.
[0011] In the above technical solution, after the image is uploaded to the server, the server determines the shape information of the image and stores it, so that the image and the shape information of the image can be sent to the user separately, thereby improving the efficiency of the user side in implementing the waterfall flow layout.
[0012] Optionally, implementing a waterfall layout of the at least one picture according to the storage address information, the shape information, and the interface width includes:
[0013] Determine the width of the picture block according to the interface width and the number of picture columns;
[0014] For any picture, determine the height of the picture block corresponding to the picture according to the shape information and the width of the picture block;
[0015] Add the picture block corresponding to the picture to the first picture column with the lowest height, and add the picture to the picture block corresponding to the picture according to the storage address information of the picture, until each picture in the at least one picture is added to the picture block corresponding to each picture, so as to realize the waterfall flow layout of the at least one picture.
[0016] Optionally, the height of the first picture column is determined according to the sum of the heights of the picture blocks in the first picture column.
[0017] Optionally, the method further includes:
[0018] If any picture is lost, the default picture is set as the picture, and the shape information of the picture is the shape information of the default picture.
[0019] In the above technical solution, when an image is lost, the user end will set the image as the default image, use the shape information of the default image to calculate the height of the image in the waterfall layout, and implement the waterfall layout of the image to avoid the inability to implement the waterfall layout when the image is lost.
[0020] In a second aspect, an embodiment of the present invention provides a waterfall flow layout device, including:
[0021] An acquisition module, used to send a display instruction to a server, and receive picture information sent by the server in response to the display instruction, wherein the display instruction indicates to obtain a picture to be displayed, and the picture information includes storage address information and shape information of at least one picture, and the shape information indicates the width and height of the picture;
[0022] A processing module is used to implement a waterfall layout of the at least one picture according to the storage address information, the shape information and the interface width.
[0023] Optionally, the shape information is determined and stored by the server based on a picture.
[0024] Optionally, the processing module is specifically used for:
[0025] Determine the width of the picture block according to the interface width and the number of picture columns;
[0026] For any picture, determine the height of the picture block corresponding to the picture according to the shape information and the width of the picture block;
[0027] Add the picture block corresponding to the picture to the first picture column with the lowest height, and add the picture to the picture block corresponding to the picture according to the storage address information of the picture, until each picture in the at least one picture is added to the picture block corresponding to each picture, so as to realize the waterfall flow layout of the at least one picture.
[0028] Optionally, the height of the first picture column is determined according to the sum of the heights of the picture blocks in the first picture column.
[0029] Optionally, the processing module is further used for:
[0030] If any picture is lost, the default picture is set as the picture, and the shape information of the picture is the shape information of the default picture.
[0031] In a third aspect, an embodiment of the present invention further provides a computer device, including:
[0032] A memory for storing program instructions;
[0033] The processor is used to call the program instructions stored in the memory and execute the above-mentioned waterfall flow layout method according to the obtained program.
[0034] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned waterfall flow layout method.
[0035] In a fifth aspect, an embodiment of the present invention further provides a computer program product, wherein the computer program product includes an executable program, and the executable program is executed by a processor to implement the above-mentioned waterfall flow layout method. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A schematic diagram of a system architecture provided by an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a flow chart of a waterfall flow layout method provided by an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of a waterfall flow layout interface provided by an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the structure of a waterfall flow layout device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] The application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions protected by the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It is known to those of ordinary skill in the art that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems. The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In the description of the present application, unless otherwise specified, the meaning of "multiple" is two or more.
[0043] Before introducing a waterfall flow layout method provided in an embodiment of the present application, in order to facilitate understanding, the background technology involved in the embodiment of the present application is first introduced below.
[0044] In Web development, waterfall layout is a common display method, especially suitable for displaying multimedia content such as pictures. Waterfall can better adapt to devices with different screen sizes and improve user experience. Effectively displaying content such as pictures and text allows users to browse web pages conveniently, bringing better visual effects and layout aesthetics to the website. Its main feature is that each element has a different height but the same width, presenting a waterfall-like layout effect as a whole, making full use of page space and displaying more content. In the process of implementing waterfall flow on PC and mobile terminals, the focus is different: PC terminals focus more on fixed element width, and the number of element columns adapts to changes in the width of the web page; mobile terminals focus more on fixed number of columns, and element width varies with different device models, and is generally used in conjunction with pull-up loading. Whether it is PC or mobile terminals, the implementation of waterfall layout needs to solve technical problems such as real-time calculation of element position and height difference processing.
[0045] The implementation of waterfall flow layout mainly involves front-end technology and layout algorithm. The following are some common implementation methods:
[0046] 1. CSS and HTML layout: Using the float attribute or flexbox layout in CSS, combined with block-level elements in HTML, you can achieve a basic waterfall layout effect. By setting the width and spacing of different columns, the content blocks can be arranged in order.
[0047] 2. JavaScript plug-ins: Using JavaScript plug-ins, such as Masonry.js, Isotope and other libraries, you can implement waterfall flow layout more flexibly. These plug-ins can automatically adjust the position of content blocks, realize dynamic rearrangement, and adapt to content of different sizes and proportions.
[0048] 3. Waterfall library: In addition to common JavaScript plug-ins, there are also some libraries specifically used to implement waterfall layout, such as Waterfall.js, etc. These libraries provide rich configuration options and animation effects, which can help developers quickly implement waterfall layout.
[0049] Therefore, the present invention provides a waterfall flow layout method, which improves the efficiency of the waterfall flow layout and avoids the inability to implement the waterfall flow layout when the image is lost.
[0050] Figure 1 A system architecture applicable to an embodiment of the present invention is exemplarily shown. The system architecture includes a server 100 . The server 100 may include a processor 110 , a communication interface 120 , and a memory 130 .
[0051] The communication interface 120 is used to transmit data with the server.
[0052] The processor 110 is the control center of the server 100, and uses various interfaces and routes to connect various parts of the entire server 100, and executes various functions of the server 100 and processes data by running or executing software programs and / or modules stored in the memory 130, and calling data stored in the memory 130. Optionally, the processor 110 may include one or more processing units.
[0053] The memory 130 can be used to store software programs and modules. The processor 110 executes various functional applications and data processing by running the software programs and modules stored in the memory 130. The memory 130 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc.; the data storage area can store data created according to business processing, etc. In addition, the memory 130 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0054] It should be noted that the above Figure 1 The structure shown is only an example and is not limited to this embodiment of the present invention.
[0055] Based on the above description, Figure 2 A schematic flow chart of a waterfall flow layout method provided by an embodiment of the present invention is exemplarily shown, and the flow chart can be executed by a waterfall flow layout device.
[0056] like Figure 2 As shown in the figure, the process specifically includes:
[0057] Step 210, sending a display instruction to the server, and receiving picture information sent by the server in response to the display instruction, wherein the display instruction indicates obtaining a picture to be displayed, and the picture information includes storage address information and shape information of at least one picture, and the shape information indicates the width and height of the picture.
[0058] In the embodiment of the present invention, when the user opens the client on the terminal device, the display instruction of the picture will be triggered and the display instruction will be sent to the server. Among them, the terminal device can be a mobile phone, a tablet computer, a laptop computer, a netbook, a car-mounted device, and a business intelligent terminal (including: videophone, conference desktop intelligent terminal, etc.), a personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) device, etc. The embodiment of the present application does not limit the specific form of the terminal device. The client can be an APP, a mini-program, a web page, etc. The embodiment of the present application does not limit the specific form of the client.
[0059] After receiving the display instruction, the server sends the picture information to the user in response to the display instruction. The picture information includes the storage address information and shape information of at least one picture to be displayed. The shape information of the picture includes the width information and height information of the picture, which is used to determine the width and height of the picture in the waterfall layout.
[0060] In some embodiments, the image information also includes text information corresponding to at least one image that needs to be displayed. In the waterfall flow layout, in addition to displaying images, text information corresponding to the images also needs to be displayed.
[0061] In a possible implementation, the shape information is confirmed and stored by the server based on the picture. Exemplarily, after the picture is uploaded to the server of the server, the get-image-size function is used to determine the width and height of the picture to obtain the shape information of the picture. Then, an association is established between the storage address information of the picture and the shape information of the picture, and the information is stored to avoid information errors when the server sends the picture information in response to the display instruction. Among them, other methods can also be used to determine the width and height of the picture, which are not specifically limited in this application. When the server sends the picture information to the user end in response to the display instruction, if the shape information corresponding to any picture does not exist, the shape information of the picture is confirmed based on the picture, and then the shape information of the picture is sent, and the shape information of the picture is stored at the same time.
[0062] Step 220: Implement a waterfall layout of the at least one picture according to the storage address information, the shape information and the interface width.
[0063] In an embodiment of the present invention, the interface width refers to the width of the display interface. For example, if the terminal device is a mobile device (such as a mobile phone, tablet, etc.), the interface width is the width of the display interface of the user's terminal device, which can be determined by the model of the mobile device; if the terminal device is a PC device (such as a desktop computer, laptop computer, etc.), the interface width is the width of the display interface of the client on the display interface of the terminal device.
[0064] Specifically, the width of the picture block is determined according to the interface width and the number of picture columns. For example, the number of picture columns of the waterfall layout is fixed, such as 2 columns. The interface width is 10 cm. The ratio of the interface width to the number of picture columns is used as the width of the picture block, such as the width of the picture block is 10 / 2=5 cm.
[0065] Then, for any picture, the height of the picture block is determined according to the shape information and the width of the picture block. It can be understood that since the picture size does not match the picture block size, the picture needs to be scaled proportionally, that is, the height and width of the picture are reduced or enlarged proportionally. When the shape information of the picture and the width of the picture block are known, the height of the picture block is determined according to the following formula:
[0066]
[0067] For example, the shape information of the picture is 15 cm in height and 10 cm in width. The width of the picture block is 5 cm. According to the above formula, the height of the picture block of the picture is calculated to be 7.5 cm.
[0068] In some embodiments, if the image has corresponding text information, the height of the image block needs to be added to the height of the text block. The width of the text block is the same as the width of the image block. The height of the text block can be fixed or determined according to the number of characters in the text information. The method for determining the height of the text block is not specifically limited here. For example, continuing with the above example, if the height of the text block is 2 cm, the height of the image block is 2+7.5=9.5 cm.
[0069] Finally, the picture block corresponding to the picture is added to the first picture column with the lowest height, and the picture is added to the picture block corresponding to the picture according to the storage address information of the picture, until each picture in at least one picture is added to the picture block corresponding to each picture, so as to realize the waterfall layout of at least one picture. Specifically, after calculating the height of the picture block, the height of each picture column is calculated to determine the first picture column with the lowest current height. The height of the picture column is determined based on the height and height of each picture block in the picture column. For example, if there are 3 picture blocks in a picture column, and the heights are 5cm, 5.5cm, and 4cm respectively, then the height of the picture column is 5+5.5+4=14.5. Exemplarily, continuing with the above example, the number of picture columns in the waterfall layout is 2, wherein the height of the picture column on the left is 12, and the height of the picture column on the right is 14.5, then the picture column on the right is the first picture column with the lowest height.
[0070] Then, the image block is added to the bottom of the first image column. Exemplarily, based on the JavaScript plug-in, the parent container (display interface) is relatively positioned, the child container (image block) is absolutely positioned, and the left value and top value of the image block are calculated. Among them, the left value represents the distance between the left border of the image block and the left border of the display interface, which can be the product of the width of the image block and the number of columns minus 1, that is, the product of the number of image columns on the left side of the image column where the image block is located and the width of the image block. For example, the number of columns of the image column on the right is 2, and the width of the image block is 5, then the left value is 5×(2-1)=5cm. The top value refers to the sum of the heights of other image blocks in the image column where the image block is located. For example, the height of the image column on the right is 14.5, which is the top value. After determining the left value and top value of the image block, the image block is added to the waterfall flow layout according to the left value and the top value, that is, the image block is added to the bottom of the image column on the right.
[0071] Finally, the image block is rendered, that is, the storage address information of the image is written into the image block corresponding to the image, so that the image can be added to the image block after loading. The above steps are repeated until the image block corresponding to each image in the at least one image to be displayed is added to the image column, and each image is added to the corresponding image block, so as to realize the waterfall layout of the at least one image to be displayed.
[0072] like Figure 3 As shown, Figure 3 A schematic diagram of a waterfall flow layout interface provided for an embodiment of the present invention. The number of picture columns of the waterfall flow layout in the figure is 3, and the number of picture columns from left to right are the 1st column, the 2nd column, and the 3rd column. Each square in the figure represents a picture block, and the number in each picture block represents the order in which the picture block is added to the 3 picture columns. The first three picture blocks are added to the three picture columns from left to right. When adding picture block No. 4, there is picture block No. 1 in the 1st column, picture block No. 2 in the 2nd column, and picture block No. 3 in the 3rd column. It can be seen from the figure that at this time, the heights of the picture columns are sorted from high to low as the 2nd column, the 1st column, and the 3rd column, so picture block No. 4 is added to the 3rd column. If there is picture block No. 8 that needs to be added to the picture column, and the picture column with the lowest height is the 1st column, then picture block No. 8 is added to the 1st column.
[0073] In some embodiments, if the image has corresponding text information, the text information of the image is added to the text block in the image block corresponding to the image. It is understood that the font and size of the text information in different text blocks should be the same. When the height of the text block is fixed, if the number of characters in the text information exceeds the number of characters that can be displayed in the text block, the excess characters will be hidden. When the height of the text block is determined according to the number of characters in the text information, there is no situation where the number of characters in the text information exceeds the number of characters that can be displayed in the text block, and all the characters in the text information can be displayed.
[0074] In a possible implementation, if any picture is lost, the user end sets the default picture to the picture, and the shape information of the picture is the shape information of the default picture. Exemplarily, when the server sends picture information in response to the display instruction, if it finds that at least one picture is lost, it sets a lost flag for the lost picture. Or when adding the picture to the picture block corresponding to the picture according to the storage address information of the picture, the user end finds that the picture is lost. Then, when the user end finds the lost flag of the picture / finds that the photo is lost, it sets the default picture to the picture, and sets the shape information of the default picture to the shape information of the picture.
[0075] In another possible implementation, if any picture is lost, the server sets the default picture to the picture, and the shape information of the picture is the shape information of the default picture. Exemplarily, when the server sends picture information in response to the display instruction, if it is found that at least one picture is lost, the default picture is set to the picture, the shape information of the default picture is set to the shape information of the picture, and sent to the user end.
[0076] In the embodiment of the present invention, the server obtains the shape information of the image in advance, and sends the storage address information and shape information of the image to the user end when responding to the display instruction of the user end, so that the user end can implement the waterfall flow layout according to the shape information of the image, avoiding the failure to obtain the shape information of the image when the image cannot be loaded in time due to network problems, and then the failure to determine the height of the image in the waterfall flow layout, affecting the efficiency of implementing the waterfall flow layout. At the same time, when it is found that the image is lost, the default image is set to the lost image, avoiding the failure to implement the waterfall flow layout due to the loss of the image.
[0077] Based on the same technical concept, Figure 4 The schematic diagram of the structure of a waterfall flow layout device provided by an embodiment of the present invention is exemplarily shown, and the device can execute the process of the waterfall flow layout method.
[0078] like Figure 4 As shown, the device specifically includes:
[0079] The acquisition module 410 is used to send a display instruction to the server, and receive picture information sent by the server in response to the display instruction, wherein the display instruction indicates to obtain a picture to be displayed, and the picture information includes storage address information and shape information of at least one picture, and the shape information indicates the width and height of the picture;
[0080] The processing module 420 is used to implement the waterfall layout of the at least one picture according to the storage address information, the shape information and the interface width.
[0081] Optionally, the shape information is determined and stored by the server based on a picture.
[0082] Optionally, the processing module 420 is specifically used for:
[0083] Determine the width of the picture block according to the interface width and the number of picture columns;
[0084] For any picture, determine the height of the picture block corresponding to the picture according to the shape information and the width of the picture block;
[0085] Add the picture block corresponding to the picture to the first picture column with the lowest height, and add the picture to the picture block corresponding to the picture according to the storage address information of the picture, until each picture in the at least one picture is added to the picture block corresponding to each picture, so as to realize the waterfall flow layout of the at least one picture.
[0086] Optionally, the height of the first picture column is determined according to the sum of the heights of the picture blocks in the first picture column.
[0087] Optionally, the processing module 420 is further configured to:
[0088] If any picture is lost, the default picture is set as the picture, and the shape information of the picture is the shape information of the default picture.
[0089] Based on the same technical concept, an embodiment of the present invention further provides a computer device, including:
[0090] A memory for storing program instructions;
[0091] The processor is used to call the program instructions stored in the memory and execute the above-mentioned waterfall flow layout method according to the obtained program.
[0092] Based on the same technical concept, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned waterfall flow layout method.
[0093] Based on the same technical concept, an embodiment of the present invention further provides a computer program product, characterized in that the computer program product includes an executable program, and the executable program is executed by a processor to implement the above-mentioned waterfall flow layout method.
[0094] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0095] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0096] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0098] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A waterfall flow layout method, characterized in that: include: Sending a display instruction to a server, and receiving picture information sent by the server in response to the display instruction, wherein the display instruction indicates obtaining a picture to be displayed, and the picture information includes storage address information and shape information of at least one picture, and the shape information indicates the width and height of the picture; A waterfall layout of the at least one picture is implemented according to the storage address information, the shape information and the interface width.
2. The method according to claim 1, characterized in that The shape information is determined and stored by the server based on the image.
3. The method according to claim 1, characterized in that Implementing a waterfall layout of the at least one picture according to the storage address information, the shape information, and the interface width includes: Determine the width of the picture block according to the interface width and the number of picture columns; For any picture, determine the height of the picture block corresponding to the picture according to the shape information and the width of the picture block; Add the picture block corresponding to the picture to the first picture column with the lowest height, and add the picture to the picture block corresponding to the picture according to the storage address information of the picture, until each picture in the at least one picture is added to the picture block corresponding to each picture, so as to realize the waterfall flow layout of the at least one picture.
4. The method according to claim 3, characterized in that The height of the first picture row is determined according to the sum of the heights of the picture blocks in the first picture row.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If any picture is lost, the default picture is set as the picture, and the shape information of the picture is the shape information of the default picture.
6. A waterfall flow layout device, characterized in that: include: An acquisition module, used to send a display instruction to a server, and receive picture information sent by the server in response to the display instruction, wherein the display instruction indicates to obtain a picture to be displayed, and the picture information includes storage address information and shape information of at least one picture, and the shape information indicates the width and height of the picture; A processing module is used to implement a waterfall layout of the at least one picture according to the storage address information, the shape information and the interface width.
7. The device according to claim 6, characterized in that The processing module is also used for: If any picture is lost, the default picture is set as the picture, and the shape information of the picture is the shape information of the default picture.
8. A computer device, characterized in that: include: A memory for storing program instructions; A processor, configured to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 5 according to the obtained program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.
10. A computer program product, characterized in that The computer program product comprises an executable program, which is executed by a processor to implement the method according to any one of claims 1 to 5.
