A trajectory tracking and package retention determination method, device and equipment
Patent Information
- Application Number
- CN202611080913.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-20
AI Technical Summary
然而,在使用分拣机自动分拣包裹时,无法得到准确的包裹位置,也就无法基于包裹位置进行准确判断
[0010]由以上技术方案可见,本申请实施例中,基于待检测包裹在前一帧的包裹实际位置和速度偏移量,确定待检测包裹在当前帧的包裹预测位置,基于包裹检测位置和多个速度偏移量对应的包裹预测位置之间的目标相似度,从多个包裹预测位置中选取待检测包裹在当前帧的包裹实际位置。这样,通过配置多个速度偏移量,能够找到待检测包裹对应的速度偏移量,继而将这个速度偏移量对应的包裹预测位置作为包裹实际位置,从而得到准确的包裹实际位置,包裹实际位置精确可靠,不存在误差,能够基于包裹实际位置进行准确判断。即使物流传送带场景中的包裹运动速度频繁、且剧烈突变(如启停、坡度变化等),那么,不是使用单一速度偏移量获取待检测包裹的包裹预测位置,而是通过配置多个速度偏移量,找到待检测包裹对应的速度偏移量,从而通过多个速度偏移量能够动态地、自适应当前时刻包裹可能的速度状态,在传送带速度剧烈变化时仍能得到准确的包裹实际位置。比如说,若需要基于包裹实际位置确定包裹是否存在滞留,那么,由于能够得到准确的包裹实际位置,也就能够准确检测包裹是否存在滞留在待监测区域,得到准确的滞留检测结果。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of machine vision technology, and in particular to a method, apparatus and equipment for trajectory tracking and package retention determination. Background Technology
[0002] With the rapid rise in labor costs at logistics sorting centers and the continuous improvement in logistics transportation efficiency, the demand for automated sorting of goods is also gradually increasing. Therefore, sorting machines can be used in logistics sorting centers to automatically sort packages, which are then transported to different destinations. However, when using sorting machines to automatically sort packages, the accurate location of the packages cannot be obtained, making accurate judgments based on package location impossible. For example, if it is necessary to determine whether a package is delayed, the lack of accurate package location makes it impossible to determine whether a package is delayed based on its location, thus preventing accurate delay detection results. Summary of the Invention
[0003] This application provides a trajectory tracking method, the method comprising: Based on the actual position and velocity offset of the first package in the previous frame, the predicted position of the package to be detected in the current frame is determined; wherein, the configured offset set includes multiple velocity offsets; Based on the target similarity between the package detection location and the package prediction locations corresponding to multiple velocity offsets, the second actual package location of the package to be detected in the current frame is selected from multiple package prediction locations; wherein, the package detection location is determined based on the current frame image; Add the actual location of the second package to the target trajectory of the package to be detected.
[0004] This application provides a method for determining package delay, the method comprising: Obtain the identification information on the package to be inspected; The location of the sorting compartment to which the package to be inspected is placed is determined based on the identification information; The package to be inspected is moved to the slot position by the conveyor belt of the sorting machine; Obtain the target trajectory corresponding to the package to be detected; wherein, the target trajectory includes the actual positions of multiple packages as the package to be detected moves on the conveyor belt; Based on the target trajectory, it is determined whether the package to be detected remains in the monitoring area of the sorting machine.
[0005] This application provides a trajectory tracking device, the device comprising: A determination module is used to determine the predicted position of the package to be detected in the current frame based on the actual position and velocity offset of the first package in the previous frame; wherein the configured offset set includes multiple velocity offsets; and to select the second actual position of the package to be detected in the current frame from the multiple predicted positions based on the target similarity between the package detection position and the package prediction positions corresponding to the multiple velocity offsets; wherein the package detection position is determined based on the current frame image. The processing module is used to add the actual position of the second package to the target trajectory of the package to be detected.
[0006] This application provides a parcel retention determination device, the device comprising: The processing module is used to acquire the identification information on the package to be inspected; determine the sorting slot position of the package to be inspected based on the identification information; and move the package to be inspected to the sorting slot position via the conveyor belt of the sorting machine. The acquisition module is used to acquire the target trajectory corresponding to the package to be detected; wherein, the target trajectory includes multiple actual positions of the package to be detected as it moves on the conveyor belt; The detection module is used to determine whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory.
[0007] This application provides an electronic device, including: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the trajectory tracking method or package retention determination method of the above example.
[0008] This application provides a computer program product, including a computer program that, when executed by a processor, implements the trajectory tracking method or package retention determination method of the above examples of this application.
[0009] This application provides a machine-readable storage medium storing machine-executable instructions that can be executed by a processor; wherein the processor is used to execute the machine-executable instructions to implement the trajectory tracking method or package retention determination method of the above examples of this application.
[0010] As can be seen from the above technical solutions, in this embodiment, the predicted position of the package to be detected in the current frame is determined based on the actual position and speed offset of the package to be detected in the previous frame. Based on the target similarity between the detected package position and the predicted package positions corresponding to multiple speed offsets, the actual position of the package to be detected in the current frame is selected from the multiple predicted package positions. Thus, by configuring multiple speed offsets, the speed offset corresponding to the package to be detected can be found, and the predicted package position corresponding to this speed offset is then used as the actual package position, thereby obtaining an accurate actual package position. The actual package position is precise and reliable, without error, and accurate judgment can be made based on the actual package position. Even in logistics conveyor belt scenarios where the package movement speed is frequent and drastically changes (such as starting and stopping, slope changes, etc.), instead of using a single speed offset to obtain the predicted position of the package to be detected, multiple speed offsets are configured to find the speed offset corresponding to the package to be detected. Therefore, multiple speed offsets can dynamically and adaptively adapt to the possible speed state of the package at the current moment, and an accurate actual package position can still be obtained when the conveyor belt speed changes drastically. For example, if it is necessary to determine whether a package is stuck based on its actual location, then by obtaining the accurate actual location of the package, it is possible to accurately detect whether the package is stuck in the area to be monitored and obtain an accurate result of the delay detection. Attached Figure Description
[0011] Figure 1A This is a flowchart illustrating a trajectory tracking method in one embodiment of this application; Figure 1B This is a flowchart illustrating a method for determining package retention in one embodiment of this application; Figure 2 This is a schematic diagram of the structure of a sorting machine according to one embodiment of this application; Figure 3 This is a flowchart illustrating a trajectory tracking method in one embodiment of this application; Figure 4 This is a schematic diagram of a package following process in one embodiment of this application; Figure 5A and Figure 5B This is a schematic diagram of the package following and trajectory line in one embodiment of this application; Figure 6 This is a schematic diagram of the package retention determination process in one embodiment of this application; Figure 7A This is a schematic diagram of the trajectory tracking device in one embodiment of this application; Figure 7B This is a schematic diagram of the package retention determination device in one embodiment of this application; Figure 8This is a hardware structure diagram of an electronic device according to one embodiment of this application. Detailed Implementation
[0012] This application proposes a trajectory tracking method that can be applied to electronic devices, such as the management equipment of a sorting machine (e.g., personal computers, terminal devices, etc.). See also Figure 1A The diagram shown is a flowchart of the trajectory tracking method, which may include: Step 101: Based on the actual position and velocity offset of the first package in the previous frame, determine the predicted position of the package to be detected in the current frame. The configured offset set may include multiple velocity offsets. For any given velocity offset, based on the actual position of the first package in the previous frame and the velocity offset, determine the predicted position of the package to be detected in the current frame.
[0013] Step 102: Based on the target similarity between the package detection location and the package prediction locations corresponding to multiple velocity offsets, select the second actual package location in the current frame from the multiple package prediction locations. For example, the package prediction location corresponding to the largest target similarity can be determined as the second actual package location in the current frame, or the package prediction location corresponding to the second largest target similarity can be determined as the second actual package location in the current frame, or other package prediction locations can be used as the second actual package location, such as any package prediction location that meets the similarity condition; wherein, the package detection location is determined based on the current frame image.
[0014] Step 103: Add the actual location of the second package to the target trajectory of the package to be detected.
[0015] For example, for any velocity offset within the offset set, the predicted position of the package to be detected in the current frame is determined based on the actual position of the first package in the previous frame and the velocity offset. This may include, but is not limited to: determining a reference motion speed based on the velocity offset and a reference speed; wherein the package to be detected moves on the conveyor belt of the sorting machine, and the reference speed may be determined based on the moving speed of the conveyor belt, such as the moving speed of the conveyor belt; and determining the predicted position of the package to be detected in the current frame based on the reference motion speed, the interval between two adjacent frames, and the actual position of the first package.
[0016] For example, for any velocity offset within the offset set, the target similarity between the package detection location and the package prediction location corresponding to that velocity offset can be determined in the following ways: determining the target similarity based on the distance between the package detection location and the package prediction location; or, determining the target similarity based on the degree of overlap between the first detection box corresponding to the package detection location and the second detection box corresponding to the package prediction location; or, determining the target similarity based on both distance and degree of overlap; wherein, by inputting the current frame image into the target detection model, the first detection box can be obtained; in addition, the second detection box is constructed with the package prediction location as the center, based on a preset length and a preset width.
[0017] For example, adding the actual location of a second package to the target trajectory of the package to be detected includes, but is not limited to: adding trajectory point data to the target trajectory, the trajectory point data including the actual location of the second package; wherein, the trajectory point data also includes at least one of a first detection box, the acquisition timestamp of the current frame image, the velocity offset corresponding to the maximum target similarity, and the package detection location; wherein, the first detection box is obtained by inputting the current frame image into the target detection model; the package detection location is the center location of the first detection box.
[0018] For example, after adding the actual location of the second package to the target trajectory of the package to be detected, it can be determined whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory. The process of obtaining the monitoring area may include, but is not limited to: obtaining a complete image of the sorting machine and displaying the complete image on the interactive interface; in response to the area delineation operation on the complete image, obtaining the selected area corresponding to the area delineation operation on the complete image, and determining the selected area as the monitoring area.
[0019] For example, the target trajectory may include multiple actual package locations. The process of determining whether a package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory may include, but is not limited to: if the actual locations of packages continuously or cumulatively within the monitoring area reach a predetermined threshold, then it is determined that the package to be detected is stuck in the monitoring area. If the actual locations of packages continuously or cumulatively within the monitoring area do not reach the predetermined threshold, then it is determined that the package to be detected is not stuck in the monitoring area.
[0020] For example, the target trajectory may include multiple actual package locations. The process of determining whether a package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory may include, but is not limited to: when the actual locations of consecutive or cumulative packages in the monitoring area of the target trajectory reach a predetermined threshold, if the actual location of the last package on the target trajectory is in the monitoring area, then it is determined that the package to be detected is stuck in the monitoring area; if the actual location of the last package on the target trajectory is not in the monitoring area, and the distance between the actual location of the last package and the actual location of a designated package is less than a preset distance threshold, then it is determined that the package to be detected is stuck in the monitoring area; if the actual location of the last package on the target trajectory is not in the monitoring area, and the distance between the actual location of the last package and the actual location of a designated package is not less than a preset distance threshold, then it is determined that the package to be detected is not stuck in the monitoring area; wherein, the actual location of the designated package may be any actual location of a package on the target trajectory that is in the monitoring area.
[0021] For example, the actual location of the specified package can be the actual location of the first package in the area to be monitored on the target trajectory, in which case the preset distance threshold can be relatively large; the actual location of the specified package can be the actual location of the last package in the area to be monitored on the target trajectory, in which case the preset distance threshold can be relatively small; the actual location of the specified package can also be the actual location of other packages, without any restrictions.
[0022] For example, if it is determined that the package to be detected is stuck in the area to be monitored based on the target trajectory, it is also possible to query whether the globally unique identifier of the target trajectory has been stored in the alarm record table; if the globally unique identifier of the target trajectory has not been stored, the stuck alarm information for the package to be detected can be output, and the globally unique identifier of the target trajectory can be stored in the alarm record table; if the globally unique identifier of the target trajectory has been stored, the stuck alarm information for the package to be detected is prohibited from being output.
[0023] For example, determining whether a package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory may include, but is not limited to: when the target trajectory is updated, determining whether the actual positions of consecutive or cumulative packages within the monitoring area reach a predetermined threshold; if so, after a first time interval, determining whether the target trajectory meets the consistency verification condition; if the consistency verification condition is met, determining that the package to be detected is stuck in the monitoring area; if the consistency verification condition is not met, determining that the package to be detected is not stuck in the monitoring area; if the package to be detected is stuck in the monitoring area, then after a second time interval, re-determining whether the target trajectory meets the consistency verification condition, the second time interval may be longer than the first time interval. Wherein, if the actual position of the last package on the target trajectory is within the monitoring area, or if the distance between the actual position of the last package on the target trajectory and the actual position of a specified package is less than a preset distance threshold (for example, the actual position of the last package on the target trajectory is not within the monitoring area, and the distance between the actual position of the last package on the target trajectory and the actual position of the specified package is less than a preset distance threshold), then the target trajectory meets the consistency verification condition. The specified package actual position may be any package actual position within the monitoring area on the target trajectory. For example, the actual location of a specified package can be the actual location of the first package in the area to be monitored on the target trajectory, the actual location of the last package in the area to be monitored on the target trajectory, or the actual location of other packages.
[0024] For example, after determining whether the actual location of consecutive or cumulative packages in the monitored area of the target trajectory has reached a predetermined threshold, if the actual location of consecutive or cumulative packages has not reached the predetermined threshold, and the actual location of the last package of the target trajectory is in the monitored area, then the number of delayed packages is increased by a first value (e.g., 1). When the target trajectory is updated next time, it is determined whether the actual location of consecutive or cumulative packages in the monitored area of the target trajectory has reached the predetermined threshold. This process continues until the number of delayed packages reaches the predetermined threshold, at which point it is determined that the actual location of consecutive or cumulative packages in the monitored area of the target trajectory has reached the predetermined threshold, or that the actual location of the last package of the target trajectory is not in the monitored area.
[0025] For example, when updating the target trajectory, if the target trajectory is missing the actual locations of M packages, M can be a positive integer and M is not greater than the configured packet loss tolerance threshold, then the number of packages left behind can remain unchanged; if M is greater than the packet loss tolerance threshold, then the number of packages left behind will be updated to a second value (such as 0).
[0026] As can be seen from the above technical solutions, in this embodiment, the predicted position of the package to be detected in the current frame is determined based on the actual position and speed offset of the package to be detected in the previous frame. Based on the target similarity between the detected package position and the predicted package positions corresponding to multiple speed offsets, the actual position of the package to be detected in the current frame is selected from the multiple predicted package positions. Thus, by configuring multiple speed offsets, the speed offset corresponding to the package to be detected can be found, and the predicted package position corresponding to this speed offset is then used as the actual package position, thereby obtaining an accurate actual package position. The actual package position is precise and reliable, without error, and accurate judgment can be made based on the actual package position. Even in logistics conveyor belt scenarios where the package movement speed is frequent and drastically changes (such as starting and stopping, slope changes, etc.), instead of using a single speed offset to obtain the predicted position of the package to be detected, multiple speed offsets are configured to find the speed offset corresponding to the package to be detected. Therefore, multiple speed offsets can dynamically and adaptively adapt to the possible speed state of the package at the current moment, and an accurate actual package position can still be obtained when the conveyor belt speed changes drastically. For example, if it is necessary to determine whether a package is stuck based on its actual location, then by obtaining the accurate actual location of the package, it is possible to accurately detect whether the package is stuck in the area to be monitored and obtain an accurate result of the delay detection.
[0027] This application proposes a method for determining package delays. This method can be applied to electronic devices, such as the management equipment of a sorting machine (e.g., personal computers, terminal devices, etc.). See also... Figure 1B The diagram shown is a flowchart of the method for determining package retention. This method may include: Step 111: Obtain the identification information on the package to be inspected.
[0028] Step 112: Determine the sorting location of the package to be inspected based on the identification information.
[0029] Step 113: Move the package to be inspected to the slot position via the conveyor belt of the sorting machine.
[0030] Step 114: Obtain the target trajectory corresponding to the package to be detected; wherein, the target trajectory includes the actual positions of multiple packages when the package to be detected moves on the conveyor belt.
[0031] Step 115: Determine whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory.
[0032] For example, in the process of acquiring the area to be monitored, a complete image of the sorting machine can be acquired and displayed on the interactive interface; in response to an area delineation operation on the complete image, the selected area corresponding to the area delineation operation on the complete image can be acquired, and the area to be monitored can be determined based on the selected area. For instance, the selected area can be determined as the area to be monitored, or the selected area can be adjusted to obtain the area to be monitored.
[0033] For example, the process of determining whether a package to be inspected is stuck in the monitoring area of the sorting machine based on the target trajectory may include, but is not limited to: if the actual positions of packages continuously or cumulatively within the monitoring area reach a predetermined threshold, then it is determined that the package to be inspected is stuck in the monitoring area. If the actual positions of packages continuously or cumulatively within the monitoring area do not reach the predetermined threshold, then it is determined that the package to be inspected is not stuck in the monitoring area.
[0034] For example, the process of determining whether a package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory may include, but is not limited to: when the actual positions of packages continuously or cumulatively within the monitoring area of the target trajectory reach a predetermined threshold, if the actual position of the last package on the target trajectory is in the monitoring area, then it is determined that the package to be detected is stuck in the monitoring area; if the actual position of the last package on the target trajectory is not in the monitoring area, and the distance between the actual position of the last package and the actual position of a designated package is less than a preset distance threshold, then it is determined that the package to be detected is stuck in the monitoring area; if the actual position of the last package on the target trajectory is not in the monitoring area, and the distance between the actual position of the last package and the actual position of a designated package is not less than a preset distance threshold, then it is determined that the package to be detected is not stuck in the monitoring area; wherein, the actual position of the designated package can be any actual position of a package on the target trajectory within the monitoring area. For example, the actual position of the designated package can be the first actual position of a package on the target trajectory within the monitoring area, the actual position of the designated package can be the last actual position of a package on the target trajectory within the monitoring area, or it can be any other actual position of a package, without limitation.
[0035] For example, if it is determined that the package to be detected is stuck in the area to be monitored based on the target trajectory, it is also possible to query whether the globally unique identifier of the target trajectory has been stored in the alarm record table; if the globally unique identifier of the target trajectory has not been stored, the stuck alarm information for the package to be detected can be output, and the globally unique identifier of the target trajectory can be stored in the alarm record table; if the globally unique identifier of the target trajectory has been stored, the stuck alarm information for the package to be detected is prohibited from being output.
[0036] For example, determining whether a package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory may include, but is not limited to: when the target trajectory is updated, determining whether the actual positions of consecutive or cumulative packages within the monitoring area reach a predetermined threshold; if so, after a first time interval, determining whether the target trajectory meets the consistency verification condition; if the consistency verification condition is met, determining that the package to be detected is stuck in the monitoring area; if the consistency verification condition is not met, determining that the package to be detected is not stuck in the monitoring area; if the package to be detected is stuck in the monitoring area, then after a second time interval, re-determining whether the target trajectory meets the consistency verification condition, the second time interval may be longer than the first time interval. Wherein, if the actual position of the last package on the target trajectory is within the monitoring area, or if the distance between the actual position of the last package on the target trajectory and the actual position of a specified package is less than a preset distance threshold (for example, the actual position of the last package on the target trajectory is not within the monitoring area, and the distance between the actual position of the last package on the target trajectory and the actual position of the specified package is less than a preset distance threshold), then the target trajectory meets the consistency verification condition. The specified package actual position may be any package actual position within the monitoring area on the target trajectory. For example, the actual location of a specified package can be the actual location of the first package in the area to be monitored on the target trajectory, the actual location of the last package in the area to be monitored on the target trajectory, or the actual location of other packages.
[0037] For example, after determining whether the actual location of consecutive or cumulative packages in the monitored area of the target trajectory has reached a predetermined threshold, if the actual location of consecutive or cumulative packages has not reached the predetermined threshold, and the actual location of the last package of the target trajectory is in the monitored area, then the number of delayed packages is increased by a first value (e.g., 1). When the target trajectory is updated next time, it is determined whether the actual location of consecutive or cumulative packages in the monitored area of the target trajectory has reached the predetermined threshold. This process continues until the number of delayed packages reaches the predetermined threshold, at which point it is determined that the actual location of consecutive or cumulative packages in the monitored area of the target trajectory has reached the predetermined threshold, or that the actual location of the last package of the target trajectory is not in the monitored area.
[0038] For example, when updating the target trajectory, if the target trajectory is missing the actual locations of M packages, M can be a positive integer and M is not greater than the configured packet loss tolerance threshold, then the number of packages left behind can remain unchanged; if M is greater than the packet loss tolerance threshold, then the number of packages left behind will be updated to a second value (such as 0).
[0039] For example, the target trajectory corresponding to the package to be detected can be obtained as follows: based on the actual position and velocity offset of the first package in the previous frame, the predicted position of the package to be detected in the current frame is determined. The configured offset set can include multiple velocity offsets. For any given velocity offset, based on the actual position of the first package in the previous frame and the velocity offset, the predicted position of the package to be detected in the current frame is determined.
[0040] Based on the target similarity between the detected package location and the predicted package locations corresponding to multiple velocity offsets, the second actual package location in the current frame is selected from the multiple predicted package locations. For example, the predicted package location corresponding to the maximum target similarity can be determined as the second actual package location in the current frame, or the predicted package location corresponding to the second maximum target similarity can be determined as the second actual package location in the current frame; the package detection location is determined based on the current frame image. The second actual package location is added to the target trajectory of the detected package.
[0041] For example, for any velocity offset within the offset set, the predicted position of the package to be detected in the current frame is determined based on the actual position of the first package in the previous frame and the velocity offset. This may include, but is not limited to: determining a reference motion speed based on the velocity offset and a reference speed; wherein the package to be detected moves on the conveyor belt of the sorting machine, and the reference speed may be determined based on the moving speed of the conveyor belt, such as the moving speed of the conveyor belt; and determining the predicted position of the package to be detected in the current frame based on the reference motion speed, the interval between two adjacent frames, and the actual position of the first package.
[0042] For example, for any velocity offset within the offset set, the target similarity between the package detection location and the package prediction location corresponding to that velocity offset can be determined in the following ways: determining the target similarity based on the distance between the package detection location and the package prediction location; or, determining the target similarity based on the degree of overlap between the first detection box corresponding to the package detection location and the second detection box corresponding to the package prediction location; or, determining the target similarity based on both distance and degree of overlap; wherein, by inputting the current frame image into the target detection model, the first detection box can be obtained; in addition, the second detection box is constructed with the package prediction location as the center, based on a preset length and a preset width.
[0043] For example, adding the actual location of a second package to the target trajectory of the package to be detected includes, but is not limited to: adding trajectory point data to the target trajectory, the trajectory point data including the actual location of the second package; wherein, the trajectory point data also includes at least one of a first detection box, the acquisition timestamp of the current frame image, the velocity offset corresponding to the maximum target similarity, and the package detection location; wherein, the first detection box is obtained by inputting the current frame image into the target detection model; the package detection location is the center location of the first detection box.
[0044] As can be seen from the above technical solutions, in this embodiment, the predicted position of the package to be detected in the current frame is determined based on the actual position and speed offset of the package to be detected in the previous frame. Based on the target similarity between the detected package position and the predicted package positions corresponding to multiple speed offsets, the actual position of the package to be detected in the current frame is selected from the multiple predicted package positions. Thus, by configuring multiple speed offsets, the speed offset corresponding to the package to be detected can be found, and the predicted package position corresponding to this speed offset is then used as the actual package position, thereby obtaining an accurate actual package position. The actual package position is precise and reliable, without error, and accurate judgment can be made based on the actual package position. Even in logistics conveyor belt scenarios where the package movement speed is frequent and drastically changes (such as starting and stopping, slope changes, etc.), instead of using a single speed offset to obtain the predicted position of the package to be detected, multiple speed offsets are configured to find the speed offset corresponding to the package to be detected. Therefore, multiple speed offsets can dynamically and adaptively adapt to the possible speed state of the package at the current moment, and an accurate actual package position can still be obtained when the conveyor belt speed changes drastically. For example, if it is necessary to determine whether a package is stuck based on its actual location, then by obtaining the accurate actual location of the package, it is possible to accurately detect whether the package is stuck in the area to be monitored and obtain an accurate result of the delay detection.
[0045] The technical solutions described above in the embodiments of this application will be explained below in conjunction with specific application scenarios.
[0046] With the rapid increase in labor costs at logistics sorting centers and the continuous improvement in logistics transportation efficiency, the demand for automated sorting of goods is also gradually increasing. Therefore, sorting machines can be used in logistics sorting centers to automatically sort packages, which are then transported to different destinations. For example, after a package enters the sorting machine, the barcode or QR code reader on the machine can read the package's barcode or QR code, and simultaneously assign a sorting cart and a destination sorting port to the package. The package is transferred by the sorting machine to the sorting cart, which then transports the package along a conveyor belt to the destination sorting port. After sliding out of the sorting cart, the package enters the destination sorting port, completing the sorting process.
[0047] During the package sorting process, it is necessary to obtain the location of the packages and perform processing based on that location. For example, images of the packages can be captured and then input into a target detection model to obtain the package's location.
[0048] However, determining the location of a package based on an image is often subject to error, resulting in an inaccurate location and thus an inability to make accurate judgments. For example, if it is necessary to determine whether a package is delayed based on its location, the lack of an accurate location makes it impossible to determine whether the package is delayed, meaning an accurate delay detection result cannot be obtained.
[0049] See Figure 2 The diagram shows the structure of a sorting machine. 1 represents the sorting machine, 2 represents the sorting cart (2 is the conveyor belt on the sorting machine 1), and 6 represents the package inlet, from which packages are transported to the sorting machine 1. 5 represents the barcode reader or RFID reader / writer, which reads the barcode or QR code of the package before it is transferred to the sorting cart 2. 4 represents the support for the package inlet. 3 represents the conveyor belt slot (sorting port), 31 represents the slot baffle, 9 represents the slot baffle (9 and 31 point to the same position), 32 represents the slot placement area, and 33 represents the sorting package hook. During the conveyor belt transport process, the sorting cart 2 transports packages to the sorting port 3. After the package slides out of the sorting cart 2, it enters the sorting port 3, completing the sorting process. 8 represents the camera, and 7 represents the camera mount, used to hold the camera. The camera is used to capture images of each package on the sorting machine. Figure 2 Taking one camera 8 as an example, in practical applications, multiple cameras will be placed above the sorting machine. 11 represents the support leg of sorting machine 1, and 12 represents the support foot of sorting machine 1.
[0050] For example, in the sorting process of the logistics industry, a sorting machine 1 can be used to automatically sort packages. Packages are sorted by the sorting machine 1 and transported to different destinations. For instance, after a package enters the sorting machine 1 through the package inlet 6, the barcode reader 5 on the sorting machine 1 can read the package's barcode or QR code, and simultaneously assign the package to a sorting cart 2 and a destination sorting port 3. The package is transferred by the sorting machine 1 to the sorting cart 2, which then transports the package along a conveyor belt to the destination sorting port 3. During the package transportation process, a camera 8 can capture images of the package. After the package is transported to the destination sorting port 3, it slides out of the sorting cart 2 (the sorting cart 2 rotates its platform to slide the package out) and enters the destination sorting port, completing the sorting process.
[0051] During the parcel sorting process, it is necessary to obtain the parcel's location for further processing. For example, an image of the parcel can be captured by a camera and input into a target detection model to determine its location. However, determining the parcel's location based on this image often introduces errors, resulting in inaccurate parcel location determination and thus hindering accurate judgment.
[0052] For example, during the logistics sorting process, packages may unexpectedly become stuck at critical locations such as sorting nodes and merging areas due to reasons such as exceeding size limits, excessive frictional resistance, improper stacking, or sudden equipment malfunctions. Failure to detect such package delays in a timely manner can easily lead to package backlog and congestion, disrupt the subsequent sorting order, and even cause operational interruptions and equipment component damage, ultimately severely impacting sorting efficiency and processing capacity, and increasing the costs of manual intervention and equipment maintenance. Therefore, it is necessary to determine whether a package is stuck based on its location. However, due to the inability to obtain accurate package locations, it is impossible to determine whether a package is stuck based on its location, meaning accurate delay detection results cannot be obtained.
[0053] For example, regarding the sorting process in the logistics industry, taking a loop-type cross-belt sorting machine as an example, this machine greatly improves the efficiency and accuracy of package sorting through a high degree of automation. The basic working principle of a loop-type cross-belt sorting machine can be summarized in the following steps: Package Input: Packages are first placed on the conveyor belt from the input end. Scanning and Identification: As the packages move on the conveyor belt, scanning devices on the equipment read the identification information on the packages. Information Processing and Decision-Making: The scanned information is transmitted to the control system for processing. The control system makes decisions based on this information, determining where each package should be sorted. Sorting Execution: Under the control of the control system, sorting carts or sorting devices will pick up the packages from the conveyor belt at appropriate times and locations and place them in the corresponding sorting slots or designated locations. Package Output: After sorting, the packages are classified according to their destination and then boxed or transported to the next processing stage, awaiting further shipment.
[0054] To address the aforementioned findings, this application proposes a trajectory tracking and package delay determination method. By configuring multiple speed offsets, the method identifies the speed offset corresponding to the package to be detected. This allows for dynamic and adaptive adaptation to the possible speed state of the package at any given moment, ensuring accurate package location even when conveyor belt speeds change drastically. If it is necessary to determine whether a package is delayed based on its actual location, this method can accurately detect delays and obtain accurate delay detection results. In other words, this application proposes an algorithm for detecting package delays on logistics conveyor belts within the logistics field.
[0055] See Figure 3 The diagram shows a flowchart of a trajectory tracking and package retention determination method. The trajectory tracking and package retention determination method may include the following processes: package detection process, package following process, trajectory generation process, and package retention determination process.
[0056] During the package detection process, images of the package can be captured by a camera, and the images can be input into the target detection model to obtain the package detection location, thus realizing package localization and detecting the shape and coordinate position of the package within the field of view.
[0057] During package tracking, multiple frames of images showing the package's motion can be followed to obtain its actual position. Based on the package's previous motion patterns, the next motion state of the package is predicted and matched with the input package detection position, thus achieving association of identical packages in consecutive frames.
[0058] During the trajectory generation process, the actual location of the package can be added to the trajectory, that is, a trajectory is generated for each package based on the package following results.
[0059] In the process of determining whether a package is stuck, based on the results of target detection and trajectory tracking, the function of recognizing package stuck is realized by detecting multiple consecutive frames of packages in the conveyor belt area, thus determining whether a package is stuck.
[0060] First, regarding the package inspection process.
[0061] For example, packages move on a conveyor belt of a sorting machine. During this movement, images of the packages can be captured by a camera, such as 25 frames per second. The currently captured image (hereinafter referred to as the current frame image) can be input into a target detection model, which then outputs a first detection bounding box (such as a matrix detection box) for each package. Furthermore, the package detection position can be determined based on the first detection bounding box, which can be the center of the first detection bounding box.
[0062] For example, since there are multiple packages on the sorting machine's conveyor belt, after inputting the current frame image into the object detection model, the object detection model can output multiple first detection boxes, such as the first detection box for package a, the first detection box for package b, and the first detection box for package c. Furthermore, the package detection positions for package a, package b, and package c can be obtained.
[0063] For example, object detection models can be lightweight deep learning or neural network models used to achieve fast and accurate package location in logistics scenarios, providing a reliable data foundation for subsequent algorithmic judgments. However, the package detection location (first detection box) output by the object detection model may contain errors.
[0064] Second, regarding the package tracking process.
[0065] For example, a pre-configured discretized offset set (multi-level speed offset set) can be configured. This offset set can include multiple speed offsets, centered on a base speed (V_base), covering typical speed changes such as acceleration, deceleration, and stopping that may occur with the package. For instance, when a package moves on a conveyor belt of a sorting machine, the base speed can be determined based on the conveyor belt's movement speed. Considering that the conveyor belt's movement speed can be controlled, i.e., the conveyor belt's movement speed may change, the offset set contains speed offsets, not the speeds themselves. This allows for offsetting at different base speeds when the base speed changes.
[0066] For example, this offset set can include velocity offset x1, velocity offset x2, velocity offset x3, ..., that is, this offset set includes a large number of velocity offsets, which can be configured according to actual needs. For example, this offset set can include velocity offsets such as 0.1, 0.2, 0.5, 0.8, 1, 2, -0.1, -0.2, -0.5, -0.8, -1, -2, 0, etc., and there are no restrictions on these velocity offsets.
[0067] For example, see Figure 4 The diagram shown illustrates the package following process, which includes: Step 401: For any speed offset within the offset set, determine a reference motion speed based on the speed offset and the reference speed. The package to be inspected moves on the conveyor belt of the sorting machine, and the reference speed can be determined based on the conveyor belt's movement speed, such as the conveyor belt's movement speed itself.
[0068] For example, for a velocity offset x1 within the offset set, the reference motion velocity V1 is V_base-x1; for a velocity offset x2 within the offset set, the reference motion velocity V2 is V_base-x2; for a velocity offset x3 within the offset set, the reference motion velocity V3 is V_base-x3, and so on.
[0069] Step 402: Determine the movement distance based on the reference motion speed and the interval between two adjacent frames.
[0070] For example, the interval between two adjacent frames is the time interval between the acquisition time of the current frame (i.e., the time when the camera acquires the image of the current frame) and the acquisition time of the previous frame (i.e., the time when the camera acquires the image of the previous frame). Considering that the camera's frame rate is known, the interval between two adjacent frames is also known.
[0071] For example, based on the reference speed V1 and the interval t, the distance S1 can be calculated; based on the reference speed V2 and the interval t, the distance S2 can be calculated; based on the reference speed V3 and the interval t, the distance S3 can be calculated, and so on.
[0072] Step 403: Based on the actual position of the first package in the previous frame (i.e., the actual position of the package in the previous frame) and the moving distance, determine the predicted position of the package in the current frame.
[0073] For example, for a package that appears in an image for the first time, the package detection location is taken as the actual location of the package, and a trajectory is set for the package, in which the actual location of the package is added.
[0074] For packages that do not appear in the image for the first time, a trajectory has been set for the package. For each package with an existing trajectory (packages that have not left the sorting machine, and the trajectory of packages that have left the sorting machine is deleted), the package can be called a package to be detected (the following explanation will use a package to be detected as an example).
[0075] The actual position of the first package in the previous frame can be obtained from the trajectory of the package to be detected. Based on the actual position of the first package and the moving distance, the predicted position of the package to be detected in the current frame can be determined. For example, in the direction of the conveyor belt, the actual position of the first package is moved forward by this moving distance, and the position after the movement can be the predicted position of the package to be detected in the current frame.
[0076] For example, for each followed package (the package to be detected), all velocity offsets are tried in parallel. For each velocity offset, the predicted position of the package to be detected in the current frame can be predicted. Thus, based on the movement distance S1 and the actual position of the first package, the predicted position D1 of the package to be detected in the current frame can be determined; based on the movement distance S2 and the actual position of the first package, the predicted position D2 of the package to be detected in the current frame can be determined; based on the movement distance S3 and the actual position of the first package, the predicted position D3 of the package to be detected in the current frame can be determined, and so on. During the prediction process, the predicted positions D1, D2, and D3 can be obtained in parallel.
[0077] Step 404: Determine the target similarity between the package detection location and the package prediction location.
[0078] For example, since there are multiple packages on the sorting machine's conveyor belt, multiple package detection positions can be obtained, such as the package detection position of package a, the package detection position of package b, and the package detection position of package c. Since the offset set contains multiple velocity offsets, multiple predicted package positions corresponding to the velocity offsets can be obtained, such as package predicted position D1, package predicted position D2, and package predicted position D3. Based on this, a matching cost matrix can be obtained based on the similarity calculation results of all package detection locations and all package prediction locations. This matching cost matrix includes multiple target similarities, such as the target similarity between package prediction location D1 and package detection location of package a, package prediction location D1 and package detection location of package b, package prediction location D1 and package detection location of package c, package prediction location D2 and package detection location of package a, package prediction location D2 and package detection location of package b, package prediction location D2 and package detection location of package c, package prediction location D3 and package detection location of package a, package prediction location D3 and package detection location of package b, and package prediction location D3 and package detection location of package c.
[0079] For example, to determine the target similarity between the detected package location and the predicted package location, the distance (such as Euclidean distance) between the detected package location (representing the package's position in the image coordinate system) and the predicted package location (representing the package's position in the image coordinate system) can be determined, and the target similarity can be determined based on this distance. Obviously, the smaller the distance, the greater the target similarity.
[0080] Alternatively, the degree of overlap between the first detection box corresponding to the package detection location and the second detection box corresponding to the package prediction location can be determined, and the similarity of the target can be determined based on this degree of overlap. Obviously, the greater the degree of overlap, the greater the similarity of the target. This degree of overlap is called geometric feature similarity, and the degree of overlap can be the IOU (Intersection over Union) of the first and second detection boxes.
[0081] For the first detection box corresponding to the package detection location, when the current frame image is input to the target detection model, the target detection model can output the first detection box, and the package detection location is the center position of the first detection box. For the second detection box corresponding to the package prediction location, a second detection box is constructed with the package prediction location as the center, based on a preset length and a preset width. That is, the center position of the second detection box is the package prediction location, the length of the second detection box is the preset length, and the width of the second detection box is the preset width.
[0082] Alternatively, the distance between the detected package location and the predicted package location can be determined, as well as the degree of overlap between the first bounding box corresponding to the detected package location and the second bounding box corresponding to the predicted package location. Then, the target similarity can be determined based on the distance and the degree of overlap. For example, the target similarity can be obtained by weighting the distance and the degree of overlap. The weighting coefficient for the distance can be greater than the weighting coefficient for the degree of overlap, or it can be less than the weighting coefficient for the degree of overlap; there are no restrictions on this.
[0083] Step 405: Based on the target similarity between each package detection location and each package prediction location, the package prediction location corresponding to the maximum target similarity is determined as the second actual package location of the detected package in the current frame. That is, the actual package location of the detected package in the current frame is recorded as the second actual package location. Of course, in addition to determining the package prediction location corresponding to the maximum target similarity as the second actual package location, the package prediction location corresponding to the second maximum target similarity can also be determined as the second actual package location, and other package prediction locations can also be determined as the second actual package location; there are no restrictions on this.
[0084] For example, the matching cost matrix includes multiple target similarities. An optimal matching algorithm can be used to find the matching pair with the minimum global cost, i.e., the matching pair corresponding to the maximum target similarity. This matching pair includes a package detection position and a package prediction position. The package corresponding to this package detection position corresponds to the package to be detected. For example, if the maximum target similarity corresponds to the package detection position of package c, it means that package c corresponds to the package to be detected. The velocity offset corresponding to this package prediction position is the velocity offset of the package to be detected in the current frame. This package prediction position serves as the second actual position of the package. In this way, the detection target matched by the package to be detected in the current frame (the package detection position of package c) and the applicable optimal velocity offset can be obtained, and the second actual position of the package to be detected in the current frame can be updated.
[0085] As can be seen from the above technical solutions, this embodiment, by configuring multiple speed offsets (multi-level offsets covering the range of speed changes), rather than relying on a single, fixed speed model, can dynamically and adaptively adapt to the possible speed state of the package at the current moment. This ensures robustness and continuity of tracking even when the conveyor belt speed changes drastically, providing a reliable and continuous trajectory data foundation for subsequent delay determination. An adaptive matching mechanism based on multi-level speed offsets is proposed to solve the problem of single-speed model tracking failure caused by frequent and drastic changes in package movement speed (such as start-stop, slope changes) in logistics conveyor belt scenarios.
[0086] Third, regarding the trajectory generation process.
[0087] After obtaining the actual location of the second package in the current frame, the actual location of the second package can be added to the target trajectory of the package to be detected (hereinafter referred to as the target trajectory). For example, a trajectory point data can be added to the target trajectory, which may include the actual location of the second package. Furthermore, this trajectory point data may also include, but is not limited to, one of the following: The first detection box; for example, when the maximum target similarity corresponds to the package detection position of package c, the first detection box in the trajectory point data is the first detection box corresponding to the package detection position of package c.
[0088] The acquisition timestamp of the current frame image indicates the moment when the camera captured the current frame image.
[0089] The velocity offset corresponding to the maximum target similarity; for example, this velocity offset is the optimal velocity offset of the packet to be detected in the current frame, or the velocity offset corresponding to the actual position of the second packet.
[0090] The reference motion speed corresponding to the speed offset can be determined based on the speed offset and the reference speed.
[0091] Package detection location, which is the package detection location corresponding to the maximum target similarity.
[0092] For example, during trajectory generation, the output of the package following process can be closely integrated, transforming the dynamically matched actual position of the second package into a continuous and accurate motion trajectory. When the package following process successfully associates with the detected target in the current frame, the actual position of the second package can be added to the target trajectory of the package to be detected, achieving millisecond-level real-time updates. Furthermore, if the package is temporarily lost due to occlusion, transition trajectory points can be automatically generated based on the velocity model predicted by Kalman filtering to ensure trajectory continuity. For example, see... Figure 5A and Figure 5B The image shown is a schematic diagram of the package's following and trajectory lines.
[0093] For example, for the target trajectory of the package to be detected, a globally unique identifier can be assigned to the target trajectory, namely the trajectory identifier of the target trajectory. This trajectory identifier runs through the entire life cycle of the package to be detected (from the package to be detected entering the sorting machine to the package to be detected leaving the sorting machine), and a circular buffer is used to store the target trajectory of the package to be detected. Each trajectory point of the target trajectory contains the above trajectory point data, such as the position coordinates based on the image coordinate system (i.e., the actual position of the package), the timestamp t (accurate to the millisecond level), the velocity vector in the xy direction of the motion state (i.e., the reference motion velocity corresponding to the velocity offset), and the vertex coordinates of the package bounding box (such as the first detection box). There are no restrictions on the content of this trajectory point data.
[0094] Fourth, regarding the process for determining package delays.
[0095] For example, a monitoring area can be pre-configured for the sorting machine, indicating that it is necessary to determine whether the package to be inspected is stuck in the monitoring area. There can be one or more monitoring areas. The monitoring area is an area where there may be a stuck situation, such as an area with high friction, a critical area (sorting node, merging area), etc. There are no restrictions on the monitoring area. The following explanation will use one monitoring area as an example.
[0096] For the area to be monitored, you can directly input its coordinates. For example, if the area is rectangular, you can directly input the coordinates of one vertex, the length and width of the area, or the coordinates of all four vertices. If the area is circular, you can directly input the coordinates of its center point and its radius. For other shapes, you can also directly input their coordinates.
[0097] For the area to be monitored, a complete image of the sorting machine can be acquired (showing all positions of the sorting machine) and displayed on the interactive interface. In response to a region delineation operation on the complete image, the selected area corresponding to the delineation operation is obtained. For example, by viewing the complete image, the user can determine which area is to be monitored and draw the area to be monitored on the complete image—that is, the area to be monitored is drawn through the region delineation operation. Based on this, the area to be monitored can be determined based on the selected area; for example, the selected area can be designated as the area to be monitored. Considering that the selected area is an image region on the complete image, the selected area can also be converted to a selected area in physical space, which then becomes the area to be monitored.
[0098] The above are just two examples of obtaining the area to be monitored. There are no restrictions on this, and the area to be monitored can be pre-configured.
[0099] In this embodiment of the application, a dual verification method is used to determine whether a package to be detected remains in the monitoring area if it appears within the monitoring area. The dual verification method uses a persistence verification condition (used to verify whether the area continues to exist) and a consistency verification condition (i.e., a trajectory consistency verification condition, used to verify whether the trajectory is consistent in time and space) to determine whether the package to be detected remains in the monitoring area.
[0100] For persistent verification, the system determines whether the number of consecutive or cumulative frames (times) of the package to be detected within the monitored area exceeds a predefined threshold. If so, the persistent verification condition is met; otherwise, it is not. Considering that the location points in the target trajectory represent the actual locations of the packages, the system also determines whether the consecutive or cumulative actual locations of the packages within the monitored area exceed a predefined threshold. If so, the persistent verification condition is met; otherwise, it is not. For example, if multiple consecutive packages (exceeding the predefined threshold) within the monitored area are located on the target trajectory, the persistent verification condition is met.
[0101] Regarding the consistency verification condition, when the continuity verification condition is met, the target trajectory of the package to be detected can be further analyzed. That is, it is to evaluate whether the actual location of the package to be detected at the key package (i.e., the location at the key time point (or frame)) that meets the continuity verification condition has spatial consistency with the current location (i.e., the actual location of the last package on the target trajectory). If spatial consistency is present, it means that the consistency verification condition is met; if spatial consistency is not present, it means that the consistency verification condition is not met.
[0102] For example, if the actual location of the last package on the target trajectory is in the area to be monitored, that is, if the actual locations of the last package on the target trajectory and the key package are both in the area to be monitored, then the target trajectory meets the consistency verification condition, that is, the package to be monitored did not move away as expected.
[0103] Alternatively, if the distance between the actual location of the last package on the target trajectory and the actual location of the critical package is less than a preset distance threshold (i.e., the changes in their positions are small), then the target trajectory meets the consistency verification condition, meaning the package to be detected did not move away as expected. In this case, the actual location of the last package on the target trajectory may be within the monitored area, or it may not be within the monitored area, as long as the distance between it and the actual location of the critical package is less than the preset distance threshold.
[0104] In summary, for a package to be monitored within the monitoring area, if the target trajectory of the package meets both the continuity verification condition and the consistency verification condition, then the package is determined to be residing within the monitoring area. If the target trajectory of the package meets the continuity verification condition but does not meet the consistency verification condition, or if the target trajectory of the package does not meet the continuity verification condition, then the package is determined not to be residing within the monitoring area.
[0105] For example, see Figure 6 The diagram shown illustrates the process for determining package retention, which includes: Step 601: When the target trajectory of the package to be detected is updated, determine whether the actual location of the last package on the target trajectory is within the monitoring area. If not, it means that the package to be detected has not appeared in the monitoring area. End the process and wait for the next update of the target trajectory of the package to be detected to re-determine whether the actual location of the last package on the target trajectory is within the monitoring area. If yes, proceed to step 602.
[0106] Step 602: When the target trajectory of the package to be detected is updated, determine whether there is a critical package actual location in the target trajectory, that is, whether the actual location of the last package in the target trajectory is the actual location of the critical package.
[0107] For example, if the actual location of the last package on the target trajectory is within the monitored area, it indicates that the package to be detected has entered the monitored area, and it is determined whether the actual location of the last package on the target trajectory is a critical package location. For instance, if the actual location of this package and the actual locations of the K packages preceding it are all within the monitored area, then the continuity verification condition is met, and the actual location of the last package on the target trajectory is a critical package location. Otherwise, if the consecutive number of actual locations of packages within the monitored area is not greater than a predefined threshold (K+1), then the continuity verification condition is not met, and the actual location of the last package on the target trajectory is not a critical package location. The process waits for the next update of the target trajectory of the package to be detected to re-examine whether a critical package location exists in the target trajectory, and so on.
[0108] Obviously, if the actual location of the package and the actual locations of the K packages preceding it are all within the monitoring area, and the actual location of the last package on the target trajectory is the location of the critical package, then it means that the actual locations of the packages in the target trajectory within the monitoring area have reached a predetermined threshold, either continuously or cumulatively.
[0109] For example, the above process can be represented by the following formula: ; This indicates the actual location of the last package on the target trajectory. This indicates the actual locations of the K packages preceding the last package. Indicates the spatial extent of the area to be monitored, only when and the actual locations of K packages All in Only within this range can the conditions for continuous verification be met.
[0110] For example, if the actual location of the critical package is not found in the target trajectory, step 603 can be executed; if the actual location of the critical package is found in the target trajectory, step 604 can be executed.
[0111] Step 603: If no actual location of the critical package exists, add a first value (e.g., 1) to the number of packages stuck on the target trajectory. Then, return to step 602 and wait for the target trajectory of the package to be detected to be updated next time. Re-determine whether there is an actual location of the critical package in the target trajectory. Continue in this manner until the number of packages stuck reaches K+1 (i.e., the predefined threshold). At this point, it is determined that there is an actual location of the critical package in the target trajectory, and step 604 is executed. Alternatively, if the actual location of the last package on the target trajectory is not in the area to be monitored, it means that the package to be detected has left the area to be monitored, and it is no longer necessary to determine whether the package is stuck in the area to be monitored.
[0112] For example, the initial value of the number of packages remaining on the target trajectory can be a second value (0). When the first actual location of a package in the monitored area appears on the target trajectory, the number of packages remaining is incremented by 1. When the second actual location of a package in the monitored area appears on the target trajectory, the number of packages remaining is incremented by 1, and so on, until K+1 actual locations of packages in the monitored area appear on the target trajectory. The actual location of the K+1th package in the monitored area is taken as the key package location. Alternatively, if the actual location of a package on the target trajectory has left the monitored area before K+1 actual locations of packages in the monitored area appear, it means that the package to be detected has not remained in the monitored area, and the processing flow ends.
[0113] For example, the number of delayed packages can be incremented by 1 with each update of the target trajectory, thus continuously updating the number of delayed packages. However, if the target trajectory is missing M package locations during an update (i.e., M package locations are missing between the current update and the previous update, where M is a positive integer), then in one possible implementation, if missing package locations are found, the number of delayed packages is directly updated to a second value (e.g., 0), and the number of delayed packages is re-accumulated from 0. Alternatively, if M is not greater than the configured packet loss tolerance threshold, the number of delayed packages can remain unchanged, i.e., the number of delayed packages is accumulated based on the current number of delayed packages, instead of re-accumulating from 0. If M is greater than the packet loss tolerance threshold, the number of delayed packages is updated to a second value (e.g., 0), and the number of delayed packages is re-accumulated from 0.
[0114] For example, to address the issue of missed package detection in complex scenarios due to occlusion and changes in lighting, this embodiment introduces a packet loss tolerance window, i.e., a pre-configured packet loss tolerance threshold, such as 5 or 8. Based on this, if a brief missed detection occurs during continuous tracking, the number of delayed packages is not reset, and the current accumulated value of the delayed package count is maintained. Only when the number of consecutive missed frames exceeds the packet loss tolerance threshold is the counter reset to zero, updating the number of delayed packages to 0. Based on this processing method, robustness to intermittent detection failures can be significantly improved, maintaining the accuracy of delayed package identification even in complex backgrounds with a certain packet loss rate.
[0115] For example, the above process can be represented by the following formula: ; Indicates the number of stranded individuals. M represents the number of consecutive missed frames. This represents the packet loss tolerance threshold.
[0116] Step 604: If there are key package locations (i.e., the target trajectory has consecutive or cumulative package locations within the monitored area reaching a predetermined threshold), then after an interval of a first time period (which can be configured according to actual needs), determine whether the target trajectory meets the consistency verification condition. Clearly, based on the continuous verification condition, if there are key package locations, it means that the key package location and the K package locations preceding it are all within the monitored area.
[0117] For example, after the actual location of a critical package appears in the target trajectory, a periodic detection mode will be entered to reduce the detection frequency of the target trajectory and dynamically balance the allocation of computing resources. For instance, each time the target trajectory of the package to be detected is updated, instead of checking whether the target trajectory meets the consistency verification conditions, a timer will start from the moment the actual location of the critical package appears, and only after a first time interval (e.g., 1 second) will it be determined whether the target trajectory meets the consistency verification conditions. This allows for adaptive adjustment of the detection frequency, saving computing resources. By determining whether the target trajectory meets the consistency verification conditions only after the first time interval, detection can be performed after multiple package locations, improving the accuracy of delay detection.
[0118] For example, after a first time interval, if the actual location of the last package on the target trajectory (which is separated from the actual location of the key package by multiple package locations) is still in the area to be monitored, or if the distance between the actual location of the last package on the target trajectory and the actual location of the key package is less than a preset distance threshold, then the target trajectory is determined to meet the consistency verification conditions.
[0119] Otherwise, after the first time interval, if the actual location of the last package on the target trajectory is not in the area to be monitored, and the distance between the actual location of the last package on the target trajectory and the actual location of the key package is not less than a preset distance threshold, then the target trajectory is determined to meet the inconsistency verification condition.
[0120] For example, if the target trajectory does not meet the consistency verification conditions, step 605 can be executed; or, if the target trajectory meets the consistency verification conditions, step 606 can be executed.
[0121] Step 605: Determine that the package to be inspected has not been left in the monitoring area, that is, the package to be inspected has left the monitoring area, and the process of detecting the delay of the package to be inspected ends.
[0122] Step 606: Determine if the package to be inspected is stuck in the monitoring area.
[0123] In one possible implementation, if the package to be detected remains in the monitored area, then after a first time interval, the consistency verification condition of the target trajectory is re-evaluated to determine whether the package remains in the monitored area. Based on this, the determination of whether the package remains in the monitored area is repeated every first time interval until the package leaves the monitored area. Clearly, if the package remains in the monitored area for an extended period, multiple retention detection results can be obtained.
[0124] In one possible implementation, if the package to be detected remains in the monitored area, then after a second time interval, the consistency verification condition of the target trajectory is re-evaluated to determine whether the package remains in the monitored area. Based on this, the determination of whether the package remains in the monitored area is repeated every second time interval until the package leaves the monitored area. Clearly, even if the package remains in the monitored area for an extended period, multiple retention detection results can be obtained.
[0125] For example, considering that when a package to be inspected is stuck in the area to be monitored, it needs to be repaired manually, which takes some time, it is not necessary to frequently check the status of the package being stuck. Based on this, the second duration can be longer than the first duration, thereby reducing the frequency of subsequent inspections of the package to be inspected and saving computing resources.
[0126] In the above method, an intelligent detection frequency adjustment mechanism is designed. Once it is determined that there is a key package in the target trajectory of the package to be detected, the periodic detection mode will be entered, and the subsequent detection frequency of the package to be detected will be automatically reduced. By dynamically balancing the allocation of computing resources, the delayed packages will still be periodically detected after the number of frames exceeds the threshold. Under the premise of ensuring real-time performance, the detection rate of delayed packages will not be reduced.
[0127] Step 607: If it is determined that the package to be detected is stuck in the monitoring area, output a delay alarm message for the package to be detected, which indicates that the package to be detected is stuck in the monitoring area.
[0128] In one possible implementation, if the package to be detected remains in the monitored area, a delay alarm message for the package to be detected is directly output. Alternatively, the alarm record table is queried to see if a globally unique identifier for the target trajectory is already stored; if the globally unique identifier for the target trajectory is not stored, a delay alarm message for the package to be detected is output, and the globally unique identifier for the target trajectory is stored in the alarm record table; if the globally unique identifier for the target trajectory is already stored, the output of a delay alarm message for the package to be detected is prohibited.
[0129] For example, the target trajectory has a globally unique identifier (such as a trajectory ID). When it is determined that a package to be monitored is stuck in the monitored area based on the target trajectory, the alarm record table can be queried to see if the globally unique identifier of the target trajectory has been stored. If not, it means that no alarm has been issued for the package to be monitored yet, so a stuck alarm message for the package to be monitored is output. If yes, it means that an alarm has been issued for the package to be monitored, so no more stuck alarm message for the package to be monitored is output. In this way, duplicate alarms for the same package to be monitored can be effectively prevented due to the package to be monitored reappearing after a brief interruption (ID switching) or other reasons, realizing the deduplication alarm function based on the globally unique identifier (such as the trajectory ID).
[0130] As can be seen from the above technical solutions, this application proposes an intelligent detection method for the problem of parcel stagnation on logistics conveyor belts. It accurately captures the motion characteristics of parcels in conveyor belt speed-changing scenarios (such as start-stop jitter and slope changes) through multi-level adaptive speed, achieving stable cross-frame following and generating continuous trajectory information during sudden motion changes. A multi-level false alarm prevention mechanism is constructed by integrating spatiotemporal joint verification and trajectory lifecycle management. Through a spatiotemporally consistent stagnation determination strategy (simultaneously verifying the current coordinates of the parcel in the stagnation area and the coordinates of the historical trajectory start point), it effectively distinguishes between true stagnation and momentary pauses, avoiding high false alarms in single-frame detection. Combined with a globally unique trajectory identifier deduplication mechanism, it avoids duplicate alarms caused by target tracking breaks or rebirths. To balance detection accuracy and load, a dynamic detection cycle adjustment method is designed, which can automatically switch to a low-frequency cycle detection mode, significantly reducing computational resource consumption. To address the problem of transient occlusion in complex scenarios, a missed detection frame tolerance window is introduced to maintain the continuity of the parcel's existence state when a limited number of frames are missed.
[0131] By ensuring accuracy through spatiotemporal joint verification, eliminating redundant alarms through identifier deduplication, reducing computational load through dynamic periodic mechanisms, and improving adaptability to complex scenarios through missed detection tolerance, the system ultimately achieves accurate determination of package delays, providing intelligent assurance for high-speed logistics systems that eliminates the need for manual inspections.
[0132] Based on the same concept as the methods described above, this application proposes a trajectory tracking device, see [link to relevant documentation]. Figure 7AThe diagram shown is a structural schematic of the trajectory tracking device, which may include: The determining module 71 is used to determine the predicted position of the package to be detected in the current frame based on the actual position and velocity offset of the first package in the previous frame; wherein the configured offset set includes multiple velocity offsets; and to select the second actual position of the package to be detected in the current frame from the multiple predicted positions based on the target similarity between the package detection position and the package prediction positions corresponding to the multiple velocity offsets; wherein the package detection position is determined based on the current frame image. Processing module 72 is used to add the actual position of the second package to the target trajectory of the package to be detected.
[0133] For example, for any velocity offset within the offset set, when determining the predicted position of the package to be detected in the current frame based on the actual position and velocity offset of the first package in the previous frame, the determining module 71 specifically performs the following: determining a reference motion speed based on the velocity offset and a reference speed; wherein the package to be detected moves on the conveyor belt of the sorting machine, and the reference speed is determined based on the moving speed of the conveyor belt; and determining the predicted position of the package to be detected in the current frame based on the reference motion speed, the interval between two adjacent frames, and the actual position of the first package.
[0134] For example, for any velocity offset within the offset set, the determining module 71 determines the target similarity between the package detection position and the package prediction position corresponding to the velocity offset in the following ways: determining the target similarity based on the distance between the package detection position and the package prediction position; or, determining the target similarity based on the degree of overlap between the first detection box corresponding to the package detection position and the second detection box corresponding to the package prediction position; or, determining the target similarity based on the distance and the degree of overlap; wherein, the first detection box is obtained by inputting the current frame image to the target detection model; and the second detection box is constructed with the package prediction position as the center, based on a preset length and a preset width.
[0135] For example, when adding the actual location of the second package to the target trajectory of the package to be detected, the processing module 72 is specifically used to: add trajectory point data to the target trajectory, the trajectory point data including the actual location of the second package; wherein, the trajectory point data also includes at least one of a first detection box, the acquisition timestamp of the current frame image, the velocity offset corresponding to the maximum target similarity, and the package detection location; wherein, the first detection box is obtained by inputting the current frame image to the target detection model; wherein, the package detection location is the center location of the first detection box.
[0136] For example, the device further includes: a detection module, configured to determine whether the package to be detected remains in the monitoring area of the sorting machine based on the target trajectory; wherein, the detection module is further configured to acquire the monitoring area, specifically for: acquiring a complete image of the sorting machine and displaying the complete image on an interactive interface; in response to a region delineation operation on the complete image, acquiring a selected region corresponding to the region delineation operation on the complete image, and determining the monitoring area based on the selected region.
[0137] For example, the target trajectory includes multiple actual locations of packages. When the detection module determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: if the actual locations of packages that are consecutive or cumulative in the monitoring area of the target trajectory reach a predetermined threshold, then it is determined that the package to be detected is stuck in the monitoring area.
[0138] For example, the target trajectory includes multiple actual package locations. When the detection module determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: when the actual locations of the packages on the target trajectory continuously or cumulatively reach a predetermined threshold in the monitoring area, if the actual location of the last package on the target trajectory is in the monitoring area, then it is determined that the package to be detected is stuck in the monitoring area; if the actual location of the last package on the target trajectory is not in the monitoring area, and the distance between the actual location of the last package and the actual location of a specified package is less than a preset distance threshold, then it is determined that the package to be detected is stuck in the monitoring area; wherein, the specified actual location of the package is any actual location of the package on the target trajectory that is in the monitoring area.
[0139] Based on the same concept as the above method, this application proposes a package retention determination device, see [link to relevant documentation]. Figure 7B The diagram shown is a structural schematic of a package retention determination device, which may include: Processing module 73 is used to acquire the identification information on the package to be inspected; determine the sorting slot position of the package to be inspected based on the identification information; and move the package to be inspected to the sorting slot position via the conveyor belt of the sorting machine. The acquisition module 74 is used to acquire the target trajectory corresponding to the package to be detected; wherein, the target trajectory includes multiple actual positions of the package to be detected as it moves on the conveyor belt; The detection module 75 is used to determine whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory.
[0140] For example, when the detection module 75 acquires the area to be monitored, it is specifically used to: acquire a complete image of the sorting machine and display the complete image on the interactive interface; in response to an area delineation operation on the complete image, acquire the selected area corresponding to the area delineation operation on the complete image, and determine the area to be monitored based on the selected area.
[0141] For example, when the detection module 75 determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: if the actual position of the package continuously or cumulatively within the monitoring area of the target trajectory reaches a predetermined threshold, then it is determined that the package to be detected is stuck in the monitoring area.
[0142] For example, when the detection module 75 determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: when the actual positions of the packages continuously or cumulatively along the target trajectory in the monitoring area reach a predetermined threshold, if the actual position of the last package along the target trajectory is in the monitoring area, then it is determined that the package to be detected is stuck in the monitoring area; if the actual position of the last package along the target trajectory is not in the monitoring area, and the distance between the actual position of the last package and the actual position of a specified package is less than a preset distance threshold, then it is determined that the package to be detected is stuck in the monitoring area; wherein, the specified actual position of the package is any actual position of the package along the target trajectory that is in the monitoring area.
[0143] For example, the detection module 75 is further configured to, when determining that the package to be detected is stuck in the monitoring area based on the target trajectory, query whether the globally unique identifier of the target trajectory has been stored in the alarm record table; if the globally unique identifier is not stored, output the stuck alarm information for the package to be detected, and store the globally unique identifier of the target trajectory in the alarm record table; if the globally unique identifier has been stored, prohibit the output of the stuck alarm information for the package to be detected.
[0144] For example, when the detection module 75 determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: when the target trajectory is updated, determine whether the actual positions of the packages continuously or cumulatively along the target trajectory in the monitoring area reach a predetermined threshold; if so, after an interval of a first time period, determine whether the target trajectory meets the consistency verification condition; if the consistency verification condition is met, determine that the package to be detected is stuck in the monitoring area; if the consistency verification condition is not met, determine that the package to be detected is not stuck in the monitoring area; if the package to be detected is stuck in the monitoring area, after an interval of a second time period, re-determine whether the target trajectory meets the consistency verification condition, wherein the second time period is longer than the first time period.
[0145] For example, if the actual location of the last package on the target trajectory is within the monitored area, or if the distance between the actual location of the last package on the target trajectory and the actual location of the specified package is less than a preset distance threshold, then the target trajectory meets the consistency verification condition.
[0146] Based on the same concept as the above method, this application proposes an electronic device, see [link to previous application]. Figure 8 As shown, the electronic device includes a processor 81 and a machine-readable storage medium 82, the machine-readable storage medium 82 storing machine-executable instructions that can be executed by the processor 81; the processor 81 is used to execute the machine-executable instructions to implement the trajectory tracking and package retention determination method disclosed in the above example.
[0147] Based on the same concept as the above method, this application also provides a machine-readable storage medium storing a plurality of computer instructions. When the computer instructions are executed by a processor, they can implement the trajectory tracking and package retention determination method disclosed in the above examples of this application.
[0148] The aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0149] Based on the same concept as the methods described above, this application also provides a computer program product, which may include a computer program. When executed by a processor, the computer program implements the trajectory tracking and package retention determination method disclosed in the examples above.
[0150] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0151] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A trajectory tracking method, characterized in that, The method includes: Based on the actual position and velocity offset of the first package in the previous frame, the predicted position of the package to be detected in the current frame is determined; wherein, the configured offset set includes multiple velocity offsets; Based on the target similarity between the package detection location and the package prediction locations corresponding to multiple velocity offsets, the second actual package location of the package to be detected in the current frame is selected from multiple package prediction locations; wherein, the package detection location is determined based on the current frame image; Add the actual location of the second package to the target trajectory of the package to be detected.
2. The method according to claim 1, characterized in that, For any velocity offset within the offset set, determining the predicted position of the package to be detected in the current frame based on the actual position and velocity offset of the first package in the previous frame includes: A reference motion speed is determined based on the speed offset and the reference speed; wherein the package to be detected moves on the conveyor belt of the sorting machine, and the reference speed is determined based on the moving speed of the conveyor belt; Based on the reference motion speed, the interval between two adjacent frames, and the actual position of the first package, the predicted position of the package to be detected in the current frame is determined.
3. The method according to claim 1, characterized in that, For any velocity offset within the offset set, the target similarity between the package detection location and the predicted package location corresponding to that velocity offset is determined as follows: The similarity of the target is determined based on the distance between the detected location of the package and the predicted location of the package. Alternatively, the target similarity can be determined based on the degree of overlap between the first detection box corresponding to the package detection location and the second detection box corresponding to the package prediction location; Alternatively, the target similarity can be determined based on the distance and the degree of overlap; The first detection box is obtained by inputting the current frame image into the target detection model. The second detection frame is constructed with the predicted location of the package as the center, based on a preset length and a preset width.
4. The method according to claim 1, characterized in that, Adding the actual location of the second package to the target trajectory of the package to be detected includes: Add trajectory point data to the target trajectory, the trajectory point data including the actual position of the second package; wherein, the trajectory point data also includes at least one of the following: a first detection box, the acquisition timestamp of the current frame image, the velocity offset corresponding to the maximum target similarity, and the package detection position; The first detection box is obtained by inputting the current frame image into the target detection model. The package detection position is the center position of the first detection frame.
5. The method according to any one of claims 1-4, characterized in that, After adding the actual location of the second package to the target trajectory of the package to be detected, the method further includes: Based on the target trajectory, determine whether the package to be detected remains in the monitoring area of the sorting machine; The process of acquiring the area to be monitored includes: Obtain a complete image of the sorting machine and display the complete image on the interactive interface; In response to a region delineation operation on the complete image, the selected region corresponding to the region delineation operation on the complete image is obtained, and the region to be monitored is determined based on the selected region.
6. The method according to claim 5, characterized in that, The target trajectory includes multiple actual package locations. Determining whether the package to be detected remains in the monitoring area of the sorting machine based on the target trajectory includes: If the actual location of the package to be detected reaches a predetermined threshold continuously or cumulatively within the monitored area, it is determined that the package to be detected is stuck in the monitored area.
7. The method according to claim 5, characterized in that, The target trajectory includes multiple actual package locations. Determining whether the package to be detected remains in the monitoring area of the sorting machine based on the target trajectory includes: If the actual location of the last package on the target trajectory within the monitored area reaches a predetermined threshold, then if the actual location of the last package on the target trajectory is within the monitored area, it is determined that the package to be detected is stuck in the monitored area. If the actual location of the last package on the target trajectory is not in the monitored area, and the distance between the actual location of the last package and the actual location of the specified package is less than a preset distance threshold, then it is determined that the package to be detected is stuck in the monitored area; wherein, the actual location of the specified package is any actual location of any package on the target trajectory within the monitored area.
8. A method for determining package retention, characterized in that, The method includes: Obtain the identification information on the package to be inspected; The location of the sorting compartment to which the package to be inspected is placed is determined based on the identification information; The package to be inspected is moved to the slot position by the conveyor belt of the sorting machine; Obtain the target trajectory corresponding to the package to be detected; wherein, the target trajectory includes the actual positions of multiple packages as the package to be detected moves on the conveyor belt; Based on the target trajectory, it is determined whether the package to be detected remains in the monitoring area of the sorting machine.
9. The method according to claim 8, characterized in that, The process of acquiring the area to be monitored includes: Obtain a complete image of the sorting machine and display the complete image on the interactive interface; In response to a region delineation operation on the complete image, the selected region corresponding to the region delineation operation on the complete image is obtained, and the region to be monitored is determined based on the selected region.
10. The method according to claim 8, characterized in that, The step of determining whether the package to be detected remains in the monitoring area of the sorting machine based on the target trajectory includes: If the actual location of the package to be detected reaches a predetermined threshold continuously or cumulatively within the monitored area, it is determined that the package to be detected is stuck in the monitored area.
11. The method according to claim 8, characterized in that, The step of determining whether the package to be detected remains in the monitoring area of the sorting machine based on the target trajectory includes: If the actual location of the last package on the target trajectory within the monitored area reaches a predetermined threshold, then if the actual location of the last package on the target trajectory is within the monitored area, it is determined that the package to be detected is stuck in the monitored area. If the actual location of the last package on the target trajectory is not in the monitored area, and the distance between the actual location of the last package and the actual location of the specified package is less than a preset distance threshold, then it is determined that the package to be detected is stuck in the monitored area; wherein, the actual location of the specified package is any actual location of any package on the target trajectory within the monitored area.
12. The method according to any one of claims 8-11, characterized in that, If the method determines, based on the target trajectory, that the package to be detected remains in the area to be monitored, the method further includes: Check if the globally unique identifier of the target trajectory has been stored in the alarm record table; If the globally unique identifier is not stored, a delay alarm message for the package to be detected is output, and the globally unique identifier of the target trajectory is stored in the alarm record table; if the globally unique identifier has been stored, the output of a delay alarm message for the package to be detected is prohibited.
13. The method according to any one of claims 8-11, characterized in that, The step of determining whether the package to be detected remains in the monitoring area of the sorting machine based on the target trajectory includes: When the target trajectory is updated, it is determined whether the actual location of the packages that are continuously or cumulatively connected within the monitored area reaches a predetermined threshold. If so, after the first time interval, it is determined whether the target trajectory meets the consistency verification condition; if the consistency verification condition is met, it is determined that the package to be detected is stuck in the monitoring area; if the consistency verification condition is not met, it is determined that the package to be detected is not stuck in the monitoring area. If the package to be detected remains in the area to be monitored, after a second time interval, it is re-determined whether the target trajectory meets the consistency verification condition, wherein the second time interval is longer than the first time interval; Specifically, if the actual location of the last package on the target trajectory is within the monitored area, or if the distance between the actual location of the last package on the target trajectory and the actual location of the specified package is less than a preset distance threshold, then the target trajectory meets the consistency verification condition.
14. A trajectory tracking device, characterized in that, The device includes: A determination module is used to determine the predicted position of the package to be detected in the current frame based on the actual position and velocity offset of the first package in the previous frame; wherein the configured offset set includes multiple velocity offsets; and to select the second actual position of the package to be detected in the current frame from the multiple predicted positions based on the target similarity between the package detection position and the package prediction positions corresponding to the multiple velocity offsets; wherein the package detection position is determined based on the current frame image. The processing module is used to add the actual position of the second package to the target trajectory of the package to be detected.
15. The apparatus according to claim 14, characterized in that, For any velocity offset within the offset set, when determining the predicted position of the package to be detected in the current frame based on the actual position and velocity offset of the first package in the previous frame, the determining module specifically performs the following: determining a reference motion speed based on the velocity offset and a reference speed; wherein the package to be detected moves on the conveyor belt of the sorting machine, and the reference speed is determined based on the moving speed of the conveyor belt; and determining the predicted position of the package to be detected in the current frame based on the reference motion speed, the interval between two adjacent frames, and the actual position of the first package. Alternatively, for any velocity offset within the offset set, the determining module determines the target similarity between the package detection location and the package prediction location corresponding to the velocity offset in the following ways: determining the target similarity based on the distance between the package detection location and the package prediction location; or, determining the target similarity based on the degree of overlap between the first detection box corresponding to the package detection location and the second detection box corresponding to the package prediction location; or, determining the target similarity based on the distance and the degree of overlap; wherein, the first detection box is obtained by inputting the current frame image into the target detection model; and the second detection box is constructed with the package prediction location as the center, based on a preset length and a preset width; Alternatively, when adding the actual location of the second package to the target trajectory of the package to be detected, the processing module is specifically used to: add trajectory point data to the target trajectory, the trajectory point data including the actual location of the second package; wherein, the trajectory point data also includes at least one of a first detection box, the acquisition timestamp of the current frame image, the velocity offset corresponding to the maximum target similarity, and the package detection location; wherein, the first detection box is obtained by inputting the current frame image to the target detection model; wherein, the package detection location is the center location of the first detection box; Alternatively, the device further includes: a detection module, configured to determine whether the package to be detected remains in the monitoring area of the sorting machine based on the target trajectory; wherein, the detection module is further configured to acquire the monitoring area, specifically for: acquiring a complete image of the sorting machine and displaying the complete image on an interactive interface; in response to a region delineation operation on the complete image, acquiring a selected region corresponding to the region delineation operation on the complete image, and determining the monitoring area based on the selected region; Alternatively, the target trajectory includes multiple actual package locations, and the detection module determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory. Specifically, if the actual locations of packages that are consecutive or cumulative in the monitoring area of the target trajectory reach a predetermined threshold, then it is determined that the package to be detected is stuck in the monitoring area. Alternatively, the target trajectory includes multiple actual package locations. When the detection module determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: when the actual locations of the packages on the target trajectory continuously or cumulatively reach a predetermined threshold in the monitoring area, if the actual location of the last package on the target trajectory is in the monitoring area, then it is determined that the package to be detected is stuck in the monitoring area; if the actual location of the last package on the target trajectory is not in the monitoring area, and the distance between the actual location of the last package and the actual location of a specified package is less than a preset distance threshold, then it is determined that the package to be detected is stuck in the monitoring area; wherein, the specified actual location of the package is any actual location of a package on the target trajectory that is in the monitoring area.
16. A device for determining package retention, characterized in that, The device includes: The processing module is used to acquire the identification information on the package to be inspected; determine the sorting slot position of the package to be inspected based on the identification information; and move the package to be inspected to the sorting slot position via the conveyor belt of the sorting machine. The acquisition module is used to acquire the target trajectory corresponding to the package to be detected; wherein, the target trajectory includes multiple actual positions of the package to be detected as it moves on the conveyor belt; The detection module is used to determine whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory.
17. The apparatus according to claim 16, characterized in that, When the detection module acquires the area to be monitored, it is specifically used to: acquire a complete image of the sorting machine and display the complete image on the interactive interface; in response to an area delineation operation on the complete image, acquire the selected area corresponding to the area delineation operation on the complete image, and determine the area to be monitored based on the selected area; When the detection module determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: if the actual positions of the packages that are continuously or cumulatively connected in the monitoring area reach a predetermined threshold, then it is determined that the package to be detected is stuck in the monitoring area. Alternatively, when the detection module determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: when the actual positions of the packages continuously or cumulatively along the target trajectory in the monitoring area reach a predetermined threshold, if the actual position of the last package along the target trajectory is in the monitoring area, then it is determined that the package to be detected is stuck in the monitoring area; if the actual position of the last package along the target trajectory is not in the monitoring area, and the distance between the actual position of the last package and the actual position of a specified package is less than a preset distance threshold, then it is determined that the package to be detected is stuck in the monitoring area; wherein, the specified actual position of the package is any actual position of a package along the target trajectory that is in the monitoring area. Alternatively, the detection module is further configured to, when determining that the package to be detected is stuck in the monitoring area based on the target trajectory, query whether the globally unique identifier of the target trajectory has been stored in the alarm record table; if the globally unique identifier is not stored, output a stuck alarm message for the package to be detected, and store the globally unique identifier of the target trajectory in the alarm record table; if the globally unique identifier is stored, prohibit the output of a stuck alarm message for the package to be detected. Alternatively, when the detection module determines whether the package to be detected is stuck in the monitoring area of the sorting machine based on the target trajectory, it is specifically used to: when the target trajectory is updated, determine whether the actual positions of the packages continuously or cumulatively along the target trajectory in the monitoring area reach a predetermined threshold; if so, after an interval of a first time period, determine whether the target trajectory meets the consistency verification condition; if the consistency verification condition is met, determine that the package to be detected is stuck in the monitoring area; if the consistency verification condition is not met, determine that the package to be detected is not stuck in the monitoring area; if the package to be detected is stuck in the monitoring area, after an interval of a second time period, re-determine whether the target trajectory meets the consistency verification condition, wherein the second time period is longer than the first time period; Specifically, if the actual location of the last package on the target trajectory is within the monitored area, or if the distance between the actual location of the last package on the target trajectory and the actual location of the specified package is less than a preset distance threshold, then the target trajectory meets the consistency verification condition.
18. An electronic device, characterized in that, include: A processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; The processor is configured to execute machine-executable instructions to implement the method of any one of claims 1-13.
