Picture waterfall flow planning method and device based on dynamic programming, equipment and medium

By calculating the average capacity length of column containers, image distribution is optimized, solving the problem of frequent page re-layouts in existing technologies and improving user experience.

CN119690426BActive Publication Date: 2025-11-28KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411605708.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-11-28
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

Existing technologies cause frequent page rearrangements when generating image waterfall layouts, resulting in a poor user experience, especially in lazy loading scenarios, and making it difficult to display images elegantly.

Method used

By calculating the average capacity length of the column containers and distributing images when the total length of the current images is close to the average capacity length, an image waterfall layout planning scheme is generated to reduce visual interference.

Benefits of technology

It improves the user experience in web design scenarios, reduces visual interference caused by image loading and layout, and provides a smoother and more continuous browsing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690426B_ABST
    Figure CN119690426B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of UI design, and is applied to the field of financial technology business, and discloses a picture waterfall flow planning method and device based on dynamic planning, equipment and a medium, the method comprises the following steps: calculating a capacity length average value; calculating a current picture length total sum of distributed pictures; in the case that the current picture length total sum is close to the capacity length average value, determining a target picture from a to-be-distributed picture list, distributing the target picture to the current column container, and generating a picture waterfall flow planning scheme. Through the above manner, the capacity length average value of the column container is calculated, and the distribution of the pictures is carried out based on the capacity length average value; the distribution of the pictures is carried out only when the current picture length total sum is close to the capacity length average value, the visual disturbance caused by picture loading and re-layout to the user is reduced, the picture waterfall flow planning scheme is efficiently generated, and the user experience in the webpage design scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of UI design, and is applied to the field of financial technology business, and particularly relates to a picture waterfall flow planning method and device based on dynamic programming, equipment and medium. BACKGROUND

[0002] In modern web design, waterfall layout is a popular visual display method that allows content to be dynamically displayed in multiple columns, and the height of each column can change according to the content, thereby forming a visual "waterfall" effect. This layout method is particularly suitable for picture sharing websites, news aggregation platforms, etc., and can provide rich visual experience and flexible content display.

[0003] The mainstream waterfall flow calculation idea of the community is to distribute pictures with known heights (picture height is obtained after loading to trigger a new layout) to column containers, and record the real-time height of each column. For each new picture, the distribution rule is to put it into the shortest column. This algorithm is a greedy algorithm in a professional sense. The existing technology has some defects when processing waterfall layout. The most important problem is that when all pictures are loaded, the page will be laid out again, which will interfere with the user. Especially in the lazy loading scenario, the picture is loaded when the page is scrolled, and the existing technology is difficult to display and process gracefully, resulting in poor user experience. Therefore, how to more efficiently generate a picture waterfall flow planning scheme to improve the user experience in the web design scenario has become a technical problem to be solved at present. SUMMARY

[0004] The present application provides a picture waterfall flow planning method and device based on dynamic programming, which more efficiently generates a picture waterfall flow planning scheme to improve the user experience in the web design scenario.

[0005] In a first aspect, the present application provides a picture waterfall flow planning method based on dynamic programming, which comprises:

[0006] calculating the capacity length average of the current column container;

[0007] distributing each preset picture in the current column container as a distributed picture, and calculating the current picture length sum of the distributed picture;

[0008] In the case where the current picture length sum is close to the capacity length average, determining a target picture from the list of pictures to be distributed, distributing the target picture to the current column container, and generating a picture waterfall flow planning scheme;

[0009] wherein the preset picture includes the picture to be distributed and the distributed picture.

[0010] In a second aspect, the present application also provides a picture waterfall flow planning device based on dynamic programming, the device comprising:

[0011] a capacity length average calculation module configured to calculate a capacity length average of a current column container;

[0012] a current picture length total calculation module configured to take each preset picture that has been distributed into the current column container as a distributed picture, and calculate a current picture length total of the distributed pictures;

[0013] a picture waterfall flow planning scheme generation module configured to, in a case where the current picture length total is close to the capacity length average, determine a target picture from a list of pictures to be distributed, distribute the target picture into the current column container, and generate a picture waterfall flow planning scheme;

[0014] wherein the preset pictures comprise the pictures to be distributed and the distributed pictures.

[0015] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is configured to store a computer program; the processor is configured to execute the computer program and implement the picture waterfall flow planning method based on dynamic programming as described above when executing the computer program.

[0016] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program, when executed by a processor, causes the processor to implement the picture waterfall flow planning method based on dynamic programming as described above.

[0017] The present application discloses a picture waterfall flow planning method, device, equipment and medium based on dynamic programming, the picture waterfall flow planning method based on dynamic programming comprising calculating a capacity length average of a current column container; taking each preset picture that has been distributed into the current column container as a distributed picture, and calculating a current picture length total of the distributed pictures; in a case where the current picture length total is close to the capacity length average, determining a target picture from a list of pictures to be distributed, distributing the target picture into the current column container, and generating a picture waterfall flow planning scheme; wherein the preset pictures comprise the pictures to be distributed and the distributed pictures. Through the above manner, the present application calculates the capacity length average of the column container, and distributes the pictures based on the capacity length average. The pictures are distributed only when the current picture length total is close to the capacity length average, which reduces the visual interference caused to the user by picture loading and re-layout, efficiently generates the picture waterfall flow planning scheme, and further improves the user experience in the webpage design scenario. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0019] Figure 1 is a schematic flow chart of a picture waterfall flow planning method based on dynamic programming provided by the first embodiment of the present application;

[0020] Figure 2 is a schematic flow chart of a picture waterfall flow planning method based on dynamic programming provided by the second embodiment of the present application;

[0021] Figure 3 is a schematic flow chart of a picture waterfall flow planning method based on dynamic programming provided by the third embodiment of the present application;

[0022] Figure 4 is a schematic block diagram of a picture waterfall flow planning device based on dynamic programming provided by the embodiments of the present application;

[0023] Figure 5 is a schematic block diagram of the structure of a computer device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0024] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort belong to the scope of protection of the present application.

[0025] The flow chart shown in the drawings is only an example description, and does not necessarily include all the contents and operations / steps, nor does it have to be executed in the described order. For example, some operations / steps can be decomposed, combined or partially merged, so the actual execution order can be changed according to the actual situation.

[0026] It should be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and the appended claims of the present application, unless otherwise clearly indicated by the context, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0027] It should also be understood that the term "and / or" as used herein refers to any one of the associated listed items, or a combination of any and all of the associated listed items, and includes all possible combinations thereof.

[0028] Embodiments of the present application provide a dynamic programming-based picture waterfall flow planning method, device, equipment and medium. The dynamic programming-based picture waterfall flow planning method can be applied to a server, the length average of the column container is calculated, and the distribution of pictures is performed based on the length average, the distribution of pictures is performed only when the current picture length sum is close to the length average, the visual disturbance caused by picture loading and re-layout to the user is reduced, the picture waterfall flow planning scheme is efficiently generated, and the user experience in the webpage design scene is improved. The server can be a stand-alone server or a server cluster.

[0029] Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.

[0030] Please refer to Figure 1 , Figure 1 is a schematic flow chart of a dynamic programming-based picture waterfall flow planning method provided by the first embodiment of the present application. The dynamic programming-based picture waterfall flow planning method can be applied to a server, the length average of the column container is calculated, and the distribution of pictures is performed based on the length average, the distribution of pictures is performed only when the current picture length sum is close to the length average, the visual disturbance caused by picture loading and re-layout to the user is reduced, the picture waterfall flow planning scheme is efficiently generated, and the user experience in the webpage design scene is improved.

[0031] As shown in Figure 1 , the dynamic programming-based picture waterfall flow planning method specifically includes steps S10 to S30.

[0032] Step S10, calculating the length average of the capacity of the current column container;

[0033] Step S20, regarding each preset picture distributed to the current column container as a distributed picture, and calculating the current picture length sum of the distributed pictures;

[0034] Step S30, in the case where the current picture length sum is close to the length average of the capacity, determining a target picture from a list of pictures to be distributed, distributing the target picture to the current column container, and generating a picture waterfall flow planning scheme;

