A robot barcode scanning method, apparatus, equipment and medium

By constructing a trajectory library and a confidence-weighted success rate model, the robot scanning method selects the optimal trajectory, solving the problems of high failure rate and low efficiency caused by the single scanning trajectory in the existing technology. It achieves adaptive and highly robust recognition, improving the scanning success rate and efficiency.

CN122366479APending Publication Date: 2026-07-10HEFEI LEJU ROBOT TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI LEJU ROBOT TECHNOLOGY CO LTD
Filing Date
2026-06-01
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing robot barcode scanning methods have a single scanning trajectory, making it difficult to adapt to barcode posture deviations or lateral distributions. They also lack systematic process control and quantitative decision-making, resulting in high scanning failure rates, low efficiency, and an inability to adapt to complex environments.

Method used

By constructing a trajectory library, the real-time detection success probability of each candidate scanning trajectory is determined based on the robot's current state information. A confidence-weighted success rate model is then developed by combining the prior success probability to select the optimal trajectory. Finally, a comprehensive decision is made based on the execution cost to achieve adaptive recognition.

Benefits of technology

It improves the robot's scanning success rate and operational efficiency in complex environments, overcomes the scanning failure problem under a single fixed trajectory, and achieves highly robust recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122366479A_ABST
    Figure CN122366479A_ABST
Patent Text Reader

Abstract

This invention discloses a robot barcode scanning method, apparatus, device, and medium. It relates to the field of automatic barcode scanning technology. The method includes: determining the real-time detection success probability of each candidate barcode scanning trajectory in a trajectory library based on the robot's current state information; the real-time detection success probability characterizes the likelihood that executing the candidate barcode scanning trajectory in the current state will successfully identify the barcode; determining the confidence-weighted success rate of each candidate barcode scanning trajectory based on the prior success probability of each candidate barcode scanning trajectory and the real-time detection success probability; selecting the optimal trajectory from the candidate barcode scanning trajectories based on the confidence-weighted success rate and the execution cost of each candidate barcode scanning trajectory; and controlling the robot to scan according to the optimal trajectory. This invention can overcome the problem of barcode scanning failure under non-ideal conditions such as posture deviation, lighting changes, or partial occlusion with a single fixed trajectory, thereby improving the barcode scanning success rate and operational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic barcode scanning technology, and in particular to a robot barcode scanning method, apparatus, equipment, and medium. Background Technology

[0002] With the continuous development of applications such as warehousing and logistics, industrial inspection, and service robots, the automatic recognition of barcodes or QR codes by robots through vision systems has become a common requirement. In existing technologies, robot scanning usually adopts a single fixed posture or a single trajectory. That is, after the robot reaches the target location, it controls the robotic arm or sensor to scan along a preset single path and waits for the vision system to return the recognition result within a limited time.

[0003] In practical applications, the above solutions often rely on a relatively ideal relative position between the barcode and the camera. When there are angle deviations, obstructions, changes in lighting, or inconsistent installation positions, the failure rate of a single scan is relatively high. To improve the success rate, some systems complete the scan by manual intervention or by repeatedly performing the same action, but this method lacks systematic process control and quantitative decision-making mechanisms, resulting in low efficiency. Summary of the Invention

[0004] This invention provides a robot barcode scanning method, apparatus, device, and medium to address the following problems of existing robot barcode scanning methods: limited scanning trajectories (typically only covering a frontal view, making it difficult to adapt to situations with barcode posture deviations or lateral distribution); rigid decision-making logic lacking unified quantitative decision-making based on time and trajectory parameters; high coupling between trajectory execution and detection processes; unclear workflow; simplistic handling of scanning failures lacking clear retry logic and state switching mechanisms, with overall success rate relying on manual adjustment based on experience; and the lack of quantitative evaluation of scanning success rate, preventing theoretical analysis and optimization of system performance, and the system's lack of learning capabilities.

[0005] According to one aspect of the present invention, a robot barcode scanning method is provided, comprising: Based on the robot's current state information, the real-time detection success probability of each candidate barcode scanning trajectory in the trajectory library is determined; the real-time detection success probability is used to characterize the possibility of successfully recognizing the barcode when executing the candidate barcode scanning trajectory in the current state. The confidence-weighted success rate of each candidate scanning trajectory is determined based on the prior success probability of each candidate scanning trajectory and the real-time detection success probability. Based on the confidence-weighted success rate and the execution cost of each candidate scanning trajectory, the optimal trajectory is selected from the candidate scanning trajectories. Control the robot to scan the barcode according to the optimal trajectory.

[0006] According to another aspect of the present invention, a robot barcode scanning processing device is provided, comprising: The real-time success rate determination module is used to determine the real-time detection success probability of each candidate barcode scanning trajectory in the trajectory library based on the robot's current state information; the real-time detection success probability is used to characterize the possibility of successfully recognizing the barcode by executing the candidate barcode scanning trajectory in the current state. The weighted success rate determination module is used to determine the confidence-weighted success rate of each candidate scanning trajectory based on the prior success probability of each candidate scanning trajectory and the real-time detection success probability. The trajectory selection module is used to select the optimal trajectory from each candidate scanning trajectory based on the confidence-weighted success rate and the execution cost of each candidate scanning trajectory. The barcode scanning module is used to control the robot to scan barcodes according to the optimal trajectory.

[0007] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the robot barcode scanning method according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the robot barcode scanning processing method according to any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the robot barcode scanning method according to any embodiment of the present invention.

[0010] According to another aspect of the present invention, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the robot barcode scanning method as described in any embodiment of the present invention.

[0011] This invention integrates current state information with historical experience data to construct a confidence-weighted success rate model that combines real-time detection success probability with prior success probability. It also incorporates execution cost for comprehensive decision-making and dynamically selects the optimal scanning trajectory from the trajectory library. This enables the robot to achieve adaptive and robust barcode recognition in complex environments, effectively overcoming the scanning failure problem of a single fixed trajectory under non-ideal conditions such as posture deviation, lighting changes, or partial occlusion, thereby improving the scanning success rate and operational efficiency.

