WO2016155535A1 - 图片合成方法及装置 - Google Patents

图片合成方法及装置 Download PDF

Info

Publication number
WO2016155535A1
WO2016155535A1 PCT/CN2016/076949 CN2016076949W WO2016155535A1 WO 2016155535 A1 WO2016155535 A1 WO 2016155535A1 CN 2016076949 W CN2016076949 W CN 2016076949W WO 2016155535 A1 WO2016155535 A1 WO 2016155535A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
picture
client
original material
request
Prior art date
Application number
PCT/CN2016/076949
Other languages
English (en)
French (fr)
Inventor
杜志军
黎三平
王楠
何强
赵严军
劳振强
石杰
王卫星
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to KR1020177031396A priority Critical patent/KR102105238B1/ko
Priority to EP16771290.0A priority patent/EP3279808B1/en
Priority to SG11201707791XA priority patent/SG11201707791XA/en
Priority to JP2017551146A priority patent/JP6708660B2/ja
Publication of WO2016155535A1 publication Critical patent/WO2016155535A1/zh
Priority to US15/716,381 priority patent/US10403017B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/149Adaptation of the text data for streaming purposes, e.g. Efficient XML Interchange [EXI] format
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a method and an apparatus for synthesizing pictures.
  • Internet-based promotions often take the form of diffusing images on a web page or on a social platform.
  • a large number of different images need to be generated for a large number of users in a short period of time.
  • These images are usually generated by combining the original materials. For example, for the original material composed of the background image, the foreground image, and the foreground text, the foreground image and the foreground text are drawn at a specified position of the background image, and the image is synthesized.
  • the application of the client/server structure usually adopts two methods for generating a picture.
  • the first type is that the server combines the original material into a picture and delivers the image to the client; the second is that the server will be original.
  • the material and the guidance file of how to combine the original material into a picture are sent to the client, and the client combines the original materials according to the guidance file to generate an image.
  • the first method causes the server to be overstressed, and the processing performance of the server and the number of servers are very large. Big challenge; because the total number of bytes of raw material needed to synthesize a picture far exceeds the number of bytes in the picture, the second method consumes more user traffic and can cause problems for users with limited network bandwidth. The response speed is too slow, giving users a bad experience.
  • the present application provides a method for synthesizing pictures, on an application server, the method includes:
  • the application also provides a picture synthesizing device, on an application server, the device includes:
  • a request receiving unit configured to receive a request for a picture by the user through the client
  • a material response unit configured to send a common image of the picture, an original material used to generate the picture-specific image, and a configuration file to the client, where the client uses the received original material according to the configuration file.
  • the embodiment of the present application synthesizes the shared image of the picture on the server, and synthesizes the dedicated image of the picture on the client, which not only greatly reduces the load of the server, but also can be realized under the condition of occupying a small amount of server resources.
  • Highly concurrent image composition at the same time limits the size of the original material that needs to be transferred to the client, reducing the client's traffic consumption.
  • Figure 1 is an example of two images used in a promotion
  • Figure 3 is a shared image of a picture in the example of Figure 1;
  • FIG. 4 is a schematic diagram showing the composition of a resource file package in the example of FIG. 1;
  • FIG. 5 is a schematic diagram of a processing procedure of a client and a server when generating a composite picture in an application example of the present application;
  • FIG. 6 is a diagram showing an example of a picture synthesized at the client in the example of FIG. 1;
  • FIG. 7 is a hardware structural diagram of a server to which an embodiment of the present application is applied.
  • FIG. 8 is a logical structural diagram of a picture synthesizing apparatus in the embodiment of the present application.
  • the picture to be generated is divided into two parts: a common image common to a plurality of users and a dedicated image corresponding to the user, and the picture is composed of the two parts.
  • the specific combination is various, for example, the dedicated image is displayed on the background of the shared image, the dedicated image is connected on a certain boundary of the shared image, and the like.
  • the shared image may correspond to a service type, and a certain type of service has at least one shared image, and a shared image applied by different types of services is different; a shared image may also correspond to a user type, and a certain type of user has at least one shared image.
  • Different types of users apply different common images; they may also correspond to service types and user types; dedicated images may correspond to one to multiple users; in the embodiment of the present application Not limited.
  • the embodiment of the present application proposes a new image synthesizing method, which generates a common image on the server side, and synthesizes the shared image and a part of the original material used to generate the dedicated image into a picture on the client side, which can reduce the image synthesizing operation of the server.
  • the problem of the prior art can be solved by reducing the bandwidth required to deliver the original material to the client.
  • the method in this embodiment is applied to a server, and the flow thereof is as shown in FIG. 2.
  • Step 210 Receive a request for a picture by a user through a client.
  • Step 220 The common image of the picture, the original material and the configuration file for generating the dedicated image of the requested picture are sent to the client requesting the picture, and the client generates the original material and the shared image according to the configuration file. The requested picture.
  • the shared image is generated from the original material of some of the requested images. For a large number of pictures that need to be presented to the user on the client, the common parts are extracted from them, and the common parts are divided into common images. It should be noted that the shared image may be a common part applicable to all users, or may be a common part applicable to a part of users. The components in the picture other than the shared image are dedicated images corresponding to the user.
  • the server may pre-populate the original material of the picture to generate a common image before receiving the user's request for the picture through the client; this method is applicable to the case where the shared image is independent of the specific content requested by the user.
  • the server may also generate a shared image by using the original material of the image according to the received request after receiving the request of the user through the client for the image; this method is applicable to the case where the shared image may be different due to the specific content requested by the user.
  • the configuration file includes operation information required for synthesizing the shared image and the delivered original material into a picture, or the configuration file is used to notify the client how to combine the shared image and other original materials that are delivered into a picture.
  • the configuration file can describe how the original material and the common image are drawn, the drawing position, special processing of the original material or the common image, and the like.
  • the configuration file may include: drawing the original material used to generate the dedicated image on the shared image, and in what position, The size and/or rotation angle is used to draw the original material, or a calculation method that determines the drawing position, size, and/or rotation angle.
  • the client After receiving the above content delivered by the server, the client can synthesize the shared image and the received original material into a picture according to the configuration file. From the perspective of the client, the shared image is also one of the original materials of the composite image, so the client can implement the process by synthesizing the image in the prior art, and will not be described again.
  • the client when drawing a picture, the client can synthesize the content input by the user through the client, the specified image, and/or other materials into the picture; the user can also customize how the above material and the shared image are received, and the original is received. The material is combined into a picture.
  • the server may use different methods to deliver the configuration file and the original material used to generate the dedicated image of the requested picture.
  • the server can generate a configuration file used by the user for each user and the original material needed to generate the user image specific image.
  • the server can deliver all the original materials required to generate the dedicated images of the images and the configuration files corresponding to all the original materials to the client; that is, the server pairs are different.
  • the user delivered the same shared image, original material and configuration file.
  • the server After receiving the user's request for the image through the client, the server generates the text information corresponding to the user according to the request of the client, and delivers the generated text information to the client.
  • the original text used to generate the dedicated image of the user is indicated in the delivered text information, and the client generates the image of the user by using the original material and the shared image corresponding to the text information according to the configuration file. Since the processing of text information occupies much less hardware resources than processing image resources, this approach further reduces the load on the server.
  • the server may generate a common image corresponding to the service type according to the service type applied by the picture, and all the originals required to generate a dedicated image corresponding to the service type and a dedicated image applied to the picture of the service type.
  • the material and configuration files are packaged into resource file packages corresponding to the service type.
  • the server After receiving the request for the service type picture, the server generates the text information of the service type according to the received request, and sends the generated text information and the resource file package corresponding to the service type to the requested service type.
  • Client combines the configuration file and the text information to synthesize the shared image and part of the original material in the resource file package into a picture.
  • a common image is generated on the server side, and the shared image and a part of the original material are combined into a picture on the client, so that the server only needs to generate a small number of pictures to meet the needs of all users, thereby greatly reducing the server.
  • the client only needs to receive a small amount of raw material to generate images, reducing the flow of the client Consumption.
  • the server in this embodiment may be a logical or physical server; or may be two or more logical or physical servers, and the servers cooperate to complete each step in the foregoing methods.
  • the server side includes two logical servers, a service server and a picture server, and the service server is configured to receive and respond to the service request of the client; the image server is configured to generate and deliver the request to the client corresponding to the request.
  • a resource file package for a business type includes two logical servers, a service server and a picture server, and the service server is configured to receive and respond to the service request of the client; the image server is configured to generate and deliver the request to the client corresponding to the request.
  • a common image and a dedicated image of the picture are divided for the picture used by each type of service, and a common image corresponding to the service type is generated in advance; the picture server needs to generate a dedicated image of a certain type of service picture All of the original material, the shared image corresponding to the business type, and the configuration file that references the original material and the shared image are packaged into a resource file package corresponding to the business type and saved.
  • Figure 5 shows the processing process of the client and the server when generating the composite image.
  • the user initiates a request for the image of a certain service type to the service server through the client; after receiving the request sent by the client, the service server sends the request to the image server.
  • the instruction for sending the resource file package includes the service type of the resource file package and the delivered client address; the service server generates text information corresponding to the user according to the request of the client and returns to the client.
  • the image server receives the instruction of the service server, and sends the resource file package corresponding to the service type in the instruction to the client in the instruction.
  • the client receives the text information from the service server, and after the resource file package from the image server, generates a complete picture and presents it to the user.
  • the config file includes the following contents:
  • the picture synthesized on the client is shown in Fig. 6.
  • the configuration file can also specify the calculation method for drawing the position, size, and rotation angle of the original material. For example, a string consisting of N characters is drawn on a line whose length is length and the inclination angle (angle with the X axis) is angle starting from (x, y). You can specify the ith character in the configuration file.
  • the center position of the corresponding original material image is:
  • rotate is the largest random randomizable image of the original material corresponding to each character based on the inclination of the line The angle of rotation.
  • an embodiment of the present application further provides a picture synthesizing device.
  • the device can be implemented by software, or can be implemented by hardware or a combination of hardware and software.
  • the CPU Central Process Unit
  • the device in which the device that generates the composite image is located typically includes other hardware such as a board for implementing network communication functions.
  • FIG. 8 is a schematic diagram of a picture synthesizing apparatus according to an embodiment of the present application, which is functionally divided on a server, where the apparatus includes a request receiving unit and a material response unit, wherein: the request receiving unit is configured to receive a user through a client. Ending the request for the picture; the material response unit is configured to send the shared image of the picture, the original material and the configuration file for generating the picture-specific image to the client, and the client is configured according to the configuration file.
  • the picture is generated using the received original material and the common image; the common image is generated from a portion of the original material of the picture.
  • the device further includes: a text response unit, configured to generate text information corresponding to the user according to the request, and send the text information to the client; for the client to adopt the text according to the configuration file The original material and the common image corresponding to the information generate the picture.
  • a text response unit configured to generate text information corresponding to the user according to the request, and send the text information to the client; for the client to adopt the text according to the configuration file The original material and the common image corresponding to the information generate the picture.
  • the shared image includes a shared image corresponding to a service type generated by using a part of the original material according to a service type of the image application; the device further includes: a resource file package generating unit, configured to correspond to the service type All the original materials and configuration files required to generate a dedicated image for the service type are packaged into a resource file package; the material response unit is specifically configured to: send the resource file package to request the service Type of client.
  • the device further includes a first shared image unit or a second shared image unit, where: the first shared image unit is configured to pre-take a part of the original of the image before receiving the user's request for the image by the client.
  • the material generates a common image;
  • the second common image unit is configured to generate a common image by using a part of the original material of the image according to the request after receiving the user's request for the image through the client.
  • the configuration file includes: a position, a size, and/or a rotation angle of the original material used to generate the dedicated image on the common image, or used to determine the position, size, and/or rotation angle. Calculation method.
  • the computing device includes one or more processors (CPUs), input/output interfaces, Network interface and memory.
  • processors CPUs
  • input/output interfaces Network interface
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)
  • Information Transfer Between Computers (AREA)
  • Image Processing (AREA)