[0035] Among them, the preset picture includes the picture to be distributed and the distributed picture.

[0036] In one embodiment, the capacity of each column container, i.e. the maximum total length of pictures that each column container can hold, is determined, the average of the capacities of all column containers is calculated by averaging the maximum total length of pictures of each column container, and the average capacity length is obtained. Each preset picture that has been distributed into the current column container is marked as a distributed picture, the current total length of pictures of these distributed pictures is calculated, and the current total length of pictures of the distributed pictures is compared with the average capacity length.

[0037] If the current total length of pictures is close to the average capacity length (e.g. within a certain preset threshold), the next step is continued; otherwise, a new picture is waited for or the layout of the distributed pictures is adjusted.

[0038] A target picture is selected from the list of pictures to be distributed, the size of the target picture is evaluated to ensure that it can fit into the remaining space of the current column container. The target picture is distributed into the current column container, the list of distributed pictures is updated, the target picture is removed from the list of pictures to be distributed and added to the list of distributed pictures. The picture waterfall planning scheme is generated or updated according to the updated list of distributed pictures and the new total length.

[0039] The embodiment discloses a picture waterfall planning method and device based on dynamic programming, equipment and medium. The picture waterfall planning method based on dynamic programming comprises calculating an average capacity length of a current column container; regarding each preset picture that has been distributed into the current column container as a distributed picture and calculating a current total length of pictures of the distributed picture; in the case that the current total length of pictures is close to the average capacity length, determining a target picture from a list of pictures to be distributed, distributing the target picture into the current column container, and generating a picture waterfall planning scheme; wherein the preset picture comprises the picture to be distributed and the distributed picture. Through the above manner, the average capacity length of the column container is calculated, and the distribution of the picture is performed based on the average capacity length. The distribution of the picture is performed only when the current total length of pictures is close to the average capacity length, thereby reducing the visual disturbance to the user caused by picture loading and re-layout, efficiently generating the picture waterfall planning scheme, and further improving the user experience in the webpage design scenario.

[0040] Please refer to Figure 2 , Figure 2 is a schematic flowchart of a picture waterfall planning method based on dynamic programming provided by the second embodiment of the present application. The picture waterfall planning method based on dynamic programming can be applied to a server, and can more effectively distribute pictures by calculating the average capacity length of the column container and taking it as a reference standard for picture distribution, ensuring that the current total length of pictures is close to the average capacity length, reducing the number of page re-layouts, and providing a smoother and more continuous browsing experience.

[0041] Based on Figure 1 In the embodiment shown, the embodiment includes steps S21 to S22 before step S30. Figure 2 As shown, steps S21 to S22 are included before step S30.

[0042] Step S21, obtaining a preset first length value, calculating a first length sum of the current picture length sum and the preset first length value;

[0043] Step S22, based on the first length sum, the current picture length sum and the capacity length average, judging whether the current picture length sum is close to the capacity length average.

[0044] In one embodiment, the definition of the preset first length value is determined, which is usually a predefined reference value, for comparison with the current picture length sum. The current picture length sum is added to the preset first length value to obtain the first length sum, which is recorded or stored for subsequent comparison.

[0045] The first length sum is compared with the capacity length average to determine a close threshold value for judging whether the current picture length sum is close enough to the capacity length average. If the difference between the first length sum and the capacity length average is less than or equal to the preset threshold value, it is considered that the current picture length sum is close to the capacity length average. If the difference is greater than the threshold value, it is considered that the current picture length sum is not close to the capacity length average, and it may be necessary to adjust the distribution of pictures or wait for more pictures to be loaded.