[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a flowchart of a robot barcode scanning method provided in an embodiment of the present invention; Figure 2 This is a flowchart of a robot barcode scanning method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a robot barcode scanning device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the robot barcode scanning processing method of this invention. Detailed Implementation

[0015] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0016] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0017] Figure 1This is a flowchart of a robot barcode scanning method provided in an embodiment of the present invention. This embodiment is applicable to automatic barcode scanning and recognition by robots in scenarios such as warehousing and logistics, industrial inspection, and service robots, where barcode installation positions are inconsistent, posture deviations are large, lighting conditions vary, or partial occlusion exists. This method can be executed by a robot barcode scanning device, which can be implemented in hardware and / or software and can be configured in an electronic device with corresponding data processing capabilities. Figure 1 As shown, the method includes: S110. Based on the robot's current state information, determine the real-time detection success probability of each candidate scanning trajectory in the trajectory library.

[0018] The real-time detection success probability is used to characterize the likelihood that executing the candidate scanning trajectory in the current state will successfully identify the barcode.

[0019] The trajectory library is a pre-built collection of candidate scanning trajectories that the robot can execute. Each candidate scanning trajectory corresponds to a specific camera motion path and scanning strategy, such as frontal horizontal scanning, left-side around scanning, right-side around scanning, spiral scanning, vertical up-down scanning, and zigzag scanning. The candidate scanning trajectories in the trajectory library are represented using B-spline curves, and a smooth and continuous camera pose sequence is generated through control points and basis functions to ensure that the robot's movement is stable and shock-free during execution.

[0020] The trajectory library is built independently of the robot's current state and scanning process, and its content can be expanded according to the application scenario: for workstations with fixed barcode positions, a small number of highly targeted trajectories can be preset; for complex environments with uncertain barcode positions and diverse postures, a rich trajectory library covering multiple angles and multiple motion modes can be preset to provide a sufficient pool of candidate strategies for subsequent probabilistic decision-making.

[0021] A candidate scanning trajectory refers to each scanning trajectory in the trajectory library that the robot can choose at the current decision moment. Each candidate scanning trajectory includes: the continuous position and attitude change curve of the camera from the trajectory start point to the trajectory end point; optionally, each candidate scanning trajectory in the trajectory library is represented by a B-spline curve, which is defined by control points and B-spline basis functions and is used to generate a smooth continuous motion path for the camera; the execution duration of the trajectory, and the expected camera pose corresponding to each sampling moment along the trajectory; the joint state at each sampling moment of the trajectory, which can be represented by a joint angle vector, including the robot's first joint vector corresponding to the trajectory start position, used to calculate the motion cost of switching from the previous trajectory to the current trajectory; For example, a preset containing Trajectory library of candidate QR code scanning trajectories: (1) Each candidate QR code scanning trajectory Represented using B-spline curves: (2) in: For trajectory Continuous pose function; for The order B-spline basis function is used to generate smooth curves; its value is determined by the B-spline node vector and its order. Decide; For control points, the first The first of the trajectories A control point is a pose point in space (usually 6D: 3D position + 3D pose). Assign a trajectory number, This corresponds to different scanning strategies in the trajectory library (such as frontal flat scan, left-side around scan, right-side around scan, spiral scan, etc.). For the first The total number of control points for each candidate scanning trajectory is reduced by one (i.e., there are a total of...). (control points) = ; The order (degree+1) of the B-spline determines the smoothness and continuity of the curve.

[0022] When the robot performs a barcode scanning task, it does not use a fixed trajectory. Instead, within each scanning state, it evaluates the real-time detection success probability of each candidate trajectory in the trajectory library based on the current state information (joint angles, real-time images, historical detection results, etc.). Then, it calculates a comprehensive score by combining the prior success rate and execution cost, and selects the current optimal trajectory to execute.

[0023] In one optional implementation, the current state information includes real-time image features acquired by a visual sensor. The step of determining the real-time detection success probability of each candidate barcode scanning trajectory in the trajectory library based on the current state information includes: for any candidate barcode scanning trajectory, determining the camera pose at each moment on the preset execution time axis of the trajectory according to the pose sequence of the candidate barcode scanning trajectory; transforming the estimated position of the barcode in the world coordinate system to the camera coordinate system through the inverse transformation of the camera pose at each moment, obtaining the camera coordinate system coordinates of the barcode along the trajectory execution time axis in the camera coordinate system; determining whether the camera coordinate system coordinates fall within the camera's field of view, and determining the visibility probability of the barcode along the trajectory execution time axis; determining the successful recognition probability of the barcode along the trajectory execution time axis by the visual system according to the real-time image features; multiplying the visibility probability and the successful recognition probability point-by-point in the time domain to obtain the instantaneous success probability; integrating the instantaneous success probability over the trajectory execution duration interval and dividing by the execution duration to obtain the real-time detection success probability of the candidate barcode scanning trajectory.

[0024] The pose sequence refers to the set of discrete sampling points arranged in chronological order on the candidate scanning trajectory. Each sampling point contains the camera's three-dimensional position coordinates and three-dimensional orientation information in space, totaling 6 degrees of freedom. The pose sequence is obtained by parameter sampling of the trajectory's B-spline curve and is a discretized representation of the trajectory on the execution time axis. Camera pose refers to the camera's position and orientation in space, used to describe the coordinate transformation relationship from the robot's base coordinate system to the camera coordinate system. Each sampling point in the pose sequence represents the camera pose at that moment.

[0025] The trajectory preset execution time axis refers to the time parameter axis assigned to the trajectory during the design phase. Its starting point is the moment when the trajectory begins execution, and its ending point is the moment when the trajectory ends execution. The interval length is the total execution time of the trajectory. This time axis is independent of whether the trajectory is actually executed; it is a standardized reference system used to describe the trajectory's time attributes.

[0026] The camera field of view refers to the spatial range in which the camera can image data. It is usually a cone-shaped or frustum-shaped spatial region defined by parameters such as the horizontal field of view, vertical field of view, minimum working distance, and maximum working distance.

[0027] Visibility probability refers to the probability that the barcode is located within the camera's field of view at a certain moment during trajectory execution. In an ideal geometric model, this probability is typically 0 or 1; considering positioning uncertainty, it can take a continuous value between 0 and 1.

[0028] Real-time image features refer to quantitative indicators that affect the success rate of barcode recognition, extracted from the image currently acquired by the vision sensor. These include, but are not limited to, image resolution, contrast, completeness, tilt angle, illumination uniformity, and motion blur of the barcode area.

[0029] Instantaneous success probability refers to the joint probability that, at a specific moment during trajectory execution, the barcode is both within the camera's field of view and correctly recognized by the vision system. It is the product of the visibility probability and the recognition success probability.

[0030] Optionally, for any candidate scanning trajectory, the camera pose at each moment on the preset execution time axis of the trajectory is determined based on the pose sequence of the candidate scanning trajectory. Each candidate scanning trajectory in the trajectory library is defined by a B-spline curve. By performing equal-interval sampling or adaptive sampling on the curve parameter domain, a set of discrete, time-ordered desired camera poses can be obtained. These poses are the camera poses at each moment on the preset execution time axis of the trajectory, serving as the input reference for all subsequent geometric calculations.

[0031] The estimated position of the barcode in the world coordinate system is transformed to the camera coordinate system through the inverse transformation of the camera pose at each moment, thus obtaining the camera coordinate system coordinates of the barcode along the trajectory execution time axis in the camera coordinate system. The estimated position of the barcode in the world coordinate system can be obtained in various ways, including but not limited to: inferring the three-dimensional position of the barcode in the world coordinate system based on the detection position and depth information of the barcode in the current camera image; estimating the position based on the barcode pose information recorded when a barcode was successfully scanned in the past, combined with the prior size model of the target object; or determining the position based on the preset relative pose relationship between the robot's current position and the target object. For each moment on the trajectory, the world coordinates of the barcode are transformed using the inverse transformation matrix of the camera pose at that moment, thus obtaining the three-dimensional coordinates of the barcode in the camera coordinate system at that moment. This operation is repeated for all moments to obtain the camera coordinate system coordinates of the barcode along the trajectory execution time axis in the camera coordinate system. For example, the three-dimensional coordinates of the barcode in the camera coordinate system are determined by the following formula (3): (3) Where t′ represents any moment in the continuous time variable during the execution of the candidate scanning trajectory; This represents the estimated position of the barcode in the world coordinate system. Let be the pose matrix of the camera at time t′; This is the inverse transformation of the camera pose matrix; This represents the position of the barcode in the camera coordinate system.