Abstract

本申请提供一种图片合成方法及装置,应用服务器上,所述方法包括:接收用户通过客户端对图片的请求;将所述图片的共用图像、用于生成所述图片专用图像的原始素材和配置文件下发给所述客户端;供所述客户端根据配置文件,采用接收的原始素材和共用图像生成所述图片;所述共用图像由部分所述图片的原始素材生成。通过本申请的技术方案,在大大降低了服务器的负荷的同时减少了客户端的流量消耗。

Description

图片合成方法及装置
本申请要求2015年03月30日递交的申请号为201510145112.0、发明名称为“图片合成方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及互联网技术领域,尤其涉及一种图片合成方法及装置。
背景技术
基于互联网的推广活动经常采用在网页上或社交平台上扩散图片的形式,在一些活动中,需要在短时间内为众多用户生成大量不同的图片。这些图片通常是将原始素材组合后生成,例如,对由背景图像、前景图像、前景文字组成的原始素材,将前景图像和前景文字绘制在背景图像的指定位置,即可完成图片的合成。
现有技术中,客户端/服务器结构的应用通常采用两种方式来进行图片的生成,第一种是由服务器将原始素材组合为图片后,下发给客户端;第二种是服务器将原始素材和如何将原始素材组合为图片的指导文件发送给客户端,由客户端根据指导文件将原始素材组合后生成图片。
在短时间内要生成大量不同图片的应用场景中,由于将原始素材组合为图片需要一定的处理时间,第一种方式会造成服务器端压力过大,对服务器的处理性能和服务器的数量存在很大挑战;由于合成一张图片所需的原始素材的总字节数远远超过该张图片的字节数,第二种方式会消耗较多的用户流量,对网络带宽有限的用户还会造成响应速度过慢,给用户带来不良体验。
发明内容
有鉴于此,本申请提供一种图片合成方法,应用服务器上,所述方法包括:
接收用户通过客户端对图片的请求;
将所述图片的共用图像、用于生成所述图片专用图像的原始素材和配置文件下发给所述客户端,供所述客户端根据配置文件,采用接收的原始素材和共用图像生成所述图片;所述共用图像由部分所述图片的原始素材生成。
本申请还提供了一种图片合成装置,应用服务器上,所述装置包括:
请求接收单元,用于接收用户通过客户端对图片的请求;
素材响应单元,用于将所述图片的共用图像、用于生成所述图片专用图像的原始素材和配置文件下发给所述客户端,供所述客户端根据配置文件,采用接收的原始素材和共用图像生成所述图片;所述共用图像由部分所述图片的原始素材生成。
由以上技术方案可见,本申请的实施例通过将图片的共用图像在服务器上合成,将图片的专用图像在客户端合成,不仅大大降低了服务器的负荷,在占用少量服务器资源的条件下能够实现高并发的图片合成;同时限制了需要传输给客户端的原始素材的大小,减少客户端的流量消耗。
附图说明
图1是一个例子中一个推广活动中所使用的两张图片;
图2是本申请实施例中一种图片合成方法的流程图;
图3是图1的例子中图片的共用图像;
图4是图1的例子中资源文件包的组成示意图;
图5是本申请应用示例中生成合成图片时客户端和服务器的处理过程示意图;
图6是图1的例子中在客户端合成的图片示例图;
图7是应用本申请实施例的服务器一种硬件结构图;
图8是本申请实施例中一种图片合成装置的逻辑结构图。
具体实施方式
在推广活动中,需要在短时间内生成的大量不同图片往往具有较多的共性元素,例如相同的背景图像、公司logo(徽标)、活动名称等等,而图片之间的不同之处则通常较少。例如,在支付宝推出的输口令抢红包活动中使用的两张口令图片如图1所示,这两张图片的背景图素和提示文案均相同,变化的是口令和金额信息。
根据图片的上述特性,本申请的实施例中,将需要生成的图片划分为两个部分:通用于多个用户的共用图像和对应于用户的专用图像,图片由这两部分组合而成。具体的组合方式多种多样,例如,专用图像显示在共用图像的背景上,专用图像接续在共用图像的某个边界上等等。共用图像可以对应于业务类型,某一类型的业务具有至少一个共用图像,不同类型的业务所应用的共用图像不同;共用图像也可以对应于用户类型,某一类型的用户具有至少一个共用图像,不同类型的用户所应用的共用图像不同;还可以对应于业务类型和用户类型;专用图像可以对应于一个到多个用户;本申请的实施例中 不做限定。
本申请的实施例提出一种新的图片合成方法,在服务器端生成共用图像,在客户端将共用图像和一部分用来生成专用图像的原始素材合成为图片,既能减少服务器的图片合成操作,又能减小向客户端下发原始素材所需的带宽,从而解决现有技术存在的问题。本实施例中的方法应用在服务器上,其流程如图2所示。
步骤210,接收用户通过客户端对图片的请求。
步骤220,将图片的共用图像、用于生成所请求图片的专用图像的原始素材和配置文件下发给请求图片的客户端,供该客户端根据配置文件,采用接收的原始素材和共用图像生成所请求的图片。
共用图像由部分所请求图片的原始素材生成。针对需要在客户端展现给用户的大量图片,从中提取共性部分,将这些共性部分划分为共用图像。需要说明的是,共用图像可以是适用于所有用户的共性部分,也可以是适用于一部分用户的共性部分。图片中除共用图像之外的组成部分为对应于用户的专用图像。
在划分共用图像和专用图像时,还可以考虑生成图片时原始素材组合的便利程度和所生成图片的美观程度,将一些通用于多个用户的图素划归到专用图像中。仍以图1中的口令图片为例,虽然“红包金额”、“元”在两张图片上均存在,但考虑到金额变化时该行字的间距随之变化会更为整齐美观,可以将整行字都划归专用图像,对应的共用图像如图3所示。
从合成图片所需的所有原始素材中,选择用于合成共用图像的部分原始素材,由服务器利用这部分原始素材来生成共用图像。服务器可以在接收用户通过客户端对图片的请求前,预先采用部分该图片的原始素材生成共用图像;这种方式适用于共用图像与用户请求的具体内容无关的情形。服务器也可以在收到用户通过客户端对图片的请求后,根据接收的请求采用部分该图片的原始素材生成共用图像;这种方式适用于共用图像可能因用户请求的具体内容而不同的情形。
在服务器收到客户端对图片的请求后,把共用图像、生成所请求图片专用图像所需的原始素材和配置文件下发给该客户端。其中,配置文件中包括将共用图像和下发的原始素材合成为图片时所需的操作信息,或者说,配置文件用来告知客户端如何将共用图像和下发的其他原始素材组合为图片。例如,配置文件中可以描述原始素材和共用图像的绘制方式、绘制位置、对原始素材或共用图像进行的特殊处理等等。再如,配置文件中可以包括:将用于生成专用图像的原始素材绘制在共用图像上,以及以怎样的位置、 大小和/或旋转角度来绘制原始素材,或者包括确定绘制位置、大小和/或旋转角度的计算方法。
收到服务器下发的上述内容后,客户端可以按照配置文件,将共用图像和接收的原始素材合成为图片。从客户端的角度看来,共用图像也是合成图片的原始素材之一,因此客户端可以采用现有技术中合成图片的方式来实现这一过程,不再赘述。此外,客户端在绘制图片时,可以将用户通过客户端输入的内容、指定的图像、和/或其他素材一并合成到图片中;用户还可以自定义如何上述素材与共用图像、接收的原始素材合成为图片。
根据实际应用场景的不同,服务器可以采用不同的方式来进行配置文件和用于生成所请求图片的专用图像的原始素材的下发。
例如,服务器可以为每一个用户生成该用户使用的配置文件和生成该用户图片专用图像所需的原始素材。
再如,对具有相同共用图像的图片,服务器可以将生成这些图片的专用图像所需的所有原始素材、以及对应于所有原始素材的配置文件都下发给客户端;也就是说,服务器对不同的用户下发了同样的共用图像、原始素材和配置文件。在收到用户通过客户端对图片的请求后,服务器按照客户端的请求生成对应于用户的文本信息,并将生成的文本信息下发给客户端。下发的文本信息中指明生成该用户的专用图像所使用的原始素材,客户端按照配置文件,采用与该文本信息对应的原始素材和共用图像,即可生成该用户的图片。由于处理文本信息占用的硬件资源远小于处理图像资源,这种方式进一步减轻服务器的负荷。
在一些应用场景中,不同类型的业务展现在客户端的图片所具有的共性特征不同。在这些场景中,服务器可以按照图片所应用的业务类型,来生成对应于业务类型的共用图像,将对应于业务类型的共用图像、生成应用于该业务类型的图片的专用图像所需的所有原始素材、配置文件打包成对应于该业务类型的资源文件包。在收到客户端对该业务类型图片的请求后,服务器根据接收的请求生成该业务类型的文本信息,并将生成的文本信息、对应于该业务类型的资源文件包下发给请求该业务类型的客户端。客户端结合配置文件和文本信息,将资源文件包中的共用图像和部分原始素材合成为图片。
可见,本申请的实施例中,在服务器端生成共用图像,在客户端将共用图像和部分原始素材合成为图片,这样服务器只需生成少量图片即可满足所有用户的需求,大大降低了服务器的负荷;而客户端也只需接收少量的原始素材来生成图片,减少客户端的流 量消耗。
需要说明的是,本实施例中的服务器可以是一个逻辑或物理上的服务器;也可以是两个或两个以上逻辑或物理上的服务器,由这些服务器协同完成上述方法中的各个步骤。
在本申请的一个应用示例中,服务器侧包括两个逻辑服务器,业务服务器和图片服务器,业务服务器用于接收和响应客户端的业务请求;图片服务器用于生成以及向客户端下发对应于所请求业务类型的资源文件包。
在图片服务器上,针对每种业务类型所使用的图片,划分出图片的共用图像和专用图像,并预先生成对应于业务类型的共用图像;图片服务器将生成某种业务类型图片的专用图像所需的所有原始素材、对应于该业务类型的共用图像、以及引用这些原始素材和共用图像的配置文件打包成为一个与该业务类型对应的资源文件包并保存。
以业务类型为支付宝红包的口令图片为例,图片服务器上为该业务类型生成的资源文件包的组成如图4所示,其中,bg.jpg为所有用户口令图片的共用图像;config为配置文件;其他文件为生成口令图片专用图像所需的所有原始素材,专用图像中可能用到的每个汉字和符号都是一个图像格式的原始素材。
图5所示为生成合成图片时客户端和服务器的处理过程,用户通过客户端向业务服务器发起对某种业务类型的图片的请求;业务服务器接收到客户端发来的请求后,向图片服务器发送下发资源文件包的指令,指令中包括资源文件包的业务类型和下发的客户端地址;业务服务器根据客户端的请求生成对应于该用户的文本信息并返回至该客户端。图片服务器收到业务服务器的指令,将对应于指令中业务类型的资源文件包下发给指令中的客户端。客户端收到来自业务服务器的文本信息,来自图片服务器的资源文件包后,生成完整的图片并展现给用户。
一个例子中,假设用户通过客户端向业务服务器请求支付宝红包的口令图片,业务服务器生成包括“红包金额0-9元”、“password=85599”的文本信息下发给客户端。从图片服务器下发给客户端的资源文件包中,config文件包括如下内容:
Figure PCTCN2016076949-appb-000001
Figure PCTCN2016076949-appb-000002
客户端根据文字信息中“红包金额0-9元”、“找到配置文件中对应于每个字、数字或符号的原始素材,再按照配置文件中指定的位置和大小将原始素材绘制共用图像上。对文字信息中的“password=85599”,则按照配置文件中对password的指定的位置和绘制格式,将“85599”绘制在共用图像上。在客户端上合成的图片如图6所示。
配置文件中还可以指定绘制原始素材的位置、大小、旋转角度等因素的计算方法。例如,在以(x,y)为起点,长度为length,倾角(与X轴夹角)为angle的直线上绘制包括N个字符的字符串,可以在配置文件中,指定将第i个字符对应的原始素材图像的中心位置为:
(xi,yi)=(x+(i*length/N)*cos(angle),y+(i*length/N)*sin(angle))
指定每个字符绘制时原始素材图像的大小为:
(width,height)=(length/N,length/N)
如果希望每个字符随机旋转一定角度,可指定每个字符绘制时原始素材图像的旋转角度为:
angle+random(rotate)-rotate/2
其中,rotate为对应于每个字符的原始素材图像在该直线倾角的基础上最大的可随机 旋转的角度。
与上述流程实现对应,本申请的实施例还提供了一种图片合成装置。该装置可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为逻辑意义上的装置,是通过所在计算设备的CPU(Central Process Unit,中央处理器)将对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,除了图7所示的CPU、内存以及非易失性存储器之外,生成合成图像的装置所在的设备通常还包括用于实现网络通信功能的板卡等其他硬件。
图8所示为本申请实施例提供的一种图片合成装置,应用在服务器上,从功能上划分,所述装置包括请求接收单元和素材响应单元,其中:请求接收单元用于接收用户通过客户端对图片的请求;素材响应单元用于将所述图片的共用图像、用于生成所述图片专用图像的原始素材和配置文件下发给所述客户端,供所述客户端根据配置文件,采用接收的原始素材和共用图像生成所述图片;所述共用图像由部分所述图片的原始素材生成。
可选的,所述装置还包括:文本响应单元,用于根据所述请求生成对应于用户的文本信息并下发给所述客户端;供所述客户端根据配置文件,采用与所述文本信息对应的原始素材和共用图像生成所述图片。
可选的,所述共用图像包括按照图片应用的业务类型,采用部分原始素材生成的对应于业务类型的共用图像;所述装置还包括:资源文件包生成单元,用于将对应于业务类型的共用图像、生成应用于所述业务类型的专用图像所需的所有原始素材和配置文件打包为资源文件包;所述素材响应单元具体用于:将所述资源文件包下发给请求所述业务类型的客户端。
可选的,所述装置还包括第一共用图像单元或第二共用图像单元,其中:第一共用图像单元用于在接收用户通过客户端对图片的请求前,预先采用部分所述图片的原始素材生成共用图像;第二共用图像单元用于在收到用户通过客户端对图片的请求后,根据所述请求采用部分所述图片的原始素材生成共用图像。
可选的,所述配置文件中包括:将用于生成专用图像的原始素材绘制在共用图像上的位置、大小和/或旋转角度,或用来确定所述位置、大小和/或旋转角度的计算方法。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、 网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。