[0046] The embodiment discloses a picture waterfall flow planning method and device based on dynamic programming, equipment and medium. The picture waterfall flow planning method based on dynamic programming includes calculating the capacity length average of the current column container; taking each preset picture distributed to the current column container as a distributed picture and calculating the current picture length sum of the distributed picture; obtaining a preset first length value, calculating a first length sum of the current picture length sum and the preset first length value; based on the first length sum, the current picture length sum and the capacity length average, judging whether the current picture length sum is close to the capacity length average; in the case that the current picture length sum is close to the capacity length average, determining a target picture from a list of pictures to be distributed, distributing the target picture to the current column container, and generating a picture waterfall flow planning scheme; wherein the preset picture includes the picture to be distributed and the distributed picture. Through the above manner, the capacity length average of the column container is calculated and used as a reference standard for picture distribution, which can more effectively allocate pictures, ensure that the current picture length sum is close to the capacity length average, reduce the number of page layout, and provide a smoother and continuous browsing experience.

[0047] based on Figure 2 In the embodiment shown in the figure, step S202 includes:

[0048] In the case where the current picture length sum is less than the capacity length average and the first length sum is greater than the capacity length average, it is determined that the current picture length sum is close to the capacity length average.

[0049] In one embodiment, the current picture length sum is calculated, the capacity length average is obtained, and the current picture length sum is compared with the capacity length average to confirm that the current picture length sum is less than the capacity length average.

[0050] A preset first length value is obtained, the current picture length sum is added to the preset first length value to obtain a first length sum, and it is confirmed that the first length sum is greater than the capacity length average.

[0051] A threshold value is defined to determine the specific standard of "close". The threshold value can be a percentage of the capacity length average, or a fixed numerical difference. The difference between the first length sum and the capacity length average is calculated. If the difference between the first length sum and the capacity length average is less than or equal to the preset threshold value, it is determined that the current picture length sum is close to the capacity length average.

[0052] The embodiment discloses a picture waterfall flow planning method, device and equipment based on dynamic programming and a medium. The picture waterfall flow planning method based on dynamic programming includes calculating a capacity length average of a current column container; taking each preset picture that has been distributed into the current column container as a distributed picture, and calculating a current picture length sum of the distributed picture; obtaining a preset first length value, and calculating a first length sum of the current picture length sum and the preset first length value; in the case where the current picture length sum is less than the capacity length average and the first length sum is greater than the capacity length average, it is determined that the current picture length sum is close to the capacity length average; in the case where the current picture length sum is close to the capacity length average, a target picture is determined from a list of pictures to be distributed, the target picture is distributed into the current column container, and a picture waterfall flow planning scheme is generated; wherein the preset picture includes the picture to be distributed and the distributed picture. In the foregoing manner, the capacity length average of the column container is calculated, and the distribution of the picture is performed based on the capacity length average. The distribution of the picture is performed only when the current picture length sum is close to the capacity length average, thereby reducing the visual interference caused to the user due to picture loading and re-layout, efficiently generating the picture waterfall flow planning scheme, and further improving the user experience in the webpage design scenario.

[0053] Please refer to Figure 3 ,Figure 3 is a schematic flowchart of a picture waterfall flow planning method based on dynamic programming provided by a third embodiment of the present application. The picture waterfall flow planning method based on dynamic programming can be applied to a server, used for calculating the average length of the capacity of the column container, and distributing pictures based on this as a reference, and the distribution of pictures is only carried out when the total length of the current picture is close to the average length of the capacity, reducing the visual disturbance to the user caused by picture loading and relayout, efficiently generating a picture waterfall flow planning scheme, and thus improving the user experience in the webpage design scene.

[0054] Based on Figure 2 the embodiment shown in the figure, the embodiment includes steps S301 to S304. Figure 3 As shown in the figure, step S30 includes steps S301 to S304.

[0055] Step S301, calculating a first difference value between the first length total sum and the average length of the capacity;

[0056] Step S302, finding a to-be-distributed picture with a preset second length value from the to-be-distributed picture list, and calculating a second length total sum between the preset second length value and the current picture length total sum;

[0057] Step S303, calculating a second difference value between the second length total sum and the average length of the capacity;

[0058] Step S304, in the case where the second difference value is less than the first difference value, determining the to-be-distributed picture with the preset second length value as the target picture.

