Parcel tracing method, device, equipment, medium and program product
By obtaining the image and logistics information of logistics packages, combining the image feature extraction model, the parcel similarity is automatically calculated, which solves the problem of time-consuming and labor-intensive existing parcel traceability and achieves efficient and accurate parcel traceability.
Patent Information
- Application Number
- CN202411667790.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-20
AI Technical Summary
The existing logistics package traceability method is time-consuming and labor-intensive, increasing labor costs and reducing traceability efficiency and accuracy.
By obtaining the image and logistics information of the target package, the package image of the target site within the target time period is determined, the image feature extraction model is used to calculate the package similarity, and the traceability results of the target package in the site are automatically determined.
Automatic traceability of packages is realized, traceability efficiency and accuracy are improved, and manual participation is reduced.
Smart Images

Figure CN119648100A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to logistics technology, and in particular to a package tracing method, device, equipment, medium and program product. Background Art
[0002] The full-process traceability of logistics packages plays an important role in the operation and management of logistics. It can locate the packages in each link, provide clues for returns and loss prevention, and improve efficiency.
[0003] At present, the tracking of logistics packages is mainly done by manual methods, such as manually tracing back logistics videos to locate packages. However, in the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] Existing package tracing methods are time-consuming and labor-intensive, increasing labor costs and reducing the efficiency and accuracy of package tracing. Summary of the invention
[0005] The embodiments of the present invention provide a package tracing method, device, equipment, medium and program product to realize automatic tracing of packages, thereby improving the efficiency and accuracy of package tracing.
[0006] In a first aspect, an embodiment of the present invention provides a package tracing method, comprising:
[0007] Obtain a target package image corresponding to the target package to be traced;
[0008] Based on actual logistics information of the target package, determine a target time period in which the target package appears at a target location;
[0009] Acquire a first package image corresponding to each first package that appears at the target location within the target time period;
[0010] Determine, based on the image feature extraction model, the target package image and each of the first package images, a package similarity between the target package and each of the first packages, and determine, from the first packages, a second package whose package similarity is greater than or equal to a preset similarity;
[0011] The tracing is performed based on the second package image corresponding to the second package to determine a tracing result of the target package in the target site.
[0012] In a second aspect, an embodiment of the present invention further provides a package tracing device, comprising:
[0013] A target package image acquisition module is used to acquire a target package image corresponding to the target package to be traced;
[0014] A target time period determination module, used to determine a target time period for the target package to appear at a target location based on actual logistics information of the target package;
[0015] A first package image acquisition module, used to acquire a first package image corresponding to each first package that appears at the target site within the target time period;
[0016] A second package determining module, configured to determine a package similarity between the target package and each of the first packages based on an image feature extraction model, the target package image, and each of the first package images, and to determine a second package from the first packages whose package similarity is greater than or equal to a preset similarity;
[0017] The tracing result determination module is used to perform tracing based on the second package image corresponding to the second package, and determine the tracing result of the target package in the target site.
[0018] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0019] one or more processors;
[0020] A memory for storing one or more programs;
[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the package tracing method provided by any embodiment of the present invention.
[0022] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a package tracing method as provided in any embodiment of the present invention.
[0023] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements a package tracing method as provided in any embodiment of the present invention.
[0024] One embodiment of the above invention has the following advantages or beneficial effects:
[0025] Based on the actual logistics information of the target package to be traced, the target time period in which the target package appears at the target site is determined, thereby achieving coarse-grained positioning of the package. By obtaining the first package image corresponding to each first package that appears at the target site within the target time period, and based on the image feature extraction model, the target package image and each first package image, the package similarity between the target package and each first package can be automatically determined, and a second package whose package similarity is greater than or equal to a preset similarity can be determined from the first package, and the traceability is performed based on the second package image corresponding to the second package, and the traceability result of the target package in the target site is determined, thereby achieving fine-grained positioning of the package. The entire traceability process does not require human participation, realizing automatic traceability of the package, and improving the efficiency and accuracy of package traceability. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 is a flow chart of a package tracing method provided by an embodiment of the present invention;
[0028] Figure 2 is a flow chart of another package tracing method provided by one embodiment of the present invention;
[0029] Figure 3 It is a structural schematic diagram of a package tracing device provided by an embodiment of the present invention;
[0030] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention 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 present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0032] Figure 1 This is a flowchart of a package tracing method provided by an embodiment of the present invention. This embodiment is applicable to the situation of tracing and locating logistics packages. The method can be executed by a package tracing device, which can be implemented by software and / or hardware and integrated into an electronic device. Figure 1As shown, the method specifically comprises the following steps:
[0033] S110: Acquire a target package image corresponding to the target package to be traced.
[0034] The target package refers to the logistics package that needs to be traced. The target package can be any package that has been shipped. The target package image can refer to an image obtained by photographing the target package. The target package image contains only one logistics package, the target package, and no information about other packages exists. That is, the target package image is an image of a single package.
[0035] Specifically, each logistics package to be shipped can be photographed in advance to obtain the package image corresponding to each package, and these package images can be archived for traceability. After the package is shipped, when a target package needs to be traced, the target package image corresponding to the target package can be directly extracted from all the pre-stored package images, so that the target package image can be used as a reference for package re-identification.
[0036] S120: Determine a target time period in which the target package appears at a target location based on actual logistics information of the target package.
[0037] Among them, the actual logistics information may refer to the logistics information actually generated after the target package is shipped. The actual logistics information may include the site information that the target package passes through during the actual transportation and distribution process. For example, the actual logistics information may specifically include the time when the target package enters and leaves the site, which can be obtained by scanning the target package when entering and leaving the site. The site may refer to a distribution center used for sorting and distributing packages. Usually the scale of the site is large, so it is necessary to locate the specific location of the package in the site to achieve fine-grained positioning. The target site may refer to the site where the target package currently needs to be traced. The number of target sites can be one or more, which can be specifically determined based on business needs.
[0038] Specifically, after the logistics package is shipped, surveillance cameras, barcode scanners and other equipment can be used to collect records of the logistics package in the logistics processing process. By using the actual logistics information of the target package, the target package can be coarsely located to determine the target time period when the target package appears at the target site after it is shipped. For example, in the return business, it is necessary to quickly intercept the package that is already in the logistics process, so that the target site where the target package is currently located can be determined based on the current location information of the target package, and the target time period when the target package appears at the target site can be determined based on the time when the target package enters the target site. The target time period is: the time period from the time of entering the target site to the current time, so as to locate the specific location of the target package in the target site, and then intercept it in time to avoid excessive logistics costs. For example, in the loss prevention business, it is necessary to provide location records of damaged logistics packages in various venues, so that each venue that the target package actually passes through can be determined as the target venue, and based on the time when the target package enters and leaves each target venue, the target time period when the target package appears in each target venue is determined, that is, the time period from the time of entering the target venue to the time of leaving the target venue, so as to locate the specific position of the target package in each target venue, and then accurately determine at which link the target package was damaged, which is convenient for accountability.
[0039] S130: Acquire a first package image corresponding to each first package that appears at a target location within a target time period.
[0040] The first package refers to each logistics package entering the target site. The first package includes the target package. The first package image refers to the image obtained by photographing the first package. Each first package image contains only the information of a single package, and does not contain information of multiple packages. The first package image corresponds to the first package one by one. It should be noted that the first package image can be an image captured by different cameras.
[0041] Specifically, the target site will shoot and scan each first package that enters the target site, so that a first package image corresponding to each first package that enters the target site within the target time period can be obtained. It should be noted that if there are at least two first packages in the captured image, the image needs to be cropped to obtain a first package image corresponding to each first package. There is only one package in the main position of each first package image, that is, only one package reflects the whole picture and occupies a main position, such as being located in the center area of the image.
[0042] S140: Determine a package similarity between the target package and each first package based on the image feature extraction model, the target package image, and each first package image, and determine a second package from the first packages whose package similarity is greater than or equal to a preset similarity.
[0043] The image feature extraction model may be a network model for extracting abstract visual features of a package in an image. The image feature extraction model may be any neural network capable of extracting features. For example, the image feature extraction model may be, but is not limited to, a package re-identification ReID model. The image feature extraction model may be obtained by pre-training based on sample package images collected at multiple shooting angles. When training the image feature extraction model, three images are extracted each time, two of which are images of the same package and one is an image of another package. The hinge loss of the three images is calculated, and the model is trained using the stochastic gradient descent method so that the distance between the feature vectors corresponding to the same package is as small as possible, and the distance between the feature vectors corresponding to different packages is as large as possible, thereby obtaining an image feature extraction model capable of accurately extracting image features. Package similarity may refer to the degree of similarity between two packages, which may be characterized by the distance between two feature vectors, such as the cosine distance. The preset similarity may be a pre-set minimum similarity that can be considered to belong to the same package. The second package refers to the first package whose package similarity is greater than or equal to the preset similarity.
[0044] Specifically, by utilizing a pre-trained image feature extraction model, feature extraction is performed on the target package image and each first package image to obtain abstract visual feature information of the target package and each first package, and the package similarity between the target package and each first package is determined based on the feature information of different packages, and the package similarity corresponding to each first package is compared with a preset similarity to obtain a second package whose package similarity is greater than or equal to the preset similarity.
[0045] Illustratively, “determining the package similarity between the target package and each first package based on the image feature extraction model, the target package image and each first package image” in step S140 may include: performing feature extraction on the target package image and each first package image based on the image feature extraction model to obtain target package feature information corresponding to the target package and first package feature information corresponding to each first package; determining the distance between the target package feature information and each first package feature information, and determining the package similarity between the target package and the first packages based on the distance.
[0046] Specifically, the target package image is input into the pre-trained image feature extraction model for feature extraction, and the target package feature information corresponding to the target package is obtained. The target package feature information can be represented in the form of a feature vector. Each first package image is input into the pre-trained image feature extraction model for feature extraction, and the first package feature information corresponding to each first package is obtained. Each first package feature information can also be represented in the form of a feature vector. The distance between the target package feature information and each first package feature information can be determined based on the cosine distance formula, such as the cosine distance. Since the distance is inversely proportional to the package similarity, that is, the smaller the distance, the greater the package similarity, the result obtained by multiplying the distance by a negative weight value (such as -1) can be used as the package similarity between the target package and the first package, or a second package whose distance is less than or equal to the preset distance can be directly determined from the first package. Among them, the preset distance corresponds to the preset similarity.
[0047] S150: Perform tracing based on the second package image corresponding to the second package to determine a tracing result of the target package in the target site.
[0048] The traceability result may refer to a specific record of the target package appearing in the target venue. For example, the traceability result may include: each appearance location of the target package in the target venue and the appearance time corresponding to each appearance location, and / or the package status of the target package at each appearance location. The package status may refer to whether the package is in a damaged state, etc.
[0049] Specifically, the second package can be directly considered as the target package that appears in the target venue, that is, the second package and the target package belong to the same package, thereby realizing cross-camera package re-identification. In view of this, the second package image corresponding to each second package can be directly analyzed for business to obtain the traceability result of the target package in the target venue. For example, based on the acquisition time (i.e., camera shooting time) and acquisition position (i.e., camera installation position) of the second package image corresponding to each second package, the appearance position and appearance time of the target package in the target venue are determined; and / or, the second package image corresponding to each second package is identified for the package status to determine the package status of the target package in the target venue. By tracing using the second package image that belongs to the same package as the target package, the specific location and specific time when the target package appears in the target venue can be located in a fine-grained manner, thereby realizing more detailed package tracing and improving the accuracy of package tracing.
[0050] The technical solution of this embodiment determines the target time period in which the target package appears at the target site based on the actual logistics information of the target package to be traced, thereby achieving coarse-grained positioning of the package. By obtaining the first package image corresponding to each first package that appears at the target site within the target time period, and based on the image feature extraction model, the target package image and each first package image, the package similarity between the target package and each first package can be automatically determined, and a second package whose package similarity is greater than or equal to a preset similarity can be determined from the first package, and the traceability is performed based on the second package image corresponding to the second package, and the traceability result of the target package in the target site is determined, thereby achieving fine-grained positioning of the package. The entire traceability process does not require human participation, and the automatic traceability of the package is realized, which improves the efficiency and accuracy of package traceability.
[0051] Based on the above technical solution, step S130 may include: obtaining a logistics image captured by a camera at the target site within the target time period; performing package detection on the logistics image to determine a first package image corresponding to each first package appearing at the target site within the target time period.
[0052] The camera may refer to a camera used to monitor the transportation of packages in the target site, such as a camera installed above a conveyor belt. The logistics image is an image obtained by the camera regularly photographing the logistics packages entering the target site. There may be multiple cameras in the target site to monitor each link of the package in the target site. The number of packages in the logistics image may be one or more.
[0053] Specifically, for each target site, all logistics images captured by the camera of the target site within the target time period can be obtained from the database. For each logistics image, the packages in the logistics image can be detected to determine the number of packages in the logistics image. If there is only one package in the logistics image, the package is taken as the first package, and the logistics image is taken as the first package image corresponding to the first package. If there are multiple packages in the logistics image, each package in the logistics image is taken as the first package, and the logistics image is cropped and segmented to obtain the sub-image corresponding to each first package, that is, to obtain the first package image corresponding to each first package. It should be noted that if the size of the first package image is different from the size of the target package image, the first package image can be scaled to obtain a first package image of the same size as the target package image to facilitate image comparison.
[0054] Exemplarily, performing package detection on a logistics image to determine a first package image corresponding to each first package that appears at a target site within a target time period may include: detecting and identifying packages in the logistics image based on a package recognition model to obtain location information of each first package in the logistics image; and cropping the logistics image based on the location information of each first package to obtain a first package image corresponding to each first package that appears at the target site within the target time period.
[0055] The package recognition model may be a network model for identifying packages. The network architecture of the package recognition model may be the architecture of any target detection model, such as a YOLOv9 model. The package recognition model may be pre-trained based on a sample image and the location information of each package in the sample image to ensure the accuracy of the model in identifying the package. There may be multiple packages in the sample image. The location information of each package may be marked with a rectangular frame.
[0056] Specifically, for each logistics image, the logistics image is input into the package recognition model for package detection and recognition, and the location information of each first package in the logistics image is obtained, and the location information can be represented by a rectangular frame. According to the location information of each first package, the logistics image is cropped and segmented, and the local image at the location of each first package is obtained as the first package image, so that the package image corresponding to a single package can be obtained quickly and accurately.
[0057] Figure 2 A flowchart of another package tracing method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment optimizes the step of "tracing based on the second package image corresponding to the second package to determine the tracing result of the target package in the target site". The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0058] See also Figure 2 Another package tracing method provided in this embodiment specifically includes the following steps:
[0059] S210: Obtain a target package image corresponding to the target package to be traced.
[0060] S220: Determine a target time period in which the target package appears at a target location based on actual logistics information of the target package.
[0061] S230: Acquire a first package image corresponding to each first package that appears at a target location within a target time period.
[0062] S240: Determine a package similarity between the target package and each first package based on the image feature extraction model, the target package image, and each first package image, and determine a second package from the first packages whose package similarity is greater than or equal to a preset similarity.
[0063] S250: Predict package attribute information based on the attribute prediction model, the target package image, and the second package image corresponding to each second package, to obtain target package attribute information corresponding to the target package and second package attribute information corresponding to each second package.
[0064] Among them, attribute information refers to the characteristic information of the package itself, that is, the concrete visual features. The attribute prediction model can be a classification network model used to predict whether a package has each attribute information. The attribute prediction model can be pre-trained on real package image data using a cross entropy loss function and a stochastic gradient descent method to ensure the accuracy of attribute prediction. The real package image data can include sample package images collected from multiple shooting angles and actual attribute information of the sample packages. The type and quantity of attribute information can be configured based on business needs.
[0065] Exemplarily, the target package attribute information may include, but is not limited to, at least one of the color attribute information, shape attribute information, face sheet attribute information, and rolling strip attribute information of the target package. The second package attribute information may include, but is not limited to, at least one of the color attribute information, shape attribute information, face sheet attribute information, and rolling strip attribute information of the second package. The attribute prediction model may be used to predict the color attribute information, shape attribute information, face sheet attribute information, and rolling strip attribute information of the package. Among them, the color attribute information may refer to the color information of the package appearance, which may be divided into brown, white, blue, etc. The shape attribute information may refer to the specific shape of the package, which may be divided into a cuboid close to a cube, a flat cuboid, a long strip, and a bag. The face sheet attribute information may refer to the face sheet position information on the package, which may be divided into the face sheet in the middle position, the face sheet at the edge position, the face sheet in the corner position, etc. The rolling strip attribute information may refer to whether the package has a cable tie, that is, it may be divided into cable tie and no cable tie.
[0066] Specifically, the target package image is input into the attribute prediction model to predict the package attribute information, obtain the first probability value that the target package has each package attribute information, and determine the target package attribute information corresponding to the target package based on the first probability value. For example, the first probability value of each attribute value of each attribute predicted for the target package is compared to obtain the largest first probability value of each attribute. If the largest first probability value is greater than or equal to the preset probability value, it is determined that the target package has this attribute, and the attribute value corresponding to the largest first probability value is determined as the specific attribute information of the target package having this attribute, thereby obtaining all the attribute information of the target package. Similarly, for each second package, the second package image corresponding to the second package is input into the attribute prediction model to predict the package attribute information, obtain the second probability value that the second package has each package attribute information, and determine the second package attribute information corresponding to each second package based on the second probability value. For example, the second probability values of each attribute value of each attribute predicted for the second package are compared to obtain the maximum second probability value of each attribute. If the maximum second probability value is greater than or equal to the preset probability value, it is determined that the target package has this attribute, and the attribute value corresponding to the maximum second probability value is determined as the specific attribute information of the second package having this attribute, thereby obtaining all the attribute information of the second package.
[0067] Exemplarily, the attribute prediction model may include a feature extraction sub-model and multiple classification sub-models. The feature extraction sub-model may be used to extract input image features, such as a residual network Resnet, etc. The classification sub-model corresponds to the attribute information one by one. Each classification sub-model may be activated using a sigmoid function to predict the probability value of having the corresponding attribute information.
[0068] S260: Compare the target package attribute information with the second package attribute information to obtain a third package having the same attribute information as the target package.
[0069] Specifically, by comparing the target package attribute information with each second package attribute information, a third package having the same attribute information as the target package is obtained from all the second packages. The third package is a package that is very similar to the target package and has the same attribute information.
[0070] S270: Perform tracing based on the third package image corresponding to the third package to determine a tracing result of the target package in the target site.
[0071] The traceability result may refer to a specific record of the target package appearing in the target venue. For example, the traceability result may include: each appearance location of the target package in the target venue and the appearance time corresponding to each appearance location, and / or the package status of the target package at each appearance location. The package status may refer to whether the package is in a damaged state, etc.
[0072] Specifically, since the third package is very similar to the target package and has the same attribute information, the second package can be considered to be the target package that appears in the target venue, that is, the third package and the target package belong to the same package, so by comparing the abstract features and the concrete features at the same time, the accuracy of package tracing can be further improved. By performing business analysis on the third package image corresponding to each third package, the tracing result of the target package in the target venue can be obtained more accurately.
[0073] Exemplarily, step S270 may include: determining the appearance position and appearance time of the target package in the target venue based on the acquisition time and acquisition position of the third package image corresponding to the third package; and / or, performing package status recognition on the third package image corresponding to the third package to determine the package status of the target package in the target venue.
[0074] Specifically, the acquisition time (i.e., camera shooting time) of the third package image corresponding to each third package can be used as the appearance time of the target package in the target venue, and the package transportation position corresponding to the acquisition position (i.e., camera installation position) can be used as the appearance position of the target package within the appearance time, so that all the appearance positions and corresponding appearance times of the target package in the target venue can be obtained. The third package image corresponding to each third package can also be identified through image processing technology to determine the package status of the target package at each appearance position, such as whether the package is damaged. By using the third package image that belongs to the same package as the target package for tracing, the specific location, time, and status of the target package in the target venue can be more accurately located, thereby achieving more detailed package tracing and improving the accuracy of package tracing.
[0075] The technical solution of this embodiment can accurately obtain the target package attribute information corresponding to the target package and the second package attribute information corresponding to each second package by using the attribute prediction model to predict the package attribute information, and compare the target package attribute information with the second package attribute information to obtain a third package with the same attribute information as the target package, thereby further improving the accuracy of package tracing by simultaneously comparing abstract features and concrete features.
[0076] The following is an embodiment of a parcel tracing device provided by an embodiment of the present invention. The device and the parcel tracing methods of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the parcel tracing device, reference can be made to the embodiment of the above parcel tracing method.
[0077] Figure 3 This is a schematic diagram of the structure of a package tracing device provided by an embodiment of the present invention. This embodiment is applicable to the situation of tracing and locating logistics packages. Figure 3 As shown, the device specifically includes: a target package image acquisition module 310, a target time period determination module 320, a first package image acquisition module 330, a second package determination module 340 and a tracing result determination module 350.
[0078] Among them, the target package image acquisition module 310 is used to acquire the target package image corresponding to the target package to be traced; the target time period determination module 320 is used to determine the target time period in which the target package appears at the target site based on the actual logistics information of the target package; the first package image acquisition module 330 is used to acquire the first package image corresponding to each first package that appears at the target site within the target time period; the second package determination module 340 is used to determine the package similarity between the target package and each of the first packages based on the image feature extraction model, the target package image and each of the first package images, and determine the second package from the first packages whose package similarity is greater than or equal to the preset similarity; the tracing result determination module 350 is used to perform tracing based on the second package image corresponding to the second package, and determine the tracing result of the target package in the target site.
[0079] The technical solution of this embodiment determines the target time period in which the target package appears at the target site based on the actual logistics information of the target package to be traced, thereby achieving coarse-grained positioning of the package. By obtaining the first package image corresponding to each first package that appears at the target site within the target time period, and based on the image feature extraction model, the target package image and each first package image, the package similarity between the target package and each first package can be automatically determined, and a second package whose package similarity is greater than or equal to a preset similarity can be determined from the first package, and the traceability is performed based on the second package image corresponding to the second package, and the traceability result of the target package in the target site is determined, thereby achieving fine-grained positioning of the package. The entire traceability process does not require human participation, and the automatic traceability of the package is realized, which improves the efficiency and accuracy of package traceability.
[0080] Optionally, the first package image acquisition module 330 includes:
[0081] A logistics image acquisition unit, used to acquire logistics images captured by a camera at the target site within the target time period;
[0082] The first package image acquisition unit is used to perform package detection on the logistics image to determine a first package image corresponding to each first package that appears in the target site within the target time period.
[0083] Optionally, the first package image acquisition unit is specifically configured to:
[0084] Based on the package recognition model, the packages in the logistics image are detected and identified to obtain the location information of each first package in the logistics image; based on the location information of each first package, the logistics image is cropped to obtain the first package image corresponding to each first package that appears in the target site within the target time period.
[0085] Optionally, the second package determination module 340 is specifically configured to:
[0086] Based on the image feature extraction model, feature extraction is performed on the target package image and each of the first package images to obtain target package feature information corresponding to the target package and first package feature information corresponding to each of the first packages; the distance between the target package feature information and each of the first package feature information is determined, and the package similarity between the target package and the first package is determined based on the distance.
[0087] Optionally, the tracing result determination module 350 includes:
[0088] an attribute information prediction unit, configured to predict the package attribute information based on the attribute prediction model, the target package image, and the second package image corresponding to each of the second packages, and obtain the target package attribute information corresponding to the target package and the second package attribute information corresponding to each of the second packages;
[0089] A third package determining unit, configured to compare the target package attribute information with the second package attribute information to obtain a third package having the same attribute information as the target package;
[0090] The tracing result determining unit is configured to perform tracing based on the third package image corresponding to the third package, and determine a tracing result of the target package in the target site.
[0091] Optionally, the target package attribute information includes: at least one of color attribute information, shape attribute information, label attribute information and strip attribute information of the target package;
[0092] The second package attribute information includes: at least one of the color attribute information, shape attribute information, label attribute information and strip attribute information of the second package.
[0093] Optionally, the tracing result determination unit is specifically used to:
[0094] Determine the appearance position and appearance time of the target package in the target venue based on the acquisition time and acquisition position of the third package image corresponding to the third package; and / or, perform package status recognition on the third package image corresponding to the third package to determine the package status of the target package in the target venue.
[0095] The parcel tracing device provided in the embodiment of the present invention can execute the parcel tracing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the parcel tracing method.
[0096] It is worth noting that in the embodiment of the above-mentioned package tracing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0097] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0098] like Figure 4 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0099] 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 or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0100] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0101] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory 30 (RAM) and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0102] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system 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 of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0103] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0104] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a package tracing method provided by any embodiment of the present invention, the method comprising:
[0105] Obtain a target package image corresponding to the target package to be traced;
[0106] Based on actual logistics information of the target package, determine a target time period in which the target package appears at a target location;
[0107] Acquire a first package image corresponding to each first package that appears at the target location within the target time period;
[0108] Determine, based on the image feature extraction model, the target package image and each of the first package images, a package similarity between the target package and each of the first packages, and determine, from the first packages, a second package whose package similarity is greater than or equal to a preset similarity;
[0109] The tracing is performed based on the second package image corresponding to the second package to determine a tracing result of the target package in the target site.
[0110] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the package tracing method provided by any embodiment of the present invention.
[0111] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the package tracing method provided in any embodiment of the present invention are implemented. The method includes:
[0112] Obtain a target package image corresponding to the target package to be traced;
[0113] Based on actual logistics information of the target package, determine a target time period in which the target package appears at a target location;
[0114] Acquire a first package image corresponding to each first package that appears at the target location within the target time period;
[0115] Determine, based on the image feature extraction model, the target package image and each of the first package images, a package similarity between the target package and each of the first packages, and determine, from the first packages, a second package whose package similarity is greater than or equal to a preset similarity;
[0116] The tracing is performed based on the second package image corresponding to the second package to determine a tracing result of the target package in the target site.
[0117] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. 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 (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, 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 this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0118] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. 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. Computer-readable signal media 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 conjunction with an instruction execution system, apparatus, or device.
[0119] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0120] Computer program code for performing the operations of the present invention 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 the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through 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).
[0121] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the package tracing method provided by any embodiment of the present invention.
[0122] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0123] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0124] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A package tracing method, characterized in that: include: Obtain a target package image corresponding to the target package to be traced; Based on actual logistics information of the target package, determine a target time period in which the target package appears at a target location; Acquire a first package image corresponding to each first package that appears at the target location within the target time period; Determine, based on the image feature extraction model, the target package image and each of the first package images, a package similarity between the target package and each of the first packages, and determine, from the first packages, a second package whose package similarity is greater than or equal to a preset similarity; The tracing is performed based on the second package image corresponding to the second package to determine a tracing result of the target package in the target site.
2. The method according to claim 1, characterized in that The acquiring of the first package image corresponding to each first package that appears at the target site within the target time period includes: Acquire logistics images captured by a camera at the target site within the target time period; Package detection is performed on the logistics image to determine a first package image corresponding to each first package that appears at the target site within the target time period.
3. The method according to claim 2, characterized in that The performing package detection on the logistics image to determine a first package image corresponding to each first package appearing at the target site within the target time period includes: Based on the package recognition model, detect and identify the packages in the logistics image to obtain the location information of each first package in the logistics image; The logistics image is cropped based on the location information of each first package to obtain a first package image corresponding to each first package that appears at the target site within the target time period.
4. The method according to claim 1, characterized in that: The determining, based on the image feature extraction model, the target package image and each of the first package images, the package similarity between the target package and each of the first packages includes: Based on the image feature extraction model, feature extraction is performed on the target package image and each of the first package images to obtain target package feature information corresponding to the target package and first package feature information corresponding to each of the first packages; The distance between the target package feature information and each of the first package feature information is determined, and the package similarity between the target package and the first package is determined based on the distance.
5. The method according to claim 1, characterized in that The tracing based on the second package image corresponding to the second package to determine the tracing result of the target package in the target site includes: Predicting package attribute information based on the attribute prediction model, the target package image, and the second package image corresponding to each of the second packages, to obtain target package attribute information corresponding to the target package and second package attribute information corresponding to each of the second packages; Comparing the target package attribute information with the second package attribute information to obtain a third package having the same attribute information as the target package; The tracing is performed based on the third package image corresponding to the third package to determine the tracing result of the target package in the target site.
6. The method according to claim 5, characterized in that The target package attribute information includes: at least one of the color attribute information, shape attribute information, label attribute information and strip attribute information of the target package; The second package attribute information includes: at least one of the color attribute information, shape attribute information, label attribute information and stripping attribute information of the second package.
7. The method according to claim 5, characterized in that The tracing based on the third package image corresponding to the third package to determine the tracing result of the target package in the target site includes: Determining the appearance position and appearance time of the target package in the target venue based on the acquisition time and acquisition position of the third package image corresponding to the third package; and / or, Perform package status recognition on the third package image corresponding to the third package to determine the package status of the target package in the target site.
8. A package tracing device, characterized in that: include: A target package image acquisition module is used to acquire a target package image corresponding to the target package to be traced; A target time period determination module, used to determine a target time period for the target package to appear at a target location based on actual logistics information of the target package; A first package image acquisition module, used to acquire a first package image corresponding to each first package that appears at the target site within the target time period; A second package determining module, configured to determine a package similarity between the target package and each of the first packages based on an image feature extraction model, the target package image, and each of the first package images, and to determine a second package from the first packages whose package similarity is greater than or equal to a preset similarity; The tracing result determination module is used to perform tracing based on the second package image corresponding to the second package, and determine the tracing result of the target package in the target site.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the parcel tracing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the package tracing method as described in any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the package tracing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method, device and system for tracing parcel, electronic equipment and storage medium
CN113617698A
Express problem parcel image retrieval method and device, equipment and storage medium
CN113821671A
Parcel tracing method, device and system and computer readable storage medium
CN114950977A
Image matching method, device and equipment
CN116563584A
Personal article association tracking method and system based on target detection algorithm
CN118097568A