[0032] Determine whether the camera coordinate system coordinates fall within the camera's field of view to determine the visibility probability of the barcode along the trajectory execution time axis. The camera's field of view is pre-calibrated by the camera's intrinsic parameters and installation parameters, and can be expressed as an analytical expression of the spatial region or a numerical lookup table in the camera coordinate system. For the obtained camera coordinate system coordinates of the barcode at each moment, determine whether it is located within the field of view, as shown in the following formula (4). Under the deterministic model, the judgment result is 0 (not within the camera's field of view) or 1 (within the camera's field of view); when considering factors such as the uncertainty of barcode position estimation and robot positioning error, a probability value between 0 and 1 can be output, representing the confidence that the barcode is within the camera's field of view. The judgment results at all moments constitute the change function of the visibility probability along the trajectory execution time axis.

[0033] (4) in, This represents the position of the barcode in the camera coordinate system. This refers to the camera's field of view. This is a comprehensive image quality function. For a moment Status information; This is the k-th candidate scan trajectory; For any point in the continuous time variables during the trajectory execution process; This represents the probability that the barcode is within the field of view.

[0034] Based on the real-time image features, the success rate of barcode recognition by the vision system along the trajectory execution time axis is determined. The success rate of barcode recognition by the vision system mainly depends on the quality of the barcode region in the currently acquired image. Optionally, the real-time image features include at least one of the following: image resolution, contrast, barcode integrity, tilt angle, illumination intensity, and motion blur. Key features affecting decoding difficulty are extracted from the real-time image, and these features are input into a pre-trained image quality synthesis function to obtain a comprehensive quality score. This score is mapped to the interval [0,1] by the Sigmoid function, which is the success rate of barcode recognition at the current moment, as shown in the following formulas (5)-(6).

[0035] (5) (6) Among them, R( L( represents the image resolution); ) represents the light intensity; M( The degree of motion blur is represented by ). For the Sigmoid function; g( ) is the image quality synthesis function; In candidate scan trajectories Moments during execution The status information is The probability of successful barcode recognition.

[0036] It should be noted that the probability of successful barcode recognition at the current decision moment can only be estimated based on the real-time image features of the current frame. However, the camera moves continuously during trajectory execution, and the image features will change dynamically over time. To achieve a pre-evaluation of the entire trajectory, an image quality synthesis function along the trajectory execution time axis can be constructed based on one of the following methods: (1) Conservative assumption: It is assumed that the real-time image features are the same as the current moment during the entire trajectory execution process, and the probability of successful recognition remains constant; (2) Prediction model: Based on the trajectory movement speed, the change law of ambient light, etc., the time-varying trend of image quality is modeled and predicted; (3) Historical statistics: Estimation is made based on the image quality change patterns of similar trajectories in historical execution.

[0037] The visibility probability and the recognition success probability are multiplied point-by-point in the time domain to obtain the instantaneous success probability. The necessary conditions for the barcode to be successfully recognized include "being seen" and "being recognized". Both events must be true at the same time. For each moment on the trajectory execution time axis, the obtained visibility probability and recognition success probability are multiplied to obtain the instantaneous success probability. This operation is performed for all moments to obtain a continuous curve of the instantaneous success probability changing with time. The instantaneous success probability is integrated over the trajectory execution time interval and divided by the execution time to obtain the expected real-time detection success probability of the candidate scanning trajectory, as shown in the following formula (7): (7) in, Indicates the candidate scanning trajectory During execution, the barcode is in The probability that a given moment is within the camera's field of view; Indicates in candidate scan trajectory Moments during execution The status information is The probability of successful barcode recognition at that time; For trajectory Preset execution time (in seconds); For current state information Next, execute the candidate scan trajectory. The expected real-time detection success probability (scalar, range [0,1]). The real-time detection success probability integrates multi-dimensional information such as the spatial geometric attributes of the trajectory, barcode position estimation, current image quality, and trajectory execution time into a unified decision index for subsequent confidence weighting and trajectory selection.

[0038] By discretizing the trajectory execution time axis, continuous trajectory motion is decomposed into point-by-point computable geometric (barcode visibility) and perceptual (image recognition) problems. Barcode visibility probability models and visual recognition probability models are established separately. Through point-by-point multiplication and integral normalization, multidimensional heterogeneous information is fused into a real-time detection success probability between 0 and 1. This not only fully covers the entire success opportunity of the entire trajectory, avoiding the one-sidedness of only evaluating the first and last points, but also achieves decoupled evaluation of geometric constraints and perceptual capabilities. It can independently optimize motion planning and visual algorithms, and also make forward-looking decisions based on the current state. This provides a unified, quantifiable, and physically clear decision-making basis for subsequent confidence weighting and trajectory selection. Furthermore, it is applicable to any continuous trajectory represented by B-spline, independent of the specific motion form of the trajectory, and has extremely strong generalization ability.

[0039] S120. Determine the confidence-weighted success rate of each candidate scanning trajectory based on the prior success probability and the real-time detection success probability of each candidate scanning trajectory.

[0040] S130. Based on the confidence-weighted success rate and the execution cost of each candidate scanning trajectory, select the optimal trajectory from the candidate scanning trajectories.

[0041] S140. Control the robot to scan the code according to the optimal trajectory.

[0042] Specifically, the prior success probability of the executed trajectory is updated after each scan. Optionally, controlling the robot to perform the scan operation according to the optimal trajectory includes: generating the desired end-effector linear velocity and angular velocity based on the pose sequence of the optimal trajectory; obtaining the robot's current joint angles and Jacobian matrix; mapping the desired end-effector linear velocity and angular velocity to the joint space through velocity-level inverse kinematics to obtain joint velocity commands; sending the joint velocity commands to the robot's joint motors to drive the robot to move along the optimal trajectory; and correcting the joint velocity commands through a null space optimization term during trajectory execution to avoid joint limits and singular configurations. As shown in the following formula (8): (8) in: This is the current Jacobian matrix; Given the desired terminal linear velocity and angular velocity, derived from the optimal trajectory Differentiation yields; This is a zero-space optimization term used to avoid joint limits and singular configurations; This is the joint velocity vector (unit: rad / s), used to control the motors of each joint.

[0043] Optionally, the scanning process is controlled by a state machine, which includes at least a first scanning state, a second scanning state, and a navigation adjustment state. The first scanning state corresponds to the robot being located on the first side of the target object, and the second scanning state corresponds to the robot being located on the second side of the target object. The method further includes: when the robot is in the first scanning state, acquiring current state information, selecting the optimal trajectory from the trajectory library based on the current state information, and controlling the robot to scan according to the optimal trajectory, such as S110-S140; if the scanning is successful, the process ends; if the scanning fails, and the cumulative number of scans does not exceed a preset threshold, controlling the robot to transition from the first scanning state to the navigation state. Adjusting the state; in the navigation adjustment state, control the robot to move from the first side to the second side of the target object; after the navigation adjustment is successful, control the robot to enter the second scanning state; in the second scanning state, reacquire the current state information, select the optimal trajectory from the trajectory library based on the current state information, and control the robot to scan the code according to the optimal trajectory, such as S110-S140; if the scanning is successful, the process ends; if the scanning fails, control the robot to return to the first scanning state if the cumulative number of scannings does not exceed the preset threshold; if the cumulative number of scannings exceeds the preset threshold, the process terminates and an error is reported; if the navigation adjustment fails in the navigation adjustment state, the process terminates and an error is reported.

[0044] For example, the first side of the target object is the front of the target object, and the second side of the target object is either the left or right side of the target object. In each scanning state, trajectory selection and scanning operations are performed independently. The state only determines the robot's orientation relative to the target object, without limiting the candidate scanning trajectories that can be selected in that orientation. Through the closed-loop process consisting of the first scanning state, the navigation adjustment state, and the second scanning state, combined with the cumulative scanning count threshold protection, robust control with multi-pose attempts and failure rollback is achieved.

[0045] Optionally, controlling the robot to scan barcodes along the optimal trajectory includes: using the optimal trajectory as an elastic reference path based on a B-spline curve; during the robot's movement along the optimal trajectory and barcode scanning, using a vision sensor to evaluate the illumination quality and barcode integrity in real time within the current field of view; when overexposure or barcode defects are detected in a local area, generating a normal repulsive force or normal attractive force acting on the local control points of the B-spline curve; and reconstructing the B-spline curve online based on the normal repulsive force or normal attractive force, so that the optimal trajectory adaptively shifts and adjusts its pose during the robot's continuous movement to avoid reflective areas or approach the center of the barcode.

[0046] It should be noted that traditional barcode scanning robots, after selecting the optimal trajectory, typically follow the preset path strictly, lacking the ability to cope with sudden environmental changes along the way. When situations such as sudden changes in local lighting, specular reflections, or partial obstruction of the barcode occur during execution, traditional methods can only wait for the current scan to fail before replanning the trajectory, resulting in a significant decrease in efficiency.

[0047] To address the aforementioned problems, this invention further provides a preferred embodiment: during the execution phase, the planned trajectory is endowed with real-time elastic deformation capability. Specifically, the selected optimal trajectory is used as an elastic reference path based on a B-spline curve, and a visual potential field mechanism is introduced. During the robot's movement along the optimal trajectory and barcode scanning, the illumination quality and barcode integrity within the current field of view are evaluated in real time using a visual sensor. When overexposed reflective spots are detected in a local area, a normal repulsive force is generated acting on the local control point of the B-spline curve, driving the trajectory away from the reflective area; when only incomplete barcodes are captured or the barcode is off-center from the field of view, a normal attractive force pointing towards the barcode center is generated, driving the trajectory closer to the barcode center.

[0048] The aforementioned virtual force field acts directly on the local control points of the B-spline curve. Through online reconstruction, the weights and positions of these control points are adjusted in real time, allowing the optimal trajectory to undergo spatial shifts and pose adjustments without interrupting the robot's continuous motion. Guided by the optimal trajectory, the robot's end effector can generate minute adaptive twists, much like a flexible body. For example, it can dynamically change its pitch angle to avoid mirror reflections or slide laterally to approach a damaged barcode.

[0049] This online trajectory reconstruction mechanism based on a joint potential field enables the robot to adaptively correct its trajectory during continuous motion without pausing scanning or computation. Compared to traditional methods, this implementation significantly improves the success rate of single-scan scanning in extremely unstructured environments, effectively avoiding complete round failures and replanning caused by sudden changes in local environment.

[0050] Optionally, when realizing real-time elastic deformation, this invention no longer relies on offline static replanning, but instead constructs a dynamic vision-motion joint potential field function to directly map visual feedback into mathematical perturbation of the trajectory curve. First, during the gliding scan, the virtual potential field force at the current parameterized node u is calculated in real time according to the local visual environment, as shown in the following formula (9). (9) Subsequently, to prevent abrupt jumps in the robot's robotic arm, the local support properties of the B-spline basis functions were utilized to smoothly distribute the forces in the virtual potential field to the local control points of the B-spline trajectory. The online deformation update is completed as follows, as shown in formula (10): (10) in, : Indicates the robot's actual pose in three-dimensional space at the current moment. and : These represent the coordinates of the center of the target barcode captured by vision (attraction source) and the coordinates of the m-th overexposed reflective point (repulsion source), respectively. and : These are the gravitational gain coefficient and the repulsive gain coefficient, respectively. The repulsive term adopts a cubic inverse proportional model to ensure that the repulsive force increases sharply when the robot approaches the reflective area. and : These represent the original control points and the new control points after elastic deformation of the B-spline curve, respectively. :for The B-order spline basis function, acting as a weight allocation kernel, ensures that the adjustment of control points maintains the high-order smoothness and continuity of the overall trajectory. continuous). : is the trajectory elasticity coefficient, which determines the sensitivity of trajectory deformation.