[0059] In one embodiment, the first length total sum is determined, i.e., the sum of the current picture length total sum and the preset first length value, and the difference value between the first length total sum and the average length of the capacity is calculated, which is recorded as the first difference value. A to-be-distributed picture with a length equal to the preset second length value is found from the to-be-distributed picture list, and it is confirmed whether the found picture meets the preset condition, i.e., whether the length matches the preset second length value.

[0060] The preset second length value is added to the current picture length total sum to obtain a second length total sum, and the difference value between the second length total sum and the average length of the capacity is calculated, which is recorded as the second difference value.

[0061] The second difference value and the first difference value are compared in size, and if the second difference value is less than the first difference value, it means that after adding the to-be-distributed picture with the preset second length value, the total sum is closer to the average length of the capacity. In the case where the second difference value is less than the first difference value, the to-be-distributed picture with the preset second length value is determined as the target picture.

[0062] The embodiment discloses a picture waterfall flow planning method and device based on dynamic programming, equipment and medium. The picture waterfall flow planning method based on dynamic programming comprises the following steps: calculating the capacity length average of a current column container; regarding each preset picture distributed into the current column container as a distributed picture, and calculating the current picture length sum of the distributed picture; obtaining a preset first length value, and calculating the first length sum of the current picture length sum and the preset first length value; in the case that the current picture length sum is less than the capacity length average, and the first length sum is greater than the capacity length average, it is determined that the current picture length sum is close to the capacity length average; calculating the first difference value between the first length sum and the capacity length average; searching for a to-be-distributed picture with a preset second length value from the to-be-distributed picture list, calculating the second length sum between the preset second length value and the current picture length sum, calculating the second difference value between the second length sum and the capacity length average, and in the case that the second difference value is less than the first difference value, determining the to-be-distributed picture with the preset second length value as the target picture, distributing the target picture into the current column container, and generating a picture waterfall flow planning scheme; wherein the preset picture comprises the to-be-distributed picture and the distributed picture. Through the above manner, the capacity length average of the column container is calculated, and the distribution of the picture is performed based on the capacity length average. The distribution of the picture is performed only when the current picture length sum is close to the capacity length average, the visual disturbance caused by picture loading and re-layout to the user is reduced, the picture waterfall flow planning scheme is efficiently generated, and the user experience in the webpage design scene is improved.

[0063] Based on Figure 1 In the embodiment, before step S30, the following steps are included.

[0064] Obtaining the single picture length of each preset picture;

[0065] Arranging each preset picture in descending order according to the single picture length to generate an all-picture list;

[0066] Removing all distributed pictures from the all-picture list to generate the to-be-distributed picture list.

[0067] Based on any of the above embodiments, in the embodiment, step S10 comprises the following steps:

[0068] Obtaining the capacity length of other column containers arranged side by side with the current column container;

[0069] Based on the capacity length of each other column container, calculating the other column container length average, and taking the other column container length average as the capacity length average of the current column container.

[0070] In combination with the above embodiments, the present embodiment will be exemplarily described in combination with specific application scenarios. It can be understood that the above embodiments are not limited to the following examples.

[0071] An online picture sharing social platform, users can upload and browse a large number of pictures. In order to provide better user experience, the platform uses waterfall layout to display pictures, making the page layout more dynamic and beautiful. However, with the increase of the number of pictures and the improvement of user requirements for loading speed, the existing waterfall layout algorithm has encountered challenges in picture loading and layout optimization.

[0072] During the picture loading process, the existing waterfall algorithm causes the page to be frequently relaid out, and the user experience is poor when browsing. In addition, the relayout after the picture loading is completed also makes the page display not smooth enough, especially in the lazy loading scenario, that is, when the user scrolls the page, the new picture is loaded.

[0073] The present embodiment adopts a waterfall algorithm based on dynamic programming idea, which optimizes the distribution and layout of pictures by calculating the average length of column container capacity and the total length of current pictures, and a preset first length value.

[0074] Specifically, a capacity, that is, the total length of the maximum displayable pictures, is allocated to each column container, the average value of the capacities of all column containers is calculated to obtain the average length of the capacity. The user starts to browse the pictures, and the system starts to load the pictures. For each column container, the total length of the loaded pictures is calculated. The relationship between the current picture length total and the capacity length average, and the first length total (the current picture length total plus the preset first length value) and the capacity length average is compared.

