Multi-picture layout method, multi-picture layout device, and electronic device

By intelligently and automatically arranging multiple entry points in the display area, the problem of high investment in multi-image layout design and inability to flexibly meet business needs has been solved, achieving efficient and intelligent multi-image layout effects.

CN114241092BActive Publication Date: 2025-11-25BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111547042.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2025-11-25
Estimated Expiration
2041-12-16

AI Technical Summary

Technical Problem

Existing technologies for multi-image layout design are costly and cannot flexibly adapt to changing business needs, resulting in low output efficiency.

Method used

By obtaining the number of images to be displayed in the display area and the number of virtual squares that can be arranged, multiple entrances to the display area that are arranged in at least one row are determined. The size of each entrance is based on the side length of the virtual square for intelligent automatic layout, reducing the designer's input cost and improving layout efficiency.

Benefits of technology

It enables efficient output of multi-image layouts, flexibly responds to changing business needs, reduces the manpower and time costs for designers, and improves the intelligence and user-friendliness of layout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114241092B_ABST
    Figure CN114241092B_ABST
Patent Text Reader

Abstract

Provided are a multi-image layout method, a multi-image layout device, an electronic device, a computer readable storage medium and a computer program product, relating to the technical field of computers, and in particular to the technical field of artificial intelligence. The implementation scheme is as follows: obtaining a number m of images to be displayed in a display area, and a number n of virtual squares allowed to be arranged along a row direction in the display area, where m >= 2 and n >= 2; and based on the number m and the number n, determining m entries arranged in at least one row in the display area, where each entry is used to fill one image, the size of each entry along a column direction is equal to the side length of the virtual square, the size of each entry along the row direction is equal to an integer multiple of the side length of the virtual square, and the sum of the sizes of the entries in each row along the row direction is equal to n times the side length of the virtual square. The technical scheme of the embodiment of the present disclosure can improve the output efficiency of multi-image layout and flexibly cope with changing business requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to the field of artificial intelligence technology, specifically to a multi-image typesetting method, a multi-image typesetting device, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] Web pages and application interfaces often display multiple images in a layout. With the continuous development of the internet and information technology, the amount and speed of updates of various information are growing rapidly. How to improve the output efficiency of multi-image layouts and flexibly respond to ever-changing business needs is a technical problem that urgently needs to be solved.

[0003] The methods described in this section are not necessarily methods that had been previously conceived or adopted. Unless otherwise specified, no method described in this section should be assumed to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to be accepted in any prior art. Summary of the Invention

[0004] This disclosure provides a method for typesetting multiple images, a device for typesetting multiple images, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] According to one aspect of this disclosure, a method for multi-image layout is provided, including:

[0006] Obtain the number of images m to be displayed in the display area, and the number n of virtual squares allowed to be arranged along the row direction in the display area, where m ≥ 2 and n ≥ 2; and

[0007] Based on the quantity m and the quantity n, determine m entrances in the display area arranged in at least one row, where each entrance is used to fill an image, the size of each entrance along the column direction is equal to the side length of the virtual square, the size of each entrance along the row direction is equal to an integer multiple of the side length of the virtual square, and the sum of the sizes of the entrances in each row along the row direction is equal to n times the side length of the virtual square.

[0008] According to another aspect of this disclosure, a multi-image typesetting apparatus is provided, comprising:

[0009] The acquisition unit is configured to acquire the number m of images to be displayed in the display area, and the number n of virtual squares allowed to be arranged along the row direction in the display area, where m ≥ 2 and n ≥ 2; and

[0010] The unit is configured to determine m entrances in the display area arranged in at least one row based on the quantity m and the quantity n, wherein each entrance is used to fill an image, the size of each entrance along the column direction is equal to the side length of the virtual square, the size of each entrance along the row direction is equal to an integer multiple of the side length of the virtual square, and the sum of the sizes of the entrances in each row along the row direction is equal to n times the side length of the virtual square.

[0011] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the multi-image layout method.

[0012] According to another aspect of this disclosure, a computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are configured to cause a computer to perform the multi-image layout method described above.

[0013] According to another aspect of this disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, implements the multi-image layout method.

[0014] According to one or more embodiments of this disclosure, the output efficiency of multi-image layout can be improved, and the business needs can be flexibly met.

[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0016] The accompanying drawings exemplify embodiments and form part of the specification, serving to explain exemplary implementations of the embodiments together with the textual description. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0017] Figure 1 A schematic diagram of an exemplary system in which the various methods described herein may be implemented according to embodiments of the present disclosure is shown;

