Watermark batch adding method, computer equipment and storage medium
By receiving and processing watermark configuration information in live video and cloud photography platforms, dynamic watermark batch addition of multiple images is achieved, solving the problems of untimely and type restrictions in the existing technology, and improving user experience and watermark flexibility.
Patent Information
- Application Number
- CN202411159481.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-10
AI Technical Summary
Existing live video and cloud photography platforms have dynamic changes when adding watermarks in batches, and cannot update pictures or videos with watermarks that have been added in time, resulting in poor user experience and the inability to add watermarks of different types, locations, transparency and sizes in batches.
By receiving request information from the audience client, adding watermarks in batches to multiple images according to the watermark configuration information and storing them in the cache area, ensuring that the dynamic changes of the watermark configuration information can be updated in a timely manner, and supporting watermark identifications of different types, quantities, sizes and locations .
It realizes batch addition of dynamic watermarks, avoids the problem of inconsistent watermarks before and after the image of the live broadcast user, improves the user experience, and supports flexible addition of multiple watermark types and locations.
Smart Images

Figure CN119110135A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of video live broadcast and cloud photography (also known as photo live broadcast and picture live broadcast) processing, and specifically to a watermark batch adding method, computer equipment and storage medium. Background Art
[0002] On existing video live broadcast and cloud photography (also known as photo live broadcast, picture live broadcast) platforms, there will be a large number of pictures or videos. For these large numbers of pictures or videos, users usually need to add watermarks to the pictures or videos in batches to display personal brand information or prevent others from stealing the pictures. At the same time, the watermarks that users need to add in batches are not static and will be modified as the user's personal needs change. In the related technology, after the user sets the watermark, the server will immediately add the watermark to the pictures or videos in batches. When the user modifies the watermark, the modified watermark will be added to the pictures or videos that have not been watermarked, while for the pictures or videos that have been watermarked in batches, the watermark will not change, and the modified watermark cannot be used. It will also cause the watermarks of the batch pictures or videos of the same live broadcast user to be inconsistent, affecting the user's experience.
[0003] Furthermore, the watermark settings of existing video live broadcast and cloud photography (also known as photo live broadcast and picture live broadcast) platforms are relatively simple, and there is a problem that multiple watermarks cannot be set in batches, especially watermarks of different types, positions, transparencies, and sizes. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method for adding watermarks in batches, a computer device and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for adding watermarks in batches is provided, the method comprising:
[0006] Receiving request information for multiple images sent by a viewer client, the request information including request parameters associated with watermark configuration information, the watermark configuration information representing display parameters of the watermark in the image;
[0007] If the multiple watermark images corresponding to the request parameters do not exist in the cache area, determining the watermark configuration information corresponding to the request parameters according to the request parameters;
[0008] adding watermarks in batches to the plurality of images according to the watermark configuration information to obtain the plurality of watermark images;
[0009] The plurality of watermark images are sent to the viewer client, and the plurality of watermark images are stored in the cache area.
[0010] In an exemplary embodiment, the watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display mode of each watermark identifier, and position indication information of each watermark identifier, wherein the position indication information is used to indicate the display position of the watermark identifier in the image;
[0011] In an exemplary embodiment, the step of adding watermarks to the plurality of images in batches according to the watermark configuration information to obtain the plurality of watermark images includes:
[0012] Acquire the multiple images;
[0013] Determining the display position of each watermark in each of the images according to the position indication information of each watermark and the size of each of the multiple images;
[0014] At the display position in each of the images, the at least one watermark is added according to the quantity of each watermark, the size of each watermark and the display mode of each watermark, so as to obtain the multiple watermark images.
[0015] In an exemplary embodiment, the request information further includes an image type identifier, and determining the watermark configuration information corresponding to the request parameter according to the request parameter includes:
[0016] The watermark configuration information is determined according to the request parameter and the image type identifier.
[0017] In an exemplary embodiment, the receiving request information for multiple images sent by the viewer client includes:
[0018] When the multiple watermark images corresponding to the request parameters do not exist in the CDN node, receiving the request information sent by the viewer client and forwarded by the CDN node;
[0019] The sending the plurality of watermark images to the viewer client comprises:
[0020] The multiple watermark images are sent to a CDN node, the multiple watermark images are stored by the CDN node, and the multiple watermark images are sent to the viewer client.
[0021] In an exemplary embodiment, the method further comprises:
[0022] If there are multiple watermark images corresponding to the request parameters in the cache area, the multiple watermark images are sent to the viewer client.
[0023] In an exemplary embodiment, before receiving the request information for multiple images sent by the viewer client, the method further includes:
[0024] Receive watermark configuration information sent by the live broadcast client;
[0025] Determine a request parameter associated with the watermark configuration information and request information including the request parameter, wherein the request parameter corresponds to the watermark configuration information one by one;
[0026] The request information and the association between the request parameters and the watermark configuration information are stored in the server.
[0027] In an exemplary embodiment, the method further comprises:
[0028] The request information is sent to a CDN node, and the request information is stored by the CDN node.
[0029] In an exemplary embodiment, the determining of the request parameter associated with the watermark configuration information includes:
[0030] Determining an image type identifier corresponding to the watermark configuration information;
[0031] The request parameter is obtained according to the image type identifier and the watermark configuration information.
[0032] In an exemplary embodiment, the multiple images are multiple pictures in a cloud album, and the multiple watermarked images are multiple pictures after watermarks are added in batches, or the multiple images are multiple video frames in a video, and the multiple watermarked images are videos after watermarks are added in batches to the multiple video frames.
[0033] According to a second aspect of an embodiment of the present disclosure, a method for adding watermarks in batches is provided, which is applied to a viewer client, and the method includes:
[0034] Sending request information for multiple images, the request information including request parameters associated with watermark configuration information, the watermark configuration information representing display parameters of the watermark in the image;
[0035] receiving a plurality of watermarked images, wherein the plurality of watermarked images are obtained by batch adding watermarks to the plurality of images through the watermark configuration information associated with the request parameter;
[0036] The multiple watermark images are displayed.
[0037] In an exemplary embodiment, the watermark configuration information includes at least one watermark identifier, the quantity of each watermark identifier, the size of each watermark identifier, the display method of each watermark identifier and position indication information of each watermark identifier, and the position indication information is used to indicate the display position of the watermark identifier in the image.
[0038] In an exemplary embodiment, the request information for sending multiple images includes:
[0039] Sending the request information to a CDN node, or sending the request information to a CDN node and forwarding the request information to a server through the CDN node;
[0040] The receiving of multiple watermark images comprises:
[0041] The multiple watermark images are received and sent by the CDN node, or the multiple watermark images are received and sent by the server and forwarded by the CDN node.
[0042] In an exemplary embodiment, the multiple images are multiple pictures in a cloud album, and the multiple watermarked images are multiple pictures after watermarks are added in batches, or the multiple images are multiple video frames in a video, and the multiple watermarked images are videos after watermarks are added in batches to the multiple video frames.
[0043] According to a third aspect of an embodiment of the present disclosure, a method for adding watermarks in batches is provided, which is applied to a live broadcast client, and the method includes:
[0044] Determining watermark configuration information according to user input, wherein the watermark configuration information represents display parameters of the watermark in the image;
[0045] Send the watermark configuration information to the server.
[0046] In an exemplary embodiment, the watermark configuration information includes at least one watermark identifier, the quantity of each watermark identifier, the size of each watermark identifier, the display method of each watermark identifier and the position indication information of each watermark identifier, and the position indication information is used to indicate the display position of the watermark identifier in the image.
[0047] According to a fourth aspect of an embodiment of the present disclosure, a device for adding watermarks in batches is provided, the device comprising:
[0048] A receiving module is configured to receive request information of multiple images sent by a viewer client, wherein the request information includes request parameters associated with watermark configuration information, and the watermark configuration information represents display parameters of the watermark in the image;
[0049] The processing module is configured to determine watermark configuration information corresponding to the request parameters according to the request parameters if the multiple watermark images corresponding to the request parameters do not exist in the cache area; and batch add watermarks to the multiple images according to the watermark configuration information to obtain the multiple watermark images;
[0050] The sending module is configured to send the multiple watermark images to the viewer client and store the multiple watermark images in the cache area.
[0051] According to a fifth aspect of an embodiment of the present disclosure, a watermark adding device is provided, which is applied to a viewer client, and the device includes:
[0052] A sending module, configured to send request information of multiple images, wherein the request information includes request parameters associated with watermark configuration information, and the watermark configuration information represents display parameters of the watermark in the image;
[0053] A receiving module configured to receive a plurality of watermarked images, wherein the plurality of watermarked images are obtained by batch adding watermarks to the plurality of images through the watermark configuration information associated with the request parameter;
[0054] The processing module is configured to display the multiple watermark images.
[0055] According to a sixth aspect of an embodiment of the present disclosure, a watermark adding device is provided, which is applied to a live broadcast client, and the device includes:
[0056] A processing module, configured to determine watermark configuration information according to user input, wherein the watermark configuration information represents display parameters of the watermark in the image;
[0057] The sending module is configured to send the watermark configuration information to the server.
[0058] According to a seventh aspect of an embodiment of the present disclosure, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect, the second aspect, or the third aspect are implemented.
[0059] According to an eighth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect, the second aspect, or the third aspect are implemented.
[0060] (1) The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when a request information for viewing a live broadcast image is received from a viewer client, watermark configuration information associated with a request parameter in the request information is used to batch add watermarks to multiple original images. When the watermark configuration information changes, the watermarked image after the watermark is added will also change accordingly. The viewer client can obtain the watermarked image watermarked using the latest watermark configuration information from the server, thereby achieving the technical effect of batch adding dynamic watermarks, avoiding the problem of inconsistent watermarks before and after multiple images of the same live broadcast user, and improving the user experience.
[0061] This technology is not only suitable for adding watermarks to images in cloud photography (live photo streaming), but also for adding watermarks to live video. This is a unique, innovative and unexpected technical effect that is not simply suitable for images or videos, but has both types of compatibility.
[0062] (2) Furthermore, different types of watermarks can be added to the image through the watermark configuration information, and the number, size, display mode and position indication information of each type of watermark can also be different, which can achieve the technical effect of adding batch dynamic watermarks to the image.
[0063] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0065] Figure 1 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment;
[0066] Figure 2 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment;
[0067] Figure 3 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment;
[0068] Figure 4 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment;
[0069] Figure 5 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment;
[0070] Figure 6is an interactive flow chart of a method for adding watermarks in batches according to an exemplary embodiment;
[0071] Figure 7 is an interactive flow chart of a method for adding watermarks in batches according to an exemplary embodiment;
[0072] Figure 8 is an interactive flow chart of a method for adding watermarks in batches according to an exemplary embodiment;
[0073] Fig. 9 is a block diagram of a device for adding watermarks in batches according to an exemplary embodiment;
[0074] Fig.10 is a block diagram of a device for adding watermarks in batches according to an exemplary embodiment;
[0075] Fig.11 is a block diagram of a device for adding watermarks in batches according to an exemplary embodiment;
[0076] Fig.12 The present invention is a structural block diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION
[0077] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0078] In an exemplary embodiment of the present disclosure, in order to overcome the problem in the related art that the watermark cannot be modified and the watermark cannot be added in batches for the image or video that has been watermarked, a method for adding watermarks in batches is provided, including: receiving request information of multiple images sent by the viewer client, the request information includes request parameters associated with the watermark configuration information, and the watermark configuration information represents the display parameters of the watermark in the image; if there are multiple watermark images corresponding to the request parameters in the cache area, the watermark configuration information corresponding to the request parameters is determined according to the request parameters; according to the watermark configuration information, watermarks are added in batches to the multiple images to obtain multiple watermark images; multiple watermark images are sent to the viewer client, and the multiple watermark images are stored in the cache area. In this method, when the watermark configuration information changes, the multiple watermark images after adding the watermark will also change accordingly, so the viewer client can obtain the multiple watermark images added with the latest watermark configuration information from the server, and can achieve the technical effect of adding dynamic watermarks in batches, avoid the problem of inconsistent watermarks before and after the batch images of the same live user, and improve the user experience.
[0079] In an exemplary embodiment of the present disclosure, a method for adding watermarks in batches is provided, which is applied to a server. Figure 1 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment. Figure 1 As shown, the following steps are included:
[0080] Step S101, receiving request information of multiple images sent by a viewer client, wherein the request information includes request parameters associated with watermark configuration information, wherein the watermark configuration information represents display parameters of the watermark in the image;
[0081] Step S102, if there are no multiple watermark images corresponding to the request parameters in the cache area, determine the watermark configuration information corresponding to the request parameters according to the request parameters;
[0082] Step S103, adding watermarks to multiple images in batches according to the watermark configuration information to obtain multiple watermark images;
[0083] Step S104, sending multiple watermark images to the viewer client, and storing the multiple watermark images in a cache area.
[0084] The method for adding multiple watermarks in the embodiment of the present disclosure is applied to the server side, which can be a single server device or a server group device, including at least two servers, and different servers perform different operations, for example, including a business server and a picture server, wherein the business server is used to process request information, and the picture server is used to perform the watermark adding operation.
[0085] In step S101, the audience client represents a user device for watching live broadcasts, including smart phones, tablets, personal computers and other electronic devices with live broadcast viewing functions. The request information is used to request to watch the live broadcast image, indicating the URL (Uniform Resource Locator) information corresponding to the requested live broadcast image. The watermark configuration information represents the display parameters of the watermark in the image. In some embodiments, the watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display mode of each watermark identifier and the position indication information of each watermark identifier, wherein the type of watermark identifier can be one or more, the number of each watermark identifier can be one or more, the display mode of each watermark identifier includes the transparency of the watermark identifier, the display direction, the border and the border color, etc., and the position indication information is used to indicate the display position of the watermark identifier in the image, including the display area and the display margin and other parameters related to the display position. The watermark configuration information can be represented by json information. The request information includes a request parameter that is associated with the watermark configuration information. The association between the request parameter and the watermark configuration information can be any type of association. In some embodiments, the request parameter is a parameter generated by encrypting the watermark configuration information. For example, the json information of the watermark configuration information is encrypted using the Murmurhash algorithm and base 62 to generate a unique hash value, and the hash value is the request parameter associated with the watermark configuration information. In some embodiments, the request parameter is a string parameter generated by the watermark configuration information. For example, when the watermark configuration information includes a display position and a display style, the display position is represented by characters 0-8, each character corresponds to a display position, and the display style is represented by characters 0 and 1, which represent horizontal display and vertical display, respectively. Then, the string parameter 21 indicates that the watermark is displayed at the third display position and is displayed vertically. The string parameter is the request parameter.
[0086] The request information is pre-set by the server and provided to the viewer client. When the server provides the request information, the request parameters in the request information are determined according to the current watermark configuration information stored in the server. Therefore, when the watermark configuration information of the server changes, the request parameters will also change. When the viewer client watches a live image or live video, it sends request information for multiple images to the server by accessing the corresponding request information provided by the server. At this time, the server receives the request information for multiple images. In some embodiments, the multiple images are multiple pictures in a cloud album or multiple video frames in a video, so the request information can be a request to view multiple pictures or a request to view a video. For example, the server generates URL request information for multiple images based on the current latest watermark configuration information. When the viewer client views the multiple images by accessing the URL request information, the URL request information includes the current latest watermark configuration information corresponding to the multiple images.
[0087] In step S102, when the server receives the request information of multiple images, it determines whether there are multiple watermark images corresponding to the request parameters included in the image request information in the cache area, and the multiple watermark images represent multiple images after watermarking using the watermark configuration information associated with the request parameters, and the cache area is a preset storage area. If the multiple watermark images corresponding to the request parameters do not exist in the cache area, it means that the request parameters have changed, that is, the watermark configuration information has changed, and the server does not have the multiple watermark images after the existing watermark configuration information has changed. At this time, according to the request parameters, the watermark configuration information corresponding to the request parameters is matched from the association relationship between the request parameters and the watermark configuration information. In one example, when the request parameter is a hash value generated by encrypting the watermark configuration information, the hash value is decrypted to obtain the watermark configuration information.
[0088] In some implementations, the request information further includes an image type identifier; determining watermark configuration information corresponding to the request parameters according to the request parameters includes:
[0089] Determine the watermark configuration information based on the request parameters and image type identifier.
[0090] The image type identifier is used to identify the image types of multiple pictures or the types of multiple video frames in a video. The image type can be a default classification type, such as a person image, an animal image, a landscape image, etc., or a classification type set by the live broadcast user according to personal needs. The watermark configuration information corresponding to different image types can be the same or different. If the live broadcast user sets the watermark configuration information corresponding to different image types to be the same, for example, when setting the watermark configuration information, it is set to be globally applied, or the same watermark configuration information is set for different image types, then the image type identifier does not need to be included in the request information; if the live broadcast user sets the watermark configuration information corresponding to different image types to be different, for example, when setting different watermark configuration information for different image types, then the image type identifier is included in the request information, that is, when the server provides the request information, it adds the request parameters in the request information and the image type identifier at the same time. When the server receives the request information, it obtains the corresponding watermark configuration information according to the image type identifier and the request parameters in the request information.
[0091] In this implementation, by adding an image type identifier to the request information and adding different watermarks to different types of images, more ways of adding watermarks can be provided to users, making watermark addition more flexible to meet different user needs.
[0092] In some implementations, if there are multiple watermark images corresponding to the request parameters in the cache area, the multiple watermark images are sent to the viewer client.
[0093] If there are multiple watermark images corresponding to the request parameters in the cache area, it means that the request parameters have not changed, that is, the watermark configuration information has not changed, and the server has multiple watermark images corresponding to the current watermark configuration information. At this time, the multiple watermark images can be sent to the viewer client, which can improve the acquisition speed of the watermark image. In some embodiments, the cache area is located in the cache layer of the image server, which can avoid frequent access to the business server.
[0094] In step S103, multiple original images requested for viewing, i.e., images without watermarks, are obtained from the cloud storage of the server, and watermarks are added to the multiple original images in batches according to the display parameters of the watermarks in the watermark configuration information, to obtain multiple watermarked images after watermarking. Since the watermark configuration information is added immediately when the viewer client requests to view the live image, and the watermark configuration information used for adding the watermark corresponds to the request parameters in the request information, when the watermark configuration information changes and the request parameters also change, whether the original image has been watermarked using other watermark configuration information before has no effect on the current watermark adding process, and the current watermark adding process is to add the watermark using the latest modified watermark configuration information based on the original image.
[0095] In some implementations, batch adding watermarks to multiple images according to watermark configuration information to obtain multiple watermark images includes the following steps:
[0096] Get multiple images;
[0097] Determining a display position of each watermark mark in each image according to the position indication information of each watermark mark and the size of each image in the plurality of images;
[0098] At least one watermark mark is added at a display position in each image according to the quantity of each watermark mark, the size of each watermark mark and the display mode of each watermark mark to obtain a plurality of watermark images.
[0099] The server extracts the watermark configuration information from the json information corresponding to the request parameter, and extracts multiple original images corresponding to the request information from the cloud storage (i.e., cloud album) of the server, wherein the original images in the cloud album are uploaded by the live client, and the watermark configuration information is set by the live client. According to the position indication information of each watermark identifier in the watermark configuration information and the size of each original image, the display position of each watermark identifier in each image is calculated. For example, if the position indication information is that the long side margin in the upper left area is 5% and the short side margin is 2%, then the product of the long side length of the original image and 5% is the long side margin length, and the product of the short side length and 2% is the short side margin length, thereby calculating the specific position of the watermark identifier in the original image. According to the number of each watermark identifier, the size of each watermark identifier, and the display mode of each watermark identifier, each watermark identifier is added to the display position in each original image in turn, so that at least one watermark identifier is added to multiple original images according to the watermark configuration information, and multiple watermark images are obtained.
[0100] In step S104, multiple watermark images are sent to the viewer client, so that the multiple watermark images are displayed on the viewer client for viewing by the user. At the same time, the multiple watermark images are stored in the cache area, so that when the request parameters do not change, the watermark images can be directly read from the cache area, thereby improving the acquisition speed of the watermark images. In some embodiments, the watermark images are converted into binary stream data for transmission.
[0101] In some embodiments, the multiple images are multiple pictures in the cloud album, the multiple watermark images are multiple pictures after watermarks are added in batches, or the multiple images are multiple video frames in a video, and the multiple watermark images are videos after watermarks are added in batches to multiple video frames. If the request to view multiple pictures in the cloud album, the multiple watermark images are multiple pictures after watermarks are added in batches to multiple pictures, and if the request to view a video, the multiple watermark images are videos after watermarks are added in batches to multiple video frames.
[0102] In some embodiments, if the service end includes a business server and an image server, the business server receives request information for multiple images, determines request parameters in the request information, sends watermark configuration information corresponding to the request parameters to the image server, and the image server batch adds watermarks to the requested multiple images according to the watermark configuration information to obtain multiple watermarked images, and then the business server sends the multiple watermarked images to the viewer client.
[0103] In an exemplary embodiment of the present disclosure, the original image and the watermark configuration information are stored separately. When the viewer client receives the request information for multiple images, the watermark configuration information associated with the request parameters in the request information is used to add watermarks to the multiple original images in batches. When the watermark configuration information changes, the multiple watermark images after adding the watermark will also change accordingly. The viewer client can obtain multiple watermark images watermarked using the latest watermark configuration information from the server. Even if the image has been watermarked using other watermark configuration information, the new watermark configuration information will be used to add the watermark on the basis of its original image when it is requested to be viewed again. Compared with the prior art that uses fixed request information and causes the watermark to be unable to be modified after being added, the technical effect of adding dynamic watermarks in batches can be achieved, avoiding the problem of inconsistent watermarks before and after multiple images of the same live broadcast user, and improving the user experience. Furthermore, different types of watermark identifiers can be added to the image through the watermark configuration information, and the number, size, display mode and position indication information of each type of watermark identifier can also be different, which can achieve the technical effect of adding dynamic watermarks in batches in the image.
[0104] In an exemplary embodiment of the present disclosure, a method for adding watermarks in batches is provided, which is applied to a server. Figure 2 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0105] Step S201, when there are no multiple watermark images corresponding to the request parameters in the CDN node, receiving request information sent by the viewer client and forwarded by the CDN node, the request information including the request parameters associated with the watermark configuration information, the watermark configuration information representing the display parameters of the watermark in the image;
[0106] Step S202, if there are no multiple watermark images corresponding to the request parameters in the cache area, determine the watermark configuration information corresponding to the request parameters according to the request parameters;
[0107] Step S203, adding watermarks to multiple images in batches according to the watermark configuration information to obtain multiple watermark images;
[0108] Step S204, sending multiple watermark images to the CDN node, storing the multiple watermark images through the CDN node, sending the multiple watermark images to the viewer client, and storing the multiple watermark images in the cache area.
[0109] The specific implementation of step S202 and step S203 refers to step S102 and step S103, which will not be repeated here.
[0110] In step S201, in order to reduce the access frequency of the server and improve the acquisition speed of the watermark image, the viewer client does not directly send the request information of multiple images to the server, but sends the request information of multiple images to the CDN node. The number of CDN nodes is determined according to the actual situation. The CDN nodes can be distributed in multiple locations. In some embodiments, when the viewer client sends the request information to the CDN node, it gives priority to sending the request information to the CDN node closest to improve the acquisition speed of the watermark image. If the server receives the request information forwarded by the CDN node, it means that there are no multiple watermark images corresponding to the request parameters in the CDN node. If the server does not receive the request information forwarded by the CDN node, it means that there are multiple watermark images corresponding to the request parameters in the CDN node. If there are multiple watermark images corresponding to the request parameters in the CDN node, the CDN node will send the multiple watermark images corresponding to the request parameters to the viewer client after receiving the image request information sent by the viewer client; if there are no multiple watermark images corresponding to the request parameters in the CDN node, the CDN node will forward the request information to the server after receiving the image request information sent by the viewer client. In some implementations, the image request information forwarded by the CDN node may also be referred to as back-to-source request information. In some implementations, the request information forwarded by the CDN node may also only include request parameters to save communication resources.
[0111] In some implementations, if the service end includes a business server and a picture server, the business server receives the request information of the multiple images forwarded by the CDN node.
[0112] In step S204, after obtaining multiple watermark images, the multiple watermark images are not sent directly to the viewer client, but are sent to the CDN node, which is a CDN node that forwards image request information. After receiving the multiple watermark images, the CDN node caches the multiple watermark images and sends the multiple watermark images to the viewer client. By caching the watermark images at the CDN node, when the request parameters do not change, the CDN node can directly return the corresponding watermark image to the viewer client according to the request information, which can greatly reduce the request load on the server side and alleviate the traffic pressure of the entire live broadcast process. At the same time, the CDN node can distribute the cached watermark images regionally, effectively shorten the transmission distance and reduce the delay, and improve the speed of obtaining the watermark image. In some embodiments, if the service end includes a business server and a picture server, the business server sends the multiple watermark images to the CDN node.
[0113] At the same time, the server will also store multiple watermark images in the server's cache area. In some embodiments, if the server includes a business server and an image server, the image imager stores multiple watermark images in the cache layer of the image server. The watermark image is cached at the CDN node at the first level and cached at the second level in the server's cache area. Since the cache duration of the server is longer than the cache duration of the CDN node, when the request parameters have not changed, if the image request information is received after a long interval, even if the corresponding watermark image no longer exists in the CDN cache, the corresponding watermark image can still be obtained directly from the server's cache area without having to perform the watermarking process again, which can greatly save the time for obtaining the watermark image and ensure a quick response to the image request information.
[0114] In an exemplary embodiment of the present disclosure, a method for adding watermarks in batches is provided, which is applied to a server. Figure 3 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment. Figure 3 As shown, the following steps are included:
[0115] Step S301, receiving watermark configuration information sent by a live broadcast client, where the watermark configuration information represents display parameters of the watermark in the image;
[0116] Step S302, determining request parameters associated with the watermark configuration information and request information including the request parameters, wherein the request parameters correspond to the watermark configuration information one by one;
[0117] Step S303, storing the request information and the association between the request parameters and the watermark configuration information on the server side;
[0118] Step S304, receiving request information of multiple images sent by the viewer client, wherein the request information includes request parameters associated with the watermark configuration information;
[0119] Step S305, if there are no multiple watermark images corresponding to the request parameters in the cache area, determine the watermark configuration information corresponding to the request parameters according to the request parameters;
[0120] Step S306, adding watermarks to the multiple images in batches according to the watermark configuration information to obtain multiple watermark images;
[0121] Step S307, sending multiple watermark images to the viewer client, and storing the multiple watermark images in the cache area.
[0122] The specific implementation of steps S304 to S307 refers to steps S101 to S104 or steps S201 to S204, which will not be described in detail here.
[0123] In step S301, the live broadcast client represents a user device for publishing live broadcasts of pictures or videos, including electronic devices with the function of publishing live broadcasts, such as smart phones, tablets, and personal computers. The live broadcast client and the audience client can be the same electronic device or different electronic devices. If they are the same electronic device, the time period as the live broadcast client and the time period as the audience client are different. The live broadcast client can set watermark configuration information when publishing live broadcasts. After the watermark configuration information is set, the watermark configuration information is sent to the server, and the server saves the watermark configuration information.
[0124] In step S302, after receiving the watermark configuration information sent by the live broadcast client, the server processes the watermark configuration information through the preset association relationship to obtain the request parameters, so that the request parameters correspond to the watermark configuration information one by one. For example, the json information of the watermark configuration information is encrypted by the Murmurhash algorithm and the 62-base to generate a unique hash value. The hash value is the request parameter associated with the watermark configuration information, which can ensure the security of the watermark configuration information. The request parameter is used as part of the URL information to generate the request information including the request parameter.
[0125] In some implementations, determining a request parameter associated with watermark configuration information includes:
[0126] Determine the image type identifier corresponding to the watermark configuration information;
[0127] Get the request parameters based on the image type identifier and watermark configuration information.
[0128] The server also determines the image type corresponding to the image set by the user when setting the watermark configuration information. The image type and the image type identifier correspond one to one. The image type can be identified in any way, such as using numbers to represent different image types. After the watermark configuration information is processed through a preset association relationship to obtain the initial request parameters, the image type identifier corresponding to the watermark configuration information is determined, and the image type identifier and the initial request parameters are used together as the final target request parameters, for example, the image type identifier is used as the prefix of the request parameter. At the same time, the request parameters are determined based on the image type identifier and the watermark configuration information. Live users can add different dynamic watermarks to different types of images, providing users with more ways to add watermarks, making watermark addition more flexible to meet different user needs.
[0129] In step S303, after obtaining the request information, the request information and the association between the request parameters and the watermark configuration information are stored on the server, so that when the request information is received later, the watermark configuration parameters corresponding to the request parameters can be obtained in time.
[0130] In some implementations, the request information is sent to a CDN node, and the request information is stored by the CDN node.
[0131] While the server saves the request information, it distributes the request information to all CDN nodes and stores the request information through each CDN node, so that after the CDN node receives the request information, it queries the corresponding watermark image in the CDN cache according to the request information and feeds it back to the viewer client.
[0132] In an exemplary embodiment of the present disclosure, a method for adding watermarks in batches is provided, which is applied to a viewer client. Figure 4 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment. Figure 4 As shown, the following steps are included:
[0133] Step S401, sending request information for multiple images, the request information including request parameters associated with watermark configuration information, the watermark configuration information representing display parameters of the watermark in the image;
[0134] Step S402, receiving a plurality of watermarked images, where the plurality of watermarked images are obtained by batch adding watermarks to the plurality of images through the watermark configuration information associated with the request parameters;
[0135] Step S403: display multiple watermark images.
[0136] The watermark batch adding method in the disclosed embodiment is applied to the audience client, where the audience client refers to the user device used to watch live broadcast, including smart phones, tablets, personal computers and other electronic devices with the function of watching live broadcast.
[0137] When watching the live broadcast, the viewer client obtains the multiple images requested to be viewed by sending a request message. The request message is preset by the server, and the request message includes a request parameter associated with the watermark configuration information. After sending the request message, multiple watermark images can be received. The multiple watermark images are obtained by batch adding watermarks to multiple images through the watermark configuration information associated with the request parameters. The multiple watermark images are displayed on the display screen, and the live broadcast can be viewed. In some embodiments, the multiple images are multiple pictures in the cloud album, and the multiple watermark images are multiple pictures after batch watermarking, or the multiple images are multiple video frames in the video, and the multiple watermark images are videos after batch watermarking of multiple video frames. The request message can be a request to view multiple pictures or a request to view a video. If a request is made to view multiple images, multiple watermark images can be received and directly displayed. If a request is made to view a video, a video formed by the multiple watermark images as video frames is received and displayed.
[0138] In some implementations, the viewer client sends request information for multiple images and receives multiple watermark images, including the following three situations:
[0139] The first method is to send request information for multiple images to a CDN node and receive multiple watermarked images sent by the CDN node.
[0140] The viewer client sends request information for multiple images to the CDN node closest to the viewer client. The CDN node obtains multiple watermark images corresponding to the request information from the CDN cache and sends them to the viewer client.
[0141] The second method is to send request information of multiple images to the CDN node, and forward the request information to the server through the CDN node; and receive the multiple watermark images sent by the server and forwarded by the CDN node.
[0142] The viewer client sends a request message to the CDN node closest to the viewer client. If there are no multiple watermark images corresponding to the request message in the CDN cache, the CDN node forwards the request message to the server. When receiving the multiple watermark images corresponding to the request message sent by the server, the CDN node sends the multiple watermark images to the viewer client.
[0143] The third method is to send request information for multiple images to the server and receive multiple watermark images sent by the server.
[0144] The viewer client directly sends request information to the server, and the server directly obtains multiple watermark images corresponding to the request information from the cache area and sends them to the viewer client, or the server batch adds watermarks to multiple images according to the watermark configuration information corresponding to the request information, obtains multiple watermark images, and sends them to the viewer client.
[0145] In an exemplary embodiment of the present disclosure, a method for adding watermarks in batches is provided, which is applied to a live broadcast client. Figure 5 is a flow chart of a method for adding watermarks in batches according to an exemplary embodiment. Figure 5 As shown, the following steps are included:
[0146] Step S501, determining watermark configuration information according to user input, where the watermark configuration information represents display parameters of the watermark in the image;
[0147] Step S502: sending watermark configuration information to the server.
[0148] The watermark batch adding method in the disclosed embodiment is applied to a live broadcast client, where the live broadcast client refers to a user device used to publish live broadcasts, including smart phones, tablets, personal computers and other electronic devices with the function of publishing live broadcasts.
[0149] The watermark configuration information represents the display parameters of the watermark in the image. In some embodiments, the watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display mode of each watermark identifier, and the position indication information of each watermark identifier, wherein the type of watermark identifier may be one or more, the number of each watermark identifier may be one or more, the display mode of each watermark identifier includes the transparency, display direction, border and border color of the watermark identifier, etc. The position indication information is used to indicate the display position of the watermark identifier in the image, including display area and display margin and other parameters related to the display position. The user sets the watermark configuration information through the preset watermark setting graphical interactive interface on the live client. The preset interface includes multiple functional modules, and different functional modules are used to set different watermark configuration information. After the watermark configuration information is set, it is saved, and the watermark configuration information can be saved to the server.
[0150] In some possible implementations, an image to be watermarked is set through an upload module. If the watermark configuration information of all images is the same, the image uploaded by the module can be any image. If the watermark configuration information of different image types is different, the image uploaded by the module is any image of the same type. If a watermark is added to a video, the video to be watermarked is set, and the watermark adding effect is previewed for the first video frame in the video; a watermark identifier is set through a watermark module. The type of watermark identifier and the number of each type can be set according to user needs. It can be a single watermark, or multiple identical watermarks, or multiple different watermarks; the position indication information of the watermark identifier is set through an area selection module. Multiple areas to be selected are preset in the area selection module. The user can choose to add any number of watermarks in any area, for example, dividing the image into three rows and three columns, a total of nine, according to the image size. Area, and display the divided area in the uploaded image or previewed video frame. Each divided area is each area to be selected. After selecting an area, the user can add a watermark to the area by clicking or dragging, and after the area is added, continue to select other areas to add watermarks. In addition, the specific position of the watermark in the divided area can be set by setting the margin; the size of the watermark is set by the size control module, and the size of the watermark is the image size. For example, by setting the scaling ratio, it is scaled based on the original size, where the scaling ratio can also include scaling ratios in different directions, such as scaling according to the long side of the image or scaling according to the short side of the image; the display mode of the watermark is set by the transparency setting module; and the watermark adding effect is previewed in real time by the preview module.
[0151] In an exemplary embodiment of the present disclosure, a method for adding watermarks in batches is provided. Figure 6 is an interactive flow chart of a method for adding watermarks in batches according to an exemplary embodiment. Figure 6 As shown, the following steps are included:
[0152] Step S601, the live broadcast client determines watermark configuration information according to user input, where the watermark configuration information represents display parameters of the watermark in the image;
[0153] Step S602, the live broadcast client sends watermark configuration information to the server;
[0154] Step S603, the server determines the request parameters associated with the watermark configuration information and the request information including the request parameters, and the request parameters correspond to the watermark configuration information one by one;
[0155] Step S604, the server stores the request information and the association between the request parameters and the watermark configuration information;
[0156] Step S605, the viewer client sends request information for multiple images to the server, where the request information includes request parameters associated with the watermark configuration information;
[0157] Step S606, if there are no multiple watermark images corresponding to the request parameters in the server cache area, the server determines the watermark configuration information corresponding to the request parameters according to the request parameters;
[0158] Step S607, the server adds watermarks to the multiple images in batches according to the watermark configuration information to obtain multiple watermark images;
[0159] Step S608, the server sends multiple watermark images to the viewer client, and stores the multiple watermark images in a cache area;
[0160] Step S609: the viewer client displays multiple watermark images.
[0161] In an exemplary embodiment of the present disclosure, a method for adding watermarks in batches is provided. Figure 7 is an interactive flow chart of a method for adding watermarks in batches according to an exemplary embodiment. Figure 7 As shown, the following steps are included:
[0162] Step S701, the live broadcast client determines watermark configuration information according to user input, where the watermark configuration information represents display parameters of the watermark in the image;
[0163] Step S702, the live broadcast client sends watermark configuration information to the server;
[0164] Step S703, the server determines the request parameters associated with the watermark configuration information and the request information including the request parameters, and the request parameters correspond to the watermark configuration information one by one;
[0165] Step S704, the server stores the request information and the association between the request parameters and the watermark configuration information;
[0166] Step S705, the server sends a request message to the CDN node;
[0167] Step S706, the CDN node stores the request information;
[0168] Step S707, the viewer client sends request information for multiple images to the CDN node, where the request information includes request parameters associated with the watermark configuration information;
[0169] Step S708, when there are multiple watermark images corresponding to the request parameters in the CDN node, the CDN node sends the multiple watermark images to the viewer client;
[0170] Step S709, when the CDN node does not have multiple watermark images corresponding to the request parameters, the CDN node sends a back-to-source request to the server, that is, forwards the request information to the server;
[0171] Step S710, if there are multiple watermark images corresponding to the request parameters in the server cache area, the server sends the multiple watermark images to the CDN node, and sends the multiple watermark images to the viewer client through the CDN node;
[0172] Step S711, if there are no multiple watermark images corresponding to the request parameters in the server cache area, the server determines the watermark configuration information corresponding to the request parameters according to the request parameters;
[0173] Step S712, the server adds watermarks to multiple images in batches according to the watermark configuration information to obtain multiple watermark images;
[0174] Step S713, the server sends multiple watermark images to the CDN node, and stores the multiple watermark images in the cache area;
[0175] Step S714, the CDN node sends multiple watermark images to the viewer server, and stores the multiple watermark images in the CDN node;
[0176] Step S715: the viewer client displays multiple watermark images.
[0177] In an exemplary embodiment of the present disclosure, a method for adding watermarks in batches is provided. When the service end includes a business server and a picture server, Figure 8 is an interactive flow chart of a method for adding watermarks in batches according to an exemplary embodiment. Figure 8 As shown, the following steps are included:
[0178] Step S801, the live broadcast client determines watermark configuration information according to user input, where the watermark configuration information represents display parameters of the watermark in the image;
[0179] Step S802, the live broadcast client sends watermark configuration information to the service server;
[0180] Step S803, the service server determines the request parameters associated with the watermark configuration information and the request information including the request parameters, and the request parameters correspond to the watermark configuration information one by one;
[0181] Step S804, the service server stores the request information and the association between the request parameters and the watermark configuration information;
[0182] Step S805, the service server sends request information to the CDN node;
[0183] Step S806, the CDN node stores the request information;
[0184] Step S807, the viewer client sends request information for multiple images to the CDN node, where the request information includes request parameters associated with the watermark configuration information;
[0185] Step S808, when there are multiple watermark images corresponding to the request parameters in the CDN node, the CDN node sends the multiple watermark images to the viewer client;
[0186] Step S809, when the CDN node does not have multiple watermark images corresponding to the request parameters, the CDN node sends a back-source request to the service server, that is, forwards the request information to the server;
[0187] Step S810, if the business server determines that there are multiple watermark images corresponding to the request parameters in the image server, the image server sends the multiple watermark images to the business server, the business server sends the multiple watermark images to the CDN node, and the multiple watermark images are sent to the viewer client through the CDN node;
[0188] Step S811, if the business server determines that the image server does not have multiple watermark images corresponding to the request parameters, the business server determines the watermark configuration information corresponding to the request parameters according to the request parameters;
[0189] Step S812, the business server sends watermark configuration information to the image server;
[0190] Step S813, the image server batch adds watermarks to the multiple images according to the watermark configuration information, obtains the multiple watermark images, and stores the multiple watermark images;
[0191] Step S814, the image server sends multiple watermark images to the business server, and the business server sends multiple watermark images to the CDN node;
[0192] Step S815, the CDN node sends multiple watermark images to the viewer server, and stores the multiple watermark images in the CDN node;
[0193] Step S816: the viewer client displays multiple watermark images.
[0194] Among them, the multiple images are multiple pictures in the cloud album, the multiple watermarked images are multiple pictures after watermarks are added in batches, or the multiple images are multiple video frames in the video, and the multiple watermarked images are videos after watermarks are added in batches to multiple video frames.
[0195] In an exemplary embodiment of the present disclosure, a watermark batch adding device is provided, which is applied to a server. Fig. 9is a block diagram of a watermark batch adding device according to an exemplary embodiment. Fig. 9 As shown, the watermark adding device comprises:
[0196] The receiving module 901 is configured to receive request information of multiple images sent by the viewer client, wherein the request information includes request parameters associated with watermark configuration information, and the watermark configuration information represents display parameters of the watermark in the image;
[0197] The processing module 902 is configured to determine the watermark configuration information corresponding to the request parameters according to the request parameters if there are no multiple watermark images corresponding to the request parameters in the cache area; and batch add watermarks to the multiple images according to the watermark configuration information to obtain the multiple watermark images;
[0198] The sending module 903 is configured to send multiple watermark images to the viewer client and store the multiple watermark images in the cache area.
[0199] In an exemplary embodiment, the watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display method of each watermark identifier and the position indication information of each watermark identifier, and the position indication information is used to indicate the display position of the watermark identifier in the image.
[0200] In an exemplary embodiment, the processing module 902 is further configured to:
[0201] Get multiple images;
[0202] Determining a display position of each watermark mark in each image according to the position indication information of each watermark mark and the size of each image in the plurality of images;
[0203] At least one watermark mark is added at a display position in each image according to the quantity of each watermark mark, the size of each watermark mark and the display mode of each watermark mark to obtain a plurality of watermark images.
[0204] In an exemplary embodiment, the request information further includes an image type identifier, and the processing module 902 is further configured to:
[0205] Determine the watermark configuration information based on the request parameters and image type identifier.
[0206] In an exemplary embodiment, the receiving module 901 is further configured to:
[0207] When the multiple watermark images corresponding to the request parameters do not exist in the CDN node, receiving the request information sent by the viewer client and forwarded by the CDN node;
[0208] The sending module 903 is further configured to:
[0209] Send multiple watermark images to the CDN node, store the multiple watermark images through the CDN node, and send the multiple watermark images to the viewer client.
[0210] In an exemplary embodiment, the sending module 903 is further configured to:
[0211] If there are multiple watermark images corresponding to the request parameters in the cache area, the multiple watermark images are sent to the viewer client.
[0212] In an exemplary embodiment, before receiving the image request information sent by the viewer client, the method further includes:
[0213] The receiving module 901 is further configured to: receive watermark configuration information sent by the live broadcast client;
[0214] The processing module 902 is further configured to: determine request parameters associated with the watermark configuration information and request information including the request parameters, wherein the request parameters correspond to the watermark configuration information one-to-one; and store the request information and the association between the request parameters and the watermark configuration information on the server side.
[0215] In an exemplary embodiment, the sending module 903 is further configured to:
[0216] The request information is sent to the CDN node and stored by the CDN node.
[0217] In an exemplary embodiment, the processing module 902 is further configured to:
[0218] Determine the image type identifier corresponding to the watermark configuration information;
[0219] Get the request parameters based on the image type identifier and watermark configuration information.
[0220] In an exemplary embodiment, the multiple images are multiple pictures in a cloud photo album, and the multiple watermarked images are multiple pictures after watermarks are added in batches, or the multiple images are multiple video frames in a video, and the multiple watermarked images are videos after watermarks are added in batches to multiple video frames.
[0221] In an exemplary embodiment of the present disclosure, a watermark batch adding device is provided, which is applied to a viewer client. Fig.10 is a block diagram of a watermark batch adding device according to an exemplary embodiment. Fig.10 As shown, the watermark adding device comprises:
[0222] The sending module 1001 is configured to send request information of multiple images, wherein the request information includes request parameters associated with watermark configuration information, and the watermark configuration information represents display parameters of the watermark in the image;
[0223] The receiving module 1002 is configured to receive a plurality of watermarked images, where the plurality of watermarked images are obtained by batch adding watermarks to the plurality of images through the watermark configuration information associated with the request parameters;
[0224] The processing module 1003 is configured to display multiple watermark images.
[0225] In an exemplary embodiment, the watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display method of each watermark identifier and the position indication information of each watermark identifier, and the position indication information is used to indicate the display position of the watermark identifier in the image.
[0226] In an exemplary embodiment, the sending module 1001 is further configured to:
[0227] Sending request information to the CDN node, or sending request information to the CDN node and forwarding the request information to the server through the CDN node;
[0228] The receiving module 1002 is further configured to:
[0229] Receive multiple watermark images sent by the CDN node, or receive multiple watermark images sent by the server and forwarded by the CDN node.
[0230] In an exemplary embodiment, the multiple images are multiple pictures in a cloud photo album, and the multiple watermarked images are multiple pictures after watermarks are added in batches, or the multiple images are multiple video frames in a video, and the multiple watermarked images are videos after watermarks are added in batches to multiple video frames.
[0231] In an exemplary embodiment of the present disclosure, a watermark batch adding device is provided, which is applied to a live broadcast client. Fig.11 is a block diagram of a watermark batch adding device according to an exemplary embodiment. Fig.11 As shown, the watermark adding device comprises:
[0232] The processing module 1101 is configured to determine watermark configuration information according to user input, where the watermark configuration information represents display parameters of the watermark in the image;
[0233] The sending module 1102 is configured to send watermark configuration information to the server.
[0234] In an exemplary embodiment, the watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display method of each watermark identifier and the position indication information of each watermark identifier, and the position indication information is used to indicate the display position of the watermark identifier in the image.
[0235] Each module in the above watermark adding device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0236] In an exemplary embodiment, a computer device is provided, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any of the above-mentioned watermark adding methods are implemented.
[0237] In an exemplary embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above watermark adding methods are implemented. The computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0238] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of any of the above watermark adding directions are implemented.
[0239] refer to Fig.12 , a block diagram of a computer device that can be used as the camera 2 or terminal 1 of the present disclosure will now be described, and the computer device includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1208 to a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the computer device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0240] A plurality of components in the computer device 1200 are connected to the I / O interface 1205, including: an input unit 1206, an output unit 1207, a storage unit 1208, and a communication unit 1209. The input unit 1206 may be any type of device capable of inputting information to the computer device 1200, the input unit 1206 may receive input digital or character information, and generate key signal input related to user settings and / or function control of the computer device 1200, and may include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 1207 may be any type of device capable of presenting information, and may include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1208 may include but is not limited to a disk and an optical disk. The communication unit 1209 allows the computer device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device and / or the like.
[0241] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above, such as the watermark adding method. For example, in some embodiments, the watermark adding method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the computer device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the watermark adding method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to execute the watermark adding method in any other appropriate manner (eg, by means of firmware).
[0242] The computer device 1200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned watermark adding method.
[0243] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0244] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for adding watermarks in batches, characterized in that: The method comprises: Receiving request information for multiple images sent by a viewer client, the request information including request parameters associated with watermark configuration information, the watermark configuration information representing display parameters of the watermark in the image; If the multiple watermark images corresponding to the request parameters do not exist in the cache area, determining the watermark configuration information corresponding to the request parameters according to the request parameters; adding watermarks in batches to the plurality of images according to the watermark configuration information to obtain the plurality of watermark images; The plurality of watermark images are sent to the viewer client, and the plurality of watermark images are stored in the cache area.
2. The method for adding watermarks in batches according to claim 1, characterized in that: The watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display method of each watermark identifier and the position indication information of each watermark identifier, and the position indication information is used to indicate the display position of the watermark identifier in the image.
3. The method for adding watermarks in batches according to claim 2, characterized in that: The step of adding watermarks to the plurality of images in batches according to the watermark configuration information to obtain the plurality of watermark images comprises: Acquire the multiple images; Determining the display position of each watermark in each of the images according to the position indication information of each watermark and the size of each of the multiple images; At the display position in each of the images, the at least one watermark is added according to the quantity of each watermark, the size of each watermark and the display mode of each watermark, so as to obtain the multiple watermark images.
4. The method for adding watermarks in batches according to claim 1, characterized in that: The request information also includes an image type identifier, and the determining, according to the request parameters, watermark configuration information corresponding to the request parameters includes: The watermark configuration information is determined according to the request parameter and the image type identifier.
5. The method for adding watermarks in batches according to claim 1, characterized in that: The receiving request information of multiple images sent by the viewer client includes: When the multiple watermark images corresponding to the request parameters do not exist in the CDN node, receiving the request information sent by the viewer client and forwarded by the CDN node; The sending the plurality of watermark images to the viewer client comprises: The multiple watermark images are sent to a CDN node, the multiple watermark images are stored by the CDN node, and the multiple watermark images are sent to the viewer client.
6. The method for adding watermarks in batches according to claim 1, characterized in that: The method further comprises: If there are multiple watermark images corresponding to the request parameters in the cache area, the multiple watermark images are sent to the viewer client.
7. The method for adding watermarks in batches according to claim 1, characterized in that: Before receiving the request information for multiple images sent by the viewer client, the method further includes: Receive watermark configuration information sent by the live broadcast client; Determine a request parameter associated with the watermark configuration information and request information including the request parameter, wherein the request parameter corresponds to the watermark configuration information one by one; The request information and the association between the request parameters and the watermark configuration information are stored on the server side.
8. The method for adding watermarks in batches according to claim 7, characterized in that: The method further comprises: The request information is sent to a CDN node, and the request information is stored by the CDN node.
9. The method for adding watermarks in batches according to claim 7, characterized in that: The determining of the request parameter associated with the watermark configuration information includes: Determining an image type identifier corresponding to the watermark configuration information; The request parameter is obtained according to the image type identifier and the watermark configuration information.
10. The method for adding watermarks in batches according to any one of claims 1 to 9, characterized in that: The multiple images are multiple pictures in a cloud album, and the multiple watermarked images are multiple pictures after watermarks are added in batches, or the multiple images are multiple video frames in a video, and the multiple watermarked images are videos after watermarks are added in batches to the multiple video frames.
11. A method for adding watermarks in batches, characterized in that: Applied to a viewer client, the method includes: Sending request information for multiple images, the request information including request parameters associated with watermark configuration information, the watermark configuration information representing display parameters of the watermark in the image; receiving a plurality of watermarked images, wherein the plurality of watermarked images are obtained by batch adding watermarks to the plurality of images through the watermark configuration information associated with the request parameter; The multiple watermark images are displayed.
12. The method for adding watermarks in batches according to claim 11, characterized in that: The watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display method of each watermark identifier and the position indication information of each watermark identifier, and the position indication information is used to indicate the display position of the watermark identifier in the image.
13. The method for adding watermarks in batches according to claim 11, characterized in that: The request information for sending multiple images includes: Sending the request information to a CDN node, or sending the request information to a CDN node and forwarding the request information to a server through the CDN node; The receiving of multiple watermark images comprises: The multiple watermark images are received and sent by the CDN node, or the multiple watermark images are received and sent by the server and forwarded by the CDN node.
14. The method for adding watermarks in batches according to any one of claims 11 to 13, characterized in that: The multiple images are multiple pictures in a cloud album, and the multiple watermarked images are multiple pictures after watermarks are added in batches, or the multiple images are multiple video frames in a video, and the multiple watermarked images are videos after watermarks are added in batches to the multiple video frames.
15. A method for adding watermarks in batches, characterized in that: Applied to a live broadcast client, the method includes: Determining watermark configuration information according to user input, wherein the watermark configuration information represents display parameters of the watermark in the image; Send the watermark configuration information to the server.
16. The method for adding watermarks in batches according to claim 15, characterized in that: The watermark configuration information includes at least one watermark identifier, the number of each watermark identifier, the size of each watermark identifier, the display mode of each watermark identifier and the position indication information of each watermark identifier, and the position indication information is used to indicate the display position of the watermark identifier in the image.
17. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method of any one of claims 1 to 10 or claims 11 to 14 or claims 15 to 16 are implemented.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method of any one of claims 1 to 10 or claims 11 to 14 or claims 15 to 16 are implemented.
