WO2018153299A1 - Image processing method and apparatus, and storage medium - Google Patents

Image processing method and apparatus, and storage medium Download PDF

Info

Publication number
WO2018153299A1
WO2018153299A1 PCT/CN2018/076419 CN2018076419W WO2018153299A1 WO 2018153299 A1 WO2018153299 A1 WO 2018153299A1 CN 2018076419 W CN2018076419 W CN 2018076419W WO 2018153299 A1 WO2018153299 A1 WO 2018153299A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
elements
sequence
target
conversion information
Prior art date
Application number
PCT/CN2018/076419
Other languages
French (fr)
Chinese (zh)
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 WO2018153299A1 publication Critical patent/WO2018153299A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/0085Time domain based watermarking, e.g. watermarks spread over several images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0051Embedding of the watermark in the spatial domain

Definitions

  • the embodiments of the present invention relate to the field of image processing technologies, and in particular, to a method, an apparatus, and a storage medium for image processing.
  • a watermark refers to a semi-transparent logo, icon, etc. added to the image to prevent others from stealing the map.
  • a typical online store owner will add a unique text watermark or icon to his product image.
  • the embodiment of the present application provides a method, a device, and a storage medium for image processing.
  • a target image element corresponding to a user identifier By adding a target image element corresponding to a user identifier to an image, the image is protected, and the original information of the target image element in the image is reduced. Impact.
  • An embodiment of the present application provides a method for image processing, which is applied to a user equipment, and in response to a user acquiring an image, obtains a user identifier, and converts the user identifier into corresponding conversion information, where the conversion information includes a plurality of information elements for adjusting display states of the plurality of image elements on the image;
  • the display states of the plurality of target elements are adjusted such that display states of the plurality of target elements are different from other image elements in the image.
  • the embodiment of the present application further provides a method for image processing, which is applied to a terminal device or a server, and includes:
  • the embodiment of the present application further provides an apparatus for image processing, including:
  • a memory coupled to the processor; storing, in the memory, a machine readable instruction unit; the machine readable instruction unit comprising:
  • a first acquiring unit configured to acquire a user identifier in response to a user acquiring an image
  • a second acquiring unit configured to convert the user identifier into corresponding conversion information, where the conversion information includes a plurality of information elements, to adjust a display state of the plurality of image elements on the image;
  • a third acquiring unit configured to acquire the image according to the request
  • a fourth acquiring unit configured to acquire a plurality of image elements in the image, where the multiple image elements are arranged in a manner consistent with a predetermined arrangement rule
  • a fifth acquiring unit configured to select a plurality of target elements from the plurality of image elements according to the plurality of information elements in the conversion information, wherein a positional relationship between the plurality of target elements and the conversion Corresponding to multiple information elements in the information;
  • a labeling unit configured to adjust a display state of the plurality of target elements such that a display state of the plurality of target elements is different from other image elements in the image.
  • the embodiment of the present application further provides an apparatus for image processing, including:
  • a memory coupled to the processor; storing, in the memory, a machine readable instruction unit; the machine readable instruction unit comprising:
  • a first acquiring unit configured to acquire an image to be processed in response to the identification request for the image
  • a second acquiring unit configured to acquire a plurality of image elements in the image to be processed, and the arrangement manner of the plurality of image elements conforms to a predetermined arrangement rule
  • a first determining unit configured to determine, from the plurality of image elements, a plurality of target elements, wherein display states of the plurality of target elements are different from display states of other image elements in the image;
  • a second determining unit configured to determine, according to the multiple target elements, a user identifier corresponding to the image.
  • the embodiment of the present application also provides a non-transitory computer readable storage medium, wherein the storage medium stores machine readable instructions, which are executable by a processor to perform any of the methods described above.
  • 1A is a system architecture diagram of an embodiment of the present application.
  • FIG. 1B is a flowchart of a method for image processing according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of another method for image processing provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of another method for image processing provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a grid line provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of another method for image processing according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an image element marked in a grid line according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an effect of adding a label image element to a grid line according to an embodiment of the present application.
  • FIG. 8 is a flowchart of another method for image processing according to an embodiment of the present application.
  • FIG. 9 is a flowchart of another method for image processing according to an embodiment of the present application.
  • FIG. 10 is a flowchart of another method for image processing according to an embodiment of the present application.
  • FIG. 11 is a block diagram showing the composition of an apparatus for image processing according to an embodiment of the present application.
  • FIG. 12 is a block diagram showing the composition of another apparatus for image processing according to an embodiment of the present application.
  • FIG. 13 is a block diagram showing the composition of another apparatus for image processing according to an embodiment of the present application.
  • FIG. 14 is a block diagram showing the composition of another apparatus for image processing according to an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a computing device in an example of the present application.
  • FIG. 1A is a system architecture diagram of the present application.
  • the system architecture includes: a client 1001 and a server 1002, wherein the client 1001 and the server 1002 are connected through the Internet.
  • the client may be an application on the terminal device, and the application may be a browser or an application APP.
  • the server may be a server that provides icon data.
  • the terminal device may be a portable terminal device such as a mobile phone, a tablet, a palmtop computer, a wearable device, or a PC such as a desktop computer or a notebook computer, or may be a smart computer having various Internet access capabilities and a display interface. device.
  • the client 1001 acquires data of the image in response to an operation of the user acquiring the image, wherein the data of the image can be acquired from the server.
  • the client 1001 obtains the login account of the user
  • the server 1002 obtains the user identifier uniquely corresponding to the login account according to the login account, and adds a watermark to the image according to the identifier of the user, and the added watermark uniquely corresponds to the user identifier.
  • the corresponding user causing the leak can be determined based on the watermark on the image, thereby protecting the image.
  • user A accesses the company's financial system through his own account on the browser.
  • the browser goes to the server to obtain the unique user identifier of the user according to the account of the user A, according to the user identifier.
  • the watermark is added to the financial statement.
  • the watermark on the leaked financial statement can identify the identifier of the user A, so that it can be determined that the user A leaks the financial statement, thereby realizing the financial of the company. Data protection.
  • the user identifier is a unique identifier assigned by the server to each user account.
  • the user can also submit a watermarked picture to the server through the client, so that the server recognizes the user account corresponding to the watermark and returns.
  • An embodiment of the present application provides a method for image processing, which is applied to a client in the system architecture, and is applicable to any device or software carrier that can process a picture, for example, an application on a mobile phone, a tablet, or a device. (for example, browser). As shown in FIG. 1B, it includes:
  • the user logs in to the server through the client. After successfully logging in to the server, the user can browse the web page or data icon through the client. If the user wants to view a data icon or operate on a data icon that has already been displayed (e.g., screenshot, save image, etc.), the client obtains the user identification in response to the user's request to acquire the image.
  • the client obtains the user identification in response to the user's request to acquire the image.
  • the user identifier is a user identifier that is allocated by the server for each user account, and the user identifier uniquely corresponds to the user account.
  • the user identifier is various types of information used to identify the user identity corresponding to the user account, and may include a user name, a digital signature, a unique code assigned by the system, and the like.
  • the user account is a user's permission account. For example, log in to the account of the financial management system, log in to the member account of the website of the social group, and the like.
  • the conversion information includes a plurality of information elements for adjusting display states of the plurality of image elements on the image.
  • the embodiment of the present application determines a conversion information uniquely corresponding to the user identifier by using the user identifier, and the conversion information may be a sequence of numbers, a sequence of letters, a sequence of symbols, etc. It is a mixed sequence of the foregoing various types of sequences, or a preset conversion rule, etc., which is not limited by the embodiment of the present application.
  • the image to be processed may be an image of various types of identification information such as a watermark to be added, and the corresponding image storage format may be JPG, PNG, BMP, or the like.
  • the client has a function of image processing. For example, when a user logs into the company's financial system through a browser, a quarterly sales chart is obtained in the system, the browser goes to the server to obtain quarterly sales data, and the image processing component in the browser also defines some image elements, for example, Columns in the histogram, abscissa, ordinate, grid lines, etc. The image processing component in the browser generates a quarterly sales chart based on the acquired sales data and the customized image element rendering.
  • adding a watermark in the chart can be added before the selection, so that the watermark corresponding to the user has been added to the quarterly sales chart that the user sees.
  • the watermark corresponding to the user can be added to the rendered chart.
  • step 104 acquiring a plurality of image elements in the image to be processed is performed, and the arrangement manner of the plurality of image elements conforms to a predetermined arrangement rule.
  • the image processing component in the browser is to customize some image elements to be added to the generated image, for example, grid lines, abscissas, ordinates, and the like.
  • an image element with the same interval in the image may be acquired, for example, a grid line in the image is selected as an image element, and then the display state is changed for a specific grid point in the grid line to implement watermarking. Operation so that the watermark does not affect the original information in the image.
  • the specific grid point needs to be determined based on the conversion information.
  • the image elements with the same interval may be image elements that are equally arranged in various arrangements, wherein the arrangement refers to conforming to a specific regular shape, such as a square, a line, a circle, and the like.
  • the image elements are selected according to a predetermined rule. For example, at the corners of the image (including the four corners of the image), a row of pixels or a column of pixels of substantially gray color is used as the image element.
  • a plurality of target elements are selected from the plurality of image elements such that a positional relationship of the plurality of target elements corresponds to the conversion information.
  • a target element is obtained from the image element according to the conversion information, and a positional relationship of the target element in all image elements corresponds to the conversion information.
  • the implementation of this step can be understood as the relative positional relationship between the image elements can reflect the sequence relationship specified by the various elements or rules carried in the conversion information.
  • the relative positional relationship between the image elements can reflect information such as the numerical size and numerical order carried by the digital sequence; if the conversion information is a sequence of letters, the relative positional relationship between the image elements can be It reflects the position and order of the letters in the corresponding alphabet; if the conversion information is a sequence of symbols, the relative positional relationship between the image elements can reflect the order of appearance of the symbols and the like.
  • the display state of the target element is adjusted such that the display state of the target element is different from other elements.
  • the labeling is to distinguish the display state of other image elements, and may be to adjust the size of the target element; and the color of the target element may also be adjusted.
  • color deepening, color change or size adjustment, or size and color synchronization adjustments are all optional implementations.
  • the process of labeling the target element can be added by the SVG method, so that the image of the watermark corresponding to the user identifier can be obtained by integrating the SVG path of the original image to be processed and the SVG path of the labeled target element.
  • the image processing method provided by the embodiment of the present application converts a user identifier corresponding to a user into a target element in an image uniquely corresponding to the user identification information, and adds a watermark (target element) to the image to be processed. In the image element. In this way, the user's identification information (watermark) is added to the image without affecting the original information of the image. Compared with the prior art, the technical solution provided by the embodiment of the present application can reduce the influence of the watermark on the original information of the image.
  • the image processing method provided by the present application further includes the following steps:
  • the obtaining the user identifier in response to the user acquiring the image includes:
  • the user identification needs to be processed to determine appropriate conversion information. For example, if the image element needs to be supported by a digital sequence in the labeling process, and the user identifier is indeed a sequence of letters, it is necessary to convert the user identifier that satisfies the sequence of letters into a sequence of numbers for labeling subsequent image elements, similarly, if In the labeling process of image elements, the support of the alphabetic sequence is required. When the user identifier is indeed a sequence of numbers, it is necessary to convert the user identifier satisfying the digit sequence into a sequence of letters for labeling subsequent image elements, and the like. For this purpose, the embodiment of the present application provides a corresponding implementation process for the conversion of the user identifier, that is, the specific implementation process of step 102 is provided, as shown in FIG. 2, including:
  • the specified rule is a first encryption rule
  • the first encryption rule is an encryption algorithm, configured to convert a user identifier into conversion information.
  • the specified rules (first encryption rules) can be implemented in a variety of ways, and can be arbitrarily selected according to requirements, such as inserting redundant bits, data confusion, conversion to binary numbers, ACSII code conversion, and the like.
  • the selection of the specified rule in the embodiment of the present application is open, and different devices or software applications allow different processing modes to be selected, which has both flexibility and privacy, and the selection of the specified rule (first encryption rule) is in the function. There is no difference between good and bad, as long as the original data can be accurately and uniquely represented, but for device performance and recognition cost, it is more efficient to select a lower complexity specification rule (first encryption rule).
  • step 104 In order to facilitate the annotation of image elements, it is necessary to edit based on the existing image elements in the image to be processed.
  • the embodiment of the present application provides a specific implementation manner related to step 104, as shown in FIG. 3, including:
  • step 1041 acquiring a plurality of image elements having the same interval in the image to be processed is performed.
  • the points conforming to the linear arrangement may include grid lines, mark lines, page lines, and the like, and line-shaped image elements which are composed of points, circles or squares, and short line segments and arranged in a certain regular pattern, as shown in FIG. 4 .
  • the image processing layout in the browser is to set some image elements and add image elements to the rendered image.
  • the image processing layout also positions the image elements of the order, for example, defining a number of grid lines, the position of each grid line (for example, adding grid lines at positions of ordinates of 10, 20, 30, and 40, respectively),
  • a watermark corresponding to the user identifier is added on the first grid lines, for example, a watermark is added on the first grid line.
  • image elements having a specific arrangement may also be selected in the embodiment of the present application, for example, a dot matrix, a field lattice, and the like.
  • the points in the linear arrangement may not exist in all the images to be processed. Therefore, in the implementation manner provided by the embodiment of the present application, the display effect of the original image is not affected. If there is a point in the image to be processed that conforms to the linear arrangement, it is directly used as the basis of the labeling of the image element; if there is no point in the image to be processed that conforms to the linear arrangement, the point according to the preset linear arrangement may be used. Add a position where the image is not conspicuous (for example, at the corner position of the image, a row of pixels whose pixels are substantially gray is used as the basis of the annotation).
  • the conversion information includes N information elements, N being a positive integer.
  • the embodiment of the present application further provides a description of a specific implementation manner of the method for performing image element labeling using a digital sequence, that is, a specific implementation manner of step 105, and the process is as shown in FIG. 5, including:
  • the sorting sequence is a sequence of numbers including N digits, and each digit in the digit sequence corresponds to each information element in the conversion information.
  • the user identifier is stored on the server, and the server administrator can obtain the user identifier.
  • the first encryption rule is preset, and the user identifier is converted into the first encryption rule by using the first encryption rule. Convert information.
  • the administrator of the server cannot obtain the first encryption rule.
  • the sorting sequence is to further improve the security of the user identification and facilitate the annotation of the target element.
  • the conversion information is converted into a sorting sequence by a preset second encryption rule.
  • it may be a sequence in which the elements in the conversion information are reversed in the order of the preceding and succeeding, scrambled in a specified order, or regenerated according to a specified operation rule operation, alphanumeric substitution, ACSII code conversion, or the like.
  • the first target element is a reference image element in all the image elements that may be labeled, and the first point or the random point in the point of the linear arrangement may be selected, which is not limited in this embodiment of the present application.
  • the above sorting sequence is generally a sequence based on numbers.
  • other feasible forms such as letters or symbols can also be used, and it is necessary to select according to actual conditions.
  • the conversion information is converted to the sorted sequence according to a preset second encryption rule.
  • the second encryption rule is an encryption algorithm, and the specific encryption algorithm is not limited in this application.
  • the conversion information is a digital sequence
  • converting the conversion information into the sequence according to the preset second encryption rule includes at least one of the following:
  • the second encryption rule is a predetermined sorting manner, and the numbers in the digital sequence are sorted according to the predetermined sorting manner to obtain the sorting sequence;
  • the second encryption rule is a predetermined magnification, and the numbers in the digital sequence are resized according to the predetermined magnification to obtain the sorting sequence.
  • performing the converting the conversion information into the sorting sequence according to a preset second encryption rule comprises:
  • the sorting sequence is determined based on the position of each letter in the alphabet in the alphabet.
  • the second encryption rule is to obtain the position number of each letter in the alphabet sequence in the alphabet.
  • the conversion information is a sequence of symbols
  • the method includes:
  • the sorting sequence is determined according to an ACSII code value corresponding to each symbol in the symbol sequence.
  • the second encryption rule is to obtain an ACSII code value for each symbol in the symbol sequence.
  • the conversion information may include various expressions, such as a digital sequence, a letter sequence, a symbol sequence, and the like. Therefore, depending on the way the conversion information is expressed, there are some differences in the process of determining the sorting sequence.
  • the determination method of the sorting sequence will be discussed below in conjunction with a specific example.
  • the first case the conversion information is a sequence of numbers.
  • each digit in the digital sequence is sorted according to a specified sorting manner to obtain the sorting sequence, or the digits in the digit sequence are resized according to a specified multiple, the sorting sequence is obtained, or a combination thereof .
  • This is beneficial to increase the security of the user identity and the difficulty of other users in identifying the user identity.
  • the corresponding number sequence is obtained according to the first encryption rule, which may be 12345.
  • the first encryption rule is to obtain the position number of the letter in the alphabet.
  • the sorting sequence is obtained according to the second encryption rule.
  • the sorting sequence can be adjusted to 54321 by the reverse processing, or the multiples can be uniformly expanded to 2, 4, 6, 8, and 10.
  • the sorting sequence is tentatively set to 54321. At this time, if there are 40 points that match the linear arrangement, then the 5th point can be selected as the first target element. At this time, the position of the second target element is the 11th (5+5+1)th point.
  • the position of the third target element is the 16th (11+4+1)th point
  • the position of the fourth target element is the 20th (16+3+1)th point
  • the position of the fifth target element is the first 23 (20 + 2 + 1) points
  • the position of the sixth target element is the 25th (23 + 1 + 1) points.
  • the marked grid lines show the effect as shown in the dotted line frame in Figure 7.
  • the second case the conversion information is a sequence of letters.
  • the sorting sequence is obtained according to the positional relationship of each letter in the alphabetic sequence in its corresponding alphabet.
  • the corresponding letter sequence may be bcdef (according to the first encryption rule), and the corresponding sorting sequence may map bcdef to 23456 by alphabetical order of the English alphabet (according to the second encryption rule) Get), you can also offset the sequence number to map bcdef to 45678.
  • the sorting sequence is tentatively set to 23456. At this time, if there are 40 points that match the linear arrangement, then the third point can be selected as the first target element. At this time, the position of the second target element is the 6th (3+2+1)th point.
  • the position of the third target element is the 10th (6+3+1)th point
  • the position of the fourth target element is the 15th (10+4+1)th point
  • the position of the fifth target element is the first 21 (15 + 5 + 1) points
  • the position of the sixth target element is the 27th (21 + 5 + 1) points.
  • the third case the conversion information is a sequence of symbols.
  • the sorting sequence is tentatively set to 60, 61, 62, 63, 64 here. At this time, if there are 80 points that match the linear arrangement, then the first point can be selected as the first target element. At this time, the position of the second target element is the 62nd (60+1+1)th point.
  • the position of the third target element is the 124th (62+61+1)th point
  • the position of the fourth target element is the 187th (124+62+1)th point
  • the position of the fifth target element is the first 251 (187 + 63 + 1) points
  • the position of the sixth target element is the 316 (251 + 64 + 1) points.
  • the selection and examples of the target elements in this case are similar to the first case, and the principles shown in FIGS. 6 and 7 can also be referred to.
  • the display state of the target element is adjusted, including at least one of the following:
  • the image processing method is applied to the terminal device or the server. As shown in FIG. 8 , the method includes:
  • the image to be processed here is the image obtained after performing the aforementioned step 106.
  • the image to be processed is acquired in response to the identification request for the image. For example, when the financial staff of the formula leaks the company's quarterly sales chart, when the company finds the chart, the company related personnel can submit the chart to the server online to identify the user identifier corresponding to the watermark carried therein. This makes it possible to find the person who leaked the chart.
  • the chart can be handed over to the maintenance personnel of the server, and the maintenance personnel input the chart into the application program on the terminal device, identify the user identifier carried in the chart, and output the user identifier corresponding to the user. user account.
  • step 202 When the above step 202 is performed, a plurality of image elements in the image to be processed are acquired, and the arrangement manner of the plurality of image elements conforms to a predetermined arrangement rule.
  • the image elements mentioned in the specific arrangement mentioned here correspond to the image elements mentioned in step 104, because the labeled image elements will be reflected in the image elements in the image to be processed that match the specific arrangement, so Find in the image to be processed.
  • a plurality of target elements are determined from the plurality of image elements, wherein display states of the plurality of target elements are different from display states of other image elements in the image.
  • the specific implementation of the step 202 is to obtain a point in the image to be processed that conforms to the linear arrangement.
  • step 203 requires determining image elements having specific specifications and/or specific colors from the image elements that conform to the particular arrangement as the labeled target elements.
  • the acquiring the plurality of image elements in the image to be processed includes:
  • determining a plurality of target elements from the plurality of image elements comprises:
  • An image element having at least one of a display specification and a display color different from the other images is used as the target element among the plurality of image elements.
  • the target element can be determined according to the specification and/or color of the target element.
  • the determining, by the plurality of target elements, the user identifier corresponding to the image includes:
  • the ordering of the target elements may be a sorting rule from the heading to the back, a sorting rule from the back to the front, a sorting rule from the top to the bottom, a sorting rule from the bottom up, and other sorting rules.
  • the sorting sequence is a sequence of numbers comprising N digits, N being a positive integer
  • the determining the sequence of the plurality of target elements according to the spacing between the two adjacent target elements comprises:
  • step 204 is as shown in FIG. 9, and includes:
  • steps 20431 and 20432 are further included, as shown in FIG. 10, including:
  • the sorting sequence is converted into conversion information according to a preset first decryption rule.
  • the conversion information is converted into the user identifier according to a preset second decryption rule.
  • the first decryption rule corresponds to the second encryption rule and is an inverse operation of the second encryption rule.
  • the second decryption rule corresponds to the first encryption rule and is an inverse operation of the first encryption rule.
  • the converting the sorting sequence into conversion information according to a preset first decryption rule includes at least one of the following:
  • the first decryption rule is a predetermined sorting manner, and each digit in the sorting sequence is sorted according to the predetermined sorting manner to obtain the conversion information;
  • the first decryption rule is a predetermined magnification, and each digit in the sorting sequence is resized according to the predetermined magnification to obtain the conversion information.
  • the embodiment of the present application is convenient for the technical personnel to understand, and the corresponding user identification restoration process is also provided here.
  • the first case the conversion information is a sequence of numbers.
  • the specific implementation manner of determining the conversion information corresponding to the user identifier according to the quantity, the sorting, and the size of the elements in the determined sorting sequence may be to sort the numbers in the sorting sequence according to a specified sorting manner, and obtain a digital sequence. And as the conversion information; and/or, resizing each digit in the sorting sequence by a specified multiple to obtain a digital sequence as the conversion information.
  • the corresponding user identification identification process may include, for example, determining that the fifth, 11, 16, 20, 23, and 25 are six target elements according to the execution result of step 203.
  • the corresponding sorting sequence 5(11-5-1)4(16-11-1)3(20-16-1)2(23-20-1)1 can be confirmed.
  • the corresponding number sequence can be 12345, and the user ID is finally determined to be ABCDE.
  • the second case the conversion information is a sequence of letters.
  • the specific implementation manner of determining the conversion information corresponding to the user identifier according to the number, order, and size of the elements in the determined sorting sequence may be based on the positional relationship of each letter in the specified alphabet, according to the elements in the sorting sequence.
  • the number, order, and size of the number of letters in the corresponding letter sequence are determined as the conversion information.
  • the corresponding user identification and recognition process may include, for example, determining that the third, sixth, ten, 15, 21, and 27 are six target elements according to the execution result of step 203.
  • the corresponding sorting sequence 2(6-3-1)3(10-6-1)4(15-10-1)5(21-15-1)6 can be confirmed.
  • the corresponding letter sequence can be bcdef, and the user ID is finally determined to be 12345.
  • the third case the conversion information is a sequence of symbols.
  • the specific implementation manner of determining the conversion information corresponding to the user identifier according to the number, order, and size of the elements in the determined sorting sequence may be based on the ACSII code table, and determining corresponding according to the size of each element in the sorting sequence.
  • the corresponding user identification identification process may include: determining, according to the execution result of step 203, that the first target element is 62, 124, 187, 251, and 316.
  • the embodiment of the present application provides an apparatus 1100 for image processing, as shown in FIG. 11, which can be used to implement the foregoing 101 to 106 and a specific method thereof, including:
  • the first obtaining unit 31 is configured to acquire the user identifier in response to the user acquiring the image.
  • the second obtaining unit 32 is configured to convert the user identifier into corresponding conversion information, where the conversion information includes a plurality of information elements for adjusting display states of the plurality of image elements on the image.
  • a third obtaining unit 33 configured to acquire the image according to the request
  • the fourth obtaining unit 34 is configured to acquire a plurality of image elements in the image, and the plurality of image elements are arranged in a manner consistent with a predetermined arrangement rule.
  • a fifth obtaining unit 35 configured to select, from the plurality of image elements, a plurality of target elements according to the plurality of information elements in the conversion information, wherein a positional relationship between the plurality of target elements is Multiple information elements in the conversion information correspond.
  • the labeling unit 36 is configured to adjust display states of the plurality of target elements such that display states of the plurality of target elements are different from other image elements in the image.
  • the second obtaining unit 31 is specifically configured to perform encryption processing on the user identifier by using a preset first encryption rule to obtain the conversion information.
  • the fourth obtaining unit 34 is specifically configured to acquire a plurality of image elements having the same interval in the image.
  • the conversion information includes N information elements, N is a positive integer, and the fifth obtaining unit 35 is specifically configured to determine a sorting sequence and a first target element according to the conversion information, where
  • the sorting sequence is a sequence of numbers comprising N digits, each digit in the digit sequence corresponding to each information element in the conversion information; determining the first target according to the size of the first digit in the sorting sequence An image element having an element spacing of the size of the first number as a second target element; determining, according to a size of the second number in the sorting sequence, a spacing from the second target element to the second The image element of the size of the number, as the third target element; and so on, until N target elements are obtained.
  • the conversion information is a sequence of numbers
  • the fifth obtaining unit 35 is further configured to perform at least one of the following operations
  • the second encryption rule is a predetermined sorting manner, and the numbers in the digital sequence are sorted according to the predetermined sorting manner to obtain the sorting sequence;
  • the second encryption rule is a predetermined magnification, and the numbers in the digital sequence are resized according to the predetermined magnification to obtain the sorting sequence.
  • the fifth obtaining unit 35 is further configured to: when the conversion information is a sequence of letters, obtain the sort according to a positional relationship of each letter in the alphabet sequence in its corresponding alphabet. sequence.
  • the fifth obtaining unit 35 is further configured to: when the converted information is a symbol sequence, obtain the sorting sequence according to an ACSII code value corresponding to each symbol in the symbol sequence.
  • the labeling unit 36 is specifically configured to adjust a size of the target element; and/or adjust a color of the target element.
  • the embodiment of the present application provides an apparatus 1200 for image processing, as shown in FIG. 12, which can be used to implement the foregoing 201 to 204 and a specific method thereof, including:
  • the first obtaining unit 41 is configured to acquire an image to be processed in response to the identification request for the image.
  • the second obtaining unit 42 is configured to acquire a plurality of image elements in the image to be processed, and the arrangement manners of the plurality of image elements conform to a predetermined arrangement rule.
  • the first determining unit 43 is configured to determine, from the plurality of image elements, a plurality of target elements, wherein display states of the plurality of target elements are different from display states of other image elements in the image.
  • the second determining unit 44 is configured to determine, according to the multiple target elements, a user identifier corresponding to the image.
  • the second obtaining unit 42 is specifically configured to acquire a plurality of image elements having the same interval in the image to be processed.
  • the first determining unit 43 is specifically configured to use, as the target element, an image element that is different from the other images in at least one of the display specification and the display color among the plurality of image elements.
  • the second determining unit 44 includes:
  • a first determining module 441 configured to determine an order of the plurality of target elements; and determine a spacing between adjacent two target elements in the sorting according to the sorting of the plurality of target elements.
  • the second determining mode 442 is configured to determine a sorting sequence of the plurality of target elements according to a spacing between the two adjacent target elements.
  • the third determining module 443 is configured to determine, according to the sorting sequence, a user identifier corresponding to the image.
  • the sorting sequence is a sequence of numbers including N digits, N is a positive integer; and the second determining module 442 is configured to:
  • the third determining module 443 is configured to:
  • the first determining module 441 includes:
  • the first determining sub-module 4411 is configured to determine, according to the determined number, order, and size of the elements in the sorting sequence, the conversion information corresponding to the user identifier.
  • the second determining sub-module 4412 is configured to obtain a corresponding user identifier according to the determined conversion information.
  • the first determining sub-module 4411 is specifically configured to sort each digit in the sorting sequence according to a specified sorting manner to obtain the digit sequence; and/or, for each digit in the sorting sequence The sequence of numbers is obtained by resizing according to a specified multiple.
  • the first determining sub-module 4411 is specifically configured to determine, according to the positional relationship of each letter in the specified alphabet, the letters in the corresponding alphabetic sequence according to the number, order, and size of the elements in the sorting sequence. Quantity and sorting as the conversion information.
  • the first determining sub-module 4411 is specifically configured to determine, according to an ACSII code table, a corresponding symbol according to a size of each element in the sorting sequence; according to the determined number, order, and The determined symbol determines the corresponding symbol sequence as the conversion information
  • the present application also provides a non-transitory computer readable storage medium, wherein the storage medium stores machine readable instructions, which are executable by a processor to perform the method.
  • the apparatus for image processing converts a user identifier corresponding to a user into a target element in an image uniquely corresponding to the user identification information, and adds a watermark (target element) to the existing image to be processed. In the image element. In this way, the user's identification information (watermark) is added to the image without affecting the original information of the image.
  • the technical solution provided by the embodiment of the present application can reduce the influence of the watermark on the original information of the image.
  • FIG. 15 is a diagram showing the composition of a computing device in which the image processing apparatus 1100 and the image processing apparatus 1200 are located.
  • the computing device includes one or more processors (CPUs) 1502, communication modules 1504, memories 1506, user interfaces 1510, and a communication bus 1508 for interconnecting these components.
  • processors CPUs
  • communication modules 1504
  • memories 1506, user interfaces 1510
  • communication bus 1508 for interconnecting these components.
  • the processor 1502 can receive and transmit data through the communication module 1504 to effect network communication and/or local communication.
  • User interface 1510 includes one or more output devices 1512 that include one or more speakers and/or one or more visual displays.
  • User interface 1510 also includes one or more input devices 1514 including, for example, a keyboard, a mouse, a voice command input unit or loudspeaker, a touch screen display, a touch sensitive tablet, a gesture capture camera or other input button or control, and the like.
  • Memory 1506 can be a high speed random access memory such as DRAM, SRAM, DDR RAM, or other random access solid state storage device; or nonvolatile memory such as one or more disk storage devices, optical disk storage devices, flash memory devices, Or other non-volatile solid-state storage devices.
  • DRAM dynamic random access memory
  • SRAM static random access memory
  • DDR RAM dynamic random access memory
  • nonvolatile memory such as one or more disk storage devices, optical disk storage devices, flash memory devices, Or other non-volatile solid-state storage devices.
  • the memory 1506 stores a set of instructions executable by the processor 1502, the instruction code stored in the memory being configured to be executed by the processor to implement the steps in the method of image processing in the present application described above, while also implementing image processing of the present application.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present application. Part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Abstract