[0018] Figure 2 A flowchart of a multi-figure typesetting method according to an embodiment of the present disclosure is shown;

[0019] Figure 3A A schematic diagram illustrating a possible layout result according to an embodiment of the present disclosure is shown;

[0020] Figure 3B A schematic diagram illustrating a possible layout result according to an embodiment of the present disclosure is shown;

[0021] Figure 3C A schematic diagram illustrating a possible layout result according to an embodiment of the present disclosure is shown;

[0022] Figure 4 A flowchart of a multi-figure typesetting method according to an embodiment of the present disclosure is shown;

[0023] Figure 5 A schematic diagram illustrating a possible layout display result according to an embodiment of the present disclosure is shown;

[0024] Figure 6 A structural block diagram of a multi-figure typesetting apparatus according to an embodiment of the present disclosure is shown; and

[0025] Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0026] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0027] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.

[0028] The terminology used in the description of the various examples described in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.

[0029] When multiple images are displayed in a showcase area, each image is typically rectangular. The images can be the same or different sizes, and the overall arrangement forms a rectangle. Within the showcase area, each image occupies a designated space; this space can be understood as a placeholder within the showcase area.

[0030] The inventors of this disclosure understand that in related technologies, the number of images in multi-image layouts varies, and the display requirements are also diverse. For example, the number of images to be displayed differs in different display scenarios, or the images need to be arranged in a hierarchical manner with different sizes. To cope with the changing scenario requirements, designers typically design various layout styles in advance based on the various situations that may be covered. This undoubtedly greatly increases the cost of design investment, leading to low design output efficiency and an inability to cope with changing business needs.

[0031] Based on this, the present disclosure provides a multi-image typesetting method, a multi-image typesetting device, an electronic device, a computer-readable storage medium, and a computer program product to improve the output efficiency of multi-image typesetting and flexibly respond to changing business needs.

[0032] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0033] Figure 1 A schematic diagram of an exemplary system 100 in which the various methods and apparatus described herein can be implemented according to embodiments of this disclosure is shown. Reference Figure 1 The system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to execute one or more applications.

[0034] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable the execution of methods according to embodiments of this disclosure.

[0035] In some embodiments, server 120 may also provide other services or software applications that may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to users of client devices 101, 102, 103, 104, 105 and / or 106 under a Software as a Service (SaaS) model.

[0036] exist Figure 1In the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can sequentially interact with server 120 using one or more client applications to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from system 100. Therefore, Figure 1 This is an example of a system used to implement the various methods described herein, and is not intended to be limiting.

[0037] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to implement multi-image layout. The client devices can provide an interface that allows users to interact with the client devices. The client devices can also output information to the user through this interface. Although... Figure 1 Only six client devices are described, but those skilled in the art will understand that this disclosure can support any number of client devices.

[0038] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices can run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices can run a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short message service (SMS) applications, and can use various communication protocols.

[0039] Network 110 can be any type of network well known to those skilled in the art, and can support data communication using any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.). By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0040] Server 120 may include one or more general-purpose computers, special-purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0041] The computing unit in server 120 can run one or more operating systems, including any of the aforementioned operating systems and any commercially available server operating system. Server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0042] In some implementations, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105 and / or 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105 and / or 106.

[0043] In some implementations, server 120 can be a server for a distributed system or a server integrated with blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.

[0044] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. Databases 130 may reside in various locations. For example, a database used by server 120 may be local to server 120, or it may be located away from server 120 and may communicate with server 120 via a network-based or dedicated connection. Databases 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data from and from the databases in response to commands.

[0045] In some embodiments, one or more of the databases 130 may also be used by an application to store application data. The databases used by the application may be of different types, such as key-value stores, object stores, or regular stores supported by a file system.

[0046] Figure 1 The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatus described in this disclosure.

[0047] like Figure 2 As shown, some embodiments of this disclosure provide a multi-image layout method 200, which includes the following steps S201 and S202.

[0048] In step S201, the number of images m to be displayed in the display area and the number of virtual squares n allowed to be arranged along the row direction in the display area are obtained, where m≥2 and n≥2.

[0049] In step S202, based on the quantity m and the quantity n, determine m entrances (i.e., occupants in the display area) arranged in at least one row, wherein each entrance is used to fill an image, the size of each entrance along the column direction is equal to the side length of the virtual square, the size of each entrance along the row direction is equal to an integer multiple of the side length of the virtual square, and the sum of the sizes of the entrances in each row along the row direction is equal to n times the side length of the virtual square.

