CN117893392B - Image application method and device for generating watermark underground coal mine - Google Patents

Image application method and device for generating watermark underground coal mine Download PDF

Info

Publication number
CN117893392B
CN117893392B CN202410296797.8A CN202410296797A CN117893392B CN 117893392 B CN117893392 B CN 117893392B CN 202410296797 A CN202410296797 A CN 202410296797A CN 117893392 B CN117893392 B CN 117893392B
Authority
CN
China
Prior art keywords
image
information
watermark
generate
pixel
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.)
Active
Application number
CN202410296797.8A
Other languages
Chinese (zh)
Other versions
CN117893392A (en
Inventor
刘林
龚浩杰
梁凡晨
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tehuakemai Xi'an Information Technology Co ltd
Original Assignee
Tehuakemai Xi'an Information Technology Co ltd
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 Tehuakemai Xi'an Information Technology Co ltd filed Critical Tehuakemai Xi'an Information Technology Co ltd
Priority to CN202410296797.8A priority Critical patent/CN117893392B/en
Publication of CN117893392A publication Critical patent/CN117893392A/en
Application granted granted Critical
Publication of CN117893392B publication Critical patent/CN117893392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)

Abstract

The application provides an image application method and device for generating watermarks in coal mines, a computer readable medium and electronic equipment. The method comprises the following steps: detecting a current network state, and acquiring information to be processed based on the network state; preprocessing based on the information to be processed to generate formatted characters with uniform formats; extracting a digital abstract in the formatted character, and arranging the digital abstract to generate watermark information; embedding the watermark information into an image through digital image processing to generate a watermark image; and caching the watermark image locally or uploading the watermark image to a server based on the current network state. According to the technical scheme, the information to be processed is acquired in a network detection mode, so that the reliability and the integrity of acquiring watermark information in a coal mine are improved; and the image watermark is generated by combining the data compression and encryption verification methods, so that the watermark information is prevented from being lost or tampered, and the safety and reliability of the loading information are improved.

Description

