CN118449925A - Picture processing method, device, terminal equipment and storage medium - Google Patents
Picture processing method, device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN118449925A CN118449925A CN202410413664.4A CN202410413664A CN118449925A CN 118449925 A CN118449925 A CN 118449925A CN 202410413664 A CN202410413664 A CN 202410413664A CN 118449925 A CN118449925 A CN 118449925A
- Authority
- CN
- China
- Prior art keywords
- picture
- result
- sent
- detection
- image
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/06—Message adaptation to terminal or network requirements
- H04L51/063—Content adaptation, e.g. replacement of unsuitable content
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/80—Recognising image objects characterised by unique random patterns
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/19—Recognition using electronic means
- G06V30/19007—Matching; Proximity measures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/07—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
- H04L51/10—Multimedia information
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Facsimiles In General (AREA)
Abstract
The application discloses a picture processing method, a device, terminal equipment and a storage medium, which relate to the field of intelligent detection and are applied to a server, wherein the method comprises the following steps: acquiring a first picture to be transmitted; judging whether the first picture to be transmitted meets preset picture transmission conditions or not; if the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction; and after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result. According to the method and the device for processing the picture, the picture can be processed according to the requirement of the user when the picture is intercepted, so that the picture is sent, and the user experience is improved.
Description
Technical Field
The present invention relates to the field of intelligent detection, and in particular, to a method and apparatus for processing a picture, a terminal device, and a storage medium.
Background
Along with the development and progress of society, social networks and instant messaging applications have become an indispensable part of daily communication and communication of people, through the applications, people can not only keep contact with friends, families and colleagues at any time and any place, but also express self emotion through a picture sharing mode, and the social life of the people is greatly enriched through the convenient and efficient communication mode, and information transmission and communication are promoted, so that in the highly developed background of information transmission, in order to ensure that picture information shared by users accords with the specification and legal requirements, when the pictures shared by the users possibly relate to illegal contents, the server intercepts the pictures, and the pictures cannot be transmitted.
When the user encounters a situation that the picture cannot be sent, in order to enable the user to detect and normally send the illegal contents of the illegal picture through the server, the existing processing mode needs the user to manually edit and process the illegal contents of the illegal picture, and then the user sends the picture to the opposite side again, but when the user encounters a situation that the picture fails to be sent due to the existence of the illegal contents, on one hand, the user does not know what the illegal contents in the picture are, on the other hand, the user is limited by the editing processing level of most users on the picture, and the effect of manually processing the picture by the user is possibly poor.
Disclosure of Invention
The invention mainly aims to provide a picture processing method, a picture processing device, terminal equipment and a storage medium, which can process pictures when the pictures are intercepted so as to finish sending the pictures and improve the experience of users.
In order to achieve the above object, the present invention provides a picture processing method, applied to a server, the method comprising:
acquiring a first picture to be transmitted;
judging whether the first picture to be transmitted meets preset picture transmission conditions or not;
If the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction;
and after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result.
Optionally, the step of acquiring the first picture to be sent includes:
Encrypting the binary data of the first picture to be transmitted to obtain a first encrypted character string;
and associating the first encryption character string with the access link of the first picture to be sent to obtain an association result, and storing the association result into a database.
Optionally, the step of determining whether the first picture to be sent meets a preset picture sending condition includes:
performing two-dimensional code detection on the first picture to be sent to obtain a first detection result;
Performing image text detection on the first picture to be sent to obtain a second detection result;
judging the first detection result and the second detection result;
and if the first detection result and the second detection result are both detection passing, the first picture to be sent meets preset picture sending conditions, and the first picture to be sent is sent.
Optionally, the step of performing two-dimensional code detection on the first picture to be sent to obtain a first detection result includes:
Extracting edge corner features of the first picture to be sent through an image processing technology;
image segmentation is carried out on the first picture to be sent to obtain a segmentation result;
Matching the segmentation result according to a preset two-dimensional code template to obtain a matching result;
and decoding the matching result through a two-dimensional code decoding library to obtain a first detection result, wherein the first detection result comprises passing detection and failing detection.
Optionally, the step of performing image text detection on the first picture to be sent to obtain a second detection result includes:
performing text extraction on the first picture to be sent according to an optical character recognition algorithm to obtain a text extraction result;
matching the text extraction result through a preset word stock to obtain a text detection result;
Extracting image features of the first picture to be sent through a computer vision technology to obtain an image feature extraction result;
analyzing the image feature extraction result to obtain an image detection result;
and obtaining a second detection result according to the text detection result and the image detection result, wherein the second detection result comprises passing detection and non-passing detection.
Optionally, the step of determining the first detection result and the second detection result includes:
if the first detection result is that the detection is not passed, marking the two-dimensional code coordinate position in the first picture to be sent to obtain a two-dimensional code coordinate position marking result, and storing the two-dimensional code coordinate position marking result into a database;
And if the second detection result is that the detection is not passed, marking the text coordinate position and the image coordinate position in the first picture to be sent according to the text detection result and the image detection result to obtain a text coordinate position marking result and an image coordinate position marking result, and storing the text coordinate position marking result and the image coordinate position marking result into a database.
Optionally, the step of processing the first picture to be sent according to a preset picture processing rule and the picture sending condition to obtain a processing result includes:
acquiring a second picture to be sent;
Encrypting the binary data of the second picture to be sent to obtain a second encrypted character string;
inquiring the database according to the second encryption character string, the first detection result and the second detection result, and acquiring a two-dimensional code coordinate position marking result, a text coordinate position marking result and an image coordinate position marking result which correspond to the second encryption character string;
Selecting a target picture from a preset gallery according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result;
And processing the second picture to be transmitted according to the target picture to obtain a picture processing result according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result, and transmitting the picture processing result according to the picture transmitting condition.
The embodiment of the application also provides a picture processing device, which comprises:
the picture acquisition module is used for acquiring a first picture to be sent;
The sending condition judging module is used for judging whether the first picture to be sent meets preset picture sending conditions or not;
The picture interception module is used for intercepting the first picture to be transmitted which does not meet the picture transmission condition and waiting for a user side to transmit a retransmission instruction;
And the picture processing module is used for processing the first picture to be transmitted according to a preset picture processing rule and the picture transmitting condition after receiving the retransmission instruction to obtain a processing result.
The embodiment of the application also provides a terminal device, which comprises a memory, a processor and a picture processing program stored in the memory and capable of running on the processor, wherein the picture processing program realizes the steps of the picture processing method when being executed by the processor.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a picture processing program, and the picture processing program realizes the steps of the picture processing method when being executed by a processor.
The picture processing method, the picture processing device, the terminal equipment and the storage medium provided by the embodiment of the application acquire a first picture to be sent; judging whether the first picture to be transmitted meets preset picture transmission conditions or not; if the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction; after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result, wherein after the server acquires the first picture to be transmitted, the server can judge whether the first picture to be transmitted meets the picture transmission condition, if the first picture to be transmitted does not meet the picture transmission condition, the server can intercept the picture to enable the picture to be incapable of being transmitted, and when a user transmits the instruction for retransmitting the first picture to be transmitted to the server again, the server can process the first picture to be transmitted according to the preset picture processing rule to enable the first picture to meet the picture transmission condition and transmit the picture again.
Drawings
FIG. 1 is a schematic diagram of functional modules of a terminal device to which a picture processing apparatus of the present application belongs;
fig. 2 is a flowchart of a first exemplary embodiment of a picture processing method according to the present application;
FIG. 3 is a schematic diagram of a server intercepting a picture according to the picture processing method of the present application;
FIG. 4 is a flowchart illustrating a second exemplary embodiment of a picture processing method according to the present application;
FIG. 5 is a flowchart illustrating a third exemplary embodiment of a picture processing method according to the present application;
FIG. 6 is a flowchart illustrating a fourth exemplary embodiment of a picture processing method according to the present application;
fig. 7 is a flowchart of a fifth exemplary embodiment of a picture processing method according to the present application;
FIG. 8 is a flowchart of a sixth exemplary embodiment of a picture processing method according to the present application;
fig. 9 is a flowchart of a seventh exemplary embodiment of a picture processing method according to the present application;
Fig. 10 is a general flow chart of the picture processing method of the present application.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The main solutions of the embodiments of the present application are: acquiring a first picture to be transmitted; judging whether the first picture to be transmitted meets preset picture transmission conditions or not; if the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction; after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result, wherein after the server acquires the first picture to be transmitted, the server can judge whether the first picture to be transmitted meets the picture transmission condition, if the first picture to be transmitted does not meet the picture transmission condition, the server can intercept the picture to enable the picture to be incapable of being transmitted, and when a user transmits the instruction for retransmitting the first picture to be transmitted to the server again, the server can process the first picture to be transmitted according to the preset picture processing rule to enable the first picture to meet the picture transmission condition and transmit the picture again.
According to the embodiment, along with the development and progress of society, social networks and instant messaging applications become an indispensable part of daily communication and communication of people, through the applications, people can express their emotion through a picture sharing mode, and share their life point drops, and in order to ensure that picture information shared by users accords with specifications and legal requirements, when pictures shared by users possibly relate to illegal contents, a server intercepts the pictures, so that the pictures cannot be sent, at the moment, the users need to edit and process the illegal contents of the illegal pictures manually and then send the pictures to the other party again, but when the users encounter the situation that the pictures are failed to send due to the existence of the illegal contents, on one hand, the users are not clear what the illegal contents are in the pictures, on the other hand, the effect of manually processing the pictures by the users is possibly poor due to the fact that most of the users have poor editing processing level of the pictures, and therefore the method is very time consuming the user experience and is poor.
Based on this, the embodiment of the application proposes a solution, after the server intercepts the picture which does not meet the picture sending condition, if the user sends the instruction for resending the picture to the server again, the server can process the picture to be sent according to the preset picture processing rule, so that the picture can meet the picture sending condition and resend the picture.
Specifically, referring to fig. 1, fig. 1 is a schematic diagram of functional modules of a terminal device to which the image processing apparatus of the present application belongs. The image processing device may be a device independent of the terminal device and capable of performing data processing, or may be carried on the terminal device in a form of hardware or software.
In this embodiment, the terminal device to which the image processing apparatus belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
The memory 130 stores an operating system and a picture processing program, and acquires a first picture to be sent; judging whether the first picture to be transmitted meets preset picture transmission conditions or not; if the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction; and after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result, wherein the processing result is stored in the memory 130. The output module 110 may be a display screen, a speaker, etc. The communication module 140 may include a WIFI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein the picture processing program in the memory 130 when executed by the processor implements the steps of:
acquiring a first picture to be transmitted;
judging whether the first picture to be transmitted meets preset picture transmission conditions or not;
If the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction;
and after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result.
Further, the picture processing program in the memory 130 when executed by the processor also implements the following steps:
Encrypting the binary data of the first picture to be transmitted to obtain a first encrypted character string;
and associating the first encryption character string with the access link of the first picture to be sent to obtain an association result, and storing the association result into a database.
Further, the picture processing program in the memory 130 when executed by the processor also implements the following steps:
performing two-dimensional code detection on the first picture to be sent to obtain a first detection result;
Performing image text detection on the first picture to be sent to obtain a second detection result;
judging the first detection result and the second detection result;
and if the first detection result and the second detection result are both detection passing, the first picture to be sent meets preset picture sending conditions, and the first picture to be sent is sent.
Further, the picture processing program in the memory 130 when executed by the processor also implements the following steps:
Extracting edge corner features of the first picture to be sent through an image processing technology;
image segmentation is carried out on the first picture to be sent to obtain a segmentation result;
Matching the segmentation result according to a preset two-dimensional code template to obtain a matching result;
and decoding the matching result through a two-dimensional code decoding library to obtain a first detection result, wherein the first detection result comprises passing detection and failing detection.
Further, the picture processing program in the memory 130 when executed by the processor also implements the following steps:
performing text extraction on the first picture to be sent according to an optical character recognition algorithm to obtain a text extraction result;
matching the text extraction result through a preset word stock to obtain a text detection result;
Extracting image features of the first picture to be sent through a computer vision technology to obtain an image feature extraction result;
analyzing the image feature extraction result to obtain an image detection result;
and obtaining a second detection result according to the text detection result and the image detection result, wherein the second detection result comprises passing detection and non-passing detection.
Further, the picture processing program in the memory 130 when executed by the processor also implements the following steps:
if the first detection result is that the detection is not passed, marking the two-dimensional code coordinate position in the first picture to be sent to obtain a two-dimensional code coordinate position marking result, and storing the two-dimensional code coordinate position marking result into a database;
And if the second detection result is that the detection is not passed, marking the text coordinate position and the image coordinate position in the first picture to be sent according to the text detection result and the image detection result to obtain a text coordinate position marking result and an image coordinate position marking result, and storing the text coordinate position marking result and the image coordinate position marking result into a database.
Further, the picture processing program in the memory 130 when executed by the processor also implements the following steps:
acquiring a second picture to be sent;
Encrypting the binary data of the second picture to be sent to obtain a second encrypted character string;
inquiring the database according to the second encryption character string, the first detection result and the second detection result, and acquiring a two-dimensional code coordinate position marking result, a text coordinate position marking result and an image coordinate position marking result which correspond to the second encryption character string;
Selecting a target picture from a preset gallery according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result;
And processing the second picture to be transmitted according to the target picture to obtain a picture processing result according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result, and transmitting the picture processing result according to the picture transmitting condition.
According to the embodiment, through the scheme, the first picture to be sent is obtained; judging whether the first picture to be transmitted meets preset picture transmission conditions or not; if the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction; after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result, wherein after the server acquires the first picture to be transmitted, the server can judge whether the first picture to be transmitted meets the picture transmission condition, if the first picture to be transmitted does not meet the picture transmission condition, the server can intercept the picture to enable the picture to be incapable of being transmitted, and when a user transmits the instruction for retransmitting the first picture to be transmitted to the server again, the server can process the first picture to be transmitted according to the preset picture processing rule to enable the first picture to meet the picture transmission condition and transmit the picture again.
Referring to fig. 2, fig. 2 is a flowchart of a first exemplary embodiment of a picture processing method according to the present application.
An embodiment of the present invention provides a method for processing a picture, including:
Step S10, a first picture to be sent is obtained;
The to-be-transmitted picture refers to a picture which is transmitted to a third party by a user but does not complete the whole transmission process, and the to-be-transmitted picture is a picture in a state between transmitted pictures and unsuccessful transmission.
When a user sends a picture, the picture is uploaded to a server through an interface, at this time, the server can acquire the picture sent by the user and prepare for judging the picture sending condition, and ensure that the picture to be sent meets the picture sending condition, wherein the server can be a computer or a server for providing service, and has the functions of providing service for the user, processing the user request and returning a response to the user.
Specifically, the process of storing the original image sent by the user by the server may include the following steps:
the user sends the original picture: the user selects a picture file to be sent through a client (such as an application program or a webpage), and uploads the picture file to a server through an interface.
The server receives the picture data: the server receives the picture data uploaded by the user, and stores binary data of the picture and access links in a memory.
The server side preprocesses the pictures: the server may perform various preprocessing on the received picture data, such as generating a thumbnail, checking a picture format or size, and the like.
The server side stores the picture: the server may store the received picture data in a preset storage location, such as a hard disk, a database, or cloud storage, and as one implementation manner, the server may store the picture in a specific folder for subsequent access and management.
Specifically, the interface used by the picture uploading server may include:
Application Program Interface (API): communication and data exchange between different components may be achieved by means of calling APIs, e.g. a system call interface provided by an operating system, a Web (page) API provided by a third party service, etc. all belong to the APIs.
Network interface: the network interface refers to an interface of a computer system or a device for communicating with a network, in which the device sends and receives data packets through the network interface, so as to realize connection and data exchange with other devices, and common network interfaces include an ethernet interface, a Wi-Fi interface, a bluetooth interface, and the like.
The method for obtaining the picture specifically used by the server is not specifically limited herein, and the method may be one of the above ways for obtaining the picture to be sent by the server through an HTTP POST request.
Step S30, judging whether the first picture to be transmitted meets preset picture transmission conditions or not;
In order to ensure that the picture information shared by the user accords with the specification and legal requirements, the picture to be transmitted of the user needs to be checked, so that the transmission condition of the picture needs to be set in advance, specifically, the picture transmission condition can be a condition for judging whether the picture is illegal or not, for example, if the preset picture transmission condition is that the picture cannot be provided with a two-dimensional code and illegal words or images, in order to enable the picture to be transmitted of the user to be successfully transmitted, the two-dimensional code and the illegal words or images need to be checked, whether the two-dimensional code or the illegal words or images which can be identified exist in the picture is checked, and the picture can be successfully transmitted to a third party for viewing the picture only after the picture meets the preset picture transmission condition and the picture is checked through a server.
Step S40, if the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a resending instruction;
when the server judges that the picture to be sent does not meet the preset picture sending condition, the server intercepts the picture to be sent and avoids users from spreading pictures which do not meet the regulations.
FIG. 3 is a schematic diagram of a server intercepting a picture according to the picture processing method of the present application;
As shown in fig. 3, when the server detects that the picture does not meet the preset picture sending condition, the server intercepts the picture, so that the picture cannot be successfully sent to the third party, further, when the server intercepts the picture, the server may inform the user that the picture is failed to send, and a "one-key sending" prompt button appears on the left side of the picture message, and waits for the user to send a resending instruction, specifically, when the user clicks the "one-key sending" prompt button, the user sends the picture resending instruction to the server to indicate that the user authorizes the server to process the picture, and at this time, the server may perform subsequent processing on the picture.
Step S50, after receiving the resending instruction, processing the first picture to be sent according to a preset picture processing rule and the picture sending condition to obtain a processing result;
After the user clicks the prompt button of 'one-key sending', the server can process the previously acquired picture to be sent according to the preset picture processing rule and picture sending conditions, so that the picture to be sent meets the preset picture sending conditions and is successfully sent to a third party.
The image processing rule refers to a method for processing an image formulated according to image sending conditions, and it can be understood that the image processed according to the image processing rule can meet the image sending conditions, specifically, the image processing rule can include different types of image processing modes, such as covering, deleting, replacing and the like of illegal contents of the image to be sent.
Specifically, as an implementation manner, when a user sends a picture to be sent for the first time, the server side judges the picture sending condition of the picture to be sent, and in the process of judging the picture to be sent by the server side, the server side records and stores the content of the picture which does not meet the picture sending condition, at this time, the server side intercepts the picture to be sent, when the user clicks a prompt button of 'one-click send', the user can be regarded as hopeing to send the picture to be sent which does not meet the picture sending condition for the second time, and the server side processes the picture according to the previously recorded and stored picture content which does not meet the picture sending condition, so that the picture meets the picture sending condition and finally is successfully sent to a third party.
According to the picture processing method provided by the embodiment of the application, the first picture to be sent is obtained; judging whether the first picture to be transmitted meets preset picture transmission conditions or not; if the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction; after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result, wherein after the server acquires the first picture to be transmitted, the server can judge whether the first picture to be transmitted meets the picture transmission condition, if the first picture to be transmitted does not meet the picture transmission condition, the server can intercept the picture to enable the picture to be incapable of being transmitted, and when a user transmits the instruction for retransmitting the first picture to be transmitted to the server again, the server can process the first picture to be transmitted according to the preset picture processing rule to enable the first picture to meet the picture transmission condition and transmit the picture again.
Referring to fig. 4, fig. 4 is a flowchart of a second exemplary embodiment of a picture processing method according to the present application.
Based on the first embodiment, a second embodiment of the present application is proposed, which differs from the first embodiment in that:
In this embodiment, in step S10, the step of acquiring the first picture to be transmitted further includes:
Step S20, encrypting the binary data of the first picture to be transmitted to obtain a first encrypted character string;
When a user sends a picture to be sent, an application program uploads the picture to be sent to a server through an interface, after the server receives the picture, the server stores an access link of the picture to be sent, and binary data of the picture to be sent is encrypted into a string of character strings with fixed lengths.
Specifically, as one embodiment, the server may encrypt binary data of the picture to be sent into a string with a length of 32 bits by using an MD5 method, and store the string with the length of 32 bits into the database, where MD5 (MESSAGE DIGEST Algorithm 5, version five of the message digest Algorithm) is a one-way cryptographic hash function, which is used to convert data with an arbitrary length into a hash value with a fixed length, and the specific steps may include:
1. the server acquires binary data of the picture to be sent.
2. The binary data is processed using the MD5 algorithm to generate a 128-bit hash value.
3. The 128-bit hash value is converted into a hexadecimal string of length 32 bits.
4. This 32-bit string can be used for transmission or storage as a result of encryption.
Step S21, the first encryption character string is associated with the access link of the first picture to be sent, an association result is obtained, and the association result is stored in a database;
The server associates the previously stored access links of the pictures to be sent with the encrypted character strings, constructs an index or a mapping table of the character strings and the access links, obtains association results of the character strings and the access links of the pictures to be sent, and stores the association results into a database for subsequent data matching.
According to the picture processing method provided by the embodiment of the application, the binary data of the first picture to be sent is encrypted to obtain a first encrypted character string; the first encryption character string is associated with the access link of the first picture to be sent to obtain an association result, the association result is stored in the database, the picture data can be prevented from being leaked or stolen by encrypting binary data of the picture to be sent, and convenient data management and retrieval can be provided by associating and storing the encryption character string with the access link of the picture to be sent, the safety and storage efficiency of the data are improved, and data support is provided for subsequently improving the efficiency of processing the picture.
Referring to fig. 5, fig. 5 is a flowchart of a third exemplary embodiment of a picture processing method according to the present application.
Based on the second embodiment, a third embodiment of the present application is proposed, which differs from the second embodiment in that:
In this embodiment, step S30 is performed to determine whether the first picture to be sent meets a preset picture sending condition, where the step of refining may include:
step S31, performing two-dimensional code detection on the first picture to be sent to obtain a first detection result;
after the server acquires the picture to be transmitted, the server detects the picture to be transmitted and detects whether the picture to be transmitted contains the two-dimensional code for identification.
The server may perform preprocessing on the picture to be sent, so that a subsequent two-dimensional code recognition algorithm may process the picture more accurately, where the preprocessing operation may include format conversion, size adjustment, and the like, after preprocessing the picture to be sent, two-dimensional code detection may be performed on the picture to be sent through an open-source two-dimensional code recognition library, such as ZBar, ZXing, and the like, where the open-source two-dimensional code recognition library provides an interface for recognizing the two-dimensional code, and may return the recognized two-dimensional code content and position information of the two-dimensional code in the picture to be sent.
Step S32, performing image text detection on the first picture to be sent to obtain a second detection result;
after the server side obtains the picture to be sent, the server side detects the image and the text content of the picture to be sent respectively, and detects whether the picture to be sent contains the forbidden words and the forbidden images.
In one embodiment, after preprocessing the picture, the server may detect the image content of the picture to be sent through an image recognition technology, such as a computer vision model or an open source image recognition library, and specifically, the computer vision model or the open source image recognition library can recognize objects, scenes or specific image types (such as pornography, violence, etc.) in the picture based on a deep learning algorithm.
After the server detects the image of the picture to be sent, it is further required to detect text information in the picture to be sent, specifically, the server may use a text analysis technology, such as a natural language processing model or a sensitive word filtering library, to detect text content in the picture to be sent, so as to obtain a second detection result about the image and the text of the picture to be sent.
Step S33, judging the first detection result and the second detection result;
after the server side completes the detection of the picture to be sent and acquires the first detection result and the second detection result, the server side can verify the first detection result and the second detection result.
As an implementation mode, after the server side obtains the first detection result and the second detection result, the server side can carry out result verification on the obtained first detection result and second detection result, check whether the obtained detection result has errors, and if so, the server side can take corresponding corrective measures, such as re-detection, manual auditing and the like, so that the condition that the picture to be sent cannot pass through the picture sending condition and cannot be sent to a third party due to the false detection of the server side is avoided.
Further, after the service end verifies the two detection results and determines that the detection results are correct, the service end can perform combination judgment on the two detection results, wherein after the two detection results are arranged and combined, the two detection results can be divided into four cases, namely: in the first case, the first detection result passes the detection, and the second detection result passes the detection; in the second case, the first detection result passes the detection, and the second detection result does not pass the detection; thirdly, the first detection result is not passed, and the second detection result is passed; and in the fourth case, the first detection result is not passed, and the second detection result is not passed.
Step S36, if the first detection result and the second detection result are both that the detection is passed, the first picture to be sent meets a preset picture sending condition, and the first picture to be sent is sent;
When the server combines the two detection results and judges that the two detection results are both passing (namely, the first condition), the server considers that the picture to be sent meets the picture sending condition, and the server does not intercept the picture to be sent, so that the picture to be sent can be normally sent to a third party.
According to the picture processing method provided by the embodiment of the application, the first detection result is obtained by carrying out two-dimensional code detection on the first picture to be sent; performing image text detection on the first picture to be sent to obtain a second detection result; judging the first detection result and the second detection result; if the first detection result and the second detection result are both detection passing, the first picture to be sent meets preset picture sending conditions, the first picture to be sent is sent, the first detection result and the second detection result can be obtained through the detection of the two-dimension code, the image and the text of the picture to be sent by the server, after the server obtains the two detection results of the picture to be sent, if the two detection results are both detection passing, the server judges that the picture to be sent meets the picture sending conditions, the server sends the picture to be sent, and by the method, the server sends the picture to be sent only when the picture to be sent simultaneously detects the two-dimension code, the image and the text of the picture to be sent by the server, so that the legality of the picture to be sent is guaranteed.
Referring to fig. 6, fig. 6 is a flowchart of a fourth exemplary embodiment of a picture processing method according to the present application.
Based on the third embodiment, a fourth embodiment of the present application is proposed, which differs from the third embodiment in that:
In this embodiment, in step S31, two-dimensional code detection is performed on the first picture to be sent, so as to obtain a first detection result, and the step of refining may include:
Step S311, extracting edge corner features of the first picture to be sent through an image processing technology;
the server side can extract edge and corner features of the picture to be sent through an image processing technology, and the features can help to identify specific areas in the picture.
Specifically, the step of extracting edge and corner features of the picture to be transmitted by the image processing technology may include:
Detecting the edge of the picture to be sent: the edge of the picture is a place where the gray values in the image change rapidly, and the edge detection is a place where the gray values in the image change obviously, and the edge detection algorithm including a Sobel operator, a Prewitt operator, a Canny edge detector and the like can be used for detecting the edge of the image to determine the boundary of the picture.
The Sobel operator is a derivative-based edge detection algorithm, and the algorithm can carry out convolution operation on the image in the horizontal and vertical directions and then calculate gradient amplitude and direction to obtain an edge result.
The Canny edge detector is a multi-stage edge detection algorithm that detects edges in images by gaussian filtering, gradient computation, non-maximum suppression and double thresholding.
Performing corner detection on a picture to be sent: the corner points are points with very obvious gray level change of local areas in the image, and the corner points of the picture to be sent can be detected through Harris corner detection and Shi-Tomasi corner detection isocenter detection algorithms, so that a plurality of corner points in the picture to be sent can be determined.
The Harris corner detection is a method based on local image gray level change, and whether a pixel point is a corner or not is judged by utilizing gradient information of an image.
Step S312, image segmentation is carried out on the first picture to be sent, and a segmentation result is obtained;
because the whole picture to be sent is used as an integral object for two-dimensional code detection, the difficulty of detection is increased, the calculated amount and the time complexity are increased, and therefore after the edge corner feature extraction is carried out on the picture to be sent, the picture to be sent can be segmented, two-dimensional code detection and recognition are carried out more intensively, and the processing efficiency and accuracy are improved.
After the server side performs edge corner feature extraction on the picture to be sent, the server side can divide pixels in the picture to be sent according to the extraction result so as to divide the picture to be sent into different areas, thereby improving the detection accuracy and efficiency of the two-dimensional code.
Step S313, matching the segmentation result according to a preset two-dimensional code template to obtain a matching result;
After the server performs image segmentation on the image to be transmitted, the server can perform two-dimensional code matching on the segmented image through the template, and as an implementation manner, the server can perform two-dimensional code matching on the segmented image through the prepared two-dimensional code template, and the two-dimensional code matching process can help the server to determine whether a region similar to the template exists in the segmented image, so that whether the region similar to the two-dimensional code structure exists in the image to be transmitted is further confirmed, and a matching result is obtained, wherein the matching result can comprise position coordinates of a suspected two-dimensional code region.
Step S314, decoding the matching result through a two-dimensional code decoding library to obtain a first detection result, wherein the first detection result comprises passing detection and failing detection;
In order to prevent the picture from being unable to pass through the two-dimensional code detection of the server side due to the fact that the two-dimensional code cannot be identified in the picture to be sent, when the server side finds that a region similar to the two-dimensional code structure exists in the picture to be sent, the server side needs to decode the two-dimensional code in the region, if the region cannot be successfully decoded by the server side and information is read, the region can be judged to be an unrecognizable two-dimensional code region, and the region can be detected through the two-dimensional code of the server side.
Specifically, after the server side completes matching the two-dimensional codes of the segmented images to obtain a matching result, the server side decodes the matching result through a preset two-dimensional code decoding library to obtain a first detection result.
As an implementation manner, once the server finds out the areas of the two-dimensional codes possibly contained in the split image, the server decodes the two-dimensional codes through a special two-dimensional code decoding library, wherein the two-dimensional code decoding library used by the server can comprise ZBar and ZXi ng, and the two-dimensional code decoding library can identify and decode various types of two-dimensional codes and output information contained in the two-dimensional codes.
If the server side successfully decodes the two-dimensional code of the region and outputs the information contained in the two-dimensional code, the region cannot pass the two-dimensional code detection of the server side, and the first detection result is that the detection fails.
According to the picture processing method provided by the embodiment of the application, the edge corner feature extraction is carried out on the first picture to be sent through an image processing technology; image segmentation is carried out on the first picture to be sent to obtain a segmentation result; matching the segmentation result according to a preset two-dimensional code template to obtain a matching result; the matching result is decoded through the two-dimensional code decoding library, a first detection result is obtained, the first detection result comprises passing detection and failing detection, by the method, the server can match and decode the two-dimensional codes of each image segmentation area in the picture to be transmitted, and the detection speed of the identifiable two-dimensional codes in the picture to be transmitted is improved.
Referring to fig. 7, fig. 7 is a flowchart of a fifth exemplary embodiment of a picture processing method according to the present application.
Based on the fourth embodiment, a fifth embodiment of the present application is proposed, which differs from the fourth embodiment in that:
in this embodiment, in step S32, image and text detection is performed on the first picture to be sent to obtain a second detection result, and the step of refining may include:
step S321, performing text extraction on the first picture to be sent according to an optical character recognition algorithm to obtain a text extraction result;
As an implementation manner, before the service end performs text extraction on the picture to be sent, the service end may perform preprocessing on the picture to be sent to facilitate subsequent text extraction, specifically, preprocessing operations may include graying, binarizing, denoising and the like on an image, after the service end completes preprocessing on the picture to be sent, the service end identifies the position of the character in the picture and performs character segmentation on the character, after character positioning and character segmentation, at the moment, each character is already extracted, then the characters are identified and converted into text data readable by a computer by using an optical character recognition algorithm, finally, character integration is performed, special symbols in the text data are removed, the text format in the text data is unified, and text extraction on the picture to be sent is completed.
Step S322, matching the text extraction result through a preset word stock to obtain a text detection result;
After the server side finishes text extraction of the picture to be sent, the server side performs text matching on the text extraction result through a preset word stock to obtain a text detection result, wherein the preset word stock is used for storing a series of words, phrases or modes which are determined to be bad, illegal or sensitive, and an operator can formulate and update the word stock according to local laws and regulations and platform regulations so as to be used for filtering and auditing text contents extracted from the picture to be sent.
Specifically, the step of performing text matching on the text extraction result by the server through a preset word stock may include:
Loading a dictionary: the server loads a preset word stock and stores sensitive words, phrases or modes in the word stock into a memory so as to facilitate subsequent matching operation.
Word segmentation: the text information extracted from the picture to be sent is subjected to word segmentation processing, and is divided into individual words, so that subsequent word matching with words in a word stock is facilitated, and particularly, word segmentation processing can be performed by using an open-source Chinese word segmentation tool such as jieba, snownlp.
Matching operation: the server matches the text after word segmentation with a preset word stock, inquires whether the extracted text information contains sensitive words, phrases or modes in the word stock, and the inquiry process can be realized by adopting algorithms based on regular expressions, AC automata, trie and the like.
And (3) outputting results: and outputting the final matched result for generating a text detection result, wherein if the forbidden words are matched, the server side judges that the text contains forbidden contents, the generated text detection result is that the detection is not passed, and if the server side does not match the forbidden words in the word stock in the extracted text information, the generated text detection result is that the detection is passed.
Step S323, extracting the image features of the first picture to be sent through a computer vision technology to obtain an image feature extraction result;
The server side extracts the image of the picture to be sent through a computer vision technology, specifically, the server side can extract the color features, texture features and shape features of the image, and combines the features to finally obtain an image feature extraction result;
The color features refer to the attributes such as the distribution and the intensity of the colors in the image, the texture features refer to the attributes such as the distribution and the shape of the textures in the image, the shape features refer to the attributes such as the shape and the outline of the objects in the image, and the server side can be helped to acquire the image detection result of the image to be sent through extracting the image features.
As an implementation manner, the server may extract color features, texture features and shape features in the image respectively by the following ways:
The server divides the color space of the image into a plurality of discrete color intervals (such as 256 intervals), then counts the number of pixels of each color interval in the image to obtain a histogram representing color distribution, extraction of the color features of the image is completed, and specifically, the color histogram can be calculated through OpenCV.
The service end compares the gray values of the pixel points and the neighborhood pixels, compares the neighborhood pixel values with the central pixel values to generate a binary number, and converts the binary number into a decimal number serving as a characteristic value of the pixel points to obtain texture characteristics of the image.
The server finds the outline of the object in the image by using an outline detection algorithm, describes the shape characteristics of the outline by using a characteristic descriptor (such as Hu moment), and obtains the shape characteristics of the image.
The server side can obtain an image feature extraction result according to the obtained color features, texture features and shape features.
Step S324, analyzing the image feature extraction result to obtain an image detection result;
After the server side finishes extracting the image features of the picture to be sent to obtain an image feature extraction result, the server side analyzes the image feature extraction result to obtain an image detection result.
Specifically, the server judges the image feature extraction result, for example, the server analyzes visual elements in the image, such as bare skin, pornography scene, and the like, according to the image feature extraction result, judges whether the image to be sent contains an illegal image area, and then, the server can also confirm the secondary illegal content of the suspected illegal image area by combining the context, so as to avoid misjudging the normal image area.
Further, after the server side completes the judgment of the image feature extraction result, the server side can obtain an image detection result according to the judgment result, if the server side judges that the image has illegal contents, the image detection result output by the server side is that the detection is not passed, and otherwise, the detection is passed.
Step S325, obtaining a second detection result according to the text detection result and the image detection result, wherein the second detection result comprises passing detection and non-passing detection;
The server performs combination judgment on the acquired text detection result and image detection result to obtain a second detection result, specifically, if the server judges that the text detection result and the image detection result are both passing through detection, the second detection result obtained by the server is passing through detection, if the server judges that any one of the text detection result and the image detection result is not passing through detection, the second detection result obtained by the server is not passing through detection, after the server acquires the second detection result, the server can perform combination judgment on the second detection result and the first detection result and further process the picture to be sent according to the combination judgment result.
According to the picture processing method provided by the embodiment of the application, text extraction is carried out on the first picture to be sent according to an optical character recognition algorithm, so that a text extraction result is obtained; matching the text extraction result through a preset word stock to obtain a text detection result; extracting image features of the first picture to be sent through a computer vision technology to obtain an image feature extraction result; analyzing the image feature extraction result to obtain an image detection result; according to the text detection result and the image detection result, a second detection result is obtained, wherein the second detection result comprises passing detection and failing detection, by the method, the server can detect characters and images of the picture to be sent to obtain the text detection result and the image detection result, the accuracy of the server in detecting the picture to be sent is improved, and according to the result, the server can obtain a second detection result which can be used as a processing basis of the picture to be sent subsequently, so that the picture to be sent subsequently can be processed conveniently.
Referring to fig. 8, fig. 8 is a flowchart of a sixth exemplary embodiment of a picture processing method according to the present application.
Based on the fifth embodiment, a sixth embodiment of the present application is proposed, which differs from the fifth embodiment in that:
in this embodiment, in step S33, after determining the first detection result and the second detection result, the method further includes:
Step S34, if the first detection result is that the detection is not passed, marking the coordinate position of the two-dimensional code in the first picture to be sent to obtain a two-dimensional code coordinate position marking result, and storing the two-dimensional code coordinate position marking result into a database;
After the server side completes the two-dimensional code detection of the picture to be sent and obtains the first detection result, if the first detection result is that the detection is not passed, the server side can mark the two-dimensional code coordinate position in the picture to be sent according to the coordinate information about the two-dimensional code area in the matching result obtained in the two-dimensional code detection process, so as to obtain a two-dimensional code coordinate position marking result and store the two-dimensional code position marking result in a database, and the picture can be processed according to the marking result when the picture is processed later.
Step S35, if the second detection result is that the detection is not passed, marking a text coordinate position and an image coordinate position in the first picture to be sent according to the text detection result and the image detection result to obtain a text coordinate position marking result and an image coordinate position marking result, and storing the text coordinate position marking result and the image coordinate position marking result into a database;
After the server side completes the image text detection of the picture to be sent and obtains the second detection result, if the second detection result is that the detection is not passed, the server side can carry out position marking on the illegal image or text information in the picture to be sent according to the text detection result and the image detection result, respectively obtain a text coordinate position marking result and an image coordinate position marking result, and store the marking result into a database.
Specifically, as an implementation manner, in the process of performing image text detection on the image to be sent, if the server determines that the text extraction result or the detection result of the image detection result is failed, the server may perform coordinate marking on the illegal image area and text information in the corresponding detection process, and after the server completes the image text detection process of the entire image to be sent, obtain a second detection result, store the result of the coordinate marking in the database.
According to the picture processing method provided by the embodiment of the application, the first detection result is obtained by carrying out two-dimensional code detection on the first picture to be sent; performing image text detection on the first picture to be sent to obtain a second detection result; judging the first detection result and the second detection result; if the first detection result is that the detection is not passed, marking the two-dimensional code coordinate position in the first picture to be sent to obtain a two-dimensional code coordinate position marking result, and storing the two-dimensional code coordinate position marking result into a database; if the second detection result is that the detection is not passed, marking the text coordinate position and the image coordinate position in the first picture to be sent according to the text detection result and the image detection result to obtain a text coordinate position marking result and an image coordinate position marking result, and storing the text coordinate position marking result and the image coordinate position marking result into a database; if the first detection result and the second detection result are both detection passing, the first picture to be sent meets preset picture sending conditions, and the first picture to be sent is sent.
Referring to fig. 9, fig. 9 is a flowchart of a seventh exemplary embodiment of a picture processing method according to the present application.
Based on the sixth embodiment, a seventh embodiment of the present application is proposed, which differs from the sixth embodiment in that:
In this embodiment, in step S50, after receiving the retransmission instruction, the first picture to be sent is processed according to a preset picture processing rule and the picture sending condition, so as to obtain a processing result, and the step of refining may include:
Step S51, obtaining a second picture to be sent;
when the server receives the retransmission instruction sent by the user side, the server acquires a second picture to be sent, wherein the second picture to be sent is a picture which is intercepted without passing through a picture sending condition, and understandably, the picture sent by the user for the first time is a first picture to be sent, and when the picture is intercepted, the user sends the retransmission instruction to the server, and the picture sent by the user side is the second picture to be sent.
Step S52, encrypting the binary data of the second picture to be sent to obtain a second encrypted character string;
The encryption method is the same as that of step S20, the server also needs to encrypt binary data of the second picture to be sent, that is, when the user sends the picture to be sent, the application program uploads the picture to be sent to the server through the interface, after the server receives the picture, the server stores an access link of the picture to be sent, encrypts binary data of the picture to be sent into a string of a fixed length, and it should be noted that the manner of encrypting the second picture to be sent by the server is the same as that of encrypting the first picture to be sent by the server, and the server encrypts the first picture to be sent and the second picture to be sent into a string of the same length, so that the subsequent picture matching is facilitated.
Step S53, inquiring the database according to the second encrypted character string, the first detection result and the second detection result, and obtaining a two-dimensional code coordinate position marking result, a text coordinate position marking result and an image coordinate position marking result which correspond to the second encrypted character string;
After the server encrypts the second picture to be sent to obtain a second encrypted character string, the server inquires a first encrypted character string corresponding to the second encrypted character string in a database according to the second encrypted character string, acquires an access link corresponding to the first encrypted character string, and inquires a two-dimensional code coordinate position marking result, a text coordinate position marking result and an image coordinate position marking result which are stored in advance in the database according to a first detection result and a second detection result through the access link.
Step S54, selecting a target picture from a preset gallery according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result;
The server side queries a corresponding target picture from a preset gallery according to the queried two-dimensional code coordinate position marking result, text coordinate position marking result and image coordinate position marking result, specifically, as an implementation manner, the server side can calculate the area of the area according to the coordinate position result to obtain the area of the target area, and query a target picture corresponding to the area in the preset gallery according to the calculated area of the target area, wherein the target picture can be used for subsequently processing the second picture to be sent.
Step S55, processing the second picture to be sent according to the target picture according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result, obtaining a picture processing result, and sending the picture processing result according to the picture sending condition;
After the server side obtains the target picture, the server side can process the second picture to be sent according to the target picture to enable the second picture to meet the picture sending condition, specifically, the server side can cover the target picture in an illegal two-dimensional code area, an image area and a text information area in the second picture to be sent according to a two-dimensional code coordinate position marking result, a text coordinate position marking result and an image coordinate position marking result and by combining a first detection result and a second detection result, and a new picture which can be sent successfully is generated.
In another embodiment, the server may query, in the gallery, a picture similar to the second picture to be sent in style according to the hue and the content of the two-dimensional code area, the image area, and the text information area, to process the second picture to be sent, thereby reducing the difference between the generated new picture and the second picture to be sent.
After the server side finishes processing the second picture to be sent, the server side can automatically send the picture according to the original sending logic, wherein the picture sending according to the original sending logic refers to sending the picture according to the original sending object and the sending mode, and the cracking sense caused by sending the picture for the second time is reduced.
According to the picture processing method provided by the embodiment of the application, the second picture to be sent is obtained; encrypting the binary data of the second picture to be sent to obtain a second encrypted character string; inquiring the database according to the second encryption character string, the first detection result and the second detection result, and acquiring a two-dimensional code coordinate position marking result, a text coordinate position marking result and an image coordinate position marking result which correspond to the second encryption character string; selecting a target picture from a preset gallery according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result; according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result, the second picture to be sent is processed according to the target picture to obtain a picture processing result, and the picture processing result is sent according to the picture sending condition.
Referring to fig. 10, fig. 10 is a general flow chart of the picture processing method according to the present application.
As shown in fig. 10, when a sender (user side) uploads an original picture (a first picture to be sent) to a server side, the server side detects whether the original picture uploaded by the sender is illegal and encrypts the picture to obtain an md5 value of the picture, if the server side detects that the original picture is not illegal (meets a picture sending condition), the server side sends the original picture to a receiver (a third party), if the server side detects that the original picture is illegal (does not meet a picture sending condition), the server side stores the type of the violation and the position of an illegal region of the original picture according to the detection result of the original picture, and correlates the stored result with the md5 value of the previous picture, further, the server side intercepts the original picture to make the sending of the original picture fail, and after the server side receives a retransmission instruction of the sender, the server side inquires the type of the violation and the position of the illegal region corresponding to the md5 value of the second picture, and sends the picture to the receiver again according to the type of the violation and the position of the illegal region, and finally sends the new picture to the receiver.
In addition, an embodiment of the present application further provides a picture processing apparatus, where the picture processing apparatus includes:
the picture acquisition module is used for acquiring a first picture to be sent;
The sending condition judging module is used for judging whether the first picture to be sent meets preset picture sending conditions or not;
The picture interception module is used for intercepting the first picture to be transmitted which does not meet the picture transmission condition and waiting for a user side to transmit a retransmission instruction;
And the picture processing module is used for processing the first picture to be transmitted according to a preset picture processing rule and the picture transmitting condition after receiving the retransmission instruction to obtain a processing result.
The principle and implementation process of the image processing in this embodiment are referred to the above embodiments, and are not repeated herein.
In addition, the embodiment of the application also provides a terminal device, which comprises a memory, a processor and a picture processing program stored on the memory and capable of running on the processor, wherein the picture processing program realizes the steps of the picture processing method when being executed by the processor.
Because the image processing program is executed by the processor and adopts all the technical schemes of all the embodiments, the image processing program at least has all the beneficial effects brought by all the technical schemes of all the embodiments and is not described in detail herein.
In addition, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a picture processing program, and the picture processing program realizes the steps of the picture processing method when being executed by a processor.
Because the image processing program is executed by the processor and adopts all the technical schemes of all the embodiments, the image processing program at least has all the beneficial effects brought by all the technical schemes of all the embodiments and is not described in detail herein.
Compared with the prior art, the picture processing method provided by the embodiment of the application obtains the first picture to be sent; judging whether the first picture to be transmitted meets preset picture transmission conditions or not; if the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction; after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result, wherein after the server acquires the first picture to be transmitted, the server can judge whether the first picture to be transmitted meets the picture transmission condition, if the first picture to be transmitted does not meet the picture transmission condition, the server can intercept the picture to enable the picture to be incapable of being transmitted, and when a user transmits the instruction for retransmitting the first picture to be transmitted to the server again, the server can process the first picture to be transmitted according to the preset picture processing rule to enable the first picture to meet the picture transmission condition and transmit the picture again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. A picture processing method, wherein the method is applied to a server, the method comprising:
acquiring a first picture to be transmitted;
judging whether the first picture to be transmitted meets preset picture transmission conditions or not;
If the first picture to be sent does not meet the picture sending condition, intercepting the first picture to be sent and waiting for a user side to send a retransmission instruction;
and after receiving the retransmission instruction, processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result.
2. The picture processing method as claimed in claim 1, wherein the step of acquiring the first picture to be transmitted comprises, after:
Encrypting the binary data of the first picture to be transmitted to obtain a first encrypted character string;
and associating the first encryption character string with the access link of the first picture to be sent to obtain an association result, and storing the association result into a database.
3. The picture processing method as claimed in claim 2, wherein the step of judging whether the first picture to be transmitted satisfies a preset picture transmission condition comprises:
performing two-dimensional code detection on the first picture to be sent to obtain a first detection result;
Performing image text detection on the first picture to be sent to obtain a second detection result;
judging the first detection result and the second detection result;
and if the first detection result and the second detection result are both detection passing, the first picture to be sent meets preset picture sending conditions, and the first picture to be sent is sent.
4. The picture processing method as claimed in claim 3, wherein the step of performing two-dimensional code detection on the first picture to be transmitted to obtain a first detection result includes:
Extracting edge corner features of the first picture to be sent through an image processing technology;
image segmentation is carried out on the first picture to be sent to obtain a segmentation result;
Matching the segmentation result according to a preset two-dimensional code template to obtain a matching result;
and decoding the matching result through a two-dimensional code decoding library to obtain a first detection result, wherein the first detection result comprises passing detection and failing detection.
5. The picture processing method as claimed in claim 4, wherein the step of performing image text detection on the first picture to be transmitted to obtain a second detection result comprises:
performing text extraction on the first picture to be sent according to an optical character recognition algorithm to obtain a text extraction result;
matching the text extraction result through a preset word stock to obtain a text detection result;
Extracting image features of the first picture to be sent through a computer vision technology to obtain an image feature extraction result;
analyzing the image feature extraction result to obtain an image detection result;
and obtaining a second detection result according to the text detection result and the image detection result, wherein the second detection result comprises passing detection and non-passing detection.
6. The picture processing method as claimed in claim 5, wherein the step of judging the first detection result and the second detection result comprises:
if the first detection result is that the detection is not passed, marking the two-dimensional code coordinate position in the first picture to be sent to obtain a two-dimensional code coordinate position marking result, and storing the two-dimensional code coordinate position marking result into a database;
And if the second detection result is that the detection is not passed, marking the text coordinate position and the image coordinate position in the first picture to be sent according to the text detection result and the image detection result to obtain a text coordinate position marking result and an image coordinate position marking result, and storing the text coordinate position marking result and the image coordinate position marking result into a database.
7. The picture processing method as claimed in claim 6, wherein the step of processing the first picture to be transmitted according to a preset picture processing rule and the picture transmission condition to obtain a processing result comprises:
acquiring a second picture to be sent;
Encrypting the binary data of the second picture to be sent to obtain a second encrypted character string;
inquiring the database according to the second encryption character string, the first detection result and the second detection result, and acquiring a two-dimensional code coordinate position marking result, a text coordinate position marking result and an image coordinate position marking result which correspond to the second encryption character string;
Selecting a target picture from a preset gallery according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result;
And processing the second picture to be transmitted according to the target picture to obtain a picture processing result according to the two-dimensional code coordinate position marking result, the text coordinate position marking result and the image coordinate position marking result, and transmitting the picture processing result according to the picture transmitting condition.
8. A picture processing apparatus, characterized in that the picture processing apparatus comprises:
the picture acquisition module is used for acquiring a first picture to be sent;
The sending condition judging module is used for judging whether the first picture to be sent meets preset picture sending conditions or not;
The picture interception module is used for intercepting the first picture to be transmitted which does not meet the picture transmission condition and waiting for a user side to transmit a retransmission instruction;
And the picture processing module is used for processing the first picture to be transmitted according to a preset picture processing rule and the picture transmitting condition after receiving the retransmission instruction to obtain a processing result.
9. A terminal device comprising a memory, a processor and a picture processing program stored on the memory and executable on the processor, which picture processing program when executed by the processor implements the steps of the picture processing method according to any of claims 1-7.
10. A computer readable storage medium, wherein a picture processing program is stored on the computer readable storage medium, which when executed by a processor, implements the steps of the picture processing method according to any of claims 1-7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410413664.4A CN118449925A (en) | 2024-04-08 | 2024-04-08 | Picture processing method, device, terminal equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410413664.4A CN118449925A (en) | 2024-04-08 | 2024-04-08 | Picture processing method, device, terminal equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118449925A true CN118449925A (en) | 2024-08-06 |
Family
ID=92327135
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410413664.4A Pending CN118449925A (en) | 2024-04-08 | 2024-04-08 | Picture processing method, device, terminal equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118449925A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118588228A (en) * | 2024-08-09 | 2024-09-03 | 西南医科大学附属医院 | Stroke data reporting method, device, storage medium and program product |
-
2024
- 2024-04-08 CN CN202410413664.4A patent/CN118449925A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118588228A (en) * | 2024-08-09 | 2024-09-03 | 西南医科大学附属医院 | Stroke data reporting method, device, storage medium and program product |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9805296B2 (en) | Method and apparatus for decoding or generating multi-layer color QR code, method for recommending setting parameters in generation of multi-layer QR code, and product comprising multi-layer color QR code | |
| KR102038214B1 (en) | Method of obtaining account information, terminal, server and system | |
| US9047385B1 (en) | Interactive barcodes | |
| CN106982307B (en) | Data transmission method and data transmission device | |
| WO2022156178A1 (en) | Image target comparison method and apparatus, computer device and readable storage medium | |
| CN118449925A (en) | Picture processing method, device, terminal equipment and storage medium | |
| CN113905001B (en) | Automatic reply method, device, computer equipment and readable storage medium | |
| US8478035B2 (en) | Method and apparatus for engaging functionality with a color tag | |
| CN113449829B (en) | Data transmission method and related device based on optical character recognition technology | |
| US11442982B2 (en) | Method and system for acquiring data files of blocks of land and of building plans and for making matches thereof | |
| CN111401367A (en) | Character detection method, device, equipment and medium based on federal OCR model | |
| CN106357682A (en) | Phishing website detecting method | |
| CN113688658A (en) | Object recognition method, device, equipment and medium | |
| CN113011254A (en) | Video data processing method, computer equipment and readable storage medium | |
| JP6127227B1 (en) | Image processing apparatus, image processing method, and program | |
| CN111428620B (en) | Identity recognition method, device, equipment and medium based on federated liveness detection model | |
| US20160315886A1 (en) | Network information push method, apparatus and system based on instant messaging | |
| CN112597529A (en) | Multimedia content processing method and device, storage medium and electronic equipment | |
| CN108875748B (en) | Method, device and computer readable medium for generating wireless access point information | |
| WO2020199393A1 (en) | Anti-counterfeiting system and anti-counterfeiting method | |
| CN109214224B (en) | Risk identification method and device for information coding | |
| KR102396885B1 (en) | Method for alligning the image include the text | |
| CN112580762B (en) | Dynamic two-dimensional code and identification method and identification device thereof | |
| KR101741829B1 (en) | Method of identifying terminals and apparatus thereof | |
| WO2024000572A1 (en) | Method and system for efficiently transmitting some information located in a scene |
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 |