[0075] If the current picture length total is less than the capacity length average, and the first length total is greater than the capacity length average, it is determined that the current picture length total is close to the capacity length average, a target picture is selected from the list of pictures to be distributed. The target picture is distributed to the current column container, and the list of distributed pictures and the current picture length total are updated, and a waterfall planning scheme is generated:

[0076] Please refer to Figure 4 , Figure 4 is a schematic block diagram of a picture waterfall planning device based on dynamic programming provided by the embodiment of the present application, which is used to execute the picture waterfall planning method based on dynamic programming described above. Wherein, the picture waterfall planning device based on dynamic programming can be configured in a server.

[0077] As shown in Figure 4 , the picture waterfall planning device based on dynamic programming 400 includes:

[0078] The capacity length average calculating module 410 is configured to calculate a capacity length average of the current column container;

[0079] The current picture length sum calculating module 420 is configured to take each preset picture distributed into the current column container as a distributed picture, and calculate a current picture length sum of the distributed picture;

[0080] The picture waterfall flow planning scheme generating module 430 is configured to, when the current picture length sum is close to the capacity length average, determine a target picture from the to-be-distributed picture list, distribute the target picture into the current column container, and generate a picture waterfall flow planning scheme.

[0081] The preset picture includes the to-be-distributed picture and the distributed picture.

[0082] Further, the picture waterfall flow planning device 400 based on dynamic programming further comprises:

[0083] The first length sum calculating module is configured to obtain a preset first length value, and calculate a first length sum of the current picture length sum and the preset first length value.

[0084] The capacity length average judging module is configured to judge whether the current picture length sum is close to the capacity length average based on the first length sum, the current picture length sum and the capacity length average.

[0085] Further, the capacity length average judging module comprises:

[0086] The close-to-capacity-length-average judging unit is configured to, when the current picture length sum is less than the capacity length average and the first length sum is greater than the capacity length average, determine that the current picture length sum is close to the capacity length average.

[0087] Further, the picture waterfall flow planning scheme generating module 430 comprises:

[0088] The first difference calculating unit is configured to calculate a first difference between the first length sum and the capacity length average.

[0089] The second length sum calculating unit is configured to find a to-be-distributed picture with a preset second length value from the to-be-distributed picture list, and calculate a second length sum between the preset second length value and the current picture length sum.

[0090] The second difference calculating unit is configured to calculate a second difference between the second length sum and the capacity length average.

[0091] The target picture determining unit is configured to determine the picture to be distributed with the preset second length value as the target picture when the second difference is less than the first difference.

[0092] Further, the picture waterfall flow planning scheme generation module 430 further comprises:

[0093] The adjacent column container distribution unit is configured to distribute the picture to be distributed with the preset second length value to an adjacent column container of the current column container when the second difference is greater than the first difference.

[0094] Further, the picture waterfall flow planning device 400 based on dynamic programming further comprises:

[0095] The single picture length obtaining module is configured to obtain the single picture length of each preset picture.

[0096] The all-picture list generation module is configured to arrange each preset picture in descending order according to the single picture length, and generate an all-picture list.

[0097] The picture to be distributed list generation module is configured to remove all distributed pictures from the all-picture list, and generate a picture to be distributed list.

[0098] Further, the capacity length average calculation module 410 comprises:

[0099] The other column container capacity length obtaining unit is configured to obtain the capacity length of other column containers parallel to the current column container.

[0100] The capacity length average determining unit is configured to calculate the other column container length average based on the capacity length of each other column container, and take the other column container length average as the capacity length average of the current column container.

[0101] It should be noted that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the foregoing method embodiments, and will not be described herein.

[0102] The above-described device can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 5 .

[0103] Please refer to Figure 5 , Figure 5 is a structural schematic block diagram of a computer device provided by an embodiment of the present application. The computer device can be a server.

[0104] Refer toFigure 5 The computer device comprises a processor, a memory and a network interface connected through a system bus, wherein the memory can comprise a non-volatile storage medium and an internal memory.

