Picture generation method and device
By analyzing the identification of items and updating the standard picture to generate results, the problem of the problem of the main diagram of the Internet trading platform's prescription pharmaceutical main picture has been solved, and the effect of rapid generation and efficient review is achieved.
Patent Information
- Application Number
- CN202310926687.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-01-28
Smart Images

Figure CN119379853A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision and medical health technology, and in particular to a method and device for generating an image. Background Art
[0002] With the promotion of Internet technology and the development of e-commerce, online shopping has become a widely accepted consumption method for the public. Merchants provide a variety of consumer goods to the public through online shopping platforms. Online transactions of Internet medical items, especially prescription drugs, need to comply with the regulatory provisions of relevant departments. At present, Internet trading platforms are not allowed to display complete medicine boxes in the main image position of prescription drugs. For this reason, all relevant merchants need to edit and replace the main image of online prescription drugs according to requirements.
[0003] In the process of implementing the present invention, the inventors found that the prior art has the following problems:
[0004] Although existing Internet trading platforms can provide merchants with some convenient mapping tools, the mapping capabilities of merchants vary greatly, and since all prescription drugs are involved, the amount of mapping is also large, and the main image design cannot be completed quickly and in a timely manner; on the other hand, faced with the massive main image review tasks submitted by various merchants, Internet trading platforms need to invest in additional manual review, which consumes a lot of manpower and material resources and affects the review efficiency. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for generating an image. According to the item identification parsed from the image generation request, the corresponding standard image is searched, and then the corresponding standard image is updated according to the requester information to obtain the required result image. An embodiment of the present invention provides a convenient image generation method. Based on the generated standard image of the item, only the content of the relevant requester information needs to be updated to quickly generate the required image. This not only effectively alleviates the mapping pressure of the merchant and improves the efficiency of image generation, but also the item image generated according to the standard image is more convenient for system review, which helps to improve the efficiency of image review.
[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for generating an image is provided, comprising:
[0007] In response to receiving the image generation request, parsing the item identifier from the image generation request;
[0008] Find a standard image corresponding to the item identifier;
[0009] The standard image is updated according to the requester information corresponding to the image generation request to obtain a result image corresponding to the image generation request.
[0010] Optionally, the method further includes: if no standard picture corresponding to the item identification is found, obtaining standard picture material corresponding to the item and preset picture elements according to the item identification; and generating a standard picture corresponding to the item identification according to the standard picture material corresponding to the item and the preset picture elements.
[0011] Optionally, before obtaining standard picture materials corresponding to the item and preset picture elements according to the item identification, the method includes: obtaining materials of each picture element corresponding to the item and preset picture elements according to the item identification; and generating standard picture materials corresponding to each picture element according to the materials of each picture element.
[0012] Optionally, the picture elements include photo elements; the standard picture materials include standard photo materials; and based on the materials of the respective picture elements, standard picture materials corresponding to the respective picture elements are generated, including: converting the materials of the photo elements into a perspective image of an object with a transparent background, processing the other parts of the perspective image except for displayable text content to be visually invisible, and obtaining standard photo materials corresponding to the photo elements.
[0013] Optionally, the picture elements include text elements; the standard picture materials include standard text materials; based on the materials of the various picture elements, standard picture materials corresponding to the various picture elements are generated, including: based on the format and layout in the preset picture elements, the materials of the text elements are formatted and arranged to obtain standard text materials corresponding to the text elements.
[0014] Optionally, a standard picture corresponding to the object identification is generated based on the standard picture material corresponding to the object and the preset picture elements, including: fusing the standard photo material and the standard text material, and using the fused picture as the standard picture corresponding to the object identification.
[0015] Optionally, the standard image is updated according to the requesting party information corresponding to the image generation request, including: parsing update information from the requesting party information; determining content to be updated in the standard image according to the update information, and updating the content to be updated.
[0016] According to a second aspect of an embodiment of the present invention, there is provided a device for generating a picture, including:
[0017] An item identification acquisition module, configured to parse the item identification from the image generation request in response to receiving the image generation request;
[0018] A standard image acquisition module, used to find a standard image corresponding to the item identifier;
[0019] The standard image updating module is used to update the standard image according to the requesting party information corresponding to the image generation request to obtain a result image corresponding to the image generation request.
[0020] Optionally, the device also includes a standard picture generation module, which is used to: when no standard picture corresponding to the object identification is found, obtain standard picture materials corresponding to the object and preset picture elements according to the object identification; and generate a standard picture corresponding to the object identification according to the standard picture materials corresponding to the object and the preset picture elements.
[0021] Optionally, the device also includes a standard picture material generation module, which is used to: before obtaining the standard picture material corresponding to the item and the preset picture element according to the item identification, obtain the material of each picture element corresponding to the item and the preset picture element according to the item identification; and generate standard picture materials corresponding to each picture element according to the material of each picture element.
[0022] Optionally, the image element includes a photo element; the standard image material includes a standard photo material; the standard image material generation module is further used to: convert the material of the photo element into an object perspective with a transparent background, process the other parts of the object perspective except for the displayable text content to be visually invisible, and obtain standard photo material corresponding to the photo element.
[0023] Optionally, the image elements include text elements; the standard image materials include standard text materials; the standard image material generation module is further used to: process the format and layout of the materials of the text elements according to the format and layout in the preset image elements, and obtain standard text materials corresponding to the text elements.
[0024] Optionally, the standard image generation module is further used to: fuse the standard photo material and the standard text material, and use the fused image as the standard image corresponding to the object identification.
[0025] Optionally, the standard image update module is further used to: parse update information from the requesting party information; determine the content to be updated in the standard image according to the update information, and update the content to be updated.
[0026] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for generating a picture, including:
[0027] one or more processors;
[0028] a storage device for storing one or more programs,
[0029] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.
[0030] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.
[0031] An embodiment of the invention has the following advantages or beneficial effects: by responding to receiving a picture generation request, parsing the item identification from the picture generation request; searching for a standard picture corresponding to the item identification; updating the standard picture according to the requester information corresponding to the picture generation request, and obtaining a technical solution of a result picture corresponding to the picture generation request, a convenient picture generation method is realized, based on the generated standard picture of the item, only the content of the relevant requester information needs to be updated to quickly generate the required picture, which not only alleviates the mapping pressure of merchants and improves the picture generation efficiency, but also the item pictures generated according to the standard pictures are easier to review, thereby improving the picture review efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0033] Figure 1 is a schematic diagram of the main process of the method for generating an image according to an embodiment of the present invention;
[0034] Figure 2 is a schematic diagram of performing picture element analysis on an example main picture according to an embodiment of the present invention;
[0035] Figure 3 is a schematic diagram of a method for processing standard photo materials according to an embodiment of the present invention;
[0036] Figure 4 is a schematic diagram of a preferred processing method for standard photo materials according to an embodiment of the present invention;
[0037] Figure 5 It is a schematic diagram of the principle of a method for generating a main image of a certain medicine according to an embodiment of the present invention;
[0038] Figure 6 is a detailed flowchart of a method for generating an image according to an embodiment of the present invention;
[0039] Figure 7 is a schematic diagram of main modules of a device for generating a picture according to an embodiment of the present invention;
[0040] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0041] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0042] It should be noted that in the technical solution of the present invention, the collection / collection, update, analysis, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken for user personal information to selectively block the use or access to personal information data to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. In addition, once these user personal information data are no longer needed, the risks should be minimized by limiting or even prohibiting data collection and / or deleting data.
[0043] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0044] At present, for the task of generating images of a large number of prescription drugs online, although the platform can provide merchants with some convenient mapping tools, the mapping capabilities of merchants vary greatly, and all prescription drugs are involved, the mapping volume is also large, and the main images of prescription drugs cannot be generated quickly and in a timely manner; on the other hand, faced with the massive drug main image review tasks of various merchants, the system also needs to invest corresponding additional manual review, which consumes a lot of manpower and material resources, affects the review efficiency of drug main images, and cannot meet practical applications well.
[0045] In order to solve the above problems existing in the prior art, the present invention proposes a method for generating an image, which searches for a corresponding standard image according to the item identification parsed from the image generation request, and then updates the corresponding standard image according to the requester information to obtain the required image. The embodiment of the present invention provides a more convenient image generation method, which can quickly generate the required image based on the generated item standard image by only updating the content of the relevant requester information, which not only relieves the mapping pressure of merchants and improves the efficiency of image generation, but also makes the item image generated according to the standard image easier to review, which helps to improve the efficiency of image review.
[0046] In the introduction to the embodiments of the present invention, the terms and their meanings are as follows:
[0047] Windowed photo: A customized drug photo that meets regulatory requirements and does not show the complete drug box;
[0048] Tablet plate photo: a photo of the tablet plate inside the drug box;
[0049] Main picture: It is a close-up photo of the online trading items, which serves to display the items.
[0050] Figure 1 is a schematic diagram of the main process of the method for generating an image according to an embodiment of the present invention, such as Figure 1 As shown, the method for generating a picture according to an embodiment of the present invention includes the following steps S101 to S103.
[0051] Step S101: In response to receiving a picture generation request, an item identifier is parsed from the picture generation request.
[0052] Specifically, as online trading items, drugs are subject to strict supervision mechanisms, especially prescription drugs, which usually require Internet trading platforms to make adaptive adjustments and optimizations to trading activities according to relevant regulations. Recently, regarding online prescription drugs, Internet trading platforms are required not to display complete medicine boxes in the main image position of prescription drug webpages. In order to meet this requirement, it is necessary to edit the main images of all prescription drugs on the platform and generate main images that meet the requirements.
[0053] Further, according to the application scenario of the embodiment of the present invention, the image generation request can be initiated by the merchant or by the Internet trading platform. For drugs that have been put on the shelves, the platform can send a picture generation request to the background system. The background system searches for the corresponding standard picture based on the data information of the drug, and then updates the standard picture according to the requesting party information corresponding to the picture generation request to obtain a web page main picture that meets the requirements. For drugs to be put on the shelves, the merchant usually initiates a picture generation request to apply for the generation of the drug main picture. Of course, the merchant can also initiate a picture generation request to achieve a secondary update of the generated drug main picture. The embodiment of the present invention does not specifically limit the sender of the picture generation request.
[0054] Step S102: searching for a standard image corresponding to the item identifier.
[0055] Specifically, the backend system stores the standard images corresponding to the prescription drugs listed on the Internet trading platform in the standard image library according to the drug identification. In the embodiment of the present invention, according to the scenario, the item identification is the drug identification, and the drug coding on the Internet trading platform can be used as the drug identification, or the drug identification can be defined according to the attributes of the drug. For example, the three attributes of drug brand, drug generic name (generic name) and specification can be comprehensively considered, and drugs with the same three attributes are regarded as a category of drugs. Accordingly, they have the same drug identification and share a standard image, and this standard image is an image that meets the above-mentioned regulatory requirements. According to the above-mentioned parsed drug identification, the corresponding standard image is searched from the standard image library.
[0056] According to one embodiment of the present invention, the method further includes: if no standard picture corresponding to the object identification is found, obtaining standard picture material corresponding to the object and preset picture elements according to the object identification; and generating a standard picture corresponding to the object identification according to the standard picture material corresponding to the object and the preset picture elements.
[0057] Specifically, for the types of drugs to be put on the shelves and not found in the standard image library through drug identification, the background system needs to generate corresponding standard images according to the latest regulatory specifications. In the embodiment of the present invention, the main image to be generated is defined to include various preset image elements, and the preset image elements can be determined according to the example main image that meets the specifications, by parsing the image elements of the example main image, defining each layer according to the results of the analysis, establishing the association between the image elements and the layers, and clarifying and standardizing the content to be displayed in each layer; it can also be preset according to regulatory specifications. The image elements that constitute the main image to be generated are defined, and the corresponding associated layers are defined. In the embodiment of the present invention, the preset image elements include picture background, store, brand, generic name, specification, drug photos and promotional copy. In different specific application scenarios, the image elements can be adaptively and flexibly adjusted to display drug information that meets the needs.
[0058] Figure 2 This is a schematic diagram of an embodiment of the present invention performing image element analysis on an example main image. By performing element analysis on the example main image, seven image elements, namely, background, store, brand, generic name, specification, drug photo, and promotional copy, can be obtained. Then, each layer information is extracted from the example main image, and the association relationship between each layer and the image element is established. The corresponding seven layers are named background, store, brand, generic name, specification, drug photo, and promotional copy, thus realizing the image element analysis of the example main image.
[0059] By presetting image elements, the main image of the drug can be elementized, which not only facilitates the generation of subsequent images, but also allows the composition of the preset image elements to be adjusted as needed to meet more application scenarios, thereby improving the flexibility of generating the main image of the drug.
[0060] According to another embodiment of the present invention, before obtaining the standard picture material corresponding to the object and the preset picture element according to the object identification, the method includes: obtaining the material of each picture element corresponding to the object and the preset picture element according to the object identification; and generating the standard picture material corresponding to each picture element according to the material of each picture element.
[0061] Specifically, no matter it is a drug that has been put on the shelves or a drug that is to be put on the shelves, the system stores the necessary basic data of the drug, such as the drug brand, the generic name of the drug (generic name), drug specifications, drug photos, drug applicable symptoms, drug ingredients, drug batch number and other information, and is usually stored in the format of a data table. When it is needed, the material information of each image element corresponding to the preset image element can be obtained through the library table query according to the item identification, such as the specific brand information of the drug, the name of the generic name, the specification information, and the complete outer packaging photo of the drug; according to the material of each image element obtained, the material is processed to generate standard image material.
[0062] According to another embodiment of the present invention, the picture elements include photo elements; the standard picture materials include standard photo materials; based on the materials of the respective picture elements, standard picture materials corresponding to the respective picture elements are generated, including: converting the materials of the photo elements into a perspective image of an object with a transparent background, processing the other parts of the perspective image of the object except for displayable text content to be visually invisible, and obtaining standard photo materials corresponding to the photo elements.
[0063] Specifically, the material of the photo element in the embodiment of the present invention is the complete outer packaging photo of the above-mentioned drug (hereinafter referred to as the drug photo). In combination with the specific business scenario and in accordance with drug regulatory provisions, it is necessary to perform image processing on the existing complete outer packaging photo of the drug to obtain standard photo material that meets regulatory requirements and does not display the complete medicine box.
[0064] For example, Figure 3 It is a schematic diagram of a processing method for standard photo materials of an embodiment of the present invention. First, a drug photo with a white background is converted into a perspective image with a transparent background. Then, an optical character recognition model is used to recognize the text content of the perspective image, and the brand B and the generic name (drug name B) of the drug in the image are recognized. Then, a medicine plate photo corresponding to the drug is retrieved, and the medicine plate photo is overlaid on the medicine box position of the perspective image, and it is ensured that the drug brand and generic name on the medicine box are not blocked.
[0065] Although the above method can process drug photos, it still requires additional drug board photos. There may be a problem that the photo processing cannot be performed due to the lack of drug board photos. To this end, the embodiment of the present invention proposes a method for generating window photos. Figure 4 This is a schematic diagram of a preferred processing method for standard photo materials of an embodiment of the present invention. The white background image of the drug photo is converted into a transparent drug perspective image through a perspective conversion model; the text content of the perspective image is recognized using an optical character recognition model to recognize the drug brand B and the generic name (drug name B) in the image; the part of the photo other than the brand name and the generic name is Gaussian blurred to obtain standard photo materials corresponding to the photo elements.
[0066] In addition, in order to ensure the natural effect of the perspective image, in the process of converting the white background medicine photo into the perspective image, the embodiment of the present invention first obtains a training sample set of 10,000 white background images of the medicine photos, and trains the preset perspective conversion model through the training sample set; then, the white background image of the medicine photo is input into the trained perspective conversion model to obtain a perspective image with better effect.
[0067] According to another embodiment of the present invention, the picture elements include text elements; the standard picture materials include standard text materials; based on the materials of the respective picture elements, standard picture materials corresponding to the respective picture elements are generated, including: based on the format and layout in the preset picture elements, the materials of the text elements are processed in terms of format and layout to obtain standard text materials corresponding to the text elements.
[0068] Specifically, according to the drug identification, the material information of each text-type image element corresponding to the drug and the preset image element can be obtained through library table query, and the material information of each text-type image element of the drug is filled in the above-defined layer. The embodiment of the present invention can set the recommended format and layout in the preset image element, and adjust the format and layout of each text-type image element through software programming. It can also use third-party software to visually adjust the format and layout of each text image element, generate a corresponding layer file, and obtain standard text material.
[0069] The standard photo materials and standard text materials generated above are stored and managed according to the drug identification, so that when the standard picture corresponding to the drug identification is not found, the standard picture material corresponding to the preset picture elements is obtained according to the drug identification.
[0070] According to another embodiment of the present invention, a standard picture corresponding to the object identification is generated based on the standard picture material corresponding to the object and the preset picture elements, including: fusing the standard photo material and the standard text material, and using the fused picture as the standard picture corresponding to the object identification.
[0071] Specifically, based on the above-mentioned standard picture materials, combined with the Internet trading platform's style positioning of the main picture of the drug (standard background material) and standard promotional copy materials, standard photo materials, standard text materials, standard background materials, standard promotional copy materials, and reserved blank store materials can be fused and processed. Specifically, these materials can be converted into standard layer files after format conversion, and each layer file can be fused through the color channel to obtain a standard picture, and finally the standard picture is stored according to the drug identification. It should be noted that the blank store materials reserved here are based on the consideration that this scheme regards drugs from multiple stores with the same drug brand, the same generic name and the same specifications as the same drug, so a standard picture can be used to generate the main picture of the same drug in multiple stores.
[0072] By generating standard images according to the drug type dimension, it is avoided to generate main images for all the massive drugs in each online store. In addition, according to the needs of the scene, not only can the materials of each image element in the standard image be updated and edited, but also the materials of any image element can be flexibly updated and edited, which not only greatly improves the efficiency of image generation and relieves the mapping pressure of store merchants, but also meets the needs of different business scenarios. In addition, the main image generation method based on standard images can ensure that each store merchant generates a standard main image, which is more convenient for review and improves the review efficiency of the main image.
[0073] Step S103: Update the standard image according to the requester information corresponding to the image generation request to obtain a result image corresponding to the image generation request.
[0074] According to one embodiment of the present invention, the standard image is updated according to the requesting party information corresponding to the image generation request, including: parsing update information from the requesting party information; determining the content to be updated in the standard image according to the update information, and updating the content to be updated.
[0075] Specifically, update information can be obtained based on the requesting party information, and the update information here is the material and / or update rules of the picture elements (store elements) of the embodiment of the present invention; the corresponding content to be updated in the standard picture can be determined based on the material content in the update information, and then combined with the update rules, the standard picture can be updated to obtain the required main picture display effect.
[0076] Furthermore, in order to ensure the standardization of the main image, the embodiment of the present invention temporarily only opens the update permission of the store elements in the standard image, allowing the update and editing of the store element information in the standard image. At this time, the requesting party information can be retrieved by the Internet trading platform from the store information of each drug that needs to generate the drug main image, or it can be the store information input by the operating store of the drug to be put on the shelf. The store information here is the material of the picture element (store element) of the embodiment of the present invention, and the display rules of the store information are added to the requesting party information to obtain the required main image display effect, or the format and layout of the store elements are directly visualized in the standard image, and updated according to the adjusted content.
[0077] Figure 5 This is a schematic diagram of the principle of a method for generating a main picture of a certain drug in an embodiment of the present invention. In the figure, based on standard photo materials, standard text materials, standard background materials, standard promotional copy materials, and reserved blank store materials, a fusion process is performed, and the fused picture is used as the standard picture corresponding to the item identification, and then the standard picture is updated according to the requesting party information to obtain the main picture of this drug corresponding to store A and store B.
[0078] Figure 6 It is a detailed flow chart of the image generation method of an embodiment of the present invention. In response to receiving an image generation request, the sample image is parsed for image elements, and the corresponding layers are defined according to the parsed results; the materials of each image element corresponding to the preset image element are obtained according to the drug identification, specifically mainly including the materials of the photo element and the materials of the text element; the materials of the photo element are standardized so that the complete medicine box is not displayed, and the standard photo material is obtained; the material of the text element of the drug is formatted and laid out to obtain the standard text material; the drug standard image is generated according to the standard photo material and the standard text material, as well as the preset standard background material, the standard promotional copy material and the reserved blank store material; the standard image is updated according to the requesting party information to obtain the main image corresponding to the image generation request.
[0079] Through the above-mentioned method of image generation, based on the generated standard image of the item, it is only necessary to update the content of the relevant requesting party information to quickly generate the required image, which not only alleviates the mapping pressure of merchants and improves the efficiency of image generation, but also the item images generated based on the standard images are more convenient for the review of the Internet trading platform, thereby improving the efficiency of image review.
[0080] Figure 7 Schematic diagram of the main modules of the apparatus for generating pictures according to an embodiment of the present invention. Figure 7As shown, the image generation device 700 mainly includes an item identification acquisition module 701, a standard image acquisition module 702 and a standard image update module 703.
[0081] The item identification acquisition module 701 is used to parse the item identification from the image generation request in response to receiving the image generation request;
[0082] A standard image acquisition module 702 is used to search for a standard image corresponding to the item identifier;
[0083] The standard image updating module 703 is used to update the standard image according to the requesting party information corresponding to the image generation request to obtain a result image corresponding to the image generation request.
[0084] According to one embodiment of the present invention, the image generation device 700 also includes a standard image generation module (not shown in the figure), which is used to: when no standard image corresponding to the object identification is found, obtain the standard image material corresponding to the object and the preset image elements according to the object identification; and generate a standard image corresponding to the object identification according to the standard image material corresponding to the object and the preset image elements.
[0085] According to another embodiment of the present invention, the image generating device 700 further includes a standard image material generating module (not shown in the figure), which is used to: before obtaining the standard image material corresponding to the object and the preset image element according to the object identification, obtain the material of each image element corresponding to the object and the preset image element according to the object identification; and generate standard image material corresponding to each image element according to the material of each image element.
[0086] According to another embodiment of the present invention, the picture element includes a photo element; the standard picture material includes a standard photo material; the standard picture material generation module (not shown in the figure) can also be used to: convert the material of the photo element into an object perspective with a transparent background, process the other parts of the object perspective except for the displayable text content to be visually invisible, and obtain standard photo material corresponding to the photo element.
[0087] According to another embodiment of the present invention, the picture elements include text elements; the standard picture materials include standard text materials; the standard picture material generation module (not shown in the figure) is also used to: according to the format and layout in the preset picture elements, process the format and layout of the materials of the text elements to obtain standard text materials corresponding to the text elements.
[0088] According to one embodiment of the present invention, the standard image generation module (not shown in the figure) is also used to: fuse the standard photo material and the standard text material, and use the fused image as the standard image corresponding to the object identification.
[0089] According to another embodiment of the present invention, the standard image update module 703 is used to parse the update information from the requesting party information; determine the content to be updated in the standard image according to the update information, and update the content to be updated.
[0090] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention can be applied.
[0091] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0092] Users can use terminal devices 801, 802, 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications, such as picture generation applications, etc., can be installed on terminal devices 801, 802, 803 (only as an example).
[0093] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0094] The server 805 may be a server that provides various services, such as a background management server (only an example) that provides support for the image generation performed by the user using the terminal devices 801, 802, and 803. In response to receiving the image generation request, the background management server may parse the item identifier from the image generation request; search for a standard image corresponding to the item identifier; update the standard image according to the requester information corresponding to the image generation request, obtain the result image corresponding to the image generation request, and feed back the processing result (such as the generated image, etc. - only an example) to the terminal device.
[0095] It should be noted that the method for generating an image provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the device for generating an image is generally arranged in the server 805 .
[0096] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0097] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device or server suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0098] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0099] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0100] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.
[0101] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination thereof.
[0102] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes: an item identification acquisition module, a standard image acquisition module and a standard image update module.
[0104] Among them, the names of these modules do not constitute a limitation on the modules themselves in some cases. For example, the object identification acquisition module can also be described as "a module for parsing the object identification from the image generation request in response to receiving the image generation request."
[0105] On the other hand, the present invention also provides a computer-readable medium, which may be included in the device described in the embodiment; or may exist independently without being assembled into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by a device, the device includes: in response to receiving a picture generation request, parsing an item identifier from the picture generation request; searching for a standard picture corresponding to the item identifier; updating the standard picture according to the requester information corresponding to the picture generation request, and obtaining a result picture corresponding to the picture generation request.
[0106] The technical solution according to the embodiment of the present invention has the following advantages or beneficial effects: by responding to receiving a picture generation request, parsing the item identification from the picture generation request; searching for a standard picture corresponding to the item identification; updating the standard picture according to the requesting party information corresponding to the picture generation request, and obtaining the technical solution of the result picture corresponding to the picture generation request, a convenient picture generation method is realized. Based on the generated standard picture of the item, only the content of the relevant requesting party information needs to be updated to quickly generate the required picture, which not only alleviates the mapping pressure of merchants and improves the picture generation efficiency, but also the item pictures generated according to the standard pictures are easier to review, thereby improving the picture review efficiency.
[0107] The specific implementation methods described herein do not constitute limitations on the scope of protection of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A method for generating an image, characterized in that: include: In response to receiving the image generation request, parsing the item identifier from the image generation request; Find a standard image corresponding to the item identifier; The standard image is updated according to the requester information corresponding to the image generation request to obtain a result image corresponding to the image generation request.
2. The method according to claim 1, characterized in that The method further comprises: If no standard picture corresponding to the item identifier is found, obtaining a standard picture material corresponding to the item and a preset picture element according to the item identifier; A standard picture corresponding to the item identifier is generated based on the standard picture material corresponding to the item and the preset picture element.
3. The method according to claim 2, characterized in that Before obtaining the standard picture material corresponding to the item and the preset picture element according to the item identification, the method includes: According to the item identifier, obtaining materials of each picture element corresponding to the item and the preset picture element; Based on the materials of the various picture elements, standard picture materials corresponding to the various picture elements are generated.
4. The method according to claim 3, characterized in that The picture elements include photo elements; the standard picture materials include standard photo materials; Generating standard picture materials corresponding to the picture elements according to the materials of the picture elements includes: The material of the photo element is converted into a perspective image of an object with a transparent background, and other parts of the perspective image of the object except for the displayable text content are processed to be visually invisible, so as to obtain a standard photo material corresponding to the photo element.
5. The method according to claim 3, characterized in that: The picture elements include text elements; the standard picture materials include standard text materials; Generating standard picture materials corresponding to the picture elements according to the materials of the picture elements includes: According to the format and layout of the preset picture element, the material of the text element is processed in terms of format and layout to obtain a standard text material corresponding to the text element.
6. The method according to claim 4 or 5, characterized in that: Generating a standard picture corresponding to the item identifier according to the standard picture material corresponding to the item and the preset picture element includes: The standard photo material and the standard text material are fused, and the fused image is used as the standard image corresponding to the item identification.
7. The method according to claim 1, characterized in that The standard image is updated according to the requester information corresponding to the image generation request, including: Parsing update information from the requester information; According to the update information, the content to be updated in the standard picture is determined, and the content to be updated is updated.
8. A device for generating a picture, characterized in that: include: An item identification acquisition module, configured to parse the item identification from the image generation request in response to receiving the image generation request; A standard image acquisition module, used to find a standard image corresponding to the item identifier; The standard image updating module is used to update the standard image according to the requesting party information corresponding to the image generation request to obtain a result image corresponding to the image generation request.
9. The device according to claim 8, characterized in that The device also includes a standard picture generation module, which is used to: If no standard picture corresponding to the item identifier is found, obtaining a standard picture material corresponding to the item and a preset picture element according to the item identifier; A standard picture corresponding to the item identifier is generated based on the standard picture material corresponding to the item and the preset picture element.
10. The device according to claim 9, characterized in that The device also includes a standard picture material generation module, which is used to: Before obtaining the standard picture material corresponding to the object and the preset picture element according to the object identification, obtain the material of each picture element corresponding to the object and the preset picture element according to the object identification; based on the material of each picture element, generate the standard picture material corresponding to each picture element.
11. The device according to claim 10, characterized in that The picture elements include photo elements; the standard picture materials include standard photo materials; The standard picture material generation module is also used for: The material of the photo element is converted into a perspective image of an object with a transparent background, and other parts of the perspective image of the object except for the displayable text content are processed to be visually invisible, so as to obtain a standard photo material corresponding to the photo element.
12. The device according to claim 10, characterized in that The picture elements include text elements; the standard picture materials include standard text materials; The standard picture material generation module is also used for: According to the format and layout of the preset picture element, the material of the text element is processed in terms of format and layout to obtain a standard text material corresponding to the text element.
13. The device according to claim 11 or 12, characterized in that The standard image generation module is further used for: The standard photo material and the standard text material are fused, and the fused image is used as the standard image corresponding to the item identification.
14. The device according to claim 8, characterized in that The standard image updating module is further used for: Parsing update information from the requester information; According to the update information, the content to be updated in the standard picture is determined, and the content to be updated is updated.
15. A mobile electronic device terminal, characterized in that: include: one or more processors; a storage device for storing one or more programs, 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 to 7.
16. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.