Method and device for locating express parcels
By receiving express positioning requests, finding location information and generating positioning result images, the problem of low positioning efficiency of express parcels in the prior art is solved, and more efficient express delivery is achieved.
Patent Information
- Application Number
- CN202010239330.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-30
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2040-03-30
AI Technical Summary
The existing express parcel positioning methods rely on manual marking and classification, and are inefficient, especially in campus or township express delivery.
By receiving the express positioning request, the location information corresponding to the pre-stored express information is found, and a express positioning result image containing the positioning mark is generated, thereby indicating the express order corresponding to the target express parcel.
It improves the efficiency of express parcel positioning, simplifies the work flow of couriers, and improves the efficiency of express delivery.
Smart Images

Figure CN112308915B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and specifically to a method and device for locating express packages. Background Art
[0002] With the continuous development of society, express parcels are used more and more widely. Consumers shop online, deliver documents or goods between companies, and send items between individuals. All of these are carried out through logistics companies in the form of express parcels. The relevant express parcel positioning method is usually that the courier manually marks the express parcel, for example, writes the last four digits of the mobile phone number on the express bill on the express bill; then, the express parcels are classified according to the mobile phone number and placed in different areas; finally, when the customer comes to pick up the parcel, the customer's express parcel is found in a specific area according to the mobile phone number provided by the customer. This express parcel positioning method is more common in the process of campus express delivery or township express delivery. Summary of the invention
[0003] The embodiments of the present application provide a method and device for locating express packages.
[0004] In a first aspect, an embodiment of the present application provides a method for locating an express package, comprising: receiving an express location request, wherein the express location request is used to locate an express note corresponding to a target express package from an express image presenting the express package, and the express location request includes express information; searching for pre-stored location information of the express note corresponding to the express information; using the location information, generating an express location result image, wherein the express location result image includes a location identifier, and the location identifier is used to indicate the express note corresponding to the target express package from the express image; and outputting the express location result image.
[0005] In some embodiments, before receiving a courier location request, the method includes: obtaining a courier image presenting an courier package; determining, based on the courier image and a pre-trained courier recognition model, the location information of each courier in at least one courier identified from the courier image and the courier information on each courier; and associating and storing the location information of each courier in at least one courier with the corresponding courier information.
[0006] In some embodiments, the express image includes a regional express image, the express recognition model includes an express detection model, an express location recognition model and an express information recognition model; and based on the express image and the pre-trained express recognition model, the location information of each express order in at least one express order identified from the express image and the express information on each express order are determined, including: based on the regional express image and the express detection model, determining the express order area in the regional express image; inputting the express order area into the express location recognition model to obtain the location information of each express order in at least one express order; inputting the express order area into the express information recognition model to obtain the express information on each express order in at least one express order.
[0007] In some embodiments, the express detection model includes an express order detection model and an express package detection model; and determining the express order area in the regional express image based on the regional express image and the express detection model, including: inputting the regional express image into the express order detection model to obtain at least one initial express order area detected from the regional express image and the prediction probability corresponding to each initial express order area in the at least one initial express order area; inputting the regional express image into the express package detection model to obtain at least one express package area detected from the regional express image and the prediction probability corresponding to each express package area in the at least one express package area; determining the express order area in the regional express image based on at least one initial express order area, the prediction probability corresponding to each initial express order area in the at least one initial express order area, at least one express package area and the prediction probability corresponding to each express package area in the at least one express package area.
[0008] In some embodiments, the express image includes a panoramic express image, and the express recognition model also includes a panoramic recognition model; and based on the express image and the pre-trained express recognition model, determining the location information of each express order and the express information on each express order in at least one express order identified from the express image, including: inputting the regional express image and the panoramic express image into the panoramic recognition model to obtain the correspondence between the location information of the express order in the panoramic express image and the location information of the express order in the regional express image; storing the correspondence between the location information of the express order in the panoramic express image and the location information of the express order in the regional express image.
[0009] In a second aspect, an embodiment of the present application provides a device for locating an express package, comprising: a receiving unit, configured to receive an express location request, wherein the express location request is used to locate an express note corresponding to a target express package from an express image presenting the express package, and the express location request includes express information; a searching unit, configured to search for pre-stored location information of the express note corresponding to the express information; a generating unit, configured to generate an express location result image using the location information, wherein the express location result image includes a location identifier, and the location identifier is used to indicate the express note corresponding to the target express package from the express image; and an output unit, configured to output the express location result image.
[0010] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation method in the first aspect.
[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0012] The method and device for locating express parcels provided by the above embodiment of the present application receive an express locating request; then, search for the location information of the express bill that is pre-stored and corresponds to the express information included in the above express locating request; then, using the above location information, generate an express locating result image containing the express bill corresponding to the above target express parcel indicated from the above express image; finally, output the above express locating result image. In this way, the efficiency of express parcel locating is improved, thereby improving the efficiency of express delivery. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0014] Figure 1 is an exemplary system architecture diagram to which various embodiments of the present application may be applied;
[0015] Figure 2 is a flow chart of an embodiment of a method for locating an express package according to the present application;
[0016] Figure 3 is a schematic diagram of an application scenario of the method for locating express parcels according to the present application;
[0017] Figure 4 is a flow chart of another embodiment of a method for locating an express package according to the present application;
[0018] Figure 5 is a schematic diagram of another application scenario of the method for locating express parcels according to the present application;
[0019] Figure 6 is a structural schematic diagram of an embodiment of a device for locating an express package according to the present application;
[0020] Figure 7 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION
[0021] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the method for locating a courier package of the present application can be applied.
[0024] like Figure 1 As shown, the system architecture 100 may include terminal devices 1011, 1012, 1013, a network 102, and a server 103. The network 102 is used to provide a medium for communication links between the terminal devices 1011, 1012, 1013 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0025] The courier can use the terminal devices 1011, 1012, 1013 to interact with the server 103 through the network 102 to send or receive messages, etc. (for example, the server 103 can receive the courier location request sent by the terminal devices 1011, 1012, 1013, and the terminal devices 1011, 1012, 1013 can also receive the courier location result image sent by the server 103), etc. Various communication client applications can be installed on the terminal devices 1011, 1012, 1013, such as image processing applications, courier management applications, instant messaging software, etc.
[0026] Terminal devices 1011, 1012, and 1013 may first receive an express location request; thereafter, they may search for pre-stored location information of an express delivery note corresponding to the express delivery information included in the express location request; then, they may use the location information to generate an express location result image, wherein the express location result image includes a location identifier for indicating the express delivery note corresponding to the target express package from the express image; finally, the express location result image may be output.
[0027] Terminal devices 1011, 1012, 1013 may be hardware or software. When terminal devices 1011, 1012, 1013 are hardware, they may be various electronic devices that support information interaction, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When terminal devices 1011, 1012, 1013 are software, they may be installed in the electronic devices listed above. They may be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0028] The server 103 may be a server that provides various services. For example, it may be a background server that analyzes the express location request. The server 103 may first receive the express location request from the terminal devices 1011, 1012, and 1013; then, it may search for the pre-stored location information of the express order corresponding to the express information included in the express location request; then, it may use the location information to generate an express location result image, wherein the express location result image includes a location mark for indicating the express order corresponding to the target express package from the express image; finally, it may output the express location result image, for example, send the express location result image to the terminal devices 1011, 1012, and 1013.
[0029] It should be noted that the server 103 can be hardware or software. When the server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 103 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0030] It should be noted that the method for locating express parcels provided in the embodiment of the present application can be executed by the server 103, and can also be executed by the terminal devices 1011, 1012, and 1013.
[0031] It should be noted that the correspondence between the location information of the express order and the corresponding express information can be stored locally in the terminal devices 1011, 1012, and 1013, and the terminal devices 1011, 1012, and 1013 can search the location information of the express order corresponding to the express information locally. In this case, the exemplary system architecture 100 may not have the server 103 and the network 102.
[0032] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0033] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for locating an express package according to the present application. The method for locating an express package comprises the following steps:
[0034] Step 201, receiving a courier location request.
[0035] In this embodiment, the execution subject of the method for locating a courier package (eg Figure 1 The server or terminal device shown in the figure can receive a courier location request. The courier location request is usually used to locate the courier bill corresponding to the target courier package from the courier image showing the courier package. The target courier package can be a courier package to be found or located.
[0036] Here, the courier usually needs to use the terminal device to take a photo of the area where the express parcel (it can be one express parcel or multiple express parcels) is placed, so as to obtain the express image showing the express parcel. Express delivery is usually delivered from the sender to the recipient in the form of an express parcel. The express delivery note is usually a document presenting express-related information, and the express delivery-related information can usually include the express delivery note number, sender address information, sender contact information, recipient address information and recipient contact information. The express parcel usually corresponds to the express delivery note. For example, the express delivery note can be pasted on the express parcel. Usually, the courier needs to place the express parcel in a standardized manner. For example, it is necessary to ensure that the express delivery note on the express parcel is facing upwards, and it is best to leave a certain gap between each parcel.
[0037] In this embodiment, the above-mentioned express positioning request usually includes express information, which may include but is not limited to: part or all of the mobile phone number of the express recipient (for example, the last four digits of the mobile phone number), part or all of the express order number (for example, the last four digits of the express number).
[0038] Step 202, searching for pre-stored location information of the express delivery note corresponding to the express delivery information.
[0039] In this embodiment, the above-mentioned execution entity can search for the pre-stored location information of the express order corresponding to the above-mentioned express information. The above-mentioned execution entity usually pre-stores the correspondence between the express information and the location information of the express order. The location information of the above-mentioned express order can be represented in the form of {x, y, w, h}. Here, x and y can be the horizontal coordinate value and the vertical coordinate value of the preset position (for example, the upper left corner) of the express order (usually a rectangular area) in the preset coordinate system, and w and h can be the width and height of the express order, respectively. It should be noted that the above-mentioned preset coordinate system can be a world coordinate system or a preset express image coordinate system. For example, it can be a coordinate system with the lower left corner of the express image as the coordinate origin and the two adjacent sides of the express image as the horizontal axis and the vertical axis, respectively.
[0040] Step 203, using the location information, generate a courier location result image.
[0041] In this embodiment, the execution entity may generate a courier location result image using the location information found in step 202. The courier location result image may include a location mark, for example, a location box or a location arrow. The location mark is used to indicate the courier bill corresponding to the target courier package from the courier image. The courier location result image may be an image obtained by superimposing the location mark on the courier image.
[0042] Step 204: output the express delivery location result image.
[0043] In this embodiment, the execution subject may output the express location result image generated in step 203. If the execution subject is a terminal device, the execution subject may present the express location result image so that the courier can find the target express package from multiple express packages according to the location mark in the express location result image. If the execution subject is a server, the execution subject may send the express location result image to the courier's terminal device.
[0044] In some optional implementations of this embodiment, the above-mentioned express image may include a regional express image. The courier may upload the above-mentioned regional express image by clicking the upload icon for uploading the regional express image to identify the express bill corresponding to the target express package in the above-mentioned regional express image. At this time, the above-mentioned execution subject may search for the location information of the express bill in the above-mentioned regional express image corresponding to the above-mentioned express information that is pre-stored; thereafter, the above-mentioned location information may be used to generate an express positioning result image, and the positioning mark in the above-mentioned express positioning result image is used to indicate the express bill corresponding to the above-mentioned target express package from the above-mentioned regional express image.
[0045] In some optional implementations of this embodiment, the above-mentioned express image may include a panoramic express image. The courier may upload the above-mentioned panoramic express image by clicking the upload icon for uploading the panoramic express image to identify the express bill corresponding to the target express package in the above-mentioned panoramic express image. At this time, the above-mentioned execution subject may search for the pre-stored location information of the express bill in the above-mentioned panoramic express image corresponding to the above-mentioned express information; thereafter, the above-mentioned location information may be used to generate an express positioning result image, and the positioning mark in the above-mentioned express positioning result image is used to indicate the express bill corresponding to the above-mentioned target express package from the above-mentioned panoramic express image.
[0046] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the method for locating an express package according to this embodiment. Figure 3 In the application scenario of, the courier can use the terminal device 301 to upload the express image 302 showing the express package. Afterwards, the user informs the courier of the express information (for example, the last four digits of the mobile phone number) in the process of picking up the express. The courier can enter the last four digits of the user's mobile phone number 5118 into the query box 303 for querying the express and click the "query express" icon 304. At this time, the terminal device 301 can receive the express location request for locating the express bill corresponding to the target express package from the express image 302 (the express bill corresponding to the last four digits of the mobile phone number 5118). Then, the terminal device 301 can find the location information of the express bill corresponding to the last four digits of the mobile phone number 5118. Then, the terminal device 301 can use the above location information to generate and output the express location result image 305. The express location result image 305 usually includes a location mark, where the location mark is a location box 306, and the location box 306 is used to indicate the express bill corresponding to the above target express package from the express image 302. The courier can find the target express package from multiple express packages according to the positioning mark 306 in the express positioning result image 305.
[0047] The method provided by the above embodiment of the present application searches for the location information of the express note corresponding to the target express package requested for location from the express image after receiving the express location request for locating the express note corresponding to the target express package, and then generates an express location result image using the above location information. The courier can quickly and accurately find the customer's express package according to the location mark in the above express location result image. This method improves the efficiency of express package location, thereby improving the efficiency of express delivery.
[0048] Further references Figure 4, which shows a process 400 of another embodiment of a method for locating an express package. The process 400 of the method for locating an express package includes the following steps:
[0049] Step 401, obtaining a courier image showing a courier package.
[0050] In this embodiment, the execution subject of the method for locating a courier package (eg Figure 1 The server or terminal device shown in the figure can obtain a courier image showing a courier package. If the execution subject is a courier's terminal device, the courier can use the terminal device to take a photo of the area where the courier package is placed, thereby obtaining a courier image showing the courier package. If the execution subject is a server, the server can receive the courier image showing the courier package taken by the courier using the terminal device.
[0051] Step 402, based on the express image and the pre-trained express recognition model, determine the location information of each express order and the express information on each express order in at least one express order recognized from the express image.
[0052] In this embodiment, the execution subject can determine the location information of each express order in at least one express order identified from the express image and the express information on each express order based on the express image acquired in step 401 and the pre-trained express recognition model. Specifically, the execution subject can input the express image into the express recognition model to obtain the location information of each express order in at least one express order identified from the express image and the express information on each express order. At this time, the express recognition model can be used to characterize the image and the location information of the express order identified from the image and the express information on the express order.
[0053] In this embodiment, the location information of the express order can be represented in the form of {x, y, w, h}. Here, x and y can be the horizontal and vertical coordinate values of the preset position of the express order (usually a rectangular area) in the preset coordinate system, and w and h can be the width and height of the express order, respectively. It should be noted that the above-mentioned preset coordinate system can be a world coordinate system or a preset express image coordinate system. For example, it can be a coordinate system with the lower left corner of the express image as the coordinate origin and the two adjacent sides of the express image as the horizontal axis and the vertical axis. The above-mentioned express information may include, but is not limited to: part or all of the mobile phone number of the express recipient, and part or all of the express order number.
[0054] Step 403: associate the location information of each express delivery note in at least one express delivery note with the corresponding express delivery information and store them.
[0055] In this embodiment, the execution entity may store the location information of each express delivery note in the at least one express delivery note obtained in step 403 in association with the corresponding express delivery information.
[0056] Step 404, receiving a courier location request.
[0057] Step 405, searching for pre-stored location information of the express delivery note corresponding to the express delivery information.
[0058] Step 406, using the location information, generate a courier location result image.
[0059] Step 407, outputting the express location result image.
[0060] In this embodiment, steps 404-407 may be performed in a manner similar to steps 201-204, and will not be described in detail herein.
[0061] In some optional implementations of this embodiment, the above-mentioned express image may include a regional express image. The above-mentioned regional express image generally refers to an image obtained by photographing a portion of an area in which a plurality of express parcels are placed. Therefore, the above-mentioned regional express image generally presents some express parcels among all express parcels. It should be noted that the above-mentioned regional express image generally presents a clear front express order image. The above-mentioned express recognition model may include an express detection model, an express location recognition model, and an express information recognition model. The above-mentioned express detection model may be used to characterize the correspondence between the image and the express order area in the image. The above-mentioned express order area may be an area containing an express order, for example, it may be the smallest area containing an express order. The above-mentioned express location recognition model may be used to characterize the correspondence between the express order area and the position information of the express order in the express order area. The above-mentioned express information recognition model may be used to characterize the correspondence between the express order area and the express information on the express order in the express order area. The execution subject may determine the location information of each express order and the express information on each express order in at least one express order identified from the express image based on the express image and the pre-trained express recognition model in the following manner: the execution subject may first determine the express order area in the regional express image based on the regional express image and the express detection model. Specifically, the execution subject may input the regional express image into the express detection model to obtain the express order area in the regional express image. The execution subject may input the regional express image into the express detection model to obtain the probability of whether each pixel in the regional express image is the express order area, thereby determining the express order area in the regional express image. Afterwards, the express order area may be input into the express location recognition model to obtain the location information of each express order in at least one express order. Then, the express order area may be input into the express information recognition model to obtain the express information on each express order in at least one express order.
[0062] In some optional implementations of this embodiment, the express detection model may include an express order detection model and an express package detection model. Here, the express order detection model may be used to characterize the correspondence between an image and an initial express order area detected from the image and a predicted probability corresponding to the initial express order area. The express package detection model may be used to characterize the correspondence between an image and an express package area detected from the image and a predicted probability corresponding to the express package area. The express package area may be an area containing an express package, for example, it may be the smallest area containing an express package.
[0063] The execution subject may determine the express order area in the regional express image based on the regional express image and the express detection model in the following manner: the execution subject may first input the regional express image into the express order detection model to obtain at least one initial express order area detected from the regional express image and the prediction probability corresponding to each initial express order area in the at least one initial express order area. It should be noted that the initial express order area may be represented in the form of {x, y, w, h}. Here, x and y may be the horizontal coordinate value and the vertical coordinate value of the preset position of the initial express order in the preset coordinate system, respectively, and w and h may be the width and height of the initial express order, respectively.
[0064] Afterwards, the above-mentioned regional express image can be input into the above-mentioned express parcel detection model to obtain the predicted probability corresponding to at least one express parcel area detected from the above-mentioned regional express image and each express parcel area in the above-mentioned at least one express parcel area. It should be noted that the express parcel area can also be represented in the form of {x, y, w, h}. Here, x and y can be the horizontal coordinate value and the vertical coordinate value of the preset position of the express parcel in the preset coordinate system, respectively, and w and h can be the width and height of the express parcel, respectively. Generally speaking, an initial express order area corresponds to an express parcel area, and the corresponding relationship between the initial express order area and the express parcel area is determined by the relationship between the regional position of the initial express order area and the regional position of the express parcel area. If the initial express order area and the express parcel area overlap at least partially, it can usually be said that they have a corresponding relationship. Usually, the express parcel area with a corresponding relationship contains the initial express order area corresponding to it. Here, the above-mentioned express parcel detection model may include a convolutional layer, a pooling layer, and a fully connected layer. The above-mentioned regional express image can be input into the convolution layer of the above-mentioned express package detection model to convolve the pixel features of the pixel points of the above-mentioned regional express image with the convolution kernel to obtain image features; then, the above-mentioned image features can be input into the pooling layer of the above-mentioned express package detection model to obtain the pooled feature vector. Maximum pooling and average pooling can be used to extract features. Finally, the pooled feature vector can be input into the fully connected layer of the above-mentioned express package detection model, so as to classify the pooled feature vector to obtain the express package area and the corresponding prediction probability.
[0065] Then, the express order area in the express image of the above-mentioned region can be determined based on the above-mentioned at least one initial express order area, the predicted probability corresponding to each initial express order area in the above-mentioned at least one initial express order area, the above-mentioned at least one express parcel area and the predicted probability corresponding to each express parcel area in the above-mentioned at least one express parcel area. Specifically, the above-mentioned execution subject can first determine multiple groups of correspondences including initial express order areas and express parcel areas based on the above-mentioned at least one initial express order area and the above-mentioned at least one express parcel area. As an example, the initial express order area and the express parcel area with overlapping areas can be determined as a group of correspondences. Afterwards, for each group of correspondences in the above-mentioned multiple groups of correspondences, the final probability that the initial express order area included in the group of correspondences is the express order area in the express image of the above-mentioned region can be determined by the following formula (1):
[0066]
[0067] Where P is the final probability that the initial express order area contained in the group of correspondences is the express order area in the express image of the above region, P bill is the predicted probability corresponding to the initial express order area contained in this group of correspondences, λ bill is the weight of the predicted probability corresponding to the initial express order area contained in this group of correspondences, P package is the predicted probability corresponding to the express parcel area contained in this group of correspondences, λ package is the weight of the predicted probability corresponding to the express parcel area included in this group of correspondences.
[0068] Finally, based on the final probability P that the initial express order area included in the group of correspondences is the express order area in the regional express image, it can be determined whether the initial express order area included in the group of correspondences is the express order area in the regional express image. Specifically, if the final probability P that the initial express order area included in the group of correspondences is the express order area in the regional express image is greater than a preset probability threshold (for example, 0.8), it can be determined that the initial express order area included in the group of correspondences is the express order area in the regional express image.
[0069] It can be known from the above formula (1) that if the prediction probability corresponding to the initial express order area included in the group of correspondences is 0, then the initial express order area included in the group of correspondences must not be the express order area in the above regional express image. If the prediction probability corresponding to the initial express order area included in the group of correspondences is greater than 0, the final probability corresponding to the initial express order can be corrected by the prediction probability corresponding to the express package area included in the group of correspondences.
[0070] Since the colors of express parcels are similar, it is difficult to distinguish the boundaries of express parcels, while express bills have express parcels with greatly different colors. Therefore, express bills are easier to identify than express parcels. By determining the express bill area from the express images in the above area, the recognition result of the express bill can be dominant, thereby improving the detection effect of express parcels.
[0071] In some optional implementations of this embodiment, the above-mentioned express image may include a panoramic express image. The above-mentioned panoramic express image generally refers to an image obtained by photographing all areas in an area where multiple express parcels are placed. Therefore, the above-mentioned panoramic express image generally presents all express parcels in all express parcels. The above-mentioned express recognition model also includes a panoramic recognition model. The above-mentioned panoramic recognition model can be used to map the location information of the express bill in the regional express image to the panoramic express image, thereby determining the location information of a certain express bill in the regional express image in the panoramic express image. The above-mentioned execution subject can determine the location information of each express bill in at least one express bill identified from the above-mentioned express image and the express information on each express bill based on the above-mentioned express image and the pre-trained express recognition model in the following manner: the above-mentioned execution subject can input the above-mentioned regional express image and the above-mentioned panoramic express image into the above-mentioned panoramic recognition model to obtain the corresponding relationship between the location information of the express bill in the above-mentioned panoramic express image and the location information of the express bill in the above-mentioned regional express image. Specifically, the execution subject may input the regional express image and the panoramic express image into the panoramic recognition model, obtain the distance (e.g., cosine distance, Euclidean distance) between the feature vector of a certain express order in the regional express image and the feature vector of each express order in the panoramic express image, and select the express order corresponding to the feature vector with the smallest distance as the express order most similar to the express order in the regional express image, and determine the correspondence between the express order in the regional express image and the express order in the panoramic express image. It should be noted that in the process of determining the similarity between a certain express order in the regional express image and each express order in the panoramic express image, the detection frame may be used to traverse each express order in the panoramic express image. Afterwards, the correspondence between the position information of the express order in the panoramic express image and the position information of the express order in the regional express image may be stored. In this way, the local express image may be combined with the panoramic express image, and the target express package may be located in the panoramic image by identifying the local image with a clear front face. This method may increase the number of express packages identified at a single time, and further improve the efficiency of finding express packages.
[0072] from Figure 4 It can be seen that Figure 2Compared with the corresponding embodiment, the process 400 of the method for locating an express package in this embodiment embodies the steps of determining the correspondence between the location information of the express order and the express information on the express order, and storing the determined correspondence. Therefore, the scheme described in this embodiment can accurately determine the correspondence between the location information of the express order and the express information on the express order before locating the express package, thereby improving the accuracy of finding the express package.
[0073] Continue to see Figure 5 , Figure 5 FIG. 1 is a schematic diagram of another application scenario of the method for locating express parcels according to this embodiment. Figure 5In the application scenario of , the courier can use the terminal device 501 to upload a courier image showing at least one courier package. Here, the courier can click the "upload image" icon 502, and then select the "partial" option, as shown in icon 503, to upload a partial courier image. The uploaded partial courier image is shown in icon 504. Then, the courier can upload partial courier images 505 and partial courier images 506 in the same way. Then, the courier can click the "upload image" icon 502, and then select the "panoramic" option, as shown in icon 507, to upload a panoramic courier image. The uploaded panoramic courier image is shown in icon 508. Afterwards, when the user is picking up the express, he informs the courier of the express information (for example, the last four digits of the mobile phone number), and the courier can enter the last four digits of the user's mobile phone number 1234 into the query box 509 for querying the express and click the "Query Express" icon 510. At this time, the terminal device 501 can receive a courier positioning request for locating the express bill corresponding to the target express package (the express bill corresponding to the last four digits of the mobile phone number 1234) from the local express images 504, 505, 506 and the panoramic express image 508. Then, the terminal device 501 can search for the location information of the express bill corresponding to the last four digits of the mobile phone number 1234 stored in advance. Here, the above-mentioned location information can include the location information of the express bill corresponding to the target express package on the local express image and the location information of the express bill corresponding to the target express package on the panoramic express image. Then, the terminal device 501 can generate and output the express positioning result image 511 using the location information of the express bill corresponding to the target express package on the local express image. If the courier selects the "panoramic" option, as shown in icon 507, the terminal device 501 can present a courier positioning result image 511. Here, the courier positioning result image 511 includes a positioning mark 512, and the positioning mark 512 is used to indicate the courier bill corresponding to the above-mentioned target courier package from the panoramic courier image 508. The terminal device 501 can generate and output a courier positioning result image 513 using the location information of the courier bill corresponding to the target courier package on the panoramic courier image. If the courier selects the "local" option, as shown in icon 503, the terminal device 501 can present a courier positioning result image 513. Here, the courier positioning result image 513 includes a positioning mark 514, and the positioning mark 514 is used to indicate the courier bill corresponding to the above-mentioned target courier package from the local courier image 506. The courier can find the target courier package from multiple courier packages according to the positioning mark 512 in the courier positioning result image 511 and the positioning mark 514 in the courier positioning result image 513.
[0074] Further references Figure 6As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for locating express parcels, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0075] like Figure 6 As shown, the apparatus 600 for locating an express package in this embodiment includes: a receiving unit 601, a searching unit 602, a generating unit 603 and an output unit 604. The receiving unit 601 is configured to receive an express location request, wherein the express location request is used to locate the express bill corresponding to the target express package from the express image presenting the express package, and the express location request includes express information; the searching unit 602 is configured to search for the location information of the express bill corresponding to the express information stored in advance; the generating unit 603 is configured to generate an express location result image using the location information, wherein the express location result image includes a location mark, and the location mark is used to indicate the express bill corresponding to the target express package from the express image; the output unit 604 is configured to output the express location result image.
[0076] In this embodiment, the specific processing of the receiving unit 601, the searching unit 602, the generating unit 603 and the output unit 604 of the apparatus 600 for locating a courier package can be referred to in Figure 2 This corresponds to step 201, step 202, step 203 and step 204 in the embodiment.
[0077] In some optional implementations of this embodiment, the device 600 for locating express parcels may further include an acquisition unit (not shown in the figure), a determination unit (not shown in the figure) and a storage unit (not shown in the figure). The acquisition unit may acquire an express image presenting an express parcel. The determination unit may determine the location information of each express order in at least one express order identified from the express image and the express information on each express order based on the acquired express image and the pre-trained express recognition model. Specifically, the determination unit may input the express image into the express recognition model to obtain the location information of each express order in at least one express order identified from the express image and the express information on each express order. At this time, the express recognition model may be used to characterize the image and the location information of the express order identified from the image and the express information on the express order. The location information of the express order may be represented in the form of {x, y, w, h}. Here, x and y may be the horizontal coordinate value and the vertical coordinate value of the preset position of the express order (usually a rectangular area) in the preset coordinate system, respectively, and w and h may be the width and height of the express order, respectively. The express information may include but is not limited to: part or all of the mobile phone number of the express recipient, part or all of the express order number. The storage unit may associate the location information of each express order in the at least one express order with the corresponding express information.
[0078] In some optional implementations of this embodiment, the above-mentioned express image may include a regional express image. The above-mentioned regional express image generally refers to an image obtained by photographing a portion of an area in which a plurality of express parcels are placed. Therefore, the above-mentioned regional express image generally presents some express parcels among all express parcels. It should be noted that the above-mentioned regional express image generally presents a clear front express order image. The above-mentioned express recognition model may include an express detection model, an express location recognition model, and an express information recognition model. The above-mentioned express detection model may be used to characterize the correspondence between the image and the express order area in the image. The above-mentioned express order area may be an area containing an express order, for example, it may be the smallest area containing an express order. The above-mentioned express location recognition model may be used to characterize the correspondence between the express order area and the position information of the express order in the express order area. The above-mentioned express information recognition model may be used to characterize the correspondence between the express order area and the express information on the express order in the express order area. The determination unit may determine the location information of each express order and the express information on each express order in at least one express order identified from the express image based on the express image and the pre-trained express recognition model in the following manner: the determination unit may first determine the express order area in the regional express image based on the regional express image and the express detection model. Specifically, the determination unit may input the regional express image into the express detection model to obtain the express order area in the regional express image. The determination unit may input the regional express image into the express detection model to obtain the probability of whether each pixel in the regional express image is the express order area, thereby determining the express order area in the regional express image. Afterwards, the express order area may be input into the express location recognition model to obtain the location information of each express order in at least one express order. Then, the express order area may be input into the express information recognition model to obtain the express information on each express order in at least one express order.
[0079] In some optional implementations of this embodiment, the express detection model may include an express order detection model and an express package detection model. Here, the express order detection model may be used to characterize the correspondence between an image and an initial express order area detected from the image and a predicted probability corresponding to the initial express order area. The express package detection model may be used to characterize the correspondence between an image and an express package area detected from the image and a predicted probability corresponding to the express package area. The express package area may be an area containing an express package, for example, it may be the smallest area containing an express package.
[0080] The above-mentioned determination unit can determine the express order area in the above-mentioned regional express image based on the above-mentioned regional express image and the above-mentioned express detection model in the following manner: the above-mentioned determination unit can first input the above-mentioned regional express image into the above-mentioned express order detection model to obtain at least one initial express order area detected from the above-mentioned regional express image and the prediction probability corresponding to each initial express order area in the above-mentioned at least one initial express order area. It should be noted that the initial express order area can be represented in the form of {x, y, w, h}. Here, x and y can be the horizontal coordinate value and the vertical coordinate value of the preset position of the initial express order in the preset coordinate system, respectively, and w and h can be the width and height of the initial express order, respectively.
[0081] Afterwards, the above-mentioned regional express image can be input into the above-mentioned express parcel detection model to obtain the predicted probability corresponding to at least one express parcel area detected from the above-mentioned regional express image and each express parcel area in the above-mentioned at least one express parcel area. It should be noted that the express parcel area can also be represented in the form of {x, y, w, h}. Here, x and y can be the horizontal coordinate value and the vertical coordinate value of the preset position of the express parcel in the preset coordinate system, respectively, and w and h can be the width and height of the express parcel, respectively. Generally speaking, an initial express order area corresponds to an express parcel area, and the corresponding relationship between the initial express order area and the express parcel area is determined by the relationship between the regional position of the initial express order area and the regional position of the express parcel area. If the initial express order area and the express parcel area overlap at least partially, it can usually be said that they have a corresponding relationship. Usually, the express parcel area with a corresponding relationship contains the initial express order area corresponding to it. Here, the above-mentioned express parcel detection model may include a convolutional layer, a pooling layer, and a fully connected layer. The above-mentioned regional express image can be input into the convolution layer of the above-mentioned express package detection model to convolve the pixel features of the pixel points of the above-mentioned regional express image with the convolution kernel to obtain image features; then, the above-mentioned image features can be input into the pooling layer of the above-mentioned express package detection model to obtain the pooled feature vector. Maximum pooling and average pooling can be used to extract features. Finally, the pooled feature vector can be input into the fully connected layer of the above-mentioned express package detection model, so as to classify the pooled feature vector to obtain the express package area and the corresponding prediction probability.
[0082] Then, the express order area in the express image of the above-mentioned region can be determined based on the above-mentioned at least one initial express order area, the predicted probability corresponding to each initial express order area in the above-mentioned at least one initial express order area, the above-mentioned at least one express parcel area and the predicted probability corresponding to each express parcel area in the above-mentioned at least one express parcel area. Specifically, the above-mentioned determination unit can first determine multiple groups of correspondences including the initial express order area and the express parcel area through the above-mentioned at least one initial express order area and the above-mentioned at least one express parcel area. As an example, the initial express order area and the express parcel area with overlapping areas can be determined as a group of correspondences. Afterwards, for each group of correspondences in the above-mentioned multiple groups of correspondences, the final probability that the initial express order area included in the group of correspondences is the express order area in the express image of the above-mentioned region can be determined by the following formula (1):
[0083]
[0084] Where P is the final probability that the initial express order area contained in the group of correspondences is the express order area in the express image of the above region, P bill is the predicted probability corresponding to the initial express order area contained in this group of correspondences, λ bill is the weight of the predicted probability corresponding to the initial express order area contained in this group of correspondences, P package is the predicted probability corresponding to the express parcel area contained in this group of correspondences, λ package is the weight of the predicted probability corresponding to the express parcel area included in this group of correspondences.
[0085] Finally, based on the final probability P that the initial express order area included in the group of correspondences is the express order area in the regional express image, it can be determined whether the initial express order area included in the group of correspondences is the express order area in the regional express image. Specifically, if the final probability P that the initial express order area included in the group of correspondences is the express order area in the regional express image is greater than a preset probability threshold, it can be determined that the initial express order area included in the group of correspondences is the express order area in the regional express image.
[0086] It can be known from the above formula (1) that if the prediction probability corresponding to the initial express order area included in the group of correspondences is 0, then the initial express order area included in the group of correspondences must not be the express order area in the above regional express image. If the prediction probability corresponding to the initial express order area included in the group of correspondences is greater than 0, the final probability corresponding to the initial express order can be corrected by the prediction probability corresponding to the express package area included in the group of correspondences.
[0087] Since the colors of express parcels are similar, it is difficult to distinguish the boundaries of express parcels, while express bills have express parcels with greatly different colors. Therefore, express bills are easier to identify than express parcels. By determining the express bill area from the express images in the above area, the recognition result of the express bill can be dominant, thereby improving the detection effect of express parcels.
[0088] In some optional implementations of the present embodiment, the above-mentioned express image may include a panoramic express image. The above-mentioned panoramic express image generally refers to an image obtained by photographing the entire area in an area where multiple express parcels are placed. Therefore, the above-mentioned panoramic express image generally presents all express parcels in all express parcels. The above-mentioned express recognition model also includes a panoramic recognition model. The above-mentioned panoramic recognition model can be used to map the location information of the express bill in the regional express image to the panoramic express image, thereby determining the location information of a certain express bill in the regional express image in the panoramic express image. The above-mentioned determination unit can determine the location information of each express bill in at least one express bill identified from the above-mentioned express image and the express information on each express bill based on the above-mentioned express image and the pre-trained express recognition model in the following manner: the above-mentioned determination unit can input the above-mentioned regional express image and the above-mentioned panoramic express image into the above-mentioned panoramic recognition model to obtain the corresponding relationship between the location information of the express bill in the above-mentioned panoramic express image and the location information of the express bill in the above-mentioned regional express image. Specifically, the determination unit may input the regional express image and the panoramic express image into the panoramic recognition model, obtain the distance between the feature vector of a certain express order in the regional express image and the feature vector of each express order in the panoramic express image, select the express order corresponding to the feature vector with the smallest distance as the express order most similar to the express order in the regional express image, and determine the correspondence between the express order in the regional express image and the express order in the panoramic express image. It should be noted that in the process of determining the similarity between a certain express order in the regional express image and each express order in the panoramic express image, the detection frame may be used to traverse each express order in the panoramic express image. Afterwards, the correspondence between the position information of the express order in the panoramic express image and the position information of the express order in the regional express image may be stored. In this way, the local express image may be combined with the panoramic express image, and the target express package may be located in the panoramic image by identifying the local image with a clear front face. This method may increase the number of express packages identified at a single time, and further improve the efficiency of finding express packages.
[0089] Reference below Figure 7 , which shows an electronic device (eg, Figure 1A schematic diagram of the structure of a server or terminal device in FIG. 700. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0090] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0091] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0092] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium described in the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus, or a device. In an embodiment of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
[0093] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives a courier location request, wherein the courier location request is used to locate the courier note corresponding to the target courier package from the courier image presenting the courier package, and the courier location request includes courier information; searches for the location information of the courier note that is pre-stored and corresponds to the courier information; generates a courier location result image using the location information, wherein the courier location result image includes a location identifier, and the location identifier is used to indicate the courier note corresponding to the target courier package from the courier image; and outputs the courier location result image.
[0094] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0095] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0096] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor includes a receiving unit, a search unit, a generating unit, and an output unit. The names of these units do not constitute limitations on the units themselves in certain circumstances, for example, the output unit may also be described as a "unit for outputting an image of a courier location result".
[0097] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A method for locating an express package, comprising: receiving a courier location request, wherein the courier location request is used to locate a courier bill corresponding to a target courier package from a courier image showing the courier package, the courier location request includes courier information, the courier image includes a regional courier image, and the regional courier image is used to present some courier packages among all courier packages; Searching for location information of the express delivery slip in a pre-stored regional express delivery image corresponding to the express delivery information; Generate a courier location result image using the location information, wherein the courier location result image includes a location mark, and the location mark is used to indicate the courier bill corresponding to the target courier package from the regional courier image; The courier positioning result image is output to the courier's terminal device.
2. The method according to claim 1, wherein: Before receiving the express location request, the method includes: Acquire the express image showing the express package; Based on the express image and a pre-trained express recognition model, determine the location information of each express order and the express information on each express order in at least one express order recognized from the express image; The location information of each express delivery note in the at least one express delivery note is associated with the corresponding express delivery information and stored.
3. The method according to claim 2, wherein: The express identification model includes an express detection model, an express location identification model and an express information identification model; and The step of determining, based on the express image and the pre-trained express recognition model, the location information of each express order and the express information on each express order in at least one express order recognized from the express image comprises: Determine a courier order area in the regional courier image based on the regional courier image and the courier detection model; Input the express order area into the express location recognition model to obtain the location information of each express order in at least one express order; The express order area is input into the express information identification model to obtain the express information on each express order in at least one express order.
4. The method according to claim 3, wherein: The express delivery detection model includes an express delivery order detection model and an express package detection model; as well as The determining, based on the regional express image and the express detection model, the express order area in the regional express image comprises: Inputting the regional express image into the express bill detection model, obtaining at least one initial express bill region detected from the regional express image and a prediction probability corresponding to each initial express bill region in the at least one initial express bill region; Inputting the regional express image into the express parcel detection model, obtaining at least one express parcel region detected from the regional express image and a prediction probability corresponding to each express parcel region in the at least one express parcel region; The courier order area in the regional courier image is determined based on the at least one initial courier order area, the predicted probability corresponding to each initial courier order area in the at least one initial courier order area, the at least one courier parcel area, and the predicted probability corresponding to each courier parcel area in the at least one courier parcel area.
5. The method according to claim 3 or 4, wherein: The express image includes a panoramic express image, and the express recognition model also includes a panoramic recognition model; and The step of determining, based on the express image and the pre-trained express recognition model, the location information of each express order and the express information on each express order in at least one express order recognized from the express image comprises: Inputting the regional express image and the panoramic express image into the panoramic recognition model to obtain a corresponding relationship between the position information of the express bill in the panoramic express image and the position information of the express bill in the regional express image; The correspondence between the position information of the express delivery slip in the panoramic express delivery image and the position information of the express delivery slip in the regional express delivery image is stored.
6. A device for locating a courier package, comprising: A receiving unit is configured to receive a courier location request, wherein the courier location request is used to locate a courier bill corresponding to a target courier package from a courier image showing the courier package, the courier location request includes courier information, the courier image includes a regional courier image, and the regional courier image is used to present some courier packages among all courier packages; A search unit configured to search for location information of a courier order in a pre-stored regional courier image corresponding to the courier information; A generating unit is configured to generate a courier location result image using the location information, wherein the courier location result image includes a location mark, and the location mark is used to indicate the courier bill corresponding to the target courier package from the regional courier image; The output unit is configured to output the express positioning result image to the courier's terminal device.
7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
System for systematic improving of express delivery efficiency
CN107368983A