Claims (10)

  1. 一种图片合成方法,应用服务器上,其特征在于,所述方法包括:
    接收用户通过客户端对图片的请求;
    将所述图片的共用图像、用于生成所述图片专用图像的原始素材和配置文件下发给所述客户端,供所述客户端根据配置文件,采用接收的原始素材和共用图像生成所述图片;所述共用图像由部分所述图片的原始素材生成。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:根据所述请求生成对应于用户的文本信息并下发给所述客户端;供所述客户端根据配置文件,采用与所述文本信息对应的原始素材和共用图像生成所述图片。
  3. 根据权利要求2所述的方法,其特征在于,所述共用图像包括按照图片应用的业务类型,采用部分原始素材生成的对应于业务类型的共用图像;
    所述方法还包括:将对应于业务类型的共用图像、生成应用于所述业务类型的专用图像所需的所有原始素材和配置文件打包为资源文件包;
    所述将共用图像、用于生成所述图片专用图像的原始素材和配置文件下发给所述客户端,包括:将所述资源文件包下发给请求所述业务类型的客户端。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在接收用户通过客户端对图片的请求前,预先采用部分所述图片的原始素材生成共用图像;或
    在收到用户通过客户端对图片的请求后,根据所述请求采用部分所述图片的原始素材生成共用图像。
  5. 根据权利要求1至4任意一项所述的方法,其特征在于,所述配置文件中包括:将用于生成专用图像的原始素材绘制在共用图像上的位置、大小和/或旋转角度,或用来确定所述位置、大小和/或旋转角度的计算方法。
  6. 一种图片合成装置,应用服务器上,其特征在于,所述装置包括:
    请求接收单元,用于接收用户通过客户端对图片的请求;
    素材响应单元,用于将所述图片的共用图像、用于生成所述图片专用图像的原始素材和配置文件下发给所述客户端,供所述客户端根据配置文件,采用接收的原始素材和共用图像生成所述图片;所述共用图像由部分所述图片的原始素材生成。
  7. 根据权利要求6所述的装置,其特征在于,所述装置还包括:文本响应单元,用于根据所述请求生成对应于用户的文本信息并下发给所述客户端;供所述客户端根据 配置文件,采用与所述文本信息对应的原始素材和共用图像生成所述图片。
  8. 根据权利要求7所述的装置,其特征在于,所述共用图像包括按照图片应用的业务类型,采用部分原始素材生成的对应于业务类型的共用图像;
    所述装置还包括:资源文件包生成单元,用于将对应于业务类型的共用图像、生成应用于所述业务类型的专用图像所需的所有原始素材和配置文件打包为资源文件包;
    所述素材响应单元具体用于:将所述资源文件包下发给请求所述业务类型的客户端。
  9. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    第一共用图像单元,用于在接收用户通过客户端对图片的请求前,预先采用部分所述图片的原始素材生成共用图像;或
    第二共用图像单元,用于在收到用户通过客户端对图片的请求后,根据所述请求采用部分所述图片的原始素材生成共用图像。
  10. 根据权利要求6至9任意一项所述的装置,其特征在于,所述配置文件中包括:将用于生成专用图像的原始素材绘制在共用图像上的位置、大小和/或旋转角度,或用来确定所述位置、大小和/或旋转角度的计算方法。