Image application method and device for generating watermark underground coal mine
Technical Field
The application relates to the technical field of computers, in particular to an image application method and device for generating watermarks in coal mines, a computer readable medium and electronic equipment.
Background
In the underground production operation process of a coal mine, an underground actual production operation scene needs to be acquired and monitored and is used for evaluating the conditions of equipment operation, working progress, personnel activities and the like. In a coal mine downhole environment, the process of acquiring an image and generating an image watermark has the following problems: because of the special environment of the underground coal mine, the network communication condition of the underground coal mine is limited, user information and equipment information can not be obtained in real time in many times, and the generated information of pictures can not be perceived, so that the image watermark information is difficult to obtain, and the efficiency of generating the image watermark is low.
Disclosure of Invention
The embodiment of the application provides an image application method, an image application device, a computer readable medium and electronic equipment for generating watermarks in coal mines, which can solve the problems of difficult acquisition of image watermark information and low efficiency of generating image watermarks at least to a certain extent.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application.
According to one aspect of the application, there is provided an image application method for generating a watermark downhole in a coal mine, comprising: detecting a current network state, and acquiring information to be processed based on the network state; preprocessing based on the information to be processed to generate formatted characters with uniform formats; extracting a digital abstract in the formatted character, and arranging the digital abstract to generate watermark information; embedding the watermark information into an image through digital image processing to generate a watermark image; and caching the watermark image locally or uploading the watermark image to a server based on the current network state.
In the present application, based on the foregoing scheme, the detecting a current network state, and obtaining information to be processed based on the network state, includes: detecting a network state corresponding to the position of the terminal, and determining a data acquisition mode according to the network state; if the current network state is good, acquiring the information to be processed through a network; and if the network is disconnected currently, acquiring the information to be processed in a local cache, bluetooth or RFID mode.
In the present application, based on the foregoing scheme, the preprocessing is performed based on the information to be processed, to generate formatted characters with uniform format, including: detecting a data type corresponding to the information to be processed; acquiring replacement characters corresponding to information to be processed of each data type based on a preset data type corresponding relation; and generating formatted characters with uniform formats based on the replacement characters.
In the present application, based on the foregoing scheme, the extracting the digital digest in the formatted character includes: compressing the formatted characters to generate compressed data; and carrying out abstract processing on the compressed data to generate a digital abstract.
In the present application, based on the foregoing scheme, the arranging the digital digests to generate watermark information includes: and according to a preset arrangement mode, arranging the digital abstracts to generate watermark information.
In the present application, based on the foregoing aspect, the embedding watermark information into an image by digital image processing to generate a watermark image includes: acquiring an environment image through a camera device; converting decimal pixel values into binary values based on the pixel values of the environment image, and simultaneously converting decimal watermark information into binary watermark information; replacing the lowest bit in the corresponding binary environment image with the binary watermark information to generate a replacement image; and converting the replacement image into decimal system to obtain a watermark image.
In the present application, based on the foregoing aspect, the method further includes: decrypting the encrypted information in the watermark image generated based on the encryption digest mode by a corresponding decryption mode to generate decryption information; verifying the decryption information, detecting whether the information is tampered or not, and obtaining complete watermark information after verification; and acquiring image information from the watermark information, and carrying out related data application on user information, generation time, place and equipment information in the watermark.
According to one aspect of the present application there is provided an image application apparatus for generating a watermark downhole in a coal mine, comprising:
the detection unit is used for detecting the current network state and acquiring information to be processed based on the network state;
The generating unit is used for preprocessing based on the information to be processed and generating formatted characters with uniform formats;
the extraction unit is used for extracting the digital abstracts in the formatted characters, and arranging the digital abstracts to generate watermark information;
the watermark unit is used for embedding the watermark information into the image through digital image processing to generate a watermark image;
and the uploading unit is used for caching the watermark image locally or uploading the watermark image to a server based on the current network state.
In the present application, based on the foregoing scheme, the detecting a current network state, and obtaining information to be processed based on the network state, includes: detecting a network state corresponding to the position of the terminal, and determining a data acquisition mode according to the network state; if the current network state is good, acquiring the information to be processed through a network; and if the network is disconnected currently, acquiring the information to be processed in a local cache, bluetooth or RFID mode.
In the present application, based on the foregoing scheme, the preprocessing is performed based on the information to be processed, to generate formatted characters with uniform format, including: detecting a data type corresponding to the information to be processed; acquiring replacement characters corresponding to information to be processed of each data type based on a preset data type corresponding relation; and generating formatted characters with uniform formats based on the replacement characters.
In the present application, based on the foregoing scheme, the extracting the digital digest in the formatted character includes: compressing the formatted characters to generate compressed data; and carrying out abstract processing on the compressed data to generate a digital abstract.
In the present application, based on the foregoing scheme, the arranging the digital digests to generate watermark information includes: and according to a preset arrangement mode, arranging the digital abstracts to generate watermark information.
In the present application, based on the foregoing aspect, the embedding watermark information into an image by digital image processing to generate a watermark image includes: acquiring an environment image through a camera device; converting decimal pixel values into binary values based on the pixel values of the environment image, and simultaneously converting decimal watermark information into binary watermark information; replacing the lowest bit in the corresponding binary environment image with the binary watermark information to generate a replacement image; and converting the replacement image into decimal system to obtain a watermark image.
In the present application, based on the foregoing aspect, the method further includes: decrypting the encrypted information in the watermark image generated based on the encryption digest mode by a corresponding decryption mode to generate decryption information; verifying the decryption information, detecting whether the information is tampered or not, and obtaining complete watermark information after verification; and acquiring image information from the watermark information, and carrying out related data application on user information, generation time, place and equipment information in the watermark.
According to one aspect of the present application there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements an image application method for generating watermarks downhole in a coal mine as described in the above embodiments.
According to an aspect of the present application, there is provided an electronic apparatus including: one or more processors; and the storage device is used for storing one or more programs, and the one or more programs are executed by the one or more processors, so that the one or more processors realize the image application method for generating the watermark underground the coal mine.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the computer device to perform the image application method of generating watermarks downhole in a coal mine provided in the various alternative implementations described above.
In the technical scheme of the application, the current network state is detected, and the information to be processed is acquired based on the network state; preprocessing based on the information to be processed to generate formatted characters with uniform formats; extracting a digital abstract in the formatted character, and arranging the digital abstract to generate watermark information; embedding the watermark information into an image through digital image processing to generate a watermark image; and caching the watermark image locally or uploading the watermark image to a server based on the current network state. When the information to be processed is acquired, the technical scheme of the application directly acquires real-time equipment information, user information and environment information when a network exists by firstly detecting the network state of the user, and acquires information locally stored by a terminal or acquires information in an NFC mode under the condition of no network state, thereby improving the reliability and the integrity of acquiring watermark information in a coal mine; and the image watermark is generated by combining the data compression and encryption verification methods, so that the watermark information is prevented from being lost or tampered, and the safety and reliability of the loading information are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 schematically shows a flow chart of an image application method for generating a watermark under a coal mine in one embodiment of the application.
Fig. 2 schematically illustrates a schematic diagram of an image application method for generating a watermark under a coal mine in one embodiment of the application.
Fig. 3 schematically shows a schematic view of an image application apparatus for generating watermarks under a coal mine in one embodiment of the application.
Fig. 4 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
The implementation details of the technical scheme of the application are explained in detail as follows:
Fig. 1 shows a flow chart of an image application method for generating watermarks downhole in a coal mine in accordance with an embodiment of the application. Referring to fig. 1, the method for applying the image for generating the watermark in the coal mine underground at least comprises steps S110 to S150, and is described in detail as follows:
in step S110, the current network state is detected, and the information to be processed is acquired based on the network state.
In one embodiment of the application, when data is acquired downhole in a coal mine, the manner in which the data is acquired may be affected by the network conditions downhole. Specifically, in this embodiment, when detecting the current network state, acquiring the information to be processed based on the network state includes:
detecting a network state corresponding to the position of the terminal, and determining a data acquisition mode according to the network state;
If the current network state is good, acquiring the information to be processed through a network;
If the network is currently disconnected, the information to be processed is obtained through a local cache, bluetooth or radio frequency identification (Radio Frequency Identification, RFID) mode.
In an embodiment of the present application, a network state corresponding to a location where a terminal is located is detected first, and a data acquisition manner is determined according to the network state. Specifically, under the network state, acquiring the position information of a user in the underground coal mine in real time through a terminal; and in the disconnected network state, scanning the NFC card preset underground through the terminal to acquire positioning information corresponding to the NFC card. And realizing sign-in and underground positioning acquisition, and determining the current position information of the user terminal.
In addition, the data can be acquired through Bluetooth in the disconnected network state, or the information to be processed is directly called from the local.
In an embodiment of the present application, the information to be processed to be acquired includes personnel basic information, time information, equipment information, and the like. The personnel basic information comprises identity information, position information and the like, and the equipment information comprises equipment type, equipment identification and the like. The concrete explanation is as follows:
1) Personnel basic information acquisition
And in a scene of normal network communication, the basic information of the current login person is pulled from the back-end server. Detecting network state, and when network communication is disconnected, buffering the basic information of logged-in personnel in local before personnel information is logged in at the app. And storing the personnel information cached in the local equipment.
2) Time information acquisition
And in a scene of normal network communication, pulling the time of the server. Detecting network state, and storing time using the mobile phone system when network communication is disconnected.
3) Device information acquisition
And in a scene of normal network communication, scanning a two-dimensional code of the underground detection equipment to acquire the information of the current detected equipment and the position information of the current equipment. And (5) saving the two-dimensional code picture information scanned by the equipment in a scene of network communication disconnection.
In the process, the information to be processed is acquired based on the network state by detecting the network state corresponding to the current position of the terminal, so that the efficiency and the reliability of information acquisition are improved.
In step S120, preprocessing is performed based on the information to be processed, so as to generate formatted characters with uniform format.
In one embodiment of the application, preprocessing is performed based on the information to be processed, and the information to be processed of different data types is converted into formatted characters with uniform formats.
In one embodiment of the present application, preprocessing is performed based on the information to be processed to generate formatted characters with uniform format, including:
Detecting a data type corresponding to the information to be processed;
acquiring replacement characters corresponding to information to be processed of each data type based on a preset data type corresponding relation;
and generating formatted characters with uniform formats based on the replacement characters.
In an embodiment of the present application, the acquired different data are processed according to a set data format, so as to obtain data consistent with the set format.
Specifically, in the technical scheme of the application, the object corresponding to the information to be processed is defined by detecting the data type corresponding to the information to be processed. And then, based on a preset data type corresponding relation, determining a replacement character corresponding to the information to be processed under the data type, and then, based on the replacement character, generating formatted characters with uniform formats. The information to be processed is converted into formatted characters with uniform formats by the mode, so that the uniformity and the processing efficiency of data are improved.
In step S130, a digital abstract in the formatted character is extracted, and the digital abstract is arranged to generate watermark information.
In one embodiment of the application, after generating formatted characters with uniform format, digital digests in the formatted characters are extracted, and then the digital digests are arranged to generate watermark information.
In one embodiment of the application, extracting the digital digest of the formatted character comprises:
compressing the formatted characters to generate compressed data;
and carrying out abstract processing on the compressed data to generate a digital abstract.
In one embodiment of the present application, after the formatted characters are generated, the formatted characters are compressed to generate compressed data. And then, carrying out abstract processing on the compressed data to generate a digital abstract.
Specifically, in the compression process based on the formatted character in this embodiment, the compression rate is based on the preset compression rateAnd the amount of characters corresponding to the formatted charactersDetermining the amount of compressed data after compressionThe method comprises the following steps:
the processing mode of data compression is a process of encoding original data by using less space, reduces the data volume to reduce the use of storage space on the premise of not losing useful information, and improves the transmission, storage and processing efficiency of the data.
Specifically, in the process of generating the digital digest, the obtained compressed data are connected through a character string, and the connected character string is processed through a hash algorithm to generate a short digital digest with a fixed length. In this embodiment, the digital digest is added to watermark information to generate an image watermark.
In an embodiment of the present application, a preset arrangement mode is set, and the digital digests are arranged according to the preset arrangement mode, so as to generate a fixed pattern as watermark information.
In step S140, the watermark information is embedded in the image by digital image processing, and a watermark image is generated.
In one embodiment of the application, after the watermark information is generated, the watermark information is embedded in the image by digital image processing, and the watermark image is finally generated.
In one embodiment of the present application, watermark information is embedded in an image by digital image processing to generate a watermark image, comprising:
acquiring an environment image through a camera device;
converting decimal pixel values into binary values based on the pixel values of the environment image, and simultaneously converting decimal watermark information into binary watermark information;
replacing the lowest bit in the corresponding binary environment image with the binary watermark information to generate a replacement image;
and converting the replacement image into decimal system to obtain a watermark image.
Further, due to the dim environment of the underground coal mine, the acquired environment image may have a fuzzy condition. Therefore, after the image capturing device acquires the environmental image, the method further includes:
acquiring pixel values corresponding to all pixel points in the environment image;
Determining pixel parameters corresponding to the environment image based on the pixel values, and determining enhancement coefficients according to the pixel parameters;
And carrying out image enhancement on the environment image according to the enhancement coefficient.
Specifically, in this embodiment, after the environmental image is acquired, the pixel values corresponding to the pixel points in the environmental image are based onDetermining pixel parameters corresponding to an environmental imageThe method comprises the following steps:
Wherein, Representing a preset pixel factor, n, m representing the number of pixels in the line and the column of the ambient image. The pixel parameter in this embodiment is used to represent the pixel integration level of the ambient image. After the pixel parameters are calculated, the enhancement coefficients are determined based on the pixel parameters as:
Wherein, Representing a preset enhancement factor. The enhancement coefficient calculated in this embodiment is used to enhance the environmental image, and the pixel value corresponding to the pixel point after enhancement is calculated by the pixel value, the pixel parameter and the enhancement coefficient of each pixel point is:
through the image enhancement process, the expressive force of the environment image can be improved, the influence of the dim environment under the mine on the image definition can be reduced, and the definition of the environment image can be enhanced.
Further, replacing the lowest bit in the corresponding binary environment image with each bit of information in the binary watermark information, and generating a replacement image includes:
acquiring preset watermark position information;
determining a watermark region from the watermark location information and the binary ambient image;
And in the watermark area, replacing the lowest bit in the watermark area with binary watermark information to generate a replaced image.
Specifically, the spatial pixel value of the ambient image is converted from decimal to binary, and for an 8-bit gray scale image, the image is divided into 8 bit planes, from LSB (least significant bit) to MSB (most significant bit). From the distribution of the bit planes, as the bit planes go from low to high (i.e., from bit plane 0 to bit plane 7), the features of the bit plane image become increasingly complex, the details increase, and the lower bit planes contain little image information, so changing the low bits has little effect on the quality of the image. This is used to store watermark information in the lower order bits of the image.
Further, in this embodiment, a watermark area is determined in a binary environment image based on preset watermark position information, and then, in the watermark area, the lowest bit in the watermark area is replaced by the binary watermark information, so as to generate a replacement image. In this way, the binary watermark information can be placed in a certain image area, improving the recognition of the watermark information.
In addition, the watermark may be added in other ways. For example, an original image Z of an NxM size is decomposed into N8 x 8 block-divided images Zi (1.ltoreq.i.ltoreq.n), the LSB portion of Zi is zeroed out, and digital digests are made for the individual blocks. And simultaneously, transforming the logo image A serving as the watermark into NxM, and performing the same block division, wherein the digital digest corresponds to the image A or is exclusive or, so as to obtain the digital digest embedded with the watermark. It is then encrypted with the private key and the result is embedded in the LSB portion of the corresponding block.
In step S150, the watermark image is cached locally or uploaded to a server based on the current network state.
In one embodiment of the application, after the watermark image is generated, the current network state is detected and the watermark image is cached locally or uploaded to a server based on the current network state.
Specifically, in this embodiment, when a network is detected, the watermark image is uploaded to the server. Upon detection of a network-free condition, the watermark is cached locally.
When the network is restored, the watermark information is extracted from the image by combining a spatial domain analysis method and a frequency domain analysis method. And identifying the two-dimensional code information stored during network disconnection, filling the equipment information into the newly generated watermark and replacing the newly generated watermark, wherein the extraction algorithm needs to consider factors such as noise, distortion, attack and the like possibly existing so as to ensure the accuracy and the robustness of extraction.
1) Spatial domain analysis method: the algorithm detects and extracts watermark information by spatially analyzing the image or video, i.e., analyzing each pixel. Spatial analysis may include analysis of pixel values, color distribution, texture, etc., by comparing spatial features of the original image or video and the watermarked image or video, the presence of a watermark may be detected and watermark information extracted.
2) Frequency domain analysis: the algorithm detects and extracts watermark information by performing a frequency domain analysis on the image or video, i.e. fourier transforming the image or video. The frequency domain analysis may include analysis of the frequency spectrum, frequency distribution, etc., by comparing the frequency domain characteristics of the original image or video and the watermarked image or video, the presence of a watermark may be detected and watermark information extracted.
In addition to the above steps, the method further comprises: after the watermark image is acquired, the information of the watermark image is analyzed and verified. And judging the authenticity of the watermark information and the image information by verifying the watermark information, and simultaneously acquiring the image information to process the image.
In one embodiment of the application, the method further comprises:
Decrypting the encrypted information in the watermark image generated based on the encryption digest mode by a corresponding decryption mode to generate decryption information;
Verifying the decryption information, detecting whether the information is tampered or not, and obtaining complete watermark information after verification;
And acquiring image information from the watermark information, and carrying out related data application on user information, generation time, place and equipment information in the watermark.
Specifically, in the watermark image generated based on the encryption digest method, the encrypted information is decrypted by the corresponding decryption method, and decryption information is generated. And then verifying the decrypted information, detecting whether the information is tampered, and obtaining complete watermark information after verification. Image information and user information in the watermark are then obtained from the watermark information, time, place and device information is generated, etc., for later application of the relevant data.
As shown in fig. 2, in the technical scheme of the present application, a current network state is detected, and information to be processed is obtained based on the network state; preprocessing based on the information to be processed to generate formatted characters with uniform formats; extracting a digital abstract in the formatted character, and arranging the digital abstract to generate watermark information; embedding the watermark information into an image through digital image processing to generate a watermark image; and caching the watermark image locally or uploading the watermark image to a server based on the current network state. When the information to be processed is acquired, the technical scheme of the application directly acquires real-time equipment information, user information and environment information when a network exists by firstly detecting the network state of the user, and acquires information locally stored by a terminal or acquires information in an NFC mode under the condition of no network state, thereby improving the reliability and the integrity of acquiring watermark information in a coal mine; and the image watermark is generated by combining the data compression and encryption verification methods, so that the watermark information is prevented from being lost or tampered, and the safety and reliability of the loading information are improved.
The following describes an embodiment of the apparatus of the present application that may be used to perform the method of applying an image of a watermark generated downhole in a coal mine of the above-described embodiment of the present application. It will be appreciated that the apparatus may be a computer program (including program code) running in a computer device, for example the apparatus being an application software; the device can be used for executing corresponding steps in the method provided by the embodiment of the application. For details not disclosed in the embodiment of the apparatus of the present application, please refer to the embodiment of the method for applying an image for generating a watermark in a coal mine.
Fig. 3 shows a block diagram of an image application apparatus for generating watermarks downhole in a coal mine in accordance with an embodiment of the application.
Referring to fig. 3, an image application apparatus for generating a watermark in a coal mine according to an embodiment of the present application includes:
a detecting unit 310, configured to detect a current network state, and acquire information to be processed based on the network state;
A generating unit 320, configured to perform preprocessing based on the information to be processed, and generate formatted characters with uniform format;
An extracting unit 330, configured to extract a digital digest in the formatted character, and arrange the digital digest to generate watermark information;
A watermark unit 340, configured to embed the watermark information into an image by digital image processing, and generate a watermark image;
An uploading unit 350, configured to cache the watermark image locally or upload the watermark image to a server based on the current network status.
In the present application, based on the foregoing scheme, the detecting a current network state, and obtaining information to be processed based on the network state, includes: detecting a network state corresponding to the position of the terminal, and determining a data acquisition mode according to the network state; if the current network state is good, acquiring the information to be processed through a network; and if the network is disconnected currently, acquiring the information to be processed in a local cache, bluetooth or RFID mode.
In the present application, based on the foregoing scheme, the preprocessing is performed based on the information to be processed, to generate formatted characters with uniform format, including: detecting a data type corresponding to the information to be processed; acquiring replacement characters corresponding to information to be processed of each data type based on a preset data type corresponding relation; and generating formatted characters with uniform formats based on the replacement characters.
In the present application, based on the foregoing scheme, the extracting the digital digest in the formatted character includes: compressing the formatted characters to generate compressed data; and carrying out abstract processing on the compressed data to generate a digital abstract.
In the present application, based on the foregoing scheme, the arranging the digital digests to generate watermark information includes: and according to a preset arrangement mode, arranging the digital abstracts to generate watermark information.
In the present application, based on the foregoing aspect, the embedding watermark information into an image by digital image processing to generate a watermark image includes: acquiring an environment image through a camera device; converting decimal pixel values into binary values based on the pixel values of the environment image, and simultaneously converting decimal watermark information into binary watermark information; replacing the lowest bit in the corresponding binary environment image with the binary watermark information to generate a replacement image; and converting the replacement image into decimal system to obtain a watermark image.
In the present application, based on the foregoing aspect, the method further includes: decrypting the encrypted information in the watermark image generated based on the encryption digest mode by a corresponding decryption mode to generate decryption information; verifying the decryption information, detecting whether the information is tampered or not, and obtaining complete watermark information after verification; and acquiring image information from the watermark information, and carrying out related data application on user information, generation time, place and equipment information in the watermark.
In the technical scheme of the application, the current network state is detected, and the information to be processed is acquired based on the network state; preprocessing based on the information to be processed to generate formatted characters with uniform formats; extracting a digital abstract in the formatted character, and arranging the digital abstract to generate watermark information; embedding the watermark information into an image through digital image processing to generate a watermark image; and caching the watermark image locally or uploading the watermark image to a server based on the current network state. When the information to be processed is acquired, the technical scheme of the application directly acquires real-time equipment information, user information and environment information when a network exists by firstly detecting the network state of the user, and acquires information locally stored by a terminal or acquires information in an NFC mode under the condition of no network state, thereby improving the reliability and the integrity of acquiring watermark information in a coal mine; and the image watermark is generated by combining the data compression and encryption verification methods, so that the watermark information is prevented from being lost or tampered, and the safety and reliability of the loading information are improved.
Fig. 4 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
It should be noted that, the computer system 400 of the electronic device shown in the drawings is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
Among them, the computer system 400 includes a central processing unit (Central Processing Unit, CPU) 401 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 402 or a program loaded from a storage section 408 into a random access Memory (Random Access Memory, RAM) 403. In the RAM 403, various programs and data required for the system operation are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An Input/Output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output portion 407 including a Cathode Ray Tube (CRT), a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), and a speaker, etc.; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. The drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 409 and/or installed from the removable medium 411. When executed by a Central Processing Unit (CPU) 401, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), a flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with a computer-readable computer program embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in the various alternative implementations described above.
As another aspect, the present application also provides a computer-readable medium that may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the methods described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (9)

