WO2023087704A1 - 一种可回溯的图片授权方法及装置 - Google Patents

一种可回溯的图片授权方法及装置 Download PDF

Info

Publication number
WO2023087704A1
WO2023087704A1 PCT/CN2022/100550 CN2022100550W WO2023087704A1 WO 2023087704 A1 WO2023087704 A1 WO 2023087704A1 CN 2022100550 W CN2022100550 W CN 2022100550W WO 2023087704 A1 WO2023087704 A1 WO 2023087704A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
party application
user
authorization
signature
Prior art date
Application number
PCT/CN2022/100550
Other languages
English (en)
French (fr)
Inventor
李宗波
张卓韬
杨永帮
邬秋元
陈晓丹
张涛
宋超
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2023087704A1 publication Critical patent/WO2023087704A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Definitions

  • the present invention relates to the field of financial technology (Fintech), in particular to a traceable image authorization method and device.
  • the provider will upload the picture to the authorization service; the third-party application performs authentication in the authorization service, and after the authentication is passed, the authorization service will return the picture resource to the third-party application; based on the picture resource, The user will obtain the picture through the third-party application and use the picture on the third-party application.
  • the authorization service only authenticates the third-party application, not the user, which leads to security risks of stolen pictures and abuse by third-party applications; and after the third-party application obtains the picture, there is a risk of picture leakage , At present, it is impossible to determine the third-party application whose image leaked, which makes it impossible to prove that some third-party applications have image leakage behavior, and the security of images in authorized services is not high.
  • Embodiments of the present invention provide a traceable picture authorization method and device for implementation.
  • the embodiment of the present invention provides a traceable picture authorization method, including:
  • the picture acquisition request includes picture indication information and a user identification;
  • the third-party application is a third-party application that meets the first authorization condition;
  • the authorization code is used to represent the authorization of the user The picture information obtained by the third-party application at the first time;
  • determining whether the user satisfies the authorization conditions according to the user ID is equivalent to directly verifying the authorization of the user through the user ID, so as to avoid the potential safety hazard of the picture being stolen and improve the security of the picture use; and send
  • the picture given to the application organization is the second picture generated based on the first picture, and the second picture is recorded with an authorization code, which represents the picture information obtained by the third-party application authorized by the user at the first time, that is, when the When the second picture is a leaked picture, the third-party application with security risks can be determined according to the authorization code recorded on the second picture, so as to realize the traceability of the use of the picture and trace the third-party application of the leaked picture.
  • determining that the third-party application satisfies the first authorization condition is as follows, including:
  • the second time stamp is determined periodically
  • the second signature is determined by the third-party application according to its own application identification, application key, second timestamp and address of the receiving image;
  • the first signature is consistent with the second signature, it is determined that the third-party application meets the first authorization condition, and a login credential is generated, and the login credential is sent to the third-party application; the login credential is used to communicate with the Third-Party Application Communications.
  • the third-party application is periodically authorized through the second time stamp, so as to ensure the security and correctness of the third-party application, and prevent traceability failure when tracing the third-party application that leaked the picture.
  • determining that the user satisfies the second authorization condition according to the user identifier includes:
  • the certificate of deposit is that after the user uploads the picture, the corresponding relationship between the user identification and the picture indication information is uploaded to the block chain service.
  • determining the authorization code according to the picture indication information, the third-party application identifier, and the first timestamp includes:
  • the authorization code is determined through the image indication information, the third-party application identifier, and the first time stamp, so that the authorization code represents the image information obtained by the third-party application authorized by the user at the first time, that is, when it is determined that the second picture is a leaked picture, the third-party application with a security risk can be determined according to the authorization code recorded on the second picture, so that the traceability of the use of the picture can be realized, and the third-party application that leaked the picture can be traced back.
  • generating a second picture recorded with the authorization code includes:
  • the image processing method is generally to separate the RGB (red, green, and blue) components of the image, thereby obtaining the matrix corresponding to red, green, and blue, that is, three matrices, and then calculating each matrix separately, so as to achieve A blind watermark is added to each matrix, and finally the three matrices after adding the blind watermark are combined to obtain a second picture.
  • the first grayscale matrix is determined by calculating the grayscale difference of the first picture; the second picture is obtained based on the first grayscale matrix, thereby reducing the amount of calculation and improving the efficiency of picture processing.
  • determining the signature picture according to the authorization code includes:
  • the signature picture is determined in combination with the characters to be displayed, the size of the signature picture, the font size of the characters to be displayed, and a preset picture format.
  • the size of the signature picture and the font size of the characters to be displayed are determined based on the first grayscale matrix, so as to improve the display effect of the signature picture in the first picture.
  • the signature picture is superimposed on the second spectrum matrix to obtain a third spectrum matrix, including:
  • For any quadrant of the second spectrum matrix determine the superposition position according to the center point of the second spectrum matrix and the diagonal point of the center point of the second spectrum matrix in the quadrant;
  • the signature picture is superimposed on the second spectrum matrix through a proportional scaling algorithm to obtain a third spectrum matrix.
  • the position of the signature picture in the first picture is determined based on the first grayscale matrix, so as to improve the position effect of the signature picture in the first picture.
  • an embodiment of the present invention provides a traceable image authorization device, including:
  • An acquisition module configured to acquire a picture acquisition request sent by the user through a third-party application; the picture acquisition request includes picture indication information and a user identification; the third-party application is a third-party application that meets the first authorization condition;
  • a processing module configured to determine an authorization code according to the picture indication information, a third-party application identifier, and a first time stamp after determining that the user satisfies the second authorization condition according to the user identification; the authorization code is used to represent The picture information obtained by the third-party application authorized by the user at the first time;
  • processing module is specifically used for:
  • the second time stamp is determined periodically
  • the control acquisition module acquires the second signature sent by the third-party application; the second signature is determined by the third-party application according to its own application identification, application key, second time stamp and address of the received picture;
  • the first signature is consistent with the second signature, it is determined that the third-party application meets the first authorization condition, and a login credential is generated, and the login credential is sent to the third-party application; the login credential is used to communicate with the Third-Party Application Communications.
  • processing module is specifically used for:
  • the certificate of deposit is that after the user uploads the picture, the corresponding relationship between the user identification and the picture indication information is uploaded to the block chain service.
  • processing module is specifically used for:
  • processing module is specifically used for:
  • processing module is specifically used for:
  • the signature picture is determined in combination with the characters to be displayed, the size of the signature picture, the font size of the characters to be displayed, and a preset picture format.
  • processing module is specifically used for:
  • For any quadrant of the second spectrum matrix determine the superposition position according to the center point of the second spectrum matrix and the diagonal point of the center point of the second spectrum matrix in the quadrant;
  • the signature picture is superimposed on the second spectrum matrix through a proportional scaling algorithm to obtain a third spectrum matrix.
  • an embodiment of the present invention also provides a computer device, including:
  • the processor is configured to call the program instructions stored in the memory, and execute the above-mentioned traceable picture authorization method according to the obtained program.
  • the embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make a computer execute the above-mentioned traceable picture authorization method .
  • FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a traceable picture authorization method provided by an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a first picture provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a signature image provided by an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a picture corresponding to a second grayscale matrix provided by an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a second picture provided by an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an enlarged second picture provided by an embodiment of the present invention.
  • Fig. 8 is a schematic structural diagram of a traceable picture authorization device provided by an embodiment of the present invention.
  • Picture bed service The user uploads the picture to the picture bed service, and the software APP obtains the picture through the picture storage address (such as a public network URL (Uniform Resource Locator, Uniform Resource Locator)) after passing the picture bed service's authentication.
  • picture storage address such as a public network URL (Uniform Resource Locator, Uniform Resource Locator)
  • Client-based authorization service If the client is WeChat, for any WeChat official account (small program), the user authorizes the official account on the display interface, so that the official account can be authorized from the server (or on the client) Callback) in the public network URL to get the picture.
  • FIG. 1 exemplarily shows a system architecture applicable to the embodiment of the present invention, and the system architecture includes a picture authorization service 110 , a user 120 , a third-party application 130 , a storage service 140 and a blockchain service 150 .
  • the picture authorization service 110 is used to obtain the picture acquisition request sent by the user through the third-party application; perform hash operation on the picture indication information, the third-party application identification and the first timestamp to determine the authorization code;
  • the picture indication information, the third-party application identifier and the first time stamp are packaged into a transaction and sent to the blockchain service 150;
  • the first picture corresponding to the picture indication information is obtained according to the picture indication information, and based on the first picture , generate a second picture recorded with the authorization code; and send the second picture to the third-party application 130 .
  • the user 120 is used to authorize the third-party application 130, specifically, obtain the verification information sent by the picture authorization service 110, and then feed back the response information corresponding to the verification information.
  • the third-party application 130 is configured to send a picture acquisition request to the picture authorization service 110 and receive the second picture sent by the picture authorization service 110 .
  • the storage service 140 is used to store the first picture and related information of the third-party application 130 , such as the service address for receiving the second picture, the third-party application identification and the secret key of the third-party application 130 , and the like.
  • the blockchain service 150 is configured to upload the transaction to the blockchain, and the transaction includes information such as an authorization code, the picture indication information, the third-party application identifier, and the first timestamp.
  • FIG. 1 is only an example, which is not limited in this embodiment of the present invention.
  • FIG. 2 exemplarily shows a schematic flowchart of a traceable picture authorization method provided by an embodiment of the present invention, and the process can be executed by a traceable picture authorization device.
  • the process specifically includes:
  • Step 210 acquire the picture acquisition request sent by the user through the third-party application.
  • the picture acquisition request includes picture indication information and a user identifier;
  • the third-party application is a third-party application that satisfies the first authorization condition.
  • Step 220 After determining that the user satisfies the second authorization condition according to the user identifier, determine an authorization code according to the picture indication information, the third-party application identifier, and the first time stamp.
  • the authorization code is used to represent the picture information that the user authorizes the third-party application to acquire at the first time.
  • Step 230 Obtain a first picture corresponding to the picture indication information according to the picture indication information, and generate a second picture in which the authorization code is recorded based on the first picture.
  • the first grayscale matrix is obtained by performing grayscale difference calculation on the first picture, and the second picture is determined based on the first grayscale matrix.
  • Step 240 sending the second picture to the third-party application.
  • the user registers and uploads pictures in the picture authorization service; wherein, the registration uses OTP (One Time Password, one-time password) technology;
  • OTP One Time Password, one-time password
  • the verification code is fed back to the picture authorization service; after the verification code is passed, the picture authorization service creates a user ID and sets a password.
  • the OTP technology can also be other OTP methods such as mailboxes, which are not specifically limited here.
  • the image authorization service is connected to the storage service.
  • the storage service stores file types, and each file type corresponds to one or more images.
  • the file types include but are not limited to ID cards, bank cards, driver's licenses, driving licenses, business licenses, Real estate certificate, household registration book, social security card, etc.
  • users can choose built-in picture types or customize picture types. For any type of file, you can customize the settings, such as: the file type cannot be repeated, the maximum number of pictures stored in a type of file is 5, etc.
  • each picture is associated with the corresponding picture indication information, so that the picture authorization service can obtain the first picture corresponding to the picture indication information through the picture indication information;
  • the picture indication information includes but is not limited to a picture identification (identity document, ID) and the Md5 (Message-Digest Algorithm) value of the picture.
  • the picture authorization service After obtaining the picture uploaded by the user, the picture authorization service uploads the picture to the block chain service; then the block chain service determines the deposit certificate according to the user identification and the picture indication information, and sends the deposit certificate to Image Licensing Service.
  • the picture authorization service receives the certificate of deposit certificate sent by the blockchain service, and constructs the association relationship between the certificate of deposit certificate and the picture indication information; the association relationship is used to determine the deposit certificate according to the picture indication information credentials. In order to ensure that other users cannot obtain the pictures uploaded by the user, the privacy and security of the user are guaranteed.
  • step 210 it is determined that the third-party application satisfies the first authorization condition in the following manner:
  • the second signature is determined by the third-party application according to its own application identification, application key, second timestamp and address of the received picture; if the first signature is consistent with the second signature, then determine the third-party application
  • the first authorization condition is met, and a login credential is generated, and the login credential is sent to the third-party application; the login credential is used to communicate with the third-party application.
  • the image authorization service records the third-party application identification (such as ID), the application key of the third-party application, and the address of receiving the image (such as the email address of the user, the storage data address corresponding to the third-party application, etc.), and the image authorization service Periodically determine the first signature R1 according to the third-party application identifier, the third-party application key, the second time stamp (for example, at 2 o'clock, the period is two hours) and the address of the receiving picture, and sort by the preset field names.
  • the third-party application identification such as ID
  • the application key of the third-party application the address of receiving the image
  • the image authorization service Periodically determine the first signature R1 according to the third-party application identifier, the third-party application key, the second time stamp (for example, at 2 o'clock, the period is two hours) and the address of the receiving picture, and sort by the preset field names.
  • the third-party application determines the second signature R2 according to the third-party application identification, the third-party application key, the second time stamp (such as 2 o'clock, the cycle is two hours) and the address of the receiving picture, and sorts the second signature R2 according to the field name, and sends the second signature R2 to R2 sends to the image licensing service.
  • the second time stamp such as 2 o'clock, the cycle is two hours
  • the image authorization service determines that the first signature R1 is consistent with the second signature R2, it will generate a login credential TOKEN and send the TOKEN to the third-party application, so that the subsequent third-party application will carry the TOKEN when communicating with the image authorization service.
  • the third-party application communicates with the image authorization service normally.
  • step 220 it is determined according to OTP technology that the user satisfies the second authorization condition, specifically, sending verification information to the user through the user ID; if the verification information sent by the user is obtained corresponding to response information, and it is determined that the corresponding relationship between the user’s identification and the picture indication information is recorded in the certificate of deposit, then it is determined that the user meets the authorization conditions; the certificate of deposit is the , uploading the corresponding relationship between the user identification and the picture indication information to the blockchain service.
  • the user enters the mobile phone number in the third-party application, and after the user enters, receives the corresponding verification code, and sends the verification code to the image authorization service.
  • the picture authorization service verifies the verification code, and determines whether there is a corresponding relationship between the user's logo and the picture indication information recorded in the certificate deposit certificate through the user's ID. If it is confirmed that there is in the record and the verification code passes, it is determined that the user meets Second authorization condition.
  • the authorization code representing the third-party application After determining that the user satisfies the second authorization condition, determine the authorization code representing the third-party application through a preset hash algorithm, specifically, hash the image indication information, the third-party application identifier, and the first timestamp Calculate and determine the authorization code; and package the authorization code, picture indication information, third-party application identification and the first timestamp into a transaction and send it to the block chain service; wherein, the transaction is used to trace back the user authorization according to the authorization code The picture information obtained by the third-party application in the first time.
  • a preset hash algorithm specifically, hash the image indication information, the third-party application identifier, and the first timestamp Calculate and determine the authorization code
  • the authorization code is obtained; then the authorization code is combined with the picture indication information, the third-party application identification and the first time stamp Establish a corresponding relationship and package it into a transaction and upload it to the blockchain service.
  • step 230 after the first picture corresponding to the picture indication information is acquired according to the picture indication information in the storage service, in a practicable manner, the RGB (red, green and blue) components of the first picture are separated, and then After adding a blind watermark to each component, they are combined to obtain the second picture.
  • the RGB (red, green and blue) components of the first picture are separated, and then After adding a blind watermark to each component, they are combined to obtain the second picture.
  • the second picture is obtained by grayscale difference calculation, specifically, the grayscale difference calculation is performed on the first picture to determine the first grayscale matrix; the first grayscale matrix Perform Fourier transform to obtain a first spectrum matrix; perform spectrum diagonal transformation on the first spectrum matrix to obtain a second spectrum matrix; determine a signature picture according to the authorization code; superimpose the signature picture on the second spectrum
  • the third spectrum matrix is obtained; the phase matrix is obtained by calculating the first spectrum matrix, and the second grayscale matrix is determined according to the phase matrix and the third spectrum matrix; based on each of the first pictures pixels, and update the color of each pixel in the second grayscale matrix to obtain the second picture.
  • FIG. 3 exemplarily shows a schematic diagram of a first picture. Based on the illustration in FIG. 3 , the first grayscale matrix W1 is determined according to the following formula (1);
  • the first grayscale matrix W1 When determining the first grayscale matrix W1, the first grayscale matrix W1 is limited according to the preset rules, such as limiting the length and width of the first grayscale matrix W1 to the 10th power of 2, and if it exceeds, the ratio is adopted
  • the scaling method compresses the first grayscale matrix W1; for edges whose length and width are not integer powers of 2, the first grayscale matrix is filled to the integer power of 2 by filling 0; such as the first grayscale matrix
  • the length of W1 is 7 dimensions, and the length of the first grayscale matrix W1 is complemented by 0 to 8 dimensions, that is, the value of the eighth dimension of the first grayscale matrix W1 is 0.
  • the signature picture When determining the signature picture, it is necessary to determine the characters to be displayed in the signature picture, the font size of the characters to be displayed, and the size of the signature picture; specifically, determine the signature picture to be displayed according to the third-party application identification and the authorization code character; determine the size of the signature picture according to the size of the first grayscale matrix; determine the font size of the character to be displayed according to the size of the signature picture and the length of the character to be displayed; combine the character to be displayed , the size of the signature picture, the font size of the characters to be displayed, and the preset picture format determine the signature picture; wherein, the signature picture can be a blind watermark or a visible watermark, which is not specifically limited here.
  • the characters to be displayed can be a complete authorization code, a partial authorization code, etc.; ;If the characters to be displayed include 6 consecutive digits in the third application identifier, the last four digits of the authorization code; wherein, part of the third application identifier is used to map the corresponding complete authorization code, that is, for any third application identifier , the last four digits of the authorization code are not repeated to ensure the uniqueness of the data.
  • the size (including length and width) of the first grayscale matrix W1 based on the minimum value L (if the width is smaller than the length, then the width is the minimum value), 1/4 of the minimum value L is used as the size of the signature picture.
  • Figure 4 exemplarily shows a schematic diagram of a signature picture, as shown in Figure 4, "4N2D” Part of the authorization code, "JA4ASD” part of the third-party application logo, the signature picture is black and white.
  • the signature picture After obtaining the signature picture, determine the superposition position of the signature picture, and then superimpose the signature picture on the first picture; specifically, for any quadrant of the second spectrum matrix, according to the center point of the second spectrum matrix and The diagonal points of the central point of the second spectrum matrix in the quadrant determine the superposition position; based on the superposition position, the signature picture is superimposed on the second spectrum matrix through a proportional scaling algorithm to obtain the third spectrum matrix.
  • the median between the value of the upper left corner point (P1) of the first quadrant of the second spectrum matrix and the value of the center point (P2) of the second spectrum matrix then take P1 to P2 according to the binary search method The point on the line that is closest to the median. Use this point as the center point of the signature image when it is superimposed.
  • the second spectral matrix M2 is recalculated in a manner of proportional scaling (such as multiplying the real part and the imaginary part of the imaginary number by the same coefficient) , to reduce the impact on the first matrix and have a better display effect when backtracking.
  • the third spectral matrix M3 After obtaining the third spectral matrix M3, based on the above-mentioned spectral diagonal conversion, the third spectral matrix M3 is restored, and after obtaining the fourth spectral matrix M4, after bispectral reconstruction is performed according to the fourth spectral matrix M4 and the phase matrix Perform inverse Fourier transform to obtain the second grayscale matrix W2.
  • FIG. 5 exemplarily shows a schematic diagram of a picture corresponding to the second grayscale matrix, as shown in FIG. 5 , which includes signature picture information.
  • FIG. 6 exemplarily shows a second The schematic diagram of the picture, as shown in Figure 6, the second picture is indistinguishable from the first picture under normal circumstances, but after zooming in, it will be found that there are more wavy dark watermarks in the second picture
  • FIG. 7 exemplarily shows a schematic diagram of an enlarged second picture. As shown in FIG. 7 , the picture has a wavy dark watermark.
  • the signature picture in Figure 5 is obtained.
  • the third-party application that leaks the "ID card picture” and the information corresponding to the "ID card picture” (such as Consumer ID, first timestamp, etc.).
  • FIG. 8 exemplarily shows a schematic structural diagram of a traceable picture authorization device provided by an embodiment of the present invention, and the device can execute the flow of a traceable picture authorization method.
  • the device specifically includes:
  • An acquisition module 810 configured to acquire a picture acquisition request sent by the user through a third-party application; the picture acquisition request includes picture indication information and a user identification; the third-party application is a third-party application that meets the first authorization condition;
  • the processing module 820 is configured to determine an authorization code according to the picture indication information, a third-party application identifier, and a first time stamp after determining that the user satisfies the second authorization condition according to the user identifier; the authorization code is used for Representing the image information obtained by the third-party application authorized by the user at the first time;
  • processing module 820 is specifically configured to:
  • the second time stamp is determined periodically
  • the control obtaining module 810 obtains the second signature sent by the third-party application; the second signature is determined by the third-party application according to its own application identification, application key, second time stamp and address of the received image;
  • the first signature is consistent with the second signature, it is determined that the third-party application meets the first authorization condition, and a login credential is generated, and the login credential is sent to the third-party application; the login credential is used to communicate with the Third-Party Application Communications.
  • processing module 820 is specifically configured to:
  • the certificate of deposit is that after the user uploads the picture, the corresponding relationship between the user identification and the picture indication information is uploaded to the block chain service.
  • processing module 820 is specifically configured to:
  • processing module 820 is specifically configured to:
  • processing module 820 is specifically configured to:
  • the signature picture is determined in combination with the characters to be displayed, the size of the signature picture, the font size of the characters to be displayed, and a preset picture format.
  • processing module 820 is specifically configured to:
  • For any quadrant of the second spectrum matrix determine the superposition position according to the center point of the second spectrum matrix and the diagonal point of the center point of the second spectrum matrix in the quadrant;
  • the signature picture is superimposed on the second spectrum matrix through a proportional scaling algorithm to obtain a third spectrum matrix.
  • the embodiment of the present invention also provides a computer device, including:
  • the processor is configured to call the program instructions stored in the memory, and execute the above-mentioned traceable picture authorization method according to the obtained program.
  • an embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make a computer execute the above-mentioned traceable picture authorization method.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)
  • Storage Device Security (AREA)

Abstract

本发明公开了一种可回溯的图片授权方法及装置,包括:获取使用方通过第三方应用发送的图片获取请求;图片获取请求包括图片指示信息和使用方标识;第三方应用为满足第一授权条件的第三方应用;根据使用方标识确定使用方满足第二授权条件之后,根据图片指示信息、第三方应用标识和第一时间戳确定授权码;授权码用于表征使用方授权第三方应用在第一时间获取的图片信息;根据图片指示信息获取图片指示信息对应的第一图片,并基于第一图片,生成记录有授权码的第二图片;将第二图片发送至第三方应用,实现可以根据第二图片上记录的授权码确定出存在安全隐患的第三方应用,实现图片使用的可回溯性,实现追溯泄露图片的第三方应用。

Description

一种可回溯的图片授权方法及装置
相关申请的交叉引用
本申请要求在2021年11月16日提交中国专利局、申请号为202111353298.0、申请名称为“一种可回溯的图片授权方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及金融科技(Fintech)领域,尤其涉及一种可回溯的图片授权方法及装置。
背景技术
随着计算机技术的发展,越来越多的技术(例如:区块链、云计算或大数据)应用在金融领域,传统金融业正在逐步向金融科技转变,大数据技术也不例外,但由于金融、支付行业的安全性、实时性要求,也对大数据技术提出了更高的要求。
在现有技术中,提供方会将图片上传到授权服务中;第三方应用在授权服务中进行鉴权,在鉴权通过后,授权服务会将图片资源返回给第三方应用;基于图片资源,使用方会通过第三方应用获取图片,并在第三方应用上使用该图片。
然而,授权服务仅会对第三方应用进行鉴权,并非对使用方进行鉴权,导致图片存在被盗用以及第三方应用滥用的安全隐患;且第三方应用在得到图片后,存在图片泄露的风险,目前,无法确定图片泄露的第三方应用,导致无法证明某些第三方应用存在图片泄露的行为,授权服务中的图片安全性不高。
发明内容
本发明实施例提供一种可回溯的图片授权方法及装置,用于实现。
第一方面,本发明实施例提供一种可回溯的图片授权方法,包括:
获取使用方通过第三方应用发送的图片获取请求;所述图片获取请求包括图片指示信息和使用方标识;所述第三方应用为满足第一授权条件的第三方应用;
根据所述使用方标识确定所述使用方满足第二授权条件之后,根据所述图片指示信息、第三方应用标识和第一时间戳确定授权码;所述授权码用于表征所述使用方授权第三方应用在第一时间获取的图片信息;
根据所述图片指示信息获取所述图片指示信息对应的第一图片,并基于所述第一图片,生成记录有所述授权码的第二图片;
将所述第二图片发送至所述第三方应用。
上述技术方案中,根据使用方标识确定使用方是否满足授权条件,相当于直接通过使用方标识对使用方进行授权验证,以此避免图片被盗用的安全隐患,提高图片使用的安全性;且发送给应用机构的图片是基于第一图片生成的第二图片,第二图片记录有授权码,授权码表征了使用方授权的第三方应用在第一时间获取的图片信息,也就是说,当确定第二图片为泄露图片时,可以根据第二图片上记录的授权码确定出存在安全隐患的第三方应用,实现图片使用的可回溯性,实现追溯泄露图片的第三方应用。
可选的,通过如下方式确定所述第三方应用满足第一授权条件,包括:
根据所述第三方应用标识、第三方应用密钥、第二时间戳和接收图片地址确定第一签名;所述第二时间戳是周期性确定的;
获取所述第三方应用发送的第二签名;所述第二签名是所述第三方应用根据自身的应用标识、应用密钥、第二时间戳和接收图片地址确定的;
若第一签名与第二签名一致,则确定所述第三方应用满足第一授权条件,并生成登录凭证,将所述登录凭证发送至所述第三方应用;所述登录凭证用于与所述第三方应用通信。
上述技术方案中,通过第二时间戳周期性地对第三方应用授权,以保证第三方应用的安全性和正确性,防止追溯泄露图片的第三方应用时追溯失败。
可选的,根据所述使用方标识确定所述使用方满足第二授权条件,包括:
通过所述使用方标识向所述使用方发送验证信息;
若获取所述使用方发送的所述验证信息对应的响应信息,且确定存证凭据中记录有所述使用方标识与所述图片指示信息的对应关系,则确定所述使用方满足第二授权条件;所述存证凭据是所述使用方上传图片后,将所述使用方标识和所述图片指示信息的对应关系上传至区块链服务。
上述技术方案中,通过向使用方发送验证信息,来确认使用方是否是合法用户,相当于直接通过使用方标识对使用方进行授权验证,以此避免图片被盗用的安全隐患,提高图片使用的安全性。
可选的,根据所述图片指示信息和第三方应用标识和第一时间戳确定授权码,包括:
对所述图片指示信息、所述第三方应用标识和第一时间戳进行哈希运算,确定授权码;
根据所述图片指示信息和第三方应用标识确定授权码之后,还包括:
将所述授权码、所述图片指示信息、所述第三方应用标识和所述第一时间戳打包成交易发送至区块链服务;所述交易用于根据授权码回溯所述使用方授权的第三方应用在第一时间获取的图片信息。
上述技术方案中,通过图片指示信息、第三方应用标识和第一时间戳确定授权码,以使授权码表征了使用方授权的第三方应用在第一时间获取的图片信息,也就是说,当确定第二图片为泄露图片时,可以根据第二图片上记 录的授权码确定出存在安全隐患的第三方应用,实现图片使用的可回溯性,实现追溯泄露图片的第三方应用。
可选的,基于所述第一图片,生成记录有所述授权码的第二图片,包括:
对所述第一图片进行灰度差值计算,确定第一灰度矩阵;
将所述第一灰度矩阵进行傅里叶变换得到第一频谱矩阵;
对所述第一频谱矩阵进行频谱对角转换得到第二频谱矩阵;
根据所述授权码确定签名图片;
将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵;
对所述第一频谱矩阵进行计算得到相位矩阵,并根据所述相位矩阵和所述第三频谱矩阵确定第二灰度矩阵;
基于所述第一图片中每个像素的颜色,更新所述第二灰度矩阵中每个像素的颜色,得到所述第二图片。
现有技术方案中,对图片的处理方式一般为将图片的RGB(红绿蓝)分量做分离,从而得到红绿蓝对应的矩阵,即三个矩阵,然后分别对各矩阵进行计算,实现在各矩阵中添加盲水印,最后将添加盲水印后的三个矩阵进行合并,从而得到第二图片。而本发明是通过对第一图片进行灰度差值计算,确定第一灰度矩阵;基于第一灰度矩阵得到第二图片,以此减少了计算量,提升了图片处理的效率。
可选的,根据所述授权码确定签名图片,包括:
根据所述第三方应用标识和所述授权码确定所述签名图片中待显示字符;
根据所述第一灰度矩阵的尺寸确定所述签名图片的尺寸;
根据所述签名图片的尺寸和所述待显示字符长度确定所述待显示字符的字体大小;
结合所述待显示字符、所述签名图片的尺寸、所述待显示字符的字体大小以及预设图片格式确定所述签名图片。
上述技术方案中,基于第一灰度矩阵确定签名图片的尺寸和待显示字符的字体大小,以提升签名图片在第一图片中的显示效果。
可选的,将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵,包括:
针对所述第二频谱矩阵的任一象限,根据所述第二频谱矩阵的中心点和所述象限中所述第二频谱矩阵的中心点的对角点确定叠加位置;
基于所述叠加位置,通过等比缩放算法将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵。
上述技术方案中,基于第一灰度矩阵确定签名图片的在第一图片中的位置,以提升签名图片在第一图片中的位置效果。
第二方面,本发明实施例提供一种可回溯的图片授权装置,包括:
获取模块,用于获取使用方通过第三方应用发送的图片获取请求;所述图片获取请求包括图片指示信息和使用方标识;所述第三方应用为满足第一授权条件的第三方应用;
处理模块,用于根据所述使用方标识确定所述使用方满足第二授权条件 之后,根据所述图片指示信息、第三方应用标识和第一时间戳确定授权码;所述授权码用于表征所述使用方授权第三方应用在第一时间获取的图片信息;
根据所述图片指示信息获取所述图片指示信息对应的第一图片,并基于所述第一图片,生成记录有所述授权码的第二图片;
将所述第二图片发送至所述第三方应用。
可选的,所述处理模块具体用于:
根据所述第三方应用标识、第三方应用密钥、第二时间戳和接收图片地址确定第一签名;所述第二时间戳是周期性确定的;
控制获取模块获取所述第三方应用发送的第二签名;所述第二签名是所述第三方应用根据自身的应用标识、应用密钥、第二时间戳和接收图片地址确定的;
若第一签名与第二签名一致,则确定所述第三方应用满足第一授权条件,并生成登录凭证,将所述登录凭证发送至所述第三方应用;所述登录凭证用于与所述第三方应用通信。
可选的,所述处理模块具体用于:
通过所述使用方标识向所述使用方发送验证信息;
若获取所述使用方发送的所述验证信息对应的响应信息,且确定存证凭据中记录有所述使用方标识与所述图片指示信息的对应关系,则确定所述使用方满足第二授权条件;所述存证凭据是所述使用方上传图片后,将所述使用方标识和所述图片指示信息的对应关系上传至区块链服务。
可选的,所述处理模块具体用于:
对所述图片指示信息、所述第三方应用标识和第一时间戳进行哈希运算,确定授权码;
根据所述图片指示信息和第三方应用标识确定授权码之后,还包括:
将所述授权码、所述图片指示信息、所述第三方应用标识和所述第一时间戳打包成交易发送至区块链服务;所述交易用于根据授权码回溯所述使用方授权的第三方应用在第一时间获取的图片信息。
可选的,所述处理模块具体用于:
对所述第一图片进行灰度差值计算,确定第一灰度矩阵;
将所述第一灰度矩阵进行傅里叶变换得到第一频谱矩阵;
对所述第一频谱矩阵进行频谱对角转换得到第二频谱矩阵;
根据所述授权码确定签名图片;
将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵;
对所述第一频谱矩阵进行计算得到相位矩阵,并根据所述相位矩阵和所述第三频谱矩阵确定第二灰度矩阵;
基于所述第一图片中每个像素的颜色,更新所述第二灰度矩阵中每个像素的颜色,得到所述第二图片。
可选的,所述处理模块具体用于:
根据所述第三方应用标识和所述授权码确定所述签名图片中待显示字符;
根据所述第一灰度矩阵的尺寸确定所述签名图片的尺寸;
根据所述签名图片的尺寸和所述待显示字符长度确定所述待显示字符的字体大小;
结合所述待显示字符、所述签名图片的尺寸、所述待显示字符的字体大小以及预设图片格式确定所述签名图片。
可选的,所述处理模块具体用于:
针对所述第二频谱矩阵的任一象限,根据所述第二频谱矩阵的中心点和所述象限中所述第二频谱矩阵的中心点的对角点确定叠加位置;
基于所述叠加位置,通过等比缩放算法将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵。
第三方面,本发明实施例还提供一种计算机设备,包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述可回溯的图片授权方法。
第四方面,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行上述可回溯的图片授权方法。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种系统架构示意图;
图2为本发明实施例提供的一种可回溯的图片授权方法的流程示意图;
图3为本发明实施例提供的一种第一图片的示意图;
图4为本发明实施例提供的一种签名图片的示意图;
图5为本发明实施例提供的一种第二灰度矩阵对应的图片示意图;
图6为本发明实施例提供的一种第二图片的示意图;
图7为本发明实施例提供的一种放大后的第二图片的示意图;
图8为本发明实施例提供的一种可回溯的图片授权装置的结构示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
随着网络时代的发展,各式各样的软件APP(application,应用程序)层 出不穷,为了防止用户恶意使用软件APP,且对恶意用户进行追踪,软件APP一般通过对用户进行真实身份认证来实现。
现有技术中,用户每进行一次身份认证,都需要将本地的身份证图片上传至软件APP中,导致用户重复操作,且本地保留身份证图片存在一定的安全隐患,安全性不高。
为了避免用户重复上传图片,目前有如下两种方法用于实现将图片发送至软件APP中使用。
1、图床服务:用户将图片上传至图床服务,软件APP在通过图床服务的鉴权之后,通过图片存储地址(如公网URL(Uniform Resource Locator,统一资源定位器))获取图片。
2、基于客户端的授权服务:如客户端为微信,针对任一微信公众号(小程序),使用方在显示界面上对公众号进行授权,以使公众号从服务端(或在客户端授权回调)中公网URL,从而获取图片。
但是在上述方法1中,无法实现对需要获取图片的软件APP进行授权,例如,用户上传某张图片到图床平台,用户与图床服务的交互已经结束。软件APP在获取图片时,仅需要与图床服务交互即可,而无需依赖用户。也就是说用户无法指定哪些软件APP有获取图片的权限(或者用户上传的时候甚至不知道哪些软件APP可以获取图片),导致用户上传的图片存在安全性问题。
在上述方法2中,需要依托于具体的可信客户端(如微信、支付宝等)配合,使用场景相对受限,不适合作为公共服务。且仅是对客户端下的小程序进行授权,并未对使用方进行授权,无法保证使用方的安全性。
进一步地,上述两种方法中共同存在的问题在于,若授权在软件APP中的图片被软件APP泄露,无法回溯泄露图片的软件APP。
图1示例性的示出了本发明实施例所适用的一种系统架构,该系统架构包括图片授权服务110、使用方120、第三方应用130、存储服务140和区块链服务150。
其中,图片授权服务110,用于获取使用方通过第三方应用发送的图片获取请求;对图片指示信息、第三方应用标识和第一时间戳进行哈希运算,确定授权码;将授权码、所述图片指示信息、第三方应用标识和第一时间戳打包成交易发送至区块链服务150;根据所述图片指示信息获取所述图片指示信息对应的第一图片,并基于所述第一图片,生成记录有所述授权码的第二图片;将第二图片发送至第三方应用130。
使用方120,用于对第三方应用130进行授权,具体的,获取图片授权服务110发送的验证信息,然后反馈验证信息对应的响应信息。
第三方应用130,用于向图片授权服务110发送图片获取请求,并接收图片授权服务110发送的第二图片。
存储服务140,用于存储第一图片和第三方应用130的相关信息,如接收第二图片的服务地址、第三方应用标识已经第三方应用130的秘钥等。
区块链服务150,用于将交易上传至区块链中,所述交易中包括授权码、所述图片指示信息、所述第三方应用标识和所述第一时间戳等信息。
需要说明的是,上述图1所示的结构仅是一种示例,本发明实施例对此不做限定。
基于上述描述,图2示例性的示出了本发明实施例提供的一种可回溯的图片授权方法的流程示意图,该流程可由可回溯的图片授权装置执行。
如图2所示,该流程具体包括:
步骤210,获取使用方通过第三方应用发送的图片获取请求。
本发明实施例中,图片获取请求包括图片指示信息和使用方标识;所述第三方应用为满足第一授权条件的第三方应用。
步骤220,根据所述使用方标识确定所述使用方满足第二授权条件之后,根据所述图片指示信息、第三方应用标识和第一时间戳确定授权码。
本发明实施例中,授权码用于表征所述使用方授权第三方应用在第一时间获取的图片信息。
步骤230,根据所述图片指示信息获取所述图片指示信息对应的第一图片,并基于所述第一图片,生成记录有所述授权码的第二图片。
本发明实施例中,通过对第一图片进行灰度差值计算,得到第一灰度矩阵,基于第一灰度矩阵确定第二图片。
步骤240,将所述第二图片发送至所述第三方应用。
在本发明实施例中,使用方在图片授权服务中注册并上传图片;其中,注册使用OTP(One Time Password,一次性密码)技术;例如,使用方输入手机号,得到短信验证码后,将验证码反馈至图片授权服务;图片授权服务在对验证码进行验证通过之后,创建使用方标识,设置密码。后续使用方登录时,通过使用方标识与密码进行登录;OTP技术也可以为邮箱等其他OTP方式,在此不做具体限定。
图片授权服务与存储服务相连接,存储服务中存储有文件类型,每个文件类型对应1张或多张图片,文件类型包括但不限于身份证、银行卡、驾驶证、行驶证、营业执照、房产证、户口本、社保卡等。使用方上传图片之前可以选择内置的图片类型,或自定义图片类型。对于任一类型文件,可以自定义设置,如:文件类型不可重复、一个类型文件存储的图片数量上限为5张等。
进一步的,每张图片与对应的图片指示信息相关联,以使图片授权服务可以通过图片指示信息获取图片指示信息对应的第一图片;其中,图片指示信息包括但不限于图片标识(identity document,ID)和图片的Md5(Message-Digest Algorithm,消息摘要算法)值。
图片授权服务在得到使用方上传的图片之后,将图片上传至区块链服务;然后区块链服务根据使用方标识和所述图片指示信息确定存证凭据,并将所述存证凭据发送至图片授权服务。
图片授权服务接收所述区块链服务发送的存证凭据,并构建所述存证凭据与图片指示信息之间的关联关系;所述关联关系用于根据所述图片指示信息确定所述存证凭据。以保证其他使用方无法获取该使用方上传的图片,保证了使用方的隐私性和安全性。
在步骤210中,通过如下方式确定所述第三方应用满足第一授权条件:
根据所述第三方应用标识、第三方应用密钥、第二时间戳和接收图片地址确定第一签名;所述第二时间戳是周期性确定的;获取所述第三方应用发送的第二签名;所述第二签名是所述第三方应用根据自身的应用标识、应用密钥、第二时间戳和接收图片地址确定的;若第一签名与第二签名一致,则确定所述第三方应用满足第一授权条件,并生成登录凭证,将所述登录凭证发送至所述第三方应用;所述登录凭证用于与所述第三方应用通信。
举例来说,图片授权服务记录有第三方应用标识(如ID)、第三方应用的应用密钥以及接收图片地址(如使用方的邮箱、第三方应用对应的存储数据地址等),图片授权服务周期性地根据第三方应用标识、第三方应用密钥、第二时间戳(如2点整,周期为两小时)和接收图片地址,按照预设字段名排序确定第一签名R1。
第三方应用根据第三方应用标识、第三方应用密钥、第二时间戳(如2点整,周期为两小时)和接收图片地址,按照字段名排序确定第二签名R2,并将第二签名R2发送至图片授权服务。
图片授权服务若确定第一签名R1与第二签名R2一致,则生成登录凭证TOKEN,并将TOKEN发送至第三方应用,以使后续第三方应用在于图片授权服务通信时,携带TOKEN,从而实现第三方应用与图片授权服务正常通信。
在步骤220中,根据OTP技术确定所述使用方满足第二授权条件,具体的,通过所述使用方标识向所述使用方发送验证信息;若获取所述使用方发送的所述验证信息对应的响应信息,且确定存证凭据中记录有所述使用方标识与所述图片指示信息的对应关系,则确定所述使用方满足授权条件;所述存证凭据是所述使用方上传图片后,将所述使用方标识和所述图片指示信息的对应关系上传至区块链服务。
举例说明,使用方在第三方应用输入手机号,使用方输入之后,接收对应的验证码,并将验证码发送至图片授权服务。
图片授权服务对该验证码进行验证,并通过使用方标识确定存证凭据中是否记录有使用方标识与图片指示信息的对应关系,若确定记录中有、且验证码通过,则确定使用方满足第二授权条件。
在确定使用方满足第二授权条件之后,通过预设哈希算法确定表征第三方应用的授权码,具体的,对所述图片指示信息、所述第三方应用标识和第一时间戳进行哈希运算,确定授权码;并将授权码、图片指示信息、第三方应用标识和所述第一时间戳打包成交易发送至区块链服务;其中,交易用于根据授权码回溯所述使用方授权的第三方应用在第一时间获取的图片信息。
举例来说,通过SM3哈希算法对图片指示信息、第三方应用标识和第一时间戳进行运算,得到授权码;再将授权码与图片指示信息、第三方应用标识和所述第一时间戳建立对应关系并打包成交易上传至区块链服务。
在步骤230中,在存储服务中根据图片指示信息获取图片指示信息对应的第一图片之后,在一种可实现的方式中,通过对第一图片进行RGB(红绿蓝)分量做分离,再对每个分量添加盲水印后合并得到第二图片。
在本发明实施例中,通过灰度差值计算来得到第二图片,具体的,对所述第一图片进行灰度差值计算,确定第一灰度矩阵;将所述第一灰度矩阵进行傅里叶变换得到第一频谱矩阵;对所述第一频谱矩阵进行频谱对角转换得到第二频谱矩阵;根据所述授权码确定签名图片;将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵;对所述第一频谱矩阵进行计算得到相位矩阵,并根据所述相位矩阵和所述第三频谱矩阵确定第二灰度矩阵;基于所述第一图片中每个像素的颜色,更新所述第二灰度矩阵中每个像素的颜色,得到所述第二图片。
图3示例性的示出了一种第一图片的示意图,基于图3举例说明,根据下述公式(1)确定第一灰度矩阵W1;
W1=0.299×R+0.587×G+0.114×B    (1);
在确定第一灰度矩阵W1时,根据预设规则对第一灰度矩阵W1进行限定,如限制第一灰度矩阵W1的长宽不超过2的10次方,若超过,则采用等比缩放方式对第一灰度矩阵W1进行压缩;对于长宽不为2的整数次方的边,采用补0方式将第一灰度矩阵补齐为2的整数次方;如第一灰度矩阵W1的长为7维,采用补0方式将第一灰度矩阵W1的长补为8维,即第一灰度矩阵W1的第8维的值为0。
然后对第一灰度矩阵W1进行傅里叶变化得到第一频谱矩阵M1,并对第一频谱矩阵M1做频谱对角转换,得到第二频谱矩阵M2;相当于将第一频谱矩阵M1十字切割成四等分,得到四个子矩阵,再将四个子矩阵做对角转换,以使对角转换后的第一图片的低频分量位于第一图片中心,便于签名叠加与结果回溯。
在确定签名图片时,需要确定签名图片中待显示字符、待显示字符的字体大小和签名图片的尺寸;具体的,根据所述第三方应用标识和所述授权码确定所述签名图片中待显示字符;根据所述第一灰度矩阵的尺寸确定所述签名图片的尺寸;根据所述签名图片的尺寸和所述待显示字符长度确定所述待显示字符的字体大小;结合所述待显示字符、所述签名图片的尺寸、所述待显示字符的字体大小以及预设图片格式确定所述签名图片;其中,签名图片可以为盲水印也可以为可视水印,在此不做具体限定。
举例来说,在一种可实施的方式中,待显示字符可以为完整的授权码、部分授权码等;在本发明实施例中,通过部分第三应用标识和部分授权码结合确定待显示字符;如待显示字符包括第三应用标识中连续6位标识,授权码的后四位;其中,部分第三应用标识用于映射对应的完整授权码,也就是说,针对任一第三应用标识,授权码的后四位不存在重复,以保证数据的唯一性。
在第一灰度矩阵W1的尺寸(包括长和宽)中,基于最小值L,(如宽比长小,则宽为最小值),将最小值L的1/4作为签名图片的尺寸。
根据签名图片的尺寸/待显示字符的长度计算待显示字符的字体大小;如使用FontMatrix提供的stringWidth方法计算待显示字符的字体大小,具体的,若待显示字符的长度超出签名图片的宽度,则将待显示字符的字号减1;在预 设字号中,可以设置最小字号不小于5号。
最后结合待显示字符、签名图片的尺寸、待显示字符的字体大小以及预设图片格式确定签名图片,图4示例性的示出了一种签名图片的示意图,如图4所示,“4N2D”为部分授权码,“JA4ASD”为部分第三方应用标识,签名图片为黑底白字。
在得到签名图片之后,确定签名图片的叠加位置,然后将签名图片叠加在第一图片中;具体的,针对所述第二频谱矩阵的任一象限,根据所述第二频谱矩阵的中心点和所述象限中所述第二频谱矩阵的中心点的对角点确定叠加位置;基于所述叠加位置,通过等比缩放算法将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵。
举例来说,计算第二频谱矩阵的第一象限左上角点(P1)的值与第二频谱矩阵的中心点(P2)的值之间的中位数;再根据二分查找方式取P1到P2连线中模最接近中位数的点。以该点作为签名图片在叠加时的中心点。在叠加时,若遇到白点(即签名图片的待显示字符),则以作等比缩放(如对虚数的实部与虚部乘以相同的系数)的方式重新计算第二频谱矩阵M2,以降低对第一矩阵的影响且在回溯时有更好的展示效果。
在得到第三频谱矩阵M3之后,基于上述的频谱对角转换,将第三频谱矩阵M3作还原,得到第四频谱矩阵M4后,根据第四频谱矩阵M4和相位矩阵在进行双谱重构后做逆傅里叶变换得到第二灰度矩阵W2。
图5示例性的示出了一种第二灰度矩阵对应的图片示意图,如图5所示,其中包括签名图片的信息。
在得到第二灰度矩阵后,基于第一图片中每个像素的颜色,更新第二灰度矩阵中每个像素的颜色,得到第二图片;图6示例性的示出了一种第二图片的示意图,如图6所示,第二图片与第一图片在正常情况下看是看不出区别的,但放大后会发现,在第二图片中多了波浪形的暗纹的水印,图7示例性的示出了一种放大后的第二图片的示意图,如图7所示,图片存在波浪形的暗纹的水印。
若想回溯第二图片对应的信息时(如使用方遇到“身份证图片”在授权范围外使用的场景)对第二图片进行灰度差值算法,得到图5所示的第二灰度矩阵对应的图片示意图,得到图5中的签名图片,根据签名图片中的部分第三方应用和授权码,确定泄露“身份证图片”的第三方应用,以及“身份证图片”对应的信息(如使用方标识、第一时间戳等)。
基于相同的技术构思,图8示例性的示出了本发明实施例提供的一种可回溯的图片授权装置的结构示意图,该装置可以执行可回溯的图片授权方法的流程。
如图8所示,该装置具体包括:
获取模块810,用于获取使用方通过第三方应用发送的图片获取请求;所述图片获取请求包括图片指示信息和使用方标识;所述第三方应用为满足第一授权条件的第三方应用;
处理模块820,用于根据所述使用方标识确定所述使用方满足第二授权条 件之后,根据所述图片指示信息、第三方应用标识和第一时间戳确定授权码;所述授权码用于表征所述使用方授权第三方应用在第一时间获取的图片信息;
根据所述图片指示信息获取所述图片指示信息对应的第一图片,并基于所述第一图片,生成记录有所述授权码的第二图片;
将所述第二图片发送至所述第三方应用。
可选的,所述处理模块820具体用于:
根据所述第三方应用标识、第三方应用密钥、第二时间戳和接收图片地址确定第一签名;所述第二时间戳是周期性确定的;
控制获取模块810获取所述第三方应用发送的第二签名;所述第二签名是所述第三方应用根据自身的应用标识、应用密钥、第二时间戳和接收图片地址确定的;
若第一签名与第二签名一致,则确定所述第三方应用满足第一授权条件,并生成登录凭证,将所述登录凭证发送至所述第三方应用;所述登录凭证用于与所述第三方应用通信。
可选的,所述处理模块820具体用于:
通过所述使用方标识向所述使用方发送验证信息;
若获取所述使用方发送的所述验证信息对应的响应信息,且确定存证凭据中记录有所述使用方标识与所述图片指示信息的对应关系,则确定所述使用方满足第二授权条件;所述存证凭据是所述使用方上传图片后,将所述使用方标识和所述图片指示信息的对应关系上传至区块链服务。
可选的,所述处理模块820具体用于:
对所述图片指示信息、所述第三方应用标识和第一时间戳进行哈希运算,确定授权码;
根据所述图片指示信息和第三方应用标识确定授权码之后,还包括:
将所述授权码、所述图片指示信息、所述第三方应用标识和所述第一时间戳打包成交易发送至区块链服务;所述交易用于根据授权码回溯所述使用方授权的第三方应用在第一时间获取的图片信息。
可选的,所述处理模块820具体用于:
对所述第一图片进行灰度差值计算,确定第一灰度矩阵;
将所述第一灰度矩阵进行傅里叶变换得到第一频谱矩阵;
对所述第一频谱矩阵进行频谱对角转换得到第二频谱矩阵;
根据所述授权码确定签名图片;
将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵;
对所述第一频谱矩阵进行计算得到相位矩阵,并根据所述相位矩阵和所述第三频谱矩阵确定第二灰度矩阵;
基于所述第一图片中每个像素的颜色,更新所述第二灰度矩阵中每个像素的颜色,得到所述第二图片。
可选的,所述处理模块820具体用于:
根据所述第三方应用标识和所述授权码确定所述签名图片中待显示字符;
根据所述第一灰度矩阵的尺寸确定所述签名图片的尺寸;
根据所述签名图片的尺寸和所述待显示字符长度确定所述待显示字符的字体大小;
结合所述待显示字符、所述签名图片的尺寸、所述待显示字符的字体大小以及预设图片格式确定所述签名图片。
可选的,所述处理模块820具体用于:
针对所述第二频谱矩阵的任一象限,根据所述第二频谱矩阵的中心点和所述象限中所述第二频谱矩阵的中心点的对角点确定叠加位置;
基于所述叠加位置,通过等比缩放算法将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵。
基于相同的技术构思,本发明实施例还提供一种计算机设备,包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述可回溯的图片授权方法。
基于相同的技术构思,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行上述可回溯的图片授权方法。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (10)

  1. 一种可回溯的图片授权方法,其特征在于,包括:
    获取使用方通过第三方应用发送的图片获取请求;所述图片获取请求包括图片指示信息和使用方标识;所述第三方应用为满足第一授权条件的第三方应用;
    根据所述使用方标识确定所述使用方满足第二授权条件之后,根据所述图片指示信息、第三方应用标识和第一时间戳确定授权码;所述授权码用于表征所述使用方授权第三方应用在第一时间获取的图片信息;
    根据所述图片指示信息获取所述图片指示信息对应的第一图片,并基于所述第一图片,生成记录有所述授权码的第二图片;
    将所述第二图片发送至所述第三方应用。
  2. 如权利要求1所述的方法,其特征在于,通过如下方式确定所述第三方应用满足第一授权条件,包括:
    根据所述第三方应用标识、第三方应用密钥、第二时间戳和接收图片地址确定第一签名;所述第二时间戳是周期性确定的;
    获取所述第三方应用发送的第二签名;所述第二签名是所述第三方应用根据自身的应用标识、应用密钥、第二时间戳和接收图片地址确定的;
    若第一签名与第二签名一致,则确定所述第三方应用满足第一授权条件,并生成登录凭证,将所述登录凭证发送至所述第三方应用;所述登录凭证用于与所述第三方应用通信。
  3. 如权利要求1所述的方法,其特征在于,根据所述使用方标识确定所述使用方满足第二授权条件,包括:
    通过所述使用方标识向所述使用方发送验证信息;
    若获取所述使用方发送的所述验证信息对应的响应信息,且确定存证凭据中记录有所述使用方标识与所述图片指示信息的对应关系,则确定所述使用方满足第二授权条件;所述存证凭据是所述使用方上传图片后,将所述使用方标识和所述图片指示信息的对应关系上传至区块链服务。
  4. 如权利要求1所述的方法,其特征在于,根据所述图片指示信息和第三方应用标识和第一时间戳确定授权码,包括:
    对所述图片指示信息、所述第三方应用标识和第一时间戳进行哈希运算,确定授权码;
    根据所述图片指示信息和第三方应用标识确定授权码之后,还包括:
    将所述授权码、所述图片指示信息、所述第三方应用标识和所述第一时间戳打包成交易发送至区块链服务;所述交易用于根据授权码回溯所述使用方授权的第三方应用在第一时间获取的图片信息。
  5. 如权利要求1至4任一项所述的方法,其特征在于,基于所述第一图片,生成记录有所述授权码的第二图片,包括:
    对所述第一图片进行灰度差值计算,确定第一灰度矩阵;
    将所述第一灰度矩阵进行傅里叶变换得到第一频谱矩阵;
    对所述第一频谱矩阵进行频谱对角转换得到第二频谱矩阵;
    根据所述授权码确定签名图片;
    将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵;
    对所述第一频谱矩阵进行计算得到相位矩阵,并根据所述相位矩阵和所述第三频谱矩阵确定第二灰度矩阵;
    基于所述第一图片中每个像素的颜色,更新所述第二灰度矩阵中每个像素的颜色,得到所述第二图片。
  6. 如权利要求5所述的方法,其特征在于,根据所述授权码确定签名图片,包括:
    根据所述第三方应用标识和所述授权码确定所述签名图片中待显示字符;
    根据所述第一灰度矩阵的尺寸确定所述签名图片的尺寸;
    根据所述签名图片的尺寸和所述待显示字符长度确定所述待显示字符的字体大小;
    结合所述待显示字符、所述签名图片的尺寸、所述待显示字符的字体大小以及预设图片格式确定所述签名图片。
  7. 如权利要求5所述的方法,其特征在于,将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵,包括:
    针对所述第二频谱矩阵的任一象限,根据所述第二频谱矩阵的中心点和所述象限中所述第二频谱矩阵的中心点的对角点确定叠加位置;
    基于所述叠加位置,通过等比缩放算法将所述签名图片叠加在所述第二频谱矩阵中,得到第三频谱矩阵。
  8. 一种可回溯的图片授权装置,其特征在于,包括:
    获取模块,用于获取使用方通过第三方应用发送的图片获取请求;所述图片获取请求包括图片指示信息和使用方标识;所述第三方应用为满足第一授权条件的第三方应用;
    处理模块,用于根据所述使用方标识确定所述使用方满足第二授权条件之后,根据所述图片指示信息、第三方应用标识和第一时间戳确定授权码;所述授权码用于表征所述使用方授权第三方应用在第一时间获取的图片信息;
    根据所述图片指示信息获取所述图片指示信息对应的第一图片,并基于所述第一图片,生成记录有所述授权码的第二图片;
    将所述第二图片发送至所述第三方应用。
  9. 一种计算机设备,其特征在于,包括:
    存储器,用于存储程序指令;
    处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行权利要求1至7任一项所述的方法。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行权利要求1至7任一项所述的方法。
PCT/CN2022/100550 2021-11-16 2022-06-22 一种可回溯的图片授权方法及装置 WO2023087704A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111353298.0A CN114066708A (zh) 2021-11-16 2021-11-16 一种可回溯的图片授权方法及装置
CN202111353298.0 2021-11-16

Publications (1)

Publication Number Publication Date
WO2023087704A1 true WO2023087704A1 (zh) 2023-05-25

Family

ID=80272722

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100550 WO2023087704A1 (zh) 2021-11-16 2022-06-22 一种可回溯的图片授权方法及装置

Country Status (2)

Country Link
CN (1) CN114066708A (zh)
WO (1) WO2023087704A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114066708A (zh) * 2021-11-16 2022-02-18 深圳前海微众银行股份有限公司 一种可回溯的图片授权方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327582A (zh) * 2019-08-22 2020-06-23 刘高峰 一种基于OAuth协议的授权方法、装置及系统
CN111585954A (zh) * 2020-03-26 2020-08-25 中国平安财产保险股份有限公司 鉴权方法、装置、计算机设备及存储介质
CN111753283A (zh) * 2020-06-30 2020-10-09 重庆长安汽车股份有限公司 一种终端第三方应用批量授权方法
CN112861089A (zh) * 2021-03-17 2021-05-28 北京数字医信科技有限公司 授权认证的方法、资源服务器、资源用户端、设备和介质
CN114066708A (zh) * 2021-11-16 2022-02-18 深圳前海微众银行股份有限公司 一种可回溯的图片授权方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327582A (zh) * 2019-08-22 2020-06-23 刘高峰 一种基于OAuth协议的授权方法、装置及系统
CN111585954A (zh) * 2020-03-26 2020-08-25 中国平安财产保险股份有限公司 鉴权方法、装置、计算机设备及存储介质
CN111753283A (zh) * 2020-06-30 2020-10-09 重庆长安汽车股份有限公司 一种终端第三方应用批量授权方法
CN112861089A (zh) * 2021-03-17 2021-05-28 北京数字医信科技有限公司 授权认证的方法、资源服务器、资源用户端、设备和介质
CN114066708A (zh) * 2021-11-16 2022-02-18 深圳前海微众银行股份有限公司 一种可回溯的图片授权方法及装置

Also Published As

Publication number Publication date
CN114066708A (zh) 2022-02-18

Similar Documents

Publication Publication Date Title
US11799668B2 (en) Electronic identification verification methods and systems with storage of certification records to a side chain
US9600686B2 (en) Augmented reality based privacy and decryption
US20230034169A1 (en) Non-fungible token authentication
US8122255B2 (en) Methods and systems for digital authentication using digitally signed images
AU2012345478B2 (en) A method of generation and transmission of secure tokens based on tokens generated by TRNG and split into shares and the system thereof
WO2018145127A1 (en) Electronic identification verification methods and systems with storage of certification records to a side chain
US10045210B2 (en) Method, server and system for authentication of a person
CN105591744A (zh) 一种网络实名认证方法及系统
WO2021218166A1 (zh) 合同文签方法、装置、设备及计算机可读存储介质
CN112801663B (zh) 区块链存证方法、装置、系统、设备和介质
CN102801724A (zh) 一种图形图像与动态密码相结合的身份认证方法
WO2023005838A1 (zh) 数据共享方法和电子设备
WO2023087704A1 (zh) 一种可回溯的图片授权方法及装置
CN104239838A (zh) 设有数字水印的彩色二维码的防伪验证方法
CN110890979B (zh) 堡垒机自动部署方法、装置、设备及介质
WO2021042540A1 (zh) 电子合同存储方法及装置、电子设备、计算机可读存储介质
US11088824B2 (en) Method and apparatus for use in information processing
CN109543399B (zh) 一种防止二代身份证阅读器ocx控件被篡改的方法
CN113742671A (zh) 在线协同信息处理方法、系统、电子装置和存储介质
CN112488686B (zh) 一种安全支付方法、系统、电子设备及可读存储介质
USRE49968E1 (en) Electronic identification verification methods and systems with storage of certification records to a side chain
CN113111325B (zh) 一种身份链的构建方法
US20240113889A1 (en) Verifying ownership using decentralized verification
US20240113879A1 (en) Generating ownership tags for decentralized verification
CN118488251A (zh) 多方交互的VoLTE视频通话系统、方法以及计算机设备

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: 22894247

Country of ref document: EP

Kind code of ref document: A1