PCT/CN2016/076949 2015-03-30 2016-03-22 图片合成方法及装置 WO2016155535A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
KR1020177031396A KR102105238B1 (ko) 2015-03-30 2016-03-22 화상 합성 방법 및 장치
EP16771290.0A EP3279808B1 (en) 2015-03-30 2016-03-22 Picture synthesis method and apparatus
SG11201707791XA SG11201707791XA (en) 2015-03-30 2016-03-22 Picture synthesis method and apparatus
JP2017551146A JP6708660B2 (ja) 2015-03-30 2016-03-22 絵の合成方法及び合成装置
US15/716,381 US10403017B2 (en) 2015-03-30 2017-09-26 Efficient image synthesis using source image materials

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510145112.0A CN106161346B (zh) 2015-03-30 2015-03-30 图片合成方法及装置
CN201510145112.0 2015-03-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/716,381 Continuation US10403017B2 (en) 2015-03-30 2017-09-26 Efficient image synthesis using source image materials

Publications (1)

Publication Number Publication Date
WO2016155535A1 true WO2016155535A1 (zh) 2016-10-06

Family

ID=57003972

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076949 WO2016155535A1 (zh) 2015-03-30 2016-03-22 图片合成方法及装置

Country Status (7)

Country Link
US (1) US10403017B2 (zh)
EP (1) EP3279808B1 (zh)
JP (1) JP6708660B2 (zh)
KR (1) KR102105238B1 (zh)
CN (1) CN106161346B (zh)
SG (1) SG11201707791XA (zh)
WO (1) WO2016155535A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010066972A (ja) * 2008-09-10 2010-03-25 Fujifilm Corp 画像処理装置、画像処理方法およびプログラム
CN102200995A (zh) * 2010-03-26 2011-09-28 微软公司 用于asp.net网页中下载优化的html资源的可配置动态组合
CN102739561A (zh) * 2011-04-14 2012-10-17 腾讯科技(深圳)有限公司 一种在即时通讯中传输会话消息的方法和即时通讯客户端
CN103631630A (zh) * 2013-12-17 2014-03-12 北京奇虎科技有限公司 浏览器动态皮肤的加载方法和浏览器装置
CN104168417A (zh) * 2014-05-20 2014-11-26 腾讯科技(深圳)有限公司 图片处理方法及装置
WO2014203837A1 (en) * 2013-06-17 2014-12-24 Square Enix Holdings Co., Ltd. Image processing apparatus, image processing system, image processing method and storage medium

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5819042A (en) * 1996-02-20 1998-10-06 Compaq Computer Corporation Method and apparatus for guided configuration of unconfigured network and internetwork devices
JP3389840B2 (ja) * 1997-09-29 2003-03-24 日本電気株式会社 リアルタイム動画合成方法および記録媒体
US7246317B2 (en) * 2000-06-09 2007-07-17 Seiko Epson Corporation Creation of image designation file and reproduction of image using the same
CA2605347A1 (en) 2005-04-25 2006-11-02 Yappa Corporation 3d image generation and display system
WO2008075359A2 (en) * 2006-12-21 2008-06-26 Yeda Research And Development Co. Ltd. Method and apparatus for matching local self-similarities
JP4976975B2 (ja) * 2007-10-03 2012-07-18 株式会社東芝 サーバ装置、サーバ装置の制御方法、およびサーバ装置の制御プログラム
JP5321174B2 (ja) * 2009-03-18 2013-10-23 ブラザー工業株式会社 端末装置、通信制御方法、及び通信制御プログラム
JP5547717B2 (ja) * 2009-04-07 2014-07-16 ローム株式会社 光電変換装置および撮像装置
JP2012048597A (ja) * 2010-08-30 2012-03-08 Univ Of Tokyo 複合現実感表示システム、画像提供画像提供サーバ、表示装置及び表示プログラム
JP5684049B2 (ja) * 2011-05-31 2015-03-11 株式会社東芝 サーバ装置、クライアント装置および画像転送システム
CN103166945A (zh) * 2011-12-14 2013-06-19 北京千橡网景科技发展有限公司 图片处理方法和系统
CN103699652A (zh) * 2013-12-26 2014-04-02 浙江宇天科技股份有限公司 一种访问网页的方法和系统
CN106157341B (zh) * 2015-03-30 2019-05-14 阿里巴巴集团控股有限公司 生成合成图片的方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010066972A (ja) * 2008-09-10 2010-03-25 Fujifilm Corp 画像処理装置、画像処理方法およびプログラム
CN102200995A (zh) * 2010-03-26 2011-09-28 微软公司 用于asp.net网页中下载优化的html资源的可配置动态组合
CN102739561A (zh) * 2011-04-14 2012-10-17 腾讯科技(深圳)有限公司 一种在即时通讯中传输会话消息的方法和即时通讯客户端
WO2014203837A1 (en) * 2013-06-17 2014-12-24 Square Enix Holdings Co., Ltd. Image processing apparatus, image processing system, image processing method and storage medium
CN103631630A (zh) * 2013-12-17 2014-03-12 北京奇虎科技有限公司 浏览器动态皮肤的加载方法和浏览器装置
CN104168417A (zh) * 2014-05-20 2014-11-26 腾讯科技(深圳)有限公司 图片处理方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3279808A4 *

