Article information collocation diagram generation method, device, equipment, medium and program product
By automatically determining the placement area and scene type of items, selecting a suitable background image, and filling in the item positions, the problem of unreasonable, unattractive, and inefficient item information matching diagrams in existing technologies is solved, and fast and reasonable item information matching diagrams are generated.
Patent Information
- Application Number
- CN202310272490.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-03-20
AI Technical Summary
Existing technologies struggle to handle new categories of items and items with significantly different preset label box sizes when generating item information matching diagrams, resulting in unreasonable, unattractive, and inefficient matching diagrams.
By determining the placement area type and scene type corresponding to the item category information, selecting a reasonable background image, and determining the item allocation relationship and position information, the item images are automatically filled into the background image, avoiding manual matching.
It quickly generates reasonable and aesthetically pleasing item information and combination diagrams, improving generation efficiency and eliminating the need for manual matching.
Smart Images

Figure CN116580128B_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of computer technology, specifically to a method, apparatus, device, medium, and program product for generating item information matching diagrams during a metaverse shopping process. Background Technology
[0002] When generating item information matching images, the common methods are: filling the item image into a general background image template, a manually matched background image template, or filling the item image into a background image with a preset label box according to the category of the item image.
[0003] However, the inventors discovered that the following technical problems often arise when using this method:
[0004] When new categories of item information appear, background images need to be manually matched again. It is also difficult to handle items with large differences in scale from the preset annotation box, resulting in unreasonable, unattractive, and inefficient item information matching images.
[0005] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0007] Some embodiments of this disclosure provide methods, apparatus, devices, media, and program products for generating item information matching diagrams to address the technical problems mentioned in the background section above.
[0008] In a first aspect, some embodiments of this disclosure provide a method for generating an item information matching image. The method includes: determining the corresponding item placement area type and item placement scene type for each item information included in a pre-acquired item information group, wherein the item information in the item information group also includes item images; determining the item allocation relationship information of a target background image and the corresponding target background image based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information group, and the pre-acquired set of background images, wherein the target background image includes at least one item placement area; determining at least one item information corresponding to each item placement area based on the item allocation relationship information; determining the item position information corresponding to each item placement area in the at least one item placement area; and filling the corresponding item placement area in the target background image with the item images included in the item information group according to the obtained item position information to obtain the item information matching image. Secondly, some embodiments of this disclosure provide an item information matching diagram generation apparatus, the apparatus comprising: a first determining unit configured to determine, for each item information in a pre-acquired item information group, a corresponding item placement area type and an item placement scene type, wherein the item information in the item information group further includes item images; a second determining unit configured to determine, based on a obtained set of item placement area types, a obtained set of item placement scene types, the item information group, and a pre-acquired set of background images, a target background image and item allocation relationship information corresponding to the target background image, wherein the target background image includes at least one item placement area; a third determining unit configured to, for each item placement area in the at least one item placement area, determine at least one item information corresponding to the item placement area based on the item allocation relationship information; a fourth determining unit configured to, for each item placement area in the at least one item placement area, determine item position information corresponding to at least one item information; and a filling unit configured to, according to the obtained item position information, fill each item image included in the item information group into the corresponding item placement area in the target background image to obtain an item information matching diagram. Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect. Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, it implements the method described in any implementation of the first aspect.Fifthly, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any implementation of the first aspect. Attached Figure Description
[0009] Other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0010] Figure 1-5 This is a schematic diagram illustrating an application scenario of the item information matching diagram generation method according to some embodiments of this disclosure;
[0011] Figure 6 This is a flowchart of some embodiments of the method for generating item information matching diagrams according to the present disclosure;
[0012] Figure 7 This is a flowchart of some other embodiments of the method for generating item information matching diagrams according to this disclosure;
[0013] Figure 8 These are schematic diagrams illustrating the structure of some embodiments of the item information matching diagram generation apparatus according to this disclosure;
[0014] Figure 9 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0015] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure is implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0016] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, embodiments and features described herein are combined with each other.
[0017] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0018] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0019] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0020] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] Figure 1-5 This is a schematic diagram illustrating an application scenario of the item information matching diagram generation method according to some embodiments of the present disclosure.
[0022] exist Figure 1-5 In the application scenario, firstly, the computing device determines the corresponding item placement area type and item placement scene type for each item information in the pre-acquired item information group, which includes item category information. The item information in the item information group also includes item images. Figure 1 These are specific examples of item information groups, their corresponding item placement area types, and item placement scene types. Figure 1 The item information groups are [(refrigerator image, refrigerator type), (fan image, fan type), (air conditioner image, air conditioner type)]. The item placement area type corresponding to (refrigerator image, refrigerator type) is ground type, and the item placement scene type is living room type. The item placement area type corresponding to (fan image, fan type) is ground type, and the item placement scene type is living room type. The item placement area type corresponding to (air conditioner image, air conditioner type) is wall type, and the item placement scene type is living room type. Then, based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information groups, and the pre-acquired set of background images, the computing device determines the target background image and the item allocation relationship information corresponding to the target background image, wherein the target background image includes at least one item placement area. Figure 2 It is a specific example of at least one item placement area included in the target background image. Figure 2 The target background image includes two item placement areas, namely item placement area 1 and item placement area 2. The item allocation relationship information corresponding to the target background image is [(item placement area 1 - air conditioner image), (item placement area 2 - fan image, refrigerator image)]. Next, for each item placement area in at least one item placement area, the computing device determines at least one item information corresponding to the item placement area based on the item allocation relationship information. Figure 3This is a specific example of at least one item information corresponding to an item placement area. Then, for each item placement area within the at least one item placement area, the computing device determines the item location information corresponding to at least one item information. Figure 4 This is a specific example of item location information corresponding to at least one item. Finally, based on the obtained item location information, the computing device fills the corresponding item placement areas in the target background image with the item images included in the item information group, thus obtaining an item information matching image. Figure 5 This is a specific example of an item information matching image.
[0023] It should be noted that computing devices can be both hardware and software. When a computing device is hardware, it can be implemented as a distributed cluster of multiple servers or terminal devices, or as a single server or terminal device. When a computing device is software, it is installed within the listed hardware devices. It can be implemented, for example, as multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here. It should be understood that... Figure 1-5 The number of computing devices shown is merely illustrative. Any number of computing devices can be used depending on implementation needs.
[0024] Continue to refer to Figure 6 The diagram illustrates a flow 600 of some embodiments of the item information matching image generation method according to the present disclosure. The item information matching image generation method includes the following steps:
[0025] Step 601: For each item information in the pre-acquired item information group, including the item category information, determine the corresponding item placement area type and item placement scene type.
[0026] In some embodiments, the execution entity (e.g., a computing device) of the item information matching image generation method pre-obtains the item category information included in each item information in the item information group via a wired or wireless connection. For each item category information included in the pre-obtained item information group, the corresponding item placement area type and item placement scene type are determined. The item information in the item information group also includes item images. Item category information is the classification information of the items. Classification information is information categorized according to the function and purpose of the items. For example, home appliances, office supplies, or clothing, etc. Item category information is also the sub-category information within the item classification information. For example, electric fans in the home appliance category include table fans, floor fans, mini fans, etc., or clothes dryers in the home appliance category include tumble dryers, wall dryers, handheld dryers, etc. Item placement area types include, but are not limited to, at least one of the following: desktop type, wall type, floor type. Item placement scene types include, but are not limited to, at least one of the following: kitchen type, living room type, study type, bedroom type.
[0027] Step 602: Based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information group, and the pre-acquired set of background images, determine the target background image and the item allocation relationship information of the corresponding target background image.
[0028] In some embodiments, the executing entity determines the target background image and the corresponding item allocation relationship information based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information group, and the pre-acquired set of background images. The target background image includes at least one item placement area. An item placement area is a region in the background image that can be filled with an item image. The item allocation relationship information is the allocation relationship information between the item information and the item placement area.
[0029] Optionally, the background image set is generated through the following steps: First, images of various scene types are acquired as the background image set. Each background image in the set includes at least one item placement area. Scene types include kitchen, living room, office, etc. The item placement area includes area attribute information, which includes at least one of the following: actual area size, corner position information, area type, scene type, and transformation matrix. The actual area size is the actual size of the area's longer side in reality. This actual size is estimated based on surrounding objects. The corner position information is the pixel position information of the four corner points of the item placement area in the background image. Pixel position information is represented using the pixel's position in the image. Area types include, but are not limited to, at least one of the following: desktop, wall, floor. The four corner position information and area type of the item placement area are marked using a labeling tool (e.g., Labelme). Scene types include, but are not limited to, at least one of the following: kitchen, living room, study, bedroom. The transformation matrix is obtained by solving the transmission transformation formula using a simplified representation of the four corner points and the coordinates of the four corner points of the item placement area. The four corner points are simplified using a rectangle (x1, y1, x2, y2) with fixed length and width. (x1, y1) represents the coordinates of the top-left corner of the rectangle, and (x2, y2) represents the coordinates of the bottom-right corner. In application, the item image position and size information are first obtained within this rectangle. Then, a transformation matrix is used to map the item image position and size information to the item placement area. The second step involves adjusting the size of each item placement area included in each background image set to obtain the adjusted background image. As an example, the execution entity uses drawing software (e.g., Picart) to adjust the size of each item placement area included in the background image to obtain the adjusted background image. Optionally, adjusting the size of each item placement area included in the background image includes: for each item placement area, the following size adjustment steps are performed: A first adjustment sub-step involves obtaining adjusted item information based on the area type and scene type of the item placement area. The adjusted item information includes the actual size value of the item. The adjusted item information serves as reference information for size adjustment. The actual size value of the item is the actual size of its longer side in reality. The second adjustment sub-step determines the region image size value and the actual size value of the region where the item is placed. The region image size value is represented by the number of pixels occupied by the longer side of the region in the background image. The actual size value of the region is the actual size of the longer side of the region in reality. The third adjustment sub-step generates the item image size value based on the actual size value of the item, the region image size value, and the actual size value of the region. The item image size value represents the number of pixels occupied by the longer side of the item image in the background image.As an example, the executing entity performs product processing on the actual size value of the item and the size value of the area image to obtain a product value. The product value and the actual size value of the area are then divided to obtain the image size value of the item corresponding to the same type of item information. The actual size value of the item is the actual size value of the long side of the item in reality. The fourth adjustment sub-step involves adjusting the size of the item placement area based on the item image size value. As an example, the executing entity draws the item image in the item placement area of the background image based on the item image size value. If the item image is too large, the actual size value of the item placement area is enlarged. If the item image is too small, the actual size value of the item placement area is reduced. This achieves the size adjustment of the item placement area. The third step involves determining the obtained adjusted background image set as the background image set. In some optional implementations of some embodiments, the executing entity determines the target background image and the item allocation relationship information corresponding to the target background image based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information group, and the pre-acquired background image set, including the following steps: For the background image set, the following background image filtering steps are performed: First, a background image is selected from the background image set. The second step involves obtaining at least one area type and at least one scene type corresponding to at least one item placement area included in the selected background image. For example, an item placement area corresponds to an area type and a scene type. Area types include, but are not limited to, at least one of the following: desktop type, wall type, floor type. Scene types include, but are not limited to, at least one of the following: kitchen type, living room type, study type, bedroom type. In the selected background image, item placement area 1 has a floor type as its area type and a living room type as its scene type. The third step, in response to the existence of a subset of item placement area types in the set of item placement area types that have the same content as at least one area type, and a subset of item placement scene types in the set of item placement scene types that have the same content as at least one scene type, assigns item information that matches the item placement area type, item placement scene type, and area type to the corresponding item placement area, obtaining the assignment result. Here, "matching" means that the item placement area type is the same as the area type, and the item placement scene type is the same as the scene type. For example, the item placement area type set is [wall type, floor type]. At least one area type is [wall type, floor type, desktop type]. The item placement scene type set is [living room type]. At least one scene type is [living room type, study type]. Item information 1's item placement area type is ground type, and its item placement scene type is living room type. Item placement area 2's area type is ground type, and its scene type is living room type. In practice, the executing entity assigns item information 1 to the corresponding item placement area 2.
[0030] Optionally, the background image filtering step further includes: First, determining whether there is at least one similar allocation result in the allocation results. A similar allocation result indicates that multiple similar item information are allocated to at least one similar item placement area. Multiple similar item information corresponds to multiple item placement areas of the same type. Multiple similar item information corresponds to multiple item placement scene types of the same type. At least one similar item placement area corresponds to at least one area type of the same type. At least one similar item placement area corresponds to at least one scene type of the same type. For example, item information 1 and item information 2 both have a ground-type item placement area and a living room-type item placement scene. Therefore, item information 1 and item information 2 are multiple similar item information. Item placement area 1 has a ground-type area and a living room-type scene. Therefore, item placement area 1 is at least one similar item placement area. Assigning item information 1 and item information 2 to their corresponding item placement area 1 is called a similar allocation result. Second, in response to the existence of at least one similar allocation result in the allocation results, for at least one similar allocation result, the following similar allocation result filtering step is performed: First filtering sub-step, selecting similar allocation results from at least one similar allocation result. The second filtering sub-step determines multiple similar item information corresponding to the selected similar allocation result as a similar item information set. The third filtering sub-step determines at least one similar item placement area corresponding to the selected similar allocation result as a similar item placement area set. The fourth filtering sub-step sorts the item image size values corresponding to each similar item information in the similar item information set in descending order to obtain a sorted sequence of item image size values. As an example, the executing entity first obtains the actual item size values of the similar item information. Then, it determines the area image size value and the actual area size value of the item placement area through various methods. Finally, it performs product processing on the actual item size value and the area image size value to obtain a product value. The product value and the area actual size value are then divided to obtain the item image size value corresponding to the similar item information. The actual item size value is the actual size value of the long side of the item in reality. The actual area size value is the actual size value of the long side of the area in reality. The area image size value is represented by the number of pixels occupied by the long side of the area in the background image. The fifth filtering sub-step sorts the region image size values of each similar item placement area in the set of similar item placement areas in descending order, obtaining a sorted sequence of region image size values. The region image size value is represented by the number of pixels occupied by the longer side of the region in the background image. The sixth filtering sub-step determines the number of similar item information in the set of similar item information, obtaining a value representing the number of similar item information. The seventh filtering sub-step determines the number of similar item placement areas in the set of similar item placement areas, obtaining a value representing the number of similar item placement areas.
[0031] Optionally, the similar allocation result filtering step further includes: First, in response to the quantity value of similar item information being less than or equal to the quantity value of similar item placement areas, the images of each item included in the similar item information set are assigned to the corresponding item placement areas according to the sorted item image size value sequence and the sorted area image size value sequence, thus obtaining a similar item allocation relationship set. For example, the similar item allocation relationship set is [Item Information 3 - Item Placement Area 1]. Second, based on the similar item allocation relationship set, the following background image processing steps are performed: First processing sub-step, determining the image size difference corresponding to each similar item allocation relationship in the similar item allocation relationship set, thus obtaining an image size difference value set. As an example, the executing entity performs a difference processing on the item image size value of item information 3 and the area image size value of item placement area 1 to obtain the corresponding image size difference value of [Item Information 3 - Item Placement Area 1]. Optionally, in response to the execution entity not having any image size difference value less than a first target threshold in the image size difference value set, and the number of unselected similar allocation results in at least one similar allocation result being greater than a second target threshold, the unselected similar allocation result set is taken as at least one similar allocation result, and the similar allocation result filtering step is performed again. The first and second target thresholds are preset according to actual conditions. For example, the first and second target thresholds are both 0. In the second processing sub-step, in response to the absence of any image size difference less than the first target threshold in the image size difference set, and the number of unselected similar allocation results in at least one similar allocation result equal to the second target threshold, the selected background image is added as a candidate background image to the pre-created initial candidate background image set, resulting in a candidate background image set. Thus, when all similar allocation results are determined to be reasonable, the selected background image is used as a candidate background image. In the third processing sub-step, in response to the absence of any image size difference less than the first target threshold in the image size difference set, and the number of unselected similar allocation results in at least one similar allocation result equal to the second target threshold, the obtained at least one similar item allocation relationship set is determined as the item allocation relationship information of the corresponding candidate background image. Optionally, in response to the presence of any image size difference less than the first target threshold in the image size difference set, the executing entity uses the unselected background image set in the background image set as the background image set and performs the background image filtering step again. Therefore, if any image size difference in the set of image size differences is less than the first target threshold, it indicates that the background image needs to be removed, and a new background image needs to be selected. Thus, a set of candidate background images is determined from the set of background images.
[0032] Optionally, the similar allocation result filtering step further includes: in response to the fact that the number of similar item information values is greater than the number of similar item placement areas, based on the sorted item image size value sequence and the sorted area image size value sequence, performing the following item allocation relationship information generation steps: A first generation sub-step determines the item images included in each of the first N sorted item image size values corresponding to the similar item information as the set of item images to be allocated. Here, the value of N is the same as the number of similar item placement areas. A second generation sub-step allocates the set of item images to be allocated to the corresponding item placement areas according to the sorted item image size value sequence and the sorted area image size value sequence, obtaining a set of item allocation relationships to be allocated, which serves as the set of similar item allocation relationships. Here, the item allocation relationship to be allocated is the relationship of allocating the item images to be allocated to the corresponding item placement areas. For example, the set of item allocation relationships to be allocated is [item information 1 - item placement area 2]. A third generation sub-step determines the image size difference corresponding to each item allocation relationship in the set of item allocation relationships to be allocated, obtaining a set of allocated image size difference values. As an example, the executing entity calculates the difference between the image size of item information 1 (533 pixels) and the image size of item placement area 2 (800 pixels), resulting in an image size difference of 267 pixels between [item information 1 and item placement area 2]. Optionally, in response to any allocated image size difference in the allocated image size difference set being less than a first target threshold, the executing entity uses the unselected background image set in the background image set as the background image set and performs the background image filtering step again. Thus, when any allocated image size difference in the allocated image size difference set is less than the first target threshold, it indicates that the background image needs to be removed, and a new background image needs to be selected. Thus, a candidate background image set is determined from the background image set. In the fourth generation sub-step, in response to no allocated image size difference in the allocated image size difference set being less than the first target threshold, the allocated image size difference set is sorted in descending order to obtain a sorted allocated image size difference sequence. In the fifth generation sub-step, the number of unallocated item images in the unallocated item image set is determined. The unassigned item image set is the set of item images excluding the set of item images to be assigned from the various item images corresponding to the set of information for similar items. In the sixth generation sub-step, in response to the unassigned quantity being less than or equal to the number of similar item placement areas, the item images included in each unassigned item image set are assigned to their corresponding item placement areas based on the item image size values corresponding to the unassigned item image set and the sorted sequence of assigned image size differences, thus obtaining the unassigned item allocation relationship set. In the seventh generation sub-step, the unassigned item allocation relationship set is used as the similar item allocation relationship set, and the background image processing step is executed.Therefore, when the number of unassigned items is less than or equal to the number of similar items placed in the same area, the item images included in the unassigned item images are assigned, and it is determined whether the background image is used as a candidate background image after the image is assigned.
[0033] Optionally, in response to the number of unassigned item images exceeding the number of similar item placement areas, the executing entity uses the number of unassigned item images as the number of similar item information, takes the sequence of sorted item image dimensions after removing the first N sorted item image dimensions as the sorted item image dimension sequence, and takes the sequence of sorted assigned image size differences as the sorted area image dimension sequence, and then executes the item allocation relationship information generation step again. Thus, when the number of unassigned item images exceeds the number of similar item placement areas, the item allocation relationship information generation step is executed again until the number of unassigned images is less than or equal to the number of similar item placement areas, and the allocation ends.
[0034] Optionally, based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information group, and the pre-acquired set of background images, determining the target background image and the corresponding item allocation relationship information for the target background image further includes the following steps: First, determining whether the candidate background image set is empty. Second, in response to the candidate background image set not being empty, randomly selecting a candidate background image from the candidate background image set as the target background image, and using the item allocation relationship information corresponding to the selected candidate background image as the item allocation relationship information for the corresponding target background image. Third, in response to the candidate background image set being empty, determining the pre-acquired general background image as the target background image.
[0035] Step 603: For each item placement area in at least one item placement area, determine at least one item information corresponding to the item placement area based on the item allocation relationship information.
[0036] In some embodiments, for each item placement area in at least one item placement area, the executing entity determines at least one item information corresponding to the item placement area based on item allocation relationship information. The item allocation relationship information is [(Item Placement Area 1 - Air Conditioner Image), (Item Placement Area 2 - Fan Image, Refrigerator Image)].
[0037] Step 604: For each item placement area in at least one item placement area, determine the item location information corresponding to at least one item information.
[0038] In some embodiments, the executing entity randomly determines the item location information corresponding to at least one item information for each item placement area in at least one item placement area.
[0039] Step 605: Based on the obtained item location information, fill the corresponding item placement area in the target background image with the item images included in the item information group to obtain the item information matching image.
[0040] In some embodiments, the executing entity, based on the obtained item location information, pastes the images of each item included in the item information group into the corresponding item placement areas in the target background image to obtain an item information matching image. The item information matching image is the image after pasting the individual item images into the target background image.
[0041] The various embodiments of this disclosure have the following beneficial effects: The item information matching diagram generation method of some embodiments of this disclosure can quickly generate item information matching diagrams when new categories of item information appear or when dealing with items whose scale differs significantly from the preset annotation box, and the generated item information matching diagrams are more reasonable and aesthetically pleasing. Specifically, the reason why the generated item information matching diagrams are unreasonable, unattractive, and inefficient is that when new categories of item information appear, it is necessary to manually match the background images again, and it is difficult to handle items whose scale differs significantly from the preset annotation box. Based on this, the item information matching diagram generation method of some embodiments of this disclosure first determines the corresponding item placement area type and item placement scene type for each item information included in the pre-acquired item information group, wherein the item information in the item information group also includes item images. Thus, when new categories of item information appear, by determining the corresponding item placement area type and item placement scene type, the item placement area for the new category of item information is quickly allocated. This avoids the need for manual matching of new categories of item information. Secondly, based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information group, and the pre-acquired set of background images, the target background image and the corresponding item allocation relationship information are determined. The target background image includes at least one item placement area. Therefore, a more reasonable background image is selected from the pre-acquired set of background images as the target background image, making the background image selection more reasonable and avoiding the use of manually matched background images, thus improving the efficiency of background image generation. Next, for each item placement area within the at least one item placement area, based on the item allocation relationship information, at least one item information corresponding to the item placement area is determined. Furthermore, for each item placement area within the at least one item placement area, the item position information corresponding to at least one item information is determined. Therefore, based on the item position information, the item images to be filled into the target background image are adjusted. Finally, based on the obtained item position information, each item image included in the item information group is filled into the corresponding item placement area in the target background image, resulting in an item information matching image. Therefore, when new categories of item information appear, it avoids manually matching background images again. At the same time, based on the item location information, the item image is filled into the corresponding item placement area in the target background image, making the generated item information matching image more reasonable and beautiful.
[0042] Further reference Figure 7 This illustrates a flow 700 of another embodiment of the item information matching diagram generation method. Flow 700 of this item information matching diagram generation method includes the following steps:
[0043] Step 701: For each item information in the pre-acquired item information group, including the item category information, determine the corresponding item placement area type and item placement scene type.
[0044] Step 702: Based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information group, and the pre-acquired set of background images, determine the target background image and the item allocation relationship information of the corresponding target background image.
[0045] Step 703: For each item placement area in at least one item placement area, determine at least one item information corresponding to the item placement area based on the item allocation relationship information.
[0046] In some embodiments, the specific implementation of steps 701-703 and the resulting technical effects are referenced. Figure 6 Steps 601-603 in the corresponding embodiments will not be repeated here.
[0047] Step 704: For each item placement area in at least one item placement area, determine the item location information corresponding to at least one item information.
[0048] In some embodiments, the executing entity determines item location information corresponding to at least one item information for each item placement area in at least one item placement area.
[0049] In some optional implementations of certain embodiments, the item location information includes item arrangement relationship information; and the execution subject determines the item location information corresponding to at least one item information for each item placement area in at least one item placement area, including the following steps: First, determine at least one item information corresponding to an item placement area as a set of allocated item information. Wherein, at least one item information corresponding to an item placement area is item information allocated to that item placement area. Second, obtain the actual size value of the allocated item corresponding to each allocated item information in the allocated item information set, obtaining a set of allocated item actual size values. Wherein, the allocated item actual size value is the actual size value of the long side of the item in reality. Third, obtain the area image size value and the area actual size value of the item placement area. Wherein, the area image size value is represented by the number of pixels occupied by the long side of the area in the background image. The area actual size value is the actual size value of the long side of the area in reality. Fourth, generate a set of allocated item image size values based on the set of allocated item actual size values, the area image size value, and the area actual size value. As an example, the execution subject performs a product operation on the allocated item actual size value and the area image size value to obtain a product value. Then, the product value and the actual size value of the region are divided to generate the allocated item image size values. Fifth, the set of allocated item image size values is sorted in ascending order to generate a sorted sequence of allocated item image size values. Sixth, the number of size values in the sorted sequence of allocated item image size values is determined. Seventh, in response to the number of size values being equal to a third target threshold, item layout information is generated. The third target threshold is preset according to the actual situation. As an example, the third target threshold is 1. When the third target threshold is 1, the generated item layout information is [Item Image 3 - Item Placement Area 2: Centered].
[0050] Optionally, for each item placement area in at least one item placement area, determining the item location information corresponding to at least one item information further includes the following steps: First, in response to the number of size values exceeding a third target threshold, for the sorted and allocated item image size value sequence, perform the following item arrangement relationship information determination steps: A first determination sub-step: determine the item images corresponding to the two smallest sorted and allocated item image size values in the sorted and allocated item image size value sequence as the first item image and the second item image. A second determination sub-step: generate height ratio values and width ratio values based on the first item image and the second item image. As an example, the execution entity obtains the height and width values of the first item image as the first height value and the first width value. Then, it obtains the height and width values of the second item image as the second height value and the second width value. The first height value and the second height value are summed to obtain a total height value. The total height value is multiplied by a preset height ratio coefficient to generate a height ratio value. The first width value and the second width value are summed to obtain a total width value. The total width value is multiplied by a preset width ratio coefficient to generate a width ratio value. The preset height ratio coefficient and the preset width ratio coefficient are preset according to actual conditions. Optionally, the executing entity generates height and width ratio values based on the first and second item images, including the following steps: First, obtain the height and width values of the first item image as the first height and first width values. Second, obtain the height and width values of the second item image as the second height and second width values. Third, determine the ratio of the first and second height values to obtain the height ratio value. Fourth, determine the ratio of the first and second width values to obtain the width ratio value. In the third determination sub-step, in response to the height ratio value being greater than the width ratio value, horizontal item arrangement information is generated as item arrangement relationship information. The horizontal item arrangement information includes left-right arrangement information and a horizontal ratio value, which is the same as the width ratio value. The left-right arrangement information indicates whether the items are placed left-right. In the fourth determination sub-step, in response to the height ratio value being less than or equal to the width ratio value, vertical item arrangement information is generated as item arrangement relationship information. The vertical item arrangement information includes top-bottom arrangement information and a vertical ratio value, which is the same as the height ratio value. The top-bottom arrangement information indicates whether the items are placed top-bottom. The fifth determination sub-step involves identifying the first item image and the second item image as the integrated item image. The height value of the integrated item image is the integrated image height value. The width value of the integrated item image is the integrated image width value. The integrated image height value is equal to the larger of the first height value and the second height value. The integrated image width value is equal to the larger of the first width value and the second width value. The sixth determination sub-step involves generating an updated sequence of allocated item image size values based on the allocated item image size values corresponding to the integrated item image and the sorted sequence of allocated item image size values.In practice, the executing entity first removes the allocated item image size values corresponding to the first item image and the second item image from the sorted allocated item image size value sequence, obtaining a sequence of allocated item image size values after removal. Then, the allocated item image size values corresponding to the integrated item image are added to the sequence of allocated item image size values after removal, resulting in an updated allocated item image size value sequence. The allocated item image size values corresponding to the integrated item image are obtained through the following steps: First, the true size value of the integrated item image is determined, where the true size value is equal to the larger of the integrated image width and height. Then, the area image size value and the true size value of the area where the item is placed are obtained. Next, the true size value of the integrated item and the area image size value are multiplied to obtain a product value. Finally, the product value and the true size value of the area are divided to obtain the allocated item image size value corresponding to the integrated item image. The seventh determination sub-step determines the number of updated allocated item image size values in the updated allocated item image size value sequence. The eighth step involves generating item layout relationship information in response to the number of updated size values reaching the third target threshold. Optionally, if the number of updated size values exceeds the third target threshold, the executing entity uses the updated allocated item image size value sequence as the sorted allocated item image size value sequence and executes the item layout relationship information determination step again. The second step involves determining the obtained item layout relationship information for each item corresponding to at least one item. Thus, the relationship between height and width ratios determines whether the item images are arranged horizontally or vertically. The item images are then integrated, and the integrated image is used as the item image to determine the item layout relationship information. This accurately determines the layout information of each item image within the item placement area.
[0051] Optionally, the item location information includes item image location information; and the executing entity determines the item location information corresponding to at least one item information for each item placement area in at least one item placement area, including the following steps: First, determine the item layout information quantity value of at least one item layout information. Wherein, at least one item layout information is the item layout information included in the item layout relationship information corresponding to at least one item information. The item layout information quantity value is the quantity value of item information allocated to the item placement area minus 1. As an example, the item layout relationship information corresponding to at least one item information is [(Item Image 1 and Item Image 2 - Item Placement Area 1: Left-right placement, horizontal ratio value), (Integrated Item Image and Item Image 3 - Item Placement Area 1: Up-down placement, vertical ratio value)]. The second step involves generating simplified representation information for the item placement area. This simplified representation information includes the coordinates of the top-left and bottom-right corners of the area. The top-left corner coordinates include the x-coordinate and y-coordinate of the top-left corner, and the bottom-right corner coordinates include the x-coordinate and y-coordinate of the bottom-right corner. Based on the quantity value of the item arrangement information, the following steps for generating item image location information are performed: First generation sub-step: In response to the quantity value of the item arrangement information equaling a fourth target threshold, simplified representation information for the first area is determined. The first area is the area within the item placement area, and its simplified representation information is the same as the simplified representation information for the other area. The executing entity also determines simplified representation information for the second area. The simplified representation information for the second area is an empty set. As an example, the fourth target threshold is equal to 0. A fourth target threshold of 0 indicates that an item image is assigned to the item placement area. Second generation sub-step: The midpoint coordinates, width value, and height value of the first area are determined. The midpoint coordinates of the first area include the x-coordinate and y-coordinate of the midpoint. The x-coordinate of the midpoint is the average of the x-coordinates of the top-left and bottom-right corners of the area. The midpoint ordinate is the average of the ordinates of the top-left and bottom-right corners of the region. The width value is equal to the width of the item placement area. The height value is equal to the height of the item placement area. The difference between the horizontal coordinates of the bottom-right and top-left corners of the region is determined as the width of the item placement area. The difference between the vertical coordinates of the bottom-right and top-left corners of the region is determined as the height of the item placement area. The third generation sub-step generates item image position information based on the midpoint coordinates, width, and height of the first region and the transformation matrix of the corresponding item placement area. The item image position information includes, but is not limited to, at least one of the following: item information, midpoint coordinates of the item region, width value of the item region, height value of the item region, and item arrangement relationship information. The midpoint coordinates of the item region are the coordinates of the item information within the assigned item placement area. The width value of the item region is the width value of the item information within the assigned item placement area. The height value of the item region is the height value of the item information within the assigned item placement area.As an example, the executing entity inputs the midpoint coordinates, width value, and height value of the first region into the transformation matrix of the corresponding item placement region to generate item image position information. The transformation matrix of the corresponding item placement region is obtained by solving the transmission transformation formula using the coordinates of the four corner points in the simplified representation information and the four corner points of the item placement region. The four corner points are the x-coordinate and y-coordinate points of the simplified representation information and the item placement region.
[0052] Optionally, the item image location information generation step further includes: First, in response to the quantity of item layout information being greater than a fourth target threshold, selecting item layout information from at least one item layout information. The item layout information includes horizontal item layout information or vertical item layout information. For example, the horizontal item layout information is (Item Image 1 and Item Image 2 - Item Placement Area 1: Left-right placement, horizontal ratio). The vertical item layout information is (Integrated Item Image and Item Image 3 - Item Placement Area 1: Up-down placement, vertical ratio). The fourth target threshold is greater than 0. A fourth target threshold greater than 0 indicates that multiple item images are allocated to the item placement area. Second, in response to the item layout information being vertical item layout information, dividing the item placement area into a first vertical division area and a second vertical division area based on the height division value, as the first division area and the second division area. The height division value is the product of the height value of the item placement area and the vertical ratio value included in the item layout information. The simplified representation information of the first division area includes the coordinates of the first upper-left corner and the first lower-right corner. The first top-left corner coordinates include the first top-left x-coordinate and the first top-left y-coordinate. The first top-left x-coordinate is the same as the top-left x-coordinate of the area. The first top-left y-coordinate is the same as the top-left y-coordinate of the area. The first bottom-right corner coordinates include the first bottom-right x-coordinate and the first bottom-right y-coordinate. The first bottom-right x-coordinate is the sum of the first top-left x-coordinate and the width of the item placement area. The first bottom-right y-coordinate is the sum of the first top-left y-coordinate and the height division value. The simplified representation information of the second division area includes the second top-left corner coordinates and the second bottom-right corner coordinates. The second top-left corner coordinates include the second top-left x-coordinate and the second top-left y-coordinate. The second top-left x-coordinate is the same as the top-left x-coordinate of the area. The second top-left y-coordinate is the sum of the top-left y-coordinate of the area and the height division value. The second bottom-right corner coordinates include the second bottom-right x-coordinate and the second bottom-right y-coordinate. The second bottom-right x-coordinate is the sum of the top-left x-coordinate of the area and the width of the item placement area. The second bottom-right y-coordinate is the same as the bottom-right y-coordinate of the area. The third step, responding to the item layout information being horizontal, divides the item placement area into a first horizontal division area and a second horizontal division area based on the width division value. The width division value is the product of the width of the item placement area and the horizontal proportion value included in the item layout information. The simplified representation of the first division area includes the coordinates of the first top-left corner and the first bottom-right corner. The first top-left corner coordinate includes the first top-left horizontal coordinate and the first top-left vertical coordinate. The first top-left horizontal coordinate is the same as the top-left horizontal coordinate of the area. The first top-left vertical coordinate is the same as the top-left vertical coordinate of the area. The first bottom-right corner coordinate includes the first bottom-right horizontal coordinate and the first bottom-right vertical coordinate. The first bottom-right horizontal coordinate is the sum of the first top-left horizontal coordinate and the width division value. The first bottom-right vertical coordinate is the same as the bottom-right vertical coordinate of the area.The simplified representation of the second division area includes the coordinates of the second top-left corner and the second bottom-right corner. The second top-left corner coordinates include the second top-left x-coordinate and the second top-left y-coordinate. The second top-left x-coordinate is the sum of the region's top-left x-coordinate and the width division value. The second top-left y-coordinate is the same as the region's top-left y-coordinate. The second bottom-right corner coordinates include the second bottom-right x-coordinate and the second bottom-right y-coordinate. The second bottom-right x-coordinate is the same as the region's bottom-right x-coordinate. The second bottom-right y-coordinate is the same as the region's bottom-right y-coordinate. The fourth step is to determine the midpoint coordinates, width value, and height value of the first division area. The midpoint coordinates include the midpoint x-coordinate and the midpoint y-coordinate. The midpoint x-coordinate is the average of the region's top-left and bottom-right x-coordinates. The midpoint y-coordinate is the average of the region's top-left and bottom-right y-coordinates. The width value is equal to the width value of the item placement area. The height value is equal to the height value of the item placement area. Step 5: Based on the midpoint coordinates, width, and height of the first partitioned region and the transformation matrix of the corresponding item placement area, generate item image position information. For example, the executing entity inputs the midpoint coordinates, width, and height of the first partitioned region into the transformation matrix of the corresponding item placement area to generate item image position information. Step 6: Use the simplified representation information of the second partitioned region as the region simplified representation information, and subtract 1 from the item arrangement information quantity value as the item arrangement information quantity value, then execute the item image position information generation step again. Step 7: Determine the obtained item image position information as the item image position information corresponding to at least one item.
[0053] Step 705: For each item in the item information group, generate item image size information based on the item location information corresponding to the item information, the pre-acquired original width value of the item image and the original height value of the item image corresponding to the item information.
[0054] In some embodiments, for each item in the item information group, the executing entity generates item image size information based on the item location information corresponding to the item information, the pre-acquired original width value of the item image and the original height value of the item image of the corresponding item information.
[0055] In some optional implementations of certain embodiments, the item image location information includes an item region width value and an item region height value; and the executing entity generates item image size information for each item information in the item information group based on the item location information corresponding to the item information, the pre-acquired original item image width value and original item image height value of the corresponding item information, including the following steps: First, in response to determining that the item layout information corresponding to the item information is horizontal item layout information, an item width ratio value is determined based on the item region width value and the original item image width value. As an example, the executing entity performs a quotient operation on the item region width value and the original item image width value to obtain a width quotient value. The width quotient value is then multiplied by 1.25 to obtain the item width ratio value. Second, the product of the item width ratio value and the original item image width value is determined as the target width value. Third, the product of the item width ratio value and the original item image height value is determined as the target height value. Fourth, the target width value and the target height value are determined as the item image size information. Step 5: In response to determining that the item layout information corresponding to the item information is vertical item layout information, the item height ratio is determined based on the item region height value and the original height value of the item image. As an example, the executing entity performs a quotient operation on the item region height value and the original height value of the item image to obtain a height quotient value. The height quotient value is then productted with 1.25 to obtain the item height ratio value. Step 6: The product of the item height ratio value and the original width value of the item image is determined as the target width value. Step 7: The product of the item height ratio value and the original height value of the item image is determined as the target height value. Step 8: The target width value and the target height value are determined as the item image size information.
[0056] Step 706: Based on the obtained image size information of each item, scale the images of each item included in the item information group to obtain the scaled item information group.
[0057] In some embodiments, the executing entity scales each item image in the item information group to the corresponding item image size information according to the obtained item image size information, thereby obtaining a scaled item image group.
[0058] Step 707: Based on the obtained item location information, fill the scaled item information group into the corresponding item placement area in the target background image to obtain the item information matching image.
[0059] In some embodiments, the executing entity fills the scaled item information group into the corresponding item placement area in the target background image based on the coordinates of the center point in the item area included in the obtained item image location information, thereby obtaining an item information matching image. Here, the item image location information refers to the location information included in the item location information.
[0060] from Figure 7 It can be seen from this that, with Figure 6 Compared to the description of some corresponding embodiments, Figure 7 The flow 700 of the item information matching image generation method in some corresponding embodiments reflects the adjustment of the position and size of the item image based on the item position information and item image size information. The scheme described in these embodiments first determines the item arrangement relationship information, then uses the item arrangement relationship information and the simplified representation information of the item placement area to determine the item image position information, and finally determines the item image size information based on the item image position information. Thus, the position and size of the item image in the target background image are dynamically adjusted, making the generated item information matching image more reasonable and aesthetically pleasing.
[0061] Further reference Figure 8 As an implementation of the methods shown in the figures, this disclosure provides some embodiments of an item information matching diagram generation apparatus, which are similar to... Figure 6 Corresponding to the method embodiments shown, the device is specifically applied in various electronic devices.
[0062] like Figure 8 As shown, the item information matching diagram generation device 800 in some embodiments includes: a first determining unit 801, a second determining unit 802, a third determining unit 803, a fourth determining unit 804, and a filling unit 805. The first determining unit 801 is configured to determine the corresponding item placement area type and item placement scene type for each item information included in the pre-acquired item information group, wherein the item information in the item information group also includes item images; the second determining unit 802 is configured to determine the target background image and the item allocation relationship information corresponding to the target background image based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information group, and the pre-acquired set of background images, wherein the target background image includes at least one item placement area; the third determining unit 803 is configured to determine at least one item information corresponding to each item placement area in the at least one item placement area based on the item allocation relationship information; the fourth determining unit 804 is configured to determine the item position information corresponding to at least one item information for each item placement area in the at least one item placement area; and the filling unit 805 is configured to fill the item images included in the item information group into the corresponding item placement areas in the target background image according to the obtained item position information, thereby obtaining an item information matching image.
[0063] Optionally, the filling unit 805 is configured to: for each item information in the item information group, generate item image size information based on the item position information corresponding to the item information, the pre-acquired original width value of the item image of the corresponding item information, and the original height value of the item image; scale each item image included in the item information group according to the obtained item image size information to obtain a scaled item image group; and fill the scaled item image group into the corresponding item placement area in the target background image according to the obtained item position information to obtain an item information matching image.
[0064] Optionally, the second determining unit 802 is configured to: for the background image set, perform the following background image filtering steps: select a background image from the background image set; obtain at least one area type and at least one scene type corresponding to at least one item placement area included in the selected background image; in response to the existence of a subset of item placement area types in the set of item placement area types that have the same content as at least one area type and a subset of item placement scene types in the set of item placement scene types that have the same content as at least one scene type, allocate item information that matches the item placement area type, item placement scene type and area type, and scene type to the corresponding item placement area to obtain the allocation result.
[0065] Optionally, the second determining unit 802 is configured such that the background image filtering step further includes: determining whether there is at least one similar allocation result in the allocation results, wherein the similar allocation result represents that multiple similar item information is allocated to at least one similar item placement area, the multiple item placement areas corresponding to the multiple similar item information are of the same type, the multiple item placement scene types corresponding to the multiple similar item information are of the same type, at least one area corresponding to at least one similar item placement area is of the same type, and at least one scene type corresponding to at least one similar item placement area is of the same type; in response to the existence of at least one similar allocation result in the allocation results, for at least one similar allocation result, the following similar allocation result filtering step is performed: selecting similar allocation results from at least one similar allocation result. Results: Multiple similar item information corresponding to the selected similar allocation results are identified as a set of similar item information; at least one similar item placement area corresponding to the selected similar allocation result is identified as a set of similar item placement areas; the item image size values corresponding to each similar item information in the similar item information set are sorted in descending order to obtain a sorted sequence of item image size values; the area image size values of each similar item placement area in the similar item placement area set are sorted in descending order to obtain a sorted sequence of area image size values; the number of similar item information in the similar item information set is determined to obtain the number of similar item information; the number of similar item placement areas in the similar item placement area set is determined to obtain the number of similar item placement areas.
[0066] Optionally, the second determining unit 802 is configured such that the similar allocation result filtering step further includes: in response to the quantity value of similar item information being less than or equal to the quantity value of similar item placement areas, allocating each item image included in the similar item information set to the corresponding item placement area according to the sorted item image size value sequence and the sorted area image size value sequence, to obtain a similar item allocation relationship set; based on the similar item allocation relationship set, performing the following background image processing steps: determining the image size difference corresponding to each similar item allocation relationship in the similar item allocation relationship set, to obtain an image size difference set; in response to the fact that no image size difference in the image size difference set is less than a first target threshold, and the number of unselected similar allocation results in at least one similar allocation result is equal to a second target threshold, adding the selected background image as a candidate background image to a pre-created initial candidate background image set, to obtain a candidate background image set; in response to the fact that no image size difference in the image size difference set is less than a first target threshold, and the number of unselected similar allocation results in at least one similar allocation result is equal to a second target threshold, determining the obtained at least one similar item allocation relationship set as the item allocation relationship information of the corresponding candidate background image.
[0067] Optionally, the second determining unit 802 is configured such that the similar allocation result filtering step further includes: in response to the fact that the number of similar item information values is greater than the number of similar item placement areas, based on the sorted item image size value sequence and the sorted area image size value sequence, performing the following item allocation relationship information generation step: determining the item images included in each of the similar item information corresponding to the first N sorted item image size values in the sorted item image size value sequence as the set of item images to be allocated, wherein the value of N is the same as the number of similar item placement areas; allocating the set of item images to be allocated to the corresponding item placement areas according to the sorted item image size value sequence and the sorted area image size value sequence to obtain the set of item allocation relationships to be allocated, which serves as the set of similar item allocation relationships; determining the image corresponding to each item allocation relationship in the set of item allocation relationships to be allocated. Size difference is used to obtain a set of allocated image size difference values. In response to the absence of any allocated image size difference value less than a first target threshold in the allocated image size difference value set, the allocated image size difference value set is sorted in descending order to obtain a sorted sequence of allocated image size difference values. The number of unallocated items in the unallocated item image set is determined, where the unallocated item image set is the set of item images excluding the set of items to be allocated from each item image corresponding to the set of information on similar items. In response to the number of unallocated items being less than or equal to the number of similar item placement areas, based on the item image size values corresponding to the unallocated item image set and the sorted sequence of allocated image size difference values, the item images included in each unallocated item image set are allocated to their corresponding item placement areas to obtain a set of unallocated item allocation relationships. The set of unallocated item allocation relationships is used as the set of similar item allocation relationships, and the background image processing steps are performed.
[0068] Optionally, the second determining unit 802 is configured to: determine whether the candidate background image set is an empty set; in response to the candidate background image set not being an empty set, select a candidate background image from the candidate background image set as the target background image, and use the item allocation relationship information corresponding to the selected candidate background image as the item allocation relationship information of the corresponding target background image; in response to the candidate background image set being an empty set, determine the pre-acquired general background image as the target background image.
[0069] Optionally, the item location information includes item arrangement relationship information. The fourth determining unit 804 is configured to: determine at least one item information corresponding to the item placement area as an allocation item information set; obtain the actual size value of the allocated item corresponding to each allocated item information in the allocation item information set, to obtain an allocation item actual size value set; obtain the area image size value and area actual size value of the item placement area; generate an allocation item image size value set based on the allocation item actual size value set, the area image size value, and the area actual size value; sort the allocation item image size value set in ascending order to generate a sorted allocation item image size value sequence; determine the number of size values of the sorted allocation item image size value sequence; and generate item arrangement relationship information in response to the number of size values being a third target threshold.
[0070] Optionally, the fourth determining unit 804 is configured to: in response to the number of size values being greater than a third target threshold, for the sorted sequence of allocated item image size values, perform the following item arrangement relationship information determination steps: determine the item images corresponding to the two smallest sorted sequence of allocated item image size values as the first item image and the second item image; generate height ratio values and width ratio values based on the first item image and the second item image; in response to the height ratio value being greater than the width ratio value, generate horizontal item arrangement information as item arrangement relationship information, wherein the horizontal item arrangement information includes left and right arrangement information and a horizontal ratio value, the horizontal ratio value being the same as the width ratio value; in response to the height ratio value being less than or equal to the width ratio value, generate vertical item arrangement information as item arrangement relationship information, wherein the vertical item arrangement information includes left and right arrangement information and a horizontal ratio value, the horizontal ratio value being the same as the width ratio value; in response to the height ratio value being less than or equal to the width ratio value, generate vertical item arrangement information as item arrangement relationship information, wherein the vertical item arrangement information includes left and right arrangement information and a horizontal ratio value, the horizontal ratio value being the same as the width ratio value; The item layout information includes top and bottom layout information and vertical proportion value, with the vertical proportion value being the same as the height proportion value; the first item image and the second item image are determined as the integrated item image; based on the allocated item image size value corresponding to the integrated item image and the sorted allocated item image size value sequence, an updated allocated item image size value sequence is generated; the number of updated size values in the updated allocated item image size value sequence is determined; in response to the number of updated size values being a third target threshold, item layout relationship information is generated; in response to the number of updated size values being greater than the third target threshold, the updated allocated item image size value sequence is used as the sorted allocated item image size value sequence, and the item layout relationship information determination step is executed again; each obtained item layout relationship information is determined as item layout relationship information corresponding to at least one item.
[0071] Optionally, the fourth determining unit 804 is configured to: generate a height ratio value and a width ratio value based on the first item image and the second item image, including: acquiring the height value and width value of the first item image as a first height value and a first width value; acquiring the height value and width value of the second item image as a second height value and a second width value; determining the ratio of the first height value and the second height value to obtain a height ratio value; and determining the ratio of the first width value and the second width value to obtain a width ratio value.
[0072] Optionally, the item location information includes item image location information. The fourth determining unit 804 is configured to: determine the item layout information quantity value of at least one item layout information, wherein the at least one item layout information is the item layout information included in the item layout relationship information corresponding to at least one item information; for the simplified representation information of the item placement area, wherein the simplified representation information of the area includes the coordinates of the upper left corner of the area and the coordinates of the lower right corner of the area, based on the item layout information quantity value, perform the following item image location information generation steps: in response to the item layout information quantity value being equal to a fourth target threshold, determine the simplified representation information of a first area, wherein the first area is the area in the item placement area, and the simplified representation information of the first area is the same as the simplified representation information of the area; based on the midpoint coordinates, width value, height value of the first area and the transformation matrix of the corresponding item placement area, generate item image location information, wherein the item image location information includes at least one of the following: item information, coordinates of the midpoint of the item area, width value of the item area, height value of the item area, and item layout relationship information.
[0073] Optionally, the fourth determining unit 804 is configured such that the item image location information generation step further includes: in response to the item arrangement information quantity value being greater than a fourth target threshold, selecting item arrangement information from at least one item arrangement information, wherein the item arrangement information includes horizontal item arrangement information or vertical item arrangement information; in response to the item arrangement information being vertical item arrangement information, dividing the item placement area into a first vertical division area and a second vertical division area according to a height division value, as the first division area and the second division area; in response to the item arrangement information being horizontal item arrangement information, dividing the item placement area into a first horizontal division area according to a width division value. Divide the region into a first division region and a second horizontal division region; determine the midpoint coordinates, width, and height of the first division region; based on the midpoint coordinates, width, and height of the first division region and the transformation matrix of the corresponding item placement area, generate item image position information; use the simplified representation information of the second division region as the simplified representation information of the region, and subtract 1 from the item arrangement information quantity value as the item arrangement information quantity value, and execute the item image position information generation step again; determine each item image position information obtained as the item image position information corresponding to at least one item.
[0074] Optionally, the item image location information includes an item region width value and an item region height value. The filling unit 805 is configured to: in response to determining that the item layout information corresponding to the item information is horizontal item layout information, determine an item width ratio value based on the item region width value and the original width value of the item image; determine a target width value by multiplying the item width ratio value and the original width value of the item image; determine a target height value by multiplying the item width ratio value and the original height value of the item image; and determine the target width value and the target height value as item image size information; in response to determining that the item layout information corresponding to the item information is vertical item layout information, determine an item height ratio value based on the item region height value and the original height value of the item image; determine a target width value by multiplying the item height ratio value and the original width value of the item image; and determine the target height value and the target width value as item image size information.
[0075] Optionally, the first determining unit 801 is configured to generate the background image set through the following steps: acquiring images of various scene types as a background image set, wherein the background images in the background image set include at least one item placement area; for each background image in the background image set, adjusting the size of each item placement area included in the background image to obtain an adjusted background image; and determining the obtained adjusted background image set as the background image set.
[0076] Optionally, the first determining unit 801 is configured to: adjust the size of each item placement area included in the background image, including: for each item placement area, performing the following size adjustment steps: obtaining adjusted item information according to the area type and scene type of the item placement area, wherein the adjusted item information includes the actual size value of the item; determining the area image size value and the actual size value of the area of the item placement area; generating an item image size value according to the actual size value of the item, the area image size value and the actual size value of the area; and adjusting the size of the item placement area according to the item image size value.
[0077] It is understood that the units described in the device 800 and the reference Figure 6 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 600 and the units contained therein, and will not be repeated here.
[0078] The following is for reference. Figure 9 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 A schematic diagram of the structure of the computing device 900. Electronic devices in some embodiments of this disclosure include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0079] like Figure 9 As shown, the electronic device 900 includes a processing unit (e.g., a central processing unit, a graphics processor, etc.) 901, which performs various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0080] Typically, the following devices are connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 An electronic device 900 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. Alternatively, more or fewer devices may be implemented or possessed. Figure 9 Each box shown represents a device, and may also represent multiple devices as needed.
[0081] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts are implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program is downloaded and installed from a network via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, it performs the functions defined in the methods of some embodiments of this disclosure.
[0082] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described is a computer-readable signal medium or a computer-readable storage medium, or any combination of both. A computer-readable storage medium is, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, 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 device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium is any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium includes a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium, or any computer-readable medium other than a computer-readable storage medium, is used to send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0083] In some implementations, the client and server communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and interconnect with digital data communication (e.g., a communication network) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0084] A computer-readable medium is included in an electronic device; it can also exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: determine, for each item category information included in a pre-acquired set of item information, the corresponding item placement area type and item placement scene type, wherein the item information in the item information set also includes item images; determine, based on the obtained set of item placement area types, the obtained set of item placement scene types, the item information set, and the pre-acquired set of background images, determine a target background image and corresponding item allocation relationship information for the target background image, wherein the target background image includes at least one item placement area; for each item placement area in the at least one item placement area, determine at least one item information corresponding to the item placement area based on the item allocation relationship information; for each item placement area in the at least one item placement area, determine item position information corresponding to at least one item information; and, according to the obtained item position information, fill the corresponding item placement areas in the target background image with the item images included in the item information set to obtain an item information matching image.
[0085] Computer program code for performing operations of some embodiments of this disclosure is written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code executes entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer is connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or connected to an external computer (e.g., via the Internet using an Internet service provider).
[0086] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram represents a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually execute substantially in parallel, and they may sometimes execute in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, is implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0087] The units described in some embodiments of this disclosure are implemented in software or hardware. The described units are also housed in a processor; for example, a processor may be described as including a first determining unit, a second determining unit, a third determining unit, a fourth determining unit, and a filling unit. The names of these units do not necessarily limit the specific unit itself; for example, the first determining unit may also be described as "a unit that determines the corresponding item placement area type and item placement scene type for each item category information included in a pre-acquired item information group."
[0088] The functions described above in this document are performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0089] Some embodiments of this disclosure also provide a computer program product, including a computer program, and any request data sending method implemented by the computer program when executed by a processor.
[0090] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of technical features, but should also cover other technical solutions formed by arbitrary combinations of technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for generating an item information collage, comprising: determining, for item category information included in each item information in a pre-acquired item information set, a corresponding item placement area type and an item placement scene type, wherein the item information in the item information set further comprises an item image; determining, based on a set of obtained item placement area types, a set of obtained item placement scene types, the item information set, and a pre-acquired background image set, a target background image and item allocation relationship information corresponding to the target background image, wherein the target background image comprises a plurality of item placement areas, and the item allocation relationship information is allocation relationship information between the item information set and the plurality of item placement areas; determining, for each item placement area in the plurality of item placement areas, at least one item information corresponding to the item placement area based on the item allocation relationship information; determining, for each item placement area in the plurality of item placement areas, item position information of the at least one item information, wherein the item position information comprises item arrangement relationship information, and the item arrangement relationship information represents arrangement information of each item image in the item placement area; filling, according to the obtained item position information, each item image included in the item information set into a corresponding item placement area in the target background image to obtain an item information collage.
2. The method of claim 1, wherein, The filling, according to the obtained item position information, each item image included in the item information set into a corresponding item placement area in the target background image to obtain an item information collage comprises: generating, for each item information in the item information set, item image size information according to item position information corresponding to the item information, a pre-acquired item image original width value corresponding to the item information, and an item image original height value corresponding to the item information; performing, according to the obtained item image size information, scaling processing on each item image included in the item information set to obtain a scaled item image set; filling, according to the obtained item position information, the scaled item image set into a corresponding item placement area in the target background image to obtain an item information collage.
3. The method of claim 1, wherein, The determining, based on the set of obtained item placement area types, the set of obtained item placement scene types, the item information set, and the pre-acquired background image set, the target background image and the item allocation relationship information corresponding to the target background image comprises: performing, for the background image set, the following background image screening step: selecting a background image from the background image set; acquiring at least one area type and at least one scene type corresponding to at least one item placement area included in the selected background image; In response to the existence of a subset of the item display region types in the set of the item display region types being identical to the at least one region type content and the existence of a subset of the item display scene types in the set of the item display scene types being identical to the at least one scene type content, the item information matched with the region type and the scene type of the item display region type and the item display scene type is allocated to the corresponding item placement region, to obtain an allocation result.
4. The method of claim 3, wherein, The background image screening step further includes: determining whether there is at least one same-class allocation result in the allocation result, wherein the same-class allocation result represents the allocation of a plurality of same-class item information to at least one same-class item placement region, the plurality of same-class item information corresponds to a plurality of item display region types that are identical, the plurality of same-class item information corresponds to a plurality of item display scene types that are identical, the at least one same-class item placement region corresponds to at least one region type that is identical, and the at least one same-class item placement region corresponds to at least one scene type that is identical; in response to the existence of at least one same-class allocation result in the allocation result, performing the following same-class allocation result screening step for the at least one same-class allocation result: selecting a same-class allocation result from the at least one same-class allocation result; determining a plurality of same-class item information corresponding to the selected same-class allocation result as a same-class item information set; determining at least one same-class item placement region corresponding to the selected same-class allocation result as a same-class item placement region set; performing descending order sorting on the item image size value corresponding to each same-class item information in the same-class item information set, to obtain a sorted item image size value sequence; performing descending order sorting on the region image size value of each same-class item placement region in the same-class item placement region set, to obtain a sorted region image size value sequence; determining the number of same-class item information in the same-class item information set, to obtain a same-class item information number value; determining the number of same-class item placement regions in the same-class item placement region set, to obtain a same-class item placement region number value.
5. The method of claim 4, wherein, The same-class allocation result screening step further includes: in response to the same-class item information number value being less than or equal to the same-class item placement region number value, allocating each item image included in the same-class item information set to the corresponding item placement region according to the sorted item image size value sequence and the sorted region image size value sequence, to obtain a same-class item allocation relationship set; based on the same-class item allocation relationship set, performing the following background image processing step: determining the image size difference value corresponding to each same-class item allocation relationship in the same-class item allocation relationship set, to obtain an image size difference value set; in response to the non-existence of any image size difference value less than a first target threshold value in the image size difference value set and the number of same-class allocation results not selected in the at least one same-class allocation result being equal to a second target threshold value, selecting the selected background image as a candidate background image and adding it to a pre-created initial candidate background image set, to obtain a candidate background image set; In response to none of the image size difference values in the image size difference value set being less than the first target threshold value and the number of unselected same-category allocation results in the at least one same-category allocation result being equal to the second target threshold value, the obtained at least one same-category item allocation relationship set is determined as the item allocation relationship information corresponding to the candidate background image.
6. The method of claim 5, wherein, The same-category allocation result screening step further includes: In response to the same-category item information quantity value being greater than the same-category item placement region quantity value, based on the sorted item image size value sequence and the sorted region image size value sequence, the following item allocation relationship information generation step is performed: each same-category item information included in the first N sorted item image size values in the sorted item image size value sequence is determined as an item image to be allocated, where N has the same value as the same-category item placement region quantity value; based on the sorted item image size value sequence and the sorted region image size value sequence, the item image to be allocated is allocated to a corresponding item placement region, to obtain an item allocation relationship set to be allocated as a same-category item allocation relationship set; an image size difference value corresponding to each item allocation relationship to be allocated in the item allocation relationship set to be allocated is determined, to obtain an allocation image size difference value set; in response to none of the allocation image size difference values in the allocation image size difference value set being less than the first target threshold value, the allocation image size difference value set is sorted in descending order, to obtain a sorted allocation image size difference value sequence; an unallocated quantity of an unallocated item image set is determined, where the unallocated item image set is a set of item images obtained by excluding the item image to be allocated from each item image corresponding to the same-category item information set; in response to the unallocated quantity being less than or equal to the same-category item placement region quantity value, based on the item image size value corresponding to the unallocated item image set and the sorted allocation image size difference value sequence, an item image included in each unallocated item image is allocated to a corresponding item placement region, to obtain an unallocated item allocation relationship set; the unallocated item allocation relationship set is taken as the same-category item allocation relationship set, and the background image processing step is performed.
7. The method of claim 6, wherein, The target background image and the item allocation relationship information corresponding to the target background image are determined based on the obtained item placement region type set, the obtained item placement scene type set, the item information group, and the pre-acquired background image set, and further include: determining whether the candidate background image set is an empty set; in response to the candidate background image set not being an empty set, selecting a candidate background image from the candidate background image set as a target background image, and taking the item allocation relationship information corresponding to the selected candidate background image as the item allocation relationship information corresponding to the target background image; in response to the candidate background image set being an empty set, determining a general background image pre-acquired as a target background image.
8. The method of claim 2, wherein, The item position information includes item arrangement relationship information; and For each item placement area in the at least one item placement area, determining the item location information corresponding to at least one item includes: At least one item information corresponding to the item placement area is determined as the set of allocated item information; Obtain the actual size value of the allocated item corresponding to each allocated item information in the allocated item information set to obtain the set of actual size values of the allocated items. Obtain the area image size value and the actual area size value of the area where the item is placed; Based on the set of actual size values of the allocated items, the size values of the region image, and the actual size values of the region, a set of size values of the allocated item image is generated; The set of allocated item image size values is sorted in ascending order to generate a sorted sequence of allocated item image size values; Determine the number of size values of the sorted and assigned item image size values in the sorted and assigned item image size value sequence; In response to the number of size values being a third target threshold, item arrangement relationship information is generated.
9. The method of claim 8, wherein, The step of determining the item location information corresponding to at least one item for each item placement area in the at least one item placement area further includes: In response to the number of size values exceeding the third target threshold, for the sorted sequence of assigned item image size values, the following steps for determining item arrangement relationship information are performed: The two item images corresponding to the smallest sorted item image size values in the sorted sequence of item image size values are determined as the first item image and the second item image. Based on the first item image and the second item image, generate height ratio values and width ratio values; In response to the height ratio being greater than the width ratio, horizontal item layout information is generated as item layout relationship information. The horizontal item layout information includes left and right layout information and a horizontal ratio value, wherein the horizontal ratio value is the same as the width ratio value. In response to the height ratio value being less than or equal to the width ratio value, vertical item layout information is generated as item layout relationship information, wherein the vertical item layout information includes top and bottom layout information and a vertical ratio value, and the vertical ratio value is the same as the height ratio value; The first item image and the second item image are identified as a combined item image; Based on the allocated item image size value corresponding to the integrated item image, and the sorted allocated item image size value sequence, an updated allocated item image size value sequence is generated; Determine the number of updated dimension values in the sequence of updated assigned item image dimension values; In response to the number of updated size values being equal to the third target threshold, item arrangement relationship information is generated; The obtained item arrangement relationship information is determined as item arrangement relationship information corresponding to at least one item.
10. The method of claim 9, wherein, The step of generating height and width ratio values based on the first and second item images includes: Obtain the height and width values of the first item image, and use them as the first height value and the first width value; Obtain the height and width values of the second item image, and use them as the second height value and the second width value; determining a ratio value of the first height value and the second height value to obtain a height ratio value; determining a ratio value of the first width value and the second width value to obtain a width ratio value.
11. The method of claim 9, wherein, The item position information includes item image position information. And For each of the at least one item placement area, determining the item position information corresponding to the at least one item information further includes: determining an item arrangement information quantity value of at least one item arrangement information, wherein the at least one item arrangement information is the item arrangement information included in the corresponding at least one item information; For the region simple representation information of the item placement area, the region simple representation information includes the coordinates of the upper left corner of the region and the coordinates of the lower right corner of the region, and based on the item arrangement information quantity value, the following item image position information generation steps are executed: In response to the item arrangement information quantity value being equal to a fourth target threshold value, determining the simple representation information of a first region, wherein the first region is a region in the item placement area, and the simple representation information of the first region is the same as the region simple representation information; determining the midpoint coordinates, width value and height value of the first region; Based on the midpoint coordinates, width value and height value of the first region and the transformation matrix corresponding to the item placement area, generate item image position information, wherein the item image position information includes at least one of the following: item information, item region midpoint coordinates, item region width value, item region height value, item arrangement relationship information.
12. The method of claim 11, wherein, The item image position information generation step further includes: In response to the item arrangement information quantity value being greater than the fourth target threshold value, selecting item arrangement information from the at least one item arrangement information, wherein the item arrangement information includes horizontal item arrangement information or vertical item arrangement information; In response to the item arrangement information being vertical item arrangement information, dividing the item placement area into a first vertical division region and a second vertical division region according to the height division value, as the first division region and the second division region; In response to the item arrangement information being horizontal item arrangement information, dividing the item placement area into a first horizontal division region and a second horizontal division region according to the width division value, as the first division region and the second division region; determining the division midpoint coordinates, division width value and division height value of the first division region; Based on the division midpoint coordinates, division width value and division height value of the first division region and the transformation matrix corresponding to the item placement area, generate item image position information; The simple representation information of the second division region is taken as the region simple representation information, and the value of the item arrangement information quantity value after being reduced by 1 is taken as the item arrangement information quantity value, and the item image position information generation step is executed again; The obtained each item image position information is determined as the item image position information corresponding to the at least one item information.
13. The method of claim 12, wherein, The item image position information includes the item region width value and the item region height value; and The method comprises the following steps: In response to determining that the item arrangement information corresponding to the item information is horizontal item arrangement information, determining an item width ratio value based on the item area width value and the item image original width value; Determining a product of the item width ratio value and the item image original width value as a target width value; Determining a product of the item width ratio value and the item image original height value as a target height value; Determining the target width value and the target height value as item image size information; In response to determining that the item arrangement information corresponding to the item information is vertical item arrangement information, determining an item height ratio value based on the item area height value and the item image original height value; Determining a product of the item height ratio value and the item image original width value as a target width value; Determining a product of the item height ratio value and the item image original height value as a target height value; Determining the target width value and the target height value as item image size information.
14. The method of claim 1, wherein, The background image set is generated by the following steps: Obtaining images of various scene types as a background image set, wherein the background images in the background image set include at least one item placement area; For each background image in the background image set, performing size adjustment on each item placement area included in the background image to obtain an adjusted background image; Determining the obtained adjusted background image set as the background image set.
15. The method of claim 14, wherein, The size adjustment on each item placement area included in the background image comprises: For each item placement area in the various item placement areas, the following size adjustment steps are performed: According to the region type and scene type of the item placement area, obtaining adjustment item information, wherein the adjustment item information includes an item real size value; Determining a region image size value and a region real size value of the item placement area; Generating an item image size value according to the item real size value, the region image size value and the region real size value; According to the item image size value, performing size adjustment on the item placement area.
16. An item information collocation diagram generation device, comprising: A first determination unit configured to determine, for each item category information included in a pre-obtained item information set, a corresponding item placement region type and item placement scene type, wherein the item information in the item information set further includes an item image; A second determination unit configured to determine, based on the obtained item placement region type set, the obtained item placement scene type set, the item information set and a pre-obtained background image set, a target background image and item allocation relationship information corresponding to the target background image, wherein the target background image includes a plurality of item placement areas, and the item allocation relationship information is the allocation relationship information of the item information set and the plurality of item placement areas; a third determining unit, configured to determine, for each of the plurality of the article placement regions, at least one article information corresponding to the article placement region based on the article allocation relationship information; a fourth determining unit, configured to determine, for each of the plurality of the article placement regions, article position information of the at least one article information, wherein the article position information comprises article arrangement relationship information, and the article arrangement relationship information represents arrangement information of each article image in the article placement region; a filling unit, configured to fill each article image included in the article information group into a corresponding article placement region in the target background image according to the obtained article position information, to obtain an article information collocation image. 17.An electronic device, comprising: one or more processors; one or more programs stored on the storage device; when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-15.
18. A computer readable medium having stored thereon a computer program, wherein, The computer program is executed by the processor to implement the method according to any one of claims 1-15. 19.A computer program product, comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-15.
Citation Information
Patent Citations
Picture generation method, device, medium and electronic equipment
CN110378432A
Image processing method and device
CN113763511A