[0105] The non-volatile storage medium can store an operating system and a computer program. The computer program comprises program instructions which, when executed, can cause the processor to perform any one of the picture waterfall flow planning methods based on dynamic programming.

[0106] The processor is used to provide computing and control capabilities to support the operation of the entire computer device.

[0107] The internal memory provides an environment for the execution of the computer program in the non-volatile storage medium, which, when executed by the processor, can cause the processor to perform any one of the picture waterfall flow planning methods based on dynamic programming.

[0108] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that, Figure 5 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can comprise more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0109] It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0110] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0111] Calculate the average length of the capacity of the current column container;

[0112] Distribute each preset picture in the current column container as a distributed picture, and calculate the total length of the current picture of the distributed picture;

[0113] In a case where the current picture length sum is close to the capacity length average, a target picture is determined from a list of pictures to be distributed, the target picture is distributed into the current column container, and a picture waterfall planning scheme is generated.

[0114] The preset pictures include the pictures to be distributed and the pictures already distributed.

[0115] In an embodiment, before the current picture length sum is close to the capacity length average, the target picture is determined from the list of pictures to be distributed, the target picture is distributed into the current column container, and the picture waterfall planning scheme is generated, the following is implemented:

[0116] A preset first length value is obtained, and a first length sum of the current picture length sum and the preset first length value is calculated.

[0117] Based on the first length sum, the current picture length sum, and the capacity length average, it is determined whether the current picture length sum is close to the capacity length average.

[0118] In an embodiment, based on the first length sum, the current picture length sum, and the capacity length average, it is determined whether the current picture length sum is close to the capacity length average, and the following is implemented:

[0119] In a case where the current picture length sum is less than the capacity length average and the first length sum is greater than the capacity length average, it is determined that the current picture length sum is close to the capacity length average.

[0120] In an embodiment, in a case where the current picture length sum is close to the capacity length average, the target picture is determined from the list of pictures to be distributed, and the following is implemented:

[0121] A first difference between the first length sum and the capacity length average is calculated.

[0122] A picture to be distributed with a preset second length value is searched for from the list of pictures to be distributed, and a second length sum between the preset second length value and the current picture length sum is calculated.

[0123] A second difference between the second length sum and the capacity length average is calculated.

[0124] In a case where the second difference is less than the first difference, the picture to be distributed with the preset second length value is determined as the target picture.

[0125] In one embodiment, in the case that the second difference is less than the first difference, before determining the target picture with the preset second length value from the pictures to be distributed, the method comprises:

[0126] In the case that the second difference is greater than the first difference, the picture with the preset second length value is distributed to the adjacent column container of the current column container.

[0127] In one embodiment, in the case that the current picture length sum is close to the capacity length average, before determining the target picture from the list of pictures to be distributed, distributing the target picture to the current column container, and generating the picture waterfall flow planning scheme, the method comprises:

[0128] Obtaining the length of each preset picture;

[0129] Arranging each preset picture in descending order according to the length of each picture to generate a list of all pictures;

[0130] Removing all distributed pictures from the list of all pictures to generate the list of pictures to be distributed.

[0131] In one embodiment, the capacity length average of the current column container is calculated, and the method comprises:

[0132] Obtaining the capacity length of other column containers arranged side by side with the current column container;

[0133] Based on the capacity length of each other column container, calculating the other column container length average, and taking the other column container length average as the capacity length average of the current column container.

[0134] In an embodiment of the present application, a computer readable storage medium is also provided, which stores a computer program, the computer program comprising program instructions, and the processor executes the program instructions to implement any one of the picture waterfall flow planning methods based on dynamic planning provided by the embodiments of the present application.

[0135] The computer readable storage medium can be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.