1. An image application method for generating watermarks in a coal mine underground, which is characterized by comprising the following steps:
detecting a current network state, and acquiring information to be processed based on the network state;
Preprocessing based on the information to be processed to generate formatted characters with uniform formats;
Extracting a digital abstract in the formatted character, and arranging the digital abstract to generate watermark information;
acquiring an environment image through a camera device, embedding the watermark information into the environment image through digital image processing, and generating a watermark image;
caching the watermark image locally or uploading the watermark image to a server based on the current network state;
After the image capturing apparatus acquires the environment image, the method further includes:
acquiring pixel values corresponding to pixel points in the environment image
Determining pixel parameters corresponding to the environment image based on the pixel valuesThe method comprises the following steps:
Determining enhancement coefficients from the pixel parameters The method comprises the following steps:
Performing image enhancement on the environment image according to the enhancement coefficient, and calculating the pixel value corresponding to the enhanced pixel point according to the pixel value, the pixel parameter and the enhancement coefficient of each pixel point to obtain the pixel value corresponding to the enhanced pixel point as follows:
Wherein, Representing a preset pixel factor, n, m representing the number of pixels in the line and the column of the ambient image,Representing a preset enhancement factor;
The watermark information is embedded into the environment image through digital image processing, so as to generate a watermark image, which comprises the following steps:
converting decimal pixel values into binary values based on the pixel values of the environment image, and simultaneously converting decimal watermark information into binary watermark information;
replacing the lowest bit in the corresponding binary environment image with the binary watermark information to generate a replacement image;
and converting the replacement image into decimal system to obtain a watermark image.
2. The method of claim 1, wherein detecting the current network state, and obtaining the information to be processed based on the network state, comprises:
detecting a network state corresponding to the position of the terminal, and determining a data acquisition mode according to the network state;
If the current network state is good, acquiring the information to be processed through a network;
and if the network is disconnected currently, acquiring the information to be processed in a local cache, bluetooth or RFID mode.
3. The method of claim 1, wherein preprocessing based on the information to be processed to generate formatted characters of uniform format comprises:
Detecting a data type corresponding to the information to be processed;
acquiring replacement characters corresponding to information to be processed of each data type based on a preset data type corresponding relation;
and generating formatted characters with uniform formats based on the replacement characters.
4. The method of claim 1, wherein extracting the digital summary in the formatted character comprises:
compressing the formatted characters to generate compressed data;
and carrying out abstract processing on the compressed data to generate a digital abstract.
5. The method of claim 1, wherein arranging the digital digests to generate watermark information comprises:
and according to a preset arrangement mode, arranging the digital abstracts to generate watermark information.
6. The method according to claim 1, wherein the method further comprises:
Decrypting the encrypted information in the watermark image generated based on the encryption digest mode by a corresponding decryption mode to generate decryption information;
Verifying the decryption information, detecting whether the information is tampered or not, and obtaining complete watermark information after verification;
And acquiring image information from the watermark information, and carrying out related data application on user information, generation time, place and equipment information in the watermark.
7. An image application device for generating watermarks in a coal mine underground, comprising:
the detection unit is used for detecting the current network state and acquiring information to be processed based on the network state;
The generating unit is used for preprocessing based on the information to be processed and generating formatted characters with uniform formats;
the extraction unit is used for extracting the digital abstracts in the formatted characters, and arranging the digital abstracts to generate watermark information;
The watermark unit is used for acquiring an environment image through the camera device, embedding the watermark information into the environment image through digital image processing, and generating a watermark image;
The uploading unit is used for caching the watermark image locally or uploading the watermark image to a server based on the current network state;
After the image capturing apparatus acquires the environment image, the method further includes:
acquiring pixel values corresponding to pixel points in the environment image
Determining pixel parameters corresponding to the environment image based on the pixel valuesThe method comprises the following steps:
Determining enhancement coefficients from the pixel parameters The method comprises the following steps:
Performing image enhancement on the environment image according to the enhancement coefficient, and calculating the pixel value corresponding to the enhanced pixel point according to the pixel value, the pixel parameter and the enhancement coefficient of each pixel point to obtain the pixel value corresponding to the enhanced pixel point as follows:
Wherein, Representing a preset pixel factor, n, m representing the number of pixels in the line and the column of the ambient image,Representing a preset enhancement factor;
The watermark information is embedded into the environment image through digital image processing, so as to generate a watermark image, which comprises the following steps:
converting decimal pixel values into binary values based on the pixel values of the environment image, and simultaneously converting decimal watermark information into binary watermark information;
replacing the lowest bit in the corresponding binary environment image with the binary watermark information to generate a replacement image;
and converting the replacement image into decimal system to obtain a watermark image.
8. A computer readable medium having stored thereon a computer program which when executed by a processor implements an image application method of generating a watermark downhole in a coal mine as claimed in any one of claims 1 to 6.
9. An electronic device, comprising:
One or more processors;
storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement the image application method of generating a watermark downhole in a coal mine as claimed in any one of claims 1to 6.
CN202410296797.8A 2024-03-15 2024-03-15 Image application method and device for generating watermark underground coal mine Active CN117893392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410296797.8A CN117893392B (en) 2024-03-15 2024-03-15 Image application method and device for generating watermark underground coal mine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410296797.8A CN117893392B (en) 2024-03-15 2024-03-15 Image application method and device for generating watermark underground coal mine