Also Published As

Publication number Publication date
JP6708660B2 (ja) 2020-06-10
EP3279808A1 (en) 2018-02-07
US20180018801A1 (en) 2018-01-18
CN106161346A (zh) 2016-11-23
KR20170132843A (ko) 2017-12-04
EP3279808B1 (en) 2021-07-07
JP2018517198A (ja) 2018-06-28
EP3279808A4 (en) 2018-09-05
KR102105238B1 (ko) 2020-04-28
CN106161346B (zh) 2019-09-20
SG11201707791XA (en) 2017-10-30
US10403017B2 (en) 2019-09-03

Similar Documents

Publication Publication Date Title
JP6833246B2 (ja) 情報処理方法、第1の端末、第2の端末、サーバ、およびシステム
US20100205221A1 (en) Digital media sharing system in a distributed data storage architecture
US10339199B2 (en) Methods, systems, and computer readable media for capturing and storing a web page screenshot
US20220038276A1 (en) Default Password Removal
US20160182606A1 (en) Network Based Static Font Subset Management
WO2020211501A1 (zh) 数据分享方法、设备以及计算机可读介质
JP2018055241A (ja) クラウドシステムにおける文書ファイルの生成サービスを提供する装置、方法及びプログラム
US11356496B2 (en) Systems and methods of publishing a design
US11216568B2 (en) Server-side rendering password protected documents
TW201629874A (zh) 業務實現方法及裝置
WO2021185135A1 (zh) 实现消息信号中断的方法、装置和设备
US11316931B2 (en) Protocol to initiate session with partner site
US20210084160A1 (en) Methods and systems for providing rich interactive communication services on an electronic device
WO2016115979A1 (zh) 图片上传方法及装置
WO2016155535A1 (zh) 图片合成方法及装置
WO2019119665A1 (zh) 文件加速展现方法、计算设备及计算机存储介质
US9667724B2 (en) Cloud off-ramp management
WO2013143379A1 (zh) 一种基于微博的文档文件共享方法和装置
US11328030B2 (en) Systems and methods of generating or updating a design based on a universal resource locator (URL)
US9832622B2 (en) Systems and methods for device-dependent image transformations
CN113220273B (zh) 微前端应用资源处理方法、装置、设备和介质
US20210049290A1 (en) File exposure to an intended recipient
CN113220273A (zh) 微前端应用资源处理方法、装置、设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16771290

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017551146

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20177031396

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 11201707791X

Country of ref document: SG