[0050] Unlike related technologies that require designers to pre-design various layout styles, the technical solution of this disclosure can quickly and intelligently automate the layout of multiple entry points based on the number of images to be displayed in the display area, greatly reducing the manpower and time costs required by designers. Furthermore, multi-image layout can be easily operated by users on the client side. The technical solution of this disclosure can improve the output efficiency of multi-image layout and flexibly respond to changing business needs.

[0051] In this embodiment of the disclosure, the images to be displayed in the display area can be pictures or videos. For example, there are nine images to be displayed, all of which are pictures; for example, to enrich the display content, one of the nine images may be a short video, and the rest may be pictures. This disclosure does not specifically limit the content or format of each image, and users can flexibly choose according to their needs.

[0052] The multi-image layout method disclosed in this embodiment can be applied to both web servers and client-side applications. When applied to a client, the client can be either online or offline.

[0053] In implementing the multi-image layout method of this disclosure, it is necessary to obtain the number m of images to be displayed in the display area and the number n of virtual squares that are allowed to be arranged along the row direction in the display area. Based on the number m and the number n, the m entrances of the display area are determined, and intelligent automatic layout of the m entrances is realized.

[0054] The quantities m and n can be user-inputted values, system default values, or values ​​determined by the system according to an algorithm, and this disclosure does not specifically limit them. In some embodiments, the quantity n is the system default value, and the quantity m is the user-inputted value. In this way, the user only needs to input the quantity m, and the system can automatically perform intelligent layout of multiple entries.

[0055] Figure 3A , Figure 3B and Figure 3C The illustration shows some random layout results that may occur when using the multi-image layout method of this disclosure embodiment; only a portion of them are shown. Figure 3A In the given information, the quantity m = 3 and the quantity n = 4; Figure 3B In the example, the quantity m = 6 and the quantity n = 4; Figure 3C In this case, the quantity m = 9 and the quantity n = 4.

[0056] like Figure 3A , Figure 3B and Figure 3C As shown, the virtual square 311 can be understood as the smallest square-shaped space that can be divided along the row direction of the display area. The dimension of each entrance 310 along the column direction is equal to the side length of the virtual square 311, the dimension of each entrance 310 along the row direction is an integer multiple of the side length of the virtual square 311, and the sum of the dimensions of each row of entrances 310 along the row direction is equal to n times the side length of the virtual square 311. An entrance 310 can be at least the same size as a virtual square 311, and the dimension of an entrance 310 along the row direction can be at most n times the side length of the virtual square 311. The side length of the virtual square 311 can be determined based on the dimension of the display area along the row direction and the aforementioned number n.

[0057] In this embodiment of the disclosure, row direction and column direction are relative and orthogonal, but their specific directions are not limited. For example, relative to a certain reference, row direction can be a horizontal direction, vertical direction, or diagonal direction, and column direction is orthogonal to it.

[0058] For example, Figure 3A The first entrance 310 shown has a dimension along the row direction equal to twice the side length of the virtual square 311. For example, Figure 3A The sum of the dimensions of the row entrance 310 shown is equal to four times the side length of the virtual square 311.

[0059] In some embodiments of this disclosure, determining m entrances to the display area arranged in at least one row includes:

[0060] In [1, n-Σr i-1 Random integers r1, r2, r3, ..., r are generated sequentially within the range. i until a random integer r i =n-Σr i-1 , where i represents the order of the generated random integer, and r0 = 0;

[0061] In response to the number of undetermined entries being no less than the number of generated random integers, at least one entry is determined in the current row based on the generated random integers, wherein each entry is configured in a one-to-one correspondence with a random integer, and the ratio of the dimension of each entry along the row direction to the side length of the virtual square is equal to the random integer.

[0062] Understandably, since the generation of random integers is random, the final layout of the m entrances (e.g., the number of rows of entrances, the size of entrances, and the position of entrances) is also random.

[0063] refer to Figure 3B As shown, taking m=6 and n=4 as an example, an example is given of a random situation that may occur in step S202 of this embodiment. In this random situation, step S202 includes the following sub-steps:

[0064] In sub-step one, a random integer r1 = 2 is generated in the range [1, 4]; then, a random integer r2 = 1 is generated in the range [1, 2]; then, a random integer r3 = 1 is generated. Since r3 = 4 - (2 + 1), the generation of random integers stops.

[0065] Sub-step two: In response to the fact that the number of undetermined entrances is 6 and not less than the number of generated random integers is 3, based on the generated random integers "2,1,1", determine the 3 entrances arranged in the first row. Among the entrances in this row, the size of the first entrance along the row direction is equal to twice the side length of the virtual square, and the size of the second and third entrances along the row direction is equal to the side length of the virtual square, respectively.

[0066] Sub-step three: Generate a random integer r1 = 4 in the range [1, 4]. Since r1 = 4 - 0, stop generating random integers.

[0067] Sub-step four: In response to the fact that the number of undetermined entries (3) is not less than the number of generated random integers (1), based on the generated random integer "4", determine one entry in the second row, the size of which along the row direction is equal to 4 times the side length of the virtual square;

[0068] Sub-step five: Generate a random integer r1 = 2 in the range [1, 4]; then, generate a random integer r2 = 2 in the range [1, 2]. Since r2 = 4 - 2, stop generating random integers.

[0069] Sub-step six: In response to the fact that the number of undetermined entries is 2 and not less than the number of generated random integers is 2, determine the two entries arranged in the third row based on the generated random integer "2,2". In this row of entries, the dimensions of the first and second entries along the row direction are respectively equal to twice the side length of the virtual square.

[0070] In some embodiments of this disclosure, determining m entrances to the display area arranged in at least one row further includes:

[0071] In response to the number of undetermined entries being less than the number of generated random integers, at least one entry arranged in the current row is determined based on the generated random integers, wherein the ratio of the dimension of the at least one entry along the row direction to the side length of the virtual square is equal to the sum of at least two random integers.

[0072] Since the generation of random integers is random, there may be a situation where the number of undetermined entries is less than the number of generated random integers. In order to achieve a neat and complete layout, at least one of the entries can be set according to the following rule: the ratio of the size of the entry along the row direction to the side length of the virtual square is equal to the sum of at least two random integers.

[0073] For example, suppose that in the aforementioned sub-step five, three random integers "2,1,1" were generated, but the number of entrances has not yet been determined to be 2, meaning that only 2 entrances are actually needed. In this case, to achieve a neat and complete layout, the size of the first entrance along the row direction can be set to twice the side length of the virtual square, and the size of the second entrance along the row direction can also be set to twice the side length of the virtual square (this multiple is obtained by summing the last two random integers "1" and "1"). Alternatively, the size of the first entrance along the row direction can be set to three times the side length of the virtual square (this multiple is obtained by summing the first two random integers "2" and "1"), and the size of the second entrance along the row direction can be set to equal the side length of the virtual square.

[0074] For example, suppose that in the aforementioned sub-step five, three random integers "2,1,1" were generated, but the number of entrances has not yet been determined to be 1, meaning that only one entrance is actually needed. In this case, in order to achieve a neat and complete layout, the size of the entrance along the row direction can be set to be equal to 4 times the side length of the virtual square (this multiple is obtained by summing the three random integers "2,1,1").

[0075] This embodiment's design can achieve the integrity of multi-image layout in the display area, without any blank or redundant entry points, making the layout design more user-friendly and intelligent.

[0076] In some embodiments, the multi-image layout method further includes: in response to the fact that the dimensions of the m entrances are all the same along the row direction, redetermining the arrangement of the m entrances in the display area into at least one row.

[0077] Since the layout of the m entrances is random, it is possible that all m entrances have the same size along the row direction. In these embodiments of the present disclosure, when this occurs, the steps for determining the m entrances are repeated until the sizes of the m entrances along the row direction are no longer identical. This allows the m entrances to be arranged in a hierarchical manner with varying sizes in the display area, highlighting the key images that need to be displayed, and thus creating a hierarchical layout of the m images in the display area, enhancing the richness and personalization of the display.

[0078] The above method identifies m entrances to the display area, thus creating a layout for each of the m entrances. In some embodiments, the multi-image layout method further includes storing the feature information of the m entrances to the display area. This allows the stored layout to be directly retrieved in similar application scenarios, saving program resources.

[0079] like Figure 4 As shown, in some embodiments of this disclosure, the multi-image layout method includes the following steps S401 to S404.

[0080] In step S401, the number m of images to be displayed in the display area and the number n of virtual squares allowed to be arranged along the row direction in the display area are obtained. For details, please refer to the aforementioned step S401.

[0081] In step S402, based on the quantity m and the quantity n, determine m entrances to the display area arranged in at least one row. See step S402 above for details.

[0082] In step S403, obtain m images that correspond one-to-one with the m entrances.

[0083] In step S403, the m images are filled into the m entrances one by one.

[0084] Once the m entrances to the display area are determined, the m images can be filled into the m entrances one by one according to the steps above, thereby realizing the display of the m images in the display area.

[0085] The technical solution of this disclosure can quickly perform intelligent layout and display of multiple images based on the number of images to be displayed in the display area. Compared with related technologies, it can greatly improve the output efficiency of multi-image layout and display, and can flexibly cope with changing business needs.

[0086] In some embodiments, obtaining m images configured one-to-one with m entrances includes: obtaining m images configured one-to-one with the m entrances from an image library based on the quantity m, the feature information of the m entrances, and the selection priority of image attributes. The feature information of the entrances includes, for example, location and / or size.

[0087] The image library can be a local image library or a web image library, and the images in the image library can be categorized and organized by users or web designers according to image attributes. In some embodiments, image attributes include at least one of the following: image size, image aspect ratio, image content type, or image resolution.

[0088] The selection priority of image attributes can be set to the default setting or flexibly configured according to individual needs. For example, in one embodiment, the selection priority of image attributes, from highest to lowest, is set as follows: image content type, image resolution, and image aspect ratio. When selecting an image corresponding to the entry point from the image library, images whose content type matches the requirements are first filtered out, then images whose resolution matches the requirements are filtered out, and finally images whose aspect ratio matches the requirements are filtered out as the images corresponding to the entry point.

[0089] This embodiment not only enables intelligent layout and display of multiple images, but also displays images that better meet the requirements based on the selection priority of image attributes, and the display effect is better.

[0090] For example, fill larger inlets with images that match the content type and have higher resolution, and fill smaller inlets with images that match the content type but have lower resolution, and so on.

[0091] In some other embodiments of this disclosure, obtaining m images configured one-to-one with the m entrances includes: obtaining the input m images configured one-to-one with the m entrances.

[0092] This embodiment supports users to customize the image filling of m entrances according to their needs and preferences. Users can arbitrarily select m images to fill the m entrances, and the filling order and filling position can be flexibly adjusted.

[0093] In the embodiments disclosed herein, such as Figure 3A , Figure 3B and Figure 3C As shown, m images can be arranged closely without gaps.

[0094] In other embodiments of this disclosure, the multi-image layout method further includes: after filling m images one-to-one into m entrances, covering the boundaries between adjacent images with image separator bars. For example... Figure 5 As shown, after the image separator bar 521 is added, the separation between adjacent images 520 is clearly visible.

[0095] The width of the image separator can be set by the user or by the system default value; this disclosure does not impose specific limitations on this. This scheme can clearly separate adjacent images, resulting in better multi-image layout and display.

[0096] like Figure 6 As shown in the figure, this disclosure also provides a multi-image typesetting device 600, including:

[0097] Acquisition unit 601 is configured to acquire the number m of images to be displayed in the display area, and the number n of virtual squares allowed to be arranged along the row direction in the display area, where m ≥ 2 and n ≥ 2; and

[0098] Unit 602 is configured to determine m entrances in the display area arranged in at least one row based on the quantity m and the quantity n, wherein each entrance is used to fill an image, the size of each entrance along the column direction is equal to the side length of the virtual square, the size of each entrance along the row direction is equal to an integer multiple of the side length of the virtual square, and the sum of the sizes of the entrances in each row along the row direction is equal to n times the side length of the virtual square.

[0099] As analyzed above, the apparatus of the above embodiments of this disclosure can quickly perform intelligent automatic layout of multiple entrances based on the number of images to be displayed in the display area, greatly reducing the manpower and time costs invested by designers, thereby improving the output efficiency of multi-image layout and flexibly responding to changing business needs.

[0100] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in this technical solution comply with relevant laws and regulations and do not violate public order and good morals. It should be noted that the images in this embodiment are not targeted at any specific user and do not reflect the personal information of a particular user.

[0101] According to embodiments of this disclosure, an electronic device, a computer-readable storage medium, and a computer program product are also provided.

[0102] refer to Figure 7 The present invention describes a structural block diagram of an electronic device 700 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0103] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0104] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, output unit 707, storage unit 708, and communication unit 709. Input unit 706 can be any type of device capable of inputting information to electronic device 700. Input unit 706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 707 can be any type of device capable of presenting information, and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 708 may include, but is not limited to, disk and optical disk. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0105] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above. For example, some embodiment methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the embodiment methods described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the embodiment methods described above by any other suitable means (e.g., by means of firmware).

