A package trace method, apparatus, device, medium and program product
By acquiring images and logistics information of target packages and utilizing image feature extraction and attribute prediction models, the location and status of logistics packages can be automatically traced, solving the time-consuming and labor-intensive problems of existing technologies and improving traceability efficiency and accuracy.
Patent Information
- Application Number
- CN202411667790.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-11-20
AI Technical Summary
Existing methods for tracing logistics parcels are time-consuming and labor-intensive, increasing labor costs and reducing traceability efficiency and accuracy.
By acquiring images and logistics information of the target package, and utilizing image feature extraction and attribute prediction models, the time period and location of the package at the site can be automatically determined, thus enabling automatic tracking of the package.
It enables automatic tracking of packages, improves tracking efficiency and accuracy, reduces manual intervention, and achieves fine-grained positioning.
Smart Images

Figure CN119648100B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to logistics technology, and in particular to a package tracing method, device, equipment, medium and program product. BACKGROUND
[0002] Full-process tracing of logistics packages plays an important role in the operation and management of logistics, and can locate packages at each link, provide clues for return and loss prevention, and improve efficiency.
[0003] At present, the tracing of logistics packages is mainly performed by manually locating packages, such as manually tracing logistics videos to locate packages. However, in the process of implementing the present application, the inventors have found that at least the following problems exist in the prior art:
[0004] The existing package tracing method is time-consuming and labor-intensive, increases labor costs, and reduces the efficiency and accuracy of package tracing. SUMMARY
[0005] Embodiments of the present application provide a package tracing method, device, equipment, medium and program product to realize automatic tracing of packages and improve the efficiency and accuracy of package tracing.
[0006] In a first aspect, embodiments of the present application provide a package tracing method, comprising:
[0007] obtaining a target package image corresponding to a target package to be traced;
[0008] determining a target time period in which the target package appears at a target site based on actual logistics information of the target package;
[0009] obtaining a first package image corresponding to each first package appearing at the target site within the target time period;
[0010] determining a package similarity between the target package and each first package based on an image feature extraction model, the target package image and each first package image, and determining a second package from the first packages whose package similarity is greater than or equal to a preset similarity;
[0011] tracing based on a 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, embodiments of the present application also provide a package tracing device, comprising:
[0013] a target package image acquisition module configured to obtain a target package image corresponding to a target package to be traced;
[0014] a target time period determination module configured to determine a target time period when the target package appears at a target site based on actual logistics information of the target package;
[0015] a first package image acquisition module configured to acquire a first package image corresponding to each first package that appears at the target site during the target time period;
[0016] a second package determination module configured to determine a package similarity between the target package and each first package based on an image feature extraction model, the target package image and each first package image, and determine a second package from the first packages, wherein the package similarity of the second package is greater than or equal to a preset similarity;
[0017] a trace result determination module configured to determine a trace result of the target package in the target site based on a second package image corresponding to the second package.
[0018] In a third aspect, an electronic device is provided, and the electronic device comprises:
[0019] one or more processors;
[0020] a memory configured to store 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 trace method provided in any embodiment of the present application.
[0022] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, which, when executed by a processor, implements the package trace method provided in any embodiment of the present application.
[0023] In a fifth aspect, a computer program product is provided, and the computer program product comprises a computer program, which, when executed by a processor, implements the package trace method provided in any embodiment of the present application.
[0024] An embodiment of the above application has the following advantages or beneficial effects:
[0025] The target time period in which the target parcel appears at the target site is determined based on actual logistics information of the target parcel to be traced, so as to realize coarse-grained positioning of the parcel. By acquiring a first parcel image corresponding to each first parcel appearing at the target site in the target time period, and based on an image feature extraction model, a target parcel image and each first parcel image, the parcel similarity between the target parcel and each first parcel can be automatically determined, and a second parcel with a parcel similarity greater than or equal to a preset similarity is determined from the first parcel, a second parcel image corresponding to the second parcel is used for tracing, and a tracing result of the target parcel in the target site is determined, so as to realize fine-grained positioning of the parcel. The entire tracing process does not require manual intervention, realizes automatic tracing of the parcel, and improves the efficiency and accuracy of parcel tracing. BRIEF DESCRIPTION OF DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings described below are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0027] Figure 1 is a flowchart of a parcel tracing method provided by an embodiment of the present application;
[0028] Figure 2 is a flowchart of another parcel tracing method provided by an embodiment of the present application;
[0029] Figure 3 is a structural schematic diagram of a parcel tracing device provided by an embodiment of the present application;
[0030] Figure 4 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0031] The present application will be further described below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, and not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, not all the structures.
[0032] Figure 1 is a flowchart of a parcel tracing method provided by an embodiment of the present application, and the present embodiment can be applied to the case of tracing and positioning a logistics parcel. The method can be executed by a parcel tracing device, which can be realized by software and / or hardware, and integrated in an electronic device. As shown in Figure 1As shown, the method specifically includes the following steps:
[0033] S110, obtaining a target parcel image corresponding to a target parcel to be traced.
[0034] The target parcel refers to a logistics parcel that needs to be traced at present. The target parcel can be any parcel that has been shipped. The target parcel image can refer to an image obtained by photographing the target parcel. In the target parcel image, there is only one logistics parcel, i.e., the target parcel, and there is no information of other parcels, that is, the target parcel image is an image of a single parcel.
[0035] Specifically, each logistics parcel that needs to be shipped can be photographed in advance to obtain a parcel image corresponding to each parcel, and these parcel images are archived for tracing. After the parcel is shipped, when a target parcel needs to be traced, the target parcel image corresponding to the target parcel can be extracted from all the pre-stored parcel images, so as to use the target parcel image as a reference for parcel re-identification.
[0036] S120, determining a target time period in which the target parcel appears at a target site based on actual logistics information of the target parcel.
[0037] The actual logistics information can refer to actual logistics information generated after the target parcel is shipped. The actual logistics information can include site information passed by the target parcel in the actual transportation and distribution process. For example, the actual logistics information can specifically include the time when the target parcel enters and leaves the site, which can be obtained by scanning the target parcel when entering and leaving the site. The site can refer to a distribution center for sorting and distributing parcels. Usually, the site is large in scale, so it is necessary to locate the specific position of the parcel in the site to achieve fine-grained positioning. The target site can refer to the site where the target parcel needs to be traced at present. 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, the record of the logistics package in the logistics processing flow can be collected by using devices such as monitoring cameras and code scanning guns. By using the actual logistics information of the target package, the target package can be coarsely located to determine the target time period in which the target package appears at the target site after being shipped. For example, in the return business, it is necessary to quickly intercept the package that has been 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 in which the target package appears at the target site can be determined based on the time when the target package enters the target site, that is, the time period composed of the time when the target package enters the target site and the current time, so as to locate the specific position of the target package in the target site, and then intercept it in time to avoid excessive logistics cost. For another example, in the loss prevention business, it is necessary to provide the location record of the damaged logistics package in each site, so that each site actually passed by the target package can be determined as a target site, and the target time period in which the target package appears at each target site can be determined based on the time when the target package enters and leaves each target site, that is, the time period composed of the time when the target package enters the target site and the time when the target package leaves the target site, so as to locate the specific position of the target package in each target site, and then accurately determine which link the target package is damaged in, facilitating accountability.
[0039] S130, acquiring a first package image corresponding to each first package appearing in the target site in the 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 an image obtained by photographing the first package. Each first package image only has information of a single package and does not have information of multiple packages. The first package image is one-to-one corresponding to the first package. It should be noted that the first package image can be an image captured by different cameras.
[0041] Specifically, the target site photographs and scans each first package entering the target site, so that a first package image corresponding to each first package entering the target site in the target time period can be obtained. It should be noted that if there are at least two first packages in the photographed 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 shows the full view and occupies the main position, such as being located in the center area of the image.
[0042] S140, determining 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 determining a second package having a package similarity greater than or equal to a preset similarity from the first package.
[0043] The image feature extraction model can be any neural network capable of extracting features. For example, the image feature extraction model can be, but is not limited to, a package re-identification (ReID) model. The image feature extraction model can be obtained by pre-training based on sample package images collected under multiple shooting angles. During training, the image feature extraction model extracts 3 images each time, two of which are images of the same package, and one is an image of another package. The model is trained by calculating the hinge loss of the 3 images 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. The package similarity can refer to the degree of similarity between two packages, which can be represented by the distance between two feature vectors, such as the cosine distance. The preset similarity can be a preset minimum similarity that can be considered as belonging 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 using the pre-trained image feature extraction model, the target package image and each first package image are subjected to feature extraction 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. Each first package corresponding to the package similarity is compared with the preset similarity to obtain a second package whose package similarity is greater than or equal to the preset similarity.
[0045] By way of example, the step of "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 can include: based on the image feature extraction model, performing feature extraction on the target package image and each first package image 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 each first package based on the distance.
[0046] Specifically, the target parcel image is input into the image feature extraction model obtained by pre-training for feature extraction to obtain target parcel feature information corresponding to the target parcel, which can be represented in the form of a feature vector. Each first parcel image is input into the image feature extraction model obtained by pre-training for feature extraction to obtain first parcel feature information corresponding to each first parcel, which can also be represented in the form of a feature vector. The distance, such as the cosine distance, between the target parcel feature information and each first parcel feature information can be determined based on a cosine distance formula. Since the distance is inversely proportional to the parcel similarity, that is, the smaller the distance, the greater the parcel similarity, the result obtained by multiplying the distance by a negative weight value (such as -1) can be taken as the parcel similarity between the target parcel and the first parcel, or the second parcel with a distance less than or equal to a preset distance can also be directly determined from the first parcel. The preset distance corresponds to a preset similarity.
[0047] S150, based on the second parcel image corresponding to the second parcel, tracing to determine a tracing result of the target parcel in the target site.
[0048] The tracing result can refer to a specific record of the target parcel appearing in the target site. For example, the tracing result can include each appearance position of the target parcel in the target site and an appearance time corresponding to each appearance position, and / or a parcel state of the target parcel at each appearance position. The parcel state can refer to whether the parcel is in a damaged state, etc.
[0049] Specifically, the second parcel can be directly considered as the target parcel appearing in the target site, that is, the second parcel and the target parcel belong to the same parcel, thereby realizing cross-camera parcel re-identification. In this regard, the second parcel image corresponding to each second parcel can be directly analyzed to obtain the tracing result of the target parcel in the target site. For example, based on the collection time (i.e., the camera shooting time) and the collection position (i.e., the camera installation position) of the second parcel image corresponding to each second parcel, the appearance position and the appearance time of the target parcel in the target site are determined; and / or the second parcel image corresponding to each second parcel is subjected to parcel state recognition to determine the parcel state of the target parcel in the target site. By using the second parcel image belonging to the same parcel as the target parcel for tracing, the specific position and the specific time of the target parcel appearing in the target site can be located in a fine-grained manner, thereby realizing more refined parcel tracing and improving the accuracy of parcel tracing.
[0050] The technical solution of this embodiment determines the target time period in which the target package appeared at the target location based on the actual logistics information of the target package to be traced, thereby achieving coarse-grained package positioning. By acquiring the first package image corresponding to each first package that appeared at the target location 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. Then, a second package with a similarity greater than or equal to a preset similarity is identified from the first packages. Based on the second package image corresponding to the second package, tracing is performed to determine the tracing result of the target package in the target location, thereby achieving fine-grained package positioning. The entire tracing process does not require manual intervention, realizing automatic package tracing and improving the efficiency and accuracy of package tracing.
[0051] Based on the above technical solution, step S130 may include: acquiring logistics images captured by cameras at the target site within the target time period; performing package detection on the logistics images to determine the first package image corresponding to each first package that appears at the target site within the target time period.
[0052] In this context, "camera" refers to a camera in the target area used to monitor the transportation of packages, such as a camera installed above a conveyor belt. "Logistics images" are images obtained by the cameras periodically capturing pictures of packages entering the target area. There can be multiple cameras in the target area to monitor each stage of the package's journey. The number of packages shown in the logistics images may be one or more.
[0053] Specifically, for each target location, all logistics images captured by cameras at that location within the target time period can be retrieved from the database. For each logistics image, packages can be detected to determine the number of packages present. If only one package exists in the logistics image, that package is designated as the first package, and the logistics image corresponding to that first package is obtained. If multiple packages exist in the logistics image, each package is designated as the first package, and the logistics image is cropped and segmented to obtain a sub-image corresponding to each first package, thus obtaining the first package image for each first package. It should be noted that if the size of the first package image differs 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 for easier image comparison.
[0054] For example, performing package detection on a logistics image to determine the first package image corresponding to each first package that appears at the 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 the 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 the first package image corresponding to each first package that appears at the target site within the target time period.
[0055] The package recognition model can be a network model used to identify packages. The network architecture of the package recognition model can be any object detection model architecture, such as the YOLOv9 model. The package recognition model can be pre-trained based on sample images and the location information of each package in the sample images to ensure the accuracy of package recognition. There can be multiple packages in the sample images. The location information of each package can be marked using a bounding box.
[0056] Specifically, for each logistics image, the logistics image is input into a package recognition model for package detection and recognition to obtain the location information of each first package in the logistics image. This location information can be represented using a bounding box. Based on the location information of each first package, the logistics image is cropped and segmented to obtain a local image at the location of each first package, which is then used as the first package image. This allows for the rapid and accurate acquisition of the package image corresponding to a single package.
[0057] Figure 2 This is a flowchart of another package tracing method provided in one embodiment of the present invention. Based on the above embodiments, this embodiment optimizes the step "tracing based on the second package image corresponding to the second package to determine the tracing result of the target package in the target location". Explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0058] See Figure 2 Another package traceability method provided in this embodiment specifically includes the following steps:
[0059] S210. Obtain the target package image corresponding to the target package to be traced.
[0060] S220. Based on the actual logistics information of the target package, determine the target time period during which the target package appears at the target location.
[0061] S230. Obtain the first package image corresponding to each first package that appears at the target site within the target time period.
[0062] S240. Based on the image feature extraction model, the target package image and each first package image, determine the package similarity between the target package and each first package, and determine the second package from the first packages whose package similarity is greater than or equal to the preset similarity.
[0063] S250. Based on the attribute prediction model, the target package image and the second package image corresponding to each second package, predict the package attribute information to obtain the target package attribute information corresponding to the target package and the second package attribute information corresponding to each second package.
[0064] Attribute information refers to the inherent characteristics of the package itself, that is, its concrete visual features. The attribute prediction model can be a classification network model used to predict whether a package possesses each type of attribute information. This model can be pre-trained on real package image data using a cross-entropy loss function and stochastic gradient descent to ensure accuracy. Real package image data can include sample package images taken from multiple shooting angles and the actual attribute information of the sample packages. The types and quantity of attribute information can be configured based on business requirements.
[0065] For example, the target package attribute information may include, but is not limited to, at least one of the following: color attribute information, shape attribute information, label attribute information, and strapping attribute information. The second package attribute information may include, but is not limited to, at least one of the following: color attribute information, shape attribute information, label attribute information, and strapping attribute information. The attribute prediction model can be used to predict the color attribute information, shape attribute information, label attribute information, and strapping attribute information of the package. Specifically, color attribute information may refer to the color of the package's appearance, which can be categorized as brown, white, and blue, etc. Shape attribute information may refer to the specific shape of the package, which can be categorized as a cuboid close to a cube, a flat cuboid, a long strip, and a bag shape, etc. Label attribute information may refer to the label's position on the package, which can be categorized as the label being in the middle, on the edge, or in a corner, etc. Strapping attribute information may refer to whether the package has strapping, i.e., whether it has strapping or not.
[0066] Specifically, the target package image is input into the attribute prediction model to predict package attribute information, obtaining a first probability value for each type of package attribute information possessed by the target package, and determining the target package attribute information corresponding to the target package based on the first probability value. For example, the predicted first probability values of each attribute value of the target package are compared to obtain the largest first probability value for each attribute. If the largest first probability value is greater than or equal to a preset probability value, it is determined that the target package possesses that attribute, and the attribute value corresponding to the largest first probability value is determined as the specific attribute information of the target package possessing that attribute, thereby obtaining all attribute information possessed by 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 package attribute information, obtaining a second probability value for each type of package attribute information possessed by the second package, and determining the second package attribute information corresponding to each second package based on the second probability value. For example, the second probability value of each attribute value in each of the predicted second packages is compared to obtain the largest second probability value in each attribute. If the largest second probability value is greater than or equal to the preset probability value, it is determined that the target package has that attribute, and the attribute value corresponding to the largest second probability value is determined as the specific attribute information of the second package having that attribute, thereby obtaining all the attribute information of the second package.
[0067] For example, an attribute prediction model may include a feature extraction sub-model and multiple classification sub-models. The feature extraction sub-model can be used to extract input image features, such as a residual network like ResNet. Each classification sub-model corresponds one-to-one with attribute information. Each classification sub-model can be activated using a sigmoid function to predict the probability value of the corresponding attribute information.
[0068] S260. Compare the attribute information of the target package with the attribute information of the second package to obtain a third package that has the same attribute information as the target package.
[0069] Specifically, by comparing the target package's attribute information with the attribute information of each second package, a third package with 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. Based on the image of the third package corresponding to the third package, trace the target package to determine the traceability result of the target package in the target site.
[0071] The traceability results can refer to specific records of the target package's appearance within the target site. For example, the traceability results may include: each location of the target package within the target site and the corresponding time of appearance at each location, and / or, the package status at each location. The package status may refer to whether the package is damaged, 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 appeared in the target location. In other words, the third package and the target package belong to the same package. Therefore, by comparing abstract and concrete features simultaneously, the accuracy of package tracking can be further improved. By performing business analysis on the third package image corresponding to each third package, the tracking results of the target package in the target location can be obtained more accurately.
[0073] For example, step S270 may include: determining the location and time of appearance of the target package in the target site based on the acquisition time and location 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 site.
[0074] Specifically, the acquisition time (i.e., camera capture time) of the third package image corresponding to each third package can be taken as the appearance time of the target package in the target area, and the package transportation location corresponding to the acquisition location (i.e., camera installation location) can be taken as the appearance location of the target package within that appearance time. This allows us to obtain all appearance locations and corresponding appearance times of the target package within the target area. Furthermore, image processing technology can be used to identify the package status of the target package at each appearance location, such as whether the package is damaged. By using images of third packages belonging to the same package as the target package for tracing, the specific location, time, and status of the target package within the target area can be more accurately determined, thus achieving more refined package tracing and improving the accuracy of package tracing.
[0075] The technical solution of this embodiment can accurately obtain the target package attribute information and the second package attribute information corresponding to each second package by using an attribute prediction model to predict package attribute information. The target package attribute information and the second package attribute information are compared to obtain the third package with the same attribute information as the target package. Thus, by comparing abstract features and concrete features at the same time, the accuracy of package traceability can be further improved.
[0076] The following are embodiments of the package traceability device provided in this invention. This device and the package traceability methods in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the package traceability device, please refer to the embodiments of the above package traceability methods.
[0077] Figure 3 This is a schematic diagram of a package tracking device provided in an embodiment of the present invention. This embodiment is applicable to situations involving the tracking and positioning of 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 traceability result determination module 350.
[0078] The system includes: a target package image acquisition module 310 for acquiring target package images corresponding to the target package to be traced; a target time period determination module 320 for determining the target time period in which the target package appeared at the target location based on the actual logistics information of the target package; a first package image acquisition module 330 for acquiring first package images corresponding to each first package that appeared at the target location within the target time period; a second package determination module 340 for determining the package similarity between the target package and each first package based on an image feature extraction model, the target package images, and each first package image, and determining a second package from the first packages whose package similarity is greater than or equal to a preset similarity; and a traceability result determination module 350 for tracing based on the second package images corresponding to the second packages to determine the traceability result of the target package within the target location.
[0079] The technical solution of this embodiment determines the target time period in which the target package appeared at the target location based on the actual logistics information of the target package to be traced, thereby achieving coarse-grained package positioning. By acquiring the first package image corresponding to each first package that appeared at the target location 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. Then, a second package with a similarity greater than or equal to a preset similarity is identified from the first packages. Based on the second package image corresponding to the second package, tracing is performed to determine the tracing result of the target package in the target location, thereby achieving fine-grained package positioning. The entire tracing process does not require manual intervention, realizing automatic package tracing and improving the efficiency and accuracy of package tracing.
[0080] Optionally, the first package image acquisition module 330 includes:
[0081] The logistics image acquisition unit is used to acquire logistics images captured by cameras at the target site during the target time period.
[0082] The first package image acquisition unit is used to perform package detection on the logistics image and determine the first package image corresponding to each first package that appears at the target site within the target time period.
[0083] Optionally, the first package image acquisition unit is specifically used for:
[0084] Based on the package recognition model, 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 used for:
[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 the target package feature information corresponding to the target package and the 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 traceability result determination module 350 includes:
[0088] An attribute information prediction unit is used to predict package attribute information based on an attribute prediction model, the target package image, and the second package image corresponding to each second package, so as to obtain the target package attribute information corresponding to the target package and the second package attribute information corresponding to each second package.
[0089] The third package determination unit is used to compare the target package attribute information with the second package attribute information to obtain a third package that has the same attribute information as the target package.
[0090] The traceability result determination unit is used to trace based on the third package image corresponding to the third package and determine the traceability result of the target package in the target site.
[0091] Optionally, the target package attribute information includes at least one of the following: color attribute information, shape attribute information, label attribute information, and stripping attribute information of the target package;
[0092] The second package attribute information includes at least one of the following: color attribute information, shape attribute information, label attribute information, and stripping attribute information of the second package.
[0093] Optionally, the traceability result determination unit is specifically used for:
[0094] Based on the acquisition time and location of the third package image corresponding to the third package, determine the location and time of appearance of the target package in the target site; 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.
[0095] The package tracking device provided in this embodiment of the invention can execute the package tracking method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the package tracking method.
[0096] It is worth noting that in the above-described embodiments of the package tracking device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0097] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 4 A block diagram is shown of an exemplary electronic device 12 suitable for implementing embodiments of the present invention. Figure 4 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0098] like Figure 4 As shown, the electronic device 12 is represented 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, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0099] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0100] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0101] 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. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, 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, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the 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 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0103] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with 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] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing the steps of a package traceability method provided in any embodiment of the present invention, the method including:
[0105] Obtain the target package image corresponding to the target package to be traced;
[0106] Based on the actual logistics information of the target package, the target time period in which the target package appeared at the target location is determined;
[0107] Acquire images of the first package corresponding to each first package that appears at the target site within the target time period;
[0108] Based on the image feature extraction model, the target package image and each of the first packages, the package similarity between the target package and each of the first packages is determined, and a second package with a package similarity greater than or equal to a preset similarity is determined from the first packages.
[0109] Based on the second package image corresponding to the second package, the tracing result of the target package within the target site is determined.
[0110] Of course, those skilled in the art will understand that the processor can also implement the technical solution of the package traceability method provided in any embodiment of the present invention.
[0111] This embodiment provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the program implements the package tracing method steps provided in any embodiment of the present invention, the method comprising:
[0112] Obtain the target package image corresponding to the target package to be traced;
[0113] Based on the actual logistics information of the target package, the target time period in which the target package appeared at the target location is determined;
[0114] Acquire images of the first package corresponding to each first package that appears at the target site within the target time period;
[0115] Based on the image feature extraction model, the target package image and each of the first packages, the package similarity between the target package and each of the first packages is determined, and a second package with a package similarity greater than or equal to a preset similarity is determined from the first packages.
[0116] Based on the second package image corresponding to the second package, the tracing result of the target package within the target site is determined.
[0117] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0118] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0119] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0120] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages—such as the "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 standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can 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 it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the package tracking method provided in any embodiment of this invention.
[0122] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0123] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0124] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method for tracing packages, characterized in that, include: Obtain the target package image corresponding to the target package to be traced; Based on the actual logistics information of the target package, the target time period in which the target package appeared at the target location is determined; Acquire images of the first package corresponding to each first package that appears at the target site within the target time period; Based on the image feature extraction model, the target package image and each of the first packages, the package similarity between the target package and each of the first packages is determined, and a second package with a package similarity greater than or equal to a preset similarity is determined from the first packages. Based on the second package image corresponding to the second package, the tracing result of the target package within the target site is determined.
2. The method according to claim 1, characterized in that, The step of acquiring 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 cameras at the target site during the target time period; Package detection is performed on the logistics images to determine the 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 step of performing package detection on the logistics images to determine the first package image corresponding to each first package that appears at the target location within the target time period includes: Based on the package recognition model, 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 at the target site within the target time period.
4. The method according to claim 1, characterized in that, The step of determining 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 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 the target package feature information corresponding to the target package and the first package feature information corresponding to each of the first packages. Determine the distance between the target package feature information and each of the first package feature information, and determine the package similarity between the target package and the first package based on the distance.
5. The method according to claim 1, characterized in that, The step of tracing based on the image of the second package corresponding to the second package to determine the tracing result of the target package within the target site includes: Based on the attribute prediction model, the target package image and the second package image corresponding to each second package, the package attribute information is predicted to obtain the target package attribute information corresponding to the target package and the second package attribute information corresponding to each second package. The target package attribute information is compared with the second package attribute information to obtain a third package that has the same attribute information as the target package. Based on the image of the third package corresponding to the third package, the tracing result of the target package within the target site is determined.
6. The method according to claim 5, characterized in that, The target package attribute information includes at least one of the following: color attribute information, shape attribute information, label attribute information, and stripping attribute information of the target package; The second package attribute information includes at least one of the following: 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 step of tracing based on the image of the third package corresponding to the third package to determine the tracing result of the target package within the target site includes: Based on the acquisition time and location of the image corresponding to the third package, determine the location and time of appearance of the target package within the target site; and / or, The image of the third package corresponding to the third package is used to identify the package status and determine the package status of the target package within the target site.
8. A package tracking device, characterized in that, include: The target package image acquisition module is used to acquire the target package image corresponding to the target package to be traced. The target time period determination module is used to determine the target time period during which the target package appears at the target location based on the actual logistics information of the target package. The first package image acquisition module 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 is used to determine 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, and to determine a second package from the first packages whose package similarity is greater than or equal to a preset similarity. The traceability result determination module is used to trace based on the second package image corresponding to the second package and determine the traceability result of the target package in the target site.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory, used to store 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 package tracing method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the package tracing method as described in any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the package tracking method as described in any one of claims 1-7.
Citation Information
Patent Citations
Parcel tracking method based on security check image
CN118196382A
Correlating Courier Information and Providing Logistics Content Information
US20180025320A1