CN117350785A - Advertisement generation method and device, electronic equipment and storage medium - Google Patents
Advertisement generation method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117350785A CN117350785A CN202311428101.4A CN202311428101A CN117350785A CN 117350785 A CN117350785 A CN 117350785A CN 202311428101 A CN202311428101 A CN 202311428101A CN 117350785 A CN117350785 A CN 117350785A
- Authority
- CN
- China
- Prior art keywords
- image
- advertisement
- target
- replaced
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000004891 communication Methods 0.000 claims description 18
- 238000009792 diffusion process Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 11
- 239000000463 material Substances 0.000 description 29
- 230000008569 process Effects 0.000 description 13
- 238000012545 processing Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 230000003068 static effect Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000002194 synthesizing effect Effects 0.000 description 3
- 239000003518 caustics Substances 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- TVMXDCGIABBOFY-UHFFFAOYSA-N octane Chemical compound CCCCCCCC TVMXDCGIABBOFY-UHFFFAOYSA-N 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 241000282326 Felis catus Species 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003116 impacting effect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0241—Advertisements
- G06Q30/0276—Advertisement creation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Theoretical Computer Science (AREA)
- Strategic Management (AREA)
- General Physics & Mathematics (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Economics (AREA)
- Game Theory and Decision Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The advertisement generation method, the advertisement generation device, the electronic equipment and the storage medium are applied to the technical field of information, and are used for receiving a target image sent by a client and an advertisement image in the target advertisement; generating an image to be replaced according to the target image and the advertisement image; the image to be replaced is sent to the client, so that the client replaces the advertisement image in the target advertisement by utilizing the image to be replaced, and displays the replaced target advertisement, and the image to be replaced is generated according to the target image and the advertisement image by receiving the target image sent by the client and the advertisement image in the target advertisement, so that the client replaces the advertisement image in the target advertisement by utilizing the image to be replaced, and the replaced advertisement is obtained.
Description
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method and apparatus for generating an advertisement, an electronic device, and a storage medium.
Background
In the conventional advertisement propagation process, the form of the advertisement is often relatively fixed. For example, in game advertising, the advertising is often output as a still picture/text or video in the form of a strong exposure, presented to the user in the form of a fairy wearing gorgeous clothing, or a devil holding a weapon, or a general with soldiers impacting a checkpoint, etc. The form of the game advertisement is single, and the user experience is poor.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, electronic equipment and a storage medium for generating advertisements, so as to improve the interestingness and experience of the advertisements. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a method for generating an advertisement, applied to a server, the method including:
receiving a target image and an advertisement image in a target advertisement sent by a client, wherein the target image and the advertisement image both comprise at least one face image area;
generating an image to be replaced according to the target image and the advertisement image;
and sending the image to be replaced to a client so that the client replaces the advertisement image in the target advertisement by using the image to be replaced and displays the replaced target advertisement.
In a possible implementation manner, the generating an image to be replaced according to the target image and the advertisement image includes:
judging whether face areas exist in the target image and the advertisement image;
and if the face areas exist, combining the target image and the advertisement image by taking the target image as a pad image to obtain the image to be replaced.
In a possible implementation manner, the merging the target image and the advertisement image with the target image as a pad image to obtain the image to be replaced includes:
generating a corresponding noise image by forward diffusion by taking the target image as a pad image;
and according to the advertisement image, reversely diffusing the noise image to obtain the image to be replaced.
In a possible implementation manner, the generating an image to be replaced according to the target image and the advertisement image includes:
identifying an image format of the target image;
when the image corresponding to the target person is a dynamic image, generating an image to be replaced corresponding to each frame in the dynamic image according to the target image; and merging the images to be replaced corresponding to each frame to obtain the images to be replaced.
In a possible implementation manner, after the sending the image to be replaced to the client, the method further includes:
storing the image to be replaced to any target node in a content distribution network, wherein network connection exists between the client and the target node;
after the user image of the target user and the characteristic information of the target person in the target advertisement are acquired, the method further comprises the following steps:
receiving an advertisement playing request sent by the client;
identifying the position information of the target node storing the image to be replaced corresponding to the advertisement playing request according to the advertisement playing request;
and feeding back the address information of the target node to the client so that the client acquires the image to be replaced from the target node according to the address information and displays the image.
In a possible implementation manner, the storing the image to be replaced in any target node in the content distribution network includes:
identifying a node closest to the client network in the content distribution network to obtain the target node;
and storing the image to be replaced into the target node.
In a second aspect of the present invention, there is also provided an advertisement generating apparatus, applied to a server, where the apparatus includes:
the image receiving module is used for receiving a target image and an advertisement image in a target advertisement sent by a client, wherein the target image and the advertisement image both comprise at least one face image area;
the image generation module is used for generating an image to be replaced according to the target image and the advertisement image;
and the image sending module is used for sending the image to be replaced to the client so that the client can replace the advertisement image in the target advertisement by using the image to be replaced and display the replaced target advertisement.
In one possible implementation, the image generation module includes:
the face judging sub-module is used for judging whether face areas exist in the target image and the advertisement image;
and the image merging sub-module is used for merging the target image and the advertisement image by taking the target image as a pad image if the face areas exist, so as to obtain the image to be replaced.
In a possible implementation manner, the image merging sub-module is specifically configured to generate a corresponding noise image by using the target image as a pad image through forward diffusion; and according to the advertisement image, reversely diffusing the noise image to obtain the image to be replaced.
In one possible implementation, the image generation module includes:
a format recognition sub-module for recognizing an image format of the target image;
the image generation sub-module is used for respectively generating an image to be replaced corresponding to each frame in the dynamic image according to the target image when the image corresponding to the target person is the dynamic image; and merging the images to be replaced corresponding to each frame to obtain the images to be replaced.
In one possible embodiment, the apparatus further comprises:
the image storage module is used for storing the image to be replaced to any target node in a content distribution network, wherein network connection exists between the client and the target node;
the request receiving module is used for receiving the advertisement playing request sent by the client;
the position identification module is used for identifying the position information of the target node storing the image to be replaced corresponding to the advertisement playing request according to the advertisement playing request;
and the address feedback module is used for feeding back the address information of the target node to the client so that the client can acquire and display the image to be replaced from the target node according to the address information.
In one possible implementation, the image storage module includes:
a node identification sub-module, configured to identify a node closest to the client network in the content distribution network, to obtain the target node;
and the node storage sub-module is used for storing the image to be replaced into the target node.
In yet another aspect of the present invention, there is also provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory perform communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the advertisement generation methods when executing the programs stored in the memory.
In yet another aspect of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the method of generating an advertisement as described in any of the above.
In yet another aspect of the invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of generating an advertisement as described in any of the above.
The embodiment of the invention provides a method, a device, electronic equipment and a storage medium for generating advertisements, which are used for receiving a target image and an advertisement image in the target advertisement sent by a client, wherein the target image and the advertisement image both comprise at least one face image area; generating an image to be replaced according to the target image and the advertisement image; the image to be replaced is sent to the client, so that the client replaces the advertisement image in the target advertisement by utilizing the image to be replaced, and displays the replaced target advertisement, and the image to be replaced is generated according to the target image and the advertisement image by receiving the target image sent by the client and the advertisement image in the target advertisement, so that the client replaces the advertisement image in the target advertisement by utilizing the image to be replaced, and the replaced advertisement is obtained.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1a is a flowchart illustrating a method for generating advertisements according to an embodiment of the present invention;
FIG. 1b is a flowchart illustrating an example of a method for generating advertisements in accordance with an embodiment of the present invention;
FIG. 2 is a schematic flow chart of generating an image to be replaced according to an embodiment of the present invention;
FIG. 3a is a schematic diagram of another process for generating an image to be replaced according to an embodiment of the present invention;
FIG. 3b is a flowchart illustrating an example of generating an image to be replaced according to an embodiment of the present invention;
FIG. 4a is a flowchart of buffering an image to be replaced according to an embodiment of the present invention;
FIG. 4b is a flowchart of an example of caching an image to be replaced according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating another method for generating advertisements according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an advertisement generating apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
In a first aspect of the present invention, there is provided a method for generating an advertisement, applied to a server, see fig. 1a, where the method includes:
and S11, receiving the target image and the advertisement image in the target advertisement sent by the client.
Wherein the target image and the advertisement image each include at least one facial image region. The advertisement image in the target advertisement may be an image including a character or an animal, and in one example, the advertisement image in the target advertisement includes a character, where the character may correspond to a campt, for example, the campt may be as follows: dramatic portrait of a barbarian, a barbararian, wearing a helmet and jewelry, find extracted, intricacies design, beauful light, cinematic light, 85mm, f1.4, V-ray, octane render, unrepeated engine, ultra share, 8k,trending on CGSociety,caustics.
The target image can be an image of the user or an image of a favorite image of the user, and in the actual use process, the user can send a pre-stored image through the client, can also directly collect the image through the camera, or can receive the image uploaded by the user in real time. For example, a button may be provided at the client, to prompt the user to click the button and then support the user to compose the portrait into the material, and after the user clicks the button to agree, the user pulls up the camera to take a photograph or selects a photograph in the album, and uploads the photograph to the server.
The method of the embodiment of the application is applied to the server, the server can be a server, and the corresponding client can be a computer, a mobile phone and the like.
And step S12, generating an image to be replaced according to the target image and the advertisement image.
And generating an image to be replaced according to the target image and the advertisement image, and drawing the image to be replaced through an intelligent portrait tool. Specifically, the image to be replaced may be generated from the user portrait and the advertisement image through an AIGC (AI generated content, artificial intelligence generation content) or a Stable distribution (a document map and an open source tool of the map). In the actual use process, the image to be replaced generated according to the user portrait and the advertisement image can change the local part of the character, such as the head, the hairstyle, the stature and the like, according to the feature information of the user portrait.
And step S13, the image to be replaced is sent to the client side, so that the client side replaces the advertisement image in the target advertisement by the image to be replaced, and the replaced target advertisement is displayed.
In the actual use process, the image to be replaced can be sent to the client, the advertisement image in the target advertisement is replaced by the image to be replaced through the client, and the advertisement image in the target advertisement is replaced by the replacement image, so that the image of the replaced target advertisement is similar to the image or preference of a user, and the user experience is improved. Referring to fig. 1b, after uploading a picture to a server, the server first performs face recognition on the picture, determines whether the picture includes a portrait, determines a material type after finding that the portrait does exist, and performs processing according to the material type.
Specifically, since the time required for generating the replacement image is typically several milliseconds, the advertisement image before the replacement can be continuously used for playing when the playing starts, and the replacement can be directly performed if the image to be replaced is received during the playing. According to the method, the existing advertisement content and the form are deeply analyzed, from the perspective of advertisement watching users, the interestingness of the advertisement content is improved in a breakthrough manner by combining the advertisement content with the AIGC capability, a new interactive target advertisement playing method is provided, and the AIGC capability can be gradually improved along with the gradual improvement of the open source capability, so that the performance and the upgrading playing method are further improved.
It can be seen that, by the method of the embodiment of the present application, the target image and the advertisement image in the target advertisement sent by the client may be received, so that an image to be replaced is generated according to the target image and the advertisement image, so that the client replaces the advertisement image in the target advertisement with the image to be replaced, and a replaced advertisement is obtained.
In a possible implementation manner, the generating an image to be replaced according to the target image and the advertisement image, see fig. 2, includes:
step S21, judging whether face areas exist in the target image and the advertisement image;
and S22, if the face areas exist, combining the target image and the advertisement image by taking the target image as a pad image to obtain the image to be replaced.
And judging whether the face areas exist in the target image and the advertisement image, firstly, recognizing the face areas, and after the face areas are found to exist, entering the next process, taking the target image as a pad diagram, and merging the target image and the advertisement image to obtain the image to be replaced. Specifically, the target image is taken as a pad diagram, the target image and the advertisement image are combined to obtain the image to be replaced, and local changes of the person, such as a head, a hairstyle, a statue and the like, can be performed according to the user portrait.
In a possible implementation manner, the merging the target image and the advertisement image with the target image as a pad image to obtain the image to be replaced includes: generating a corresponding noise image by forward diffusion by taking the target image as a pad image; and according to the advertisement image, reversely diffusing the noise image to obtain the image to be replaced.
The target image is taken as a pad image, and a corresponding noise image is generated through forward diffusion, so that the forward diffusion (forward diffusion) process is to continuously add noise to the image, so that the image is gradually changed into a meaningless pure noise image. Conversely, the noise image is inversely diffused according to the advertisement image to obtain the image to be replaced, and the inverse diffusion (Reverse Diffusion) process is a process of recovering the cat image from a random noise image. In the actual use process, the forward diffusion and the reverse diffusion can be realized through a pre-trained model, for example, the forward diffusion and the reverse diffusion can be realized through a pre-trained diffusion model.
In a possible implementation manner, the generating an image to be replaced according to the target image and the advertisement image, see fig. 3a, includes:
step S31, identifying an image format of the target image;
step S32, when the image corresponding to the target person is a dynamic image, generating an image to be replaced corresponding to each frame in the dynamic image according to the target image; and merging the images to be replaced corresponding to each frame to obtain the images to be replaced.
The image format for identifying the target image may identify the target image as a dynamic image or a static image, and if the target image is a static image, the method may be implemented by the method of step S21 to step S22. If the target image is gif animation, combining the images to be replaced corresponding to each frame in the gif animation to obtain the images to be replaced, replacing, and synthesizing the gif animation on the replaced images. For example, referring to fig. 3b, if the material is a still picture, the picture material is directly synthesized by SD (Stable Diffusion), and the user portrait is taken as a pad picture, and the picture of the material is synthesized; if the material is gif animation, each frame of the gif animation is obtained, each frame of picture is processed by SD, each frame of picture in the git animation is replaced, and then the picture is synthesized to form the gif animation, so that the material picture is manufactured.
In a possible implementation manner, after the sending the image to be replaced to the client, referring to fig. 4a, the method further includes:
step S41, storing the image to be replaced to any target node in a content distribution network, wherein network connection exists between the client and the target node;
after the user image of the target user and the characteristic information of the target person in the target advertisement are acquired, the method further comprises the following steps:
step S42, receiving an advertisement playing request sent by the client;
step S43, identifying the position information of the target node storing the image to be replaced corresponding to the advertisement playing request according to the advertisement playing request;
and step S44, feeding back the address information of the target node to the client so that the client obtains and displays the image to be replaced from the target node according to the address information.
Specifically, the server can return the synthesized image to be replaced to the front end for processing on one hand, and store the image to be replaced on a CDN (Content Delivery Network ) on the other hand, after the next advertisement exposure is prepared, the synthesized image to be replaced is directly used for replacing the default advertisement image exposure display, so that the loading waiting time is reduced.
After the client receives the image to be replaced sent by the server, replacing the image corresponding to the target person in the target advertisement by using the replacing image to obtain the replaced target advertisement. And after receiving the advertisement playing request sent by the client again, the server can identify the position information of the target node storing the image to be replaced corresponding to the advertisement playing request according to the advertisement playing request, and then feed back the address information of the target node to the client, so that the client obtains the image to be replaced from the target node according to the address information and displays the image to be replaced, thereby reducing the time required for generating the image to be replaced. Referring to fig. 4b, after the material picture is produced, the picture material is issued by the server, and then the server stores the personalized material. In a possible implementation manner, the storing the image to be replaced in any target node in the content distribution network includes: identifying a node closest to the client network in the content distribution network to obtain the target node; and storing the image to be replaced into the target node.
In order to illustrate the solution of the embodiments of the present application, the following description is provided with reference to fig. 5, including:
1. before exposing the advertisement, a prompt is prepared for the current image of the advertisement, for example, the prompt of a general figure of a body armor image may be as follows: dramatic portrait of a barbarian, a barbararian, wearing a helmet and jewelry, find extracted, intricacies design, beauful light, cinematic light, 85mm, f1.4, V-ray, octane render, unrepeated engine, ultra share, 8k,trending on CGSociety,caustics.
2. After the advertisement is exposed, loading the landing page, judging whether the user uploads and synthesizes the personalized material, if so, directly loading the historical personalized material from the server, then displaying the material, and if not, displaying the default material (static picture or gif animation) on the landing page, and simultaneously providing a button to prompt the user to click the button and then support the user to synthesize the portrait into the material.
3. After clicking agrees, the system authorizes to acquire a picture, a camera can be pulled up to shoot or select a picture in the album, the picture is uploaded to the server, a loading picture is displayed at the front end, materials are displayed, and the processing of the server is waited for.
4. After the server takes the picture, firstly carrying out face recognition on the picture, and after finding that the picture really exists, entering the next step of processing, and carrying out processing according to the material type; if the material is a static picture, directly utilizing the user portrait as a pad picture, and synthesizing the material picture by using Stable Diffusion; if the material is gif animation, replacing each frame in the gif animation, and synthesizing gif for the picture realization, so that the material picture is manufactured.
5. The server delivers the picture material, the front end receives the personalized material, the server stores the personalized material, the server returns the synthesized material to the front end for processing on one hand, and the material packet is stored on the CDN on the other hand, after the next advertisement exposure is prepared, the synthesized material is directly used for replacing the default material exposure display, and the loading waiting time is reduced.
It can be seen that, by the method of the embodiment of the present application, the target image and the advertisement image in the target advertisement sent by the client may be received, so that an image to be replaced is generated according to the target image and the advertisement image, so that the client replaces the advertisement image in the target advertisement with the image to be replaced, and a replaced advertisement is obtained.
In a second aspect of the present invention, there is also provided an advertisement generating apparatus, applied to a server, see fig. 6, where the apparatus includes:
an image receiving module 601, configured to receive a target image and an advertisement image in a target advertisement, where the target image and the advertisement image each include at least one face image area;
an image generation module 602, configured to generate an image to be replaced according to the target image and the advertisement image;
and the image sending module 603 is configured to send the image to be replaced to a client, so that the client replaces the advertisement image in the target advertisement with the image to be replaced, and displays the replaced target advertisement.
In one possible implementation, the image generation module includes:
the face judging sub-module is used for judging whether face areas exist in the target image and the advertisement image;
and the image merging sub-module is used for merging the target image and the advertisement image by taking the target image as a pad image if the face areas exist, so as to obtain the image to be replaced.
In a possible implementation manner, the image merging sub-module is specifically configured to generate a corresponding noise image by using the target image as a pad image through forward diffusion; and according to the advertisement image, reversely diffusing the noise image to obtain the image to be replaced.
In one possible implementation, the image generation module includes:
a format recognition sub-module for recognizing an image format of the target image;
the image generation sub-module is used for respectively generating an image to be replaced corresponding to each frame in the dynamic image according to the target image when the image corresponding to the target person is the dynamic image; and merging the images to be replaced corresponding to each frame to obtain the images to be replaced.
In one possible embodiment, the apparatus further comprises:
the image storage module is used for storing the image to be replaced to any target node in a content distribution network, wherein network connection exists between the client and the target node;
the request receiving module is used for receiving the advertisement playing request sent by the client;
the position identification module is used for identifying the position information of the target node storing the image to be replaced corresponding to the advertisement playing request according to the advertisement playing request;
and the address feedback module is used for feeding back the address information of the target node to the client so that the client can acquire and display the image to be replaced from the target node according to the address information.
In one possible implementation, the image storage module includes:
a node identification sub-module, configured to identify a node closest to the client network in the content distribution network, to obtain the target node;
and the node storage sub-module is used for storing the image to be replaced into the target node.
Therefore, by the device, the target image sent by the client and the advertisement image in the target advertisement can be received, so that the image to be replaced is generated according to the target image and the advertisement image, the client replaces the advertisement image in the target advertisement by using the image to be replaced, and the replaced advertisement is obtained.
The embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 perform communication with each other through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to execute the program stored in the memory 703, and implement the following steps:
receiving a target image and an advertisement image in a target advertisement sent by a client, wherein the target image and the advertisement image both comprise at least one face image area;
generating an image to be replaced according to the target image and the advertisement image;
and sending the image to be replaced to a client so that the client replaces the advertisement image in the target advertisement by using the image to be replaced and displays the replaced target advertisement.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the method for generating an advertisement according to any of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the method of generating advertisements of any one of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, electronic devices, storage media, and computer program product embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (10)
1. An advertisement generation method, which is characterized by being applied to a server, comprises the following steps:
receiving a target image and an advertisement image in a target advertisement sent by a client, wherein the target image and the advertisement image both comprise at least one face image area;
generating an image to be replaced according to the target image and the advertisement image;
and sending the image to be replaced to a client so that the client replaces the advertisement image in the target advertisement by using the image to be replaced and displays the replaced target advertisement.
2. The method of claim 1, wherein the generating an image to be replaced from the target image and the advertisement image comprises:
judging whether face areas exist in the target image and the advertisement image;
and if the face areas exist, combining the target image and the advertisement image by taking the target image as a pad image to obtain the image to be replaced.
3. The method according to claim 2, wherein the merging the target image and the advertisement image with the target image as a pad image to obtain the image to be replaced includes:
generating a corresponding noise image by forward diffusion by taking the target image as a pad image;
and according to the advertisement image, reversely diffusing the noise image to obtain the image to be replaced.
4. The method of claim 1, wherein the generating an image to be replaced from the target image and the advertisement image comprises:
identifying an image format of the target image;
when the image corresponding to the target person is a dynamic image, generating an image to be replaced corresponding to each frame in the dynamic image according to the target image; and merging the images to be replaced corresponding to each frame to obtain the images to be replaced.
5. The method of claim 1, wherein after the sending the image to be replaced to a client, the method further comprises:
storing the image to be replaced to any target node in a content distribution network, wherein network connection exists between the client and the target node;
after the user image of the target user and the characteristic information of the target person in the target advertisement are acquired, the method further comprises the following steps:
receiving an advertisement playing request sent by the client;
identifying the position information of the target node storing the image to be replaced corresponding to the advertisement playing request according to the advertisement playing request;
and feeding back the address information of the target node to the client so that the client acquires the image to be replaced from the target node according to the address information and displays the image.
6. The method of claim 5, wherein storing the image to be replaced to any target node in a content distribution network comprises:
identifying a node closest to the client network in the content distribution network to obtain the target node;
and storing the image to be replaced into the target node.
7. An advertisement generating apparatus, applied to a server, comprising:
the image receiving module is used for receiving a target image and an advertisement image in a target advertisement sent by a client, wherein the target image and the advertisement image both comprise at least one face image area;
the image generation module is used for generating an image to be replaced according to the target image and the advertisement image;
and the image sending module is used for sending the image to be replaced to the client so that the client can replace the advertisement image in the target advertisement by using the image to be replaced and display the replaced target advertisement.
8. The apparatus of claim 7, wherein the image generation module comprises:
the face judging sub-module is used for judging whether face areas exist in the target image and the advertisement image;
and the image merging sub-module is used for merging the target image and the advertisement image by taking the target image as a pad image if the face areas exist, so as to obtain the image to be replaced.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-6 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311428101.4A CN117350785A (en) | 2023-10-31 | 2023-10-31 | Advertisement generation method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311428101.4A CN117350785A (en) | 2023-10-31 | 2023-10-31 | Advertisement generation method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117350785A true CN117350785A (en) | 2024-01-05 |
Family
ID=89362962
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311428101.4A Pending CN117350785A (en) | 2023-10-31 | 2023-10-31 | Advertisement generation method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117350785A (en) |
-
2023
- 2023-10-31 CN CN202311428101.4A patent/CN117350785A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110366013B (en) | Promotion content pushing method and device and storage medium | |
CN111400518B (en) | Method, device, terminal, server and system for generating and editing works | |
JP5160410B2 (en) | System and method for acquiring content based on data from an electronic device | |
US6571246B1 (en) | Automatic data collection and workflow management in a business process | |
CN109474843B (en) | Method for voice control of terminal, client and server | |
CN114025189B (en) | Virtual object generation method, device, equipment and storage medium | |
WO2018072149A1 (en) | Picture processing method, device, electronic device and graphic user interface | |
JP2009534002A (en) | System and method for delivering customized content for multiple mobile platforms | |
CN104778621B (en) | Clap the implementation method for selling business and client and server-side | |
JP7247048B2 (en) | Information presentation system, information presentation method, server device and its program | |
TW201903604A (en) | System and method for application navigation | |
JP2008005175A (en) | Device, method, and program for distributing information | |
CN108495041B (en) | Image processing and displaying method and device for electronic terminal | |
JP2003050768A (en) | System and method for distributing information, device and method for supplying information, information processing terminal and information processing method | |
CN112231727A (en) | Data processing method and device, electronic equipment, server and storage medium | |
CN113157370B (en) | Page display method and device, electronic equipment and storage medium | |
CN112016280B (en) | File editing method and device and computer readable medium | |
CN108076357B (en) | Media content pushing method, device and system | |
JP2004504676A (en) | Method and apparatus for identifying and processing commands in a digital image in which a user marks commands, for example in a circle | |
EP1881678A1 (en) | Media Sharing Service | |
CN115002501B (en) | Information display method and device, electronic equipment and storage medium | |
CN117350785A (en) | Advertisement generation method and device, electronic equipment and storage medium | |
CN111414495B (en) | Multimedia data acquisition method, device and computer readable storage medium | |
KR20040027636A (en) | System for Editing Picture File and Method Thereof | |
KR101366314B1 (en) | Mobile communication terminal and method for generating appreciation album in a mobile communication terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |