WO2020147439A1 - 图像处理方法、图像验证方法、装置、设备及介质 - Google Patents
图像处理方法、图像验证方法、装置、设备及介质 Download PDFInfo
- Publication number
- WO2020147439A1 WO2020147439A1 PCT/CN2019/122026 CN2019122026W WO2020147439A1 WO 2020147439 A1 WO2020147439 A1 WO 2020147439A1 CN 2019122026 W CN2019122026 W CN 2019122026W WO 2020147439 A1 WO2020147439 A1 WO 2020147439A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- verified
- image
- processing log
- log
- standard processing
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
Definitions
- This application relates to the field of image recognition, and in particular to an image processing method, image verification method, device, computer equipment and storage medium.
- the embodiments of the present application provide an image processing method, device, equipment, and storage medium to solve the problem of not being able to obtain timely and accurate image operation status information.
- the embodiments of the present application provide an image verification method, device, equipment, and storage medium to solve the problem that it is impossible to distinguish whether a user's operation and processing of an image is legal.
- An image processing method including:
- the editing request including operation trajectory and status information
- the standard processing log is written in the target image.
- An image verification method including:
- processing log to be verified exists in the image to be verified, acquiring the processing log to be verified in the image to be verified;
- the target image includes a standard processing log, wherein the standard processing log is generated by using the above-mentioned image processing method;
- the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image, the image to be verified is an illegal image.
- An image processing device includes:
- the request obtaining module is used to obtain an editing request of the target image, the editing request including operation trajectory and status information;
- the recording module is used to record the chain code information of the operation track through chain coding
- a generating module configured to generate a standard processing log according to the chain code information of the operation track and the status information
- the writing module is used to write the standard processing log into the target image.
- An image verification device including:
- a to-be-verified image acquisition module for acquiring a to-be-verified image, where the to-be-verified image includes an image identifier
- a log acquisition module configured to acquire the processing log to be verified in the image to be verified when the processing log to be verified exists in the image to be verified;
- the target image acquisition module is configured to acquire a corresponding target image according to the image identifier, the target image includes a standard processing log, wherein the standard processing log is generated by using the above-mentioned image processing method;
- a log judgment module configured to judge whether the processing log to be verified in the image to be verified is consistent with the standard processing log in the target image
- the image judgment module is configured to, when the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image, the image to be verified is an illegal image.
- a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the processor implements the above-mentioned image processing method when the processor executes the computer-readable instructions, Or, when the processor executes the computer-readable instruction, the above-mentioned image verification method is implemented.
- One or more readable storage media storing computer readable instructions, the readable storage media including a non-volatile readable storage medium and a volatile readable storage medium, the computer readable instructions are stored by one or more When executed by two processors, the one or more processors are executed to realize the foregoing image processing method, or when the computer-readable instructions are executed by the processor, the one or more processors are executed to realize the foregoing image Authentication method.
- FIG. 1 is a schematic diagram of an application environment of an image processing method or an image verification method in an embodiment of the present application
- Fig. 2 is an example diagram of an image processing method in an embodiment of the present application
- Fig. 3 is another example diagram of an image processing method in an embodiment of the present application.
- Fig. 4 is another example diagram of an image processing method in an embodiment of the present application.
- Fig. 5 is a functional block diagram of an image processing device in an embodiment of the present application.
- Fig. 6 is an example diagram of an image verification method in an embodiment of the present application.
- FIG. 7 is another example diagram of an image verification method in an embodiment of the present application.
- FIG. 8 is another example diagram of an image verification method in an embodiment of the present application.
- Fig. 9 is a functional block diagram of an image verification device in an embodiment of the present application.
- Fig. 10 is a schematic diagram of a computer device in an embodiment of the present application.
- the embodiment of the present application provides an image processing method, which can be applied in the application environment shown in FIG. 1.
- the image processing method is applied in an image processing system.
- the image processing system includes a client and a server as shown in FIG. 1, and the client and the server communicate through a network.
- the server obtains the editing request of the target image through the client.
- the editing request includes the operation track and status information; then the chain code information of the operation track is recorded through chain coding, and the standard processing log is generated according to the chain code information and status information of the operation track; Finally, the standard processing log is written into the target image; it is used to solve the problem that the operation status information of the image cannot be obtained in time and accurately.
- Clients are not limited to various personal computers, laptops, smart phones, tablets and portable wearable devices.
- the server can be implemented with an independent server or a server cluster composed of multiple servers.
- an image processing method is provided, and the method is applied to the server in FIG. 1 as an example for description, including the following steps:
- the target image refers to the original image to be processed by a legal operation.
- the editing request refers to the image editing request generated when the user performs operation processing on the target image.
- the edit request includes operation trace and status information.
- the operation processing on the target image includes operations such as editing processing on the target image, image toning, or image cropping.
- the editing request only includes status information.
- the operation track refers to the track newly generated on the target image after the user edits the target image.
- the newly generated trajectory on the target image may be closed or open.
- the operation track includes an edit track and corresponding edit information.
- the edit track refers to all the pixels that make up the operation track
- the edit information refers to the track color of the operation track and the trigger time corresponding to each pixel on the track.
- the status information refers to the operation information corresponding to the user's operation and processing of the target image, and the status information specifically includes: operation location, operation time, operation times, terminal device information, etc.
- the operation position refers to the trigger position corresponding to the user performing the operation processing on the target image
- the operation time refers to the timestamp corresponding to the user performing the operation processing on the target image
- the number of operations refers to the user's execution of different operation processing on the target image Times
- terminal equipment information refers to the IMEI information of the terminal equipment.
- the server After obtaining the operation trajectory and state information carried by the edit request of the target image, the server will store the obtained operation trajectory and state information in association.
- the server By associating and storing the operation track and status information, the specific operation status corresponding to the user's execution of each operation can be tracked in real time.
- Chain coding is also called Freeman chain code (Freeman chain code) or boundary chain code, which refers to a unit vector chain that starts from a certain origin and is determined according to certain basic directions.
- chain coding is a method that uses the coordinates of the starting point of the curve and the direction code of the boundary point to describe the curve or boundary.
- Chain coding can also be referred to as a coding representation of the boundary.
- the boundary direction is used as the coding basis. It is composed of a starting point and a series of unit vectors in the basic direction, that is, coding with the direction of each subsequent point relative to its predecessor. Said.
- recording the chain code information of the operation track by chain encoding means that the editing track and the corresponding editing information generated after editing the target image are recorded through chain encoding.
- the chain code information includes pixel origin, track color and direction encoding information.
- the pixel origin refers to the pixel point corresponding to the starting point on the operation trajectory
- the trajectory color refers to the color of the operation trajectory
- the direction encoding information refers to the relationship of the direction encoding of other subsequent points on the operation trajectory with respect to the previous point with the pixel origin as the center.
- the subsequent point refers to the selection of any point on the operation trajectory as the reference point.
- the trigger time corresponding to each pixel of the operation trajectory is a point after the reference point; the previous point refers to the selection of any point on the operation trajectory as Reference point, according to the trigger time corresponding to each pixel on the operation track, the trigger time is a point before the reference point.
- the chain code information of the operation track is recorded by chain coding, which is not only simple and convenient, does not need to record the coordinates of each pixel one by one, but also has a strong data compression capability and arithmetic function.
- the area and perimeter of the polygon can be calculated by chain coding, or the sharp bends and recessed parts of the boundary can be detected by chain coding.
- S30 Generate a standard processing log according to the chain code information and status information of the operation track.
- the standard processing log refers to the text information formed after binary conversion of the chain code information and status information of the operation track. Therefore, the standard processing log is also called a binary file.
- a binary file refers to a computer file composed of many lines of characters. The encoding of the binary file is variable, and the utilization rate of the binary file is high. Different binary files have different decoding methods, and they also save more space. Faster, for some more accurate data, the advantage of not causing the loss of valid bits.
- generating a standard processing log based on the chain code information and status information of the operation track includes: merging the chain code information and status information of the operation track to generate an initial processing log, and then binary conversion of the initial processing log to generate standard processing Log.
- the process of binary conversion of the initial processing log is also called the data compression process, which can be realized by using data compression algorithms, such as Huffman coding, hash coding, LZW compression algorithm, arithmetic compression method or run-length algorithm, etc. Any data compression algorithm can be selected according to the actual situation.
- the user's operation processing of the target image is the color toning, cropping or image synthesis of the target image, that is, the editing request only includes the status information, and there is no process of recording the chain code information of the operation track; according to the chain code of the operation track Information and status information, generating standard processing logs can directly convert the acquired status information into binary to generate corresponding standard processing logs.
- writing the standard processing log into the target image refers to writing the generated binary information according to the chain code information and status information of the operation track into the JPEG file of the target image.
- JPEG is the first international image compression standard. It not only has good compression performance, but also has good reconstruction quality, and is widely used in image and video processing fields.
- the format of the JPEG file is segmented storage, the number and length of the segments are not fixed, so as long as the JPEG file contains enough information, the JPEG file can be opened.
- writing the standard processing log into the target image can be achieved by using programming languages such as C++ and matlab.
- each segment of the JPEG file must contain two parts, one of which is the identifier of the segment, which consists of two bytes: the first byte is hexadecimal 0xFF, the second word Sections have different values for different sections; it also includes two bytes used to store the length of the section.
- the length is expressed in the order of high order first and low order last. For example, if the length of a segment is 0x12AB, the corresponding storage order is arranged according to 0x12, 0xAB.
- the editing request includes the operation track and status information, and then the chain code information of the operation track is recorded through chain coding, and then the standard is generated according to the chain code information and status information of the operation track Processing log, the most generated standard processing log is written into the target image; real-time monitoring and recording of the operation and processing of the target image is realized.
- the chain code information of the operation track is recorded by chain coding, and the specific steps include:
- the pixel origin refers to the pixel corresponding to the starting point of the operation track.
- the starting point of the operation trajectory can be determined by obtaining the trigger time corresponding to each pixel on the operation trajectory.
- the pixel with the earliest trigger time will be the starting point of the operation track.
- the pixels constituting the operation track include a1, a2, a3...an, and the corresponding trigger time is 01:00, 01:01, 01:02...01:10, then according to the sequence of the trigger time, The pixel point a1 with the earliest trigger time is taken as the starting point of the operation track, and the pixel point corresponding to the starting point a1 is taken as the pixel origin.
- the direction encoding information refers to the information that measures the relationship between a certain pixel on the operation track and its surrounding pixels with the pixel origin as the center.
- the origin of the pixel determined in step S201 is used as the starting point, and the direction encoding of each subsequent point on the operation track relative to the previous point is recorded in the manner of chain encoding to obtain the direction encoding information of the operation track.
- subsequent points and previous points include all pixels in the operation trajectory except the starting point.
- Each subsequent point and its predecessor point are corresponding, mainly according to the pixel point in the operation trajectory.
- Trigger time to judge. Understandably, the trigger time of the subsequent point and its predecessor point are adjacent, and the point with the first trigger time is the predecessor point of the point after the trigger.
- chain codes can be divided into 4-connected chain codes and 8-connected chain codes.
- the 4-connected chain code has 4 adjacent points, which are up, down, left, and right of the center point, and the corresponding directions are north, south, west, and east; the 8-connected chain code has 4 more than the 4-connected chain code
- the oblique directions are east, southeast, south, southwest, west, northwest, north, and northeast.
- the 8-connected chain code determines that the pixels adjacent to the starting point are located in 8 different positions, which exactly matches the actual situation of the pixel. Therefore, it can be more accurate to determine the pixels adjacent to the starting point in 8 different positions according to the 8 adjacent points of the 8-connected chain code, namely east, southeast, south, southwest, west, northwest, north, and northeast. Describe the starting point pixel and its neighboring point information.
- the chain code direction value refers to the positional relationship between each next pixel and the previous pixel; it can be represented by codes 0, 1, 2, 3, 4, 5, 6, 7.
- the chain code direction value of the subsequent point corresponding to its previous point can be calculated in a clockwise direction or a counterclockwise direction.
- the pixel of point B is (3 1), and the direction code of each subsequent point on the operation track relative to the previous point is recorded; if it is calculated in the clockwise direction, the corresponding chain is calculated
- the code direction value is 7 1 7 1 7 1 7 1 3 3 1 0 2 4 4 5 5 4 5 6; if calculated in the counterclockwise direction, the corresponding chain code direction value is 2 1 0 1 1 0 6 4 4 6 0 7 7 5 3 5 3 5 3. It is understandable that for the same reference point, the chain code direction values calculated in different directions are different, and the direction encoding information of the corresponding operation track is also different.
- the direction of the chain code direction value can be determined according to the trigger time corresponding to each pixel on the operation track, that is, according to the corresponding trigger time of each pixel
- the sequence of the trigger time determines the direction of the chain code direction value of the operation track. Specifically, if the trigger time corresponding to each pixel that composes the operation track is clockwise from first to last, then the chain code direction value of the operation track is calculated in the clockwise direction; if the pixels that make up the operation track correspond to When the trigger time of is counterclockwise from first to last, then the chain code direction value of the operation track is calculated counterclockwise.
- the operation track and status information carried in the edit request have been associated and stored in advance.
- the operation track includes the edit track and corresponding edit information
- the edit information includes the track color and the trigger time corresponding to each pixel on the track. Therefore, the track color of the operation track can be obtained directly from the database of the server.
- the RGB color representation of the track color can be converted into a hexadecimal color code representation.
- the RGB to hexadecimal color code can be converted automatically by the RGB to hexadecimal color online calculation tool, or by referring to the mutual conversion comparison table to achieve the conversion manually. For example, if the track color of the obtained operation track is red, the corresponding hexadecimal color code after conversion is "#FF0000".
- S204 Encode the pixel origin, track color and direction information to form chain code information of the operation track.
- the pixel origin, trajectory color, and direction coding information obtained through the above steps S201-S203 are combined to form the chain code information of the operation trajectory.
- the operation track is a red circle drawn by the user on the eyes of the face image
- the corresponding pixel origin is (487,362)
- the track color is "#FF0000”
- the direction encoding information is: "0,1,1 ,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,2,3,3,3,3,3,3,3 ,3,3,3,3,4,4,4,4,5,5,5,6,6,6,6,6,6,6,6,6,6,6,7,7 ,7 ,7,7,7,7,7,7",
- the chain code information composing the operation track includes:
- Start represents the pixel origin of the operating track
- color represents the color of the track
- Freeman represents the direction encoding information.
- the direction encoding of each subsequent point on the operation track relative to the previous point is recorded to obtain the direction encoding information of the operation track, and then obtain the operation
- the track color of the track finally, the pixel origin, track color and direction are encoded information to form the chain code information of the operation track; it realizes the real-time monitoring and accurate recording of the user's operation and processing process of the target image and the corresponding status information.
- the image processing method further includes:
- the standard processing log generated according to the chain code information and status information of the operation track is obtained.
- the obtained standard processing log may be a chain code standard processing log formed by combining and transforming chain code information and status information of the operation track, or a state standard processing log formed only after the status information corresponding to the operation processing is transformed.
- the encryption key is a parameter, which refers to a parameter input in an algorithm for converting plaintext data into ciphertext data.
- the encrypted processing log refers to the standard processing log after encryption.
- the encrypted processing log is still a binary file, and encryption does not change the format of the log.
- the encryption algorithm that uses the encryption key to encrypt the standard processing log may be any symmetric encryption algorithm such as Base64 encryption algorithm, AES encryption algorithm, DES encryption algorithm, etc.
- the symmetric encryption algorithm refers to an encryption algorithm that uses the same key for encryption and decryption.
- the standard processing log is encrypted using a symmetric encryption algorithm to facilitate subsequent decryption of the encrypted processing log.
- the image identification refers to a mark that distinguishes the content of different images. Images with the same content correspond to the same image identification, and the image identification has nothing to do with the image operation process.
- the server will automatically associate the encryption key with the image identifier of the corresponding target image and store it in the server’s database to facilitate subsequent processing of the encryption processing log.
- the corresponding key can be obtained directly according to the image identification.
- the encrypted processing log is obtained, and finally the encryption key is associated with the image identification of the target image and stored, without affecting the real-time recording
- the user's operation and processing process on the target image and the corresponding status information further improve the security and accuracy of the generated standard processing log.
- an image processing device is provided, and the image processing device corresponds to the image processing method in the above-mentioned embodiment one-to-one.
- the image processing apparatus includes: an acquisition request module 10, a recording module 20, a generating module 30, and a writing module 40.
- the detailed description of each functional module is as follows:
- the request obtaining module 10 is used to obtain an editing request of the target image, the editing request includes operation trajectory and status information;
- the recording module 20 is used to record chain code information of the operation track through chain coding
- the generating module 30 is used to generate a standard processing log according to the chain code information and status information of the operation track;
- the writing module 40 is used to write the standard processing log into the target image.
- the recording module 20 includes:
- the determination sub-module is used to determine the starting point of the operation track as the pixel origin
- the recording sub-module is used to record the direction encoding of each subsequent point on the operation track relative to the previous point with the pixel origin as the starting point, and obtain the direction encoding information of the operation track;
- the sub-module is used to encode the pixel origin, track color and direction information to form chain code information of the operation track.
- the image processing device further includes:
- Standard processing log acquisition module for acquiring standard processing logs
- the encryption module is used to encrypt the standard processing log using the encryption key to obtain the encrypted processing log;
- the associating module is used for associating and storing the encryption key and the image identification of the target image.
- Each module in the above-mentioned image processing device may be implemented in whole or in part by software, hardware, and a combination thereof.
- the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
- An embodiment of the present application provides an image verification method, which can be applied to the application environment shown in FIG. 1.
- the image verification method is applied to an image verification system.
- the image verification system includes a client and a server as shown in FIG. 1.
- the client and the server communicate through the network, and the server obtains the image to be verified through the client.
- the image to be verified includes an image identification; if there is a processing log to be verified in the image to be verified, the processing log to be verified in the image to be verified is read; then the target image is obtained according to the image identification, and the target image includes the standard processing log.
- the processing log is generated by the image processing method; finally determine whether the processing log to be verified in the image to be verified is consistent with the standard processing log in the target image; if the processing log to be verified in the image to be verified is the standard processing log in the target image If they are inconsistent, the image to be verified is an illegal image; it is used to solve the problem that the user cannot distinguish whether the operation and processing of the image is legal.
- the client can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.
- the server can be implemented with an independent server or a server cluster composed of multiple servers.
- an image verification method is provided, and the method is applied to the server in FIG. 1 as an example for description, including the following steps:
- S50 Acquire an image to be verified, and the image to be verified includes an image identifier.
- the image to be verified refers to an image that needs to be identified whether the operation processing on the image is a legal operation processing.
- the image to be verified includes an image identification.
- an image identification refers to an identification that distinguishes the content of different images, and has nothing to do with the editing process of the image. It is understandable that images with exactly the same content formed after different operations have the same image ID.
- the processing log to be verified refers to the log written into the JPEG image file of the image to be verified after compression processing. If there is a processing log to be verified in the image to be verified, the processing log to be verified in the image to be verified is acquired. Specifically, the process of obtaining the processed log to be verified is also called the parsing process. Since the image to be verified is a JPEG image, and the written processed log to be verified is a binary file, it can be written to by using the binary mode "rb" of the fopen function. Obtain the processing log to be verified in the image to be verified, or directly use the image processing library in the computer's c#GDI+ or GDI and WPF to achieve automatic acquisition. This solution does not impose any restrictions on the specific method of obtaining the processing log to be verified in the image to be verified, and the user can customize the selection according to the actual situation.
- S70 Acquire a corresponding target image according to the image identifier, where the target image includes a standard processing log, where the standard processing log is generated by using the foregoing image processing method.
- the database of the server pre-stores a number of different target images processed by legal operations, and different target images correspond to different image identifiers.
- Obtaining the corresponding target image according to the image identifier refers to quickly finding the target image corresponding to the image identifier from the database of the server according to the image identifier. If the corresponding target image cannot be found from the database of the server according to the image identifier, it can be directly determined that the image to be verified corresponding to the image identifier is an illegal image. If the corresponding target image is found from the database of the server according to the image identifier, the target image and the standard processing log in the target image are acquired.
- the standard processing log is generated using any one of the image processing methods in the foregoing embodiments.
- the method for obtaining the standard processing log in the target image is the same as the method for obtaining the processing log to be verified in the image to be verified in step S60, and the redundant description is omitted here.
- S80 Determine whether the processing log to be verified in the image to be verified is consistent with the standard processing log in the target image.
- the processing log to be verified in the image to be verified acquired in step S60 is compared with the standard processing log in the target image acquired in step S70 to determine whether the processing log to be verified is consistent with the standard processing log.
- the contents of the processing log to be verified and the standard processing log can be compared one by one by using the regular matching method, or the text comparison tool of the computer can be used to realize automatic comparison, and then according to Compare the results to judge. If the content of the processing log to be verified is the same as that of the standard processing log, it means that the processing log to be verified is consistent with the standard processing log. If the content of the processing log to be verified is different from the standard processing log, it means that the processing log to be verified is inconsistent with the standard processing log. .
- the processing log to be verified is a log that has undergone encryption processing in steps S301-303, before determining whether the processing log to be verified is consistent with the standard processing log, the processing log to be verified needs to be decrypted.
- the standard processing log is encrypted using a symmetric encryption algorithm, that is, the encryption key is the same as the decryption key; therefore, the decryption process of the log to be verified includes: obtaining the corresponding decryption key according to the image identifier Key, the decryption key is used to decrypt the log to be verified.
- the decryption fails, it can be directly determined that the processing log to be verified written into the image to be processed is illegal content; if the decryption is successful, a step is performed to determine whether the decrypted processing log to be verified is consistent with the standard processing log.
- step S80 If it is determined in the above step S80 that the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image, it means that the image to be verified is an illegal image; if it is determined in step S80 that the image in the image to be verified is If the processing log to be verified is consistent with the standard processing log in the target image, it means that the image to be verified is a legal image.
- the image to be verified includes an image identification; if there is a processing log to be verified in the image to be verified, the processing log to be verified in the image to be verified is acquired; then the corresponding target is obtained according to the image identification Image, the target image includes the standard processing log; finally determine whether the processing log to be verified in the image to be verified is consistent with the standard processing log in the target image; if the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image ,
- the image to be verified is an illegal image; the problem that the user’s operation and processing of the image cannot be distinguished is solved.
- determining whether the processing log to be verified in the image to be verified is consistent with the standard processing log in the target image includes:
- S801 Read the processing log to be verified, which includes chain code information to be verified and status information to be verified.
- the state information to be verified refers to the state information to be judged whether it is legal
- the chain code information to be verified refers to the chain code information to be judged whether it is legal.
- the process of reading the processed log to be verified is also called a decompression process, that is, the obtained binary processed log to be verified is converted into a compressed binary file.
- the decompression process of the processed log to be verified can be decompressed and then read by using a binary code converter, or directly read by using the c++ or java language. take.
- S802 Compare the status information to be verified with the status information of the standard processing log, and compare the chain code information to be verified with the chain code information of the standard processing log.
- the standard processing log since the standard processing log includes chain code information and status information, it is necessary to compare the status information to be verified with the status information of the standard processing log before judging whether the processing log to be verified and the standard processing log are consistent, and to compare the status information to be verified
- the chain code information is compared with the chain code information of the standard processing log.
- step S802 shows that the state information to be verified is inconsistent with the state information of the standard processing log, or the chain code information to be verified is inconsistent with the chain code information of the standard processing log, it means that the processing log to be verified and the target in the image to be verified
- the standard processing log in the image is inconsistent. If the comparison of the above step S802 shows that the status information to be verified is consistent with the status information of the standard processing log, and the chain code information to be verified is consistent with the chain code information of the standard processing log, it means that the processing log to be verified and the target in the image to be verified are consistent. The standard processing log in the image is consistent.
- the to-be-verified processing log includes the to-be-verified chain code information and the to-be-verified status information; then the to-be-verified status information is combined with the status information of the standard processing log, and the to-be-verified chain code The information is compared with the chain code information of the standard processing log; if the status information to be verified is inconsistent with the status information of the standard processing log, or the chain code information to be verified is inconsistent with the chain code information of the standard processing log, then the to be verified in the image to be verified The processing log is inconsistent with the standard processing log in the target image; the accuracy of judging whether the user's operation and processing of the image is legal is further enhanced.
- determining whether the processing log to be verified in the image to be verified is consistent with the standard processing log in the target image further includes:
- the method for reading the processing log to be verified in step S804 is the same as the method for reading the processing log to be verified in step S801, and redundant details are not described here.
- the read processing log to be verified includes chain code information to be verified and status information to be verified.
- determining whether the content of the processing log to be verified is empty is mainly based on checking whether the compressed data of the log to be processed in the JPEG image file of the image to be verified is 0KB, if the compressed data of the log to be processed in the JPEG image file is 0KB , It means that there is no log to be processed in the JPEG image file, that is, the content of the log to be verified is empty. If the compressed data of the log to be processed in the JPEG image file is not 0KB, it means that the JPEG image file has a process to be verified Log, that is, it is determined that the content of the log to be verified is not empty.
- any JPEG image file of a target image processed by a legal operation must have a standard processing log generated based on chain code information and status information. Therefore, if the content of the read processing log to be certified is empty, it means that the processing log to be verified of the image to be verified is inconsistent with the standard processing log in the target image. If the content of the read processing log to be verified is not blank, a step of comparing whether the processing log in the image to be verified is consistent with the standard processing log in the target image can be performed.
- the processing log to be verified by reading the processing log to be verified; if the content of the processing log to be verified is empty, the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image; the subsequent judgment to be verified is alleviated
- the data processing pressure of whether the processing log is consistent with the standard processing log in the target image improves the data processing efficiency.
- an image verification device is provided, and the image verification device corresponds to the image verification method in the above-mentioned embodiment one-to-one.
- the image verification apparatus includes: a to-be-verified image acquisition module 50, a log acquisition module 60, a target image acquisition module 70, a log judgment module 80, and an image judgment module 90.
- the detailed description of each functional module is as follows:
- the to-be-verified image acquisition module 50 is used to acquire the to-be-verified image, and the to-be-verified image includes an image identifier;
- the log acquisition module 60 is configured to acquire the processing log to be verified in the image to be verified when there is a processing log to be verified in the image to be verified;
- the target image acquisition module 70 is configured to acquire a corresponding target image according to the image identifier, the target image includes a standard processing log, where the standard processing log is generated by using the above-mentioned image processing method;
- the log judgment module 80 is used to judge whether the processing log to be verified in the image to be verified is consistent with the standard processing log in the target image;
- the image judgment module 90 is used to determine that the image to be verified is an illegal image when the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image.
- the log judgment module 80 includes:
- the first reading sub-module is used to read the processing log to be verified, and the processing log to be verified includes chain code information to be verified and status information to be verified;
- the comparison sub-module is used to compare the status information to be verified with the status information of the standard processing log, and to compare the chain code information to be verified with the chain code information of the standard processing log;
- the first judgment sub-module is used to judge the processing to be verified in the image to be verified when the state information to be verified is inconsistent with the state information of the standard processing log, or when the chain code information to be verified is inconsistent with the chain code information of the standard processing log The log is inconsistent with the standard processing log in the target image.
- the log judgment module 80 further includes:
- the second reading submodule is used to read the processing log to be verified
- the second judgment sub-module is used for judging that the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image when the content of the processing log to be verified is empty.
- Each module in the above-mentioned image verification device can be implemented in whole or in part by software, hardware, and a combination thereof.
- the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
- a computer device is provided.
- the computer device may be a server, and its internal structure diagram may be as shown in FIG. 10.
- the computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
- the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
- the database of the computer equipment is used to store the data used in the above-mentioned image processing method and the above-mentioned image verification method.
- the network interface of the computer device is used to communicate with external terminals through a network connection.
- the computer readable instruction is executed by the processor to implement an image processing method, or the computer readable instruction is executed by the processor to implement an image verification method.
- a computer device including a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
- the editing request including operation trajectory and status information
- the standard processing log is written in the target image.
- a computer device including a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
- the target image including a standard processing log, wherein the standard processing log is generated by using the above-mentioned image processing method;
- the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image, the image to be verified is an illegal image.
- one or more readable storage media storing computer readable instructions
- the readable storage medium includes a non-volatile readable storage medium and a volatile readable storage medium
- the computer may When the read instruction is executed by one or more processors, the one or more processors execute the following steps:
- the editing request including operation trajectory and status information
- the standard processing log is written in the target image.
- one or more readable storage media storing computer readable instructions
- the readable storage medium includes a non-volatile readable storage medium and a volatile readable storage medium
- the computer may When the read instruction is executed by one or more processors, the one or more processors execute the following steps:
- the target image including a standard processing log, wherein the standard processing log is generated by using the above-mentioned image processing method;
- the processing log to be verified in the image to be verified is inconsistent with the standard processing log in the target image, the image to be verified is an illegal image.
- Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory can include random access memory (RAM) or external cache memory.
- RAM random access memory
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchronous chain (Synchlink) DRAM
- RDRAM direct RAM
- DRAM direct memory bus dynamic RAM
- RDRAM memory bus dynamic RAM
- Module completion means dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Multimedia (AREA)
- Debugging And Monitoring (AREA)
Abstract
一种图像处理方法、图像验证方法、装置、设备及存储介质。所述图像处理方法,首先获取目标图像的编辑请求,编辑请求包括操作轨迹和状态信息(S10);然后通过链式编码记录操作轨迹的链码信息(S20);根据操作轨迹的链码信息和状态信息,生成标准处理日志(S30);最后将标准处理日志写入目标图像中(S40)。该方法通过获取待验证图像的图像标识,查找对应的目标图像,若待验证图像中存在待验证处理日志,则判断待验证图像中的待验证处理日志和目标图像中的标准处理日志是否一致;若待验证处理日志和标准处理日志不一致,则待验证图像为不合法图像;解决了无法及时准确获取图像的操作状态信息,以及无法区分用户对图像的操作处理是否合法的问题。
Description
本申请以2019年1月18日提交的申请号为201910048268.5,名称为“图像处理方法、图像验证方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
本申请涉及图像识别领域,尤其涉及一种图像处理方法、图像验证方法、装置、计算机设备及存储介质。
随着互联网和计算机图像处理技术的不断发展,图像处理技术的应用领域越来越广,包括航天航空技术领域、生物医学工程领域、金融领域等。例如在当前的金融领域中,大量的操作过程都依赖于视频或图像资源作为数据认证的基础资源,其中数据认证必然会涉及到获取图像操作处理所对应的状态信息的过程。目前获取图像操作处理的状态信息大部分通过口述简单传达,或者再另外生成一个对图像处理的状态信息文档。然而对于操作处理过程比较复杂的图像处理,往往会出现未及时获取对应的操作状态信息,或者获取的操作状态信息出现偏差或遗漏的现象。另外,基于无法对用户在图像上的操作处理进行实时监控或记录,对于一些经过不同操作处理后,相似度很高的图像,往往很难区分哪些是合法操作处理,哪些是非法操作处理。许多不发分子常常利用图像处理的这种缺陷,对图像进行翻拍、编造,或者复用旧图像实施欺诈,造成大量金融欺诈案件。因此,无法准确及时获取图像的操作状态信息,以及无法区分用户对图像的操作处理是否合法,是目前图像处理技术中亟待解决的问题。
申请内容
本申请实施例提供一种图像处理方法、装置、设备及存储介质,以解决无法及时准确获取图像的操作状态信息的问题。
本申请实施例提供一种图像验证方法、装置、设备及存储介质,以解决无法区分用户对图像的操作处理是否合法的问题。
一种图像处理方法,包括:
获取目标图像的编辑请求,所述编辑请求包括操作轨迹和状态信息;
通过链式编码记录所述操作轨迹的链码信息;
根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志;
将所述标准处理日志写入所述目标图像中。
一种图像验证方法,包括:
获取待验证图像,所述待验证图像包括图像标识;
若所述待验证图像中存在所述待验证处理日志,则获取所述待验证图像中的待验证处理日志;
根据所述图像标识获取对应的目标图像,所述目标图像包括标准处理日志,其中,所 述标准处理日志是采用上述图像处理方法生成的;
判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致;
若所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致,则所述待验证图像为不合法图像。
一种图像处理装置,包括:
请求获取模块,用于获取目标图像的编辑请求,所述编辑请求包括操作轨迹和状态信息;
记录模块,用于通过链式编码记录所述操作轨迹的链码信息;
生成模块,用于根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志;
写入模块,用于将所述标准处理日志写入所述目标图像中。
一种图像验证装置,包括:
待验证图像获取模块,用于获取待验证图像,所述待验证图像包括图像标识;
日志获取模块,用于在所述待验证图像中存在所述待验证处理日志时,则获取所述待验证图像中的待验证处理日志;
目标图像获取模块,用于根据所述图像标识获取对应的目标图像,所述目标图像包括标准处理日志,其中,所述标准处理日志是采用上述图像处理方法生成的;
日志判断模块,用于判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致;
图像判断模块,用于在所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致时,则所述待验证图像为不合法图像。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述图像处理方法,或者所述处理器执行所述计算机可读指令时实现上述图像验证方法。
一个或多个存储有计算机可读指令的可读存储介质,所述可读存储介质包括非易失性可读存储介质和易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行时实现上述图像处理方法,或者所述计算机可读指令被处理器执行时,使得所述一个或多个处理器执行时实现上述图像验证方法。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中图像处理方法或图像验证方法的一应用环境示意图;
图2是本申请一实施例中图像处理方法的一示例图;
图3是本申请一实施例中图像处理方法的另一示例图;
图4是本申请一实施例中图像处理方法的另一示例图;
图5是本申请一实施例中图像处理装置的一原理框图;
图6是本申请一实施例中图像验证方法的一示例图;
图7是本申请一实施例中图像验证方法的另一示例图;
图8是本申请一实施例中图像验证方法的另一示例图;
图9是本申请一实施例中图像验证装置的一原理框图;
图10是本申请一实施例中计算机设备的一示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供一种图像处理方法,该图像处理方法可应用在如图1所示的应用环境中。具体地,该图像处理方法应用在图像处理系统中,该图像处理系统包括如图1所示的客户端和服务端,客户端与服务端通过网络进行通信。服务端通过客户端获取目标图像的编辑请求,编辑请求包括操作轨迹和状态信息;然后通过链式编码记录操作轨迹的链码信息,根据操作轨迹的链码信息和状态信息,生成标准处理日志;最后将标准处理日志写入目标图像中;用于解决无法及时准确获取图像的操作状态信息的问题。客户端不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备上。服务端可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一实施例中,如图2所示,提供一种图像处理方法,以该方法应用在图1中的服务端为例进行说明,包括如下步骤:
S10:获取目标图像的编辑请求,编辑请求包括操作轨迹和状态信息。
其中,目标图像指待进行合法操作处理的原始图像。编辑请求指当用户对目标图像进行操作处理时所生成的图像编辑请求。编辑请求包括操作轨迹和状态信息。具体地,对目标图像的操作处理包括对目标图像的编辑处理、图像调色或图像裁剪等操作。优选地,若用户对目标图像的操作处理为对目标图像的调色、裁剪或图像合成等,则编辑请求只包括状态信息。
其中,操作轨迹指用户对目标图像进行编辑处理后,在目标图像上所新生成的轨迹。具体地,在目标图像上所新生成的轨迹可以是闭合的或开放的。优选地,操作轨迹包括编辑轨迹和对应的编辑信息。其中,编辑轨迹指组成该操作轨迹的所有像素点,编辑信息指操作轨迹的轨迹颜色和轨迹上每一像素点对应的触发时间。
其中,状态信息指用户对目标图像进行操作处理时所对应的操作信息,状态信息具体包括:操作位置、操作时间、操作次数以及终端设备信息等。具体地,操作位置指用户在目标图像上执行操作处理所对应的触发位置;操作时间指用户在目标图像上执行操作处理所对应的时间戳;操作次数指用户在对目标图像执行不同操作处理的次数;终端设备信息指终端设备的IMEI信息。
在本步骤中,服务端在获取到目标图像的编辑请求所携带的操作轨迹和状态信息后,会将获取的操作轨迹和状态信息进行关联存储。通过将操作轨迹和状态信息进行关联存储,可实时跟踪到用户执行每一操作处理所对应的具体操作状态。
S20:通过链式编码记录操作轨迹的链码信息。
链式编码又称为弗里曼链码(Freeman链码)或边界链码,指由某一原点开始并按某些基本方向确定的单位矢量链。基本方向可定义为:东=0,东南=1,南=2,西南=3,西=4,西北=5,北=6,东北=7等八个基本方向。具体地,链式编码是一种用曲线起点的坐标和边界点方向代码来描述曲线或边界的方法。链式编码也可以称为一种边界的编码表示法,用边界方向作为编码依据,由起点和一系列在基本方向上的单位矢量组成,即用每个后续点相对其前继点的方向编码表示。
具体地,通过链式编码记录操作轨迹的链码信息,指在对目标图像进行编辑处理后所生成的编辑轨迹和对应的编辑信息,通过链式编码的方式记录下来。可选地,链码信息包括像素原点、轨迹颜色和方向编码信息。其中,像素原点指操作轨迹上的起点所对应的像 素点,轨迹颜色指操作轨迹的颜色,方向编码信息指以像素原点为中心,操作轨迹上其它后续点相对于前继点的方向编码的关系。其中,后续点指选取操作轨迹上的任意一点为参考点,根据操作轨迹的每个像素点对应的触发时间,触发时间在参考点之后的一点;前继点指选取操作轨迹上的任意一点为参考点,根据操作轨迹上每个像素点对应的触发时间,触发时间在参考点之前的一点。
在本步骤中,通过链式编码的方式记录操作轨迹的链码信息,不但简单方便,不需逐一记录每个点像素的坐标,且还具有较强的数据压缩能力和运算功能。例如可通过链式编码对多边形的面积和周长进行计算,或者通过链式编码探测边界急弯和凹进部分等。
S30:根据操作轨迹的链码信息和状态信息,生成标准处理日志。
其中,标准处理日志指对操作轨迹的链码信息和状态信息进行二进制转化后形成的文本信息。因此,标准处理日志也称二进制文件。具体地,二进制文件指由很多行字符构成的一种计算机文件,二进制文件的编码是变长的,灵活利用率要高,不同的二进制文件译码方式不同,且还具有更节约空间,储存文件更快捷,对于一些比较精确的数据,不会造成有效位的丢失的优点。
具体地,根据操作轨迹的链码信息和状态信息,生成标准处理日志包括:将操作轨迹的链码信息和状态信息进行合并,生成初始处理日志,然后将初始处理日志进行二进制转化,生成标准处理日志。其中,将初始处理日志进行二进制转化的过程也称为数据的压缩过程,可通过使用数据压缩算法实现,例如霍夫曼编码、哈希编码、LZW压缩算法、算术压缩方法或游程算法等,用户可根据实际情况自定义选取任意一种数据压缩算法。
此外,若用户对目标图像的操作处理为对目标图像的调色、裁剪或图像合成,即编辑请求只包括状态信息,不存在记录操作轨迹的链码信息的过程;则根据操作轨迹的链码信息和状态信息,生成标准处理日志可直接将获取的状态信息进行二进制转化,生成对应的标准处理日志。
S40:将标准处理日志写入目标图像中。
具体地,将标准处理日志写入目标图像中指将根据操作轨迹的链码信息和状态信息,所生成的二进制信息写入到目标图像的JPEG文件中。其中,JPEG是第一个国际图像压缩标准,不但具有良好的压缩性能,还具有良好的重建质量,被广泛应用于图像、视频处理等领域。另外地,由于JPEG文件的格式是分段存储,段的多少和长度并不固定,因此只要JPEG文件中包含了足够的信息,该JPEG文件就能够被打开。
具体地,将标准处理日志写入目标图像中可通过使用C++、matlab等编程语言实现。在写入的过程中,JPEG文件的每个段都一定包含两部分,其中一个是段的标识,它由两个字节构成:第一个字节是十六进制0xFF,第二个字节对于不同的段所对应的值不同;另外还包括用于存放段的长度的两个字节,其中长度的表示方法是按照高位在前,低位在后的顺序。例如若一个段的长度是0x12AB,那么对应的存储顺序是按照0x12,0xAB排列的。
在本实施例中,通过获取目标图像的编辑请求,编辑请求包括操作轨迹和状态信息,然后通过链式编码记录操作轨迹的链码信息,再根据操作轨迹的链码信息和状态信息,生成标准处理日志,最将生成的标准处理日志写入目标图像中;实现了对目标图像的操作处理的实时监控和记录。
在一个实施例中,如图3所示,通过链式编码记录操作轨迹的链码信息,具体步骤包括:
S201:将操作轨迹的起点确定为像素原点。
其中,像素原点指操作轨迹的起点所对应的像素点。在将操作轨迹的起点确定为像素原点之前,还需确定操作轨迹的起点。具体地,由于操作轨迹由许多像素点组成,每一像素点都有对应的触发时间,因此可通过获取操作轨迹上每一像素点对应的触发时间,确定该操作轨迹的起点。即将触发时间最早的像素点作为该操作轨迹的起点。
示例性地,若组成操作轨迹的像素点包括a1、a2、a3…an,对应的触发时间为01:00、01:01、01:02…01:10,则根据触发时间的先后顺序,将触发时间最早的像素点a1作为该操作轨迹的起点,并将起点a1对应的像素点作为像素原点。
S202:以像素原点为起点,记录操作轨迹上每一后续点相对前继点的方向编码,得到操作轨迹的方向编码信息。
其中,方向编码信息指以像素原点为中心,衡量操作轨迹上某个像素点与其周围像素点关系的信息。具体地,将通过步骤S201确定的像素原点作为起点,通过链式编码的方式,记录操作轨迹上每一后续点相对前继点的方向编码,得到操作轨迹的方向编码信息。在本实施例中,后续点和前继点包括该操作轨迹中除了起点外的其它所有像素点,每个后续点和其前继点都是相对应的,主要根据操作轨迹中像素点对应的触发时间来判断。可以理解地,后续点和其前继点的触发时间是相邻的,触发时间在先的那一点是触发在后的那一点的前继点。
在记录操作轨迹上每一后续点相对前继点的方向编码前,需预先确定与起点相邻的像素点分别在8个不同的位置上。具体地,按照起点像素点邻接方向个数的不同,链码可分为4连通链码和8连通链码。4连通链码的邻接点有4个,分别在中心点的上、下、左、右,分别对应的方向为北、南、西、东;8连通链码比4连通链码增加了4个斜方向,分别为东,东南,南,西南,西,西北,北,东北。由于任意一个像素点周围均有8个邻接点,而8连通链码确定与起点相邻的像素点分别在8个不同的位置上,正好与像素点的实际情况相符。因此,确定与起点相邻的像素点分别在8个不同的位置上按照8连通链码的8个邻接点,分别为东,东南,南,西南,西,西北,北,东北,能够更加准确地描述起点像素点与其邻接点的信息。
进一步地,在确定好与起点相邻的像素点分别在8个不同的位置上后,还需给8个不同位置分别赋予链码方向值。其中,链码方向值指每下一个像素点与上一像素点的位置关系;可用代码0,1,2,3,4,5,6,7表示。具体地,给8个不同位置分别赋予链码方向值指按照链式编码方式,给确定的8个方向赋予代表数值。例如,可以将8个不同的位置具体表示为东=0,东南=1,南=2,西南=3,西=4,西北=5,北=6,东北=7八个方向上的链码方向表示值。
优选地,若操作轨迹为闭合轨迹,则计算后续点对应其前继点的链码方向值可按照顺时针方向或逆时针方向计算。例如,以像素原点B作为起点,B点的像素点为(3 1),记录操作轨迹上每一后续点相对前继点的方向编码;若按照顺时针方向计算,则计算得出对应的链码方向值为7 1 7 1 7 1 7 1 3 3 1 0 2 4 4 5 5 4 5 6;若按照逆时针方向计算,则计算得出对应的链码方向值为2 1 0 1 1 0 0 6 4 4 6 0 7 7 5 3 5 3 5 3。可以理解地,对于同一个参考点,按不同方向计算得出的链码方向值不一样,得到对应的操作轨迹的方向编码信息也不同。
优选地,由于组成操作轨迹的每一像素点都有对应的触发时间,因此,可根据操作轨迹上每一像素点对应的触发时间确定链码方向值的方向,即按照每一像素点对应的触发时间的先后顺序确定该操作轨迹的链码方向值的方向。具体地,若组成该操作轨迹的每一像素点对应的触发时间按顺时针方向从先到后,则该操作轨迹的链码方向值按顺时针方向计算;若组成该操作轨迹的像素点对应的触发时间按逆时针方向从先到后,则该操作轨迹的链码方向值按逆时针方向计算。
S203:获取操作轨迹的轨迹颜色。
由于在上述步骤S10服务端获取目标图像的编辑请求后已预先将编辑请求所携带的操作轨迹和状态信息进行关联存储。其中,操作轨迹包括编辑轨迹和对应的编辑信息,编辑信息包括轨迹颜色和轨迹上每一像素点对应的触发时间。因此,获取操作轨迹的轨迹颜色可直接从服务端的数据库获取。
优选地,在获取到操作轨迹的轨迹颜色后,可以将轨迹颜色的RGB颜色表示方式转化成16进制颜色码表示方式。将RGB转16进制颜色码可通过RGB转16进制颜色在线计算工具自动实现转化,或者通过参照互转换对照表格手动互转方法实现转化。例如,若获取到操作轨迹的轨迹颜色是红色,则通过转化后对应的十六进制颜色码为"#FF0000"。
S204:将像素原点、轨迹颜色和方向编码信息,组成操作轨迹的链码信息。
将通过上述步骤S201-S203获取的像素原点、轨迹颜色和方向编码信息进行合并,组成该操作轨迹的链码信息。
示例性地,若操作轨迹为用户在人脸图像的眼睛上画的一个红色圆圈,对应的像素原点为(487,362),轨迹颜色为"#FF0000",方向编码信息为:"0,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7",则组成该操作轨迹的链码信息包括:
{
"Start":"487,362",
"color":"#FF0000",
"Freeman":"0,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7"
};
其中,"Start"表示操作轨迹的像素原点,"color"表示轨迹颜色,"Freeman"表示方向编码信息。
在本实施例中,通过将操作轨迹的起点确定为像素原点,以像素原点为起点,记录操作轨迹上每一后续点相对前继点的方向编码,得到操作轨迹的方向编码信息,然后获取操作轨迹的轨迹颜色;最后将像素原点、轨迹颜色和方向编码信息,组成操作轨迹的链码信息;实现了用户对目标图像的操作处理过程以及对应的状态信息的实时监控和准确记录。
在一个实施例中,如图4所示,在根据操作轨迹的链码信息和状态信息,生成标准处理日志之后,该图像处理方法还包括:
S301:获取标准处理日志。
具体地,获取根据操作轨迹的链码信息和状态信息,所生成标准处理日志。其中,获取的标准处理日志可以为由操作轨迹的链码信息和状态信息合并转化后形成的链码标准处理日志,或只由操作处理对应的状态信息转化后形成的状态标准处理日志。
S302:使用加密密钥对标准处理日志进行加密处理,得到加密处理日志。
其中,加密密钥是一种参数,指将明文数据转换为密文数据的算法中输入的参数。加密处理日志指通过加密后的标准处理日志,加密处理日志依旧为二进制文件,加密并不会改变日志的格式。具体地,使用加密密钥对标准处理日志进行加密处理的加密算法可以是:Base64加密算法、AES加密算法、DES加密算法等任意一种对称加密算法,用户可根据实际情况自定义选取。其中,对称加密算法指加密和解密使用相同密钥的加密算法。本实施例中,使用对称加密算法对标准处理日志进行加密处理,是为了方便后续对加密处理日志进行解密。
S303:将加密密钥与目标图像的图像标识进行关联存储。
其中,图像标识指区别不同图像内容的一种标记,内容相同的图像对应的图像标识相同,图像标识与图像的操作处理过程无关。具体地,在使用加密密钥对标准处理日志进行加密处理后,服务端会自动将加密密钥与对应的目标图像的图像标识进行关联存储在服务端的数据库中,方便后续在对加密处理日志进行解密的过程中,可直接根据图像标识获取对应的密钥。
在本实施例中,通过获取标准处理日志,然后使用加密密钥对标准处理日志进行加密处理,得到加密处理日志,最后将加密密钥与目标图像的图像标识进行关联存储,在不影 响实时记录用户对目标图像的操作处理过程以及对应的状态信息的同时,进一步提高了所生成的标准处理日志的安全性和准确性。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种图像处理装置,该图像处理装置与上述实施例中图像处理方法一一对应。如图5所示,该图像处理装置包括:获取请求模块10、记录模块20、生成模块30和写入模块40。各功能模块详细说明如下:
请求获取模块10,用于获取目标图像的编辑请求,编辑请求包括操作轨迹和状态信息;
记录模块20,用于通过链式编码记录操作轨迹的链码信息;
生成模块30,用于根据操作轨迹的链码信息和状态信息,生成标准处理日志;
写入模块40,用于将标准处理日志写入目标图像中。
优选地,记录模块20包括:
确定子模块,用于将操作轨迹的起点确定为像素原点;
记录子模块,用于以像素原点为起点,记录操作轨迹上每一后续点相对前继点的方向编码,得到操作轨迹的方向编码信息;
获取子模块,用于获取操作轨迹的轨迹颜色;
组成子模块,用于将像素原点、轨迹颜色和方向编码信息,组成操作轨迹的链码信息。
优选地,该图像处理装置还包括:
标准处理日志获取模块,用于获取标准处理日志;
加密模块,用于使用加密密钥对标准处理日志进行加密处理,得到加密处理日志;
关联模块,用于将加密密钥与目标图像的图像标识进行关联存储。
关于图像处理装置的具体限定可以参见上文中对于图像处理方法的限定,在此不再赘述。上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
本申请一实施例提供一种图像验证方法,该图像验证方法可应用到如图1所示的应用环境中。具体地,该图像验证方法应用在图像验证系统中,该图像验证系统包括如图1所示的客户端和服务端,客户端与服务端通过网络进行通信,服务端通过客户端获取待验证图像,待验证图像包括图像标识;若待验证图像中存在待验证处理日志,则读取待验证图像中的待验证处理日志;然后根据图像标识获取目标图像,目标图像包括标准处理日志,其中,标准处理日志是采用图像处理方法生成的;最后判断待验证图像中的待验证处理日志和目标图像中的标准处理日志是否一致;若待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致,则待验证图像为不合法图像;用于解决无法区分用户对图像的操作处理是否合法的问题。客户端可但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备上。服务端可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一实施例中,如图6所示,提供一种图像验证方法,以该方法应用在图1中的服务端为例进行说明,包括如下步骤:
S50:获取待验证图像,待验证图像包括图像标识。
其中,待验证图像指需鉴别该图像上的操作处理是否为合法操作处理的图像。待验证图像包括图像标识,同样地,图像标识指区别不同图像内容之间的一种标识,与图像的编辑处理过程无关。可以理解地,经过不同操作处理后所形成的内容完全相同的图像,对应的图像标识相同。
S60:若待验证图像中存在待验证处理日志,则获取待验证图像中的待验证处理日志。
其中,待验证处理日志指经压缩处理后写入取待验证图像JPEG图像文件中的日志。若 待验证图像中存在待验证处理日志,则对待验证图像中的待验证处理日志进行获取。具体地,对待验证处理日志的获取过程也称为解析过程,由于待验证图像属于JPEG图像,写入的待验证处理日志属于二进制文件,因此可通过使用fopen函数的二进制模式“rb”对写入待验证图像中的待验证处理日志进行获取,或者直接利用计算机的c#GDI+或GDI和WPF中的图像处理类库实现自动获取。此方案对具体获取待验证图像中的待验证处理日志的方式不做任何限制,用户可根据实际情况自定义选取。
S70:根据图像标识获取对应的目标图像,目标图像包括标准处理日志,其中,标准处理日志是采用上述图像处理方法生成的。
在一具体实施例中,服务端的数据库预先存储有若干经合法操作处理的不同目标图像,不同的目标图像对应不同的图像标识。根据图像标识获取对应的目标图像指根据图像标识,从服务端的数据库中快速查找与图像标识相对应的目标图像。若无法根据图像标识从服务端的数据库中查找到对应的目标图像,则可直接判断该图像标识对应的待验证图像为不合法图像。若根据图像标识从服务端的数据库中查找到对应的目标图像,则获取目标图像,以及该目标图像中的标准处理日志。其中,标准处理日志是采用上述实施例中的任意一种图像处理方法生成的。在本步骤中,获取目标图像中的标准处理日志与步骤S60获取待验证图像中的待验证处理日志的方法相同,此处不做冗余赘述。
S80:判断待验证图像中的待验证处理日志和目标图像中的标准处理日志是否一致。
将步骤S60获取的待验证图像中的待验证处理日志,与步骤S70获取的目标图像中的标准处理日志进行对比,判断待验证处理日志与标准处理日志是否一致。具体地,判断待验证处理日志与标准处理日志是否一致可先通过使用正则匹配法对待验证处理日志与标准处理日志的内容进行一一对比,或直接使用计算机的文本对比工具实现自动对比,然后根据对比结果进行判断。若待验证处理日志与标准处理日志的内容一样,则表示待验证处理日志与标准处理日志一致,若待验证处理日志与标准处理日志的内容不一样,则表示待验证处理日志与标准处理日志不一致。
优选地,若待验证处理日志为经过步骤S301-303加密处理后的日志,则在判断待验证处理日志和标准处理日志是否一致之前,还需对待验证处理日志进行解密处理。具体地,根据步骤S302可知,对标准处理日志进行加密处理使用的是对称加密算法,即加密密钥与解密密钥相同;因此对待验证处理日志的解密过程包括:根据图像标识获取对应的解密密钥,采用解密密钥对待验证处理日志进行解密处理。若解密失败,则可直接判断写入待处理图像的待验证处理日志为不合法内容;若解密成功,则执行步骤判断解密后的待验证处理日志和标准处理日志是否一致。
S90:若待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致,则待验证图像为不合法图像。
若经上述步骤S80判断得出待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致,则表示待验证图像为不合法图像;若经上述步骤S80判断得出待验证图像中的待验证处理日志和目标图像中的标准处理日志一致,则表示待验证图像为合法图像。
在本实施例中,通过获取待验证图像,待验证图像包括图像标识;若待验证图像中存在待验证处理日志,则获取待验证图像中的待验证处理日志;然后根据图像标识获取对应的目标图像,目标图像包括标准处理日志;最后判断待验证图像中的待验证处理日志和目标图像中的标准处理日志是否一致;若待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致,则待验证图像为不合法图像;解决了无法区分用户对图像的操作处理是否合法的问题。
在一实施例中,如图7所示,判断待验证图像中的待验证处理日志和目标图像中的标准处理日志是否一致,具体包括:
S801:读取待验证处理日志,待验证处理日志包括待验证链码信息和待验证状态信息。
其中,待验证状态信息指待判断是否合法的状态信息,待验证链码信息指待判断是否合法的链码信息。具体地,由于写入图像JPEG中的待验证处理日志为经过压缩后的二进制文件,因此,读取待验证处理日志的过程也称为解压过程,即将获取的二进制待验证处理日志转换成由待验证链码信息和待验证状态信息组成的普通字符串,对待验证处理日志的解压过程可通过使用二进制代码转化器进行解压后再读取,或通过使用c++或java语言对待验证处理日志进行直接读取。
S802:将待验证状态信息与标准处理日志的状态信息进行比较,以及将待验证链码信息与标准处理日志的链码信息进行比较。
具体地,由于标准处理日志包括链码信息和状态信息,因此,判断待验证处理日志和标准处理日志是否一致前,需将待验证状态信息与标准处理日志的状态信息进行比较,以及将待验证链码信息与标准处理日志的链码信息进行比较。
S803:若待验证状态信息与标准处理日志的状态信息不一致,或待验证链码信息与标准处理日志的链码信息不一致,则待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致。
若经上述步骤S802比较得出待验证状态信息与标准处理日志的状态信息不一致,或待验证链码信息与标准处理日志的链码信息不一致,则表示待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致。若经上述步骤S802比较得出待验证状态信息与标准处理日志的状态信息一致,以及待验证链码信息与标准处理日志的链码信息一致,则表示待验证图像中的待验证处理日志和目标图像中的标准处理日志一致。
在本实施例中,通过读取待验证处理日志,待验证处理日志包括待验证链码信息和待验证状态信息;然后将待验证状态信息与标准处理日志的状态信息,以及将待验证链码信息与标准处理日志的链码信息进行比较;若待验证状态信息与标准处理日志的状态信息不一致,或待验证链码信息与标准处理日志的链码信息不一致,则待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致;进一步增强了判断用户对图像的操作处理是否合法的准确性。
在一实施例中,如图8所示,判断待验证图像中的待验证处理日志和目标图像中的标准处理日志是否一致,还包括:
S804:读取待验证处理日志。
具体地,步骤S804读取待验证处理日志与步骤S801读取待验证处理日志的方法相同,此处不做冗余赘述。同样的,读取的待验证处理日志包括待验证链码信息和待验证状态信息。
S805:若待验证处理日志的内容为空,则待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致。
具体地,判断待验证处理日志的内容是否为空,主要根据查看待验证图像的JPEG图像文件中的待处理日志的压缩数据是否为0KB,若JPEG图像文件中的待处理日志的压缩数据为0KB,则表示JPEG图像文件中没有存储待处理日志,即待验证处理日志的内容为空,若JPEG图像理文件中的待处日志的压缩数据不为0KB,则表示JPEG图像文件中存储有待验证处理日志,即判断得出待验证处理日志的内容不为空。
具体地,根据上述图像处理方法可知,任何经合法操作处理的目标图像的JPEG图像文件中一定写入了根据链码信息和状态信息生成的标准处理日志。因此,若读取的待证处理日志的内容为空,则表示该待验证图像的待验证处理日志和目标图像中的标准处理日志不一致。若读取的待验证处理日志的内容不为空白,则可执行对比待验证图像中的待处理日志与目标图像中的标准处理日志是否一致的步骤。
在本实施例中,通过读取待验证处理日志;若待验证处理日志的内容为空,则待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致;缓解了后续判断待验证处 理日志和目标图像中的标准处理日志是否一致的数据处理压力,提高了数据处理效率。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种图像验证装置,该图像验证装置与上述实施例中图像验证方法一一对应。如图9所示,该图像验证装置包括:待验证图像获取模块50、日志获取模块60、目标图像获取模块70、日志判断模块80和图像判断模块90。各功能模块详细说明如下:
待验证图像获取模块50,用于获取待验证图像,待验证图像包括图像标识;
日志获取模块60,用于在待验证图像中存在待验证处理日志时,则获取待验证图像中的待验证处理日志;
目标图像获取模块70,用于根据图像标识获取对应的目标图像,目标图像包括标准处理日志,其中,标准处理日志是采用上述图像处理方法生成的;
日志判断模块80,用于判断待验证图像中的待验证处理日志和目标图像中的标准处理日志是否一致;
图像判断模块90,用于在待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致时,则待验证图像为不合法图像。
优选地,日志判断模块80包括:
第一读取子模块,用于读取待验证处理日志,待验证处理日志包括待验证链码信息和待验证状态信息;
比较子模块,用于将待验证状态信息与标准处理日志的状态信息进行比较,以及将待验证链码信息与述标准处理日志的链码信息进行比较;
第一判断子模块,用于在待验证状态信息与标准处理日志的状态信息不一致时,或在待验证链码信息与标准处理日志的链码信息不一致时,判断待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致。
优选地,日志判断模块80还包括:
第二读取子模块,用于读取待验证处理日志;
第二判断子模块,用于在待验证处理日志的内容为空时,判断待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致。
关于图像验证装置的具体限定可以参见上文中对于图像验证方法的限定,在此不再赘述。上述图像验证装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储上述图像处理方法和上述图像验证方法中使用到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种图像处理方法,或者该计算机可读指令被处理器执行时以实现一种图像验证方法。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现以下步骤:
获取目标图像的编辑请求,所述编辑请求包括操作轨迹和状态信息;
通过链式编码记录所述操作轨迹的链码信息;
根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志;
将所述标准处理日志写入所述目标图像中。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现以下步骤:
获取待验证图像,所述待验证图像包括图像标识;
若所述待验证图像中存在待验证处理日志,则获取所述待验证图像中的待验证处理日志;
根据所述图像标识获取对应的目标图像,所述目标图像包括标准处理日志,其中,所述标准处理日志是采用上述的图像处理方法生成的;
判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致;
若所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致,则所述待验证图像为不合法图像。
在一个实施例中,一个或多个存储有计算机可读指令的可读存储介质,所述可读存储介质包括非易失性可读存储介质和易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
获取目标图像的编辑请求,所述编辑请求包括操作轨迹和状态信息;
通过链式编码记录所述操作轨迹的链码信息;
根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志;
将所述标准处理日志写入所述目标图像中。
在一个实施例中,一个或多个存储有计算机可读指令的可读存储介质,所述可读存储介质包括非易失性可读存储介质和易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
获取待验证图像,所述待验证图像包括图像标识;
若所述待验证图像中存在待验证处理日志,则获取所述待验证图像中的待验证处理日志;
根据所述图像标识获取对应的目标图像,所述目标图像包括标准处理日志,其中,所述标准处理日志是采用上述图像处理方法生成的;
判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致;
若所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致,则所述待验证图像为不合法图像。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功 能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。
Claims (20)
- 一种图像处理方法,其特征在于,包括:获取目标图像的编辑请求,所述编辑请求包括操作轨迹和状态信息;通过链式编码记录所述操作轨迹的链码信息;根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志;将所述标准处理日志写入所述目标图像中。
- 如权利要求1所述的图像处理方法,其特征在于,所述通过链式编码记录所述操作轨迹的链码信息,包括:将所述操作轨迹的起点确定为像素原点;以所述像素原点为起点,记录所述操作轨迹上每一后续点相对前继点的方向编码,得到所述操作轨迹的方向编码信息;获取所述操作轨迹的轨迹颜色;将所述像素原点、所述轨迹颜色和所述方向编码信息,组成所述操作轨迹的链码信息。
- 如权利要求1所述的图像处理方法,其特征在于,在所述根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志之后,所述图像处理方法还包括:获取所述标准处理日志;使用加密密钥对所述标准处理日志进行加密处理,得到加密处理日志;将所述加密密钥与所述目标图像的图像标识进行关联存储。
- 一种图像验证方法,其特征在于,包括:获取待验证图像,所述待验证图像包括图像标识;若所述待验证图像中存在待验证处理日志,则获取所述待验证图像中的待验证处理日志;根据所述图像标识获取对应的目标图像,所述目标图像包括标准处理日志,其中,所述标准处理日志是采用如权利要求1-3中任一项所述的图像处理方法生成的;判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致;若所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致,则所述待验证图像为不合法图像。
- 如权利要求4所述的图像验证方法,其特征在于,所述判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致,包括:读取所述待验证处理日志,所述待验证处理日志包括待验证链码信息和待验证状态信息;将所述待验证状态信息与所述标准处理日志的状态信息进行比较,以及将所述待验证链码信息与所述标准处理日志的链码信息进行比较;若所述待验证状态信息与所述标准处理日志的所述状态信息不一致,或所述待验证链码信息与所述标准处理日志的所述链码信息不一致,则所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致。
- 如权利要求4所述的图像验证方法,其特征在于,所述判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致,包括:读取所述待验证处理日志;若所述待验证处理日志的内容为空,则所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致。
- 一种图像处理装置,其特征在于,包括:请求获取模块,用于获取目标图像的编辑请求,所述编辑请求包括操作轨迹和状态信息;记录模块,用于通过链式编码记录所述操作轨迹的链码信息;生成模块,用于根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志;写入模块,用于将所述标准处理日志写入所述目标图像中。
- 一种图像验证装置,其特征在于,包括:待验证图像获取模块,用于获取待验证图像,所述待验证图像包括图像标识;日志获取模块,用于在所述待验证图像中存在所述待验证处理日志时,则获取所述待验证图像中的待验证处理日志;目标图像获取模块,用于根据所述图像标识获取对应的目标图像,所述目标图像包括标准处理日志,其中,所述标准处理日志是采用权利要求1-3中任一项所述的图像处理方法生成的;日志判断模块,用于判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致;图像判断模块,用于在所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致时,则所述待验证图像为不合法图像。
- 如权利要求7所述的图像处理装置,其特征在于,所述记录模块包括:确定子模块,用于将操作轨迹的起点确定为像素原点;记录子模块,用于以像素原点为起点,记录操作轨迹上每一后续点相对前继点的方向编码,得到操作轨迹的方向编码信息;获取子模块,用于获取操作轨迹的轨迹颜色;组成子模块,用于将像素原点、轨迹颜色和方向编码信息,组成操作轨迹的链码信息。
- 如权利要求7所述的图像处理装置,其特征在于,所述图像处理装置还包括:标准处理日志获取模块,用于获取标准处理日志;加密模块,用于使用加密密钥对标准处理日志进行加密处理,得到加密处理日志;关联模块,用于将加密密钥与目标图像的图像标识进行关联存储。
- 如权利要求8所述的图像处理装置,其特征在于,所述日志判断模块包括:第一读取子模块,用于读取待验证处理日志,待验证处理日志包括待验证链码信息和待验证状态信息;比较子模块,用于将待验证状态信息与标准处理日志的状态信息进行比较,以及将待验证链码信息与述标准处理日志的链码信息进行比较;第一判断子模块,用于在待验证状态信息与标准处理日志的状态信息不一致时,或在待验证链码信息与标准处理日志的链码信息不一致时,判断待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致。
- 如权利要求8所述的图像处理装置,其特征在于,所述日志判断模块还包括:第二读取子模块,用于读取待验证处理日志;第二判断子模块,用于在待验证处理日志的内容为空时,判断待验证图像中的待验证处理日志和目标图像中的标准处理日志不一致。
- 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:获取目标图像的编辑请求,所述编辑请求包括操作轨迹和状态信息;通过链式编码记录所述操作轨迹的链码信息;根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志;将所述标准处理日志写入所述目标图像中。
- 如权利要求13所述的计算机设备,其特征在于,所述通过链式编码记录所述操作轨迹的链码信息,包括:将所述操作轨迹的起点确定为像素原点;以所述像素原点为起点,记录所述操作轨迹上每一后续点相对前继点的方向编码,得到所述操作轨迹的方向编码信息;获取所述操作轨迹的轨迹颜色;将所述像素原点、所述轨迹颜色和所述方向编码信息,组成所述操作轨迹的链码信息。
- 如权利要求13所述的计算机设备,其特征在于,在所述根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志之后,所述处理器执行所述计算机可读指令时还实现如下步骤:获取所述标准处理日志;使用加密密钥对所述标准处理日志进行加密处理,得到加密处理日志;将所述加密密钥与所述目标图像的图像标识进行关联存储。
- 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:获取待验证图像,所述待验证图像包括图像标识;若所述待验证图像中存在待验证处理日志,则获取所述待验证图像中的待验证处理日志;根据所述图像标识获取对应的目标图像,所述目标图像包括标准处理日志,其中,所述标准处理日志是采用如权利要求1-3中任一项所述的图像处理方法生成的;判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致;若所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致,则所述待验证图像为不合法图像。
- 如权利要求16所述的计算机设备,其特征在于,所述判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致,包括:读取所述待验证处理日志,所述待验证处理日志包括待验证链码信息和待验证状态信息;将所述待验证状态信息与所述标准处理日志的状态信息进行比较,以及将所述待验证链码信息与所述标准处理日志的链码信息进行比较;若所述待验证状态信息与所述标准处理日志的所述状态信息不一致,或所述待验证链码信息与所述标准处理日志的所述链码信息不一致,则所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致。
- 如权利要求16所述的计算机设备,其特征在于,所述判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致,包括:读取所述待验证处理日志;若所述待验证处理日志的内容为空,则所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致。
- 一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:获取目标图像的编辑请求,所述编辑请求包括操作轨迹和状态信息;通过链式编码记录所述操作轨迹的链码信息;根据所述操作轨迹的链码信息和所述状态信息,生成标准处理日志;将所述标准处理日志写入所述目标图像中。
- 一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:获取待验证图像,所述待验证图像包括图像标识;若所述待验证图像中存在待验证处理日志,则获取所述待验证图像中的待验证处理日志;根据所述图像标识获取对应的目标图像,所述目标图像包括标准处理日志,其中,所述标准处理日志是采用如权利要求1-3中任一项所述的图像处理方法生成的;判断所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志是否一致;若所述待验证图像中的所述待验证处理日志和所述目标图像中的所述标准处理日志不一致,则所述待验证图像为不合法图像。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910048268.5A CN109887046A (zh) | 2019-01-18 | 2019-01-18 | 图像处理方法、图像验证方法、装置、设备及介质 |
| CN201910048268.5 | 2019-01-18 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020147439A1 true WO2020147439A1 (zh) | 2020-07-23 |
Family
ID=66926266
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/122026 Ceased WO2020147439A1 (zh) | 2019-01-18 | 2019-11-29 | 图像处理方法、图像验证方法、装置、设备及介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109887046A (zh) |
| WO (1) | WO2020147439A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109887046A (zh) * | 2019-01-18 | 2019-06-14 | 深圳壹账通智能科技有限公司 | 图像处理方法、图像验证方法、装置、设备及介质 |
| WO2021012079A1 (en) * | 2019-07-19 | 2021-01-28 | Nokia Solutions And Networks Oy | Mechanism for reducing logging entries based on content |
| CN111859354B (zh) | 2020-07-21 | 2023-09-01 | 百度在线网络技术(北京)有限公司 | 图片验证方法、装置、电子设备、存储介质和程序产品 |
| CN113129395B (zh) * | 2021-05-08 | 2021-09-10 | 深圳市数存科技有限公司 | 一种数据压缩加密系统 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9300678B1 (en) * | 2015-08-03 | 2016-03-29 | Truepic Llc | Systems and methods for authenticating photographic image data |
| CN108551582A (zh) * | 2018-03-19 | 2018-09-18 | 上海交通大学 | 一种图像、视频数据的身份标识方法与系统 |
| CN108847945A (zh) * | 2018-08-06 | 2018-11-20 | 佛山市苔藓云链科技有限公司 | 一种包含多个节点连接到块链网络的记录设备 |
| CN109040783A (zh) * | 2018-09-11 | 2018-12-18 | 北京朗达和顺科技有限公司 | 一种视频防伪系统、方法及装置 |
| CN109887046A (zh) * | 2019-01-18 | 2019-06-14 | 深圳壹账通智能科技有限公司 | 图像处理方法、图像验证方法、装置、设备及介质 |
-
2019
- 2019-01-18 CN CN201910048268.5A patent/CN109887046A/zh active Pending
- 2019-11-29 WO PCT/CN2019/122026 patent/WO2020147439A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9300678B1 (en) * | 2015-08-03 | 2016-03-29 | Truepic Llc | Systems and methods for authenticating photographic image data |
| CN108551582A (zh) * | 2018-03-19 | 2018-09-18 | 上海交通大学 | 一种图像、视频数据的身份标识方法与系统 |
| CN108847945A (zh) * | 2018-08-06 | 2018-11-20 | 佛山市苔藓云链科技有限公司 | 一种包含多个节点连接到块链网络的记录设备 |
| CN109040783A (zh) * | 2018-09-11 | 2018-12-18 | 北京朗达和顺科技有限公司 | 一种视频防伪系统、方法及装置 |
| CN109887046A (zh) * | 2019-01-18 | 2019-06-14 | 深圳壹账通智能科技有限公司 | 图像处理方法、图像验证方法、装置、设备及介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109887046A (zh) | 2019-06-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020147439A1 (zh) | 图像处理方法、图像验证方法、装置、设备及介质 | |
| US20210211290A1 (en) | Method and system for biometric verification | |
| CN108512830B (zh) | 信息加密处理方法、装置、计算机设备和存储介质 | |
| CN112949545B (zh) | 识别人脸图像的方法、装置、计算设备和介质 | |
| EP3756130B1 (en) | Image hidden information detector | |
| CN113515752B (zh) | 信息加密方法、解密方法、装置及电子设备 | |
| US20240154802A1 (en) | Model protection method and apparatus | |
| CN115756516A (zh) | 一种模型的端侧部署方法、装置、设备及存储介质 | |
| CN110768784A (zh) | 密码传输方法、装置、计算机设备和存储介质 | |
| CN107092816A (zh) | 一种Android应用程序加固方法 | |
| CN114386058A (zh) | 一种模型文件加密与解密方法及装置 | |
| CN112597337A (zh) | 一种视频监控内容的查看方法、装置、设备及介质 | |
| WO2021098385A1 (zh) | 在可信执行环境中训练gbdt模型的方法、装置及设备 | |
| CN110502423B (zh) | 固件的漏洞识别方法、装置、设备和存储介质 | |
| WO2021068524A1 (zh) | 图像匹配方法、装置、计算机设备及存储介质 | |
| CN116257868A (zh) | 基于图像隐写的数据保护方法及装置、存储介质、终端 | |
| US20240223366A1 (en) | System and method for changing encryption keys | |
| CN112436943A (zh) | 基于大数据的请求去重方法、装置、设备及存储介质 | |
| CN113849859A (zh) | Linux内核的修改方法、终端设备和存储介质 | |
| CN108848165B (zh) | 业务请求处理方法、装置、计算机设备和存储介质 | |
| CN113051592B (zh) | 文件加密方法、装置、电子设备及存储介质 | |
| CN107133517B (zh) | 一种基于内存中数据加密和计算的数据还原方法 | |
| CN115329291A (zh) | 反爬虫方法、系统、计算机设备及存储介质 | |
| US20220107738A1 (en) | Read controller and input/output controller | |
| CN113987446A (zh) | 一种认证方法及装置 |
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: 19910348 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 09.11.2021) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19910348 Country of ref document: EP Kind code of ref document: A1 |