An embodiment of the present application provides an image processing method. The method is applied to a user equipment and comprises: in response to a request of a user for obtaining an image, obtaining an identifier of the user, and converting the identifier of the user into corresponding conversion information; obtaining the image according to the request, and obtaining multiple image elements in the image, an arrangement manner of the multiple image elements being in accordance with a preset arrangement rule; selecting multiple target elements from the multiple image elements according to multiple information elements in the conversion information, and a position relationship among the multiple target elements corresponding to the multiple information elements in the conversion information; and adjusting a display state of the multiple target elements, so that the display state of the multiple target elements is different from the that of other image elements in the image. The present application also provides another image processing method, a corresponding apparatus, and a storage medium.

Description

图像处理的方法、装置及存储介质Image processing method, device and storage medium
本申请要求于2017年2月23日提交中国专利局、申请号为201710099135.1、申请名称为“一种图像处理的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. JP-A No. No. No. No. No. No. No. No. No. No. No. No. No. No. in.
技术领域Technical field
本申请实施例涉及图像处理技术领域,尤其涉及图像处理的方法、装置及存储介质。The embodiments of the present invention relate to the field of image processing technologies, and in particular, to a method, an apparatus, and a storage medium for image processing.
背景技术Background technique
随着电子技术的飞速发展,智能手机,平板电脑上的APP使用率也在不断提高,图像或视频处理APP中各种特效功能的使用也逐渐增多,用户希望在分享图片时能够标识图片。水印指在图片上添加的半透明logo、图标等,以防止他人盗图。例如,一般的网店店主都会在自己的商品图片上加上独有的文字水印或图标等。但在图片上制作水印会出现文字和图片或图片和图片的叠加,因而如何在图片上合理地添加水印是一个值得关注的问题。With the rapid development of electronic technology, the usage rate of apps on smartphones and tablets is also increasing. The use of various special effects functions in image or video processing apps is gradually increasing. Users hope to identify pictures when sharing pictures. A watermark refers to a semi-transparent logo, icon, etc. added to the image to prevent others from stealing the map. For example, a typical online store owner will add a unique text watermark or icon to his product image. However, when creating a watermark on a picture, there will be a superposition of text and pictures or pictures and pictures, so how to properly add a watermark on the picture is a problem worthy of attention.
技术内容Technical content
本申请实施例提供了图像处理的方法、装置及存储介质,通过在图像上添加用户标识对应的目标图像元素,起到了对图像进行保护的作用,同时降低了目标图像元素对图片中的原始信息的影响。The embodiment of the present application provides a method, a device, and a storage medium for image processing. By adding a target image element corresponding to a user identifier to an image, the image is protected, and the original information of the target image element in the image is reduced. Impact.
本申请实施例提供了一种图像处理的方法,应用于用户设备,响应于用户对图像的获取请求,获取用户标识,将所述用户标识转换为对应的转换信息,其中,所述转换信息包含多个信息元素,用以调整所述图像上的多个图像元素的显示状态;An embodiment of the present application provides a method for image processing, which is applied to a user equipment, and in response to a user acquiring an image, obtains a user identifier, and converts the user identifier into corresponding conversion information, where the conversion information includes a plurality of information elements for adjusting display states of the plurality of image elements on the image;
根据所述请求获取所述图像,并获取所述图像中多个图像元素,所 述多个图像元素的排列方式符合预定的排列规则;Acquiring the image according to the request, and acquiring a plurality of image elements in the image, the arrangement manner of the plurality of image elements conforming to a predetermined arrangement rule;
根据所述转换信息中的多个信息元素,从所述多个图像元素中选择多个目标元素,其中,所述多个目标元素之间的位置关系与所述转换信息中的多个信息元素相对应;Selecting a plurality of target elements from the plurality of image elements according to the plurality of information elements in the conversion information, wherein a positional relationship between the plurality of target elements and a plurality of information elements in the conversion information Corresponding;
对所述多个目标元素的显示状态进行调整,使得所述多个目标元素的显示状态与所述图像中的其他图像元素不同。The display states of the plurality of target elements are adjusted such that display states of the plurality of target elements are different from other image elements in the image.
本申请实施例还提供了一种图像处理的方法,应用于终端设备或服务器,包括:The embodiment of the present application further provides a method for image processing, which is applied to a terminal device or a server, and includes:
响应于对图像的识别请求,获取待处理图像;Acquiring an image to be processed in response to the identification request for the image;
获取所述待处理图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则;Acquiring a plurality of image elements in the image to be processed, the arrangement manner of the plurality of image elements conforming to a predetermined arrangement rule;
从所述多个图像元素中确定多个目标元素,其中所述多个目标元素的显示状态与所述图像中其他图像元素的显示状态不同;Determining a plurality of target elements from the plurality of image elements, wherein display states of the plurality of target elements are different from display states of other image elements in the image;
根据所述多个目标元素确定所述图像对应的用户标识。Determining a user identifier corresponding to the image according to the plurality of target elements.
本申请实施例还提供了一种图像处理的装置,包括:The embodiment of the present application further provides an apparatus for image processing, including:
处理器;processor;
与所述处理器相连接的存储器;所述存储器中存储有机器可读指令单元;所述机器可读指令单元包括:a memory coupled to the processor; storing, in the memory, a machine readable instruction unit; the machine readable instruction unit comprising:
第一获取单元,用于响应于用户对图像的获取请求,获取用户标识;a first acquiring unit, configured to acquire a user identifier in response to a user acquiring an image;
第二获取单元,用于将所述用户标识转换为对应的转换信息,其中,所述转换信息包含多个信息元素,用以调整所述图像上的多个图像元素的显示状态;a second acquiring unit, configured to convert the user identifier into corresponding conversion information, where the conversion information includes a plurality of information elements, to adjust a display state of the plurality of image elements on the image;
第三获取单元,用于根据所述请求获取所述图像;a third acquiring unit, configured to acquire the image according to the request;
第四获取单元,用于获取所述图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则;a fourth acquiring unit, configured to acquire a plurality of image elements in the image, where the multiple image elements are arranged in a manner consistent with a predetermined arrangement rule;
第五获取单元,用于根据所述转换信息中的多个信息元素,从所述多个图像元素中选择多个目标元素,其中,所述多个目标元素之间的位置关系与所述转换信息中的多个信息元素相对应;a fifth acquiring unit, configured to select a plurality of target elements from the plurality of image elements according to the plurality of information elements in the conversion information, wherein a positional relationship between the plurality of target elements and the conversion Corresponding to multiple information elements in the information;
标注单元,用于对所述多个目标元素的显示状态进行调整,使得所 述多个目标元素的显示状态与所述图像中的其他图像元素不同。And a labeling unit, configured to adjust a display state of the plurality of target elements such that a display state of the plurality of target elements is different from other image elements in the image.
本申请实施例还提供了一种图像处理的装置,包括:The embodiment of the present application further provides an apparatus for image processing, including:
处理器;processor;
与所述处理器相连接的存储器;所述存储器中存储有机器可读指令单元;所述机器可读指令单元包括:a memory coupled to the processor; storing, in the memory, a machine readable instruction unit; the machine readable instruction unit comprising:
第一获取单元,用于响应于对图像的识别请求,获取待处理图像;a first acquiring unit, configured to acquire an image to be processed in response to the identification request for the image;
第二获取单元,用于获取所述待处理图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则;a second acquiring unit, configured to acquire a plurality of image elements in the image to be processed, and the arrangement manner of the plurality of image elements conforms to a predetermined arrangement rule;
第一确定单元,用于从所述多个图像元素中确定多个目标元素,其中所述多个目标元素的显示状态与所述图像中其他图像元素的显示状态不同;a first determining unit, configured to determine, from the plurality of image elements, a plurality of target elements, wherein display states of the plurality of target elements are different from display states of other image elements in the image;
第二确定单元,用于根据所述多个目标元素确定所述图像对应的用户标识。And a second determining unit, configured to determine, according to the multiple target elements, a user identifier corresponding to the image.
本申请实施例还提供了一种非易失性计算机可读存储介质,其中所述存储介质中存储有机器可读指令,所述机器可读指令可以由处理器执行以完成上述任一方法。The embodiment of the present application also provides a non-transitory computer readable storage medium, wherein the storage medium stores machine readable instructions, which are executable by a processor to perform any of the methods described above.
附图说明DRAWINGS
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. One of ordinary skill in the art can also obtain other drawings based on these drawings without paying for inventive labor.
图1A是本申请实施例涉及的系统架构图;1A is a system architecture diagram of an embodiment of the present application;
图1B是本申请实施例提供的一种图像处理的方法流程图;FIG. 1B is a flowchart of a method for image processing according to an embodiment of the present disclosure;
图2是本申请实施例提供的另一种图像处理的方法流程图;2 is a flowchart of another method for image processing provided by an embodiment of the present application;
图3是本申请实施例提供的另一种图像处理的方法流程图;3 is a flowchart of another method for image processing provided by an embodiment of the present application;
图4是本申请实施例提供的一种网格线示意图;4 is a schematic diagram of a grid line provided by an embodiment of the present application;
图5是本申请实施例提供的另一种图像处理的方法流程图;FIG. 5 is a flowchart of another method for image processing according to an embodiment of the present application;
图6是本申请实施例提供的一种网格线中被标注图像元素的示意 图;6 is a schematic diagram of an image element marked in a grid line according to an embodiment of the present application;
图7是本申请实施例提供的一种网格线中添加标注图像元素后的效果示意图;FIG. 7 is a schematic diagram of an effect of adding a label image element to a grid line according to an embodiment of the present application; FIG.
图8是本申请实施例提供的另一种图像处理的方法流程图;FIG. 8 is a flowchart of another method for image processing according to an embodiment of the present application;
图9是本申请实施例提供的另一种图像处理的方法流程图;FIG. 9 is a flowchart of another method for image processing according to an embodiment of the present application;
图10是本申请实施例提供的另一种图像处理的方法流程图;FIG. 10 is a flowchart of another method for image processing according to an embodiment of the present application;
图11是本申请实施例提供的一种图像处理的装置的组成框图;11 is a block diagram showing the composition of an apparatus for image processing according to an embodiment of the present application;
图12是本申请实施例提供的另一种图像处理的装置的组成框图;FIG. 12 is a block diagram showing the composition of another apparatus for image processing according to an embodiment of the present application;
图13是本申请实施例提供的另一种图像处理的装置的组成框图;FIG. 13 is a block diagram showing the composition of another apparatus for image processing according to an embodiment of the present application; FIG.
图14是本申请实施例提供的另一种图像处理的装置的组成框图;以及FIG. 14 is a block diagram showing the composition of another apparatus for image processing according to an embodiment of the present application;
图15为本申请实例中的计算设备组成结构示意图。FIG. 15 is a schematic structural diagram of a computing device in an example of the present application.
具体实施方式detailed description
为了更好的理解本申请实施例的技术方案,下面结合附图对本申请实施例进行详细描述。For a better understanding of the technical solutions of the embodiments of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请实施例保护的范围。It should be understood that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts are within the scope of protection of the embodiments of the present application.
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请实施例。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。The terms used in the embodiments of the present application are for the purpose of describing the specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms "a", "the", and "the"
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" as used herein is merely an association describing the associated object, indicating that there may be three relationships, for example, A and/or B, which may indicate that A exists separately, while A and B, there are three cases of B alone. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
图1A是本申请涉及的系统架构图,如图1A所示,该系统架构包括: 客户端1001及服务器1002,其中客户端1001及服务器1002通过互联网连接。其中,所述客户端可以为终端设备上的应用程序,所述应用程序可以为浏览器,也可以为应用APP。所述服务器可以为提供图标数据的服务器。所述终端设备可以为诸如手机、平板、掌上电脑、可穿戴设备等便携式终端设备,也可以为台式机、笔记本电脑等PC,也可以为智能电视等各种具有互联网访问能力和展示界面的智能设备。FIG. 1A is a system architecture diagram of the present application. As shown in FIG. 1A, the system architecture includes: a client 1001 and a server 1002, wherein the client 1001 and the server 1002 are connected through the Internet. The client may be an application on the terminal device, and the application may be a browser or an application APP. The server may be a server that provides icon data. The terminal device may be a portable terminal device such as a mobile phone, a tablet, a palmtop computer, a wearable device, or a PC such as a desktop computer or a notebook computer, or may be a smart computer having various Internet access capabilities and a display interface. device.
当用户通过客户端1001访问服务器1002时,当用户想要查看一图像时,客户端1001响应于用户获取图像的操作,获取图像的数据,其中,所述图像的数据可以从服务器处获取。客户端1001获取用户的登录账号,根据该登录账号去服务器1002获取与该登录账号唯一对应的用户标识,根据用户的标识在所述图像上添加水印,添加的水印与所述用户标识唯一对应。从而当所述图像外泄时,根据图像上的水印可以确定对应的导致外泄的用户,从而对所述图像进行保护。例如,用户A在浏览器上通过自己的账号访问公司财务系统,当用户查看公司的财务报表时,浏览器根据用户A的账号去服务器获取用户唯一对应的用户标识,根据所述用户标识在所述财务报表上添加水印,当所述财务报表外泄时,根据外泄的财务报表上的水印能识别出用户A的标识,从而能够确定是用户A将财务报表外泄,从而实现对公司财务数据的保护。其中,所述用户标识是服务器为每个用户账号分配的唯一标识。此外,用户还可以通过客户端向服务器提交携带水印的图片,使服务器识别出水印对应的用户账号后返回。When the user accesses the server 1002 through the client 1001, when the user wants to view an image, the client 1001 acquires data of the image in response to an operation of the user acquiring the image, wherein the data of the image can be acquired from the server. The client 1001 obtains the login account of the user, and the server 1002 obtains the user identifier uniquely corresponding to the login account according to the login account, and adds a watermark to the image according to the identifier of the user, and the added watermark uniquely corresponds to the user identifier. Thus, when the image is leaked, the corresponding user causing the leak can be determined based on the watermark on the image, thereby protecting the image. For example, user A accesses the company's financial system through his own account on the browser. When the user views the company's financial statements, the browser goes to the server to obtain the unique user identifier of the user according to the account of the user A, according to the user identifier. The watermark is added to the financial statement. When the financial statement is leaked, the watermark on the leaked financial statement can identify the identifier of the user A, so that it can be determined that the user A leaks the financial statement, thereby realizing the financial of the company. Data protection. The user identifier is a unique identifier assigned by the server to each user account. In addition, the user can also submit a watermarked picture to the server through the client, so that the server recognizes the user account corresponding to the watermark and returns.
本申请实施例提供了一种图像处理的方法,应用于上述系统架构中的客户端,适用于可以对图片进行处理的任意设备或软件载体上,例如,手机、平板电脑或设备上的应用程序(例如,浏览器)。如图1B所示,包括:An embodiment of the present application provides a method for image processing, which is applied to a client in the system architecture, and is applicable to any device or software carrier that can process a picture, for example, an application on a mobile phone, a tablet, or a device. (for example, browser). As shown in FIG. 1B, it includes:
101、获取用户标识。101. Obtain a user identifier.
在一些实施例中,用户通过客户端登录到服务器。在成功登录到服务器之后,用户可以通过客户端浏览网页或者数据图标。如果用户想要查看一数据图标或者对已经展示的数据图标进行操作时(如,截图、保 存图像等),则客户端响应于用户对图像的获取请求,获取用户标识。In some embodiments, the user logs in to the server through the client. After successfully logging in to the server, the user can browse the web page or data icon through the client. If the user wants to view a data icon or operate on a data icon that has already been displayed (e.g., screenshot, save image, etc.), the client obtains the user identification in response to the user's request to acquire the image.
其中,所述用户标识是服务器为各用户账号分配的用户标识,用户标识与用户账号唯一对应。其中,该用户标识为用于标识用户账号对应的用户身份的各类信息,可以包括用户名、数字签名、系统分配的唯一代码等等。其中,所述用户账号为用户的权限账号。例如,登录财务管理系统的账号,登录社会团体的网站的会员账号等。当客户端接收到用户触发获取图像的操作时(例如,用户触发获取财务报表的操作),向服务器获取与用户的账号唯一对应的用户标识。The user identifier is a user identifier that is allocated by the server for each user account, and the user identifier uniquely corresponds to the user account. The user identifier is various types of information used to identify the user identity corresponding to the user account, and may include a user name, a digital signature, a unique code assigned by the system, and the like. The user account is a user's permission account. For example, log in to the account of the financial management system, log in to the member account of the website of the social group, and the like. When the client receives the operation of the user triggering the acquisition of the image (for example, the user triggers the operation of acquiring the financial statement), the user identifier that uniquely corresponds to the user's account is obtained from the server.
102、根据所述用户标识获得对应的转换信息。102. Obtain corresponding conversion information according to the user identifier.
在一些实施例中,所述转换信息包含多个信息元素,用以调整所述图像上的多个图像元素的显示状态。In some embodiments, the conversion information includes a plurality of information elements for adjusting display states of the plurality of image elements on the image.
为方便后续在图像元素中选择指定的目标元素,本申请实施例通过用户标识来确定一个与用户标识唯一对应的转换信息,所述转换信息可以是数字序列、字母序列、符号序列等,也可以是前述各类序列的混合序列,又或者是预设的转换规则等,本申请实施例对此不做限制。In order to facilitate the subsequent selection of the specified target element in the image element, the embodiment of the present application determines a conversion information uniquely corresponding to the user identifier by using the user identifier, and the conversion information may be a sequence of numbers, a sequence of letters, a sequence of symbols, etc. It is a mixed sequence of the foregoing various types of sequences, or a preset conversion rule, etc., which is not limited by the embodiment of the present application.
103、获取待处理图像。103. Acquire an image to be processed.
在本申请实施例中,待处理图像可以为待添加水印等各类标识信息的图像,相应的图片存储格式可为是JPG、PNG、BMP等。其中,所述客户端具有图像处理的功能。例如,当用户通过浏览器登录公司财务系统时,在所述系统中获取季度销售额图表,浏览器去服务器中获取季度销售数据,浏览器中的图像处理部件也会定义一些图像元素,例如,柱状图中的柱,横坐标、纵坐标、网格线等。浏览器中的图像处理部件根据获取的所述销售数据以及所述自定义的图像元素渲染生成季度销售额图表。其中,在图表中增加水印可以在选取前添加,从而用户看到的季度销售额图表上已经添加了用户对应的水印。同时也可以在渲染所述图表之后,在将用户对应的水印添加到渲染后的图表上。In the embodiment of the present application, the image to be processed may be an image of various types of identification information such as a watermark to be added, and the corresponding image storage format may be JPG, PNG, BMP, or the like. The client has a function of image processing. For example, when a user logs into the company's financial system through a browser, a quarterly sales chart is obtained in the system, the browser goes to the server to obtain quarterly sales data, and the image processing component in the browser also defines some image elements, for example, Columns in the histogram, abscissa, ordinate, grid lines, etc. The image processing component in the browser generates a quarterly sales chart based on the acquired sales data and the customized image element rendering. Among them, adding a watermark in the chart can be added before the selection, so that the watermark corresponding to the user has been added to the quarterly sales chart that the user sees. At the same time, after the chart is rendered, the watermark corresponding to the user can be added to the rendered chart.
104、获取待处理图像中符合特定排列方式的图像元素。104. Acquire an image element in a to-be-processed image that conforms to a specific arrangement.
在执行上述步骤104时,执行获取所述待处理图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则。When the above step 104 is performed, acquiring a plurality of image elements in the image to be processed is performed, and the arrangement manner of the plurality of image elements conforms to a predetermined arrangement rule.
在上述步骤103中提到,浏览器中的图像处理部件为自定义一些图像元素,添加到生成的图像中,例如,网格线、横坐标、纵坐标等。在获取图像元素时,可以获取图像中的间隔相同的图像元素,例如,选取图像中的网格线作为图像元素,进而对网格线中的特定网格点改变展示状态,以实现加水印的操作,这样水印不会影响图像中的原有信息。所述特定网格点需要根据转换信息来确定。其中,所述间隔相同的图像元素可以是间隔相同排序成各种排列方式的图像元素,其中,所述排列方式是指符合特定的规则形状,例如方形、线型、圆形等。It is mentioned in the above step 103 that the image processing component in the browser is to customize some image elements to be added to the generated image, for example, grid lines, abscissas, ordinates, and the like. When acquiring an image element, an image element with the same interval in the image may be acquired, for example, a grid line in the image is selected as an image element, and then the display state is changed for a specific grid point in the grid line to implement watermarking. Operation so that the watermark does not affect the original information in the image. The specific grid point needs to be determined based on the conversion information. The image elements with the same interval may be image elements that are equally arranged in various arrangements, wherein the arrangement refers to conforming to a specific regular shape, such as a square, a line, a circle, and the like.
当所述图像中无法获取间隔相同的图像元素时,例如,一些照片类的图像,则按照预定规则选取所述图像元素。例如,在图像的边角处(包括图像的四个角),颜色基本为灰色的一行像素点或一列像素点作为所述图像元素。When image elements of the same interval cannot be acquired in the image, for example, images of some photo types, the image elements are selected according to a predetermined rule. For example, at the corners of the image (including the four corners of the image), a row of pixels or a column of pixels of substantially gray color is used as the image element.
105、根据所述转换信息,从所述图像元素中获取目标元素。105. Acquire a target element from the image element according to the conversion information.
在执行上述步骤105时,从所述多个图像元素中选择多个目标元素,使得所述多个目标元素的位置关系与所述转换信息相对应。When the above step 105 is performed, a plurality of target elements are selected from the plurality of image elements such that a positional relationship of the plurality of target elements corresponds to the conversion information.
根据所述转换信息,从所述图像元素中获取目标元素,所述目标元素在所有图像元素中的位置关系与所述转换信息相对应。A target element is obtained from the image element according to the conversion information, and a positional relationship of the target element in all image elements corresponds to the conversion information.
该步骤的实现可以理解为图像元素之间的相对位置关系可以体现出转换信息中携带的各类元素或规则所指定的序列关系。例如,若转换信息为数字序列,则图像元素之间的相对位置关系可以体现出数字序列携带的数字大小和数字顺序等信息;若转换信息为字母序列,则图像元素之间的相对位置关系可以体现出字母在相应的字母表中的位置和顺序等信息;若转换信息为符号序列,则图像元素之间的相对位置关系可以体现出符号的出现次序等信息。The implementation of this step can be understood as the relative positional relationship between the image elements can reflect the sequence relationship specified by the various elements or rules carried in the conversion information. For example, if the conversion information is a digital sequence, the relative positional relationship between the image elements can reflect information such as the numerical size and numerical order carried by the digital sequence; if the conversion information is a sequence of letters, the relative positional relationship between the image elements can be It reflects the position and order of the letters in the corresponding alphabet; if the conversion information is a sequence of symbols, the relative positional relationship between the image elements can reflect the order of appearance of the symbols and the like.
106、对所述目标元素进行标注。106. Label the target element.
在执行上述步骤106时,执行对所述目标元素的显示状态进行调整,使得所述目标元素的显示状态与其他元素不同。When the above step 106 is performed, the display state of the target element is adjusted such that the display state of the target element is different from other elements.
在本申请实施例中,标注即是区分于其它图像元素的显示状态,可以是对所述目标元素的大小进行调整;也可以对所述目标元素的颜色进 行调整。例如颜色加深,变颜色或者大小调整或者大小和颜色同步调整等都是可选择的实现方式。In the embodiment of the present application, the labeling is to distinguish the display state of other image elements, and may be to adjust the size of the target element; and the color of the target element may also be adjusted. For example, color deepening, color change or size adjustment, or size and color synchronization adjustments are all optional implementations.
对目标元素进行标注的过程可以通过SVG方式进行添加,这样通过原有待处理图像的SVG路径和被标注目标元素的SVG路径进行整合,即可得到添加有用户标识对应的水印的图像。The process of labeling the target element can be added by the SVG method, so that the image of the watermark corresponding to the user identifier can be obtained by integrating the SVG path of the original image to be processed and the SVG path of the labeled target element.
本申请实施例提供的图像处理的方法,通过将用户对应的用户标识转换为与该用户标识信息唯一对应的图像中的目标元素,并将水印(目标元素)添加到待处理图像上的已有图像元素中。这样在不影响该图像的原有信息的基础上,又将用户的标识信息(水印)添加在了图像中。相比于现有技术中需要依靠较大或较为明显的水印来说,本申请实施例提供的技术方案能够减少水印对图像原有信息的影响。The image processing method provided by the embodiment of the present application converts a user identifier corresponding to a user into a target element in an image uniquely corresponding to the user identification information, and adds a watermark (target element) to the image to be processed. In the image element. In this way, the user's identification information (watermark) is added to the image without affecting the original information of the image. Compared with the prior art, the technical solution provided by the embodiment of the present application can reduce the influence of the watermark on the original information of the image.
同时,一旦有用户将图像泄漏到网络上,我们可以根据泄漏的图像解析出该图像包含的用户的水印,从而基于该水印查找到信息泄漏的源头用户。该方法由于其添加的水印并不明显,因此也在一定程度上避免了对于信息泄露者对于水印的发现和擦除行为。At the same time, once a user leaks an image onto the network, we can parse out the watermark of the user contained in the image based on the leaked image, thereby finding the source user of the information leak based on the watermark. This method avoids the discovery and erasure behavior of the watermark for the information leaker because the watermark added by the method is not obvious.
在一些实例中,本申请提供的图像处理方法进一步包括以下步骤:In some examples, the image processing method provided by the present application further includes the following steps:
响应于在所述用户设备上的登录操作,获取所述用户的用户账号;Acquiring a user account of the user in response to a login operation on the user equipment;
其中,所述响应于用户对图像的获取请求,获取用户标识包括:The obtaining the user identifier in response to the user acquiring the image includes:
根据所述用户账号去服务器获取与所述用户账号对应的用户标识。And obtaining, by the user account, a server identifier corresponding to the user account.
由于用户标识本身的内容或者格式并不一定转化成后续用于标注的图像元素,因此,需要对用户标识进行一定处理以确定合适的转换信息。例如,若图像元素的标注过程中需要数字序列的支持,而用户标识确实字母序列的情况时,就需要将满足字母序列的用户标识转换为数字序列以供后续图像元素的标注,类似的,若图像元素的标注过程中需要字母序列的支持,而用户标识确实数字序列的情况时,就需要将满足数字序列的用户标识转换为字母序列以供后续图像元素的标注,等等。基于此目的,本申请实施例针对用户标识的转换提供了相应的实现流程,即提供了步骤102的具体实现流程,如图2所示,包括:Since the content or format of the user identification itself does not necessarily translate into image elements that are subsequently used for annotation, the user identification needs to be processed to determine appropriate conversion information. For example, if the image element needs to be supported by a digital sequence in the labeling process, and the user identifier is indeed a sequence of letters, it is necessary to convert the user identifier that satisfies the sequence of letters into a sequence of numbers for labeling subsequent image elements, similarly, if In the labeling process of image elements, the support of the alphabetic sequence is required. When the user identifier is indeed a sequence of numbers, it is necessary to convert the user identifier satisfying the digit sequence into a sequence of letters for labeling subsequent image elements, and the like. For this purpose, the embodiment of the present application provides a corresponding implementation process for the conversion of the user identifier, that is, the specific implementation process of step 102 is provided, as shown in FIG. 2, including:
1021、使用指定规则对所述用户标识进行加密处理,得到所述转换 信息。1021: Perform encryption processing on the user identifier by using a specified rule to obtain the conversion information.
其中,所述指定规则为第一加密规则,所述第一加密规则为加密算法,用以将用户标识转换为转换信息。其中指定规则(第一加密规则)的实现方式可以有多种,可根据需求任意选择,例如插入冗余位,数据混淆,转换成二进制数、ACSII码转换等。本申请实施例在指定规则上的选择是开放的,不同的设备或软件应用允许选择不同的处理方式,既有灵活性也能保证私密性,同时指定规则(第一加密规则)的选择在功能没有优劣之分,只要能够准确、唯一的表示原数据即可,但对于设备性能和识别成本来说,选取复杂度较低的指定规则(第一加密规则)会有更高的效率。The specified rule is a first encryption rule, and the first encryption rule is an encryption algorithm, configured to convert a user identifier into conversion information. The specified rules (first encryption rules) can be implemented in a variety of ways, and can be arbitrarily selected according to requirements, such as inserting redundant bits, data confusion, conversion to binary numbers, ACSII code conversion, and the like. The selection of the specified rule in the embodiment of the present application is open, and different devices or software applications allow different processing modes to be selected, which has both flexibility and privacy, and the selection of the specified rule (first encryption rule) is in the function. There is no difference between good and bad, as long as the original data can be accurately and uniquely represented, but for device performance and recognition cost, it is more efficient to select a lower complexity specification rule (first encryption rule).
为方便对图像元素进行标注,需基于待处理图像中已有的图像元素进行编辑。基于此目的,本申请实施例提供了有关步骤104的具体实现方式,如图3所示,包括:In order to facilitate the annotation of image elements, it is necessary to edit based on the existing image elements in the image to be processed. For this purpose, the embodiment of the present application provides a specific implementation manner related to step 104, as shown in FIG. 3, including:
1041、获取所述待处理图像中符合线性排列方式的点。1041. Acquire a point in the image to be processed that conforms to a linear arrangement.
在执行上述步骤1041时,执行获取所述待处理图像中间隔相同的多个图像元素。When the above step 1041 is performed, acquiring a plurality of image elements having the same interval in the image to be processed is performed.
其中,符合线性排列方式的点可以包括网格线、标记线、分页线等依据点、圆圈或方格、短线段组成且排列具体一定规律的线状图像元素,示例如图4所示。在上述内容中提到,浏览器中的图像处理布局为设置一些图像元素,将图像元素添加到渲染的图像中。图像处理布局还会订单图像元素的位置,例如,定义几条网格线,各网格线的位置(例如,在纵坐标为10、20、30及40的位置处分别添加网格线),同时还会设置在第几条网格线上进行添加与用户标识对应的水印,例如,在第一条网格线上添加水印。The points conforming to the linear arrangement may include grid lines, mark lines, page lines, and the like, and line-shaped image elements which are composed of points, circles or squares, and short line segments and arranged in a certain regular pattern, as shown in FIG. 4 . As mentioned above, the image processing layout in the browser is to set some image elements and add image elements to the rendered image. The image processing layout also positions the image elements of the order, for example, defining a number of grid lines, the position of each grid line (for example, adding grid lines at positions of ordinates of 10, 20, 30, and 40, respectively), At the same time, a watermark corresponding to the user identifier is added on the first grid lines, for example, a watermark is added on the first grid line.
当然,在本申请实施例中也可以选择其它具有特定排列方式的图像元素,例如,点阵、田字格等等。Of course, other image elements having a specific arrangement may also be selected in the embodiment of the present application, for example, a dot matrix, a field lattice, and the like.
在此需要补充说明的是,并不是所有待处理图像中都可能存在符合线性排列方式的点,因此,在本申请实施例提供的实现方式中,在不影响原有图像的显示效果的前提下,若待处理图像中存在符合线性排列方 式的点,则直接作为图像元素的标注基础;若待处理图像中不存在符合线性排列方式的点,则可以将按照预设的符合线性排列方式的点添加在图像不显眼的位置(例如,在图像的边角位置处,将像素基本为灰色的一行像素点作为标注基础)。It should be noted that, in the image to be processed, the points in the linear arrangement may not exist in all the images to be processed. Therefore, in the implementation manner provided by the embodiment of the present application, the display effect of the original image is not affected. If there is a point in the image to be processed that conforms to the linear arrangement, it is directly used as the basis of the labeling of the image element; if there is no point in the image to be processed that conforms to the linear arrangement, the point according to the preset linear arrangement may be used. Add a position where the image is not conspicuous (for example, at the corner position of the image, a row of pixels whose pixels are substantially gray is used as the basis of the annotation).
在一些实例中,所述转换信息包含N个信息元素,N为正整数。本申请实施例还提供使用数字序列完成图像元素标注的方法进行具体实现方式的描述,即步骤105的具体实现方式,其流程如图5所示,包括:In some examples, the conversion information includes N information elements, N being a positive integer. The embodiment of the present application further provides a description of a specific implementation manner of the method for performing image element labeling using a digital sequence, that is, a specific implementation manner of step 105, and the process is as shown in FIG. 5, including:
1051、根据所述转换信息,确定排序序列和第一个目标元素。1051. Determine a sorting sequence and a first target element according to the conversion information.
其中,所述排序序列为包括N个数字的数字序列,所述数字序列中各数字与所述转换信息中各信息元素相对应。The sorting sequence is a sequence of numbers including N digits, and each digit in the digit sequence corresponds to each information element in the conversion information.
其中,用于用户标识存储在服务器上,服务器管理员能够获取用户标识,为了保证根据用户标识获取的对应目标元素的安全性,预设第一加密规则,将用户标识通过第一加密规则转换为转换信息。其中,服务器的管理员也无法获取所述第一加密规则。同时排序序列是为了进一步提高用户标识的安全性和方便目标元素的标注。将转换信息通过预设的第二加密规则转换为排序序列。例如,可以是将转换信息中各元素的前后顺序颠倒、按照指定顺序打乱或者按照指定运算规则运算、数字字母替换、ACSII码转换等方式择一或复合使用而重新生成的序列。The user identifier is stored on the server, and the server administrator can obtain the user identifier. To ensure the security of the corresponding target element obtained according to the user identifier, the first encryption rule is preset, and the user identifier is converted into the first encryption rule by using the first encryption rule. Convert information. The administrator of the server cannot obtain the first encryption rule. At the same time, the sorting sequence is to further improve the security of the user identification and facilitate the annotation of the target element. The conversion information is converted into a sorting sequence by a preset second encryption rule. For example, it may be a sequence in which the elements in the conversion information are reversed in the order of the preceding and succeeding, scrambled in a specified order, or regenerated according to a specified operation rule operation, alphanumeric substitution, ACSII code conversion, or the like.
第一个目标元素为所有可能被标注的图像元素中的基准图像元素,可以选择符合线性排列方式的点中的第一个点或随机点,本申请实施例对此不作限制。The first target element is a reference image element in all the image elements that may be labeled, and the first point or the random point in the point of the linear arrangement may be selected, which is not limited in this embodiment of the present application.
另外,需要补充说明的是,为方便对目标元素的选择和标注,上述排序序列一般为以数字为主的序列。当然也可以使用字母或符号等其它可行的形式表示,需要根据实际情况进行选择。In addition, it should be additionally noted that, in order to facilitate selection and labeling of target elements, the above sorting sequence is generally a sequence based on numbers. Of course, other feasible forms such as letters or symbols can also be used, and it is necessary to select according to actual conditions.
1052、根据所述排序序列中第一个数字的大小,确定与第一个目标元素间距为所述第一个数字的大小的图像元素,以作为第二个目标元素。1042. Determine, according to the size of the first number in the sorting sequence, an image element that is spaced apart from the first target element by the size of the first number as the second target element.
1053、根据所述排序序列中第二个数字的大小,确定与第二个目标元素间距为所述第二个数字的大小的图像元素,以作为第三个目标元 素;以此类推,直到获取N个目标元素。1053. Determine, according to the size of the second number in the sorting sequence, an image element that is spaced apart from the second target element by the size of the second number as a third target element; and so on until obtaining N target elements.
在一些实例中,根据预设的第二加密规则将所述转换信息转换为所述排序序列。其中,所述第二加密规则为加密算法,本申请不对具体的加密算法进行限制。In some examples, the conversion information is converted to the sorted sequence according to a preset second encryption rule. The second encryption rule is an encryption algorithm, and the specific encryption algorithm is not limited in this application.
在一些实例中,所述转换信息为数字序列,在执行所述根据预设的第二加密规则将所述转换信息转换为所述排序序列包括以下至少一个:In some examples, the conversion information is a digital sequence, and converting the conversion information into the sequence according to the preset second encryption rule includes at least one of the following:
所述第二加密规则为预定排序方式,对所述数字序列中各数字按照所述预定排序方式进行排序,获得所述排序序列;和The second encryption rule is a predetermined sorting manner, and the numbers in the digital sequence are sorted according to the predetermined sorting manner to obtain the sorting sequence; and
所述第二加密规则为预定放大倍数,对所述数字序列中各数字按照所述预定放大倍数调整大小,获得所述排序序列。The second encryption rule is a predetermined magnification, and the numbers in the digital sequence are resized according to the predetermined magnification to obtain the sorting sequence.
在一些实例中,其中,所述转换信息为字母序列,在执行所述根据预设的第二加密规则将所述转换信息转换为所述排序序列,包括:In some examples, wherein the conversion information is a sequence of letters, and performing the converting the conversion information into the sorting sequence according to a preset second encryption rule comprises:
根据所述字母序列中各字母在字母表中的位置,确定所述排序序列。The sorting sequence is determined based on the position of each letter in the alphabet in the alphabet.
在该实例中,所述第二加密规则为获取字母序列中各字母在字母表中的位置序号。In this example, the second encryption rule is to obtain the position number of each letter in the alphabet sequence in the alphabet.
在一些实例中,其中,所述转换信息为符号序列,在执行所述根据预设的第二加密规则将所述转换信息转换为所述排序序列时,包括:In some examples, the conversion information is a sequence of symbols, and when the converting the conversion information into the sorting sequence according to a preset second encryption rule, the method includes:
根据所述符号序列中各符号对应的ACSII码值,确定所述排序序列。在该实例中,所述第二加密规则为获取符号序列中各符号的ACSII码值。The sorting sequence is determined according to an ACSII code value corresponding to each symbol in the symbol sequence. In this example, the second encryption rule is to obtain an ACSII code value for each symbol in the symbol sequence.
在本申请实施例中,转换信息可以包括多种表达方式,例如,数字序列、字母序列、符号序列等。因此,根据转换信息表达方式的不同,确定排序序列的流程也会存在一定的差异。下文中将结合具体示例论述排序序列的确定方法。In the embodiment of the present application, the conversion information may include various expressions, such as a digital sequence, a letter sequence, a symbol sequence, and the like. Therefore, depending on the way the conversion information is expressed, there are some differences in the process of determining the sorting sequence. The determination method of the sorting sequence will be discussed below in conjunction with a specific example.
第一种情况:转换信息为数字序列。The first case: the conversion information is a sequence of numbers.
此时,对所述数字序列中各数字按照指定排序方式进行排序,获得所述排序序列,或者,对所述数字序列中各数字按照指定倍数调整大小,获得所述排序序列,或者二者结合。这样做既有利于增加用户标识的安全性,也增加了其它用户对于用户标识识别的难度。At this time, each digit in the digital sequence is sorted according to a specified sorting manner to obtain the sorting sequence, or the digits in the digit sequence are resized according to a specified multiple, the sorting sequence is obtained, or a combination thereof . This is beneficial to increase the security of the user identity and the difficulty of other users in identifying the user identity.
举例来说,如图6所示,若用户标识为ABCDE,则根据第一加密规则获取对应的数字序列就可以是12345,该第一加密规则为获取字母在字母表中的位置序号。相应的根据第二加密规则获取排序序列,例如,排序序列可以通过倒序处理调整为54321,也可统一扩大倍数为2、4、6、8、10。为方便后续描述,此处将排序序列暂定为54321。此时,若符合线性排列方式的点具有40个,那么可以选择第5个点为第一个目标元素,此时,第二个目标元素的位置就是第11(5+5+1)个点,第三个目标元素的位置就是第16(11+4+1)个点,第四个目标元素的位置就是第20(16+3+1)个点,第五个目标元素的位置就是第23(20+2+1)个点,第六个目标元素的位置就是第25(23+1+1)个点。标注后的网格线显示效果如图7所示的虚线框。For example, as shown in FIG. 6, if the user identifier is ABCDE, the corresponding number sequence is obtained according to the first encryption rule, which may be 12345. The first encryption rule is to obtain the position number of the letter in the alphabet. Correspondingly, the sorting sequence is obtained according to the second encryption rule. For example, the sorting sequence can be adjusted to 54321 by the reverse processing, or the multiples can be uniformly expanded to 2, 4, 6, 8, and 10. For the convenience of the following description, the sorting sequence is tentatively set to 54321. At this time, if there are 40 points that match the linear arrangement, then the 5th point can be selected as the first target element. At this time, the position of the second target element is the 11th (5+5+1)th point. The position of the third target element is the 16th (11+4+1)th point, the position of the fourth target element is the 20th (16+3+1)th point, and the position of the fifth target element is the first 23 (20 + 2 + 1) points, the position of the sixth target element is the 25th (23 + 1 + 1) points. The marked grid lines show the effect as shown in the dotted line frame in Figure 7.
第二种情况:转换信息为字母序列。The second case: the conversion information is a sequence of letters.
此时,根据所述字母序列中各字母在其对应的字母表中的位置关系,获得所述排序序列。At this time, the sorting sequence is obtained according to the positional relationship of each letter in the alphabetic sequence in its corresponding alphabet.
举例来说,若用户标识为12345,对应的字母序列就可以是bcdef(根据第一加密规则获取),相应的排序序列可以通过英文字母表的字母顺序将bcdef映射为23456(根据第二加密规则获取),也可以将序号进行一定的偏移,以将bcdef映射为45678。为方便后续描述,此处将排序序列暂定为23456。此时,若符合线性排列方式的点具有40个,那么可以选择第3个点为第一个目标元素,此时,第二个目标元素的位置就是第6(3+2+1)个点,第三个目标元素的位置就是第10(6+3+1)个点,第四个目标元素的位置就是第15(10+4+1)个点,第五个目标元素的位置就是第21(15+5+1)个点,第六个目标元素的位置就是第27(21+5+1)个点。该情况中目标元素的选择和示例与第一种情况类似,也可参照图6和图7所示原理。For example, if the user identifier is 12345, the corresponding letter sequence may be bcdef (according to the first encryption rule), and the corresponding sorting sequence may map bcdef to 23456 by alphabetical order of the English alphabet (according to the second encryption rule) Get), you can also offset the sequence number to map bcdef to 45678. For the convenience of the following description, the sorting sequence is tentatively set to 23456. At this time, if there are 40 points that match the linear arrangement, then the third point can be selected as the first target element. At this time, the position of the second target element is the 6th (3+2+1)th point. The position of the third target element is the 10th (6+3+1)th point, the position of the fourth target element is the 15th (10+4+1)th point, and the position of the fifth target element is the first 21 (15 + 5 + 1) points, the position of the sixth target element is the 27th (21 + 5 + 1) points. The selection and examples of the target elements in this case are similar to the first case, and the principles shown in FIGS. 6 and 7 can also be referred to.
第三种情况:转换信息为符号序列。The third case: the conversion information is a sequence of symbols.
举例来说,若用户标识为12345,对应的符号序列就可以是“;<=>?”(根据第一加密规则获取),相应的排序序列可以通过ACSII码值映射为59、60、61、62、63(根据第二加密规则获取),也可以将序号进行 一定的偏移,以将“;<=>?”映射为60、61、62、63、64。为方便后续描述,此处将排序序列暂定为60、61、62、63、64。此时,若符合线性排列方式的点具有80个,那么可以选择第1个点为第一个目标元素,此时,第二个目标元素的位置就是第62(60+1+1)个点,第三个目标元素的位置就是第124(62+61+1)个点,第四个目标元素的位置就是第187(124+62+1)个点,第五个目标元素的位置就是第251(187+63+1)个点,第六个目标元素的位置就是第316(251+64+1)个点。该情况中目标元素的选择和示例与第一种情况类似,也可参照图6和图7所示原理。For example, if the user identifier is 12345, the corresponding symbol sequence may be “;<=>?” (according to the first encryption rule), and the corresponding sorting sequence may be mapped to 59, 60, 61 by the ACSII code value. 62, 63 (according to the second encryption rule), the sequence number may also be offset to map "; <=>?" to 60, 61, 62, 63, 64. For the convenience of the following description, the sorting sequence is tentatively set to 60, 61, 62, 63, 64 here. At this time, if there are 80 points that match the linear arrangement, then the first point can be selected as the first target element. At this time, the position of the second target element is the 62nd (60+1+1)th point. The position of the third target element is the 124th (62+61+1)th point, the position of the fourth target element is the 187th (124+62+1)th point, and the position of the fifth target element is the first 251 (187 + 63 + 1) points, the position of the sixth target element is the 316 (251 + 64 + 1) points. The selection and examples of the target elements in this case are similar to the first case, and the principles shown in FIGS. 6 and 7 can also be referred to.
需要说明的是,以上有关数字序列、字母序列、符号序列的生成结果和生成方式仅是示例,可以根据实际情况自由进行配置和生成,本申请实施例对此不做限制。It should be noted that the above-mentioned generation results and the generation manners of the digital sequence, the alphabetic sequence, and the symbol sequence are only examples, and can be configured and generated according to the actual situation, which is not limited in the embodiment of the present application.
在一些实例中,对所述目标元素的显示状态进行调整,包括以下至少一个:In some examples, the display state of the target element is adjusted, including at least one of the following:
对所述目标元素的大小进行调整;和,对所述目标元素的颜色进行调整。Adjusting the size of the target element; and, adjusting the color of the target element.
另外,为了解决包含有被标注图像元素的图像如何识别出用户标识的问题,本申请实施例还提供了一种图像处理的方法,应用于终端设备或服务器,如图8所示,包括:In addition, in order to solve the problem that the image of the labeled image element is identified, the image processing method is applied to the terminal device or the server. As shown in FIG. 8 , the method includes:
201、获取待处理图像。201. Acquire an image to be processed.
此处的待处理图像即为执行前述步骤106之后得到的图像。响应于对图像的识别请求,获取待处理图像。例如,当公式的财务人员将公司的季度销售额图表泄露后,当公司发现该图表后,公司相关人员可以通过在线的方式将所述图表提交给服务器进行识别其中携带的水印对应的用户标识,从而可以查找泄露所述图表的相关人员。同时也可以将该图表交给所述服务器的维护人员,由所述维护人员将图表输入终端设备上的应用程序,识别出图表中携带的用户标识,进而输出与所述用户的用户标识对应的用户账号。The image to be processed here is the image obtained after performing the aforementioned step 106. The image to be processed is acquired in response to the identification request for the image. For example, when the financial staff of the formula leaks the company's quarterly sales chart, when the company finds the chart, the company related personnel can submit the chart to the server online to identify the user identifier corresponding to the watermark carried therein. This makes it possible to find the person who leaked the chart. At the same time, the chart can be handed over to the maintenance personnel of the server, and the maintenance personnel input the chart into the application program on the terminal device, identify the user identifier carried in the chart, and output the user identifier corresponding to the user. user account.
202、获取待处理图像中符合特定排列方式的图像元素。202. Acquire an image element in a to-be-processed image that conforms to a specific arrangement.
在执行上述步骤202时,获取所述待处理图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则。When the above step 202 is performed, a plurality of image elements in the image to be processed are acquired, and the arrangement manner of the plurality of image elements conforms to a predetermined arrangement rule.
此处提到的符合特定排列方式的图像元素即对应于步骤104中提到的图像元素,因为被标注的图像元素会在待处理图像中符合特定排列方式的图像元素中体现出来,因此需要在待处理图像中查找。The image elements mentioned in the specific arrangement mentioned here correspond to the image elements mentioned in step 104, because the labeled image elements will be reflected in the image elements in the image to be processed that match the specific arrangement, so Find in the image to be processed.
203、从符合特定排列方式的图像元素中确定被标注的目标元素。203. Determine the labeled target element from the image elements that meet the specific arrangement.
在执行上述步骤203时,从所述多个图像元素中确定多个目标元素,其中所述多个目标元素的显示状态与所述图像中其他图像元素的显示状态不同。When the above step 203 is performed, a plurality of target elements are determined from the plurality of image elements, wherein display states of the plurality of target elements are different from display states of other image elements in the image.
204、根据被标注的目标元素确定用户标识。204. Determine a user identifier according to the marked target element.
与前述步骤1041对应的,步骤202的具体实现方式即为获取所述待处理图像中符合线性排列方式的点。Corresponding to the foregoing step 1041, the specific implementation of the step 202 is to obtain a point in the image to be processed that conforms to the linear arrangement.
与前述步骤106对应的,步骤203的具体实现方式需要从符合特定排列方式的图像元素中将具有特定规格和/或特定颜色的图像元素确定为被标注的目标元素。Corresponding to the foregoing step 106, the specific implementation of step 203 requires determining image elements having specific specifications and/or specific colors from the image elements that conform to the particular arrangement as the labeled target elements.
在一些实例中,其中,所述获取所述待处理图像中多个图像元素,包括:In some examples, the acquiring the plurality of image elements in the image to be processed includes:
获取所述待处理图像中间隔相同的多个图像元素。获取图像元素的步骤与本申请提供的上一个图像处理方法中的相关步骤相同,在此不再赘述。Obtaining a plurality of image elements having the same interval in the image to be processed. The steps of obtaining the image elements are the same as the related steps in the previous image processing method provided by the present application, and details are not described herein again.
在一些实例中,其中,所述从所述多个图像元素中确定多个目标元素包括:In some examples, wherein the determining a plurality of target elements from the plurality of image elements comprises:
在所述多个图像元素中将显示规格和显示颜色中至少一个与其他图像不同的图像元素作为目标元素。An image element having at least one of a display specification and a display color different from the other images is used as the target element among the plurality of image elements.
由于在对目标元素的显示状态进行调整时,是将目标元素的规格和/或者颜色进行修改,因而相对应地,根据目标元素的规格和/或颜色可以确定目标元素。Since the specification and/or color of the target element is modified when the display state of the target element is adjusted, the target element can be determined according to the specification and/or color of the target element.
在一些实例中,其中,所述根据所述多个目标元素确定所述图像对应的用户标识包括:In some examples, the determining, by the plurality of target elements, the user identifier corresponding to the image includes:
确定所述多个目标元素的排序;Determining the ordering of the plurality of target elements;
根据所述多个目标元素的排序确定所述排序中相邻两个目标元素之间的间距;Determining a spacing between two adjacent target elements in the sorting according to the ranking of the plurality of target elements;
根据所述相邻两个目标元素之间的间距确定所述多个目标元素的排序序列;Determining a sorting sequence of the plurality of target elements according to a spacing between the adjacent two target elements;
根据所述排序序列确定所述图像对应的用户标识。Determining a user identifier corresponding to the image according to the sorting sequence.
其中,所述目标元素的排序可以为从前往后的排序规则,也可以采用从后往前的排序规则,以及从上往下的排序规则、从下往上的排序规则以及其他的排序规则。The ordering of the target elements may be a sorting rule from the heading to the back, a sorting rule from the back to the front, a sorting rule from the top to the bottom, a sorting rule from the bottom up, and other sorting rules.
在一些实例中,其中,所述排序序列为包括N个数字的数字序列,N为正整数;In some examples, wherein the sorting sequence is a sequence of numbers comprising N digits, N being a positive integer;
所述根据所述相邻两个目标元素之间的间距确定所述多个目标元素的排序序列包括:The determining the sequence of the plurality of target elements according to the spacing between the two adjacent target elements comprises:
根据第一个目标元素与第二个目标元素的间距确定所述排序序列中第一个元素;Determining a first element in the sorting sequence according to a spacing between a first target element and a second target element;
根据第二个目标元素与第三个目标元素的间距确定所述排序序列中第二个元素;Determining a second element in the sorting sequence according to a spacing between the second target element and the third target element;
以此类推,直到获取所述排序序列中的N个数字。And so on until the N numbers in the sorting sequence are obtained.
与前述步骤1051至1053对应的,步骤204的具体实现方式如图9所示,包括:Corresponding to the foregoing steps 1051 to 1053, the specific implementation of step 204 is as shown in FIG. 9, and includes:
2041、根据第一个目标元素与第二个目标元素的间距确定排序序列中第一个数字的大小。2041. Determine a size of a first number in the sorting sequence according to a spacing between the first target element and the second target element.
2042、根据第二个目标元素与第三个目标元素的间距确定排序序列中第二个数字的大小;以此类推,以获取排序序列中的所有元素。2042. Determine a size of a second number in the sorting sequence according to a spacing between the second target element and the third target element; and so on to obtain all elements in the sorting sequence.
2043、根据已确定的排序序列中元素的数量、排序和大小确定用户标识。2043. Determine a user identifier according to the quantity, sort, and size of the elements in the determined sorting sequence.
在步骤2043的实现过程中,还包括以下步骤20431和20432,具体如图10所示,包括:In the implementation process of step 2043, the following steps 20431 and 20432 are further included, as shown in FIG. 10, including:
20431、根据已确定的排序序列中元素的数量、排序和大小确定与 所述用户标识对应的转换信息。20431. Determine conversion information corresponding to the user identifier according to the determined number, order, and size of elements in the sorting sequence.
在执行上述步骤20431时,根据预设的第一解密规则将所述排序序列转换为转换信息When the above step 20431 is performed, the sorting sequence is converted into conversion information according to a preset first decryption rule.
20432、根据已确定转换信息,获得相应的用户标识。20432. Obtain a corresponding user identifier according to the determined conversion information.
在执行上述20432时,根据预设的第二解密规则将所述转换信息转换为所述用户标识。When the above 20432 is executed, the conversion information is converted into the user identifier according to a preset second decryption rule.
其中,所述第一解密规则与所述第二加密规则对应,是所述第二加密规则的逆运算。所述第二解密规则与所述第一加密规则对应,是所述第一加密规则的逆运算。The first decryption rule corresponds to the second encryption rule and is an inverse operation of the second encryption rule. The second decryption rule corresponds to the first encryption rule and is an inverse operation of the first encryption rule.
在一些实例中,其中,所述根据预设的第一解密规则将所述排序序列转换为转换信息包括以下至少一个:In some examples, the converting the sorting sequence into conversion information according to a preset first decryption rule includes at least one of the following:
所述第一解密规则为预定排序方式,对所述排序序列中各数字按照所述预定排序方式进行排序,获得所述转换信息;和The first decryption rule is a predetermined sorting manner, and each digit in the sorting sequence is sorted according to the predetermined sorting manner to obtain the conversion information; and
所述第一解密规则为预定放大倍数,对所述排序序列中各数字按照所述预定放大倍数调整大小,获得所述转换信息。The first decryption rule is a predetermined magnification, and each digit in the sorting sequence is resized according to the predetermined magnification to obtain the conversion information.
与前述基于用户标识确定目标元素的几种情况相对应,本申请实施例为方便技术人员理解,在此也提供相应的用户标识还原流程。Corresponding to the foregoing several cases in which the target element is determined based on the user identifier, the embodiment of the present application is convenient for the technical personnel to understand, and the corresponding user identification restoration process is also provided here.
第一种情况:转换信息为数字序列。The first case: the conversion information is a sequence of numbers.
所述根据已确定的排序序列中元素的数量、排序和大小确定与所述用户标识对应的转换信息的具体实现方式可以为对所述排序序列中各数字按照指定排序方式进行排序,获得数字序列,以作为所述转换信息;和/或,对所述排序序列中各数字按照指定倍数调整大小,获得数字序列,以作为所述转换信息。The specific implementation manner of determining the conversion information corresponding to the user identifier according to the quantity, the sorting, and the size of the elements in the determined sorting sequence may be to sort the numbers in the sorting sequence according to a specified sorting manner, and obtain a digital sequence. And as the conversion information; and/or, resizing each digit in the sorting sequence by a specified multiple to obtain a digital sequence as the conversion information.
相应的用户标识识别过程举例来说,可包括:根据步骤203的执行结果可以确定第5、11、16、20、23、25为6个目标元素。此时,按照204及其具体实现流程则可以确认相应的排序序列5(11-5-1)4(16-11-1)3(20-16-1)2(23-20-1)1(25-23-1),对应的数字序列就可以是12345,用户标识最终被确定为ABCDE。The corresponding user identification identification process may include, for example, determining that the fifth, 11, 16, 20, 23, and 25 are six target elements according to the execution result of step 203. At this time, according to 204 and its specific implementation flow, the corresponding sorting sequence 5(11-5-1)4(16-11-1)3(20-16-1)2(23-20-1)1 can be confirmed. (25-23-1), the corresponding number sequence can be 12345, and the user ID is finally determined to be ABCDE.
第二种情况:转换信息为字母序列。The second case: the conversion information is a sequence of letters.
所述根据已确定的排序序列中元素的数量、排序和大小确定与所述用户标识对应的转换信息的具体实现方式可以为基于指定字母表中各字母的位置关系,根据所述排序序列中元素的数量、排序和大小,确定相应字母序列中各字母的数量和排序,以作为所述转换信息。The specific implementation manner of determining the conversion information corresponding to the user identifier according to the number, order, and size of the elements in the determined sorting sequence may be based on the positional relationship of each letter in the specified alphabet, according to the elements in the sorting sequence. The number, order, and size of the number of letters in the corresponding letter sequence are determined as the conversion information.
相应的用户标识识别过程举例来说,可包括:根据步骤203的执行结果可以确定第3、6、10、15、21、27为6个目标元素。此时,按照204及其具体实现流程则可以确认相应的排序序列2(6-3-1)3(10-6-1)4(15-10-1)5(21-15-1)6(27-21-1),对应的字母序列就可以是bcdef,用户标识最终被确定为12345。The corresponding user identification and recognition process may include, for example, determining that the third, sixth, ten, 15, 21, and 27 are six target elements according to the execution result of step 203. At this time, according to 204 and its specific implementation flow, the corresponding sorting sequence 2(6-3-1)3(10-6-1)4(15-10-1)5(21-15-1)6 can be confirmed. (27-21-1), the corresponding letter sequence can be bcdef, and the user ID is finally determined to be 12345.
第三种情况:转换信息为符号序列。The third case: the conversion information is a sequence of symbols.
所述根据已确定的排序序列中元素的数量、排序和大小确定与所述用户标识对应的转换信息的具体实现方式可以为基于ACSII码表,根据所述排序序列中各元素的大小确定相应的符号;根据已确定的排序序列中元素的数量、排序以及已确定的符号,确定相应的符号序列,以作为转换信息。The specific implementation manner of determining the conversion information corresponding to the user identifier according to the number, order, and size of the elements in the determined sorting sequence may be based on the ACSII code table, and determining corresponding according to the size of each element in the sorting sequence. Symbol; determines the corresponding symbol sequence as the conversion information according to the number, order, and determined symbols of the elements in the determined sorting sequence.
相应的用户标识识别过程举例来说,可包括:根据步骤203的执行结果可以确定第1、62、124、187、251、316为6个目标元素。此时,按照204及其具体实现流程则可以确认相应的排序序列60(62-1-1)61(124-62-1)62(187-124-1)63(251-187-1)64(316-251-1),对应的数字序列就可以是60、61、62、63、64,用户标识最终被确定为“;<=>?”。For example, the corresponding user identification identification process may include: determining, according to the execution result of step 203, that the first target element is 62, 124, 187, 251, and 316. At this time, according to 204 and its specific implementation flow, the corresponding sorting sequence 60(62-1-1) 61(124-62-1)62(187-124-1)63(251-187-1)64 can be confirmed. (316-251-1), the corresponding number sequence can be 60, 61, 62, 63, 64, and the user identification is finally determined as "; <=>?".
本申请实施例提供了一种图像处理的装置1100,如图11所示,可用于实现前述101至106及其具体方法流程,包括:The embodiment of the present application provides an apparatus 1100 for image processing, as shown in FIG. 11, which can be used to implement the foregoing 101 to 106 and a specific method thereof, including:
第一获取单元31,用于响应于用户对图像的获取请求,获取用户标识。The first obtaining unit 31 is configured to acquire the user identifier in response to the user acquiring the image.
第二获取单元32,用于将所述用户标识转换为对应的转换信息,其中,所述转换信息包含多个信息元素,用以调整所述图像上的多个图像元素的显示状态。The second obtaining unit 32 is configured to convert the user identifier into corresponding conversion information, where the conversion information includes a plurality of information elements for adjusting display states of the plurality of image elements on the image.
第三获取单元33,用于根据所述请求获取所述图像;a third obtaining unit 33, configured to acquire the image according to the request;
第四获取单元34,用于获取所述图像中多个图像元素,所述多个图 像元素的排列方式符合预定的排列规则。The fourth obtaining unit 34 is configured to acquire a plurality of image elements in the image, and the plurality of image elements are arranged in a manner consistent with a predetermined arrangement rule.
第五获取单元35,用于根据所述转换信息中的多个信息元素,从所述多个图像元素中选择多个目标元素,其中,所述多个目标元素之间的位置关系与所述转换信息中的多个信息元素相对应。a fifth obtaining unit 35, configured to select, from the plurality of image elements, a plurality of target elements according to the plurality of information elements in the conversion information, wherein a positional relationship between the plurality of target elements is Multiple information elements in the conversion information correspond.
标注单元36,用于对所述多个目标元素的显示状态进行调整,使得所述多个目标元素的显示状态与所述图像中的其他图像元素不同。The labeling unit 36 is configured to adjust display states of the plurality of target elements such that display states of the plurality of target elements are different from other image elements in the image.
在一些实施例中,所述第二获取单元31具体用于使用预设的第一加密规则对所述用户标识进行加密处理,得到所述转换信息。In some embodiments, the second obtaining unit 31 is specifically configured to perform encryption processing on the user identifier by using a preset first encryption rule to obtain the conversion information.
在一些实施例中,所述第四获取单元34具体用于获取所述图像中间隔相同的多个图像元素。In some embodiments, the fourth obtaining unit 34 is specifically configured to acquire a plurality of image elements having the same interval in the image.
在一些实施例中,所述转换信息包含N个信息元素,N为正整数,所述第五获取单元35具体用于根据所述转换信息,确定排序序列和第一个目标元素,其中,所述排序序列为包括N个数字的数字序列,所述数字序列中各数字与所述转换信息中各信息元素相对应;根据所述排序序列中第一个数字的大小,确定与第一个目标元素间距为所述第一个数字的大小的图像元素,以作为第二个目标元素;根据所述排序序列中第二个数字的大小,确定与第二个目标元素间距为所述第二个数字的大小的图像元素,以作为第三个目标元素;以此类推,直到获取N个目标元素。In some embodiments, the conversion information includes N information elements, N is a positive integer, and the fifth obtaining unit 35 is specifically configured to determine a sorting sequence and a first target element according to the conversion information, where The sorting sequence is a sequence of numbers comprising N digits, each digit in the digit sequence corresponding to each information element in the conversion information; determining the first target according to the size of the first digit in the sorting sequence An image element having an element spacing of the size of the first number as a second target element; determining, according to a size of the second number in the sorting sequence, a spacing from the second target element to the second The image element of the size of the number, as the third target element; and so on, until N target elements are obtained.
在一些实施例中,所述转换信息为数字序列,所述第五获取单元35具体还用于执行以下至少一个操作,In some embodiments, the conversion information is a sequence of numbers, and the fifth obtaining unit 35 is further configured to perform at least one of the following operations,
所述第二加密规则为预定排序方式,对所述数字序列中各数字按照所述预定排序方式进行排序,获得所述排序序列;和The second encryption rule is a predetermined sorting manner, and the numbers in the digital sequence are sorted according to the predetermined sorting manner to obtain the sorting sequence; and
所述第二加密规则为预定放大倍数,对所述数字序列中各数字按照所述预定放大倍数调整大小,获得所述排序序列。The second encryption rule is a predetermined magnification, and the numbers in the digital sequence are resized according to the predetermined magnification to obtain the sorting sequence.
在一些实施例中,所述第五获取单元35具体还用于当所述转换信息为字母序列时,根据所述字母序列中各字母在其对应的字母表中的位置关系,获得所述排序序列。In some embodiments, the fifth obtaining unit 35 is further configured to: when the conversion information is a sequence of letters, obtain the sort according to a positional relationship of each letter in the alphabet sequence in its corresponding alphabet. sequence.
在一些实施例中,所述第五获取单元35具体还用于当所述转换信 息为符号序列时,根据所述符号序列中各符号对应的ACSII码值,获得所述排序序列。In some embodiments, the fifth obtaining unit 35 is further configured to: when the converted information is a symbol sequence, obtain the sorting sequence according to an ACSII code value corresponding to each symbol in the symbol sequence.
在一些实施例中,所述标注单元36具体用于对所述目标元素的大小进行调整;和/或,对所述目标元素的颜色进行调整。In some embodiments, the labeling unit 36 is specifically configured to adjust a size of the target element; and/or adjust a color of the target element.
本申请实施例提供了一种图像处理的装置1200,如图12所示,可用于实现前述201至204及其具体方法流程,包括:The embodiment of the present application provides an apparatus 1200 for image processing, as shown in FIG. 12, which can be used to implement the foregoing 201 to 204 and a specific method thereof, including:
第一获取单元41,用于响应于对图像的识别请求,获取待处理图像。The first obtaining unit 41 is configured to acquire an image to be processed in response to the identification request for the image.
第二获取单元42,用于获取所述待处理图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则。The second obtaining unit 42 is configured to acquire a plurality of image elements in the image to be processed, and the arrangement manners of the plurality of image elements conform to a predetermined arrangement rule.
第一确定单元43,用于从所述多个图像元素中确定多个目标元素,其中所述多个目标元素的显示状态与所述图像中其他图像元素的显示状态不同。The first determining unit 43 is configured to determine, from the plurality of image elements, a plurality of target elements, wherein display states of the plurality of target elements are different from display states of other image elements in the image.
第二确定单元44,用于根据所述多个目标元素确定所述图像对应的用户标识。The second determining unit 44 is configured to determine, according to the multiple target elements, a user identifier corresponding to the image.
在一些实施例中,所述第二获取单元42具体用于获取所述待处理图像中间隔相同的多个图像元素。In some embodiments, the second obtaining unit 42 is specifically configured to acquire a plurality of image elements having the same interval in the image to be processed.
在一些实施例中,所述第一确定单元43具体用于在所述多个图像元素中将显示规格和显示颜色中至少一个与其他图像不同的图像元素作为目标元素。In some embodiments, the first determining unit 43 is specifically configured to use, as the target element, an image element that is different from the other images in at least one of the display specification and the display color among the plurality of image elements.
在一些实施例中,如图13所示,所述第二确定单元44包括:In some embodiments, as shown in FIG. 13, the second determining unit 44 includes:
第一确定模块441,用于确定所述多个目标元素的排序;根据所述多个目标元素的排序确定所述排序中相邻两个目标元素之间的间距。a first determining module 441, configured to determine an order of the plurality of target elements; and determine a spacing between adjacent two target elements in the sorting according to the sorting of the plurality of target elements.
第二确定模442,用于根据所述相邻两个目标元素之间的间距确定所述多个目标元素的排序序列。The second determining mode 442 is configured to determine a sorting sequence of the plurality of target elements according to a spacing between the two adjacent target elements.
根据第一个目标元素与第二个目标元素的间距确定排序序列中第一个数字的大小;根据第二个目标元素与第三个目标元素的间距确定排序序列中第二个数字的大小;以此类推,以获取排序序列中的所有元素。Determining the size of the first number in the sorting sequence according to the spacing between the first target element and the second target element; determining the size of the second number in the sorting sequence according to the spacing between the second target element and the third target element; And so on, to get all the elements in the sorting sequence.
第三确定模块443,用于根据所述排序序列确定所述图像对应的用户标识。The third determining module 443 is configured to determine, according to the sorting sequence, a user identifier corresponding to the image.
在一些实例中,其中,所述排序序列为包括N个数字的数字序列,N为正整数;所述第二确定模块442,用以:In some examples, wherein the sorting sequence is a sequence of numbers including N digits, N is a positive integer; and the second determining module 442 is configured to:
根据第一个目标元素与第二个目标元素的间距确定所述排序序列中第一个元素;Determining a first element in the sorting sequence according to a spacing between a first target element and a second target element;
根据第二个目标元素与第三个目标元素的间距确定所述排序序列中第二个元素;Determining a second element in the sorting sequence according to a spacing between the second target element and the third target element;
以此类推,直到获取所述排序序列中的N个数字。And so on until the N numbers in the sorting sequence are obtained.
在一些实例中,其中,所述第三确定模块443,用于:In some examples, the third determining module 443 is configured to:
根据预设的第一解密规则将所述排序序列转换为转换信息;Converting the sorting sequence into conversion information according to a preset first decryption rule;
根据预设的第二解密规则将所述转换信息转换为所述用户标识。Converting the conversion information into the user identifier according to a preset second decryption rule.
在一些实施例中,如图14所示,所述第一确定模块441包括:In some embodiments, as shown in FIG. 14, the first determining module 441 includes:
第一确定子模块4411,用于根据已确定的排序序列中元素的数量、排序和大小确定与所述用户标识对应的转换信息。The first determining sub-module 4411 is configured to determine, according to the determined number, order, and size of the elements in the sorting sequence, the conversion information corresponding to the user identifier.
第二确定子模块4412,用于根据已确定转换信息,获得相应的用户标识。The second determining sub-module 4412 is configured to obtain a corresponding user identifier according to the determined conversion information.
在一些实施例中,所述第一确定子模块4411具体用于对所述排序序列中各数字按照指定排序方式进行排序,获得所述数字序列;和/或,对所述排序序列中各数字按照指定倍数调整大小,获得所述数字序列。In some embodiments, the first determining sub-module 4411 is specifically configured to sort each digit in the sorting sequence according to a specified sorting manner to obtain the digit sequence; and/or, for each digit in the sorting sequence The sequence of numbers is obtained by resizing according to a specified multiple.
在一些实施例中,所述第一确定子模块4411具体用于基于指定字母表中各字母的位置关系,根据所述排序序列中元素的数量、排序和大小,确定相应字母序列中各字母的数量和排序,以作为所述转换信息。In some embodiments, the first determining sub-module 4411 is specifically configured to determine, according to the positional relationship of each letter in the specified alphabet, the letters in the corresponding alphabetic sequence according to the number, order, and size of the elements in the sorting sequence. Quantity and sorting as the conversion information.
在一些实施例中,所述第一确定子模块4411具体用于基于ACSII码表,根据所述排序序列中各元素的大小确定相应的符号;根据已确定的排序序列中元素的数量、排序以及已确定的符号,确定相应的符号序列,以作为转换信息In some embodiments, the first determining sub-module 4411 is specifically configured to determine, according to an ACSII code table, a corresponding symbol according to a size of each element in the sorting sequence; according to the determined number, order, and The determined symbol determines the corresponding symbol sequence as the conversion information
本申请还提供了一种非易失性计算机可读存储介质,其中所述存储介质中存储有机器可读指令,所述机器可读指令可以由处理器执行以完成上述任一项所述的方法。The present application also provides a non-transitory computer readable storage medium, wherein the storage medium stores machine readable instructions, which are executable by a processor to perform the method.
本申请实施例提供的图像处理的装置,通过将用户对应的用户标识 转换为与该用户标识信息唯一对应的图像中的目标元素,并将水印(目标元素)添加到待处理图像上的已有图像元素中。这样在不影响该图像的原有信息的基础上,又将用户的标识信息(水印)添加在了图像中。相比于现有技术中需要依靠较大或较为明显的水印来说,本申请实施例提供的技术方案能够减少水印对图像原有信息的影响。The apparatus for image processing provided by the embodiment of the present application converts a user identifier corresponding to a user into a target element in an image uniquely corresponding to the user identification information, and adds a watermark (target element) to the existing image to be processed. In the image element. In this way, the user's identification information (watermark) is added to the image without affecting the original information of the image. Compared with the prior art, the technical solution provided by the embodiment of the present application can reduce the influence of the watermark on the original information of the image.
同时,一旦有用户将图像泄漏到网络上,我们可以根据泄漏的图像解析出该图像包含的用户的水印,从而基于该水印查找到信息泄漏的源头用户。该方法由于其添加的水印并不明显,因此也在一定程度上避免了对于信息泄露者对于水印的发现和擦除行为。At the same time, once a user leaks an image onto the network, we can parse out the watermark of the user contained in the image based on the leaked image, thereby finding the source user of the information leak based on the watermark. This method avoids the discovery and erasure behavior of the watermark for the information leaker because the watermark added by the method is not obvious.
图15示出了图像处理的装置1100及图像处理的装置1200所在的计算设备的组成结构图。如图15所示,该计算设备包括一个或者多个处理器(CPU)1502、通信模块1504、存储器1506、用户接口1510,以及用于互联这些组件的通信总线1508。FIG. 15 is a diagram showing the composition of a computing device in which the image processing apparatus 1100 and the image processing apparatus 1200 are located. As shown in FIG. 15, the computing device includes one or more processors (CPUs) 1502, communication modules 1504, memories 1506, user interfaces 1510, and a communication bus 1508 for interconnecting these components.
处理器1502可通过通信模块1504接收和发送数据以实现网络通信和/或本地通信。The processor 1502 can receive and transmit data through the communication module 1504 to effect network communication and/or local communication.
用户接口1510包括一个或多个输出设备1512,其包括一个或多个扬声器和/或一个或多个可视化显示器。用户接口1510也包括一个或多个输入设备1514,其包括诸如,键盘,鼠标,声音命令输入单元或扩音器,触屏显示器,触敏输入板,姿势捕获摄像机或其他输入按钮或控件等。User interface 1510 includes one or more output devices 1512 that include one or more speakers and/or one or more visual displays. User interface 1510 also includes one or more input devices 1514 including, for example, a keyboard, a mouse, a voice command input unit or loudspeaker, a touch screen display, a touch sensitive tablet, a gesture capture camera or other input button or control, and the like.
存储器1506可以是高速随机存取存储器,诸如DRAM、SRAM、DDR RAM、或其他随机存取固态存储设备;或者非易失性存储器,诸如一个或多个磁盘存储设备、光盘存储设备、闪存设备,或其他非易失性固态存储设备。Memory 1506 can be a high speed random access memory such as DRAM, SRAM, DDR RAM, or other random access solid state storage device; or nonvolatile memory such as one or more disk storage devices, optical disk storage devices, flash memory devices, Or other non-volatile solid-state storage devices.
存储器1506存储处理器1502可执行的指令集,存储器中存储的指令代码经配置以由处理器执行,以实现上述本申请中的图像处理的方法中的各步骤,同时还实现本申请的图像处理的装置中各模块的功能。The memory 1506 stores a set of instructions executable by the processor 1502, the instruction code stored in the memory being configured to be executed by the processor to implement the steps in the method of image processing in the present application described above, while also implementing image processing of the present application. The function of each module in the device.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例 中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(Processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present application. Part of the steps. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请实施例,凡在本申请实施例的原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请实施例保护的范围之内。The above description is only the preferred embodiment of the present application, and is not intended to limit the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc., which are included in the principles of the embodiments of the present application, should be included in Within the scope of protection of the embodiments of the present application.

Claims (29)

  1. 一种图像处理的方法,应用于用户设备,其特征在于,包括:A method for image processing, applied to a user equipment, comprising:
    响应于用户对图像的获取请求,获取用户标识,将所述用户标识转换为对应的转换信息,其中,所述转换信息包含多个信息元素,用以调整所述图像上的多个图像元素的显示状态;Retrieving the user identifier, and converting the user identifier into corresponding conversion information, wherein the conversion information includes a plurality of information elements for adjusting a plurality of image elements on the image, in response to the user acquiring the image Display state;
    根据所述请求获取所述图像,并获取所述图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则;Acquiring the image according to the request, and acquiring a plurality of image elements in the image, the arrangement manner of the plurality of image elements conforming to a predetermined arrangement rule;
    根据所述转换信息中的多个信息元素,从所述多个图像元素中选择多个目标元素,其中,所述多个目标元素之间的位置关系与所述转换信息中的多个信息元素相对应;Selecting a plurality of target elements from the plurality of image elements according to the plurality of information elements in the conversion information, wherein a positional relationship between the plurality of target elements and a plurality of information elements in the conversion information Corresponding;
    对所述多个目标元素的显示状态进行调整,使得所述多个目标元素的显示状态与所述图像中的其他图像元素不同。The display states of the plurality of target elements are adjusted such that display states of the plurality of target elements are different from other image elements in the image.
  2. 根据权利要求1所述的方法,其中,所述方法进一步包括:The method of claim 1 wherein the method further comprises:
    响应于在所述用户设备上的登录操作,获取所述用户的用户账号;Acquiring a user account of the user in response to a login operation on the user equipment;
    其中,所述响应于用户对图像的获取请求,获取用户标识包括:The obtaining the user identifier in response to the user acquiring the image includes:
    根据所述用户账号去服务器获取与所述用户账号对应的用户标识。And obtaining, by the user account, a server identifier corresponding to the user account.
  3. 根据权利要求1所述的方法,其中,其中,所述将所述用户标识转换为对应的转换信息,包括:The method of claim 1, wherein the converting the user identifier into corresponding conversion information comprises:
    使用预设的第一加密规则对所述用户标识进行加密处理,得到所述转换信息。The user identifier is encrypted by using a preset first encryption rule to obtain the conversion information.
  4. 根据权利要求1所述的方法,其中,所述获取所述图像中多个图像元素包括:The method of claim 1 wherein said obtaining a plurality of image elements in said image comprises:
    获取所述图像中间隔相同的多个图像元素。Acquiring a plurality of image elements of the same interval in the image.
  5. 根据权利要求4所述的方法,其中,所述转换信息包含N个信息元素,N为正整数;所述根据所述转换信息中的多个信息元素,从所述多个图像元素中选择多个目标元素包括:The method according to claim 4, wherein said conversion information comprises N information elements, N being a positive integer; said selecting from said plurality of image elements based on a plurality of information elements in said conversion information Target elements include:
    根据所述转换信息,确定排序序列和第一个目标元素,其中,所述排序序列为包括N个数字的数字序列,所述数字序列中各数字与所述转 换信息中各信息元素相对应;Determining, according to the conversion information, a sorting sequence and a first target element, wherein the sorting sequence is a digital sequence comprising N digits, each digit in the digit sequence corresponding to each information element in the conversion information;
    根据所述排序序列中第一个数字的大小,确定与第一个目标元素间距为所述第一个数字的大小的图像元素,以作为第二个目标元素;Determining, according to the size of the first number in the sorting sequence, an image element that is spaced apart from the first target element by the size of the first number as a second target element;
    根据所述排序序列中第二个数字的大小,确定与第二个目标元素间距为所述第二个数字的大小的图像元素,以作为第三个目标元素;Determining, according to the size of the second number in the sorting sequence, an image element that is spaced apart from the second target element by the size of the second number as the third target element;
    以此类推,直到获取N个目标元素。And so on, until N target elements are obtained.
  6. 根据权利要求5所述的方法,其中,所述根据所述转换信息,确定所述排序序列,包括:The method of claim 5, wherein the determining the sorting sequence according to the conversion information comprises:
    根据预设的第二加密规则将所述转换信息转换为所述排序序列。Converting the conversion information into the sorting sequence according to a preset second encryption rule.
  7. 根据权利要求6所述的方法,其中,所述转换信息为数字序列,所述根据预设的第二加密规则将所述转换信息转换为所述排序序列包括以下至少一个:The method according to claim 6, wherein the conversion information is a digital sequence, and converting the conversion information into the sorting sequence according to a preset second encryption rule comprises at least one of the following:
    所述第二加密规则为预定排序方式,对所述数字序列中各数字按照所述预定排序方式进行排序,获得所述排序序列;和The second encryption rule is a predetermined sorting manner, and the numbers in the digital sequence are sorted according to the predetermined sorting manner to obtain the sorting sequence; and
    所述第二加密规则为预定放大倍数,对所述数字序列中各数字按照所述预定放大倍数调整大小,获得所述排序序列。The second encryption rule is a predetermined magnification, and the numbers in the digital sequence are resized according to the predetermined magnification to obtain the sorting sequence.
  8. 根据权利要求6所述的方法,其中,所述转换信息为字母序列,所述根据预设的第二加密规则将所述转换信息转换为所述排序序列,包括:The method according to claim 6, wherein the conversion information is a sequence of letters, and converting the conversion information into the sorting sequence according to a preset second encryption rule comprises:
    根据所述字母序列中各字母在字母表中的位置,确定所述排序序列。The sorting sequence is determined based on the position of each letter in the alphabet in the alphabet.
  9. 根据权利要求6所述的方法,其中,所述转换信息为符号序列,所述根据预设的第二加密规则将所述转换信息转换为所述排序序列,包括:The method according to claim 6, wherein the conversion information is a sequence of symbols, and the converting the conversion information into the sorting sequence according to a preset second encryption rule comprises:
    根据所述符号序列中各符号对应的ACSII码值,确定所述排序序列。The sorting sequence is determined according to an ACSII code value corresponding to each symbol in the symbol sequence.
  10. 根据权利要求1所述的方法,其中,对所述目标元素的显示状态进行调整,包括以下至少一个:The method of claim 1, wherein the display state of the target element is adjusted, including at least one of the following:
    对所述目标元素的大小进行调整;和Adjusting the size of the target element; and
    对所述目标元素的颜色进行调整。Adjust the color of the target element.
  11. 一种图像处理的方法,应用于终端设备或服务器,其特征在于,包括:A method for image processing, applied to a terminal device or a server, comprising:
    响应于对图像的识别请求,获取待处理图像;Acquiring an image to be processed in response to the identification request for the image;
    获取所述待处理图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则;Acquiring a plurality of image elements in the image to be processed, the arrangement manner of the plurality of image elements conforming to a predetermined arrangement rule;
    从所述多个图像元素中确定多个目标元素,其中所述多个目标元素的显示状态与所述图像中其他图像元素的显示状态不同;Determining a plurality of target elements from the plurality of image elements, wherein display states of the plurality of target elements are different from display states of other image elements in the image;
    根据所述多个目标元素确定所述图像对应的用户标识。Determining a user identifier corresponding to the image according to the plurality of target elements.
  12. 根据权利要求11所述的方法,其中,所述获取所述待处理图像中多个图像元素,包括:The method of claim 11, wherein the obtaining a plurality of image elements in the image to be processed comprises:
    获取所述待处理图像中间隔相同的多个图像元素。Obtaining a plurality of image elements having the same interval in the image to be processed.
  13. 根据权利要求11所述的方法,其中,所述从所述多个图像元素中确定多个目标元素包括:The method of claim 11 wherein said determining a plurality of target elements from said plurality of image elements comprises:
    在所述多个图像元素中将显示规格和显示颜色中至少一个与其他图像不同的图像元素作为目标元素。An image element having at least one of a display specification and a display color different from the other images is used as the target element among the plurality of image elements.
  14. 根据权利要求11所述的方法,其中,所述根据所述多个目标元素确定所述图像对应的用户标识包括:The method according to claim 11, wherein the determining the user identifier corresponding to the image according to the plurality of target elements comprises:
    确定所述多个目标元素的排序;Determining the ordering of the plurality of target elements;
    根据所述多个目标元素的排序确定所述排序中相邻两个目标元素之间的间距;Determining a spacing between two adjacent target elements in the sorting according to the ranking of the plurality of target elements;
    根据所述相邻两个目标元素之间的间距确定所述多个目标元素的排序序列;Determining a sorting sequence of the plurality of target elements according to a spacing between the adjacent two target elements;
    根据所述排序序列确定所述图像对应的用户标识。Determining a user identifier corresponding to the image according to the sorting sequence.
  15. 根据权利要求14所述的方法,其中,所述排序序列为包括N个数字的数字序列,N为正整数;The method of claim 14, wherein the sorting sequence is a sequence of numbers comprising N numbers, N being a positive integer;
    所述根据所述相邻两个目标元素之间的间距确定所述多个目标元素的排序序列包括:The determining the sequence of the plurality of target elements according to the spacing between the two adjacent target elements comprises:
    根据第一个目标元素与第二个目标元素的间距确定所述排序序列中第一个元素;Determining a first element in the sorting sequence according to a spacing between a first target element and a second target element;
    根据第二个目标元素与第三个目标元素的间距确定所述排序序列中第二个元素;Determining a second element in the sorting sequence according to a spacing between the second target element and the third target element;
    以此类推,直到获取所述排序序列中的N个数字。And so on until the N numbers in the sorting sequence are obtained.
  16. 根据权利要求14所述的方法,其中,所述根据所述排序序列确定所述图像对应的用户标识包括:The method according to claim 14, wherein the determining the user identifier corresponding to the image according to the sorting sequence comprises:
    根据预设的第一解密规则将所述排序序列转换为转换信息;Converting the sorting sequence into conversion information according to a preset first decryption rule;
    根据预设的第二解密规则将所述转换信息转换为所述用户标识。Converting the conversion information into the user identifier according to a preset second decryption rule.
  17. 根据权利要求16所述的方法,其中,所述根据预设的第一解密规则将所述排序序列转换为转换信息包括以下至少一个:The method according to claim 16, wherein said converting said sorting sequence into conversion information according to a preset first decryption rule comprises at least one of the following:
    所述第一解密规则为预定排序方式,对所述排序序列中各数字按照所述预定排序方式进行排序,获得所述转换信息;和The first decryption rule is a predetermined sorting manner, and each digit in the sorting sequence is sorted according to the predetermined sorting manner to obtain the conversion information; and
    所述第一解密规则为预定放大倍数,对所述排序序列中各数字按照所述预定放大倍数调整大小,获得所述转换信息。The first decryption rule is a predetermined magnification, and each digit in the sorting sequence is resized according to the predetermined magnification to obtain the conversion information.
  18. 一种图像处理的装置,其特征在于,包括:An apparatus for image processing, comprising:
    处理器;processor;
    与所述处理器相连接的存储器;所述存储器中存储有机器可读指令单元;所述机器可读指令单元包括:a memory coupled to the processor; storing, in the memory, a machine readable instruction unit; the machine readable instruction unit comprising:
    第一获取单元,用于响应于用户对图像的获取请求,获取用户标识;a first acquiring unit, configured to acquire a user identifier in response to a user acquiring an image;
    第二获取单元,用于将所述用户标识转换为对应的转换信息,其中,所述转换信息包含多个信息元素,用以调整所述图像上的多个图像元素的显示状态;a second acquiring unit, configured to convert the user identifier into corresponding conversion information, where the conversion information includes a plurality of information elements, to adjust a display state of the plurality of image elements on the image;
    第三获取单元,用于根据所述请求获取所述图像;a third acquiring unit, configured to acquire the image according to the request;
    第四获取单元,用于获取所述图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则;a fourth acquiring unit, configured to acquire a plurality of image elements in the image, where the multiple image elements are arranged in a manner consistent with a predetermined arrangement rule;
    第五获取单元,用于根据所述转换信息中的多个信息元素,从所述多个图像元素中选择多个目标元素,其中,所述多个目标元素之间的位置关系与所述转换信息中的多个信息元素相对应;a fifth acquiring unit, configured to select a plurality of target elements from the plurality of image elements according to the plurality of information elements in the conversion information, wherein a positional relationship between the plurality of target elements and the conversion Corresponding to multiple information elements in the information;
    标注单元,用于对所述多个目标元素的显示状态进行调整,使得所述多个目标元素的显示状态与所述图像中的其他图像元素不同。And a labeling unit, configured to adjust a display state of the plurality of target elements such that display states of the plurality of target elements are different from other image elements in the image.
  19. 根据权利要求18所述的装置,其中,所述第二获取单元具体用于使用预设的第一加密规则对所述用户标识进行加密处理,得到所述转换信息。The device according to claim 18, wherein the second obtaining unit is specifically configured to perform encryption processing on the user identifier by using a preset first encryption rule to obtain the conversion information.
  20. 根据权利要求18所述的装置,其中,所述第四获取单元具体用于获取所述图像中间隔相同的多个图像元素。The apparatus according to claim 18, wherein the fourth obtaining unit is specifically configured to acquire a plurality of image elements having the same interval in the image.
  21. 根据权利要求20所述的装置,其中,所述转换信息包含N个信息元素,N为正整数;其中,所述第五获取单元具体用于:The apparatus according to claim 20, wherein the conversion information comprises N information elements, and N is a positive integer; wherein the fifth obtaining unit is specifically configured to:
    根据所述转换信息,确定排序序列和第一个目标元素,其中,所述排序序列为包括N个数字的数字序列,所述数字序列中各数字与所述转换信息中各信息元素相对应;根据所述排序序列中第一个数字的大小,确定与第一个目标元素间距为所述第一个数字的大小的图像元素,以作为第二个目标元素;根据所述排序序列中第二个数字的大小,确定与第二个目标元素间距为所述第二个数字的大小的图像元素,以作为第三个目标元素;以此类推,直到获取N个目标元素。Determining, according to the conversion information, a sorting sequence and a first target element, wherein the sorting sequence is a digital sequence comprising N digits, each digit in the digit sequence corresponding to each information element in the conversion information; Determining, according to the size of the first number in the sorting sequence, an image element whose size is the first digit of the first target element as a second target element; according to the second in the sorting sequence The size of the number determines the image element that is spaced from the second target element by the size of the second number as the third target element; and so on until N target elements are acquired.
  22. 根据权利要求21所述的装置,其中,所述转换信息为数字序列,所述第五获取单元具体还用于执行以下至少一个操作,The apparatus according to claim 21, wherein the conversion information is a sequence of numbers, and the fifth obtaining unit is further configured to perform at least one of the following operations,
    所述第二加密规则为预定排序方式,对所述数字序列中各数字按照所述预定排序方式进行排序,获得所述排序序列;和The second encryption rule is a predetermined sorting manner, and the numbers in the digital sequence are sorted according to the predetermined sorting manner to obtain the sorting sequence; and
    所述第二加密规则为预定放大倍数,对所述数字序列中各数字按照所述预定放大倍数调整大小,获得所述排序序列。The second encryption rule is a predetermined magnification, and the numbers in the digital sequence are resized according to the predetermined magnification to obtain the sorting sequence.
  23. 一种图像处理的装置,其特征在于,包括:An apparatus for image processing, comprising:
    处理器;processor;
    与所述处理器相连接的存储器;所述存储器中存储有机器可读指令单元;所述机器可读指令单元包括:a memory coupled to the processor; storing, in the memory, a machine readable instruction unit; the machine readable instruction unit comprising:
    第一获取单元,用于响应于对图像的识别请求,获取待处理图像;a first acquiring unit, configured to acquire an image to be processed in response to the identification request for the image;
    第二获取单元,用于获取所述待处理图像中多个图像元素,所述多个图像元素的排列方式符合预定的排列规则;a second acquiring unit, configured to acquire a plurality of image elements in the image to be processed, and the arrangement manner of the plurality of image elements conforms to a predetermined arrangement rule;
    第一确定单元,用于从所述多个图像元素中确定多个目标元素,其中所述多个目标元素的显示状态与所述图像中其他图像元素的显示状 态不同;a first determining unit, configured to determine, from the plurality of image elements, a plurality of target elements, wherein a display state of the plurality of target elements is different from a display state of other image elements in the image;
    第二确定单元,用于根据所述多个目标元素确定所述图像对应的用户标识。And a second determining unit, configured to determine, according to the multiple target elements, a user identifier corresponding to the image.
  24. 根据权利要求23所述的装置,其中,所述第二获取单元具体用于获取所述待处理图像中间隔相同的多个图像元素。The apparatus according to claim 23, wherein the second obtaining unit is specifically configured to acquire a plurality of image elements having the same interval in the image to be processed.
  25. 根据权利要求23所述的装置,其中,所述第一确定单元具体用于在所述多个图像元素中将显示规格和显示颜色中至少一个与其他图像不同的图像元素作为目标元素。The apparatus according to claim 23, wherein the first determining unit is specifically configured to use, as the target element, an image element different from at least one of a display specification and a display color among the plurality of image elements.
  26. 根据权利要求23所述的装置,其中,所述第二确定单元包括:The apparatus of claim 23, wherein the second determining unit comprises:
    第一确定模块,用于确定所述多个目标元素的排序;根据所述多个目标元素的排序确定所述排序中相邻两个目标元素之间的间距;a first determining module, configured to determine an order of the plurality of target elements; determining a spacing between two adjacent target elements in the sorting according to the sorting of the plurality of target elements;
    第二确定模块,用于根据所述相邻两个目标元素之间的间距确定所述多个目标元素的排序序列;a second determining module, configured to determine a sorting sequence of the plurality of target elements according to a spacing between the two adjacent target elements;
    第三确定模块,用于根据所述排序序列确定所述图像对应的用户标识。And a third determining module, configured to determine, according to the sorting sequence, a user identifier corresponding to the image.
  27. 根据权利要求26所述的装置,其中,所述排序序列为包括N个数字的数字序列,N为正整数;所述第二确定模块,用以:The apparatus according to claim 26, wherein said sorting sequence is a sequence of numbers comprising N numbers, N is a positive integer; said second determining module is configured to:
    根据第一个目标元素与第二个目标元素的间距确定所述排序序列中第一个元素;Determining a first element in the sorting sequence according to a spacing between a first target element and a second target element;
    根据第二个目标元素与第三个目标元素的间距确定所述排序序列中第二个元素;Determining a second element in the sorting sequence according to a spacing between the second target element and the third target element;
    以此类推,直到获取所述排序序列中的N个数字。And so on until the N numbers in the sorting sequence are obtained.
  28. 根据权利要求26所述的装置,其中,所述第三确定模块,用于:The apparatus according to claim 26, wherein said third determining module is configured to:
    根据预设的第一解密规则将所述排序序列转换为转换信息;Converting the sorting sequence into conversion information according to a preset first decryption rule;
    根据预设的第二解密规则将所述转换信息转换为所述用户标识。Converting the conversion information into the user identifier according to a preset second decryption rule.
  29. 一种非易失性计算机可读存储介质,其中所述存储介质中存储有机器可读指令,所述机器可读指令可以由处理器执行以完成权利要求1-17任一项所述的方法。A non-transitory computer readable storage medium, wherein the storage medium stores machine readable instructions, the machine readable instructions being executable by a processor to perform the method of any of claims 1-17 .
PCT/CN2018/076419 2017-02-23 2018-02-12 Image processing method and apparatus, and storage medium WO2018153299A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710099135.1A CN108510424B (en) 2017-02-23 2017-02-23 Image processing method and device
CN201710099135.1 2017-02-23

Publications (1)

Publication Number Publication Date
WO2018153299A1 true WO2018153299A1 (en) 2018-08-30

Family

ID=63253544

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076419 WO2018153299A1 (en) 2017-02-23 2018-02-12 Image processing method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN108510424B (en)
WO (1) WO2018153299A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2768533C1 (en) * 2021-04-01 2022-03-24 Публичное Акционерное Общество "Сбербанк России" (Пао Сбербанк) Method and system for protecting digital information displayed on monitor using digital marks

Families Citing this family (1)

* Cited by examiner, † Cited by third party
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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685076A (en) * 2011-03-16 2012-09-19 中国电信股份有限公司 Online information protection method and device
JP2013041382A (en) * 2011-08-12 2013-02-28 Oki Data Corp Image formation system
US20130125196A1 (en) * 2005-05-18 2013-05-16 William M. Shapiro Method and apparatus for combining encryption and steganography in a file control system
CN103678957A (en) * 2012-09-12 2014-03-26 上海聚力传媒技术有限公司 Method, device and equipment for generating picture information and obtaining identity coded information
CN106023059A (en) * 2016-05-26 2016-10-12 北京启迪思创科技有限公司 Watermarking information generation method and apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3749884B2 (en) * 2002-08-28 2006-03-01 株式会社東芝 Digital watermark embedding device, digital watermark analysis device, digital watermark embedding method, digital watermark analysis method, and program
CN101122995B (en) * 2007-09-11 2010-10-13 北京大学 Binary image digit water mark embedding, extraction method and device
CN101231742B (en) * 2008-01-08 2011-01-05 北京大学 Apparatus and method for abstracting and imbedding digital watermarking in two value text image
CN102761563A (en) * 2011-04-25 2012-10-31 中国移动通信集团山东有限公司 Data transmission method, device and system
CN103379101A (en) * 2012-04-20 2013-10-30 腾讯科技(深圳)有限公司 Watermark generation method, client side and server
CN105631797B (en) * 2015-12-24 2019-03-08 小米科技有限责任公司 Watermark adding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130125196A1 (en) * 2005-05-18 2013-05-16 William M. Shapiro Method and apparatus for combining encryption and steganography in a file control system
CN102685076A (en) * 2011-03-16 2012-09-19 中国电信股份有限公司 Online information protection method and device
JP2013041382A (en) * 2011-08-12 2013-02-28 Oki Data Corp Image formation system
CN103678957A (en) * 2012-09-12 2014-03-26 上海聚力传媒技术有限公司 Method, device and equipment for generating picture information and obtaining identity coded information
CN106023059A (en) * 2016-05-26 2016-10-12 北京启迪思创科技有限公司 Watermarking information generation method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2768533C1 (en) * 2021-04-01 2022-03-24 Публичное Акционерное Общество "Сбербанк России" (Пао Сбербанк) Method and system for protecting digital information displayed on monitor using digital marks
WO2022211663A1 (en) * 2021-04-01 2022-10-06 Публичное Акционерное Общество "Сбербанк России" Method and system for protecting digital information displayed on a monitor with the aid of digital marks

Also Published As

Publication number Publication date
CN108510424A (en) 2018-09-07
CN108510424B (en) 2022-11-29

Similar Documents

Publication Publication Date Title
US10068071B2 (en) Screen shot marking and identification for device security
EP3547218B1 (en) File processing device and method, and graphical user interface
US9331856B1 (en) Systems and methods for validating digital signatures
US20170351917A1 (en) Method for recognizing a specific object inside an image and electronic device thereof
US10825130B2 (en) Method and apparatus for displaying picture content in application, and storage medium
JP6507472B2 (en) Processing method, processing system and computer program
CN110245469B (en) Webpage watermark generation method, watermark analysis method, device and storage medium
US20160085994A1 (en) Endorsement of unmodified photographs using watermarks
US20160148068A1 (en) Image processing apparatus and method, and electronic device
CN108108342B (en) Structured text generation method, search method and device
WO2019201076A1 (en) Method, apparatus, and system for adding watermark to secret file, and medium
TWI515641B (en) Method and system for altering icon in desktop
US20210110579A1 (en) Screenshot processing method and device
CN108898082B (en) Picture processing method, picture processing device and terminal equipment
EP3175375A1 (en) Image based search to identify objects in documents
KR20130089407A (en) Mobile terminal and method for controlling thereof
US20160378296A1 (en) Augmented Reality Electronic Book Mechanism
CN109255355A (en) Image processing method, device, terminal, electronic equipment and computer-readable medium
US8485428B1 (en) Systems and methods for providing security information about quick response codes
WO2018153299A1 (en) Image processing method and apparatus, and storage medium
CN106203141A (en) The data processing method of a kind of application and device
WO2016018682A1 (en) Processing image to identify object for insertion into document
CN105354506B (en) The method and apparatus of hidden file
KR101477642B1 (en) Flat board printer
CN109492249B (en) Rapid generation method and device of design drawing and terminal equipment

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18756571

Country of ref document: EP

Kind code of ref document: A1