[0136] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A dynamic programming-based image waterfall layout planning method, characterized in that, include: Calculate the average capacity length of the current column container; Each preset image that has been distributed to the current column container is taken as a distributed image, and the total length of the current image of the distributed images is calculated; Obtain a preset first length value, and calculate the first length sum of the current image length and the preset first length value; Based on the first total length, the current total length of the image, and the average file length, determine whether the current total length is close to the average file length. The step of determining whether the sum of the current image lengths is close to the average of the file sizes, based on the first total length, the current total image length, and the average file size length, includes: If the sum of the current image lengths is less than the average capacity length, and the sum of the first lengths is greater than the average capacity length, then the sum of the current image lengths is determined to be close to the average capacity length. When the total length of the current images is close to the average length of the capacity, a target image is determined from the list of images to be distributed, and the target image is distributed to the current column container to generate an image waterfall flow planning scheme. The step of determining the target image from the list of images to be distributed when the total length of the current images is close to the average file size length includes: Calculate the first difference between the sum of the first lengths and the average of the capacity lengths; Find an image to be distributed from the list of images to be distributed that has a length of a preset second length value, and calculate the second length sum between the preset second length value and the sum of the lengths of the current images; Calculate the second difference between the second total length and the average capacity length; If the second difference is less than the first difference, the image to be distributed with a length equal to the preset second length value is determined as the target image; The preset image includes the image to be distributed and the image already distributed.

2. The image waterfall layout planning method based on dynamic programming according to claim 1, characterized in that, Before determining the image to be distributed with a length equal to the preset second length value as the target image when the second difference is less than the first difference, the process includes: If the second difference is greater than the first difference, the image to be distributed, with a length equal to the preset second length value, is distributed to the adjacent column container of the current column container.

3. The image waterfall layout planning method based on dynamic programming according to claim 1, characterized in that, Before determining the target image from the list of images to be distributed and distributing the target image to the current column container, and generating the image waterfall layout plan when the total length of the current images is close to the average length of the capacity, the process includes: Obtain the length of a single image of each of the preset images; Arrange the preset images in descending order according to the length of each individual image to generate a complete image list; Remove all distributed images from the total image list to generate the image list to be distributed.

4. The image waterfall layout planning method based on dynamic programming according to any one of claims 1-3, characterized in that, The calculation of the average capacity length of the current column container includes: Get the capacity length of other column containers that are parallel to the current column container; Based on the capacity length of each of the other column containers, calculate the average length of the other column containers, and use the average length of the other column containers as the average capacity length of the current column container.

5. A dynamic programming-based image waterfall flow planning device, characterized in that, include: The capacity length average calculation module is used to calculate the average capacity length of the current column container; The current image length sum calculation module is used to take each preset image that has been distributed to the current column container as a distributed image and calculate the current image length sum of the distributed images; The image waterfall flow planning scheme generation module is used to determine the target image from the list of images to be distributed when the total length of the current images is close to the average length of the capacity, and distribute the target image to the current column container to generate an image waterfall flow planning scheme. The preset image includes the image to be distributed and the image already distributed; The image waterfall flow planning device based on dynamic programming further includes: The first length sum calculation module is used to obtain a preset first length value and calculate the first length sum of the current image length and the preset first length value. The capacity length average judgment module is used to determine whether the current image length average is close to the capacity length average based on the first total length, the current image length average, and the capacity length average. The capacity length average determination module includes: The unit for determining the approximate average length of the current image is used to determine that the sum of the current image length is close to the average length of the current image when the sum of the current image lengths is less than the average length of the current image and the sum of the first lengths is greater than the average length of the current image. The image waterfall flow planning scheme generation module includes: The first difference calculation unit is used to calculate the first difference between the first total length and the average capacity length; The second length sum calculation unit is used to find images to be distributed from the list of images to be distributed that have a length of a preset second length value, and to calculate the second length sum between the preset second length value and the current image length sum. The second difference calculation unit is used to calculate the second difference between the second total length and the average capacity length; The target image determination unit is used to determine the image to be distributed with a length of the preset second length value as the target image when the second difference is less than the first difference.

6. A computer device, characterized in that, The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and, in executing the computer program, implement the image waterfall planning method based on dynamic programming as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the image waterfall planning method based on dynamic programming as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Picture display method and device

    CN108874257A

  • Method and system for displaying picture in waterfall flow comparison mode

    CN114385295A