WO2020135038A1 - Image processing method, electronic apparatus, and computer readable medium - Google Patents
Image processing method, electronic apparatus, and computer readable medium Download PDFInfo
- Publication number
- WO2020135038A1 WO2020135038A1 PCT/CN2019/124490 CN2019124490W WO2020135038A1 WO 2020135038 A1 WO2020135038 A1 WO 2020135038A1 CN 2019124490 W CN2019124490 W CN 2019124490W WO 2020135038 A1 WO2020135038 A1 WO 2020135038A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- matrix
- identification information
- host application
- user
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/604—Tools and structures for managing or administering access control systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2141—Access rights, e.g. capability lists, access control lists, access tables, access matrices
Definitions
- the embodiments of the present disclosure relate to the field of computer technology, and in particular, to methods for processing images, electronic devices, and computer-readable media.
- some applications or individuals may use the permissions provided by other applications to grab a large number of users' private pictures.
- the present disclosure proposes a method for processing an image, an electronic device, and a computer-readable medium.
- an embodiment of the present disclosure provides a method for processing an image.
- the method is used on a device side.
- the method includes: acquiring identification information of an object requesting to use the first image; acquiring a first corresponding to the first image An image matrix; based on the identification information, the elements in the matrix area that meets the predetermined conditions in the first image matrix are changed to obtain a second image matrix; based on the second image matrix, a second image for providing an object is generated, wherein The visual effects of the second image and the first image are similar, and the second image has the function of determining the identification information of the object.
- an embodiment of the present disclosure provides an electronic device for processing images, including: one or more processors; a storage device, on which one or more programs are stored, when the above one or more programs.
- the execution by the one or more processors described above causes the one or more processors to implement the method of any of the embodiments as described above for processing images.
- an embodiment of the present disclosure provides a computer-readable medium for processing an image, on which a computer program is stored, and when the program is executed by a processor, any of the above methods for processing an image is implemented Examples of methods.
- the method, electronic device, and computer-readable medium for processing an image obtain the first image matrix corresponding to the first image by acquiring the identification information of the object requesting to use the first image, and then, Based on the identification information, the elements in the matrix area that meets the predetermined conditions in the first image matrix are changed to obtain a second image matrix, and finally, based on the second image matrix, a second image for providing the object is generated, wherein the second image Similar to the visual effect of the first image, and the second image has the function of determining the identification information of the object, by processing the first image requested by the object, the second function with the identification information of the object is obtained Image, and use the second image to replace the first image to return to the above object.
- the second image can determine the object requesting to use the first image, which helps reduce the probability of illegal use of the image and reduces the user’s privacy image.
- the risk of being used illegally guarantees the user's information security to a certain extent, enriches the diversity of image processing, and because the visual effect of the second image is similar to the first image, it can be used without affecting the normal use of the image
- the logo used to lock the image user in the image is hidden, reducing the probability that the user who violates the image finds the logo in the image and erases the logo, and the solution of the above embodiment of the present application can increase the difficulty of erasing the logo .
- FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;
- FIG. 2 is a flowchart of one embodiment of a method for processing images according to the present disclosure
- FIG. 3 is a schematic diagram of an application scenario of a method for processing images according to the present disclosure
- FIG. 4 is a flowchart of still another embodiment of a method for processing images according to the present disclosure.
- FIGS. 5A to 5C are schematic diagrams of still another application scenario of the method for processing images according to the present disclosure.
- FIG. 6 is a schematic structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure.
- FIG. 1 shows an exemplary system architecture 100 of an embodiment of a method for processing an image to which embodiments of the present disclosure can be applied.
- the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105.
- the network 104 is a medium used to provide a communication link between the terminal devices 101, 102, 103 and the server 105.
- the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
- the user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, and so on.
- Various communication client applications such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social platform software, can be installed on the terminal devices 101, 102, and 103.
- the client application installed on the terminal devices 101, 102, and 103 may be a host application, and a boarding application may be run thereon.
- the host application can obtain the user information of the host application, such as images and videos, through the host application.
- the host application can perform rights management on various operations of the host application to allow or prohibit the corresponding operation of the host application.
- the terminal devices 101, 102, and 103 may be hardware or software.
- the terminal devices 101, 102, and 103 are hardware, they may be various electronic devices that have a display screen and support the installation and operation of applications, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc. .
- the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or as a single software or software module. There is no specific limitation here.
- the terminal device may also be called a terminal.
- the server 105 may be a server that provides various services, for example, a background server that supports applications installed on the terminal devices 101, 102, and 103.
- the background server may perform analysis and other processing on the received application request and other data, and feed back the processing result (for example, the second image) to the terminal device.
- the server can also be called a server.
- the server can be hardware or software.
- the server can be implemented as a distributed server cluster composed of multiple servers, or as a single server.
- the server is software, it may be implemented as multiple software or software modules (for example, software or software modules for providing distributed services), or as a single software or software module. There is no specific limitation here.
- the method for processing images provided by the embodiments of the present disclosure may be executed by the server 105, or may be executed by the terminal devices 101, 102, and 103.
- terminal devices, networks, and servers in FIG. 1 are only schematic. According to the implementation needs, there can be any number of terminal devices, networks and servers.
- the method for processing images includes the following steps:
- Step 201 Obtain identification information of an object requesting to use the first image.
- the execution subject of the method for processing images may be connected from other electronic devices through a wired or wireless connection, or locally Obtain the identification information of the object requesting to use the first image.
- the above-mentioned first image may be various images stored in a local electronic device, or images stored on a device communicatively connected to the local electronic device.
- the first image may include at least one of the following: an image stored by a terminal running a host application, an image stored by a server supporting the host application, and an image released by a user through the host application , The avatar used by the user on the host application, the image sent by the user through the host application, and the video frames included in the video posted or sent by the user through the host application.
- an application may be installed on the terminal, the application may be a host application, and a host application may be run on the host application.
- the host application can obtain the user information of the host application, such as images and videos, through the host application.
- the host application can manage various operation rights of the host application to allow or prohibit the corresponding operation of the host application.
- the above-mentioned corresponding operations may include, but are not limited to: starting, running, reading the information sent or published by the user through the host application, and so on.
- the user of the host application can often run the host application of the host application through the terminal device while the host application is running.
- An example of a boarding application may be an applet, for example.
- the above-mentioned execution subject may obtain the identification information of the object requesting the use of the first image from the terminal (ie, terminal device) installed with the application it supports (for example, the above-mentioned host application); In the case where the above-mentioned execution subject is a terminal device, it may locally obtain identification information of the object requesting to use the first image.
- the terminal ie, terminal device
- the above-mentioned execution subject is a terminal device
- it may locally obtain identification information of the object requesting to use the first image.
- the object requesting to use the first image may be various applications (such as plug-ins, boarding applications, etc.) or devices that request the use of the first image through the above-mentioned execution subject.
- the object requesting to use the first image may be a host application of the host application corresponding to the execution subject.
- the host application corresponding to the execution subject may be the host application it supports; when the execution subject is a terminal device, the host application corresponding to the execution subject may be installed by it Host application.
- the object requesting the use of the first image may also be a program requesting the use of the first image, or a device running the program.
- the identification information of the above object may be used to identify the object, and the identification information of the object has a one-to-one correspondence with the object.
- the identification information can be characterized by various characters. Exemplarily, the above characters may be numbers, letters, or other symbols, such as graphic symbols.
- the above-mentioned execution subject when the above-mentioned execution subject is a terminal device, it may locally obtain identification information of an object requesting to use the first image.
- the above-mentioned execution subject when the above-mentioned execution subject is a server, it may acquire identification information of an object requesting to use the first image from a terminal communicatively connected thereto.
- Step 202 Acquire a first image matrix corresponding to the first image.
- the execution subject may obtain the first image matrix corresponding to the first image.
- the first image matrix corresponding to the first image may be a frequency domain matrix of the first image, a color matrix of the first image, or a matrix obtained according to other image matrix determination methods.
- the operation of acquiring the first image may be performed by the terminal or the server.
- the operation of acquiring the first image matrix corresponding to the first image may also be performed by the terminal or the server.
- the same device is the above-mentioned execution subject, which can acquire the first image first, and then Determine the first image matrix corresponding to the first image, and then obtain the first image matrix corresponding to the first image locally.
- the above-mentioned execution subject may perform the operation of acquiring the first image from the communication connected to it.
- the device acquires the first image matrix corresponding to the first image; it may also first acquire the first image from the device connected to it that performs the operation of acquiring the first image, and then determine the first image matrix corresponding to the first image, and then The first image matrix corresponding to the first image is obtained locally.
- step 203 based on the identification information, the elements in the matrix area that meets the predetermined conditions in the first image matrix are changed to obtain the second image matrix.
- the above-mentioned execution subject may change the elements in the matrix region that meets the predetermined conditions in the first image matrix acquired in step 202 to obtain a second image matrix.
- the predetermined condition may be various predetermined conditions, and the predetermined condition may be used to determine the matrix area from the first image matrix.
- the above-mentioned predetermined condition may be “element located at a predetermined position in the matrix area”, for example, the 100th to 200th element located in the matrix area.
- the first image matrix includes a frequency domain matrix of the first image.
- the matrix area in the first image matrix that meets the predetermined condition includes: the intermediate frequency and/or high frequency matrix area in the first image matrix.
- the above-mentioned execution subject or the electronic device communicatively connected to it may use Fourier transform, discrete cosine transform and other methods to process the first image to obtain the frequency domain matrix of the first image.
- the determination method for the above-mentioned intermediate frequency and/or high frequency region may include but is not limited to any one of the following:
- Method 1 Determine based on the preset frequency domain range. For example, the above-mentioned execution subject may determine the area where the element whose frequency in the first image matrix is within a preset frequency domain is located as the intermediate frequency and/or high frequency matrix area.
- Method 2 Determine based on the frequency distribution of the image.
- the above-mentioned execution subject may determine an image area for indicating the edge of the image according to the frequency domain distribution of the image, and determine the determined image area as an intermediate frequency and/or high frequency matrix area.
- mid-frequency and/or high-frequency matrix regions of an image can generally characterize the noise and details of the image.
- the execution subject may first determine the character string of the identification information.
- the above characteristic character string is a character string for characterizing the identification information.
- the characteristic character string of the identification information may be a result obtained by encrypting and encoding the identification information.
- the execution subject may use characters in the character string to replace (ie, change) elements in the intermediate frequency and/or high frequency matrix region in the first image matrix, and determine the replacement result as the second image matrix.
- the above-mentioned executive body may also use identification information to change elements in the intermediate frequency and/or high-frequency matrix area in the first image matrix, and determine the change result as the second image matrix.
- identification information is the unique identifier of the host application on the host application (for example, 123456)
- the above-mentioned executive body can directly replace the intermediate frequency and/or high frequency in the first image matrix with identification information (for example, 123456).
- the elements in the frequency matrix area determine the result as the second image matrix.
- the first image matrix includes the color matrix of the first image.
- the matrix area in the first image matrix that meets the predetermined condition includes: a matrix area in the color matrix that has a changed effect on visual effects less than a preset configuration.
- the aforementioned visual effect may refer to the visual effect observed by the human eye.
- the human eye cannot usually distinguish them.
- the similarity between corresponding images before and after the matrix region that has an influence on the visual effect less than the preset configuration may be greater than the preset similarity threshold.
- the first image is composed of pixels, and each pixel can be characterized by a red, green, and blue color value.
- the above-mentioned execution subject or an electronic device communicatively connected thereto can determine the color matrix of the first image.
- the execution subject may first determine the character string of the identification information.
- the above characteristic character string is a character string for characterizing the identification information.
- the characteristic character string of the identification information may be a result obtained by encrypting and encoding the identification information.
- the above-mentioned execution subject may use characters in the character string to replace (ie, change) the elements in the matrix area of the color matrix in the first image matrix after the change has less influence on the visual effect than the preset configuration.
- the replacement result is determined to be the second image matrix.
- the above-mentioned executive body may also use the identification information to change the elements in the matrix area of the color matrix in the first image matrix that have changed visual effects less than the preset configuration, and determine the change result as the first Two image matrix.
- the above identification information is the unique identifier of the host application on the host application (for example, 123456)
- the above-mentioned executive body can directly replace the changed in the color matrix in the first image matrix with identification information (for example, 123456) After that, the influence on the visual effect is smaller than the element in the matrix region of the preset configuration, and the result is determined as the second image matrix.
- Step 204 Based on the second image matrix, generate a second image for providing to the object.
- the execution subject may generate a second image for providing the object based on the second image matrix.
- the second image is similar to the first image in visual effect, and the second image has the function of determining the identification information of the object.
- the identification information of the object is not visible in visual effects, so as to reduce the possibility that the object finds that the second image contains information for determining its identification information.
- the above-mentioned execution subject may perform inverse Fourier transform on the second image matrix, and determine the transform result as The second image provided to the above object.
- the above-mentioned execution subject may perform inverse discrete cosine transform on the second image matrix to determine the transform result as Used to provide a second image of the above object.
- the visual effect of the second image is similar to that of the first image, so that the human eye cannot distinguish the difference between the first image and the second image. Therefore, replacing the first image with the second image usually does not affect the above objects usage of.
- the second image since the second image has the function of determining the identification information of the object, the above-mentioned execution subject can determine the object using the second image by determining the identification information included in the second image, and thus, the above-mentioned execution subject is determined In the case of a violation of the use of a second image, it can track the object with the illegal operation through the identification information determined according to the second image, and can restrict the authority of the object based on this to protect the user's information security.
- the object requesting to use the first image includes a host application.
- the acquisition of the first image depends on the host application of the hosting application.
- the operation of the host application depends on the host application.
- the host application will have the right to access the image, video, etc. of the user of the host application. It is often difficult for the host application to supervise the host application operator. The host application operator may use the permissions provided by the host application to capture a large number of users' private pictures on the host application. Therefore, with the solution described in this optional implementation, the identification information of the host application can be hidden in the picture information it reads (ie, the first image matrix corresponding to the first image), thereby providing a An effective information tracking method helps reduce the probability of illegal use of images, reduces the risk of illegal use of user privacy images, and protects the user's information security to a certain extent.
- the identification information of the object requesting to use the first image is the identification information of the boarding application requesting to use the first image, that is, the above object may be a boarding application.
- the above execution subject can also perform the following steps:
- the host application requests the host application to provide the first image.
- the host application may first request the host application to provide the first image.
- the host application acquires the first image in response to the request of the host application.
- the host application may acquire the first image, and then the above-mentioned execution subject may acquire the first image through the host application.
- the above-mentioned execution subject is a server
- the above-mentioned execution subject may directly obtain the first image locally.
- the boarding application can provide the identification information of the first image to the execution subject through the terminal device, so that the execution subject obtains the first image locally; if the first image is stored in the terminal device, the execution subject can Acquire the first image from the terminal device.
- the boarding application may provide the above-mentioned executing body with the identification information of the first image, or the first image, through the terminal device, so that the above-mentioned executing body obtains the first image from the terminal device.
- the above-mentioned execution subject is a terminal device
- the above-mentioned execution subject may directly obtain the first image locally.
- the boarding application may provide the identification information of the first image to the above-mentioned execution subject (eg, terminal device), so that the above-mentioned execution subject obtains the first image locally; if the first image is stored in the server, then the above-mentioned execution subject The first image can be acquired from the server.
- the above-mentioned execution subject may provide the identification information of the first image to the server, so that the above-mentioned execution subject obtains the first image from the server.
- the request of the boarding application may include the identification information of the first image, or the first image.
- the execution subject may acquire the first image after receiving the authorization information of the user.
- the authorization information may be used to instruct the user to allow the above-mentioned execution subject to acquire the first image.
- the above-mentioned execution subject can also control the host application to provide the second image to the host application after generating the second image.
- the second image may be processed and generated by the terminal device (eg, through a host application installed on the terminal device), or may be processed and generated by the server.
- the above-mentioned execution subject can provide the second image to the boarding application instead of providing the first image to the boarding application, so that the use can be determined by determining the identification information included in the second image
- the object of the second image therefore, in the case where the above-mentioned execution subject determines a violation of the use of a second image, it can track the object with the violation operation through the identification information determined according to the second image, and can be based on this Limit the authority of the object to protect the user's information security.
- this method is used for the server (that is, the above-mentioned execution subject is the server), and before the server acquires the first image, the host application presents an authorization request to read the first image.
- the authorization request may be used to determine whether the user allows the host application to use the first image.
- the step of acquiring the first image by the server may include: acquiring the first image in response to receiving the permission of the user from the terminal device for the authorization request.
- receiving the user's permission for the authorization request may indicate that the user allows the host application to use the first image.
- Failure to receive, or failure to receive the user's permission for the authorization request within a predetermined time may indicate that the user does not allow the host application to use the first image.
- the first image can be obtained when the user's permission for the authorization request is received, so that the user's wishes can be known, and thus whether or not the user's wishes can be determined according to the wishes of different users Acquire the first image, and whether to return the second image to the boarding application for its subsequent use. In this way, the security of user information can be further improved.
- the first image comes from the user, and the above-mentioned execution subject may also perform this step 203 according to the following steps:
- the mark character string has the function of determining the identification information of the object and the identification information of the user.
- the above-mentioned execution subject may splice the identification information of the object and the identification information of the user to obtain a tag string.
- the above-mentioned execution subject may first splice the identification information of the object and the identification information of the user, and then encrypt and/or encode the splicing result to obtain a tag string.
- the above-mentioned execution subject may also generate a tag character string based on the current time, the user's identification information, and the identification information of the boarding application. For example, the above-mentioned execution subject may determine the result of the stitching of the information characterizing the current time, the user's identification information and the homestay application's identification information as a tag string; or the current time, the user's identification information and the homestay application's identification information The result of the stitching is encoded and/or encrypted to obtain the tag string.
- the above-mentioned current time may be the time when the user's authorization request is received, the time when the identification information of the object is obtained, or the time when the user's identification information is obtained.
- the characters in the mark character string are used to replace the elements in the matrix area that meets the predetermined condition in the first image matrix to obtain the second image matrix.
- the above-mentioned first image may include an image posted by the user through the host application; may include an avatar used by the user on the host application; may include an image sent by the user through the host application; or may include a user publish or send through the host application
- the video includes video frames.
- the second image can not only determine the object using the second image, but also determine from which the first image corresponding to the second image comes from user.
- the above-mentioned execution subject may perform the above step 202 in the following manner: perform frequency domain transformation on the first image, and obtain a frequency domain matrix of the first image as the first image matrix.
- the above frequency domain transform may include but not limited to at least one of the following: Fourier transform, discrete cosine transform, wavelet transform, etc.
- the above-mentioned execution subject may perform the above-mentioned step 204 in the following manner: performing inverse transform of the frequency domain transform on the second image matrix to obtain the second image.
- the above-mentioned execution subject may further perform the following steps:
- the third image of the usage violation may include, but is not limited to, at least one of the following: an image sent to a predetermined violation account, an image determined by the user to violate the usage, and so on.
- technicians can determine the conditions for judging whether the image is in violation of the regulations according to actual needs, which is not limited here.
- the third image may be any image that violates regulations. Therefore, the third image may or may not be the second image; the above-mentioned execution subject may be able to extract the identification information from the third image, or may not be able to extract the identification information from the third image. Therefore, the above-mentioned execution subject may try to extract the identification information from the third image.
- the corresponding authority of the object corresponding to the extracted identification information is closed or instructed to be closed.
- the corresponding permission may be one or more of all the permissions possessed by the object.
- the above-mentioned corresponding authority may include an activation authority.
- the execution subject can instruct the terminal device to close the corresponding authority of the object corresponding to the extracted identification information; if the execution subject is a terminal device, then the execution subject can close the proposed The corresponding authority of the object corresponding to the extracted identification information.
- the corresponding authority includes the authority to acquire the first image.
- the above-mentioned object includes a host application.
- This method is used for a terminal (that is, the above-mentioned execution subject is a terminal device). Based on this, this step may include the following sub-steps for closing the corresponding authority of the object corresponding to the extracted identification information:
- the host application of the hosting application presents security prompt information.
- the security prompt information is used to prompt the host application for illegal use of the image provided by the host application.
- the user closes the corresponding permission of the host application.
- the permission limitation operation may be various operations predetermined to limit the corresponding permissions of the host application.
- the permission limitation operation may include but not limited to at least one of the following: click a preset button and input a preset voice. Wherein, the above-mentioned preset button and the above-mentioned preset voice can be used to trigger the corresponding permission to close the boarding application.
- the above-mentioned execution subject may By closing or instructing to close the corresponding authority of the object corresponding to the extracted identification information (for example, the authority to acquire the first image), its operation is restricted, thereby reducing the probability of illegal use of the image, and ensuring the user's information security the goal of.
- this step may include the following sub-steps:
- the above-mentioned execution subject may obtain the third image matrix of the third image in a similar manner to the above-mentioned step 202, which will not be repeated here.
- sub-step two the elements of the matrix region that meets the predetermined condition in the third image matrix are extracted.
- the above-mentioned execution subject may determine the elements of the matrix area that meet the above-mentioned predetermined conditions from the third image matrix in a manner corresponding to the above-mentioned step 203, which will not be repeated here. Then, the elements of the matrix area that meets the predetermined conditions in the third image matrix are extracted.
- sub-step three try to identify the identification information of the object based on the extracted elements.
- the above-mentioned execution subject may try to identify the identification information of the object based on the extracted elements. Since the third image may be the second image or not, the identification information may be extracted from the third image, or the identification information may not be extracted from the third image. Therefore, the above-mentioned execution subject may try to identify the identification information of the object based on the extracted elements.
- the third image can be determined to be the second image, in other words, the third image is through the above steps 201 to step Generated by 204, which may indicate that the object identified by the identified identification information has a violation, and further, the above-mentioned execution subject may close or instruct to close the corresponding authority of the object corresponding to the extracted identification information (for example, the first image Get permission) to limit its operation, so as to reduce the probability of illegal use of the image, and to protect the user's information security.
- the corresponding authority of the object corresponding to the extracted identification information for example, the first image Get permission
- FIG. 3 is a schematic diagram of an application scenario of the method for processing an image according to this embodiment.
- an object for example, a boarding application
- the first image 3003 for example, an image released by a host application of the above-mentioned boarding application installed by the user through the terminal device 301.
- the terminal device 301 sends information 3001 to the server 302: an object whose identification information is "1234" requests to use the first image.
- the server 302 acquires the identification information 3002 of the object requesting to use the first image (3002 is a number used to refer to the identification information, and the illustration 1234 represents the characters of the identification information).
- the server 302 acquires the first image matrix 3004 corresponding to the first image 3003 (for example, the frequency domain matrix obtained by performing frequency domain transformation on the first image 3003). Then, based on the identification information 3002, the server 302 changes the elements in the matrix area (for example, the matrix area 30040 in FIG. 3) in the first image matrix 3004 that meets the predetermined condition to obtain the second image matrix 3005. Finally, the terminal device 301 generates a second image 3006 for providing to the subject based on the second image matrix 3005.
- the second image 3006 and the first image 3003 have similar visual effects, and the second image 3006 has a function of determining the identification information 3002 of the object.
- the method provided by the above embodiment of the present disclosure obtains the identification information of the object requesting to use the first image by acquiring the first image matrix corresponding to the first image, and then, based on the identification information, changes the first image matrix to meet the predetermined Elements in the conditional matrix area to obtain a second image matrix, and finally, based on the second image matrix, generate a second image for providing to the object, wherein the second image has a similar visual effect to the first image, and the second The image has the function of determining the identification information of the object, thereby obtaining a second image having the function of determining the identification information of the object, and using the second image instead of the first image to return to the above object, so that the request can be determined by the second image
- the object using the first image helps to reduce the probability of illegal use of the image, reduces the risk of illegal use of the user's private image, guarantees the user's information security to a certain extent, and enriches the diversity of image processing, and, Since the visual effect of the second image is similar to the first
- FIG. 4 shows a flow 400 of yet another embodiment of a method for processing images.
- the flow 400 of the method for processing images includes the following steps:
- Step 401 Receive an image use request from a terminal.
- the execution subject of the method for processing images can receive the image use request from the terminal.
- the image use request is used to request the use of the first image for the host application.
- the host application requests the host application to provide the first image in response to the trigger of reading the first image.
- the above terminal may be communicatively connected with the above execution subject.
- a host application of the above boarding application may be installed on the above terminal.
- the host application acquires the first image, and depends on the host application of the host application, the operation of the host application depends on the host application. Therefore, the host application can manage various operation rights of the host application to allow or The corresponding operation of the boarding application is prohibited.
- the first image may include at least one of the following: an image posted by the user through the host application, an avatar used by the user on the host application, an image sent by the user through the host application, and a video posted or sent by the user through the host application.
- Video frame may include at least one of the following: an image posted by the user through the host application, an avatar used by the user on the host application, an image sent by the user through the host application, and a video posted or sent by the user through the host application.
- Step 402 based on the image use request, obtain the identification information of the boarding application.
- the execution subject may obtain the identification information of the host application based on the image use request received in step 401.
- the image use request may include identification information of the boarding application, and therefore, the above-mentioned execution subject may obtain the identification information of the boarding application included in the image use request.
- the above-mentioned execution subject may first determine the host application indicated by the image use request and request the use of the first image, and then determine the identification information of the host application, To obtain the identification information of the boarding application.
- Step 403 Acquire the first image based on the image use request.
- the above-mentioned execution subject may acquire the first image indicated by the image use request based on the image use request received in step 401.
- Step 404 In response to receiving the user's permission for the authorization request, perform frequency domain transformation on the first image to obtain a frequency domain matrix of the first image as the first image matrix.
- the above-mentioned execution subject may perform frequency domain transformation on the first image to obtain the frequency domain matrix of the first image as the first image matrix.
- the authorization request is presented by the host application, and the authorization request is used to request the user to authorize the reading of the first image.
- the above frequency domain transform may include, but is not limited to, at least one of the following: two-dimensional discrete Fourier transform, fast Fourier transform, discrete cosine transform, and so on.
- step 403 if in step 403, the first image is acquired in response to receiving the user's permission for the authorization request, then in step 404, after step 403 can be directly performed Perform frequency domain transformation on the first image to obtain the frequency domain matrix of the first image as the first image matrix. That is, step 403 is triggered instead of step 404 because the user's permission for the authorization request is received.
- Step 405 based on the identification information of the boarding application and the identification information of the user, generate a tag string.
- the above-mentioned execution subject may generate a tag character string based on the identification information of the boarding application and the identification information of the user.
- the mark character string has a function of determining the identification information of the host application and the identification information of the user.
- the above-mentioned execution subject may splice the identification information of the boarding application and the identification information of the user to obtain a tag string.
- the above-mentioned execution subject may first splice the identification information of the boarding application and the identification information of the user, and then encrypt and/or encode the splicing result to obtain a tag string.
- Step 406 Replace the elements in the mid-frequency and/or high-frequency matrix area in the first image matrix with the label character string to obtain the second image matrix.
- the above-mentioned execution subject may replace the elements in the mid-frequency and/or high-frequency matrix area in the first image matrix with the label character string to obtain the second image matrix.
- the determination method for the above-mentioned intermediate frequency and/or high frequency region may include but not limited to the following two:
- Method 1 Determine based on the preset frequency domain range. For example, the above-mentioned execution subject may determine the area where the element whose frequency in the first image matrix is within a preset frequency domain is located as the intermediate frequency and/or high frequency matrix area.
- Method 2 Determine based on the frequency distribution of the image.
- the above-mentioned execution subject may determine the image area for indicating the edge of the image as an intermediate frequency and/or high frequency matrix area.
- mid-frequency and/or high-frequency matrix regions of an image can generally characterize the noise and details of the image.
- Step 407 Perform inverse transform of the frequency domain transform on the second image matrix to obtain a second image.
- the execution subject may perform the inverse transform of the frequency domain transform on the second image matrix obtained in step 406 to obtain a second image.
- the second image is similar to the first image in visual effect, and the second image has a function of determining the identification information of the boarding application and the identification information of the user.
- the aforementioned visual effect may refer to the visual effect observed by the human eye. For the two images whose influence on the visual effect is smaller than the preset configuration, the human eye cannot usually distinguish them.
- step 408 the second image is provided to the boarding application.
- the above-mentioned execution subject may use a wired connection or a wireless connection to provide the second image to the boarding application.
- FIGS. 5A-5C illustrate schematic diagrams of another application scenario of the method for processing an image according to the present disclosure.
- the boarding application 1 starts to run. Then, try to obtain the first image of the user associated with the terminal device (for example, the image released by the user through the host application, the avatar used by the user on the host application, the image sent by the user through the host application, and the video posted or sent by the user through the host application Including the video frame, etc.), after the host application triggers the reading operation of the first image, as shown in FIG. 5B, the terminal device sends an image use request 501 to the server.
- the first image of the user associated with the terminal device for example, the image released by the user through the host application, the avatar used by the user on the host application, the image sent by the user through the host application, and the video posted or sent by the user through the host application Including the video frame, etc.
- the terminal device sends an image use request 501 to the server.
- the image use request 501 is used to request the use of the first image 502 for the boarding application 1.
- the server obtains the identification information 503 of the boarding application based on the image use request 501.
- the server obtains the first image 502 based on the image use request 501, and then performs frequency domain transformation (eg, discrete cosine transform) on the first image 502 to obtain the first image
- the frequency domain matrix is used as the first image matrix 505.
- the authorization request is presented by the host application, and the authorization request is used to request the user to authorize the reading of the first image 502.
- the server Based on the identification information 503 of the boarding application and the identification information 504 of the user, the server generates a label character string (for example, the result obtained by splicing, encrypting, and encoding the identification information 503 of the boarding application and the identification information 504 of the user), and then The elements in the mid-frequency and/or high-frequency matrix area 5050 in the first image matrix are replaced with label character strings to obtain a second image matrix 506.
- the server performs inverse transform of the frequency domain transform on the second image matrix 506 to obtain the second image 507, and provides the second image 507 to the boarding application (as shown in FIG. 5C, the server sends the second image to the terminal device 507 to provide the second image 507 to the boarding application 1).
- the second image is similar to the first image in visual effect, and the second image has a function of determining identification information of the boarding application.
- the flow 400 of the method for processing an image in this embodiment embodies the object requesting to use the first image as a boarding application. Therefore, instead of directly providing the first image to the boarding application, the solution described in this embodiment can provide the second image similar to the visual effect of the first image to the boarding application, thereby, without affecting the boarding application
- the solution described in this embodiment can provide the second image similar to the visual effect of the first image to the boarding application, thereby, without affecting the boarding application
- FIG. 6 shows a schematic structural diagram of a computer system 600 suitable for implementing an electronic device of an embodiment of the present disclosure.
- the electronic device shown in FIG. 6 is the executive body (ie, device side) used to implement the embodiment of the present disclosure.
- the electronic device shown in FIG. 6 is only an example, and should not respond to the functions and scope of the embodiments of the present disclosure Bring any restrictions.
- the computer system 600 includes a central processing unit (CPU) 601 that can be loaded into a random access memory (RAM) 603 from a program stored in a read-only memory (ROM) 602 or from a storage section 608 Instead, perform various appropriate actions and processing.
- RAM random access memory
- ROM read-only memory
- RAM storage section 608
- various programs and data necessary for the operation of the system 600 are also stored.
- the CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604.
- An input/output (I/O) interface 605 is also connected to the bus 604.
- the following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc. ; And a communication section 609 including a network interface card such as a LAN card, a modem, and the like. The communication section 609 performs communication processing via a network such as the Internet.
- the driver 610 is also connected to the I/O interface 605 as needed.
- a removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed on the drive 610 as needed, so that the computer program read out therefrom is installed into the storage section 608 as needed.
- the process described above with reference to the flowchart may be implemented as a computer software program.
- embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
- the computer program may be downloaded and installed from the network through the communication section 609, and/or installed from the removable medium 611.
- CPU central processing unit
- the computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
- the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
- the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
- a computer-readable signal medium may include a data signal that is propagated in baseband or as part of a carrier wave, in which computer-readable program code is carried. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. .
- the program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.
- the computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, the programming languages including object-oriented programming languages such as Python, Java, Smalltalk, C++, and Including conventional procedural programming languages-such as "C" language or similar programming languages.
- the program code may execute entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
- the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, through an Internet service provider Internet connection).
- LAN local area network
- WAN wide area network
- Internet service provider Internet connection for example, AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
- each block in the flowchart or block diagram may represent a module, program segment, or part of code that contains one or more logic functions Executable instructions.
- the functions noted in the block may occur out of the order noted in the figures. For example, two blocks represented in succession may actually be executed in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
- each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented with dedicated hardware-based systems that perform specified functions or operations Or, it can be realized by a combination of dedicated hardware and computer instructions.
- the present disclosure also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist alone without being assembled into the electronic device .
- the electronic device may be software or hardware.
- the electronic device When the electronic device is hardware, it may be various electronic devices, including but not limited to terminal devices, servers, and the like.
- the electronic device When the electronic device is software, it can be installed in the electronic device. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or as a single software or software module. There is no specific limitation here.
- the computer-readable medium carries one or more programs.
- the electronic device When the one or more programs are executed by the electronic device, the electronic device is caused to: acquire identification information of an object requesting to use the first image; acquire the corresponding image of the first image A first image matrix; based on the identification information, changing the elements in the matrix area that meets the predetermined conditions in the first image matrix to obtain a second image matrix; based on the second image matrix, generating a second image for providing to the object, wherein, The second image has a similar visual effect to the first image, and the second image has the function of determining the identification information of the object.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Bioethics (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Automation & Control Theory (AREA)
- Processing Or Creating Images (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
An image processing method, an electronic apparatus, and a computer readable medium. The method comprises: acquiring identification information of an object requesting to use a first image (201); acquiring a first image matrix corresponding to the first image (202); modifying, on the basis of the identification information, elements in a matrix region meeting a pre-determined condition in the first image matrix, and obtaining a second image matrix (203); and generating, on the basis of the second image matrix, a second image to be provided to the object (204). The invention processes the first image that the object requests to use, so as to obtain the second image having a function of determining the identification information of the object, and returns to the object the second image instead of the first image, thereby determining the object using the image by means of the second image, and reducing the probability of illegal image use.
Description
本公开的实施例涉及计算机技术领域,具体涉及用于处理图像的方法、电子设备和计算机可读介质。The embodiments of the present disclosure relate to the field of computer technology, and in particular, to methods for processing images, electronic devices, and computer-readable media.
随着互联网技术的发展,信息滥用盗用现象日益严重。目前,由于很多应用都与用户的最隐私宝贵的信息相关,在这种场景下,用户信息一旦被滥用,后果则将相当严重。With the development of Internet technology, the misuse and misappropriation of information is becoming more and more serious. At present, since many applications are related to users' most private and valuable information, in this scenario, once user information is abused, the consequences will be quite serious.
例如,一些应用或者个人,可能利用其他应用提供的权限,大量抓取用户的隐私图片。通常,对于抓取用户图片的应用或个人的监管难度非常大。For example, some applications or individuals may use the permissions provided by other applications to grab a large number of users' private pictures. Generally, it is very difficult to supervise applications or individuals that grab user pictures.
发明内容Summary of the invention
本公开提出了用于处理图像的方法、电子设备和计算机可读介质。The present disclosure proposes a method for processing an image, an electronic device, and a computer-readable medium.
第一方面,本公开的实施例提供了一种用于处理图像的方法,该方法用于设备端,该方法包括:获取请求使用第一图像的对象的标识信息;获取第一图像对应的第一图像矩阵;基于标识信息,变更第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵;基于第二图像矩阵,生成用于提供给对象的第二图像,其中,第二图像与第一图像的视觉效果相似,且第二图像具有确定对象的标识信息的功能。In a first aspect, an embodiment of the present disclosure provides a method for processing an image. The method is used on a device side. The method includes: acquiring identification information of an object requesting to use the first image; acquiring a first corresponding to the first image An image matrix; based on the identification information, the elements in the matrix area that meets the predetermined conditions in the first image matrix are changed to obtain a second image matrix; based on the second image matrix, a second image for providing an object is generated, wherein The visual effects of the second image and the first image are similar, and the second image has the function of determining the identification information of the object.
第二方面,本公开的实施例提供了一种用于处理图像的电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当上述一个或多个程序被上述一个或多个处理器执行,使得该一个或多个处理器实现如上述用于处理图像的方法中任一实施例的方法。In a second aspect, an embodiment of the present disclosure provides an electronic device for processing images, including: one or more processors; a storage device, on which one or more programs are stored, when the above one or more programs The execution by the one or more processors described above causes the one or more processors to implement the method of any of the embodiments as described above for processing images.
第三方面,本公开的实施例提供了一种用于处理图像的计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如上述用于处理图像的方 法中任一实施例的方法。In a third aspect, an embodiment of the present disclosure provides a computer-readable medium for processing an image, on which a computer program is stored, and when the program is executed by a processor, any of the above methods for processing an image is implemented Examples of methods.
本公开的实施例提供的用于处理图像的方法、电子设备和计算机可读介质,通过获取请求使用第一图像的对象的标识信息,然后,获取第一图像对应的第一图像矩阵,之后,基于标识信息,变更第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵,最后,基于第二图像矩阵,生成用于提供给对象的第二图像,其中,第二图像与第一图像的视觉效果相似,且第二图像具有确定对象的标识信息的功能,由此通过对对象所请求使用的第一图像进行处理,从而得到具有确定对象的标识信息的功能的第二图像,并采用第二图像来替代第一图像来返回给上述对象,这样,可以借助第二图像确定请求使用第一图像的对象,有助于降低图像被违规使用的概率,降低了用户隐私图像的被违规使用的风险,一定程度上保障了用户的信息安全,丰富了图像处理的多样性,并且,由于第二图像与第一图像的视觉效果相似,能够在不影响图像的正常使用的情况下,隐藏图像中用于锁定图像使用者的标识,降低了图像违规使用方因发现图像中的标识而抹去该标识的概率,且本申请上述实施例的方案能够提高抹去该标识的难度。The method, electronic device, and computer-readable medium for processing an image provided by an embodiment of the present disclosure obtain the first image matrix corresponding to the first image by acquiring the identification information of the object requesting to use the first image, and then, Based on the identification information, the elements in the matrix area that meets the predetermined conditions in the first image matrix are changed to obtain a second image matrix, and finally, based on the second image matrix, a second image for providing the object is generated, wherein the second image Similar to the visual effect of the first image, and the second image has the function of determining the identification information of the object, by processing the first image requested by the object, the second function with the identification information of the object is obtained Image, and use the second image to replace the first image to return to the above object. In this way, you can use the second image to determine the object requesting to use the first image, which helps reduce the probability of illegal use of the image and reduces the user’s privacy image. The risk of being used illegally guarantees the user's information security to a certain extent, enriches the diversity of image processing, and because the visual effect of the second image is similar to the first image, it can be used without affecting the normal use of the image Next, the logo used to lock the image user in the image is hidden, reducing the probability that the user who violates the image finds the logo in the image and erases the logo, and the solution of the above embodiment of the present application can increase the difficulty of erasing the logo .
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:By reading the detailed description of the non-limiting embodiments made with reference to the following drawings, other features, objects, and advantages of the present disclosure will become more apparent:
图1是本公开的一个实施例可以应用于其中的示例性***架构图;FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;
图2是根据本公开的用于处理图像的方法的一个实施例的流程图;2 is a flowchart of one embodiment of a method for processing images according to the present disclosure;
图3是根据本公开的用于处理图像的方法的一个应用场景的示意图;3 is a schematic diagram of an application scenario of a method for processing images according to the present disclosure;
图4是根据本公开的用于处理图像的方法的又一个实施例的流程图;4 is a flowchart of still another embodiment of a method for processing images according to the present disclosure;
图5A至图5C是根据本公开的用于处理图像的方法的又一个应用场景的示意图;5A to 5C are schematic diagrams of still another application scenario of the method for processing images according to the present disclosure;
图6是适于用来实现本公开的实施例的电子设备的计算机***的结构示意图。6 is a schematic structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure.
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The disclosure will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The disclosure will be described in detail below with reference to the drawings and in conjunction with the embodiments.
图1示出了可以应用本公开的实施例的用于处理图像的方法的实施例的示例性***架构100。FIG. 1 shows an exemplary system architecture 100 of an embodiment of a method for processing an image to which embodiments of the present disclosure can be applied.
如图1所示,***架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, and so on. Various communication client applications, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social platform software, can be installed on the terminal devices 101, 102, and 103.
在这里终端设备101、102、103上安装的客户端应用可以为宿主应用,其上可以运行有寄宿应用。寄宿应用可以通过宿主应用来获取宿主应用的用户的信息,例如图像,视频等。通常情况下,由于寄宿应用的运行依赖于宿主应用,因而,宿主应用可以对寄宿应用的各种操作进行权限管理,以允许或禁止寄宿应用的相应操作。Here, the client application installed on the terminal devices 101, 102, and 103 may be a host application, and a boarding application may be run thereon. The host application can obtain the user information of the host application, such as images and videos, through the host application. Generally, since the operation of the host application depends on the host application, the host application can perform rights management on various operations of the host application to allow or prohibit the corresponding operation of the host application.
终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏并且支持应用的安装和运行的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。在这里,终端设备也可称之为终端。The terminal devices 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they may be various electronic devices that have a display screen and support the installation and operation of applications, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc. . When the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or as a single software or software module. There is no specific limitation here. Here, the terminal device may also be called a terminal.
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103 上安装的应用提供支持的后台服务器。后台服务器可以对接收到的应用请求等数据进行分析等处理,并将处理结果(例如第二图像)反馈给终端设备。在这里,服务器也可称之为服务端。The server 105 may be a server that provides various services, for example, a background server that supports applications installed on the terminal devices 101, 102, and 103. The background server may perform analysis and other processing on the received application request and other data, and feed back the processing result (for example, the second image) to the terminal device. Here, the server can also be called a server.
需要说明的是,服务器可以是硬件,也可以是软件。当服务器为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server is software, it may be implemented as multiple software or software modules (for example, software or software modules for providing distributed services), or as a single software or software module. There is no specific limitation here.
需要说明的是,本公开的实施例所提供的用于处理图像的方法可以由服务器105执行,也可以由终端设备101、102、103执行。It should be noted that the method for processing images provided by the embodiments of the present disclosure may be executed by the server 105, or may be executed by the terminal devices 101, 102, and 103.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks, and servers in FIG. 1 are only schematic. According to the implementation needs, there can be any number of terminal devices, networks and servers.
继续参考图2,示出了根据本公开的用于理图像的方法的一个实施例的流程200。该用于处理图像的方法,包括以下步骤:With continued reference to FIG. 2, a flow 200 of one embodiment of a method for managing images according to the present disclosure is shown. The method for processing images includes the following steps:
步骤201,获取请求使用第一图像的对象的标识信息。Step 201: Obtain identification information of an object requesting to use the first image.
在本实施例中,用于处理图像的方法的执行主体(如设备端,更具体地例如图1所示的服务器或终端设备)可以通过有线连接方式或者无线连接方式从其他电子设备,或者本地获取请求使用第一图像的对象的标识信息。In this embodiment, the execution subject of the method for processing images (such as the device side, more specifically, for example, the server or terminal device shown in FIG. 1) may be connected from other electronic devices through a wired or wireless connection, or locally Obtain the identification information of the object requesting to use the first image.
在本实施例中,上述第一图像可以是各种存储于本地的电子设备,或者,存储于与本地的电子设备通信连接的设备上的图像。In this embodiment, the above-mentioned first image may be various images stored in a local electronic device, or images stored on a device communicatively connected to the local electronic device.
在本实施例的一些可选的实现方式中,第一图像可以包括以下至少一项:运行有宿主应用的终端存储的图像,支持宿主应用的服务端存储的图像,用户通过宿主应用发布的图像,用户在宿主应用上使用的头像,用户通过宿主应用发送的图像,用户通过宿主应用发布或发送的视频包括的视频帧。In some optional implementations of this embodiment, the first image may include at least one of the following: an image stored by a terminal running a host application, an image stored by a server supporting the host application, and an image released by a user through the host application , The avatar used by the user on the host application, the image sent by the user through the host application, and the video frames included in the video posted or sent by the user through the host application.
可以理解,通常,终端上可以安装有应用,该应用可以为宿主应用,宿主应用上可以运行有寄宿应用。寄宿应用可以通过宿主应用来获取宿主应用的用户的信息,例如图像,视频等。通常情况下,由于寄宿应用的运行依赖于宿主应用,因而,宿主应用可以对寄宿应用的各种操作权限进行管理,以允许或禁 止寄宿应用的相应操作。例如,上述相应操作可以包括但不限于:启动,运行,读取用户通过宿主应用发送或发布的信息的操作等等。宿主应用的用户,往往可以在该宿主应用运行的状态下,通过终端设备来运行该宿主应用的寄宿应用。寄宿应用的一个示例可以例如为小程序。It can be understood that, generally, an application may be installed on the terminal, the application may be a host application, and a host application may be run on the host application. The host application can obtain the user information of the host application, such as images and videos, through the host application. Normally, since the running of the host application depends on the host application, the host application can manage various operation rights of the host application to allow or prohibit the corresponding operation of the host application. For example, the above-mentioned corresponding operations may include, but are not limited to: starting, running, reading the information sent or published by the user through the host application, and so on. The user of the host application can often run the host application of the host application through the terminal device while the host application is running. An example of a boarding application may be an applet, for example.
在这里,在上述执行主体为服务器的情况下,其可以从安装有其所支持的应用(例如上述宿主应用)的终端(即终端设备),获取请求使用第一图像的对象的标识信息;在上述执行主体为终端设备的情况下,其可以从本地获取请求使用第一图像的对象的标识信息。Here, in the case where the above-mentioned execution subject is a server, it may obtain the identification information of the object requesting the use of the first image from the terminal (ie, terminal device) installed with the application it supports (for example, the above-mentioned host application); In the case where the above-mentioned execution subject is a terminal device, it may locally obtain identification information of the object requesting to use the first image.
在本实施例中,上述请求使用第一图像的对象,可以是各种通过上述执行主体来请求使用第一图像的应用(例如插件、寄宿应用等等)或者设备。In this embodiment, the object requesting to use the first image may be various applications (such as plug-ins, boarding applications, etc.) or devices that request the use of the first image through the above-mentioned execution subject.
作为示例,上述请求使用第一图像的对象可以是上述执行主体所对应的宿主应用的寄宿应用。在这里,当上述执行主体为服务器时,上述执行主体所对应的宿主应用可以是其所支持的宿主应用;当上述执行主体为终端设备时,上述执行主体所对应的宿主应用可以是其所安装的宿主应用。As an example, the object requesting to use the first image may be a host application of the host application corresponding to the execution subject. Here, when the execution subject is a server, the host application corresponding to the execution subject may be the host application it supports; when the execution subject is a terminal device, the host application corresponding to the execution subject may be installed by it Host application.
作为又一示例,上述请求使用第一图像的对象也可以是请求使用上述第一图像的程序,或者运行有上述程序的设备。As yet another example, the object requesting the use of the first image may also be a program requesting the use of the first image, or a device running the program.
在本实施例中,上述对象的标识信息可以用于标识该对象,对象的标识信息与对象具有一一对应的关系。标识信息可以通过各种字符来表征。示例性的,上述字符可以是数字、字母、或者其他符号,如图形符号等。In this embodiment, the identification information of the above object may be used to identify the object, and the identification information of the object has a one-to-one correspondence with the object. The identification information can be characterized by various characters. Exemplarily, the above characters may be numbers, letters, or other symbols, such as graphic symbols.
作为示例,当上述执行主体为终端设备时,其可以从本地获取请求使用第一图像的对象的标识信息。当上述执行主体为服务器时,其可以从与其通信连接的终端获取请求使用第一图像的对象的标识信息。As an example, when the above-mentioned execution subject is a terminal device, it may locally obtain identification information of an object requesting to use the first image. When the above-mentioned execution subject is a server, it may acquire identification information of an object requesting to use the first image from a terminal communicatively connected thereto.
步骤202,获取第一图像对应的第一图像矩阵。Step 202: Acquire a first image matrix corresponding to the first image.
在本实施例中,上述执行主体可以获取上述第一图像对应的第一图像矩阵。上述第一图像对应的第一图像矩阵可以是第一图像的频域矩阵,也可以是第一图像的色彩矩阵,还可以是按照其他图像矩阵的确定方式得到的矩阵。In this embodiment, the execution subject may obtain the first image matrix corresponding to the first image. The first image matrix corresponding to the first image may be a frequency domain matrix of the first image, a color matrix of the first image, or a matrix obtained according to other image matrix determination methods.
实践中,获取第一图像这一操作可以是由终端或者是由服务器来执行的,相应的,获取第一图像对应的第一图像矩阵这一操作也可以是由终端或者服务器来执行的。当获取第一图像这一操作,与获取第一图像对应的第一图像矩阵 这一操作由相同的设备来执行时,该相同的设备即为上述执行主体,其可以首先获取第一图像,而后确定第一图像对应的第一图像矩阵,再从本地获取第一图像对应的第一图像矩阵。当获取第一图像这一操作,与获取第一图像对应的第一图像矩阵这一操作由不同的设备来执行时,上述执行主体可以从与其通信连接的、执行获取第一图像这一操作的设备获取第一图像对应的第一图像矩阵;也可以首先从与其通信连接的、执行获取第一图像这一操作的设备获取第一图像,然后确定第一图像对应的第一图像矩阵,再从本地获取第一图像对应的第一图像矩阵。In practice, the operation of acquiring the first image may be performed by the terminal or the server. Correspondingly, the operation of acquiring the first image matrix corresponding to the first image may also be performed by the terminal or the server. When the operation of acquiring the first image and the operation of acquiring the first image matrix corresponding to the first image are performed by the same device, the same device is the above-mentioned execution subject, which can acquire the first image first, and then Determine the first image matrix corresponding to the first image, and then obtain the first image matrix corresponding to the first image locally. When the operation of acquiring the first image and the operation of acquiring the first image matrix corresponding to the acquisition of the first image are performed by different devices, the above-mentioned execution subject may perform the operation of acquiring the first image from the communication connected to it. The device acquires the first image matrix corresponding to the first image; it may also first acquire the first image from the device connected to it that performs the operation of acquiring the first image, and then determine the first image matrix corresponding to the first image, and then The first image matrix corresponding to the first image is obtained locally.
步骤203,基于标识信息,变更第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵。In step 203, based on the identification information, the elements in the matrix area that meets the predetermined conditions in the first image matrix are changed to obtain the second image matrix.
在本实施例中,上述执行主体可以基于步骤201所获取到的标识信息,变更步骤202获取到的第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵。In this embodiment, based on the identification information acquired in step 201, the above-mentioned execution subject may change the elements in the matrix region that meets the predetermined conditions in the first image matrix acquired in step 202 to obtain a second image matrix.
在本实施例中,上述预定条件可以是各种预先确定的条件,该预定条件可以用于从第一图像矩阵中,确定出矩阵区域。例如,上述预定条件可以是“位于矩阵区域中的、预先确定的位置的元素”,例如,位于矩阵区域中的、第100至200个元素。In this embodiment, the predetermined condition may be various predetermined conditions, and the predetermined condition may be used to determine the matrix area from the first image matrix. For example, the above-mentioned predetermined condition may be “element located at a predetermined position in the matrix area”, for example, the 100th to 200th element located in the matrix area.
在本实施例的一些可选的实现方式中,上述第一图像矩阵包括第一图像的频域矩阵。以及上述第一图像矩阵中符合预定条件的矩阵区域包括:第一图像矩阵中的中频和/或高频矩阵区域。In some optional implementations of this embodiment, the first image matrix includes a frequency domain matrix of the first image. And the matrix area in the first image matrix that meets the predetermined condition includes: the intermediate frequency and/or high frequency matrix area in the first image matrix.
实践中,上述执行主体或者与其通信连接的电子设备,可以采用傅里叶变换,离散余弦变换等方式,对第一图像进行处理,从而得到第一图像的频域矩阵。In practice, the above-mentioned execution subject or the electronic device communicatively connected to it may use Fourier transform, discrete cosine transform and other methods to process the first image to obtain the frequency domain matrix of the first image.
在这里,对于上述中频和/或高频区域的确定方式可以包括但不限于如下任一种:Here, the determination method for the above-mentioned intermediate frequency and/or high frequency region may include but is not limited to any one of the following:
方式一:基于预先设定的频域范围确定。例如,上述执行主体可以将第一图像矩阵中元素的频率处于预先设定的频域范围内的元素所在的区域,确定为中频和/或高频矩阵区域。Method 1: Determine based on the preset frequency domain range. For example, the above-mentioned execution subject may determine the area where the element whose frequency in the first image matrix is within a preset frequency domain is located as the intermediate frequency and/or high frequency matrix area.
方式二:基于图像的频域分布确定。例如,上述执行主体可以根据图像的 频域分布确定用于指示图像边缘的图像区域,将所确定的图像区域确定为中频和/或高频矩阵区域。Method 2: Determine based on the frequency distribution of the image. For example, the above-mentioned execution subject may determine an image area for indicating the edge of the image according to the frequency domain distribution of the image, and determine the determined image area as an intermediate frequency and/or high frequency matrix area.
可以理解,图像中频和/或高频矩阵区域,通常可以表征图像的噪声和细节。It can be understood that the mid-frequency and/or high-frequency matrix regions of an image can generally characterize the noise and details of the image.
作为示例,上述执行主体可以首先确定上述标识信息的特征字符串。其中,上述特征字符串是用于表征标识信息的特征的字符串。例如,标识信息的特征字符串可以是对标识信息进行加密、编码中的至少一项所得到的结果。然后,上述执行主体可以采用特征字符串中的字符,来替换(即变更)上述第一图像矩阵中的中频和/或高频矩阵区域中的元素,将替换结果确定为第二图像矩阵。As an example, the execution subject may first determine the character string of the identification information. Wherein, the above characteristic character string is a character string for characterizing the identification information. For example, the characteristic character string of the identification information may be a result obtained by encrypting and encoding the identification information. Then, the execution subject may use characters in the character string to replace (ie, change) elements in the intermediate frequency and/or high frequency matrix region in the first image matrix, and determine the replacement result as the second image matrix.
作为又一示例,上述执行主体还可以采用标识信息,来变更第一图像矩阵中的中频和/或高频矩阵区域中的元素,将变更结果确定为第二图像矩阵。例如,如果上述标识信息为寄宿应用在宿主应用上的唯一标识符(例如123456),那么,上述执行主体可以直接用标识信息(例如123456),来替换第一图像矩阵中的中频和/或高频矩阵区域中的元素,将结果确定为第二图像矩阵。As yet another example, the above-mentioned executive body may also use identification information to change elements in the intermediate frequency and/or high-frequency matrix area in the first image matrix, and determine the change result as the second image matrix. For example, if the above identification information is the unique identifier of the host application on the host application (for example, 123456), then the above-mentioned executive body can directly replace the intermediate frequency and/or high frequency in the first image matrix with identification information (for example, 123456). The elements in the frequency matrix area determine the result as the second image matrix.
在本实施例的一些可选的实现方式中,第一图像矩阵包括第一图像的色彩矩阵。以及上述第一图像矩阵中符合预定条件的矩阵区域包括:色彩矩阵中经变更后对视觉效果的影响小于预设配置的矩阵区域。其中,上述视觉效果可以是指人眼观测的视觉效果。对于视觉效果的影响小于预设配置的两张图像,通常人眼无法进行分辨。作为示例,对视觉效果的影响小于预设配置的矩阵区域在进行变更之前和之后分别对应的图像之间的相似度可以大于预设的相似度阈值。In some optional implementations of this embodiment, the first image matrix includes the color matrix of the first image. And the matrix area in the first image matrix that meets the predetermined condition includes: a matrix area in the color matrix that has a changed effect on visual effects less than a preset configuration. Wherein, the aforementioned visual effect may refer to the visual effect observed by the human eye. For the two images whose influence on the visual effect is smaller than the preset configuration, the human eye cannot usually distinguish them. As an example, the similarity between corresponding images before and after the matrix region that has an influence on the visual effect less than the preset configuration may be greater than the preset similarity threshold.
可以理解,第一图像由像素点组成,每个像素点可以通过红绿蓝色彩值来表征,由此,上述执行主体或者与其通信连接的电子设备可以确定出第一图像的色彩矩阵。It can be understood that the first image is composed of pixels, and each pixel can be characterized by a red, green, and blue color value. Thus, the above-mentioned execution subject or an electronic device communicatively connected thereto can determine the color matrix of the first image.
作为示例,上述执行主体可以首先确定上述标识信息的特征字符串。其中,上述特征字符串是用于表征标识信息的特征的字符串。例如,标识信息的特征字符串可以是对标识信息进行加密、编码中的至少一项所得到的结果。然后,上述执行主体可以采用特征字符串中的字符,来替换(即变更)上述第一图像矩阵中的色彩矩阵中经变更后对视觉效果的影响小于预设配置的矩阵区域中的元素,将替换结果确定为第二图像矩阵。As an example, the execution subject may first determine the character string of the identification information. Wherein, the above characteristic character string is a character string for characterizing the identification information. For example, the characteristic character string of the identification information may be a result obtained by encrypting and encoding the identification information. Then, the above-mentioned execution subject may use characters in the character string to replace (ie, change) the elements in the matrix area of the color matrix in the first image matrix after the change has less influence on the visual effect than the preset configuration. The replacement result is determined to be the second image matrix.
作为又一示例,上述执行主体还可以采用标识信息,来变更第一图像矩阵中的色彩矩阵中经变更后对视觉效果的影响小于预设配置的矩阵区域中的元素,将变更结果确定为第二图像矩阵。例如,如果上述标识信息为寄宿应用在宿主应用上的唯一标识符(例如123456),那么,上述执行主体可以直接用标识信息(例如123456),来替换第一图像矩阵中的色彩矩阵中经变更后对视觉效果的影响小于预设配置的矩阵区域中的元素,将结果确定为第二图像矩阵。As yet another example, the above-mentioned executive body may also use the identification information to change the elements in the matrix area of the color matrix in the first image matrix that have changed visual effects less than the preset configuration, and determine the change result as the first Two image matrix. For example, if the above identification information is the unique identifier of the host application on the host application (for example, 123456), then the above-mentioned executive body can directly replace the changed in the color matrix in the first image matrix with identification information (for example, 123456) After that, the influence on the visual effect is smaller than the element in the matrix region of the preset configuration, and the result is determined as the second image matrix.
步骤204,基于第二图像矩阵,生成用于提供给对象的第二图像。Step 204: Based on the second image matrix, generate a second image for providing to the object.
在本实施例中,上述执行主体可以基于第二图像矩阵,生成用于提供给上述对象的第二图像。其中,第二图像与第一图像的视觉效果相似,且第二图像具有确定对象的标识信息的功能。且优选地,该对象的标识信息在视觉效果上不可见,以减少该对象发现该第二图像中含有用于确定其标识信息的信息的可能。In this embodiment, the execution subject may generate a second image for providing the object based on the second image matrix. The second image is similar to the first image in visual effect, and the second image has the function of determining the identification information of the object. And preferably, the identification information of the object is not visible in visual effects, so as to reduce the possibility that the object finds that the second image contains information for determining its identification information.
作为示例,如果上述第一图像矩阵为第一图像经傅里叶变换后得到的频域矩阵,那么,上述执行主体可以对第二图像矩阵进行傅里叶逆变换,将变换结果确定为用于提供给上述对象的第二图像。As an example, if the first image matrix is a frequency domain matrix obtained by Fourier transforming the first image, then the above-mentioned execution subject may perform inverse Fourier transform on the second image matrix, and determine the transform result as The second image provided to the above object.
作为又一示例,如果上述第一图像矩阵为第一图像经离散余弦变换后得到的频域矩阵,那么,上述执行主体可以对第二图像矩阵进行离散余弦变换的逆变换,将变换结果确定为用于提供给上述对象的第二图像。As yet another example, if the first image matrix is a frequency domain matrix obtained by discrete cosine transform of the first image, then the above-mentioned execution subject may perform inverse discrete cosine transform on the second image matrix to determine the transform result as Used to provide a second image of the above object.
可以理解,第二图像与第一图像的视觉效果相似,使得人眼无法对第一图像和第二图像的区别进行区分,因而,采用第二图像来替代第一图像,通常不会影响上述对象的使用。此外,由于第二图像具有确定对象的标识信息的功能,因而,上述执行主体可以通过确定第二图像所包括的标识信息,来确定使用该第二图像的对象,由此,在上述执行主体确定一张第二图像使用违规的情况下,其可以通过根据该第二图像确定的标识信息追踪到具有违规操作的对象,并可以基于此对该对象的权限进行限制,以保护用户的信息安全。It is understandable that the visual effect of the second image is similar to that of the first image, so that the human eye cannot distinguish the difference between the first image and the second image. Therefore, replacing the first image with the second image usually does not affect the above objects usage of. In addition, since the second image has the function of determining the identification information of the object, the above-mentioned execution subject can determine the object using the second image by determining the identification information included in the second image, and thus, the above-mentioned execution subject is determined In the case of a violation of the use of a second image, it can track the object with the illegal operation through the identification information determined according to the second image, and can restrict the authority of the object based on this to protect the user's information security.
在本实施例的一些可选的实现方式中,请求使用第一图像的对象包括寄宿应用。第一图像的获取依赖于寄宿应用的宿主应用。寄宿应用的运行依赖于宿主应用。In some optional implementations of this embodiment, the object requesting to use the first image includes a host application. The acquisition of the first image depends on the host application of the hosting application. The operation of the host application depends on the host application.
可以理解,现有技术中,寄宿应用会拥有访问宿主应用的用户的图像、视 频等的权限。宿主应用往往难以对寄宿应用运营方进行监管,寄宿应用运营方有可能利用宿主应用提供的权限,大量抓取宿主应用上用户的隐私图片。因而,采用本可选的实现方式所描述的方案,可以通过将寄宿应用的标识信息隐藏在其读取的图片信息(即第一图像对应的第一图像矩阵)当中,由此提供了一种有效的信息追踪方法,从而有助于降低图像被违规使用的概率,降低了用户隐私图像的被违规使用的风险,一定程度上保障了用户的信息安全。It can be understood that in the prior art, the host application will have the right to access the image, video, etc. of the user of the host application. It is often difficult for the host application to supervise the host application operator. The host application operator may use the permissions provided by the host application to capture a large number of users' private pictures on the host application. Therefore, with the solution described in this optional implementation, the identification information of the host application can be hidden in the picture information it reads (ie, the first image matrix corresponding to the first image), thereby providing a An effective information tracking method helps reduce the probability of illegal use of images, reduces the risk of illegal use of user privacy images, and protects the user's information security to a certain extent.
在本实施例的一些可选的实现方式中,请求使用第一图像的对象的标识信息为请求使用第一图像的寄宿应用的标识信息,即上述对象可以为寄宿应用。以及上述执行主体还可以执行如下步骤:In some optional implementations of this embodiment, the identification information of the object requesting to use the first image is the identification information of the boarding application requesting to use the first image, that is, the above object may be a boarding application. And the above execution subject can also perform the following steps:
首先,寄宿应用响应于第一图像的读取的触发,请求宿主应用提供第一图像。First, in response to the trigger of reading the first image, the host application requests the host application to provide the first image.
可以理解,实践中,在寄宿应用读取第一图像之前,寄宿应用可以首先请求宿主应用提供第一图像。It can be understood that, in practice, before the host application reads the first image, the host application may first request the host application to provide the first image.
然后,宿主应用响应于寄宿应用的请求,获取第一图像。Then, the host application acquires the first image in response to the request of the host application.
在这里,宿主应用在接收到寄宿应用请求提供第一图像的请求之后,宿主应用可以获取第一图像,继而上述执行主体可以通过宿主应用来获取第一图像。Here, after receiving the request of the host application to provide the first image, the host application may acquire the first image, and then the above-mentioned execution subject may acquire the first image through the host application.
作为示例,在上述执行主体为服务器的情况下,如果第一图像存储于服务器,那么,上述执行主体可以直接从本地获取第一图像。在此情况下,通常寄宿应用可以通过终端设备向上述执行主体提供第一图像的标识信息,以便上述执行主体从本地获取第一图像;如果第一图像存储于终端设备,那么,上述执行主体可以从终端设备获取第一图像。在此情况下,通常寄宿应用可以通过终端设备向上述执行主体提供第一图像的标识信息,或者第一图像,以便上述执行主体从终端设备获取第一图像。As an example, in the case where the above-mentioned execution subject is a server, if the first image is stored in the server, then the above-mentioned execution subject may directly obtain the first image locally. In this case, usually the boarding application can provide the identification information of the first image to the execution subject through the terminal device, so that the execution subject obtains the first image locally; if the first image is stored in the terminal device, the execution subject can Acquire the first image from the terminal device. In this case, usually, the boarding application may provide the above-mentioned executing body with the identification information of the first image, or the first image, through the terminal device, so that the above-mentioned executing body obtains the first image from the terminal device.
作为又一示例,在上述执行主体为终端设备的情况下,如果第一图像存储于终端设备,那么,上述执行主体可以直接从本地获取第一图像。在此情况下,通常寄宿应用可以向上述执行主体(例如终端设备)提供第一图像的标识信息,以便上述执行主体从本地获取第一图像;如果第一图像存储于服务器,那么,上述执行主体可以从服务器获取第一图像。在此情况下,上述执行主体可以向服务器提供第一图像的标识信息,以便上述执行主体从服务器获取第一图像。As yet another example, in the case where the above-mentioned execution subject is a terminal device, if the first image is stored in the terminal device, then the above-mentioned execution subject may directly obtain the first image locally. In this case, usually the boarding application may provide the identification information of the first image to the above-mentioned execution subject (eg, terminal device), so that the above-mentioned execution subject obtains the first image locally; if the first image is stored in the server, then the above-mentioned execution subject The first image can be acquired from the server. In this case, the above-mentioned execution subject may provide the identification information of the first image to the server, so that the above-mentioned execution subject obtains the first image from the server.
在一些使用情况下,寄宿应用的请求中可以包括第一图像的标识信息,或者第一图像。In some use cases, the request of the boarding application may include the identification information of the first image, or the first image.
可选的,对于上述获取第一图像的步骤,上述执行主体可以在接收到用户的授权信息之后,再获取第一图像。其中,授权信息可以用于指示用户允许上述执行主体获取第一图像。Optionally, for the step of acquiring the first image, the execution subject may acquire the first image after receiving the authorization information of the user. The authorization information may be used to instruct the user to allow the above-mentioned execution subject to acquire the first image.
可以理解,上述执行主体在生成第二图像后还可以控制宿主应用将第二图像提供给寄宿应用。It can be understood that the above-mentioned execution subject can also control the host application to provide the second image to the host application after generating the second image.
在这里,第一图像获取后,可以由终端设备(如通过终端设备上安装的宿主应用)处理并生成第二图像,也可以由服务器处理并生成第二图像。Here, after acquiring the first image, the second image may be processed and generated by the terminal device (eg, through a host application installed on the terminal device), or may be processed and generated by the server.
在本可选的实现方式中,上述执行主体可以通过将第二图像提供给寄宿应用,来替代将第一图像提供给寄宿应用,从而可以通过确定第二图像所包括的标识信息,来确定使用该第二图像的对象,由此,在上述执行主体确定一张第二图像使用违规的情况下,其可以通过根据该第二图像确定的标识信息追踪到具有违规操作的对象,并可以基于此对该对象的权限进行限制,以保护用户的信息安全。In this optional implementation manner, the above-mentioned execution subject can provide the second image to the boarding application instead of providing the first image to the boarding application, so that the use can be determined by determining the identification information included in the second image The object of the second image, therefore, in the case where the above-mentioned execution subject determines a violation of the use of a second image, it can track the object with the violation operation through the identification information determined according to the second image, and can be based on this Limit the authority of the object to protect the user's information security.
在本实施例的一些可选的实现方式中,该方法用于服务端(即上述执行主体为服务端),在服务端获取第一图像之前,宿主应用呈现读取第一图像的授权请求。其中,该授权请求可以用于确定用户是否允许寄宿应用使用第一图像。服务端获取第一图像的步骤可包括:响应于接收到来自终端设备的用户对授权请求的许可,获取第一图像。In some optional implementations of this embodiment, this method is used for the server (that is, the above-mentioned execution subject is the server), and before the server acquires the first image, the host application presents an authorization request to read the first image. The authorization request may be used to determine whether the user allows the host application to use the first image. The step of acquiring the first image by the server may include: acquiring the first image in response to receiving the permission of the user from the terminal device for the authorization request.
在这里,接收到用户对授权请求的许可,可以表征用户允许寄宿应用使用第一图像。未接收到,或预定时间内(例如在呈现授权请求后1分钟内)未接收到用户对授权请求的许可,可以表征用户不允许寄宿应用使用第一图像。Here, receiving the user's permission for the authorization request may indicate that the user allows the host application to use the first image. Failure to receive, or failure to receive the user's permission for the authorization request within a predetermined time (for example, within 1 minute after presenting the authorization request) may indicate that the user does not allow the host application to use the first image.
可以理解,在本可选的实现方式中,可以在接收到用户对授权请求的许可的情况下,获取第一图像,从而可以获知用户的意愿,由此可以根据不同用户的意愿,来确定是否获取第一图像,及后续是否向寄宿应用返回第二图像供其使用。这样,可以进一步提高用户信息的安全性。It can be understood that, in this optional implementation, the first image can be obtained when the user's permission for the authorization request is received, so that the user's wishes can be known, and thus whether or not the user's wishes can be determined according to the wishes of different users Acquire the first image, and whether to return the second image to the boarding application for its subsequent use. In this way, the security of user information can be further improved.
在本实施例的一些可选的实现方式中,第一图像来自用户,上述执行主体还可以按照如下步骤,来执行该步骤203:In some optional implementations of this embodiment, the first image comes from the user, and the above-mentioned execution subject may also perform this step 203 according to the following steps:
首先,基于对象的标识信息以及用户的标识信息,生成标记字符串。其中,标记字符串具有确定对象的标识信息以及用户的标识信息的功能。First, based on the identification information of the object and the identification information of the user, a tag string is generated. Among them, the mark character string has the function of determining the identification information of the object and the identification information of the user.
作为示例,上述执行主体可以将对象的标识信息以及用户的标识信息进行拼接,从而得到标记字符串。As an example, the above-mentioned execution subject may splice the identification information of the object and the identification information of the user to obtain a tag string.
作为又一示例,上述执行主体也可以首先将对象的标识信息以及用户的标识信息进行拼接,然后对拼接结果进行加密和/或编码,从而得到标记字符串。As yet another example, the above-mentioned execution subject may first splice the identification information of the object and the identification information of the user, and then encrypt and/or encode the splicing result to obtain a tag string.
作为再一示例,上述执行主体还可以基于当前时间、用户的标识信息和寄宿应用的标识信息,来生成标记字符串。例如,上述执行主体可以将表征当前时间的信息、用户的标识信息和寄宿应用的标识信息进行拼接的结果,确定为标记字符串;也可以对当前时间、用户的标识信息和寄宿应用的标识信息进行拼接的结果进行编码和/或加密,从而得到标记字符串。其中,上述当前时间可以是接收到用户对授权请求的时间,也可以是得到对象的标识信息的时间,还可以是得到用户的标识信息的时间。As yet another example, the above-mentioned execution subject may also generate a tag character string based on the current time, the user's identification information, and the identification information of the boarding application. For example, the above-mentioned execution subject may determine the result of the stitching of the information characterizing the current time, the user's identification information and the homestay application's identification information as a tag string; or the current time, the user's identification information and the homestay application's identification information The result of the stitching is encoded and/or encrypted to obtain the tag string. The above-mentioned current time may be the time when the user's authorization request is received, the time when the identification information of the object is obtained, or the time when the user's identification information is obtained.
然后,使用标记字符串中的字符,替换第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵。Then, the characters in the mark character string are used to replace the elements in the matrix area that meets the predetermined condition in the first image matrix to obtain the second image matrix.
在这里,上述第一图像可以包括用户通过宿主应用发布的图像;可以包括用户在宿主应用上使用的头像;可以包括用户通过宿主应用发送的图像;或者,也可以包括用户通过宿主应用发布或发送的视频包括的视频帧。Here, the above-mentioned first image may include an image posted by the user through the host application; may include an avatar used by the user on the host application; may include an image sent by the user through the host application; or may include a user publish or send through the host application The video includes video frames.
可以理解,当上述执行主体采用本可选的实现方式,来执行步骤203时,通过第二图像不仅可以确定使用该第二图像的对象,还可以确定该第二图像对应的第一图像来自哪个用户。It can be understood that when the above-mentioned execution subject adopts this optional implementation manner to perform step 203, the second image can not only determine the object using the second image, but also determine from which the first image corresponding to the second image comes from user.
在本实施例的一些可选的实现方式中,上述执行主体可以采用如下方式,来执行上述步骤202:对第一图像进行频域变换,获得第一图像的频域矩阵作为第一图像矩阵。其中,上述频域变换可以包括但不限于以下至少一项:傅里叶变换,离散余弦变换,小波变换等等。以及,上述执行主体可以采用如下方式,来执行上述步骤204:对第二图像矩阵进行频域变换的逆变换,得到第二图像。In some optional implementation manners of this embodiment, the above-mentioned execution subject may perform the above step 202 in the following manner: perform frequency domain transformation on the first image, and obtain a frequency domain matrix of the first image as the first image matrix. Wherein, the above frequency domain transform may include but not limited to at least one of the following: Fourier transform, discrete cosine transform, wavelet transform, etc. And, the above-mentioned execution subject may perform the above-mentioned step 204 in the following manner: performing inverse transform of the frequency domain transform on the second image matrix to obtain the second image.
在本实施例的一些可选的实现方式中,上述执行主体还可以执行如下步骤:In some optional implementation manners of this embodiment, the above-mentioned execution subject may further perform the following steps:
首先,获取使用违规的第三图像。在这里,上述使用违规的第三图像可以 包括但不限于以下至少一项:将其发送给预先确定的违规账号的图像,用户确定的使用违规的图像等等。First, obtain a third image of usage violation. Here, the third image of the usage violation may include, but is not limited to, at least one of the following: an image sent to a predetermined violation account, an image determined by the user to violate the usage, and so on.
在这里,技术人员可以根据实际需求来确定判断图像是否使用违规的条件,在此不作限定。Here, technicians can determine the conditions for judging whether the image is in violation of the regulations according to actual needs, which is not limited here.
然后,尝试从第三图像中提取标识信息。Then, try to extract the identification information from the third image.
可以理解,第三图像可以是任意使用违规的图像。因而,第三图像可以是第二图像,也可以不是第二图像;上述执行主体可能可以从第三图像中提取标识信息,也可能无法从第三图像中提取标识信息。因此,上述执行主体可以尝试从第三图像中提取标识信息。It can be understood that the third image may be any image that violates regulations. Therefore, the third image may or may not be the second image; the above-mentioned execution subject may be able to extract the identification information from the third image, or may not be able to extract the identification information from the third image. Therefore, the above-mentioned execution subject may try to extract the identification information from the third image.
若从第三图像中提取出标识信息,则关闭或指示关闭所提取出的标识信息对应的对象的相应权限。其中,上述相应权限可以是上述对象所具有的所有权限中的一项或多项。作为示例,上述相应权限可以包括启动权限。If the identification information is extracted from the third image, the corresponding authority of the object corresponding to the extracted identification information is closed or instructed to be closed. Wherein, the corresponding permission may be one or more of all the permissions possessed by the object. As an example, the above-mentioned corresponding authority may include an activation authority.
在这里,如果上述执行主体为服务器,那么,上述执行主体可以指示终端设备关闭所提取出的标识信息对应的对象的相应权限;如果上述执行主体为终端设备,那么,上述执行主体可以关闭所提取出的标识信息对应的对象的相应权限。Here, if the execution subject is a server, then the execution subject can instruct the terminal device to close the corresponding authority of the object corresponding to the extracted identification information; if the execution subject is a terminal device, then the execution subject can close the proposed The corresponding authority of the object corresponding to the extracted identification information.
在本实施例的一些可选的实现方式中,相应权限包括对第一图像的获取权限。In some optional implementations of this embodiment, the corresponding authority includes the authority to acquire the first image.
在本实施例的一些可选的实现方式中,上述对象包括寄宿应用。该方法用于终端(即上述执行主体为终端设备)。基于此,对于上述关闭所提取出的标识信息对应的对象的相应权限,这一步骤,可以包括如下子步骤:In some optional implementations of this embodiment, the above-mentioned object includes a host application. This method is used for a terminal (that is, the above-mentioned execution subject is a terminal device). Based on this, this step may include the following sub-steps for closing the corresponding authority of the object corresponding to the extracted identification information:
子步骤一,寄宿应用的宿主应用呈现安全提示信息。其中,该安全提示信息用于提示寄宿应用存在对宿主应用提供的图像的违规使用。In sub-step 1, the host application of the hosting application presents security prompt information. The security prompt information is used to prompt the host application for illegal use of the image provided by the host application.
子步骤二,响应于用户对安全提示信息指示的寄宿应用的权限限制操作的触发,关闭寄宿应用的相应权限。其中,权限限制操作可以是预先确定的用于对寄宿应用的相应权限进行限制的各种操作。例如,权限限制操作可以包括但不限于以下至少一项:点击预设按键,输入预设语音。其中,上述预设按键,上述预设语音可以用于触发关闭寄宿应用的相应权限。In sub-step two, in response to the triggering of the permission limitation operation of the host application indicated by the security prompt information, the user closes the corresponding permission of the host application. The permission limitation operation may be various operations predetermined to limit the corresponding permissions of the host application. For example, the permission limitation operation may include but not limited to at least one of the following: click a preset button and input a preset voice. Wherein, the above-mentioned preset button and the above-mentioned preset voice can be used to trigger the corresponding permission to close the boarding application.
可以理解,由于从使用违规的第三图像中提取出了标识信息,可以说明所 提取的标识信息对应的对象存在违规行为,例如,该对象可能存在泄露用户隐私的行为,因而,上述执行主体可以通过关闭或指示关闭所提取出的标识信息对应的对象的相应权限(例如对第一图像的获取权限),来限制其操作,从而达到降低图像被违规使用的概率,以及,保障用户的信息安全的目的。It can be understood that, since the identification information is extracted from the third image that violates the usage, it can be explained that the object corresponding to the extracted identification information has a violation, for example, the object may have an act of leaking user privacy. Therefore, the above-mentioned execution subject may By closing or instructing to close the corresponding authority of the object corresponding to the extracted identification information (for example, the authority to acquire the first image), its operation is restricted, thereby reducing the probability of illegal use of the image, and ensuring the user's information security the goal of.
在本实施例的一些可选的实现方式中,对于上述尝试从第三图像中提取标识信息,这一步骤,可以包括如下子步骤:In some optional implementations of this embodiment, for the above-mentioned attempt to extract the identification information from the third image, this step may include the following sub-steps:
子步骤一,获取第三图像的第三图像矩阵。In sub-step 1, a third image matrix of the third image is obtained.
在这里,上述执行主体可以按照与执行上述步骤202相类似的方式,获取第三图像的第三图像矩阵,在此不再赘述。Here, the above-mentioned execution subject may obtain the third image matrix of the third image in a similar manner to the above-mentioned step 202, which will not be repeated here.
子步骤二,提取第三图像矩阵中符合预定条件的矩阵区域的元素。In sub-step two, the elements of the matrix region that meets the predetermined condition in the third image matrix are extracted.
在这里,上述执行主体可以按照与执行上述步骤203相应的方式,从第三图像矩阵中,确定出符合上述预定条件的矩阵区域的元素,在此不再赘述。然后再提取第三图像矩阵中符合预定条件的矩阵区域的元素。Here, the above-mentioned execution subject may determine the elements of the matrix area that meet the above-mentioned predetermined conditions from the third image matrix in a manner corresponding to the above-mentioned step 203, which will not be repeated here. Then, the elements of the matrix area that meets the predetermined conditions in the third image matrix are extracted.
子步骤三,尝试基于所提取的元素识别对象的标识信息。In sub-step three, try to identify the identification information of the object based on the extracted elements.
在这里,上述执行主体可以尝试基于所提取的元素识别对象的标识信息。由于第三图像可以是第二图像,也可以不是第二图像;可能可以从第三图像中提取标识信息,也可能无法从第三图像中提取标识信息。因此,上述执行主体可以尝试基于所提取的元素识别对象的标识信息。如果在上述执行主体尝试基于所提取的元素识别对象的标识信息之后,可以识别出对象的标识信息,那么,可以确定第三图像为第二图像,换言之,第三图像是通过上述步骤201至步骤204生成的,进而可以说明所识别出来的标识信息指示的对象存在违规行为,进而,上述执行主体可以通过关闭或指示关闭所提取出的标识信息对应的对象的相应权限(例如对第一图像的获取权限),来限制其操作,从而达到降低图像被违规使用的概率,以及,保障用户的信息安全的目的。Here, the above-mentioned execution subject may try to identify the identification information of the object based on the extracted elements. Since the third image may be the second image or not, the identification information may be extracted from the third image, or the identification information may not be extracted from the third image. Therefore, the above-mentioned execution subject may try to identify the identification information of the object based on the extracted elements. If after the above execution subject attempts to identify the object's identification information based on the extracted elements, the object's identification information can be identified, then the third image can be determined to be the second image, in other words, the third image is through the above steps 201 to step Generated by 204, which may indicate that the object identified by the identified identification information has a violation, and further, the above-mentioned execution subject may close or instruct to close the corresponding authority of the object corresponding to the extracted identification information (for example, the first image Get permission) to limit its operation, so as to reduce the probability of illegal use of the image, and to protect the user's information security.
继续参见图3,图3是根据本实施例的用于处理图像的方法的应用场景的一个示意图。在图3的应用场景中,对象(例如寄宿应用)请求使用第一图像3003(例如用户通过终端设备301所安装的上述寄宿应用的宿主应用发布的图像)。随后,终端设备301向服务器302发送信息3001:标识信息为“1234” 的对象请求使用第一图像。之后,服务器302获取请求使用第一图像的对象的标识信息3002(3002为用于指代标识信息的编号,图示1234表示标识信息的字符)。此后,服务器302在接收到终端设备301发送的第一图像3003之后,获取第一图像3003对应的第一图像矩阵3004(例如第一图像3003经频域变换后得到的频域矩阵)。然后,服务器302基于标识信息3002,变更第一图像矩阵3004中符合预定条件的矩阵区域(例如图3中的矩阵区域30040)中的元素,得到第二图像矩阵3005。最后,终端设备301基于第二图像矩阵3005,生成用于提供给对象的第二图像3006。其中,第二图像3006与第一图像3003的视觉效果相似,且第二图像3006具有确定对象的标识信息3002的功能。Continuing to refer to FIG. 3, FIG. 3 is a schematic diagram of an application scenario of the method for processing an image according to this embodiment. In the application scenario of FIG. 3, an object (for example, a boarding application) requests to use the first image 3003 (for example, an image released by a host application of the above-mentioned boarding application installed by the user through the terminal device 301). Subsequently, the terminal device 301 sends information 3001 to the server 302: an object whose identification information is "1234" requests to use the first image. After that, the server 302 acquires the identification information 3002 of the object requesting to use the first image (3002 is a number used to refer to the identification information, and the illustration 1234 represents the characters of the identification information). Thereafter, after receiving the first image 3003 sent by the terminal device 301, the server 302 acquires the first image matrix 3004 corresponding to the first image 3003 (for example, the frequency domain matrix obtained by performing frequency domain transformation on the first image 3003). Then, based on the identification information 3002, the server 302 changes the elements in the matrix area (for example, the matrix area 30040 in FIG. 3) in the first image matrix 3004 that meets the predetermined condition to obtain the second image matrix 3005. Finally, the terminal device 301 generates a second image 3006 for providing to the subject based on the second image matrix 3005. The second image 3006 and the first image 3003 have similar visual effects, and the second image 3006 has a function of determining the identification information 3002 of the object.
本公开的上述实施例提供的方法,通过获取请求使用第一图像的对象的标识信息,而后,获取第一图像对应的第一图像矩阵,然后,基于标识信息,变更第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵,最后,基于第二图像矩阵,生成用于提供给对象的第二图像,其中,第二图像与第一图像的视觉效果相似,且第二图像具有确定对象的标识信息的功能,从而得到具有确定对象的标识信息的功能的第二图像,并采用第二图像来替代第一图像来返回给上述对象,这样,可以借助第二图像确定请求使用第一图像的对象,有助于降低图像被违规使用的概率,降低了用户隐私图像的被违规使用的风险,一定程度上保障了用户的信息安全,丰富了图像处理的多样性,并且,由于第二图像与第一图像的视觉效果相似,能够在不影响图像的正常使用的情况下,隐藏图像中用于锁定图像使用者的标识,降低了图像违规使用方因发现图像中的标识而抹去该标识的概率,且本申请上述实施例的方案能够提高抹去该标识的难度。The method provided by the above embodiment of the present disclosure obtains the identification information of the object requesting to use the first image by acquiring the first image matrix corresponding to the first image, and then, based on the identification information, changes the first image matrix to meet the predetermined Elements in the conditional matrix area to obtain a second image matrix, and finally, based on the second image matrix, generate a second image for providing to the object, wherein the second image has a similar visual effect to the first image, and the second The image has the function of determining the identification information of the object, thereby obtaining a second image having the function of determining the identification information of the object, and using the second image instead of the first image to return to the above object, so that the request can be determined by the second image The object using the first image helps to reduce the probability of illegal use of the image, reduces the risk of illegal use of the user's private image, guarantees the user's information security to a certain extent, and enriches the diversity of image processing, and, Since the visual effect of the second image is similar to the first image, the logo used to lock the image user in the image can be hidden without affecting the normal use of the image, which reduces the illegal use of the image due to the discovery of the logo in the image. The probability of erasing the mark, and the solution of the above embodiment of the present application can increase the difficulty of erasing the mark.
进一步参考图4,其示出了用于处理图像的方法的又一个实施例的流程400。该用于处理图像的方法的流程400,包括以下步骤:With further reference to FIG. 4, it shows a flow 400 of yet another embodiment of a method for processing images. The flow 400 of the method for processing images includes the following steps:
步骤401,接收来自终端的图像使用请求。Step 401: Receive an image use request from a terminal.
在本实施例中,用于处理图像的方法的执行主体(例如图1所示的服务器)可以接收来自终端的图像使用请求。其中,图像使用请求用于为寄宿应用请求使用第一图像。寄宿应用响应于第一图像的读取的触发,请求宿主应用提供第 一图像。上述终端可以与上述执行主体通信连接。上述终端上可以安装有上述寄宿应用的宿主应用。In this embodiment, the execution subject of the method for processing images (for example, the server shown in FIG. 1) can receive the image use request from the terminal. The image use request is used to request the use of the first image for the host application. The host application requests the host application to provide the first image in response to the trigger of reading the first image. The above terminal may be communicatively connected with the above execution subject. A host application of the above boarding application may be installed on the above terminal.
通常情况下,由于寄宿应用对第一图像的获取,依赖于寄宿应用的宿主应用,寄宿应用的运行依赖于宿主应用,因而,宿主应用可以对寄宿应用的各种操作权限进行管理,以允许或禁止寄宿应用的相应操作。Generally, since the host application acquires the first image, and depends on the host application of the host application, the operation of the host application depends on the host application. Therefore, the host application can manage various operation rights of the host application to allow or The corresponding operation of the boarding application is prohibited.
作为示例,上述第一图像可以包括以下至少一项:用户通过宿主应用发布的图像,用户在宿主应用上使用的头像,用户通过宿主应用发送的图像,用户通过宿主应用发布或发送的视频包括的视频帧。As an example, the first image may include at least one of the following: an image posted by the user through the host application, an avatar used by the user on the host application, an image sent by the user through the host application, and a video posted or sent by the user through the host application. Video frame.
步骤402,基于图像使用请求,获得寄宿应用的标识信息。 Step 402, based on the image use request, obtain the identification information of the boarding application.
在本实施例中,上述执行主体可以基于步骤401所接收到的图像使用请求,获得上述寄宿应用的标识信息。In this embodiment, the execution subject may obtain the identification information of the host application based on the image use request received in step 401.
通常,图像使用请求可以包括寄宿应用的标识信息,因而,上述执行主体可以获得图像使用请求所包括的寄宿应用的标识信息。可选的,由于图像使用请求用于为寄宿应用请求使用第一图像,因而上述执行主体可以首先确定图像使用请求指示的、请求使用第一图像的寄宿应用,然后再确定寄宿应用的标识信息,以获得寄宿应用的标识信息。Generally, the image use request may include identification information of the boarding application, and therefore, the above-mentioned execution subject may obtain the identification information of the boarding application included in the image use request. Optionally, because the image use request is used to request the use of the first image for the host application, the above-mentioned execution subject may first determine the host application indicated by the image use request and request the use of the first image, and then determine the identification information of the host application, To obtain the identification information of the boarding application.
步骤403,基于图像使用请求,获取第一图像。Step 403: Acquire the first image based on the image use request.
在本实施例中,由于图像使用请求用于为寄宿应用请求使用第一图像,因而上述执行主体可以基于步骤401所接收到的图像使用请求,获取图像使用请求所指示的第一图像。In this embodiment, since the image use request is used to request the use of the first image for the host application, the above-mentioned execution subject may acquire the first image indicated by the image use request based on the image use request received in step 401.
步骤404,响应于接收到用户对授权请求的许可,对第一图像进行频域变换,获得第一图像的频域矩阵作为第一图像矩阵。Step 404: In response to receiving the user's permission for the authorization request, perform frequency domain transformation on the first image to obtain a frequency domain matrix of the first image as the first image matrix.
在本实施例中,在接收到用户对授权请求的许可的情况下,上述执行主体可以对第一图像进行频域变换,获得第一图像的频域矩阵作为第一图像矩阵。其中,授权请求由宿主应用呈现,授权请求用于请求用户对第一图像的读取进行授权。In this embodiment, upon receiving the user's permission for the authorization request, the above-mentioned execution subject may perform frequency domain transformation on the first image to obtain the frequency domain matrix of the first image as the first image matrix. The authorization request is presented by the host application, and the authorization request is used to request the user to authorize the reading of the first image.
在这里,上述频域变换可以包括但不限于以下至少一项:二维离散傅里叶变换,快速傅里叶变换,离散余弦变换等等。Here, the above frequency domain transform may include, but is not limited to, at least one of the following: two-dimensional discrete Fourier transform, fast Fourier transform, discrete cosine transform, and so on.
需要说明的是,在一些实施例中,若在步骤403中,在响应于接收到用户 对授权请求的许可的情况下,获取第一图像,则在步骤404中,在执行步骤403后可直接对第一图像进行频域变换,获得第一图像的频域矩阵作为第一图像矩阵。也即,因接收到用户对授权请求的许可而触发的是步骤403,而非步骤404。It should be noted that, in some embodiments, if in step 403, the first image is acquired in response to receiving the user's permission for the authorization request, then in step 404, after step 403 can be directly performed Perform frequency domain transformation on the first image to obtain the frequency domain matrix of the first image as the first image matrix. That is, step 403 is triggered instead of step 404 because the user's permission for the authorization request is received.
步骤405,基于寄宿应用的标识信息以及用户的标识信息,生成标记字符串。 Step 405, based on the identification information of the boarding application and the identification information of the user, generate a tag string.
在本实施例中,上述执行主体可以基于寄宿应用的标识信息以及用户的标识信息,生成标记字符串。其中,标记字符串具有确定寄宿应用的标识信息以及用户的标识信息的功能。In this embodiment, the above-mentioned execution subject may generate a tag character string based on the identification information of the boarding application and the identification information of the user. Among them, the mark character string has a function of determining the identification information of the host application and the identification information of the user.
作为示例,上述执行主体可以将寄宿应用的标识信息以及用户的标识信息进行拼接,从而得到标记字符串。As an example, the above-mentioned execution subject may splice the identification information of the boarding application and the identification information of the user to obtain a tag string.
作为又一示例,上述执行主体也可以首先将寄宿应用的标识信息以及用户的标识信息进行拼接,然后对拼接结果进行加密和/或编码,从而得到标记字符串。As yet another example, the above-mentioned execution subject may first splice the identification information of the boarding application and the identification information of the user, and then encrypt and/or encode the splicing result to obtain a tag string.
步骤406,使用标记字符串替换第一图像矩阵中的中频和/或高频矩阵区域中的元素,得到第二图像矩阵。Step 406: Replace the elements in the mid-frequency and/or high-frequency matrix area in the first image matrix with the label character string to obtain the second image matrix.
在本实施例中,上述执行主体可以使用标记字符串替换第一图像矩阵中的中频和/或高频矩阵区域中的元素,得到第二图像矩阵。In this embodiment, the above-mentioned execution subject may replace the elements in the mid-frequency and/or high-frequency matrix area in the first image matrix with the label character string to obtain the second image matrix.
在这里,对于上述中频和/或高频区域的确定方式可以包括但不限于如下两种:Here, the determination method for the above-mentioned intermediate frequency and/or high frequency region may include but not limited to the following two:
方式一:基于预先设定的频域范围确定。例如,上述执行主体可以将第一图像矩阵中元素的频率处于预先设定的频域范围内的元素所在的区域,确定为中频和/或高频矩阵区域。Method 1: Determine based on the preset frequency domain range. For example, the above-mentioned execution subject may determine the area where the element whose frequency in the first image matrix is within a preset frequency domain is located as the intermediate frequency and/or high frequency matrix area.
方式二:基于图像的频域分布确定。例如,上述执行主体可以将用于指示图像边缘的图像区域,确定为中频和/或高频矩阵区域。Method 2: Determine based on the frequency distribution of the image. For example, the above-mentioned execution subject may determine the image area for indicating the edge of the image as an intermediate frequency and/or high frequency matrix area.
可以理解,图像中频和/或高频矩阵区域,通常可以表征图像的噪声和细节。It can be understood that the mid-frequency and/or high-frequency matrix regions of an image can generally characterize the noise and details of the image.
步骤407,对第二图像矩阵进行频域变换的逆变换,得到第二图像。Step 407: Perform inverse transform of the frequency domain transform on the second image matrix to obtain a second image.
在本实施例中,上述执行主体可以对步骤406所得到的第二图像矩阵进行上述频域变换的逆变换,得到第二图像。其中,第二图像与第一图像的视觉效果相似,且第二图像具有确定寄宿应用的标识信息和用户的标识信息的功能。 其中,上述视觉效果可以是指人眼观测的视觉效果。对于视觉效果的影响小于预设配置的两张图像,通常人眼无法进行分辨。In this embodiment, the execution subject may perform the inverse transform of the frequency domain transform on the second image matrix obtained in step 406 to obtain a second image. The second image is similar to the first image in visual effect, and the second image has a function of determining the identification information of the boarding application and the identification information of the user. Wherein, the aforementioned visual effect may refer to the visual effect observed by the human eye. For the two images whose influence on the visual effect is smaller than the preset configuration, the human eye cannot usually distinguish them.
步骤408,将第二图像提供给寄宿应用。In step 408, the second image is provided to the boarding application.
在本实施例中,上述执行主体可以采用有线连接,或者无线连接的方式,将第二图像提供给寄宿应用。In this embodiment, the above-mentioned execution subject may use a wired connection or a wireless connection to provide the second image to the boarding application.
下面请参考图5A-图5C,图5A-图5C示出了根据本公开的用于处理图像的方法的又一个应用场景的示意图。如图5A所示,用户在终端设备上点击寄宿应用1的图标之后,寄宿应用1开始运行。然后,尝试获取该终端设备关联的用户的第一图像(例如用户通过宿主应用发布的图像,用户在宿主应用上使用的头像,用户通过宿主应用发送的图像,用户通过宿主应用发布或发送的视频包括的视频帧等等),寄宿应用触发第一图像的读取操作后,如图5B所示,终端设备向服务器发送图像使用请求501。其中,图像使用请求501用于为寄宿应用1请求使用第一图像502。之后,服务器基于图像使用请求501,获得到了寄宿应用的标识信息503。此后,在服务器接收到用户对授权请求的许可的情况下,服务器基于图像使用请求501,获取第一图像502,再对第一图像502进行频域变换(例如离散余弦变换),获得第一图像的频域矩阵作为第一图像矩阵505。其中,授权请求由宿主应用呈现,授权请求用于请求用户对第一图像502的读取进行授权。随后,服务器基于寄宿应用的标识信息503以及用户的标识信息504,生成标记字符串(例如将寄宿应用的标识信息503以及用户的标识信息504进行拼接、加密、编码后得到的结果),之后再使用标记字符串替换第一图像矩阵中的中频和/或高频矩阵区域5050中的元素,得到第二图像矩阵506。最后,服务器对第二图像矩阵506进行频域变换的逆变换,得到第二图像507,以及将第二图像507提供给寄宿应用(如图5C所示,服务器向上述终端设备发送了第二图像507,以将第二图像507提供给寄宿应用1)。其中,第二图像与第一图像的视觉效果相似,且第二图像具有确定寄宿应用的标识信息的功能。Please refer to FIGS. 5A-5C below. FIGS. 5A-5C illustrate schematic diagrams of another application scenario of the method for processing an image according to the present disclosure. As shown in FIG. 5A, after the user clicks the icon of the boarding application 1 on the terminal device, the boarding application 1 starts to run. Then, try to obtain the first image of the user associated with the terminal device (for example, the image released by the user through the host application, the avatar used by the user on the host application, the image sent by the user through the host application, and the video posted or sent by the user through the host application Including the video frame, etc.), after the host application triggers the reading operation of the first image, as shown in FIG. 5B, the terminal device sends an image use request 501 to the server. Among them, the image use request 501 is used to request the use of the first image 502 for the boarding application 1. After that, the server obtains the identification information 503 of the boarding application based on the image use request 501. Thereafter, when the server receives the user's permission for the authorization request, the server obtains the first image 502 based on the image use request 501, and then performs frequency domain transformation (eg, discrete cosine transform) on the first image 502 to obtain the first image The frequency domain matrix is used as the first image matrix 505. The authorization request is presented by the host application, and the authorization request is used to request the user to authorize the reading of the first image 502. Subsequently, based on the identification information 503 of the boarding application and the identification information 504 of the user, the server generates a label character string (for example, the result obtained by splicing, encrypting, and encoding the identification information 503 of the boarding application and the identification information 504 of the user), and then The elements in the mid-frequency and/or high-frequency matrix area 5050 in the first image matrix are replaced with label character strings to obtain a second image matrix 506. Finally, the server performs inverse transform of the frequency domain transform on the second image matrix 506 to obtain the second image 507, and provides the second image 507 to the boarding application (as shown in FIG. 5C, the server sends the second image to the terminal device 507 to provide the second image 507 to the boarding application 1). The second image is similar to the first image in visual effect, and the second image has a function of determining identification information of the boarding application.
从图4中可以看出,与图2对应的实施例相比,本实施例中的用于处理图像的方法的流程400将请求使用第一图像的对象具体化为寄宿应用。由此,本 实施例描述的方案可以通过将与第一图像的视觉效果相似的第二图像提供给寄宿应用,来代替直接将第一图像提供给寄宿应用,由此,可以在不影响寄宿应用使用图像的前提下,将寄宿应用的标识信息,以及用户的标识信息隐藏与图像之中,通过第二图像可以确定出寄宿应用以及用户,由此,一旦发现使用违规的第二图像,则可以确定出违规操作的寄宿应用,进而可以对违规操作的寄宿应用的相应权限进行限制,提高了对寄宿应用的监管力度。As can be seen from FIG. 4, compared with the embodiment corresponding to FIG. 2, the flow 400 of the method for processing an image in this embodiment embodies the object requesting to use the first image as a boarding application. Therefore, instead of directly providing the first image to the boarding application, the solution described in this embodiment can provide the second image similar to the visual effect of the first image to the boarding application, thereby, without affecting the boarding application On the premise of using the image, hide the identification information of the boarding application and the user's identification information from the image, the boarding application and the user can be identified through the second image, thus, once the use of the illegal second image is found, you can The boarding application of the illegal operation is determined, and then the corresponding permissions of the boarding application of the illegal operation can be restricted, which improves the supervision of the boarding application.
下面参考图6,其示出了适于用来实现本公开的实施例的电子设备的计算机***600的结构示意图。图6示出的电子设备即为用来实现本公开的实施例的执行主体(即设备端),图6示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。Reference is now made to FIG. 6, which shows a schematic structural diagram of a computer system 600 suitable for implementing an electronic device of an embodiment of the present disclosure. The electronic device shown in FIG. 6 is the executive body (ie, device side) used to implement the embodiment of the present disclosure. The electronic device shown in FIG. 6 is only an example, and should not respond to the functions and scope of the embodiments of the present disclosure Bring any restrictions.
如图6所示,计算机***600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有***600操作所需的各种程序和数据。CPU 601、ROM 602以及RAM603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6, the computer system 600 includes a central processing unit (CPU) 601 that can be loaded into a random access memory (RAM) 603 from a program stored in a read-only memory (ROM) 602 or from a storage section 608 Instead, perform various appropriate actions and processing. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to the bus 604.
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。The following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc. ; And a communication section 609 including a network interface card such as a LAN card, a modem, and the like. The communication section 609 performs communication processing via a network such as the Internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed on the drive 610 as needed, so that the computer program read out therefrom is installed into the storage section 608 as needed.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。在该计算机程序被中央处理单元(CPU)601执行时,执行本公开的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication section 609, and/or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-described functions defined in the method of the present disclosure are executed.
需要说明的是,本公开所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal that is propagated in baseband or as part of a carrier wave, in which computer-readable program code is carried. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. . The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,所述程序设计语言包括面向目标的程序设计语言—诸如Python、Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)-连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, the programming languages including object-oriented programming languages such as Python, Java, Smalltalk, C++, and Including conventional procedural programming languages-such as "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In situations involving remote computers, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, through an Internet service provider Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图 中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the drawings illustrate the possible implementation architecture, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of code that contains one or more logic functions Executable instructions. It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks represented in succession may actually be executed in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented with dedicated hardware-based systems that perform specified functions or operations Or, it can be realized by a combination of dedicated hardware and computer instructions.
作为另一方面,本公开还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以单独存在,而未装配入该电子设备中。上述电子设备可以是软件也可以是硬件。当该电子设备为硬件时,可以是各种电子设备,包括但不限于终端设备,服务器等等。当该电子设备为软件时,可以安装在电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取请求使用第一图像的对象的标识信息;获取第一图像对应的第一图像矩阵;基于标识信息,变更第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵;基于第二图像矩阵,生成用于提供给对象的第二图像,其中,第二图像与第一图像的视觉效果相似,且第二图像具有确定对象的标识信息的功能。As another aspect, the present disclosure also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist alone without being assembled into the electronic device . The electronic device may be software or hardware. When the electronic device is hardware, it may be various electronic devices, including but not limited to terminal devices, servers, and the like. When the electronic device is software, it can be installed in the electronic device. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or as a single software or software module. There is no specific limitation here. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device is caused to: acquire identification information of an object requesting to use the first image; acquire the corresponding image of the first image A first image matrix; based on the identification information, changing the elements in the matrix area that meets the predetermined conditions in the first image matrix to obtain a second image matrix; based on the second image matrix, generating a second image for providing to the object, wherein, The second image has a similar visual effect to the first image, and the second image has the function of determining the identification information of the object.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only the preferred embodiment of the present disclosure and the explanation of the applied technical principles. It should be understood by those skilled in the art that the scope of the invention involved in this disclosure is not limited to a technical solution formed by a specific combination of the above technical features, but should also cover the above technical features or without departing from the above inventive concept. Other technical solutions formed by the arbitrary combination of equivalent features. For example, the above features and the technical features disclosed in the present disclosure (but not limited to) with similar functions are replaced with each other to form a technical solution.
Claims (16)
- 一种用于处理图像的方法,用于设备端,包括:A method for processing images for the device, including:获取请求使用第一图像的对象的标识信息;Obtain the identification information of the object requesting to use the first image;获取所述第一图像对应的第一图像矩阵;Acquiring a first image matrix corresponding to the first image;基于所述标识信息,变更所述第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵;Based on the identification information, changing the elements in the matrix area that meets the predetermined condition in the first image matrix to obtain a second image matrix;基于所述第二图像矩阵,生成用于提供给所述对象的第二图像,其中,所述第二图像与所述第一图像的视觉效果相似,且所述第二图像具有确定所述对象的标识信息的功能。Based on the second image matrix, a second image for providing the object is generated, wherein the second image has a similar visual effect to the first image, and the second image has a determination that the object The function of the identification information.
- 根据权利要求1所述的方法,其中,所述第一图像矩阵包括所述第一图像的频域矩阵,所述第一图像矩阵中符合预定条件的矩阵区域包括:所述第一图像矩阵中的中频和/或高频矩阵区域。The method according to claim 1, wherein the first image matrix includes a frequency domain matrix of the first image, and a matrix region in the first image matrix that meets a predetermined condition includes: in the first image matrix IF and/or HF matrix area.
- 根据权利要求1所述的方法,其中,所述第一图像矩阵包括所述第一图像的色彩矩阵,所述第一图像矩阵中符合预定条件的矩阵区域包括:所述色彩矩阵中经所述变更后对所述视觉效果的影响小于预设配置的矩阵区域。The method according to claim 1, wherein the first image matrix includes a color matrix of the first image, and a matrix area in the first image matrix that meets a predetermined condition includes: The influence on the visual effect after the change is smaller than the matrix area of the preset configuration.
- 根据权利要求1所述的方法,其中,请求使用所述第一图像的对象包括寄宿应用,所述第一图像的获取依赖于所述寄宿应用的宿主应用,所述寄宿应用的运行依赖于所述宿主应用。The method according to claim 1, wherein the object requesting to use the first image includes a host application, the acquisition of the first image depends on the host application of the host application, and the operation of the host application depends on all Describe the host application.
- 根据权利要求4所述的方法,其中,请求使用第一图像的对象的标识信息为请求使用第一图像的寄宿应用的标识信息;以及The method according to claim 4, wherein the identification information of the object requesting the use of the first image is the identification information of the host application requesting the use of the first image; and该方法还包括:The method also includes:所述寄宿应用响应于所述第一图像的读取的触发,请求所述宿主应用提供所述第一图像;The host application requests the host application to provide the first image in response to the trigger of reading the first image;所述宿主应用响应于所述寄宿应用的所述请求,获取所述第一图像;The host application acquires the first image in response to the request of the boarding application;其中,该方法在生成所述第二图像后还包括:After the method generates the second image, the method further includes:所述宿主应用将所述第二图像提供给所述寄宿应用。The host application provides the second image to the boarding application.
- 根据权利要求5所述的方法,其中,该方法还包括:The method according to claim 5, wherein the method further comprises:所述宿主应用呈现读取所述第一图像的授权请求;The host application presents an authorization request to read the first image;其中,所述获取所述第一图像,包括:Wherein, the acquiring the first image includes:响应于接收到用户对所述授权请求的许可,获取所述第一图像。In response to receiving the user's permission for the authorization request, the first image is acquired.
- 根据权利要求1所述的方法,其中,该方法用于服务端,获取请求使用第一图像的对象的标识信息包括:The method according to claim 1, wherein the method is used for a server, and acquiring identification information of an object requesting to use the first image includes:接收来自终端的图像使用请求,所述图像使用请求用于为所述对象请求使用所述第一图像;Receiving an image use request from a terminal, the image use request requesting to use the first image for the object;基于所述图像使用请求,获得所述对象的标识信息;Obtain identification information of the object based on the image use request;其中,该方法还包括:Among them, the method also includes:基于所述图像使用请求,获取所述第一图像。Based on the image use request, the first image is acquired.
- 根据权利要求1所述的方法,其中,所述第一图像来自用户,基于所述标识信息变更所述第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵,包括:The method according to claim 1, wherein the first image is from a user, and based on the identification information, changing elements in a matrix region of the first image matrix that meets a predetermined condition to obtain a second image matrix includes:基于所述对象的标识信息以及所述用户的标识信息,生成标记字符串,所述标记字符串具有确定所述对象的标识信息以及所述用户的标识信息的功能;Generating a tag string based on the identification information of the object and the identification information of the user, the tag string having a function of determining the identification information of the object and the identification information of the user;使用所述标记字符串中的字符所述第一图像矩阵中符合预定条件的矩阵区域中的元素,得到第二图像矩阵。Use the elements in the matrix region of the first image matrix that meet the predetermined condition using the characters in the mark character string to obtain a second image matrix.
- 根据权利要求1所述的方法,其中,所述获取所述第一图像对应的第一图像矩阵,包括:The method according to claim 1, wherein the acquiring the first image matrix corresponding to the first image comprises:对所述第一图像进行频域变换,获得所述第一图像的频域矩阵作为第一图像矩阵;Performing frequency domain transformation on the first image to obtain a frequency domain matrix of the first image as the first image matrix;其中,所述基于所述第二图像矩阵生成第二图像,包括:Wherein, generating the second image based on the second image matrix includes:对所述第二图像矩阵进行所述频域变换的逆变换,得到第二图像。Performing the inverse transform of the frequency domain transform on the second image matrix to obtain a second image.
- 根据权利要求4-9之一所述的方法,其中,所述第一图像包括:The method according to any one of claims 4-9, wherein the first image comprises:运行有所述宿主应用的终端存储的图像;An image stored in a terminal running the host application;支持所述宿主应用的服务端存储的图像;Support the image stored by the server of the host application;用户通过所述宿主应用发布的图像;The image released by the user through the host application;用户在所述宿主应用上使用的头像;The avatar used by the user on the host application;用户通过所述宿主应用发送的图像;和/或Images sent by the user through the host application; and/or用户通过所述宿主应用发布或发送的视频包括的视频帧。Video frames included in the video posted or sent by the user through the host application.
- 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, wherein the method further comprises:获取使用违规的第三图像;Obtain the third image of usage violation;尝试从所述第三图像中提取标识信息;Try to extract identification information from the third image;若从所述第三图像中提取出标识信息,关闭或指示关闭所提取出的标识信息对应的对象的相应权限。If the identification information is extracted from the third image, the corresponding authority of the object corresponding to the extracted identification information is closed or instructed to be closed.
- 根据权利要求11所述的方法,其中,所述对象包括寄宿应用,该方法用于终端,所述关闭所提取出的标识信息对应的对象的相应权限,包括:The method according to claim 11, wherein the object includes a boarding application, the method is used for a terminal, and the closing of the corresponding authority of the object corresponding to the extracted identification information includes:所述寄宿应用的宿主应用呈现安全提示信息,该安全提示信息用于提示所述寄宿应用存在对所述宿主应用提供的图像的违规使用;The host application of the host application presents security prompt information, and the security prompt information is used to alert the host application of illegal use of the image provided by the host application;响应于用户对所述安全提示信息指示的寄宿应用的权限限制操作的触发,关闭所述寄宿应用的相应权限。In response to the user triggering the permission limitation operation of the host application indicated by the security prompt information, the corresponding permission of the host application is closed.
- 根据权利要求11或12所述的方法,其中,所述相应权限包括对第一图像的获取权限。The method according to claim 11 or 12, wherein the corresponding authority includes an authority to acquire the first image.
- 根据权利要求11所述的方法,其中,所述尝试从所述第三图像中提取标识信息,包括:The method according to claim 11, wherein the attempt to extract the identification information from the third image includes:获取所述第三图像的第三图像矩阵;Acquiring a third image matrix of the third image;提取所述第三图像矩阵中符合所述预定条件的矩阵区域的元素;Extracting elements of the matrix area in the third image matrix that meet the predetermined condition;尝试基于所提取的元素识别对象的标识信息。Attempt to identify the identification information of the object based on the extracted elements.
- 一种电子设备,包括:An electronic device, including:一个或多个处理器;One or more processors;存储装置,其上存储有一个或多个程序,A storage device on which one or more programs are stored,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-14中任一所述的方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-14.
- 一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-14中任一所述的方法。A computer-readable medium on which a computer program is stored, wherein the program according to any one of claims 1-14 is implemented when the program is executed by a processor.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811631026.0 | 2018-12-29 | ||
CN201811631026.0A CN109670330A (en) | 2018-12-29 | 2018-12-29 | For handling method, electronic equipment and the computer-readable medium of image |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020135038A1 true WO2020135038A1 (en) | 2020-07-02 |
Family
ID=66147433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/124490 WO2020135038A1 (en) | 2018-12-29 | 2019-12-11 | Image processing method, electronic apparatus, and computer readable medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109670330A (en) |
WO (1) | WO2020135038A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113656813A (en) * | 2021-07-30 | 2021-11-16 | 深圳清华大学研究院 | Image processing method, system, equipment and storage medium based on anti-attack |
CN113706173A (en) * | 2021-08-31 | 2021-11-26 | 北京五八信息技术有限公司 | Information management method and device, electronic equipment and storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109670330A (en) * | 2018-12-29 | 2019-04-23 | 上海掌门科技有限公司 | For handling method, electronic equipment and the computer-readable medium of image |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100080410A1 (en) * | 2008-09-29 | 2010-04-01 | International Business Machines Corporation | Method and system for preventing use of a photograph in digital systems |
CN106485164A (en) * | 2016-09-27 | 2017-03-08 | 维沃移动通信有限公司 | A kind of image processing method and mobile terminal |
CN108804713A (en) * | 2018-06-29 | 2018-11-13 | 上海掌门科技有限公司 | Image output method, electronic equipment and computer-readable medium |
CN109670330A (en) * | 2018-12-29 | 2019-04-23 | 上海掌门科技有限公司 | For handling method, electronic equipment and the computer-readable medium of image |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104936000A (en) * | 2015-05-29 | 2015-09-23 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN108510424B (en) * | 2017-02-23 | 2022-11-29 | 腾讯科技(深圳)有限公司 | Image processing method and device |
-
2018
- 2018-12-29 CN CN201811631026.0A patent/CN109670330A/en active Pending
-
2019
- 2019-12-11 WO PCT/CN2019/124490 patent/WO2020135038A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100080410A1 (en) * | 2008-09-29 | 2010-04-01 | International Business Machines Corporation | Method and system for preventing use of a photograph in digital systems |
CN106485164A (en) * | 2016-09-27 | 2017-03-08 | 维沃移动通信有限公司 | A kind of image processing method and mobile terminal |
CN108804713A (en) * | 2018-06-29 | 2018-11-13 | 上海掌门科技有限公司 | Image output method, electronic equipment and computer-readable medium |
CN109670330A (en) * | 2018-12-29 | 2019-04-23 | 上海掌门科技有限公司 | For handling method, electronic equipment and the computer-readable medium of image |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113656813A (en) * | 2021-07-30 | 2021-11-16 | 深圳清华大学研究院 | Image processing method, system, equipment and storage medium based on anti-attack |
CN113656813B (en) * | 2021-07-30 | 2023-05-23 | 深圳清华大学研究院 | Image processing method, system, equipment and storage medium based on attack resistance |
CN113706173A (en) * | 2021-08-31 | 2021-11-26 | 北京五八信息技术有限公司 | Information management method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109670330A (en) | 2019-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240160683A1 (en) | Theft prevention for sensitive information | |
US9501657B2 (en) | Sensitive data protection during user interface automation testing systems and methods | |
WO2020135038A1 (en) | Image processing method, electronic apparatus, and computer readable medium | |
US11741264B2 (en) | Security systems and methods for social networking | |
WO2016026532A1 (en) | User authentication using a randomized keypad over a drm secured video path | |
US11582266B2 (en) | Method and system for protecting privacy of users in session recordings | |
US11212325B2 (en) | Collaborative browsing service using a cloud-based browser | |
US20170180822A1 (en) | Real-Time Watermarking of Video Content | |
US10528708B2 (en) | Prevention of unauthorized resource updates | |
US20080172750A1 (en) | Self validation of user authentication requests | |
CN107005411B (en) | Data management method, computer program therefor, recording medium thereof, user client for executing data management method, and security policy server | |
CN109218024B (en) | Method and device for controlling authority | |
US20150012746A1 (en) | Detecting user presence on secure in-band channels | |
US20200244459A1 (en) | Watermarking in a virtual desktop infrastructure environment | |
US11528301B1 (en) | Secure embedding of private content via a dynamically-set security policy | |
CN112434327B (en) | Information protection method and device and electronic equipment | |
US11526633B2 (en) | Media exfiltration prevention system | |
KR102016051B1 (en) | Main server providing video export service capable of tracing an leaking point and operation method thereof | |
CN108804713B (en) | Image output method, electronic device, and computer-readable medium | |
US9674203B2 (en) | File and bit location authentication | |
CN115952518B (en) | Data request method, device, electronic equipment and storage medium | |
CN109783305B (en) | Method and device for monitoring information | |
US11775695B2 (en) | Image redaction for a display device | |
CN113098889B (en) | Data processing method and system | |
US11200333B2 (en) | File exposure to an intended recipient |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19901763 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29.09.2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19901763 Country of ref document: EP Kind code of ref document: A1 |