[0051] Through online deformation updates, the recognition results from the visual sensor are converted into mechanical vectors, which directly cause the original B-spline control points to shift. The robot's end effector can automatically avoid reflective glare and approach valid barcodes with millimeter-level fine adjustments, greatly improving the robustness and smoothness of closed-loop servoing.

[0052] This invention integrates current state information with historical experience data to construct a confidence-weighted success rate model that combines real-time detection success probability with prior success probability. It also incorporates execution cost for comprehensive decision-making and dynamically selects the optimal scanning trajectory from the trajectory library. This enables the robot to achieve adaptive and robust barcode recognition in complex environments, effectively overcoming the scanning failure problem of a single fixed trajectory under non-ideal conditions such as posture deviation, lighting changes, or partial occlusion, thereby improving the scanning success rate and operational efficiency.

[0053] Figure 2 This is a flowchart of a robot barcode scanning method provided in an embodiment of the present invention. This embodiment is an optimization and improvement based on the above embodiment. Figure 2 As shown, the method includes: S210. Based on the robot's current state information, determine the real-time detection success probability of each candidate scanning trajectory in the trajectory library.

[0054] The real-time detection success probability is used to characterize the likelihood that executing the candidate scanning trajectory in the current state will successfully identify the barcode.

[0055] S220. Determine the confidence-weighted success rate of each candidate scanning trajectory based on the prior success probability and the real-time detection success probability of each candidate scanning trajectory.

[0056] Optionally, the status information includes the historical scanning results of each candidate scanning trajectory; based on the prior success probability and real-time detection success probability of each candidate scanning trajectory, the confidence-weighted success rate of each candidate scanning trajectory is determined, including: for any candidate scanning trajectory, obtaining the prior success probability of that candidate scanning trajectory; wherein, the prior success probability is dynamically updated based on historical scanning results and is used to characterize the average success performance of the trajectory in historical execution; multiplying the real-time detection success probability by the prior success probability to obtain the confidence-weighted success rate of that candidate scanning trajectory.

[0057] For any candidate scanning trajectory, obtain the prior success probability of the candidate scanning trajectory. The prior success probability is dynamically updated based on historical scanning results and reflects the average success performance of the candidate scanning trajectory in past executions. Multiply the real-time detection success probability of the candidate scanning trajectory with its prior success probability, and use the product as the confidence-weighted success rate of the candidate scanning trajectory, as shown in the following formula (11).

[0058] (11) in, Scan the candidate's QR code trajectory The probability of successful real-time detection; Scan the candidate's QR code trajectory The prior probability of success; Scan the candidate's QR code trajectory The confidence-weighted success rate.

[0059] By combining real-time assessment results under the current state with prior confidence based on historical experience, a comprehensive estimate of the probability of trajectory success is achieved. This retains the sensitivity of real-time perception to the current environment while incorporating long-term statistics on trajectory reliability from historical data. It effectively avoids decision-making biases caused by noise or estimation errors from a single perception, making trajectory selection more robust and reliable.