Publications (2)

Publication Number Publication Date
CN117893392A CN117893392A (en) 2024-04-16
CN117893392B true CN117893392B (en) 2024-07-12

Family

ID=90639928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410296797.8A Active CN117893392B (en) 2024-03-15 2024-03-15 Image application method and device for generating watermark underground coal mine

Country Status (1)

Country Link
CN (1) CN117893392B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761459A (en) * 2014-01-24 2014-04-30 中国科学院信息工程研究所 Document multiple digital watermarking insertion method and device, and document multiple digital watermarking extraction method and device
CN112667976A (en) * 2021-03-18 2021-04-16 深圳佳兆业科技集团有限公司 Offline task processing method and device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629316B (en) * 2011-11-25 2013-12-18 浙江外国语学院 Image enhancement method in automatic fingerprint identification technology
CN111461951B (en) * 2020-03-30 2023-10-31 三维通信股份有限公司 Color image encryption method, apparatus, computer device, and readable storage medium
US20230109439A1 (en) * 2021-10-05 2023-04-06 Synamedia Limited Systems, Devices, and Methods for Watermark Embedding
CN114298944A (en) * 2021-12-30 2022-04-08 上海闻泰信息技术有限公司 Image enhancement method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761459A (en) * 2014-01-24 2014-04-30 中国科学院信息工程研究所 Document multiple digital watermarking insertion method and device, and document multiple digital watermarking extraction method and device
CN112667976A (en) * 2021-03-18 2021-04-16 深圳佳兆业科技集团有限公司 Offline task processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN117893392A (en) 2024-04-16

