Image display method, device, system and equipment
By generating and encoding image data in different areas, the problem that standard players cannot display encrypted video images is solved, and images that obscured privacy areas are displayed on standard players are realized, and authorized devices are allowed to display complete images, ensuring the security and flexibility of privacy information.
Patent Information
- Application Number
- CN202111640079.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In the prior art, the encrypted video images can only be displayed on a specified player and cannot be displayed on a standard player, resulting in inflexible protection of privacy information.
By generating the first image corresponding to the non-hidden area of the image and the second image corresponding to the hidden area, and performing encoding and encryption processing respectively, the first coded data and the third coded data are generated and sent to the client device. The client device displays the original image based on permissions and capabilities.
It realizes the display of images that obscures the privacy area on a standard player, while allowing authorized devices to display original images, ensuring the security and flexibility of privacy information.
Smart Images

Figure CN114205587B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video playback, and in particular to an image display method, device, system and equipment. Background Art
[0002] In order to protect personal privacy, areas containing private information in some video images need to be masked or blurred to hide the areas, so as to avoid leakage of private information when displaying the video images.
[0003] Since the related art generally uses a private encryption scheme when encrypting video images, and the encrypted video images can only be displayed after decryption, the encrypted video images in the related art can only be displayed on a specified player and cannot be displayed using a standard player. Summary of the Invention
[0004] The present application discloses an image display method, apparatus, system and device, so that an image with a hidden area masked can be displayed on a standard player, such as VLC Media Player, Windows' built-in Media Player and other standard players.
[0005] According to a first aspect of an embodiment of the present application, there is provided an image display method, applied to a server device, comprising:
[0006] When the original image is acquired, determining the hidden area and the non-hidden area in the original image;
[0007] generating a first image corresponding to the non-hidden area and generating a second image corresponding to the hidden area;
[0008] Encoding the first image to obtain first encoded data corresponding to the first image, encoding the second image to obtain second encoded data corresponding to the second image, and encrypting the second encoded data to obtain third encoded data;
[0009] A target code stream including the first encoded data and the third encoded data is sent to a client device.
[0010] Optionally, the generating of the first image corresponding to the non-hidden area and the generating of the second image corresponding to the hidden area includes:
[0011] Filling the hidden area of the original image with a masking image to obtain the first image;
[0012] The hidden area of the original image is cut out to obtain a hidden sub-image corresponding to the hidden area, and the second image is generated based on the hidden sub-image; wherein the resolution of the second image is the same as the resolution of the original image, and the position of the hidden sub-image in the second image is the same as the position of the hidden sub-image in the original image.
[0013] Optionally, before encrypting the second encoded data, the method further includes:
[0014] Obtain masking information corresponding to the second image, and encapsulate the masking information in the third coded data; the masking information includes at least: video coding type, encryption information, and hidden area information.
[0015] According to a second aspect of an embodiment of the present application, there is provided an image display method, which is applied to a client device and includes:
[0016] Obtaining first coded data and third coded data from a target code stream;
[0017] Decoding the first coded data to obtain a first image corresponding to a non-hidden area in the original image;
[0018] If the client device is allowed to display the hidden area in the original image, decrypting the third coded data to obtain second coded data, and decoding the second coded data to obtain a second image corresponding to the hidden area in the original image;
[0019] An original image is generated based on the first image and the second image, and the original image is displayed.
[0020] Optionally, the method further includes: if the client device is not allowed to display the hidden area in the original image, displaying the first image;
[0021] Among them, if the client device does not support the hidden area display function, or the client device does not obtain correct verification information, the client device is not allowed to display the hidden area in the original image; if the client device supports the hidden area display function and the client device obtains correct verification information, the client device is allowed to display the hidden area in the original image.
[0022] Optionally, decrypting the third coded data to obtain second coded data, and decoding the second coded data to obtain a second image corresponding to the hidden area in the original image includes:
[0023] Parsing mask information corresponding to the second image from the third encoded data, the mask information at least including: video encoding type and encryption information;
[0024] obtaining a decryption key for decrypting the third coded data based on the encryption information, and decrypting the third coded data according to the decryption key to obtain second coded data;
[0025] A target decoding mode is determined based on the video encoding type, and the second encoded data is decoded based on the target decoding mode to obtain the second image.
[0026] Optionally, the masking information further includes hidden area information;
[0027] Generating an original image based on the first image and the second image includes:
[0028] A hidden area is parsed from the second image according to the hidden area information, and a target position corresponding to the hidden area is determined from the first image. The hidden area is superimposed on the target position of the first image to obtain the original image.
[0029] According to a third aspect of an embodiment of the present application, there is provided an image display device, applied to a server device, comprising:
[0030] A region determining unit, configured to determine a hidden region and a non-hidden region in an original image when an original image is acquired;
[0031] an image generating unit, configured to generate a first image corresponding to the non-hidden area and a second image corresponding to the hidden area;
[0032] an encoding unit, configured to encode the first image to obtain first encoded data corresponding to the first image, encode the second image to obtain second encoded data corresponding to the second image, and encrypt the second encoded data to obtain third encoded data;
[0033] A sending unit is configured to send a target code stream including the first coded data and the third coded data to a client device.
[0034] According to a fourth aspect of an embodiment of the present application, there is provided an image display device, applied to a client device, comprising:
[0035] an acquiring unit, configured to acquire the first coded data and the third coded data from a target code stream;
[0036] a decoding unit configured to decode the first coded data to obtain a first image corresponding to the non-hidden area in the original image; if the client device is allowed to display the hidden area in the original image, decrypt the third coded data to obtain second coded data; and decode the second coded data to obtain a second image corresponding to the hidden area in the original image;
[0037] An image display unit is configured to generate an original image based on the first image and the second image, and display the original image.
[0038] According to a fifth aspect of an embodiment of the present application, there is provided an image display system, the system comprising at least one server device and at least one client device;
[0039] The server device is configured to, upon acquiring an original image, determine a hidden area and a non-hidden area in the original image; generate a first image corresponding to the non-hidden area, and generate a second image corresponding to the hidden area; encode the first image to obtain first encoded data corresponding to the first image, encode the second image to obtain second encoded data corresponding to the second image, and encrypt the second encoded data to obtain third encoded data; and send a target code stream including the first encoded data and the third encoded data to the client device;
[0040] The client device is configured to obtain first coded data and third coded data from a received target code stream; decode the first coded data to obtain a first image corresponding to a non-hidden area in an original image; if the client device is allowed to display a hidden area in the original image, decrypt the third coded data to obtain second coded data; decode the second coded data to obtain a second image corresponding to the hidden area in the original image; generate an original image based on the first image and the second image, and display the original image.
[0041] According to a sixth aspect of an embodiment of the present application, there is provided an electronic device, the electronic device comprising: a processor and a memory;
[0042] The memory is used to store machine-executable instructions;
[0043] The processor is configured to read and execute the machine executable instructions stored in the memory to implement the image display method described above.
[0044] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0045] It can be seen from the above technical solution that the server device in the solution provided by the present application can process the hidden area and the non-hidden area of the original image separately, generate a first image corresponding to the non-hidden area, and a second image corresponding to the hidden area, and obtain first coded data by encoding the first image, and obtain third coded data by encoding and encrypting the second image, so as to prevent the second image carrying privacy information in the hidden area from leaking privacy information during transmission. When the client device receives the first coded data and the third coded data, since the first coded data is not encrypted, the client device can directly decode the first coded data to obtain the first image. In this way, even if the client device does not support the display of the hidden area, the first image can be guaranteed to be displayed normally. If the client device is allowed to display the hidden area in the original image, the client device can also obtain the second image according to the third coded data, generate the original image based on the first image and the second image, and display it.
[0046] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0048] Figure 1 This is a flow chart of an image display method provided by an embodiment of the present application;
[0049] Figure 2 is a schematic diagram of an original video image frame provided by an embodiment of the present application;
[0050] Figure 3 is a schematic diagram of a first image provided in an embodiment of the present application;
[0051] Figure 4 This embodiment of the present application provides Figure 2 Schematic diagram of hidden sub-image in;
[0052] Figure 5 is a schematic diagram of a second image provided in an embodiment of the present application;
[0053] Figure 6 This is a flow chart of another method for implementing video playback provided by an embodiment of the present application;
[0054] Figure 7 Schematic diagram of an image display device provided in an embodiment of the present application;
[0055] Figure 8 is a schematic diagram of another image display device provided in an embodiment of the present application;
[0056] Figure 9 is a schematic diagram of an image display system provided by an embodiment of the present application;
[0057] Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0059] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0060] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0061] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application are further described in detail below with reference to the accompanying drawings.
[0062] In the related art, the encoded data of the entire video image is encrypted, and then the relevant information of the area with privacy information (recorded as the hidden area) (such as the coordinate position of the hidden area in the video image, the area size, etc.) and the privacy demasking permission information used to indicate whether the hidden area is displayed are transmitted together with the encrypted encoded data corresponding to the video image to the playback end. Then, when displaying the video image, the playback end can display the original video image when it detects that the privacy demasking permission information indicates to display the hidden area. When it detects that the privacy demasking permission information indicates not to display the hidden area, the playback end can mask the hidden area in the original video image and then display the processed video image.
[0063] See also Figure 1 , Figure 1 This is a flow chart of a method for image display provided in an embodiment of the present application. As an embodiment, Figure 1 The process shown can be applied to server-side devices, such as cameras, or devices that can store and process bit streams, such as NVRs (Network Video Recorders), cloud storage servers, etc.
[0064] like Figure 1 As shown, the process may include the following steps:
[0065] Step 101: When an original image is acquired, a hidden area and a non-hidden area in the original image are determined.
[0066] As an embodiment, this embodiment may use the video image captured by the video capture device as the original image, or may use any received picture as the original image.
[0067] In a specific implementation, after obtaining the original image, the original image can be input into a pre-set privacy masking algorithm library. The privacy masking algorithm library can determine the area in the original image that carries privacy information, and determine the area as the area that needs to be hidden when displaying the original image (recorded as the hidden area). The area outside the hidden area in the original image is determined as the area that does not need to be hidden when displaying the original image (that is, the area that does not carry privacy information, recorded as the non-hidden area). The number of hidden areas in the original image, the position coordinates of each hidden area in the original image, and the area size of the area can be obtained. Figure 2 Take the original image shown as an example, Figure 2 After inputting into the privacy masking algorithm library, based on Figure 2 If the face displayed in the image is private information, the privacy masking algorithm library can use the face recognition algorithm to identify the area where the face is located as a hidden area, and identify other areas outside the hidden area as non-hidden areas.
[0068] Step 102: Generate a first image corresponding to the non-hidden area, and generate a second image corresponding to the hidden area.
[0069] In this embodiment, after determining the hidden area and non-hidden area in the original image in step 101, the first image in step 102 can be obtained by filling the hidden area of the original image with a masking image. The hidden area of the original image is then subjected to a matting process to obtain a hidden sub-image corresponding to the hidden area, and a second image is generated based on the hidden sub-image. In this embodiment, the resolution of the second image obtained is the same as that of the original image, and the position of the hidden sub-image in the second image is the same as that in the original image.
[0070] As an embodiment, the hidden area in the original image can be filled with a masking image based on the position coordinates and area size of each hidden area in the original image to obtain the first image. The masking image filled in this embodiment can be a pure white image, a pure black image or other pure color image, or a mosaic image, a blurred image, etc. After the masking image is filled into the hidden area in the original image, as shown in FIG. Figure 3 As shown ( Figure 3 The masked image is a pure black image), the original image in the hidden area of the original image will not be displayed normally.
[0071] Optionally, in this embodiment, the masking image is filled into the hidden area. The masking image can be obtained first, and then the masking layer is overlaid on the layer of the hidden area in the original image. The hidden area in the original image can also be directly encoded to obtain the masking image, and the masking image can be filled into the hidden area.
[0072] As an embodiment, this embodiment can use the above-mentioned pre-set privacy masking algorithm library to perform a cutout process on each hidden area in the original image according to the position coordinates and area size of each hidden area in the original image obtained in step 101, and extract the hidden sub-image corresponding to the hidden area from the original image. The extracted hidden sub-image is as follows: Figure 4 As shown, Figure 4 For Figure 2 Two hidden sub-images are extracted from the original image: hidden sub-image a and hidden sub-image b.
[0073] Optionally, after obtaining the hidden sub-image, the hidden sub-image can be superimposed with a solid color image having the same resolution as the original image according to the position of the hidden sub-image in the original image, such as Figure 5 As shown ( Figure 5The pure color image in the middle is a pure black image), so that the position of the hidden sub-image in the pure color image after superposition is the same as the position of the hidden sub-image in the original image.
[0074] Step 103 : Encode the first image to obtain first encoded data corresponding to the first image, encode the second image to obtain second encoded data corresponding to the second image, and encrypt the second encoded data to obtain third encoded data.
[0075] As an embodiment, the encoding of the first image in step 103 can be performed using a standard video encoding method, such as the H.264 video encoding method. The first encoded data obtained by the standard video encoding method and the code stream obtained after encapsulating the first encoded data are also in a standard format, so the code stream corresponding to the first video data can be played on a standard player. Based on the first encoded data obtained in this embodiment, even if the code stream corresponding to the second encoded data of the second image (including the hidden sub-image of the hidden area) cannot be played normally due to network factors or player (i.e., client device) function limitations, it will not affect the normal playback of the code stream that masks the hidden area (i.e., the code stream corresponding to the first encoded data). It should be noted that the code stream corresponding to the first encoded data played in this embodiment is an image that masks the hidden area, which can prevent the leakage of privacy information in the hidden area.
[0076] Furthermore, after obtaining the first coded data, a standard coded data encapsulation method may be used to encapsulate the first coded data into a standard video frame.
[0077] In the embodiment of the present application, since the non-masked area is stored in a standard format, the masked image can be played in any player that supports the standard format, and the compatibility is strong.
[0078] In this embodiment, the second image in step 103 may also be encoded using the same video encoding method used to encode the first image to obtain second encoded data corresponding to the second image. It should be noted that this embodiment does not limit the video encoding method used to encode the second image, and using the same video encoding method as the first image is merely one method of encoding the second image in this embodiment.
[0079] As an example, before encoding the second image, this embodiment requires first determining the corresponding masking information for the second image. This masking information includes at least the video encoding type, encryption information, and hidden area information. The video encoding type indicates the video encoding method used when encoding the second image, the encryption information indicates the reference information for the encryption key used when encrypting the second encoded data, and the hidden area information indicates the resolution of the second image, the number of hidden areas in the second image, and the location and size of each hidden area in the second image at that resolution. If there are multiple hidden areas in the original image, the number of hidden areas can be further included in the hidden area information.
[0080] It should be noted that the reason why the resolution of the second image is indicated in the hidden area information is because the position and area size of the hidden area in the second image are related to the size of the second image. Only when the resolution of the second image is determined can the position of the hidden area in the second image be determined, and the resolution of the screens in different players is generally different. Only by converting the resolution of the second image with the resolution of the screen in the player can the position corresponding to the hidden area in the image displayed on the screen of the player be determined.
[0081] Through the reference information of the encryption key in the masking information, the encryption key for encrypting the second coded data can be obtained, and then the encryption key can be used to encrypt the second coded data to obtain the third coded data. Furthermore, after obtaining the third coded data, the same coding data encapsulation method used when encapsulating the first coded data can be used to encapsulate the third coded data and the above-mentioned masking information together. Since the masking information is customized in this embodiment and is different from the information encapsulated in the standard video frame in the related art, although the standard coding data encapsulation method is used to encapsulate the third coded data and the masking information in this embodiment, in order to facilitate the distinction between the video frame obtained after encapsulating the first coded data and the video frame obtained after encapsulating the third coded data, the video frame obtained after encapsulating the third coded data is recorded as a private frame.
[0082] Since privacy information is stored in the bitstream in the form of private frames, processing of private frames (such as encryption) will not affect the playback of video frames. In addition, format conversion is more flexible and can support the encapsulation of multimedia data with privacy information into different standard formats such as PS, RTP, and MP4.
[0083] Step 104: Send the target code stream including the first encoded data and the third encoded data to the client device.
[0084] As an embodiment, the same timestamp may be added to the video frame obtained from the first encoded data and the private frame obtained from the third encoded data, and the private frame may be placed after the video frame in the target stream, which is then sent to the client device.
[0085] So far, completed Figure 1 The process shown.
[0086] pass Figure 1 As can be seen from the process shown, in the embodiment of the present application, the server device can process the hidden area and the non-hidden area of the original image separately, generate a first image corresponding to the non-hidden area, and a second image corresponding to the hidden area, and obtain first coded data by encoding the first image, and obtain third coded data by encoding and encrypting the second image, so as to prevent the second image carrying the privacy information in the hidden area from leaking the privacy information during the transmission process. At the same time, by sending the unencrypted first coded data to the client device, even if the client device cannot decrypt the third coded data, it can still play the picture of the code stream that obscures the hidden area through the first coded data.
[0087] The following describes another method embodiment for displaying an image on a client device provided by the present application. Figure 6 , Figure 6 This is a flow chart of another method for displaying an image provided by an embodiment of the present application. As an embodiment, Figure 6 The process shown can be applied to a client device, such as a terminal device.
[0088] like Figure 6 As shown, the process may include the following steps:
[0089] Step 601: Acquire first coded data and third coded data from a target code stream.
[0090] As an embodiment, when a user logs in to a client device and downloads a target stream from a server device, the first coded data and the third coded data can be obtained from the target stream according to the timestamps carried by each frame in the target stream.
[0091] Step 602: Decode the first coded data to obtain a first image corresponding to the non-hidden area in the original image.
[0092] As an embodiment, based on the fact that the first coded data sent by the server device is not encrypted, the first coded data can be directly decoded according to the video coding type parsed from the video frame encapsulating the first coded data, using a video decoding method corresponding to the video coding type, to obtain a first image corresponding to the non-hidden area in the original image (such as Figure 3 ).
[0093] Step 603: If the client device is allowed to display the hidden area in the original image, the third coded data is decrypted to obtain second coded data, and the second coded data is decoded to obtain a second image corresponding to the hidden area in the original image.
[0094] As an embodiment, if the client device supports the hidden area display function and obtains correct verification information, the client device may be allowed to display the hidden area in the original image.
[0095] In this embodiment, when a user needs to view a hidden area in an original image, the client device can be triggered to obtain verification information, which is used to determine whether the user has permission to view the hidden area. The client device can obtain the user's verification information by sending a verification request to an authentication server or sending a verification code request to a text message server based on the user's mobile phone number.
[0096] In this embodiment, after the user obtains and inputs the verification information into the specified location in the client, the client can be triggered to verify the obtained verification information. If the verification is successful, it is determined that the user has the permission to view the hidden area, and the client device is allowed to display the hidden area in the original image and display the original image obtained based on the first image and the second image (such as Figure 2 ), if the verification fails, it is determined that the user does not have the authority to view the hidden area, the client device is not allowed to display the hidden area in the original image, and the first image is displayed.
[0097] As another embodiment, if the client device does not support the hidden area display function, that is, the client device is a standard client device and cannot process the third encoded data, or the client device does not obtain the correct verification information (that is, the verification information verification fails in the above embodiment), then after the client device decodes the first encoded data to obtain the first image, it will display the first image and will not process the third encoded data.
[0098] The following describes the example in which the client device is allowed to display the hidden area in the original image to obtain the second image (eg, Figure 5 ) process is described as follows:
[0099] As an embodiment, in this embodiment, the third coded data is ciphertext. Therefore, to obtain the second image, the third coded data needs to be decrypted first.
[0100] In this embodiment, the masking information corresponding to the second image can be first parsed from the third coded data. Specifically, the masking information corresponding to the second image can be parsed from the private frame encapsulated with the third coded data by decapsulating the private frame.
[0101] Based on the fact that the masking information in this embodiment at least includes the video encoding type and encryption information, the client device can obtain a decryption key for decrypting the third encoded data from the server device based on the encryption information, and use the decryption key to decrypt the third encoded data to obtain the second encoded data, and then determine the target decoding method based on the video encoding type in the masking information. The target decoding method is a video decoding method corresponding to the video encoding method used when encoding the second image. The second encoded data can be decoded by this target decoding method to obtain the above-mentioned second image.
[0102] Step 604: Generate an original image based on the first image and the second image, and display the original image.
[0103] As an example, the masking information in this embodiment also includes hidden area information, which can be used to indicate the location of each hidden area in the second image. Using this hidden area information, the client device can parse the hidden area from the second image. Furthermore, since the second image and the first image have the same resolution in this embodiment, the hidden area information can also be used to determine the target location in the first image corresponding to the hidden area. The parsed hidden area can then be superimposed on the target location in the first image to obtain the original image.
[0104] Optionally, the parsed hidden area is superimposed on the target position in the first image, and the hidden sub-image corresponding to the hidden area can be extracted from the second image through cutout processing, and then the hidden sub-image is superimposed on the target position in the first image, or the second image can be directly superimposed on top of the first image, and the layers corresponding to other areas of the second image except the hidden area are made transparent to display the non-hidden areas in the first image through the transparent layer.
[0105] So far, completed Figure 6 The process shown.
[0106] pass Figure 6 It can be seen from the process shown that when the client device of the embodiment of the present application receives the first coded data and the third coded data, since the first coded data is not encrypted, the client device can directly decode the first coded data to obtain the first image. In this way, even if the client device does not support the display of hidden areas, the first image can be displayed normally. If the client device is allowed to display the hidden area in the original image, the client device can also obtain the second image according to the third coded data, generate the original image based on the first image and the second image, and display it.
[0107] The above completes the description of the method embodiment provided by the embodiment of the present application. The following describes the device embodiment provided by the embodiment of the present application.
[0108] See also Figure 7 , Figure 7 A schematic diagram of an image display device provided in an embodiment of the present application. As an embodiment, Figure 7 The apparatus shown can be applied to a server device.
[0109] The area determination unit 701 is configured to determine the hidden area and the non-hidden area in the original image when the original image is acquired.
[0110] The image generating unit 702 is configured to generate a first image corresponding to the non-hidden area and a second image corresponding to the hidden area.
[0111] The encoding unit 703 is used to encode the first image to obtain first encoded data corresponding to the first image, encode the second image to obtain second encoded data corresponding to the second image, and encrypt the second encoded data to obtain third encoded data.
[0112] The sending unit 704 is configured to send a target code stream including the first coded data and the third coded data to a client device.
[0113] A target code stream including the first encoded data and the third encoded data is sent to a client device.
[0114] Optionally, the image generating unit 702 generates a first image corresponding to the non-hidden area and generates a second image corresponding to the hidden area, including:
[0115] Filling the hidden area of the original image with a masking image to obtain the first image;
[0116] The hidden area of the original image is cut out to obtain a hidden sub-image corresponding to the hidden area, and the second image is generated based on the hidden sub-image; wherein the resolution of the second image is the same as the resolution of the original image, and the position of the hidden sub-image in the second image is the same as the position of the hidden sub-image in the original image.
[0117] Optionally, before the encoding unit 703 encrypts the second encoded data, the encoding unit 703 is further configured to:
[0118] Obtain masking information corresponding to the second image, and encapsulate the masking information in the third coded data; the masking information includes at least: video coding type, encryption information, and hidden area information.
[0119] So far, completed Figure 7 Description of the device shown.
[0120] See Figure 8 , Figure 8 This is a schematic diagram of another image display device provided in an embodiment of the present application. As an embodiment, Figure 8 The apparatus shown can be applied to a client device.
[0121] The acquiring unit 801 is configured to acquire first coded data and third coded data from a target code stream.
[0122] The decoding unit 802 is used to decode the first encoded data to obtain a first image corresponding to the non-hidden area in the original image; if the client device is allowed to display the hidden area in the original image, decrypt the third encoded data to obtain second encoded data, and decode the second encoded data to obtain a second image corresponding to the hidden area in the original image.
[0123] The image display unit 803 is configured to generate an original image based on the first image and the second image, and display the original image.
[0124] Optionally, the image display unit 803 is further configured to: display the first image if the client device is not allowed to display the hidden area in the original image;
[0125] Among them, if the client device does not support the hidden area display function, or the client device does not obtain correct verification information, the client device is not allowed to display the hidden area in the original image; if the client device supports the hidden area display function and the client device obtains correct verification information, the client device is allowed to display the hidden area in the original image.
[0126] Optionally, the decoding unit 802 decrypts the third coded data to obtain second coded data, and decodes the second coded data to obtain a second image corresponding to the hidden area in the original image, including:
[0127] Parsing mask information corresponding to the second image from the third encoded data, the mask information at least including: video encoding type and encryption information;
[0128] obtaining a decryption key for decrypting the third coded data based on the encryption information, and decrypting the third coded data according to the decryption key to obtain second coded data;
[0129] A target decoding mode is determined based on the video encoding type, and the second encoded data is decoded based on the target decoding mode to obtain the second image.
[0130] Optionally, the masking information further includes hidden area information;
[0131] The image display unit 803 generates an original image based on the first image and the second image, including:
[0132] A hidden area is parsed from the second image according to the hidden area information, and a target position corresponding to the hidden area is determined from the first image. The hidden area is superimposed on the target position of the first image to obtain the original image.
[0133] So far, completed Figure 8 Description of the device shown.
[0134] The following describes the system embodiment provided by the embodiment of the present application. Figure 9 , Figure 9 This is a schematic diagram of an image display system provided in an embodiment of the present application. The system includes at least one server device 901 and at least one client device 902.
[0135] The server device 901 is used to determine the hidden area and the non-hidden area in the original image when the original image is obtained; generate a first image corresponding to the non-hidden area, and generate a second image corresponding to the hidden area; encode the first image to obtain first encoded data corresponding to the first image, encode the second image to obtain second encoded data corresponding to the second image, and encrypt the second encoded data to obtain third encoded data; and send a target code stream including the first encoded data and the third encoded data to the client device.
[0136] The client device 902 is used to obtain first encoded data and third encoded data from the received target code stream; decode the first encoded data to obtain a first image corresponding to the non-hidden area in the original image; if the client device is allowed to display the hidden area in the original image, decrypt the third encoded data to obtain second encoded data, decode the second encoded data to obtain a second image corresponding to the hidden area in the original image; generate an original image based on the first image and the second image, and display the original image.
[0137] The implementation details in the above device embodiment and system embodiment can be referred to the description of the method embodiment and will not be repeated here.
[0138] Correspondingly, the embodiment of the present application also provides a hardware structure diagram of an electronic device, as shown in FIG. Figure 10 As shown, the electronic device may be a device for implementing the above-mentioned image display method. Figure 10 As shown, the hardware structure includes: a processor and a memory.
[0139] Wherein, the memory is used to store machine-executable instructions;
[0140] The processor is configured to read and execute the machine executable instructions stored in the memory to implement the corresponding image display method embodiment shown above.
[0141] As an embodiment, the memory can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the memory can be a volatile memory, a non-volatile memory, or a similar storage medium. Specifically, the memory can be RAM (Random Access Memory), flash memory, a storage drive (such as a hard disk drive), a solid-state drive, any type of storage disk (such as a CD, DVD, etc.), or a similar storage medium, or a combination thereof.
[0142] So far, completed Figure 10 Description of the electronic device shown.
[0143] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An image display method, characterized in that: Applied to server-side devices, including: When the original image is acquired, determining the hidden area and the non-hidden area in the original image; generating a first image corresponding to the non-hidden area and generating a second image corresponding to the hidden area; Encoding the first image to obtain first encoded data corresponding to the first image, and encapsulating the first encoded data in a first encoded data encapsulation manner to obtain a video frame; Obtaining masking information corresponding to the second image; the masking information includes at least: video encoding type and encryption information; encoding the second image based on the video encoding mode indicated by the video encoding type to obtain second encoded data corresponding to the second image, obtaining an encryption key based on the encryption information, and encrypting the second encoded data using the encryption key to obtain third encoded data; Encapsulating the third coded data and the masking information together using the first coded data encapsulation method to obtain a private frame; The same timestamp is added to the video frame and the private frame, and a target code stream including the video frame and the private frame is sent to a client device; the private frame is placed after the video frame in the target code stream.
2. The method according to claim 1, characterized in that The generating of the first image corresponding to the non-hidden area and the generating of the second image corresponding to the hidden area includes: Filling the hidden area of the original image with a masking image to obtain the first image; The hidden area of the original image is cut out to obtain a hidden sub-image corresponding to the hidden area, and the second image is generated based on the hidden sub-image; wherein the resolution of the second image is the same as the resolution of the original image, and the position of the hidden sub-image in the second image is the same as the position of the hidden sub-image in the original image.
3. The method according to claim 1, characterized in that The masking information also includes hidden area information.
4. An image display method, characterized in that: Applied to client devices, including: Obtaining, from the target bitstream, a video frame encapsulating the first coded data and a private frame encapsulating the third coded data and masking information corresponding to the second image, based on a timestamp carried by each frame in the target bitstream; the masking information including at least: a video coding type and encryption information; the video frame and the private frame being timestamped; and the private frame being placed after the video frame in the target bitstream. Parsing the first coded data from the video frame, decoding the first coded data, and obtaining a first image corresponding to a non-hidden area in the original image; Parsing the third encoded data and the masking information from the private frame; If the client device is allowed to display the hidden area in the original image, obtaining a decryption key for decrypting the third coded data based on the encryption information, decrypting the third coded data according to the decryption key to obtain second coded data, determining a target decoding mode based on the video encoding type, decoding the second coded data based on the target decoding mode to obtain a second image corresponding to the hidden area in the original image; An original image is generated based on the first image and the second image, and the original image is displayed.
5. The method according to claim 4, characterized in that The method further includes: if the client device is not allowed to display the hidden area in the original image, displaying the first image; Among them, if the client device does not support the hidden area display function, or the client device does not obtain correct verification information, the client device is not allowed to display the hidden area in the original image; if the client device supports the hidden area display function and the client device obtains correct verification information, the client device is allowed to display the hidden area in the original image.
6. The method according to claim 4, characterized in that The masking information also includes hidden area information; Generating an original image based on the first image and the second image includes: A hidden area is parsed from the second image according to the hidden area information, and a target position corresponding to the hidden area is determined from the first image. The hidden area is superimposed on the target position of the first image to obtain the original image.
7. An image display device, characterized in that: Applied to server-side devices, including: A region determining unit, configured to determine a hidden region and a non-hidden region in an original image when an original image is acquired; an image generating unit, configured to generate a first image corresponding to the non-hidden area and a second image corresponding to the hidden area; an encoding unit, configured to encode the first image to obtain first encoded data corresponding to the first image, and encapsulate the first encoded data in a first encoded data encapsulation manner to obtain a video frame; Obtaining masking information corresponding to the second image; the masking information includes at least: video encoding type and encryption information; encoding the second image based on the video encoding mode indicated by the video encoding type to obtain second encoded data corresponding to the second image, obtaining an encryption key based on the encryption information, and encrypting the second encoded data using the encryption key to obtain third encoded data; a sending unit, configured to encapsulate the third coded data and the masking information together by adopting the first coded data encapsulation method to obtain a private frame; The same timestamp is added to the video frame and the private frame, and a target code stream including the video frame and the private frame is sent to a client device; the private frame is placed after the video frame in the target code stream.
8. An image display device, characterized in that: Applicable to client devices, including: an acquisition unit, configured to acquire, from the target bitstream, a video frame encapsulating the first coded data and a private frame encapsulating the third coded data and masking information corresponding to the second image, based on a timestamp carried by each frame in the target bitstream; the masking information includes at least: a video coding type and encryption information; the video frame and the private frame are assigned the same timestamp; and the private frame is placed after the video frame in the target bitstream; a decoding unit configured to parse the first encoded data from the video frame, decode the first encoded data to obtain a first image corresponding to the non-hidden area in the original image; parse the third encoded data and the masking information from the private frame; if the client device is allowed to display the hidden area in the original image, obtain a decryption key for decrypting the third encoded data based on the encryption information, decrypt the third encoded data according to the decryption key to obtain second encoded data, determine a target decoding mode based on the video encoding type, and decode the second encoded data based on the target decoding mode to obtain a second image corresponding to the hidden area in the original image; An image display unit is configured to generate an original image based on the first image and the second image, and display the original image.
9. An image display system, characterized in that: The system includes at least one server device and at least one client device; The server device is configured to, upon acquiring an original image, determine a hidden area and a non-hidden area in the original image; generate a first image corresponding to the non-hidden area, and generate a second image corresponding to the hidden area; encode the first image to obtain first encoded data corresponding to the first image, and encapsulate the first encoded data using a first encoded data encapsulation method to obtain a video frame; Acquiring shielding information corresponding to the second image; The masking information includes at least: a video encoding type and encryption information; encoding the second image based on the video encoding method indicated by the video encoding type to obtain second encoded data corresponding to the second image, obtaining an encryption key based on the encryption information, and encrypting the second encoded data using the encryption key to obtain third encoded data; encapsulating the third encoded data and the masking information together using the first encoded data encapsulation method to obtain a private frame; adding the same timestamp to the video frame and the private frame, and sending a target code stream including the video frame and the private frame to the client device; the private frame is placed after the video frame in the target code stream; The client device is configured to obtain, from a received target code stream, a video frame encapsulating first coded data and a private frame encapsulating third coded data and masking information corresponding to a second image, based on timestamps carried by each frame in the target code stream; the masking information includes at least: a video coding type and encryption information; the video frame and the private frame are timestamped; and the private frame is placed after the video frame in the target code stream; parse the first coded data from the video frame, decode the first coded data to obtain a first image corresponding to a non-hidden area in the original image; parse the third coded data and the masking information from the private frame; if the client device is allowed to display the hidden area in the original image, obtain a decryption key for decrypting the third coded data based on the encryption information, decrypt the third coded data based on the decryption key to obtain second coded data, determine a target decoding mode based on the video coding type, decode the second coded data based on the target decoding mode to obtain a second image corresponding to the hidden area in the original image; generate an original image based on the first image and the second image, and display the original image.
10. An electronic device, characterized in that: The electronic device includes: a processor and a memory; The memory is used to store machine-executable instructions; The processor is configured to read and execute the machine-executable instructions stored in the memory to implement the method according to any one of claims 1 to 3 or the method according to any one of claims 4 to 6.
Citation Information
Patent Citations
Coding and decoding and device
CN108965882A
An encoding / decoding method, apparatus, and electronic device
CN113453012A