CN113489791B - Image uploading method, image processing method and related devices - Google Patents

Image uploading method, image processing method and related devices Download PDF

Info

Publication number
CN113489791B
CN113489791B CN202110766892.6A CN202110766892A CN113489791B CN 113489791 B CN113489791 B CN 113489791B CN 202110766892 A CN202110766892 A CN 202110766892A CN 113489791 B CN113489791 B CN 113489791B
Authority
CN
China
Prior art keywords
image
sub
description
communication interface
interface protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110766892.6A
Other languages
Chinese (zh)
Other versions
CN113489791A (en
Inventor
田之进
熊逢杲
尹尧
史智博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Huazhiyuan Information Engineering Co ltd
Guangzhou Huajia Software Co ltd
PCI Technology Group Co Ltd
PCI Technology and Service Co Ltd
Original Assignee
Guangdong Huazhiyuan Information Engineering Co ltd
Guangzhou Huajia Software Co ltd
PCI Technology Group Co Ltd
PCI Technology and Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Huazhiyuan Information Engineering Co ltd, Guangzhou Huajia Software Co ltd, PCI Technology Group Co Ltd, PCI Technology and Service Co Ltd filed Critical Guangdong Huazhiyuan Information Engineering Co ltd
Priority to CN202110766892.6A priority Critical patent/CN113489791B/en
Publication of CN113489791A publication Critical patent/CN113489791A/en
Application granted granted Critical
Publication of CN113489791B publication Critical patent/CN113489791B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Facsimiles In General (AREA)

Abstract

The embodiment of the invention provides an image uploading method, an image processing method and a related device, which are applied to a security check machine and a graph judging platform, wherein the security check machine and the graph judging platform are provided with a communication interface protocol, the communication interface protocol prescribes a message field number of an image uploading service, description information required by uploading an image and a description mode of the description information, after the image to be uploaded is divided into sub-images, the security check machine determines the description value of each description information according to the description mode by determining the description information of the sub-images, the message field number is packed in a packet header, the description value and the sub-images are packed in the packet header to obtain a data packet, the graph judging platform analyzes the data packet, the received data packet is determined to be the data packet of the sub-images through the message field number in the packet header, the description mode of the description information in the communication interface protocol is analyzed to obtain the description information, and the received sub-images are spliced by the description information to obtain a target image.

Description

Image uploading method, image processing method and related devices
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to an image uploading method, an image processing method and a related device.
Background
In urban rail transit, baggage articles are generally scanned by a security inspection machine, images obtained by scanning are subjected to image judgment to identify contraband articles, and because passenger flow of each station in different operation periods is different, image judgment workload of each station in different operation periods can be quite different.
However, since the security inspection machines at each station may belong to different manufacturers and different models, that is, the interfaces are different, the data output by each security inspection machine has larger difference, in order to solve the problem, currently, in view of VGA (Video GRAPHICS ARRAY ) being a unified interface, the baggage scanning picture is intercepted from the VGA output interface at the security inspection machine end, and the picture is converted into a digital image and then uploaded to the image judging platform.
However, the VGA interface signal is easily disturbed to cause image damage, and color information in the pseudo-color band substance information is easily lost and distorted when the image is converted into a digital image, so that the accuracy of the graph judgment result is reduced.
Disclosure of Invention
The embodiment of the invention provides an image uploading method, an image processing method and a related device, which are used for solving the problems that the image quality is damaged and the accuracy of judging a graph is reduced due to the fact that the interfaces of the existing security inspection machines are different and the image uploading platform is subjected to screenshot from a VGA output interface.
In a first aspect, an embodiment of the present invention provides an image uploading method, including:
Dividing a target image to be uploaded into a plurality of sub-images;
acquiring first description information of the sub-images, wherein the first description information is information of a description item appointed by an image uploading service in a preset communication interface protocol, and the first description information is used for indicating that a plurality of sub-images are spliced to obtain the target image;
Determining a first message field number of the image uploading service, and determining a first description value of the first description information, wherein the first message field number is a field number set for the image uploading service in the communication interface protocol, and the first description value is a value obtained according to a description mode set for the first description information in the communication interface protocol;
According to the packaging format of the data packet in the communication interface protocol, packaging the first message field number in a packet head, and packaging the sub-image and the first description value in a packet body to obtain the data packet of the sub-image;
and uploading the data packet to a graph judging platform, wherein the graph judging platform is used for analyzing the data packet according to the communication interface protocol so as to splice the sub-image into the target image.
Optionally, the communication interface protocol includes a message field number of a handshake request service, and before the dividing the target image to be uploaded into the plurality of sub-images, the communication interface protocol further includes:
Generating a handshake request message based on the communication interface protocol, wherein a packet head of the handshake request message comprises a message field number of a handshake request service, and a packet body of the handshake request message comprises security check machine information;
Sending a handshake request message to a graph judging platform, wherein the graph judging platform is used for generating a handshake response message when receiving the handshake request message;
And when a handshake response message sent by the graph judging platform is received, determining that the handshake is successful.
Optionally, the communication interface protocol includes an upload service type, a service field number of the upload service type, description information of data required by each upload service type, and a description mode of the description information;
the determining the first message field number of the image uploading service includes:
Searching a first message field number of an image uploading service in the communication interface protocol;
the determining the first description value of the first description information includes:
a first description value of the first description information is determined based on a description manner of the first description information in the communication interface protocol.
Optionally, the first description information includes a device serial number of a security check machine generating the sub-image, a sub-image format, a sub-image serial number, whether the sub-image is a last sub-image of the target image, a security check machine running direction, a scanning view angle, an image width, an image height, and an image size.
Optionally, the image uploading method further includes:
Obtaining original data, and obtaining second description information of the original data, wherein the original data is scanning ray energy data of the security inspection machine for generating the target image, the second description information is information of description items specified for an original data uploading service in a preset communication interface protocol,
Determining a second message field number of the original data uploading service, and determining a second description value of the second description information, wherein the second message field number is a field number set for the original data uploading service in the communication interface protocol, and the second description value is a value obtained according to a description mode set for the second description information in the communication interface protocol;
According to the packaging format of the data packet in the communication interface protocol, packaging the second message field number in a packet head, and packaging the original data and the second description value in a packet body to obtain the data packet of the original data;
Uploading the data packet of the original data to a graph judging platform, wherein the graph judging platform is used for analyzing the data packet of the original data according to the communication interface protocol to obtain the original data.
In a second aspect, an embodiment of the present invention provides an image processing method, including:
Receiving a data packet sent by a security inspection machine, wherein the data packet comprises a packet head and a packet body;
parsing the data packet to extract a message field number from a header of the data packet;
When the message field number is a field number set by an image uploading service in a preset communication interface protocol, extracting a sub-image and a first description value from the bag body;
And splicing the received sub-images according to the first description value to obtain a target image.
Optionally, the image uploading method further includes:
when a handshake request message sent by the security inspection machine is received, a handshake response message is generated based on the communication interface protocol, wherein the packet head of the handshake response message comprises a message field number of a handshake response service, and the packet body of the handshake response message comprises a version number of a graph judging platform;
And sending the handshake response message to the security check machine.
Optionally, the stitching the received sub-images according to the first description value to obtain a target image includes:
Determining first description information corresponding to the first description value in the communication interface protocol according to a description mode, wherein the first description information comprises a device serial number, a sub-image format, a sub-image serial number, whether the sub-image is the last sub-image of a target image, a security inspection machine running direction, a scanning visual angle, an image width, an image height and an image size of a security inspection machine generating the sub-image;
Acquiring a sub-image sent by a security inspection machine of the same equipment serial number;
and when the received sub-image is determined to be the last sub-image, the received sub-image is spliced to obtain a target image according to the running direction, the scanning visual angle and the sub-image serial number of the security inspection machine.
Optionally, the image uploading method further includes:
When the message field number is a field number set by an original data uploading service in a preset communication interface protocol, extracting original data and a second description value from the bag body;
Determining second description information corresponding to the second description value in the communication interface protocol according to a description mode, wherein the second description information comprises a device serial number of a security check machine for generating the original data, a graph judging mode, a file name of the original data and time for generating the original data;
Determining a target image generated based on the original data according to the equipment serial number and the file name of the security inspection machine;
And carrying out image processing on the target image based on the original data.
In a third aspect, an embodiment of the present invention further provides an image uploading apparatus, including:
The image segmentation module is used for segmenting the target image to be uploaded into a plurality of sub-images;
the first descriptive information acquisition module is used for acquiring first descriptive information of the sub-images, wherein the first descriptive information is information of descriptive items appointed by an image uploading service in a preset communication interface protocol, and the first descriptive information is used for indicating that a plurality of sub-images are spliced to obtain the target image;
A first message field number and a first description value determining module, configured to determine a first message field number of the image upload service, and determine a first description value of the first description information, where the first message field number is a field number set for the image upload service in the communication interface protocol, and the first description value is a value obtained according to a description manner set for the first description information in the communication interface protocol;
The image packaging module is used for packaging the message field number in a packet head according to the packaging format of the data packet in the communication interface protocol, and packaging the sub-image and the first packet in the packet head to obtain the data packet of the sub-image;
And the image uploading module is used for uploading the data packet to a graph judging platform, and the graph judging platform is used for analyzing the data packet according to the communication interface protocol so as to splice the received sub-image into the target image.
Optionally, the image uploading device further includes:
The handshake request message generation module is used for generating a handshake request message based on the communication interface protocol, wherein the packet head of the handshake request message comprises a message field number of a handshake request service, and the packet body of the handshake request message comprises security check machine information;
the device comprises a handshake request message sending module, a graph judging platform and a message sending module, wherein the handshake request message sending module is used for sending handshake request messages to the graph judging platform, and the graph judging platform is used for generating handshake response messages when the handshake request messages are received.
And the handshake success confirmation module is used for determining handshake success when receiving the handshake response message sent by the graph judging platform.
Optionally, the communication interface protocol includes an upload service type, a service field number of the upload service type, description information of data required by each upload service type, and a description mode of the description information;
Optionally, the first message field number and first description value determining module includes:
A first message field number searching sub-module, configured to search a first message field number of an image upload service in the communication interface protocol;
and the first descriptive value searching sub-module is used for determining a first descriptive value of the first descriptive information based on the descriptive mode of the first descriptive information in the communication interface protocol.
Optionally, the first description information includes a device serial number of a security check machine generating the sub-image, a sub-image format, a sub-image serial number, whether the sub-image is a last sub-image of the target image, a security check machine running direction, a scanning view angle, an image width, an image height, and an image size.
Optionally, the image uploading device further includes:
The system comprises an original data acquisition module, a security inspection machine and a data processing module, wherein the original data acquisition module is used for acquiring original data and second description information of the original data, the original data is scanning ray energy data of the security inspection machine for generating the target image, and the second description information is information of a description item specified for an original data uploading service in a preset communication interface protocol;
A second message field number and a second description value determining module, configured to determine a second message field number of the original data upload service, and determine a second description value of the second description information, where the second message field number is a field number set for the original data upload service in the communication interface protocol, and the second description value is a value obtained according to a description manner set for the second description information in the communication interface protocol;
The original data packaging module is used for packaging the second message field number in a packet head according to the packaging format of a data packet in the communication interface protocol, and packaging the original data and the second description value in a packet body to obtain a data packet of the original data;
The image judging platform is used for analyzing the data packet of the original data according to the communication interface protocol to obtain the original data.
In a fourth aspect, an embodiment of the present invention further provides an image processing apparatus, including:
the data packet receiving module is used for receiving the data packet sent by the security check machine;
the message field number analyzing module is used for analyzing the data packet so as to extract a message field number from the packet head of the data packet;
The image and first description value extraction module is used for extracting a sub-image and a first description value from the bag body when the message field number is a field number set by an image uploading service in a preset communication interface protocol;
And the sub-image splicing module is used for splicing the received sub-images according to the first description value to obtain a target image.
Optionally, the image processing apparatus further includes:
The handshake response message generation module is used for generating handshake response messages based on the communication interface protocol when handshake request messages sent by the security check machine are received, wherein the packet heads of the handshake response messages comprise message field numbers of handshake response services, and the packet bodies of the handshake response messages comprise version numbers of a graph judging platform;
And the handshake response message sending module is used for sending the handshake response message to the security check machine.
Optionally, the sub-image stitching module includes:
The first descriptive information confirming sub-module is used for confirming first descriptive information corresponding to the first descriptive value in the communication interface protocol according to a descriptive mode, wherein the first descriptive information comprises a device serial number of a security inspection machine for generating the sub-image, a sub-image format, a sub-image serial number, whether the sub-image is the last sub-image of a target image, a security inspection machine running direction, a scanning visual angle, an image width, an image height and an image size;
The sub-image acquisition sub-module is used for acquiring sub-images sent by the security check machine of the same equipment serial number;
And the sub-image splicing sub-module is used for splicing the received sub-images according to the running direction, the scanning visual angle and the sub-image serial number of the security inspection machine to obtain a target image when the received sub-images are determined to be the last sub-image.
Optionally, the image processing apparatus further includes:
the original data and second description value extraction module is used for extracting the original data and the second description value from the bag body when the field number of the message is a preset field number of the original data uploading service setting in a communication interface protocol;
The second descriptive information confirming module is used for confirming second descriptive information corresponding to the second descriptive value in the communication interface protocol according to a descriptive mode, wherein the second descriptive information comprises a device serial number of a security check machine for generating the original data, a graph judging mode, a file name of the original data and time for generating the original data;
the target image confirming module is used for determining a target image generated based on the original data according to the equipment serial number and the file name of the security inspection machine;
And the image processing module is used for carrying out image processing on the target image based on the original data.
In a fifth aspect, embodiments of the present invention further provide a computer apparatus, the computer apparatus including:
one or more processors;
A memory for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the image upload method as described in the first aspect and/or the image processing method as described in the second aspect.
In a sixth aspect, an embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the image uploading method according to the first aspect and/or the image processing method according to the second aspect.
The security inspection machine and the image judging platform are configured with a communication interface protocol, the communication interface protocol prescribes a message field number of an image uploading service, description information required during uploading an image and a description mode of the description information, after the image to be uploaded is divided into sub-images, the security inspection machine determines the description information of the sub-images, determines description values of the description information according to the description mode of the description information in the communication interface protocol, packages the message field number in a packet header, packages the description values and the sub-images in a packet body to obtain a data packet, and then sends the data packet to the image judging platform, so that the image judging platform analyzes the data packet after receiving the data packet, determines that the received data packet is the data packet of the sub-images through the message field number in the packet header, then analyzes the description value in the packet body through the description mode of the description information in the communication interface protocol to obtain the description information, and splices the received sub-images through the description information to obtain a target image. The security inspection machine can directly pack the sub-image according to the communication interface protocol and upload the sub-image to the image judging platform when forming the pseudo-color image, so that the problem that the color information of the pseudo-color band substance information is lost and distorted due to uploading the sub-image to the image judging platform after the VGA output interface is captured is solved, the image judging platform can receive high-quality images, and the accuracy of identifying forbidden objects according to the images is improved.
Drawings
Fig. 1 is a flowchart of an image uploading method according to a first embodiment of the present invention;
fig. 2 is a flowchart of an image uploading method according to a second embodiment of the present invention;
Fig. 3 is a flowchart of an image processing method according to a third embodiment of the present invention;
Fig. 4 is a schematic structural diagram of an image uploading device according to a fourth embodiment of the present invention;
Fig. 5 is a schematic structural diagram of an image processing apparatus according to a fifth embodiment of the present invention;
Fig. 6 is a schematic structural diagram of a computer device according to a sixth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of an image uploading method provided in an embodiment of the present invention, where the embodiment is applicable to a case where a security inspection machine uploads an image to a graph judging platform, the method may be performed by an image uploading device, and the image uploading device may be implemented by software and/or hardware, and may be configured in the security inspection machine, for example, a control host of the security inspection machine, and the image uploading method may include the following steps:
S101, dividing a target image to be uploaded into a plurality of sub-images.
After the security inspection machine irradiates the luggage items through X-rays, the residual X-rays passing through the luggage items are received by the receiver, the receiver transmits the capability value of the residual X-rays to the control host for imaging processing to obtain pseudo-color images, and in one scene, if the luggage items passing through the security inspection machine are relatively large, if a certain number of threshold values are reached, a certain number of pseudo-color images are required to be selected from the pseudo-color images and uploaded to the image judging platform, the image judging platform is used for identifying contraband items from the pseudo-color images, and the selected pseudo-color images are target images.
In order to achieve both network bandwidth and real-time performance, a pseudo-color image obtained by a security inspection machine once can be used as a sub-image, and a pseudo-color image obtained by the security inspection machine after being scanned for many times can be used as a sub-image.
S102, acquiring first description information of the sub-images, wherein the first description information is information of description items appointed by an image uploading service in a preset communication interface protocol, and the first description information is used for indicating that a plurality of sub-images are spliced to obtain the target image.
The communication interface protocol of the embodiment of the invention can refer to a protocol complied with by data transmission between the security inspection machine and the graph judging platform, and in particular, in the embodiment of the invention, the communication interface protocol defines a packet header, a packet body of data package, description information of the transmitted data and a description mode of the description information. The communication interface protocol of the embodiment of the present invention defines a packet format of a data packet, where the packet header format is shown in table 1 below:
TABLE 1
The data service corresponding to the message field number is defined in the communication interface protocol, and the specific details are as follows in table 2:
TABLE 2
Message field number Data service Direction of transmission
0x00010003 Handshake request message Safety inspection machine- > graph judging platform
0x00020003 Handshake response message Picture judging platform- > security inspection machine
0x00010004 Sub-image upload Safety inspection machine- > graph judging platform
0x00060001 Original data upload Safety inspection machine- > graph judging platform
0x00060002 Original data retransmission Safety inspection machine- > graph judging platform
0x00020002 Original data retransmission response Picture judging platform- > security inspection machine
In an optional embodiment, before S101, the security check machine and the graph judging platform further need to perform a handshake to determine whether both parties support the communication interface protocol according to the embodiment of the present invention, specifically, the security check machine may generate a handshake request message based on the communication interface protocol, a packet header of the handshake request message includes a message field number of a handshake request service, a packet body of the handshake request message includes security check machine information, the security check machine sends the handshake request message to the graph judging platform, the graph judging platform generates a handshake response message when receiving the handshake request message and sends the handshake response message to the security check machine, and the security check machine determines that the handshake is successful when receiving the handshake response message sent by the graph judging platform.
In the communication interface protocol, the handshake request message is defined as follows in table 3:
TABLE 3 Table 3
When the security check machine sends a handshake request message to the graph judging platform, the data service is the handshake request message, as shown in table 2, the message field number of the handshake request message is 0x00010003, and the security check machine information can comprise a manufacturer, a model, a version number, a graph judging mode and a device serial number, and the definition of each security check machine information in a bag body is as shown in the table. After receiving the handshake request message, the graph judging platform analyzes the packet body through the table 3 to obtain security check machine information, determines whether to handshake or not through the security check machine information, and if yes, when sending a handshake response message to the security check machine, the data service is the handshake response message, and the message field number of the handshake response message is 0x00020003 as shown in the table 2.
After the handshake between the security check machine and the graph judging platform is successful, the description information of each sub-image can be obtained, wherein the description information is information of a description item specified by an image uploading service in a preset communication interface protocol, and the first description information is used for indicating that a plurality of sub-images are spliced to obtain a target image, specifically, in the communication interface protocol of the embodiment of the invention, the description item of the image uploading service is as follows in table 4:
TABLE 4 Table 4
For each sub-image, description information corresponding to the description item in table 4 can be obtained, the description information can indicate the image judging platform to splice sub-images, for example, the sub-image serial number indicates the position of the sub-image in the target image, and a plurality of sub-images can be spliced according to the sub-image serial number to obtain the target image.
In an alternative embodiment, the communication interface protocol of the embodiment of the present invention allows uploading sub-images scanned multiple times, that is, the image width may be set in table 4, and the image width may be an integer multiple of the single scanning width of the security inspection machine, so that the data uploading efficiency may be improved.
S103, determining a first message field number of the image uploading service and a first description value of the first description information, wherein the first message field number is a field number set for the image uploading service in the communication interface protocol, and the first description value is a value obtained according to a description mode set for the first description information in the communication interface protocol;
The communication interface protocol includes an upload service type, a service field number of the upload service type, description information of data required by each upload service type and a description mode of the description information, the first message field number of the image upload service can be searched in the communication interface protocol, and a first description value of the first description information is determined based on the description mode of the first description information in the communication interface protocol, wherein the description value can be a value obtained after describing the description information according to the description mode, as shown in the table 4, 1 represents jpg,2 represents png, and the description value 1 represents that the format of the image is jpg.
As shown in table 2, the message field number of the sub-image upload is 0x00010004, and as shown in table 4, the description information of the sub-image upload includes the equipment serial number of the security inspection machine generating the sub-image, the sub-image format, the sub-image serial number, whether the sub-image is the last sub-image of the target image, the security inspection machine running direction, the scanning view angle, the image width, the image height and the image size, and the description value of each item of description information can be determined by the description manner in table 4.
S104, according to the packing format of the data packet in the communication interface protocol, packing the first message field number in a packet head, and packing the sub-image and the first description value in a packet body to obtain the data packet of the sub-image.
After the message field number of the sub-image uploading service and the description values of various description information are acquired, the message field number may be packaged in a packet header, the description values and the data of the sub-image are packaged in a packet body, and the following is an example of a data packet:
s105, uploading the data packet to a graph judging platform, wherein the graph judging platform is used for analyzing the data packet according to the communication interface protocol so as to splice the received sub-image into the target image.
After the security inspection machine packages the sub-images, the data packet can be sent to the image judging platform through a network, the image judging platform receives the data packet and unpacks the data packet, if the message field number in the packet header is the field number of the image uploading service, the received image data packet is indicated, the description value and the sub-images of the sub-images can be analyzed from the packet body, the description value is interpreted through a communication interface protocol to obtain the description information of the sub-images, and therefore the sub-images can be spliced according to the description information to obtain the target images, for example, the running direction, the scanning view angle of the security inspection machine and the sequence number of the sub-images in the target images can be obtained through interpretation of the description value, and therefore the target images are obtained through the running direction, the scanning view angle and the sequence number splicing of the sub-images in the target images.
The security inspection machine and the image judging platform are configured with a communication interface protocol, the communication interface protocol prescribes a message field number of an image uploading service, description information required during uploading an image and a description mode of the description information, after the image to be uploaded is divided into sub-images, the security inspection machine determines the description information of the sub-images, determines description values of the description information according to the description mode of the description information in the communication interface protocol, packages the message field number in a packet header, packages the description values and the sub-images in a packet body to obtain a data packet, and then sends the data packet to the image judging platform, so that the image judging platform analyzes the data packet after receiving the data packet, determines that the received data packet is the data packet of the sub-images through the message field number in the packet header, analyzes the description value in the packet body to obtain the description information through the description mode of the description information in the communication interface protocol, and splices the received sub-images according to the description information to obtain a target image. The security inspection machine can directly pack the sub-image according to the communication interface protocol and upload the sub-image to the image judging platform when forming the pseudo-color image, so that the problem that the color information of the pseudo-color band substance information is lost and distorted due to uploading the sub-image to the image judging platform after the VGA output interface is captured is solved, the image judging platform can receive high-quality images, and the accuracy of identifying forbidden objects according to the images is improved.
In an alternative embodiment of the invention, after the image judging platform splices the target image, the target image can be input into a pre-trained neural network model to obtain a contraband identification result, and the identification result is returned to the security inspection machine, so that the image judging platform identifies the contraband for the target image, the image judging time can be shortened, the subjective influence of human image judgment can be reduced, the accuracy and efficiency of image judging can be improved, and the operation labor cost can be reduced.
In another alternative embodiment, after the image judging platform splices the target image, the image judging platform can inquire the load states of other security inspection machines so as to send the target image to the security inspection machine with the idle load state or the low load state for image judging, and receive the image judging result of the security inspection machine, so that uniform distribution of image judging work is realized, each security inspection machine is reasonably utilized, the image judging workload of a station where the current security inspection machine is positioned is reduced, the image judging work plumpness of the other security inspection machines is improved, and the labor cost is integrally saved.
Example two
Fig. 2 is a flowchart of an image uploading method according to a second embodiment of the present invention, where the first embodiment is based on the first embodiment, and further adds an operation of uploading original data, and the method specifically includes the following steps:
S201, dividing a target image to be uploaded into a plurality of sub-images.
S202, acquiring first description information of the sub-images, wherein the first description information is information of description items appointed by an image uploading service in a preset communication interface protocol, and the first description information is used for indicating that a plurality of sub-images are spliced to obtain the target image.
S203, determining a first message field number of the image uploading service, and determining a first description value of the first description information, wherein the first message field number is a field number set for the image uploading service in the communication interface protocol, and the first description value is a value obtained according to a description mode set for the first description information in the communication interface protocol.
S204, according to the packing format of the data packet in the communication interface protocol, packing the first message field number in a packet head, and packing the sub-image and the first description value in a packet body to obtain the data packet of the sub-image.
S205, uploading the data packet to a graph judging platform, wherein the graph judging platform is used for analyzing the data packet according to the communication interface protocol so as to splice the sub-image into the target image.
The above-mentioned S201 to S205 are the same as S101 to S105 in the first embodiment, and are not described in detail here for avoiding repetition.
S206, acquiring original data, and acquiring second description information of the original data, wherein the original data is scanning ray energy data of the security inspection machine for generating the target image, and the second description information is information of a description item specified for an original data uploading service in a preset communication interface protocol.
In the embodiment of the invention, besides uploading the pseudo-color image to the image judging platform, the security inspection machine can also upload original data to the image judging platform, wherein the original data can be scanning ray energy data of the security inspection machine for generating the target image, namely energy data of residual X rays after the X rays on the security inspection machine penetrate through the luggage.
The following table 5, the communication interface protocol of the embodiment of the present invention defines the description items of the original data:
After the original data is obtained, description information corresponding to the description item in table 5 can be obtained, the description information can instruct the image judging platform to correlate the original data with the target image based on the description information, and the original data is adopted to carry out image processing on the target image, for example, the target image and the original data of the same security inspection machine can be searched through the equipment serial number and the file name.
S207, determining a second message field number of the original data uploading service, and determining a second description value of the second description information, wherein the second message field number is a field number set for the original data uploading service in the communication interface protocol, and the second description value is a value obtained according to a description mode set for the second description information in the communication interface protocol.
In an optional embodiment, the communication interface protocol includes an upload service type, a service field number of the upload service type, description information of data required by each upload service type, and a description manner of the description information, and the second message field number of the original data upload service may be searched in the communication interface protocol, and the second description value of the second description information may be determined based on the description manner of the second description information in the communication interface protocol.
The message field number of the original data uploading is defined as 0x00060001 in the above table 2, the description item of the original data uploading is defined as in table 5, the description item of the original data uploading comprises generating the equipment serial number, the current picture judging mode, the original data file name, the scanning time and the original data size of the original security check machine, and the description value of the description information of each description item can be determined by the description mode in table 5.
S208, according to the packing format of the data packet in the communication interface protocol, packing the second message field number in a packet head, and packing the original data and the second description value in a packet body to obtain the data packet of the original data.
After the message field number of the original data uploading service and the description value of each item of description information are obtained, the message field number may be packaged in a packet header, the description value and the original data are packaged in a packet body, and the following is an example of a data packet:
Identifier(s) Message field number Data size Water flow number Bag body
XATA 0x00060001 Descriptive value + raw data
S209, uploading the data packet of the original data to a graph judging platform, wherein the graph judging platform is used for analyzing the data packet of the original data according to the communication interface protocol to obtain the original data.
And after packaging the original data, the security inspection machine sends the packaged original data to a graph judging platform through a network, and the graph judging platform analyzes the data packet according to a communication interface protocol, specifically, analyzes the data packet according to the tables 2 and 5 to obtain the original data.
In an alternative embodiment, after the image judging platform analyzes the original data, the target image uploaded by the security inspection machine with the same equipment serial number can be searched according to the equipment serial number and the file name in the description information of the original data, the target image corresponding to the original data is matched through the file name, and the original data is adopted to carry out image processing on the target image, for example, an image processing interface of the security inspection machine can be remotely called to convert the target image into a black-white image and a color image, and the processing such as contrast, brightness, noise removal and the like can be adjusted, so that the image quality is improved, and finally the accuracy of image judging can be improved.
The security inspection machine and the image judging platform are configured with a communication interface protocol, the communication interface protocol prescribes a message field number of an image uploading service, description information required during uploading an image and a description mode of the description information, after the image to be uploaded is divided into sub-images, the security inspection machine determines the description information of the sub-images, determines description values of the description information according to the description mode of the description information in the communication interface protocol, packages the message field number in a packet header, packages the description values and the sub-images in a packet body to obtain a data packet, and then sends the data packet to the image judging platform, so that the image judging platform analyzes the data packet after receiving the data packet, determines that the received data packet is the data packet of the sub-images through the message field number in the packet header, then analyzes the description value in the packet body through the description mode of the description information in the communication interface protocol to obtain the description information, and splices the received sub-images through the description information to obtain a target image. The security inspection machine can directly pack the sub-image according to the communication interface protocol and upload the sub-image to the image judging platform when forming the pseudo-color image, so that the problem that the color information of the pseudo-color band substance information is lost and distorted due to uploading the sub-image to the image judging platform after the VGA output interface is captured is solved, the image judging platform can receive high-quality images, and the accuracy of identifying forbidden objects according to the images is improved.
Furthermore, the security inspection machine can pack and upload the original data to the image judging platform based on the communication interface protocol, so that the image judging platform can process the target image through the original data, the quality of the target image is improved, and the accuracy of image judgment is improved.
Example III
Fig. 3 is a flowchart of an image processing method provided in a third embodiment of the present invention, where the embodiment is applicable to a situation that a graph judging platform receives an image uploaded by a security inspection machine, the method may be performed by an image processing apparatus, and the image uploading apparatus may be implemented by software and/or hardware, and may be configured on the graph judging platform, and specifically includes the following steps:
s301, receiving a data packet sent by the security check machine.
The data packet may be an image packet, an original data packet, a handshake request packet, etc., sent by the security check machine. In an alternative embodiment of the invention, after the connection between the graph judging platform and the security inspection machine is established, the security inspection machine and the graph judging platform handshake first, the graph judging platform can receive a handshake request message sent by the security inspection machine, the graph judging platform can generate a handshake response message based on a communication interface protocol, the packet header of the handshake response message comprises a message field number of a handshake response service, and the packet body of the handshake response message comprises a version number of the graph judging platform.
As shown in table 1 in the first embodiment, table 1 is a packet header defined in a communication interface protocol, table 2 defines a data service corresponding to a message field number, for example, a handshake request message service field number is 0x00010003, and table 3 defines security check machine information included in a packet body of the handshake request message. The security check machine may generate a handshake request message based on tables 1,2 and 3 and send the handshake request message to the graph judging platform. The graph judging platform analyzes the handshake request message based on the tables 1,2 and 3 to obtain information such as a manufacturer, a model, a version number, a graph judging mode, a device serial number and the like of the security inspection machine.
Meanwhile, the image judging platform can generate a handshake response message, the message field number in the packet header of the handshake response message is the field number (0 x 00020003) of the handshake response message in table 2, the packet body comprises the version number of the image judging platform, after the security inspection machine receives the data packet of the handshake response message, the packet header is analyzed to determine that the data packet is the handshake response data packet, the security inspection machine and the image judging platform handshake successfully, and the security inspection machine can upload images to the image judging platform.
Step 302, parsing the data packet to extract a message field number from a header of the data packet.
Specifically, in the first embodiment, the packet header structure shown in table 1 includes a message field number, and as shown in table 2, is a data service corresponding to the message field number, and the graph judging platform first analyzes the packet header of the received data packet to obtain the message field number.
Step 303, when the message field number is a field number set by an image uploading service in a preset communication interface protocol, extracting a sub-image and a first description value from the packet body.
Specifically, after extracting the message field number from the packet header, the graph judging platform can determine that the data packet is a data packet of the image uploading service if the message field number is a field number set by the image uploading service in a preset communication interface protocol, specifically, can search the message field number of the image uploading service in the communication interface protocol, as shown in a chart 2, and can extract the sub-image and the first description value from the packet body of the data packet if the message field number in the packet header of the data packet is 0x00010004, which indicates that the data packet is the data packet of the sub-image uploading.
And step 304, splicing the received sub-images according to the first description value to obtain a target image.
In an optional embodiment, first description information corresponding to the first description value may be determined in a communication interface protocol according to a description manner, where the first description information includes a device serial number of a security check machine generating the sub-image, a sub-image format, a sub-image serial number, whether the sub-image is a last sub-image of the target image, a security check machine running direction, a scanning view angle, an image width, an image height, and an image size;
as shown in table 4 in the first embodiment, after extracting the description values from the bag body, each description value may be interpreted in the description manner in table 4 to obtain the description information of the sub-image, and the sub-images are spliced by the description information to obtain the target image.
In an alternative embodiment, the sub-images sent by the security inspection machine with the same equipment serial number can be obtained, and when the received sub-image is determined to be the last sub-image, the received sub-images are spliced to obtain the target image according to the running direction, the scanning visual angle and the sub-image serial number of the security inspection machine. In one example, the sub-images 1-5 are sub-images sent by a security inspection machine with the same equipment serial number, and the description information of the sub-images 1-5 has the image running direction from left to right and the scanning view angle from side view, so that the target images can be spliced in sequence from left to right according to the serial numbers of the sub-images.
The security inspection machine and the image judging platform are configured with a communication interface protocol, the communication interface protocol prescribes a message field number of an image uploading service, description information required during uploading an image and a description mode of the description information, after a data packet is received, the image judging platform analyzes the data packet to extract the message field number from a packet header of the data packet, and when the message field number is a field number set by the image uploading service in a preset communication interface protocol, a sub-image and a first description value are extracted from a packet body, and a target image is obtained by splicing the received sub-image according to the description information corresponding to the first description value. The security inspection machine can directly pack the sub-images according to the communication interface protocol and upload the sub-images to the image judgment platform when the pseudo-color images are formed, solves the problem that color information of the pseudo-color strip material information is lost and distorted due to uploading the sub-images to the image judgment platform after the VGA output interface is captured, enables the image judgment platform to receive high-quality images, and improves the accuracy of identifying forbidden articles according to the images.
In an alternative embodiment of the invention, after the image judging platform splices the target image, the target image can be input into a pre-trained neural network model to obtain a contraband identification result, and the identification result is returned to the security inspection machine, so that the image judging platform identifies the contraband to the target image, the image judging time can be shortened, the subjective influence of human image judgment can be reduced, the accuracy and efficiency of image judging can be improved, and the overall operation labor cost can be reduced.
In another alternative embodiment, after the image judging platform splices the target image, the image judging platform can inquire the load states of other security inspection machines so as to send the target image to the security inspection machine with the idle load state or the low load state for image judging, and receive the image judging result of the security inspection machine, so that uniform distribution of image judging work is realized, each security inspection machine is reasonably utilized, the image judging workload of a station where the current security inspection machine is positioned is reduced, the image judging plumpness of the work of the other security inspection machines is improved, and meanwhile, the labor cost is saved.
In another optional embodiment of the present invention, if the message field number extracted from the header of the data packet is not good as the field of the image upload service, the data service corresponding to the message field number may be determined through table 2, when the message field number is the field number set by the original data upload service in the preset communication interface protocol, the original data and the second description value are extracted from the packet body, the second description information corresponding to the second description value is determined in the communication interface protocol according to the description manner, the second description information includes the equipment serial number of the security check machine generating the original data, the graph judging mode, the file name of the original data, the time of generating the original data, the target image generated based on the original data is determined according to the equipment serial number and the file name of the security check machine, and the image processing is performed on the target image based on the original data.
Specifically, the security inspection machine may further generate original data, where the original data may be scan radiation energy data of the security inspection machine for generating the target image, that is, energy data of residual X-rays of the security inspection machine after the X-rays penetrate through the luggage item, and the security inspection machine may package the original data to the graph-determining platform according to the communication interface protocol of the embodiment of the present invention, after the graph-determining platform receives the data packet, if it is determined that the message field number in the packet header is the message field number 0X00060001 in table 2, it is determined that the received data packet is the data packet uploaded by the original data, and may extract a description value in the packet body of the data packet, and interpret each description value in a description manner in table 5 to obtain description information of the original data, for example, obtain description information such as a device serial number, a file name, etc. of the security inspection machine that uploads the original data packet.
In an alternative embodiment, after the image judging platform analyzes the original data, the target image uploaded by the security inspection machine with the same equipment serial number can be searched according to the equipment serial number and the file name in the description information of the original data, the target image corresponding to the original data is matched through the file name, and the original data is adopted to carry out image processing on the target image, for example, an image processing interface of the security inspection machine can be remotely called to convert the target image into a black-white image and a color image, and the processing such as contrast, brightness, noise removal and the like can be adjusted, so that the image quality is improved, and finally the accuracy of image judging can be improved.
Example IV
Fig. 4 is a block diagram of an image uploading device according to a fourth embodiment of the present invention, and as shown in fig. 4, the image uploading device according to the embodiment of the present invention may specifically include the following modules:
An image segmentation module 401, configured to segment a target image to be uploaded into a plurality of sub-images;
A first description information obtaining module 402, configured to obtain first description information of the sub-images, where the first description information is information of a description item specified by an image uploading service in a preset communication interface protocol, and the first description information is used to instruct to splice multiple sub-images to obtain the target image;
a first message field number and first description value determining module 403, configured to determine a first message field number of the image upload service, and determine a first description value of the first description information, where the first message field number is a field number set for the image upload service in the communication interface protocol, and the first description value is a value obtained according to a description manner set for the first description information in the communication interface protocol;
An image packing module 404, configured to pack the message field number in a packet header according to a packing format of a data packet in the communication interface protocol, and pack the sub-image and the first description value in a packet body to obtain a data packet of the sub-image;
and the image uploading module 405 is configured to upload the data packet to a graph judging platform, where the graph judging platform is configured to parse the data packet according to the communication interface protocol so as to splice the received sub-image into the target image.
Optionally, the image uploading device further includes:
The handshake request message generation module is used for generating a handshake request message based on the communication interface protocol, wherein the packet head of the handshake request message comprises a message field number of a handshake request service, and the packet body of the handshake request message comprises security check machine information;
the device comprises a handshake request message sending module, a graph judging platform and a message sending module, wherein the handshake request message sending module is used for sending handshake request messages to the graph judging platform, and the graph judging platform is used for generating handshake response messages when the handshake request messages are received.
And the handshake success confirmation module is used for determining handshake success when receiving the handshake response message sent by the graph judging platform.
Optionally, the communication interface protocol includes an upload service type, a service field number of the upload service type, description information of data required by each upload service type, and a description mode of the description information;
optionally, the first message field number and first description value determining module 403 includes:
A first message field number searching sub-module, configured to search a first message field number of an image upload service in the communication interface protocol;
and the first descriptive value searching sub-module is used for determining a first descriptive value of the first descriptive information based on the descriptive mode of the first descriptive information in the communication interface protocol.
Optionally, the first description information includes a device serial number of a security check machine generating the sub-image, a sub-image format, a sub-image serial number, whether the sub-image is a last sub-image of the target image, a security check machine running direction, a scanning view angle, an image width, an image height, and an image size.
Optionally, the image uploading device further includes:
The system comprises an original data acquisition module, a security inspection machine and a data processing module, wherein the original data acquisition module is used for acquiring original data and second description information of the original data, the original data is scanning ray energy data of the security inspection machine for generating the target image, and the second description information is information of a description item specified for an original data uploading service in a preset communication interface protocol;
A second message field number and a second description value determining module, configured to determine a second message field number of the original data upload service, and determine a second description value of the second description information, where the second message field number is a field number set for the original data upload service in the communication interface protocol, and the second description value is a value obtained according to a description manner set for the second description information in the communication interface protocol;
The original data packaging module is used for packaging the second message field number in a packet head according to the packaging format of a data packet in the communication interface protocol, and packaging the original data and the second description value in a packet body to obtain a data packet of the original data;
The image judging platform is used for analyzing the data packet of the original data according to the communication interface protocol to obtain the original data.
The image uploading device provided by the embodiment of the invention can execute the image uploading method provided by the first embodiment and the second embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 5 is a block diagram of a structure of a image processing apparatus according to a fifth embodiment of the present invention, and as shown in fig. 5, the image processing apparatus according to the embodiment of the present invention may specifically include the following modules:
the data packet receiving module 501 is configured to receive a data packet sent by the security check machine;
A message field number parsing module 502, configured to parse the data packet to extract a message field number from a header of the data packet;
An image and first description value extracting module 503, configured to extract a sub-image and a first description value from the packet body when the field number of the message is a field number set by an image upload service in a preset communication interface protocol;
and the sub-image stitching module 504 is configured to stitch the received sub-images according to the first description value to obtain a target image.
Optionally, the image processing apparatus further includes:
The handshake response message generation module is used for generating handshake response messages based on the communication interface protocol when handshake request messages sent by the security check machine are received, wherein the packet heads of the handshake response messages comprise message field numbers of handshake response services, and the packet bodies of the handshake response messages comprise version numbers of a graph judging platform.
And the handshake response message sending module is used for sending the handshake response message to the security check machine.
Optionally, the sub-image stitching module 504 includes
The first descriptive information confirming sub-module is used for confirming first descriptive information corresponding to the first descriptive value in the communication interface protocol according to a descriptive mode, wherein the first descriptive information comprises a device serial number of a security inspection machine for generating the sub-image, a sub-image format, a sub-image serial number, whether the sub-image is the last sub-image of a target image, a security inspection machine running direction, a scanning visual angle, an image width, an image height and an image size;
The sub-image acquisition sub-module is used for acquiring sub-images sent by the security check machine of the same equipment serial number;
And the sub-image splicing sub-module is used for splicing the received sub-images according to the running direction, the scanning visual angle and the sub-image serial number of the security inspection machine to obtain a target image when the received sub-images are determined to be the last sub-image.
Optionally, the image processing apparatus further includes:
the original data and second description value extraction module is used for extracting the original data and the second description value from the bag body when the field number of the message is a preset field number of the original data uploading service setting in a communication interface protocol;
The second descriptive information confirming module is used for confirming second descriptive information corresponding to the second descriptive value in the communication interface protocol according to a descriptive mode, wherein the second descriptive information comprises a device serial number of a security check machine for generating the original data, a graph judging mode, a file name of the original data and time for generating the original data;
the target image confirming module is used for determining a target image generated based on the original data according to the equipment serial number and the file name of the security inspection machine;
And the image processing module is used for carrying out image processing on the target image based on the original data.
The image processing device provided by the embodiment of the invention can execute the image processing method provided by the third embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example six
Fig. 6 is a schematic structural diagram of a computer device according to a sixth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in fig. 6 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in FIG. 6, the computer device 12 is in the form of a general purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, to implement an image uploading method and/or an image processing method provided by an embodiment of the present invention.
Example seven
The seventh embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements each process of the image uploading method and/or the image processing method, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
The computer readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (11)

1. An image uploading method is characterized by being applied to a security check machine, wherein the security check machine is configured with a preset communication interface protocol, and the image uploading method comprises the following steps:
Dividing a target image to be uploaded into a plurality of sub-images;
acquiring first description information of the sub-images, wherein the first description information is information of a description item appointed by an image uploading service in a preset communication interface protocol, and the first description information is used for indicating that a plurality of sub-images are spliced to obtain the target image;
Determining a first message field number of the image uploading service, and determining a first description value of the first description information, wherein the first message field number is a field number set for the image uploading service in the communication interface protocol, and the first description value is a value obtained according to a description mode set for the first description information in the communication interface protocol;
According to the packaging format of the data packet in the communication interface protocol, packaging the first message field number in a packet head, and packaging the sub-image and the first description value in a packet body to obtain the data packet of the sub-image;
Uploading the data packet to a graph judging platform, wherein the graph judging platform is used for analyzing the data packet according to the communication interface protocol so as to splice the sub-image into the target image;
the communication interface protocol comprises uploading service types, service field numbers of the uploading service types, description information of data required by each uploading service type and description modes of the description information;
the determining the first message field number of the image uploading service includes:
Searching a first message field number of an image uploading service in the communication interface protocol;
the determining the first description value of the first description information includes:
a first description value of the first description information is determined based on a description manner of the first description information in the communication interface protocol.
2. The image uploading method according to claim 1, wherein the communication interface protocol includes a message field number of a handshake request service, and before dividing a target image to be uploaded into a plurality of sub-images, further comprising:
Generating a handshake request message based on the communication interface protocol, wherein a packet head of the handshake request message comprises a message field number of a handshake request service, and a packet body of the handshake request message comprises security check machine information;
Sending a handshake request message to a graph judging platform, wherein the graph judging platform is used for generating a handshake response message when receiving the handshake request message;
And when a handshake response message sent by the graph judging platform is received, determining that the handshake is successful.
3. The image uploading method as claimed in claim 1, wherein,
The first description information comprises a device serial number, a sub-image format, a sub-image serial number, whether the sub-image is the last sub-image of the target image, a security inspection machine running direction, a scanning visual angle, an image width, an image height and an image size of the security inspection machine generating the sub-image.
4. A method of uploading an image according to any of claims 1-3, further comprising:
acquiring original data, and acquiring second description information of the original data, wherein the original data is scanning ray energy data of the security inspection machine for generating the target image, and the second description information is information of a description item specified for an original data uploading service in a preset communication interface protocol;
Determining a second message field number of the original data uploading service, and determining a second description value of the second description information, wherein the second message field number is a field number set for the original data uploading service in the communication interface protocol, and the second description value is a value obtained according to a description mode set for the second description information in the communication interface protocol;
According to the packaging format of the data packet in the communication interface protocol, packaging the second message field number in a packet head, and packaging the original data and the second description value in a packet body to obtain the data packet of the original data;
Uploading the data packet of the original data to a graph judging platform, wherein the graph judging platform is used for analyzing the data packet of the original data according to the communication interface protocol to obtain the original data.
5. An image processing method, which is characterized by being applied to a graph judging platform, wherein the graph judging platform is configured with a preset communication interface protocol, and the image processing method comprises the following steps:
Receiving a data packet sent by a security inspection machine, wherein the data packet comprises a packet head and a packet body;
parsing the data packet to extract a message field number from the packet header;
When the message field number is a field number set by an image uploading service in a preset communication interface protocol, extracting a sub-image and a first description value from the bag body;
splicing the received sub-images according to the first description value to obtain a target image;
The step of splicing the received sub-images according to the first description value to obtain a target image comprises the following steps:
Determining first description information corresponding to the first description value in the communication interface protocol according to a description mode, wherein the first description information comprises a device serial number, a sub-image format, a sub-image serial number, whether the sub-image is the last sub-image of a target image, a security inspection machine running direction, a scanning visual angle, an image width, an image height and an image size of a security inspection machine generating the sub-image;
Acquiring a sub-image sent by a security inspection machine of the same equipment serial number;
and when the received sub-image is determined to be the last sub-image, the received sub-image is spliced to obtain a target image according to the running direction, the scanning visual angle and the sub-image serial number of the security inspection machine.
6. The image processing method according to claim 5, characterized by further comprising:
when a handshake request message sent by the security inspection machine is received, a handshake response message is generated based on the communication interface protocol, wherein the packet head of the handshake response message comprises a message field number of a handshake response service, and the packet body of the handshake response message comprises a version number of a graph judging platform;
And sending the handshake response message to the security check machine.
7. The image processing method according to any one of claims 5 to 6, characterized by further comprising:
When the message field number is a field number set by an original data uploading service in a preset communication interface protocol, extracting original data and a second description value from the bag body;
Determining second description information corresponding to the second description value in the communication interface protocol according to a description mode, wherein the second description information comprises a device serial number of a security check machine for generating the original data, a graph judging mode, a file name of the original data and time for generating the original data;
Determining a target image generated based on the original data according to the equipment serial number and the file name of the security inspection machine;
And carrying out image processing on the target image based on the original data.
8. An image uploading device, characterized in that is applied to the security inspection machine, the security inspection machine is configured with a preset communication interface protocol, the security inspection machine includes:
The image segmentation module is used for segmenting the target image to be uploaded into a plurality of sub-images;
the first descriptive information acquisition module is used for acquiring first descriptive information of the sub-images, wherein the first descriptive information is information of descriptive items appointed by an image uploading service in a preset communication interface protocol, and the first descriptive information is used for indicating that a plurality of sub-images are spliced to obtain the target image;
A first message field number and a first description value determining module, configured to determine a first message field number of the image upload service, and determine a first description value of the first description information, where the first message field number is a field number set for the image upload service in the communication interface protocol, and the first description value is a value obtained according to a description manner set for the first description information in the communication interface protocol;
the image packaging module is used for packaging the first message field number in a packet head according to the packaging format of the data packet in the communication interface protocol, and packaging the sub-image and the first description value in a packet body to obtain the data packet of the sub-image;
The image uploading module is used for uploading the data packet to a graph judging platform, and the graph judging platform is used for analyzing the data packet according to the communication interface protocol so as to splice the sub-image into the target image;
the communication interface protocol comprises uploading service types, service field numbers of the uploading service types, description information of data required by each uploading service type and description modes of the description information;
The first message field number and first description value determining module includes:
A first message field number searching sub-module, configured to search a first message field number of an image upload service in the communication interface protocol;
and the first descriptive value searching sub-module is used for determining a first descriptive value of the first descriptive information based on the descriptive mode of the first descriptive information in the communication interface protocol.
9. The image processing device is characterized by being applied to a graph judging platform, wherein the graph judging platform is configured with a preset communication interface protocol, and the graph judging platform comprises:
the data packet receiving module is used for receiving the data packet sent by the security check machine;
The message field number extraction module is used for analyzing the data packet to extract a message field number from the packet head of the data packet;
The sub-image and first description value extraction module is used for extracting the sub-image and the first description value from the bag body when the field number of the message is a field number set by an image uploading service in a preset communication interface protocol;
The sub-image splicing module is used for splicing the received sub-images according to the first description value to obtain a target image;
the sub-image stitching module comprises:
The first descriptive information confirming sub-module is used for confirming first descriptive information corresponding to the first descriptive value in the communication interface protocol according to a descriptive mode, wherein the first descriptive information comprises a device serial number of a security inspection machine for generating the sub-image, a sub-image format, a sub-image serial number, whether the sub-image is the last sub-image of a target image, a security inspection machine running direction, a scanning visual angle, an image width, an image height and an image size;
The sub-image acquisition sub-module is used for acquiring sub-images sent by the security check machine of the same equipment serial number;
And the sub-image splicing sub-module is used for splicing the received sub-images according to the running direction, the scanning visual angle and the sub-image serial number of the security inspection machine to obtain a target image when the received sub-images are determined to be the last sub-image.
10. A computer device, the computer device comprising:
one or more processors;
A memory for storing one or more programs,
The one or more computer programs, when executed by the one or more processors, cause the one or more processors to implement the image upload method of any one of claims 1-4 and/or the image processing method of any one of claims 5-7.
11. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the image uploading method according to any of claims 1-4 and/or the image processing method according to any of claims 5-7.
CN202110766892.6A 2021-07-07 2021-07-07 Image uploading method, image processing method and related devices Active CN113489791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110766892.6A CN113489791B (en) 2021-07-07 2021-07-07 Image uploading method, image processing method and related devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110766892.6A CN113489791B (en) 2021-07-07 2021-07-07 Image uploading method, image processing method and related devices

Publications (2)

Publication Number Publication Date
CN113489791A CN113489791A (en) 2021-10-08
CN113489791B true CN113489791B (en) 2024-05-14

Family

ID=77941750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110766892.6A Active CN113489791B (en) 2021-07-07 2021-07-07 Image uploading method, image processing method and related devices

Country Status (1)

Country Link
CN (1) CN113489791B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114693700A (en) * 2022-03-23 2022-07-01 成都智元汇信息技术股份有限公司 Scheduling distribution method based on multi-source column data and intelligent image recognition box

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005421A (en) * 2018-08-17 2018-12-14 青岛海信电器股份有限公司 Image processing method and device, computer readable storage medium
WO2020125604A1 (en) * 2018-12-18 2020-06-25 杭州海康威视数字技术股份有限公司 Data transmission method, apparatus, device, and storage medium
CN112585939A (en) * 2019-12-31 2021-03-30 深圳市大疆创新科技有限公司 Image processing method, control method, equipment and storage medium
CN112749576A (en) * 2021-03-09 2021-05-04 腾讯科技(深圳)有限公司 Image recognition method and device, computing equipment and computer storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965917B (en) * 2017-05-27 2021-07-20 华为技术有限公司 Video image presenting and packaging method and video image presenting and packaging device
CN110365917B (en) * 2018-04-11 2021-08-03 京东方科技集团股份有限公司 Image processing method, computer product, display device, and computer-readable medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005421A (en) * 2018-08-17 2018-12-14 青岛海信电器股份有限公司 Image processing method and device, computer readable storage medium
WO2020125604A1 (en) * 2018-12-18 2020-06-25 杭州海康威视数字技术股份有限公司 Data transmission method, apparatus, device, and storage medium
CN112585939A (en) * 2019-12-31 2021-03-30 深圳市大疆创新科技有限公司 Image processing method, control method, equipment and storage medium
CN112749576A (en) * 2021-03-09 2021-05-04 腾讯科技(深圳)有限公司 Image recognition method and device, computing equipment and computer storage medium

Also Published As

Publication number Publication date
CN113489791A (en) 2021-10-08

Similar Documents

Publication Publication Date Title
JP6588053B2 (en) Method and apparatus for annotating point cloud data
CN110705405B (en) Target labeling method and device
CN108920380A (en) Test method, device, server, equipment and the storage medium of the software compatibility
CN114255436B (en) Security check image recognition system and method based on artificial intelligence
CN109743566B (en) Method and equipment for identifying VR video format
CN113489791B (en) Image uploading method, image processing method and related devices
CN109460365B (en) A kind of system performance testing method, apparatus, equipment and storage medium
CN114138999A (en) Image processing method for security inspection equipment
CN113158773A (en) Training method and training device for living body detection model
CN116452573A (en) Defect detection method, model training method, device and equipment for substation equipment
US20210012511A1 (en) Visual search method, computer device, and storage medium
CN113286086B (en) Camera use control method and device, electronic equipment and storage medium
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN111062374A (en) Identification method, device, system, equipment and readable medium of identity card information
CN109698933B (en) Data transmission method, camera, electronic device, and computer-readable storage medium
CN114760444A (en) Video image processing and determining method and device, electronic equipment and storage medium
US11250267B2 (en) Method and apparatus for processing information associated with video, electronic device, and storage medium
CN113168706A (en) Object position determination in frames of a video stream
CN112394809B (en) Method, device and communication equipment for realizing augmented reality
CN115512283A (en) Parcel image processing method and device, computer equipment and storage medium
CN112650698A (en) Data transmission method and device, electronic equipment and storage medium
CN113762266A (en) Target detection method, device, electronic equipment and computer readable medium
CN108447107B (en) Method and apparatus for generating video
CN110443089A (en) The method, apparatus of two dimensional code, electronic equipment and medium for identification
CN113327672A (en) Multi-light-machine image transmission and remote image judging method and system

Legal Events

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