[0106] This disclosure also provides a computer-readable storage medium storing computer instructions configured to cause a computer to perform the steps of any of the methods described in the foregoing embodiments.

[0107] Furthermore, this disclosure also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the steps of the methods of any of the foregoing embodiments.

[0108] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0109] Program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0110] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0112] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0113] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0114] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0115] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of the invention is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as the technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.

Claims

1. A method for multi-image layout, comprising: Obtain the number of images m to be displayed in the display area, and the number n of virtual squares allowed to be arranged along the row direction in the display area, where m ≥ 2 and n ≥ 2; and Based on the quantities m and n, determine m entrances to the display area arranged in at least one row, wherein each entrance is used to fill an image, the dimension of each entrance along the column direction is equal to the side length of the virtual square, the dimension of each entrance along the row direction is an integer multiple of the side length of the virtual square, and the sum of the dimensions of the entrances in each row along the row direction is equal to n times the side length of the virtual square. Determining the m entrances to the display area arranged in at least one row includes: In [1, n-Σr i-1 Random integers r1, r2, r3, ..., r are generated sequentially within the range. i until a random integer r i = n-Σr i-1 , where i represents the order of the generated random integer, and r0=0; In response to the number of undetermined entries being no less than the number of generated random integers, at least one entry is determined in the current row based on the generated random integers, wherein each entry is configured in a one-to-one correspondence with a random integer, and the ratio of the dimension of each entry along the row direction to the side length of the virtual square is equal to the corresponding random integer.

2. The multi-image layout method according to claim 1, wherein, The determination of the m entrances to the display area arranged in at least one row also includes: In response to the number of undetermined entries being less than the number of generated random integers, at least one entry arranged in the current row is determined based on the generated random integers, wherein at least one entry has a dimension along the row direction that is equal to the side length of the virtual square, which is equal to the sum of at least two random integers.

3. The multi-image layout method according to claim 1 further includes: In response to the fact that all m entrances have the same size along the row direction, the m entrances in the display area are re-arranged into at least one row.

4. The multi-image layout method according to claim 1 further includes: Retrieve m images configured one-to-one with the m entry points; as well as Fill the m entrances with the m images one by one.

5. The multi-image layout method according to claim 4, wherein, The acquisition of m images, each corresponding to one of the m entry points, includes: Based on the feature information of the quantity m and the m entry points, as well as the selection priority of image attributes, m images corresponding to the m entry points are obtained from the image library.

6. The multi-image typesetting method according to claim 5, wherein, The image attributes include at least one of the following: The content type of the image, the resolution of the image, the aspect ratio of the image, or the size of the image.

7. The multi-image typesetting method according to claim 4, wherein, The acquisition of m images, each corresponding to one of the m entry points, includes: Obtain the m images configured one-to-one with the m inputs.

8. The multi-image typesetting method according to claim 4 further includes: After filling the m entrances with m images one-to-one, image separators are covered at the boundaries between adjacent images.

9. The multi-image typesetting method according to claim 1 further includes: Store the feature information of m entrances in the display area.

10. The multi-figure typesetting method according to any one of claims 1 to 9, wherein, The images include pictures or videos.

11. A multi-image typesetting device, comprising: The acquisition unit is configured to acquire the number m of images to be displayed in the display area, and the number n of virtual squares allowed to be arranged along the row direction in the display area, where m ≥ 2 and n ≥ 2; and The unit is configured to determine m entrances to the display area arranged in at least one row, based on a quantity m and a quantity n. Each entrance is used to fill an image. The dimension of each entrance along the column direction is equal to the side length of a virtual square. The dimension of each entrance along the row direction is an integer multiple of the side length of the virtual square. The sum of the dimensions of the entrances in each row along the row direction is equal to n times the side length of the virtual square. Determining the m entrances to the display area arranged in at least one row includes: In [1, n-Σr i-1 Random integers r1, r2, r3, ..., r are generated sequentially within the range. i until a random integer r i = n-Σr i-1 , where i represents the order of the generated random integer, and r0=0; In response to the number of undetermined entries being no less than the number of generated random integers, at least one entry is determined in the current row based on the generated random integers, wherein each entry is configured in a one-to-one correspondence with a random integer, and the ratio of the dimension of each entry along the row direction to the side length of the virtual square is equal to the corresponding random integer.

12. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the multi-image layout method according to any one of claims 1 to 10.

13. A computer-readable storage medium storing computer instructions, wherein, The computer instructions are configured to cause the computer to execute the multi-image layout method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the multi-image layout method according to any one of claims 1 to 10.