[0060] Optionally, an initial value for the prior success probability is set for each candidate scanning trajectory in advance; the initial value is determined based on at least one of the trajectory type, simulation results, or preset empirical values.

[0061] In one alternative approach, the prior success probability is dynamically updated based on historical scanning results, including: for the executed trajectory, obtaining the single success indicator value of the current scanning result, where the success indicator value is 1 when the scanning is successful and 0 when the scanning fails; obtaining the prior success probability before the execution trajectory is updated; multiplying the prior success probability before the update by the forgetting factor to obtain the historical contribution item; multiplying the single success indicator value by the difference between 1 and the forgetting factor to obtain the current update item; and adding the historical contribution item to the current update item to obtain the updated prior success probability. This is shown in the following formula (12): (12) in: Forgetting factor; This is a success indicator value. For trajectory Updated prior success probability; For trajectory The prior success probability before the update.

[0062] The forgetting factor is a constant between 0 and 1, used to control the proportion of historical information retained during the update process. The larger the value of the forgetting factor, the higher the proportion of historical prior success probability is retained, and the smaller the correction of the prior success probability by the current scanning result. This achieves the exponential weighted smoothing characteristic that the impact of recent execution results on prior success probability is greater than that of long-term execution results.

[0063] By introducing a forgetting factor to exponentially weight and smooth the historical prior probability and the current execution result, online learning and dynamic updating of the prior success probability are achieved. This not only preserves the statistical information of the historical execution result, but also allows the impact of the recent execution result on the prior probability to be greater than that of the long-term result. This enables the prior probability to adaptively track the changes in the actual performance of the trajectory and gradually converge to the true success rate level of the trajectory as the number of executions increases, providing continuously optimized historical confidence input for subsequent confidence-weighted decision-making.

[0064] The current state information includes the robot's current joint vector.

[0065] S230. For any candidate scanning trajectory, obtain the first joint vector of the robot corresponding to the starting position of the candidate scanning trajectory.

[0066] S240. Based on the difference between the first joint vector and the robot's current joint vector, and the preset joint weight matrix, determine the motion cost from the robot's current state to the candidate scanning trajectory.

[0067] S250. Determine the execution cost of the candidate scanning trajectory based on the motion cost and the preset motion cost weighting coefficient.

[0068] S260. Determine the comprehensive score of the candidate scanning trajectory based on the confidence-weighted success rate and execution cost.

[0069] S270. The candidate scanning trajectory with the highest comprehensive score is determined as the optimal trajectory.

[0070] For any candidate scanning trajectory, obtain the robot's first joint vector corresponding to the starting position of the candidate scanning trajectory; based on the difference between the first joint vector and the robot's current joint vector, and combined with a preset joint weight matrix, calculate the motion cost required to switch from the current state to the candidate trajectory; multiply the motion cost by a preset motion cost weight coefficient to obtain the execution cost of the candidate scanning trajectory; subtract the execution cost from the confidence-weighted success rate of the candidate scanning trajectory to obtain the comprehensive score of the candidate scanning trajectory; determine the candidate scanning trajectory with the highest comprehensive score as the optimal trajectory.

[0071] Specifically, as shown in formulas (13)-(14), the starting joint vector of the current trajectory, i.e., the first joint vector, is: The robot's current joint vector: The motion cost of trajectory switching is shown in the following formula (13): (13) Where n is the number of robot joints; W is the joint weight matrix; The price of sports.

[0072] The comprehensive score of the candidate scanning trajectory is determined according to the following formula (14): (14) in, Scan the candidate's QR code trajectory The confidence-weighted success rate; This refers to the weighting coefficient for the cost of movement. The price of sports.

[0073] By introducing a motion cost quantification model within the joint space, the mechanical burden (such as large-angle joint rotation) caused by trajectory switching to the robot is transformed into a quantifiable execution cost. This cost, together with the confidence-weighted success rate, forms a comprehensive scoring function, enabling multi-objective optimization decisions that prioritize success rate and execution cost. This approach prioritizes trajectories with high success probabilities while avoiding frequent switching to trajectories with excessive motion costs, which could negatively impact efficiency and mechanical lifespan. Ultimately, this achieves a balance between robustness and economy in trajectory selection.

[0074] S280: Control the robot to scan the code according to the optimal trajectory.

[0075] This invention discretizes the continuous scanning trajectory into sampling points on the time axis, evaluates the barcode visibility probability and visual recognition probability point by point, and performs time integration and normalization on the instantaneous success probability to achieve a complete quantitative evaluation of the success chance throughout the entire trajectory. At the same time, it introduces a priori success probability based on historical experience, multiplies it with the real-time detection success probability to construct a confidence-weighted success rate, and combines it with the motion cost in the joint space for comprehensive scoring and optimal trajectory selection. This can achieve a balance between current state perception and historical experience, and achieve multi-objective optimization between success rate and execution cost, thereby improving the robot's adaptive ability, robustness and operation efficiency in barcode scanning and recognition in complex environments.

[0076] Figure 3 This is a schematic diagram of the structure of a robot barcode scanning device provided in an embodiment of the present invention. Figure 3 As shown, the device includes: The real-time success rate determination module 310 is used to determine the real-time detection success probability of each candidate barcode scanning trajectory in the trajectory library based on the robot's current state information; the real-time detection success probability is used to characterize the possibility of successfully recognizing the barcode by executing the candidate barcode scanning trajectory in the current state. The weighted success rate determination module 320 is used to determine the confidence-weighted success rate of each candidate scanning trajectory based on the prior success probability of each candidate scanning trajectory and the real-time detection success probability. The trajectory selection module 330 is used to select the optimal trajectory from each candidate scanning trajectory based on the confidence-weighted success rate and the execution cost of each candidate scanning trajectory. The barcode scanning module 340 is used to control the robot to scan barcodes according to the optimal trajectory.

[0077] The robot barcode scanning processing device provided in the embodiments of the present invention can execute the robot barcode scanning processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0078] Optionally, the current status information includes real-time image features acquired by the visual sensor, and the real-time success rate determination module includes: The visibility probability determination unit is used to determine the camera pose at each moment on the preset execution time axis of any candidate scanning trajectory based on the pose sequence of the candidate scanning trajectory; transform the estimated position of the barcode in the world coordinate system to the camera coordinate system through the inverse transformation of the camera pose at each moment, to obtain the camera coordinate system coordinates of the barcode along the trajectory execution time axis in the camera coordinate system; determine whether the camera coordinate system coordinates fall within the camera's field of view, and determine the visibility probability of the barcode along the trajectory execution time axis; The success probability determination unit is used to determine the success probability of barcode recognition by the vision system along the trajectory execution time axis based on the real-time image features. The instantaneous success probability determination unit is used to multiply the visibility probability and the recognition success probability point by point in the time domain to obtain the instantaneous success probability; The real-time success rate determination unit is used to integrate the instantaneous success probability over the trajectory execution time interval and divide it by the execution time to obtain the real-time detection success probability of the candidate scanning trajectory.

[0079] Optionally, the current state information includes the robot's current joint vector, and the trajectory selection module includes: The motion cost determination unit is used to obtain the first joint vector of the robot corresponding to the starting position of any candidate scanning trajectory; and determine the motion cost from the current state of the robot to the candidate scanning trajectory based on the difference between the first joint vector and the current joint vector of the robot, and a preset joint weight matrix. The execution cost determination unit is used to determine the execution cost of the candidate scanning trajectory based on the motion cost and the preset motion cost weighting coefficient. The comprehensive scoring unit is used to determine the comprehensive score of the candidate scanning trajectory based on the confidence-weighted success rate and the execution cost; and to determine the candidate scanning trajectory with the highest comprehensive score as the optimal trajectory.

[0080] Optionally, the status information includes historical scanning results for each candidate scanning trajectory; the weighted success rate determination module includes: The prior success probability determination unit is used to obtain the prior success probability of any candidate scanning trajectory; the prior success probability is dynamically updated based on the historical scanning results. The weighted success rate determination unit is used to multiply the real-time detection success probability by the prior success probability to obtain the confidence-weighted success rate of the candidate scanning trajectory.

[0081] Optionally, the prior success probability determination unit is specifically used to: obtain a single success indication value for the current scanning result for the executed trajectory, wherein the success indication value is 1 when the scanning is successful and 0 when the scanning fails; obtain the prior success probability before the executed trajectory is updated; multiply the prior success probability before the update by a forgetting factor to obtain a historical contribution item; multiply the single success indication value by the difference between 1 and the forgetting factor to obtain the current update item; and add the historical contribution item to the current update item to obtain the updated prior success probability.

[0082] Optionally, the scanning process is controlled by a state machine, which includes at least a first scanning state, a second scanning state, and a navigation adjustment state. The first scanning state corresponds to the robot being located on the first side of the target object, and the second scanning state corresponds to the robot being located on the second side of the target object. The system further includes a state control module, used to: in the first scanning state, acquire current state information, select an optimal trajectory from a trajectory library based on the current state information, and control the robot to scan according to the optimal trajectory; if the scanning is successful, the process ends; if the scanning fails, and the cumulative number of scans does not exceed a preset threshold, control the robot to transition from the first scanning state to the navigation adjustment state; in the navigation adjustment state, control the robot to move from the first side to the second side of the target object; when the navigation adjustment is successful, control the robot to enter the second scanning state; in the second scanning state, reacquire the current state information, select an optimal trajectory from the trajectory library based on the current state information, and control the robot to scan according to the optimal trajectory; if the scanning is successful, the process ends; if the scanning fails, and the cumulative number of scans does not exceed a preset threshold, control the robot to return to the first scanning state.

[0083] Optionally, the scanning module includes: a trajectory update unit, used to use the optimal trajectory as an elastic reference path based on a B-spline curve; during the process of the robot moving along the optimal trajectory and performing scanning, the unit evaluates the illumination quality and barcode integrity in the current field of view in real time through a vision sensor; when overexposure or barcode defects are detected in a local area, the unit generates a normal repulsive force or a normal attractive force acting on the local control points of the B-spline curve; and reconstructs the B-spline curve online according to the normal repulsive force or normal attractive force, so that the optimal trajectory adaptively shifts and adjusts its pose during the continuous movement of the robot to avoid reflective areas or approach the center of the barcode.

[0084] The robot barcode scanning device described in further detail can also execute the robot barcode scanning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.

[0085] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.

[0086] Figure 4A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0087] like Figure 4 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory 42 or a random access memory 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 42 or loaded from storage unit 48 into the random access memory 43. The random access memory 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, read-only memory 42, and random access memory 43 are interconnected via a bus 44. An input / output interface 45 is also connected to the bus 44.

[0088] Multiple components in electronic device 40 are connected to input / output interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0089] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as robot barcode scanning processing methods.

[0090] In some embodiments, the robot barcode scanning method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via read-only memory 42 and / or communication unit 49. When the computer program is loaded into random access memory 43 and executed by processor 41, one or more steps of the robot barcode scanning method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the robot barcode scanning method by any other suitable means (e.g., by means of firmware).

[0091] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), payload programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0092] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0093] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0094] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube, liquid crystal display, or monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0095] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0096] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.

[0097] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0098] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A robot barcode scanning method, characterized in that, The method includes: Based on the robot's current state information, the real-time detection success probability of each candidate barcode scanning trajectory in the trajectory library is determined; the real-time detection success probability is used to characterize the possibility of successfully recognizing the barcode when executing the candidate barcode scanning trajectory in the current state. The confidence-weighted success rate of each candidate scanning trajectory is determined based on the prior success probability of each candidate scanning trajectory and the real-time detection success probability. Based on the confidence-weighted success rate and the execution cost of each candidate scanning trajectory, the optimal trajectory is selected from the candidate scanning trajectories. Control the robot to scan the barcode according to the optimal trajectory.

2. The method according to claim 1, characterized in that, The current state information includes real-time image features acquired by the visual sensor. The step of determining the real-time detection success probability of each candidate barcode scanning trajectory in the trajectory database based on the current state information includes: For any candidate scanning trajectory, the camera pose at each moment on the preset execution time axis of the trajectory is determined based on the pose sequence of the candidate scanning trajectory. The estimated position of the barcode in the world coordinate system is transformed into the camera coordinate system through the inverse transformation of the camera pose at each time moment, so as to obtain the camera coordinate system coordinates of the barcode along the trajectory execution time axis in the camera coordinate system. Determine whether the camera coordinate system coordinates fall within the camera's field of view, and determine the visibility probability of the barcode along the trajectory execution time axis; Based on the real-time image features, determine the probability of successful barcode recognition by the vision system along the trajectory execution time axis; The instantaneous success probability is obtained by multiplying the visibility probability and the recognition success probability point by point in the time domain. The instantaneous success probability is integrated over the trajectory execution time interval and divided by the execution time to obtain the real-time detection success probability of the candidate scanning trajectory.

3. The method according to claim 1, characterized in that, The current state information includes the robot's current joint vector. The step of selecting the optimal trajectory from the candidate scanning trajectories based on the confidence-weighted success rate and the execution cost of each candidate scanning trajectory includes: For any candidate scanning trajectory, obtain the first joint vector of the robot corresponding to the starting position of the candidate scanning trajectory; Based on the difference between the first joint vector and the robot's current joint vector, and a preset joint weight matrix, the motion cost from the robot's current state to the candidate scanning trajectory is determined. The execution cost of the candidate scanning trajectory is determined based on the motion cost and the preset motion cost weighting coefficient. Based on the confidence-weighted success rate and the execution cost, a comprehensive score is determined for the candidate scanning trajectory; The candidate scanning trajectory with the highest comprehensive score is determined as the optimal trajectory.

4. The method according to claim 1, characterized in that, The status information includes the historical scanning results of each candidate scanning trajectory; determining the confidence-weighted success rate of each candidate scanning trajectory based on the prior success probability of each candidate scanning trajectory and the real-time detection success probability includes: For any candidate scanning trajectory, obtain the prior success probability of the candidate scanning trajectory; the prior success probability is dynamically updated based on the historical scanning results; The confidence-weighted success rate of the candidate scanning trajectory is obtained by multiplying the real-time detection success probability by the prior success probability.

5. The method according to claim 4, characterized in that, The prior success probability is dynamically updated based on the historical scanning results, including: For the executed trajectory, obtain the single success indicator value of this scan result. The success indicator value is 1 when the scan is successful and 0 when the scan fails. Obtain the prior success probability before the executed trajectory is updated; Multiply the prior success probability before the update by the forgetting factor to obtain the historical contribution term; Multiply the single success indication value by the difference between 1 and the forgetting factor to obtain the current update item; The historical contribution item is added to the current update item to obtain the updated prior success probability.

6. The method according to claim 1, characterized in that, The method uses a state machine to control the scanning process, the state machine including at least a first scanning state, a second scanning state, and a navigation adjustment state; the first scanning state corresponds to the robot being located on the first side of the target object, and the second scanning state corresponds to the robot being located on the second side of the target object; the method further includes: In the first scanning state, the current state information is obtained, and the optimal trajectory is selected from the trajectory library based on the current state information and the robot is controlled to scan the code according to the optimal trajectory; if the scanning is successful, the process ends; if the scanning fails, the robot is controlled to switch from the first scanning state to the navigation adjustment state when the cumulative number of scanning times does not exceed a preset threshold; in the navigation adjustment state, the robot is controlled to move from the first side of the target object to the second side. Once the navigation adjustment is successful, the robot is controlled to enter the second scanning state. In the second scanning state, the current state information is reacquired, and the optimal trajectory is selected from the trajectory library based on the current state information. The robot is then controlled to scan the code according to the optimal trajectory. If the scan is successful, the process ends. If the scan fails, the robot is controlled to return to the first scanning state if the cumulative number of scans has not exceeded a preset threshold.

7. The method according to claim 1, characterized in that, Controlling the robot to scan the barcode according to the optimal trajectory includes: The optimal trajectory is used as an elastic reference path based on B-spline curves; During the process of the robot moving along the optimal trajectory and performing barcode scanning, the lighting quality and barcode integrity within the current field of view are evaluated in real time through a visual sensor. When overexposure or incomplete barcodes are detected in a local area, a normal repulsive force or a normal attractive force is generated acting on the local control point of the B-spline curve. The B-spline curve is reconstructed online based on the normal repulsion or normal attraction, so that the optimal trajectory adaptively shifts and adjusts its pose during the continuous movement of the robot to avoid reflective areas or approach the center of the barcode.

8. A robot barcode scanning device, characterized in that, The device includes: The real-time success rate determination module is used to determine the real-time detection success probability of each candidate barcode scanning trajectory in the trajectory library based on the robot's current state information; the real-time detection success probability is used to characterize the possibility of successfully recognizing the barcode by executing the candidate barcode scanning trajectory in the current state. The weighted success rate determination module is used to determine the confidence-weighted success rate of each candidate scanning trajectory based on the prior success probability of each candidate scanning trajectory and the real-time detection success probability. The trajectory selection module is used to select the optimal trajectory from each candidate scanning trajectory based on the confidence-weighted success rate and the execution cost of each candidate scanning trajectory. The barcode scanning module is used to control the robot to scan barcodes according to the optimal trajectory.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the robot barcode scanning method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the robot barcode scanning method according to any one of claims 1-7.