Similar Documents

Publication Publication Date Title
US6823455B1 (en) Method for robust watermarking of content
US7058200B2 (en) Method for the prior monitoring of the detectability of a watermarking signal
US8355525B2 (en) Parallel processing of digital watermarking operations
Gao et al. Reversible data hiding for high dynamic range images using two-dimensional prediction-error histogram of the second time prediction
Xu et al. An improved least-significant-bit substitution method using the modulo three strategy
US7231062B2 (en) Image processing apparatus, image processing system, electronic information apparatus, image processing method, control program, and computer-readable recording medium
Huo et al. A semi-fragile image watermarking algorithm with two-stage detection
He et al. Improved block ordering and frequency selection for reversible data hiding in JPEG images
Qiao et al. Robust steganography resisting JPEG compression by improving selection of cover element
CN113378143B (en) Encryption domain reversible information hiding and authentication method based on half tensor compressed sensing
KR20120070664A (en) System for tracking illegal distributeur and preventing distribution of illegal content and method thereof
Bhautmage et al. Advanced video steganography algorithm
CN111628866B (en) Neural network verification method, device and equipment and readable storage medium
Panchikkil et al. A convolutional neural network model based reversible data hiding scheme in encrypted images with block-wise Arnold transform
Al-Otum et al. Copyright protection of color images for android-based smartphones using watermarking with quick-response code
CN117893392B (en) Image application method and device for generating watermark underground coal mine
Lin et al. Two-layer reversible data hiding based on AMBTC image with (7, 4) Hamming code
CN117556394A (en) APP digital watermark generation method, decoding method, system, equipment and storage medium
Maiorana et al. Multi‐bit watermarking of high dynamic range images based on perceptual models
Lu et al. Multipurpose image watermarking method based on mean-removed vector quantization
CN115314222B (en) Authentication method of electronic license
CN112004148B (en) Video processing method, video processing device, computer equipment and storage medium
US11423506B2 (en) Video frame to frame difference watermarking with drm metadata
JP4107063B2 (en) Encryption information transmission / reception system, transmission / reception method, encryption information embedding program, and encryption information recording apparatus
Hadmi et al. A novel approach for robust perceptual image hashing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant