Grass cutting robot homing control method and device, grass cutting robot and storage medium
By establishing a secure communication link between the lawnmower robot and the base station, generating a session key, decoding and verifying the visual encoding pattern, calculating the relative pose, and planning the homing path, the safety and docking accuracy issues during the lawnmower robot's homing process are solved, achieving safe and reliable homing docking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGTING INTELLIGENT TECHNOLOGY (SUZHOU) CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-09
Smart Images

Figure CN122172844A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lawn mowing robot technology, specifically to a lawn mowing robot homing control method, device, lawn mowing robot, and storage medium. Background Technology
[0002] With the development of intelligent equipment technology, the automatic homing and docking function of lawn mowing robots has become a core configuration. Achieving accurate homing and docking between lawn mowing robots and base stations through various guidance methods is the key to ensuring the automated operation of lawn mowing robots. Visual signage guidance and other methods have also become the mainstream means of achieving homing control of lawn mowing robots.
[0003] Current homing control schemes for lawnmowers guided by visual identifiers mostly use fixed visual identifiers as homing beacons. However, these fixed beacons lack real-time validity verification capabilities, are easily copied and counterfeited, and cannot effectively distinguish between legitimate beacons from real base stations and maliciously forged beacons. This easily leads to lawnmowers misidentifying beacons and executing incorrect homing operations, posing significant security risks. Furthermore, existing homing control schemes struggle to accurately obtain the relative pose of the lawnmower and the base station based on the beacons and plan suitable homing paths, easily resulting in insufficient accuracy in lawnmower homing docking. Therefore, the lack of secure verification capabilities for homing beacons and the difficulty in guaranteeing the accuracy of homing docking in existing lawnmower homing control technologies lead to poor robot homing security and insufficient docking accuracy.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention
[0005] This application provides a method, device, robot, and storage medium for controlling the homing of a lawnmower robot, which can effectively improve the safety and accuracy of the homing docking process.
[0006] In a first aspect, embodiments of this application provide a method for controlling the homing of a lawnmower robot, including: In response to a homing trigger command for the lawnmower robot, a secure communication link is established between the lawnmower robot and the base station, and a session key is negotiated and generated based on the secure communication link; The base station generates a visually encoded pattern based on the session key and dynamic parameters, and dynamically displays the visually encoded pattern. The visually encoded pattern is collected by the lawnmower robot, and the visually encoded pattern is decoded and verified based on the session key to determine whether the visually encoded pattern is a preset beacon. If the decoding verification is successful, the relative pose between the lawnmower robot and the base station is calculated based on the visual encoding pattern, and the corresponding return path is planned based on the relative pose. The lawnmower robot is controlled to move according to the return path until it docks with the base station.
[0007] Furthermore, in some embodiments of this application, establishing a secure communication link between the lawnmower robot and the base station, and negotiating and generating a session key based on the secure communication link, includes: The lawnmower robot and the base station perform two-way identity authentication based on a pre-set digital certificate to obtain the authentication result; After confirming that the authentication result is successful, the lawnmower robot and the base station negotiate and generate a session key through a key exchange protocol.
[0008] Furthermore, in some embodiments of this application, the two-way authentication is performed based on the TLS protocol or the DTLS protocol; the key exchange protocol is the ECDH key exchange protocol.
[0009] Furthermore, in some embodiments of this application, the step of generating a visually encoded pattern based on the session key and dynamic parameters by the base station, and dynamically displaying the visually encoded pattern, includes: The base station uses the session key to encrypt the dynamic parameters, generating encrypted information. The encrypted information is encoded into a machine-readable visual encoded pattern by the base station; The visually encoded pattern displayed on the base station's display screen is updated periodically or non-periodically according to a preset transformation rule; wherein the transformation rule is formulated during the session key negotiation or is included in the dynamic parameters.
[0010] Furthermore, in some embodiments of this application, the dynamic parameters include at least one or more of timestamps, random numbers, and serial numbers; the encryption employs an authentication encryption mode with associated data.
[0011] Furthermore, in some embodiments of this application, the visually encoded pattern is displayed on the display screen of the base station, and the display screen is set facing the direction of the approaching lawnmower robot.
[0012] Furthermore, in some embodiments of this application, encoding the encrypted information into a machine-readable visual coding pattern via the base station includes: The encrypted information is used as input to call the QR code encoder to generate a QR code image; Alternatively, the encrypted information can be grouped by bit or byte, and each group can be mapped to a preset color block color to generate a color block matrix image according to the matrix layout.
[0013] Furthermore, in some embodiments of this application, the step of acquiring the visually encoded pattern through the lawnmower robot and decoding and verifying the visually encoded pattern based on the session key to determine whether the visually encoded pattern is a preset beacon includes: The lawnmower robot continuously collects images containing the base station and identifies and extracts corresponding visual coding patterns from the images; The lawnmower robot uses the session key to decode the extracted visually encoded pattern and obtain the decoded dynamic parameters. The lawnmower robot verifies whether the decoded dynamic parameters meet the preset legality conditions and whether the update rhythm of the visually encoded pattern conforms to the preset transformation rules, in order to determine whether the visually encoded pattern is a preset beacon.
[0014] Furthermore, in some embodiments of this application, the legality conditions include at least one of the following: the timestamp obtained by decoding is within a preset valid time window, the random number obtained by decoding does not repeat the historical random number, and the sequence number obtained by decoding conforms to the expected monotonically increasing order.
[0015] Furthermore, in some embodiments of this application, the step of identifying and extracting the corresponding visually encoded pattern from the image includes: The acquired images are preprocessed, and the region of interest is delineated based on the known orientation or color contour features of the base station's display screen. Feature patterns of the visual coding pattern are detected within the region of interest, and perspective transformation correction is performed to extract a regular coding area image.
[0016] Furthermore, in some embodiments of this application, the step of calculating the relative pose between the lawnmower robot and the base station based on the visual coding pattern, and planning the corresponding return path based on the relative pose, includes: Obtain the pixel coordinates of multiple feature points in the visually encoded pattern in the image; Based on the known physical coordinates of the feature points in the world coordinate system where the visual coding pattern is located, and the camera intrinsic parameters of the lawnmower robot, the rotation matrix and translation vector of the lawnmower robot relative to the visual coding pattern are solved to obtain the relative pose; Obtain environmental constraint information and the kinematic constraint information of the lawnmower robot; Based on the relative pose, the target docking pose, the environmental constraint information, and the kinematic constraint information, several candidate paths are generated. The optimal path is selected from the candidate paths based on a preset cost function as the return path.
[0017] Furthermore, in some embodiments of this application, the feature points are the corner points of the visually encoded pattern, and the known physical coordinates are pre-calibrated based on the geometric dimensions of the visually encoded pattern; the solution is obtained using the n-point perspective algorithm.
[0018] Furthermore, in some embodiments of this application, the environmental constraint information includes at least one of obstacle location, slope, and slippery area; the kinematic constraint information includes at least one of minimum turning radius, maximum speed, and maximum acceleration; and the cost function includes at least one of path length, curvature penalty, proximity to dangerous area, and endpoint orientation deviation.
[0019] Furthermore, in some embodiments of this application, controlling the lawnmower robot to move according to the return path until it docks with the base station includes: The homing path is converted into a time-parameterized trajectory, which includes a velocity plan for movement along the path. Using model predictive control or pure tracking algorithms, the rotational speed or steering angle of the drive wheels is calculated in real time, and the lawnmower robot is controlled to follow the trajectory until it docks with the base station.
[0020] Furthermore, in some embodiments of this application, the method further includes: When establishing a secure communication link, the lawnmower robot and the base station synchronize their time using the NTP protocol or by exchanging timestamp messages. When the number of consecutive decoding and verification failures exceeds a preset threshold, the lawnmower sends a resynchronization request to the base station. In response to the resynchronization request, the base station displays a special visually encoded pattern containing synchronization instructions, or sends synchronization information via a wireless link.
[0021] Secondly, embodiments of this application provide a lawnmower robot homing control device, comprising: The key generation module is used to establish a secure communication link between the lawnmower and the base station in response to the homing trigger command for the lawnmower, and to negotiate and generate a session key based on the secure communication link; The encoding pattern module is used to generate a visual encoding pattern based on the session key and dynamic parameters by the base station, and to dynamically display the visual encoding pattern; The decoding and verification module is used to collect the visually encoded pattern through the lawnmower robot and decode and verify the visually encoded pattern based on the session key to determine whether the visually encoded pattern is a preset beacon. The path planning module is used to calculate the relative pose between the lawnmower robot and the base station based on the visual encoding pattern if the decoding verification is successful, and to plan the corresponding return path based on the relative pose. The control module is used to control the lawnmower robot to move according to the return path until it docks with the base station.
[0022] Thirdly, embodiments of this application provide a lawnmower robot, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the lawnmower robot homing control method as described in the first aspect.
[0023] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the lawnmower homing control method described in the first aspect.
[0024] This application provides a method, device, robot, and storage medium for controlling the homing of a lawnmower robot. First, after homing is triggered, a secure communication link is established between the lawnmower robot and a base station, and a session key is negotiated and generated. This provides a secure foundation for subsequent beacon verification and homing operations, mitigating the risk of beacon forgery and impersonation under illegitimate links at the communication level. The base station generates and dynamically displays a visually encoded pattern based on the session key and dynamic parameters. The lawnmower robot decodes and verifies the acquired visually encoded pattern using the session key, determining whether it is a preset beacon. Through a matching decoding and verification process, legitimate base station beacons are effectively identified, while illegally forged beacon signals are excluded. This ensures the security of homing triggering at the beacon identification level, preventing the robot from making incorrect homing responses to false beacons. After successful decoding and verification, the relative pose of the robot and the base station is calculated based on the visually encoded pattern, and a corresponding homing path is planned. This ensures that the planned homing path aligns with the actual relative position of the robot and the base station, guaranteeing the adaptability and rationality of the path planning. Finally, the robot is controlled to move along the planned path to complete the docking, ensuring the accurate implementation of the planned path and guaranteeing the accuracy of the homing docking. In summary, this application achieves effective verification of visually encoded patterns through a secure communication link and session key. Simultaneously, based on the verified visually encoded patterns, it accurately obtains the relative pose of the lawnmower robot and the base station and plans the homing path, effectively improving the security and accuracy of the lawnmower robot's homing process. This enables secure, reliable, and accurate homing docking between the lawnmower robot and the base station, solving the problems of poor security and insufficient docking accuracy in existing robot homing technologies. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is an application environment diagram of the lawnmower robot homing control method provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the lawnmower robot homing control method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of the lawnmower robot homing control device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the lawnmower robot provided in the embodiments of this application. Detailed Implementation
[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of systems and methods consistent with those detailed in the appended claims or with some aspects of this application.
[0028] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover descriptions such as non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0029] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0030] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0031] To address the aforementioned technical problems and overcome the shortcomings of existing technologies, this application provides a lawnmower robot homing control method, device, lawnmower robot, and storage medium, which can improve the safety of the lawnmower robot homing process and the accuracy of homing docking.
[0032] Please see Figure 1 , Figure 1This is a schematic diagram illustrating an application scenario of the lawnmower robot homing control method provided in this application embodiment. The application scenario is a lawn environment, where both the lawnmower robot 1 and base station 2 are located. When the lawnmower robot 1 performs automatic mowing operations in the lawn environment, in response to a homing trigger command for the lawnmower robot 1, a secure communication link is established between the lawnmower robot 1 and base station 2, and a session key is negotiated and generated based on the secure communication link. Base station 2 generates a visual encoding pattern based on the session key and dynamic parameters, and dynamically displays the visual encoding pattern. The lawnmower robot 1 collects the visual encoding pattern and decodes and verifies it based on the session key to determine if the visual encoding pattern is a preset beacon. If the decoding verification is successful, the relative pose between the lawnmower robot 1 and base station 2 is calculated based on the visual encoding pattern, and a corresponding homing path is planned based on the relative pose. The lawnmower robot 1 is controlled to move according to the homing path until it docks with base station 2, thereby ensuring the safety of the lawnmower robot's homing process and the accuracy of the homing docking.
[0033] Please see Figure 2 , Figure 2 This is a flowchart illustrating a lawnmower robot homing control method according to an embodiment of this application. Specifically, the lawnmower robot homing control method provided in this embodiment may include the following steps: S1. In response to the homing trigger command for the lawnmower, establish a secure communication link between the lawnmower and the base station, and negotiate and generate a session key based on the secure communication link; Specifically, in step S1, when the lawnmower receives a homing trigger command, it immediately initiates the communication connection establishment process with the base station. The trigger scenarios for this homing trigger command can include various situations such as the robot completing lawn mowing, detecting its own battery level below a preset threshold, or receiving a manual homing command from the user. The established communication link is a dedicated communication link with security protection attributes, effectively preventing the illegal interception, tampering, or impersonation of information during the communication process, ensuring the security of the communication process. After the secure communication link is successfully established, the lawnmower and the base station negotiate through collaborative interaction to generate a unique session key applicable only to this homing session. This key provides a unified and unique security basis for subsequent operations such as the generation, decoding, and verification of visual encoding patterns, and is valid only during this homing process. For example, after the lawnmower completes lawn mowing in a designated area, it automatically triggers a homing command. The robot then initiates a secure communication connection request to the base station. After establishing a secure communication link with the base station, the two parties negotiate and generate a dedicated session key for this homing operation, preparing for subsequent homing operations.
[0034] S2. The base station generates a visually encoded pattern based on the session key and dynamic parameters, and dynamically displays the visually encoded pattern; Specifically, in step S2, after obtaining the session key negotiated with the lawnmower robot, the base station uses this key as the core processing basis, integrating it with real-time changing dynamic parameters to generate a machine-readable visual encoding pattern that can be recognized by the lawnmower robot's vision acquisition component. This visual encoding pattern serves as a homing beacon sent by the base station to the lawnmower robot, and is the core basis for the robot to recognize the base station and perform homing operations. After generating the visual encoding pattern, the base station dynamically updates and displays the pattern according to preset rules, ensuring that the displayed visual encoding pattern is always in a state of real-time change, rather than a fixed identifier, thereby guaranteeing the real-time nature of the beacon. For example, the base station combines the session key for this homing operation with real-time generated timestamps, random numbers, and other dynamic parameters to generate a corresponding machine-readable visual encoding pattern, which is then displayed on its own display component. Furthermore, a new visual encoding pattern is generated every 3 seconds based on the updated dynamic parameters, synchronously updating the displayed content.
[0035] S3. Collect visually encoded patterns using a lawnmower robot, and decode and verify the visually encoded patterns based on the session key to determine whether the visually encoded patterns are preset beacons; Specifically, in step S3, the lawnmower robot continuously acquires images of the area where the base station is located using its own vision acquisition components to ensure that it can capture the visually encoded pattern displayed by the base station. After acquiring an image containing the base station, the robot identifies the visually encoded pattern area of the base station from the image and completes the pattern extraction operation. Subsequently, the robot calls the same session key negotiated with the base station to decode the extracted visually encoded pattern and performs validity verification based on the decoding result to determine whether the acquired visually encoded pattern is a legitimate homing beacon pre-set by the base station. For example, the lawnmower robot continuously captures images of the area in front of the base station using its own camera at a frame rate of 10 frames per second, extracts the visually encoded pattern on the base station's display component from the captured images, and then decodes the pattern using the dedicated session key for this homing operation. By verifying the validity of the decoding result, it determines whether the pattern is a legitimate homing beacon pre-set by the base station.
[0036] S4. If the decoding verification is successful, calculate the relative pose between the lawnmower robot and the base station based on the visually encoded pattern, and plan the corresponding return path based on the relative pose; Specifically, in step S4, if the lawnmower robot decodes and verifies the acquired visually encoded pattern and determines that the pattern is a valid beacon preset by the base station, then using the visually encoded pattern as the core reference, and combining the relevant parameters of its own visual acquisition components, it accurately calculates the relative pose between the lawnmower robot and the base station. This relative pose includes the positional deviation and attitude angle deviation of the lawnmower robot relative to the base station, clearly reflecting the actual spatial relationship between the robot and the base station. After obtaining the accurate relative pose, the robot plans a dedicated return path adapted to its current position to the base station based on this relative pose and the actual outdoor working environment, ensuring the rationality and feasibility of the path. For example, after verifying that the acquired visually encoded pattern is a valid beacon, the lawnmower robot accurately calculates its relative pose based on the geometric features of the pattern, placing it 5 meters directly in front of the base station, offset laterally by 0.5 meters, and with a 5° yaw angle relative to the base station's preset docking angle. Then, considering the current environment where there are no obvious obstacles on the lawn, it plans a smooth return path that first adjusts the angle with a small arc and then moves towards the base station in a straight line.
[0037] S5. Control the lawnmower robot to move according to the return path until it docks with the base station; Specifically, in step S5, the lawnmower robot uses the planned return path as its core execution basis, performing real-time and precise control over its movement. Based on the path's direction and distance, it dynamically adjusts key motion parameters such as the drive wheel speed and steering angle, guiding the robot to move smoothly towards the base station along the planned path. During movement, the robot continuously senses the match between its position and the return path, promptly correcting any deviations until the robot achieves a precise physical docking with the base station, completing the entire return process. For example, following the planned return path, the lawnmower robot slows down during the angle adjustment phase, correcting a 5° yaw angle by adjusting the speed of the left and right drive wheels. It then maintains a constant speed and straight-line movement, correcting minor lateral deviations in real time, ultimately achieving a precise physical docking with the base station's charging docking structure.
[0038] This embodiment achieves effective verification of the visually encoded pattern through a secure communication link and session key. Simultaneously, based on the verified visually encoded pattern, it accurately obtains the relative pose of the lawnmower robot and the base station and plans the homing path, realizing secure verification of the homing beacon and accurate pose calculation, ensuring the safety of the homing process and the accuracy of docking, and completing a secure and reliable accurate homing docking between the robot and the base station.
[0039] Furthermore, in some embodiments, step S1, "establishing a secure communication link between the lawnmower robot and the base station, and negotiating and generating a session key based on the secure communication link," may specifically include: S11. The lawnmower robot and the base station perform two-way authentication based on a pre-installed digital certificate to obtain the authentication result; in some embodiments, the two-way authentication is performed based on the TLS protocol or the DTLS protocol. Specifically, in step S11, both the lawnmower robot and the base station are pre-installed with their own digital certificates at the factory. These digital certificates are issued by a legitimate issuing entity and contain core information such as the device's unique identifier, certificate validity period, and digital signature. The digital certificates of the robot and the supporting base station form a unique binding relationship, serving as legitimate credentials for identity verification between the two parties. When the secure communication link establishment process is initiated after the return-to-home trigger, the lawnmower robot and the base station do not perform unilateral identity verification but rather a full-process two-way identity authentication operation. First, one party initiates an authentication request and sends its pre-installed digital certificate to the other. Upon receiving the certificate, the other party performs a comprehensive verification of its integrity and legality according to preset verification rules. This verification includes checking the validity of the digital signature, the validity period of the certificate, whether the identity identifier on the certificate matches the actual identity of the device, and whether the issuing entity is legitimate. Simultaneously, the other party initiates an authentication request and sends its own digital certificate, which is also verified according to the same rules. Authentication will only succeed when both parties have successfully verified each other's digital certificates and confirmed the other's legitimacy. If either party fails to verify the other's certificate, or if its own certificate fails to be verified by the other party, authentication will fail, and the establishment of a secure communication link and all related interactions will be terminated. Two-way authentication can be performed based on either TLS (Transport Layer Security) or DTLS (Datagram Transport Layer Security) protocols, depending on the specific communication scenario. TLS is suitable for connection-oriented reliable communication scenarios, while DTLS is suitable for connectionless communication scenarios. Both protocols ensure the security and standardization of the authentication process.
[0040] For example, when the robot leaves the factory, the manufacturer pre-installs a unique digital certificate for each lawnmower and its associated base station. After the return is triggered, the lawnmower first sends its own digital certificate and identity authentication request to the base station. After receiving the request, the base station verifies that the digital signature of the certificate is a legitimate signature from the manufacturer, that the certificate is valid, and that the identity identifier matches the robot. At the same time, the base station sends its own digital certificate to the lawnmower, and the robot simultaneously completes the same verification of the base station's certificate. Both parties confirm that the other party's identity is legitimate, and finally, the result of two-way identity authentication is obtained.
[0041] S12. After confirming that the authentication result is successful, the lawnmower robot and the base station negotiate and generate a session key through a key exchange protocol; in some embodiments, the key exchange protocol is the ECDH key exchange protocol.
[0042] Specifically, for step S12, the successful completion of two-way authentication is the sole prerequisite for the lawnmower robot and the base station to conduct session key negotiation. If the authentication fails, all subsequent key negotiation and communication link establishment operations will be terminated. After confirming that both parties' identities are legitimate and valid, the lawnmower robot and the base station initiate a collaborative negotiation process for the session key based on a unified key exchange protocol: both parties first generate their respective algorithm parameters according to the protocol requirements, and then exchange the parameters securely through the pre-established communication channel. The parameters exchanged during this process do not contain the plaintext information of the final session key. Subsequently, both parties use their own generated private parameters and the public parameters sent by the other party to perform synchronous calculations according to the algorithm logic agreed upon in the key exchange protocol, ultimately generating an identical temporary session key that is only applicable to this homing session. This session key provides a unified security basis for the generation, decoding, and verification of visual encoded patterns during this homing process, and is valid only during this homing session; the key will expire after the session ends. The protocol used to negotiate the session key is the ECDH (Elliptic Curve Diffie-Hellman) key exchange protocol. This protocol is based on the elliptic curve algorithm and features low computational cost, high encryption strength, and compatibility with the computing capabilities of smart devices. It can improve the security of key negotiation while ensuring negotiation efficiency.
[0043] For example, after confirming successful two-way authentication, both the lawnmower robot and the base station generate their own exclusive elliptic curve public-private key pairs based on the ECDH key exchange protocol. The public key is sent to each other as a public parameter, while the private key is stored locally and not transmitted. Each party combines its own private key with the public key sent by the other party and performs synchronous calculations using the elliptic curve dot product algorithm agreed upon by the ECDH protocol. Finally, a completely identical temporary session key is generated. This key is only used for encoding and decoding operations between the base station and the robot during this return journey. The key becomes invalid immediately after the return journey is completed.
[0044] This embodiment specifies the process of establishing a secure communication link and generating a session key. It completes two-way identity authentication between the robot and the base station by pre-setting a digital certificate, eliminating the possibility of illegal devices impersonating the robot for communication from the source. Then, based on successful authentication, a session key is generated through negotiation using a key exchange protocol. The application of a dedicated protocol further improves the security of identity authentication and key generation, providing a secure foundation for subsequent return-to-home operations from the source of communication.
[0045] Furthermore, in some embodiments, step S2, "generating a visually encoded pattern based on a session key and dynamic parameters by a base station, and dynamically displaying the visually encoded pattern," may specifically include: S21. The base station uses a session key to encrypt the dynamic parameters and generate encrypted information; in some embodiments, the dynamic parameters include at least one or more of timestamps, random numbers, and sequence numbers; the encryption adopts an authentication encryption mode with associated data; Specifically, in step S21, after obtaining the exclusive session key negotiated with the lawnmower robot, the base station retrieves the dynamically generated parameters in real time. These parameters include at least one or more of the following: timestamp, random number, and sequence number, which can be flexibly combined according to the actual homing scenario requirements. Subsequently, the base station employs an authentication encryption mode with associated data, using the session key as the encryption core, to encrypt the aforementioned dynamic parameters. While encrypting the parameters, corresponding authentication-related data is also generated, ultimately forming encrypted information that combines confidentiality and integrity. This encryption process prevents the dynamic parameters from being illegally cracked or tampered with, ensuring that the encrypted information can only be decoded by lawnmower robots holding the same session key, thus guaranteeing the security of the visually encoded pattern at the data level.
[0046] For example, after the base station obtains the session key K for this return flight, it retrieves the current Unix millisecond timestamp, a 16-byte cryptographic random number, and a monotonically increasing 32-bit sequence number as dynamic parameters. It then uses an authentication encryption mode with associated data and encrypts this set of dynamic parameters with key K to generate encrypted information C containing ciphertext and authentication tags. This information cannot be cracked by devices without a legitimate key.
[0047] S22. Encode the encrypted information into a machine-readable visual coding pattern via a base station; Specifically, in step S22, after generating encrypted information, the base station initiates an encoding conversion process. Using the binary data of the encrypted information as the core input, and through dedicated encoding rules and algorithms, the abstract encrypted data is converted into a visual encoding pattern that can be recognized and read by the lawnmower's visual acquisition components. This visual encoding pattern is a machine-specific recognition format that can be accurately captured and parsed by the lawnmower's image acquisition and recognition module. Furthermore, the encoding process does not alter the core content of the encrypted information, ensuring that the lawnmower can reconstruct the original dynamic parameters after decoding.
[0048] For example, the base station inputs the generated encrypted information C binary data stream into the encoding program, converts it according to machine-readable encoding rules, maps the binary data into the corresponding visual graphic form, and finally generates a visual encoding pattern that can be recognized by the lawnmower robot's camera.
[0049] S23. The visually encoded pattern displayed on the base station's display screen is updated periodically or non-periodically according to a preset transformation rule; wherein the transformation rule is formulated during session key negotiation or is included in dynamic parameters.
[0050] Furthermore, in some embodiments, a visually encoded pattern is displayed on a display screen of the base station, which is oriented towards the direction from which the lawnmower robot approaches.
[0051] Specifically, in step S23, the base station is equipped with a dedicated display screen. This display screen is set in a fixed installation orientation, always facing the direction from which the lawnmower robot approaches. This ensures that during the lawnmower robot's return journey, regardless of its reasonable position in front of the base station, it can clearly and unobstructedly capture the visually encoded pattern on the display screen. After the base station sends the generated visually encoded pattern to the display screen for initial display, it updates the visually encoded pattern displayed on the screen according to preset transformation rules. The update method can be selected as periodic or non-periodic updates depending on actual needs. The transformation rules are formulated from two sources: one is that the lawnmower robot and the base station have agreed on them in advance during the negotiation and generation of the session key; the other is that the relevant content of the transformation rules is directly included in the dynamic parameters generated by the base station, encrypted along with the dynamic parameters, and reflected in the visually encoded pattern. Each time there is an update, the base station will regenerate new encrypted information and visually encoded patterns by combining the updated dynamic parameters and session key, and then synchronize them to the display screen to complete the replacement.
[0052] For example, the base station's display screen is fixedly installed on the front of the base station, facing the direction from which the lawnmower robot is approaching. When the lawnmower robot and the base station negotiate the session key, they have agreed in advance on the change rule that the visual encoding pattern will be updated periodically every 2 seconds. The base station then regenerates new dynamic parameters, encrypted information and visual encoding patterns every 2 seconds according to this rule, and synchronously replaces the original pattern on the display screen, so that the displayed visual encoding pattern is always in a state of real-time change.
[0053] This embodiment refines the core process of base station generating and dynamically displaying visually encoded patterns. It uses session keys to encrypt dynamic parameters to generate encrypted information, which is then encoded into machine-readable visually encoded patterns. Through a display screen facing the robot's direction of approach, the patterns are updated periodically or non-periodically according to preset change rules, so that the generated visually encoded patterns have both confidentiality and real-time performance. At the same time, it ensures that the robot can effectively collect the patterns, providing a safe and effective visual carrier for subsequent beacon verification.
[0054] Furthermore, in some embodiments, step S22, "encoding the encrypted information into a machine-readable visual coding pattern via the base station," may specifically include: S221. Using encrypted information as input, call the QR code encoder to generate a QR code image; Specifically, in step S221, the base station first preprocesses the generated encrypted information to extract the complete binary data stream contained in the encrypted information, ensuring that the data is intact and unaltered during the extraction process, and that all core content of the encrypted information is completely preserved. Then, this binary data stream is used as the sole input to a pre-configured QR code encoder. The QR code encoder follows common machine-readable encoding rules, automatically adapting the corresponding encoding logic based on the amount of input binary data. It maps the abstract binary data into a QR code image with fixed graphic features that conforms to machine recognition standards, according to the QR code graphic generation rules. The generated QR code image can be accurately recognized by visual acquisition devices, and the entire encoding process only completes the data format conversion without modifying or losing any core data of the encrypted information.
[0055] For example, the base station extracts the complete binary data stream containing encrypted information and authentication tags, and inputs it into a QR code encoder that conforms to the general machine recognition standard. The encoder automatically matches the appropriate QR code version according to the amount of data in the data stream, and converts the binary data into the corresponding graphic dot matrix according to the encoding rules, finally generating a clear encrypted QR code image. This image can be accurately captured from a distance by the vision acquisition module of the lawnmower robot.
[0056] S222. Alternatively, after grouping the encrypted information by bit or byte, each group is mapped to a preset color block color, and a color block matrix image is generated according to the matrix layout; Specifically, in step S222, the base station first performs standardized grouping processing on the binary data stream of the encrypted information. Grouping is performed bit-by-bit or byte-by-byte according to actual application requirements, using pre-defined fixed rules to ensure the orderliness and consistency of the grouping process and avoid grouping chaos or data misalignment. Next, a locally preset color mapping table is retrieved. This table matches a unique color block color for each grouping result, with different colors corresponding to different grouping results, ensuring no repetition or confusion. Then, according to pre-agreed matrix layout rules (such as 4×4, 8×8 matrices, etc.), the color blocks obtained after mapping each group of binary data are sequentially filled into the various cells of the matrix according to the grouping order, forming a regular and orderly matrix of color blocks. Finally, a machine-recognizable color block matrix image is generated. The color blocks and their arrangement order in this image correspond one-to-one with the binary data of the encrypted information, completely preserving the core content of the encrypted information.
[0057] For example, the base station standardizes the binary data of the encrypted information into groups of two bits each. The local preset color mapping rule is that 01 corresponds to red, 10 corresponds to green, 11 corresponds to blue, and 00 corresponds to white. At the same time, the matrix layout is determined to be a 4×4 square matrix. Then, the grouped binary data is mapped to the corresponding colors in sequence, and the color blocks are filled into each cell of the 4×4 matrix according to the grouping order. Finally, a 4×4 color block matrix image is generated. The color combination and arrangement of this image completely correspond to the binary data of the encrypted information, which can be recognized and analyzed by the vision acquisition module of the lawnmower robot.
[0058] This embodiment provides two specific implementation methods for converting encrypted information into machine-readable visual encoded patterns. Whether it is calling a QR code encoder to generate a QR code image or grouping and mapping color blocks to generate a color block matrix image, the core content of the encrypted information can be completely preserved during the encoding process, realizing the effective conversion of encrypted data into visual beacons. Moreover, the two methods can be flexibly adapted to different outdoor homing recognition scenarios, providing a standardized visual basis for the robot's subsequent data collection and decoding.
[0059] Furthermore, in some embodiments, step S3, "collecting visually encoded patterns using a lawnmower robot and decoding and verifying the visually encoded patterns based on a session key to determine whether the visually encoded patterns are preset beacons," may specifically include: S31. The lawnmower robot continuously collects images containing base stations and identifies and extracts the corresponding visually encoded patterns from the images; Specifically, in step S31, the lawnmower robot continuously acquires images of the area where the base station is located using its configured visual acquisition components. The acquisition process maintains a stable frame rate to ensure that the visually encoded pattern displayed on the base station's screen is completely captured, preventing missed captures due to excessively long acquisition intervals. After acquiring images containing the base station, the robot performs targeted recognition processing, locating the visually encoded pattern area on the base station's screen through image feature matching. It then performs precise extraction on this area, ensuring that the extracted visually encoded pattern is complete and clear, without missing or blurred key information, providing a qualified visual data carrier for subsequent decoding and verification operations.
[0060] For example, a lawnmower robot uses its own camera to continuously capture images of the area in front of the base station at a stable frame rate of 10 frames per second. From each frame of the captured image, it locates the display area of the visually encoded pattern by using the outline and color features of the display screen. Then, it accurately extracts the complete visually encoded pattern image from that area to prepare for decoding.
[0061] S32. The lawnmower robot uses a session key to decode the extracted visually encoded pattern and obtain the decoded dynamic parameters; Specifically, in step S32, the lawnmower robot retrieves the dedicated session key for this homing journey, negotiated with the base station, and uses it as the core key for decoding. It then matches the encoding rules of the visual encoding pattern generated by the base station and employs the corresponding decoding algorithm to parse the extracted visual encoding pattern layer by layer. First, the visual encoding pattern is restored to binary encrypted information. Then, the encrypted information is decrypted using the session key, ultimately restoring the original dynamic parameters initially used by the base station to generate the encrypted information. The entire decoding process strictly matches the base station's encryption and encoding logic to ensure accurate and complete acquisition of the corresponding dynamic parameters.
[0062] For example, the lawnmower robot retrieves the exclusive session key for this return journey, calls the QR code decoding algorithm to restore the extracted visually encoded pattern in the form of a QR code to binary encrypted information, and then decrypts the encrypted information using the session key to finally obtain the original dynamic parameters containing timestamps, random numbers, and serial numbers.
[0063] S33. The lawnmower robot verifies whether the decoded dynamic parameters meet the preset legality conditions and whether the update rhythm of the visually encoded pattern conforms to the preset transformation rules, in order to determine whether the visually encoded pattern is a preset beacon.
[0064] Furthermore, in some embodiments, the legality conditions include at least one of the following: the timestamp obtained by decoding is within a preset valid time window, the random number obtained by decoding does not repeat the historical random number, and the sequence number obtained by decoding conforms to the expected monotonically increasing order.
[0065] Specifically, in step S33, the lawnmower robot first verifies the legality of the decoded dynamic parameters based on preset legality conditions. These conditions include at least one or more of the following: the decoded timestamp is within a preset valid time window; the decoded random number does not repeat historical random numbers; and the decoded sequence number conforms to the expected monotonically increasing order. Only when all dynamic parameters meet the preset legality conditions can the robot proceed to the subsequent update rhythm verification stage. The robot then detects the update frequency and change patterns of the continuously acquired multi-frame visually encoded patterns, verifying whether its update rhythm is consistent with the preset transformation rules. Only when the legality verification of the dynamic parameters passes and the update rhythm of the visually encoded pattern also conforms to the preset transformation rules will the robot determine that the visually encoded pattern is a preset beacon sent by the base station; if any one of these verifications fails, the visually encoded pattern is directly determined to be an illegal beacon.
[0066] For example, the default validity conditions for a lawnmower robot are: the timestamp is within the most recent 3-second valid time window, the random number does not repeat from historically collected random numbers, and the sequence number is monotonically increasing. The default pattern transformation rule is to update the visually encoded pattern every 2 seconds. After the robot decodes the dynamic parameters, it verifies that the timestamp is valid 1 second ago, the random number does not appear in the historical record, the sequence number increases by 1 compared to the previous decoding result, and the visually encoded pattern is updated every 2 seconds, which meets the transformation rule. Therefore, the visually encoded pattern is determined to be the default beacon. If the decoded timestamp is 10 seconds ago, exceeding the valid time window, it is directly determined to be an illegal beacon.
[0067] In this embodiment, the robot continuously collects and extracts the visual encoding pattern of the base station, accurately decodes it using the session key to obtain dynamic parameters, and then verifies the legality of the dynamic parameters and the pattern update rhythm to accurately identify the legitimate preset beacons sent by the base station. This effectively eliminates counterfeit, expired, and replayable illegal beacons, preventing the robot from making erroneous homing behavior due to the identification of illegal beacons, thereby improving the accuracy and security of homing beacon verification.
[0068] Furthermore, in some embodiments, step S31, "identifying and extracting the corresponding visually encoded pattern from the image," may specifically include: S311. Preprocess the acquired images and delineate the region of interest based on the known orientation or color contour features of the base station's display screen; Specifically, in step S311, the lawnmower robot performs targeted preprocessing on the original image containing the base station acquired by the vision acquisition component. Image algorithms are used to eliminate interference caused by outdoor environment, shooting angle, and other factors in the original image, ensuring image clarity and effectiveness, laying the foundation for subsequent pattern recognition. After preprocessing, the robot, based on the known orientation of the base station display screen or the unique color and contour features of the display screen, delineates a specific region containing the visually encoded pattern in the processed image—the region of interest. This region focuses only on the display screen and the area containing the visually encoded pattern, eliminating interference from other irrelevant background areas in the image, significantly narrowing the processing range for subsequent pattern detection.
[0069] For example, the lawnmower robot performs distortion correction, noise reduction, and illumination compensation on the raw images it collects to correct image distortion caused by the camera's shooting angle and eliminate brightness deviations caused by uneven outdoor lighting. Then, based on the pre-known fixed position of the base station display screen on the front of the base station, or the outline color characteristics of the black border and white background of the display screen, it accurately delineates the rectangular area corresponding to the display screen in the processed image and uses this area as the region of interest for visual coding pattern recognition.
[0070] S312. Detect the feature graphics of the visual coding pattern within the region of interest, perform perspective transformation correction, and extract the regular coding area image; Specifically, in step S312, the lawnmower robot, within the designated area of interest, uses a dedicated image detection algorithm to identify and locate the feature graphics of the visually encoded pattern. These feature graphics are distinctive, machine-recognizable graphics inherent in the visually encoded pattern itself, serving as the core basis for determining its specific location. After locating the feature graphics, the robot performs perspective transformation correction to address the distortion of the visually encoded pattern caused by the shooting angle. The algorithm restores the tilted or stretched encoded pattern to an upright, regular standard shape. Finally, it accurately extracts the regular encoded area image containing only the visually encoded pattern from the corrected image, ensuring that the extracted encoded area image is free of distortion and redundant background, meeting the image requirements for subsequent decoding.
[0071] For example, within an area of interest, a lawnmower robot uses a contour detection algorithm to identify the three corner points of a visually encoded pattern in the form of a QR code, thereby determining the specific location of the QR code. Because the robot is at a certain angle to the base station display screen when taking the picture, the QR code image is slightly tilted and stretched. The robot then performs perspective transformation correction based on the coordinates of the seeker image to restore the tilted QR code to a standard square. Finally, it extracts a regular QR code encoding area image without distortion or border interference from the corrected image.
[0072] This embodiment first preprocesses the acquired image and delineates the region of interest based on the characteristics of the display screen. This eliminates image interference from the outdoor environment, narrows the processing range, and improves computational efficiency. Then, it detects pattern features and performs perspective transformation correction to solve the pattern distortion problem caused by the shooting angle. Finally, it extracts a regular coded area image, providing a clear, standardized, and high-quality image foundation for subsequent decoding verification.
[0073] Furthermore, in some embodiments, step S4, "calculating the relative pose between the lawnmower robot and the base station based on the visually encoded pattern, and planning the corresponding homing path based on the relative pose," may specifically include: S41. Obtain the pixel coordinates of multiple feature points in the visually encoded pattern in the image; in some embodiments, the feature points are the corner points of the visually encoded pattern; Specifically, in step S41, the lawnmower robot uses a dedicated feature point detection algorithm to identify multiple pre-defined feature points with distinctive geometric features from the extracted, well-defined visually encoded pattern image. These feature points are key points reflecting the spatial position of the visually encoded pattern and can accurately represent the geometric contour of the pattern. Subsequently, an image coordinate extraction algorithm is used to accurately obtain the pixel coordinates of each feature point in the image coordinate system, recording the horizontal and vertical pixel values of each feature point to ensure the accuracy and completeness of the coordinate data, providing basic data support for subsequent relative pose calculations.
[0074] For example, a lawnmower robot can identify the four corners of a QR code as feature points from a regular QR code encoding area image using a corner detection algorithm. Then, it can accurately extract the pixel coordinates corresponding to the four corner points, which are (120,150), (380,152), (382,410), and (122,408), and record the coordinate data.
[0075] S42. Based on the known physical coordinates of the feature points in the world coordinate system where the visual coding pattern is located, and the camera intrinsic parameters of the lawnmower robot, solve for the rotation matrix and translation vector of the lawnmower robot relative to the visual coding pattern to obtain the relative pose; further, in some embodiments, the known physical coordinates are pre-calibrated based on the geometric dimensions of the visual coding pattern; the solution is obtained using the n-point perspective algorithm. Specifically, in step S42, the lawnmower robot first retrieves pre-stored physical coordinate data of feature points. This data is pre-calibrated in the world coordinate system based on the actual geometric dimensions of the visually encoded pattern and is a fixed, known value. Simultaneously, it retrieves its own camera's pre-calibrated intrinsic parameter data, including core parameters such as camera focal length, principal point coordinates, and distortion coefficients. Using the pixel coordinates of the feature points, the known physical coordinates, and the camera intrinsic parameters as algorithm inputs, a dedicated spatial pose solving algorithm performs spatial coordinate transformation and calculation, ultimately solving for the rotation matrix and translation vector of the lawnmower robot relative to the visually encoded pattern. The rotation matrix reflects the attitude angle deviation between the robot and the base station, and the translation vector reflects the spatial position deviation between the robot and the base station. The combination of these two represents the relative pose between the lawnmower robot and the base station.
[0076] For example, the physical coordinates of the QR code feature points pre-stored by the lawnmower robot are calibrated as (-0.1,-0.1,0), (0.1,-0.1,0), (0.1,0.1,0), and (-0.1,0.1,0) based on a QR code side length of 0.2 meters. At the same time, the intrinsic parameter matrix and distortion coefficient of the camera are retrieved and input together with the extracted pixel coordinates into the perspective n-point algorithm for calculation. Finally, the rotation matrix R and translation vector t are solved. The translation vector shows that the robot is 4 meters in front of the base station and 0.4 meters laterally offset. The Euler angles after the rotation matrix conversion show that there is a 4° deviation between the docking angle between the robot and the base station. This result is the relative pose of the two.
[0077] S43. Obtain environmental constraint information and kinematic constraint information of the lawnmower robot; Specifically, in step S43, the lawnmower robot uses its onboard environmental perception sensors, terrain detection module, and pre-stored environmental data of the work area to simultaneously collect and obtain the environmental constraint information required for return path planning. This information covers environmental factors that affect return movement, such as the specific location of obstacles in the work area, the slope of the ground, and the distribution of special areas such as wet / slippery / uneven areas. At the same time, it retrieves its own pre-stored kinematic constraint information, which is determined by the robot's hardware performance and motion design. This information includes motion limitations that the robot itself cannot overcome, such as the minimum turning radius, maximum travel speed, and maximum acceleration / deceleration. The two types of constraint information together constitute the actual constraint basis for path planning, ensuring that the subsequently planned path is realistically feasible.
[0078] For example, the lawnmower robot detects a small rock obstacle 0.5 meters in front of the base station using a visual sensor, detects a 3° gentle slope on the ground in the work area using a slope sensor, and identifies a slippery moss area to the left of the base station. It also retrieves its own kinematic parameters, which are a minimum turning radius of 0.3 meters, a maximum speed of 0.5 m / s, and a maximum acceleration of 0.2 m / s², thus completing the acquisition of both types of constraint information.
[0079] S44. Generate several candidate paths based on relative pose, target docking pose, environmental constraint information, and kinematic constraint information; in some embodiments, environmental constraint information includes at least one of obstacle position, slope, and slippery area; kinematic constraint information includes at least one of minimum turning radius, maximum speed, and maximum acceleration. Specifically, in step S44, the lawnmower robot first determines its target docking pose for homing, which is its ideal position and orientation relative to the base station when it achieves precise docking. This pose is a preset fixed standard value. Then, using the calculated current relative pose, target docking pose, and acquired environmental and kinematic constraints as core inputs, a dedicated path generation algorithm plans and generates multiple candidate homing paths that satisfy all basic constraints between the current pose and the target docking pose. Each candidate path can achieve docking of the lawnmower robot from its current position to the base station, but they differ in path length, turning radius, distance from hazardous areas, and endpoint orientation matching degree.
[0080] For example, the target docking pose of the lawnmower robot is a direct facing position with no positional offset or angular deviation from the base station. Combining the current relative pose and two types of constraint information, a path generation algorithm generates three candidate paths: Path 1 is a straight path that needs to bypass the rocks in front but is close to the slippery area; Path 2 is a small-radius arc path that bypasses the rocks from the right and is far away from the slippery area, with a gentle overall curvature; Path 3 is a large-radius detour path that completely avoids all dangerous areas but significantly increases the path length. All three paths meet the robot's kinematic constraints.
[0081] S45. Select the optimal path from the candidate paths as the return path based on a preset cost function; in some embodiments, the cost function includes at least one of the following factors: path length, curvature penalty, proximity to dangerous areas, and destination orientation deviation. Specifically, in step S45, the lawnmower robot retrieves a preset cost function. This function is a mathematical model that quantifies the quality of a path, comprehensively considering key factors affecting the homing effect, such as path length, curvature penalty, proximity to dangerous areas, and endpoint orientation deviation. Reasonable weighting coefficients are assigned to each factor, and the negative impact of each factor is converted into a quantified cost score through the function; the lower the score, the better the path. Subsequently, each candidate path is substituted into the cost function for quantification calculation to obtain the total cost score for each path. Finally, the candidate path with the lowest total cost score is selected as the final homing path for the lawnmower robot.
[0082] For example, in the preset cost function, the path length weight is 0.3, the curvature penalty weight is 0.2, the proximity weight of the dangerous area is 0.3, and the destination orientation deviation weight is 0.2. After substituting the three candidate paths into the calculation, the total cost of path 1 is 8.2, the total cost of path 2 is 3.5, and the total cost of path 3 is 9.1. The lawnmower selects path 2, which has the lowest total cost score, as the final return path.
[0083] This embodiment calculates the precise relative pose of the robot and the base station by using the feature point coordinates of the visually encoded pattern and the camera's intrinsic parameters. It then generates multiple candidate paths by combining the acquired environmental and kinematic constraints with the obtained information. Finally, it selects the optimal path by quantifying and filtering through a preset cost function. This ensures that the path planning not only fits the actual spatial position of the robot and the base station but also takes into account environmental adaptability and motion feasibility, providing a scientific and reasonable path basis for homing.
[0084] Furthermore, in some embodiments, step S5, "controlling the lawnmower robot to move according to the return path until it completes docking with the base station," may specifically include: S51. Convert the homing path into a time-parameterized trajectory, which includes the velocity planning along the path; Specifically, in step S51, the lawnmower robot first performs spatial discretization on the planned optimal return path. Based on characteristics such as path curvature changes and distance from the base station, the continuous return path is divided into multiple ordered path nodes, each corresponding to a unique spatial coordinate, thus fully preserving the spatial orientation characteristics of the return path. Then, combining the lawnmower robot's kinematic constraints and the environmental characteristics of each path segment (such as curves, straight sections, sections near danger zones, and docking approach sections), a suitable driving speed is matched to each path node, formulating a scientific speed planning strategy: for example, low-speed driving parameters are configured for curves with high curvature and sections near danger zones, moderate speeds are configured for straight sections with gentle curvature, and extremely low speeds are configured for docking approach sections near the base station, ensuring the smoothness and safety of the driving process. Finally, the discrete path nodes are bound to the corresponding speed and time parameters to generate a time-parameterized trajectory. This trajectory not only includes the spatial positions the robot needs to reach at different times but also specifies the driving speed corresponding to each position, transforming the static return path into a dynamic and executable driving command.
[0085] For example, the lawnmower robot discretizes the planned return path of "small-radius curves + straight lines + docking sections" into 12 path nodes. It assigns a travel speed of 0.2 m / s to curve nodes 1-4, a travel speed of 0.4 m / s to straight road nodes 5-9, and a low speed of 0.1 m / s to docking approach nodes 10-12. At the same time, it assigns a corresponding timestamp to each node, generates a time parameterized trajectory, and clarifies the correspondence between time and position, such as when the robot arrives at node 1 in the 1st second, node 4 in the 3rd second, and node 10 in the 8th second.
[0086] S52. Using model predictive control or pure tracking algorithms, the rotational speed or steering angle of the drive wheels is calculated in real time to control the lawnmower robot to follow the trajectory until it completes docking with the base station; Specifically, in step S52, the lawnmower robot uses the generated time-parameterized trajectory as the core tracking target and chooses either model predictive control or a pure tracking algorithm for trajectory tracking control. During movement, the robot uses its pose detection and velocity detection modules to collect real-time state information such as current spatial position, attitude angle, and actual driving speed. It compares the actual state with the preset time-position-velocity baseline state in the trajectory to accurately calculate the deviation between the actual movement and the preset trajectory, such as lateral position deviation, velocity deviation, or attitude angle deviation. Then, according to the core logic of the selected algorithm, the deviation data is calculated in real time: if a pure tracking algorithm is used, the steering angle adjustment of the drive wheels is calculated by combining the pre-aiming distance and the deviation value; if model predictive control is used, the robot's driving state in the near future is predicted, and the optimal adjustment of the drive wheel speed or steering angle is calculated in advance based on the deviation. Based on the algorithm calculation results, the robot dynamically adjusts the speed difference between the left and right drive wheels (to adjust the steering angle) or the overall speed (to adjust the speed) to continuously correct the driving deviation and keep itself always moving along the preset trajectory. This process is a closed-loop real-time control, with deviation detection, algorithm calculation, and drive regulation continuously cycling until the lawnmower robot and the base station achieve precise physical docking, at which point the trajectory tracking process terminates.
[0087] For example, the lawnmower robot uses a pure tracking algorithm to track its trajectory. It can detect in real time that there is a lateral deviation of 0.06 meters between its current position and the preset position of the trajectory. The algorithm combines the 0.5-meter pre-aiming distance to calculate the deviation data and calculates that the steering angle needs to be finely adjusted by 2°. It is then converted into a control command of 0.19 m / s for the left drive wheel and 0.21 m / s for the right drive wheel. The steering correction is achieved through the speed difference, thus eliminating the lateral deviation.
[0088] For example, the lawnmower robot uses model predictive control during the docking approach phase. It predicts that if it continues to travel at the current speed within 0.5 seconds, there will be a positional deviation of 0.03 meters. The algorithm calculates in advance that the speed of the drive wheel needs to be reduced to 0.09 m / s, and the speed of the left drive wheel is slightly adjusted by 0.01 m / s to correct the deviation in advance, so that the robot docks with the base station in a stable state and finally completes a precise physical docking.
[0089] This embodiment converts the static homing path into a time-parameterized trajectory that includes speed planning, allowing the path to adapt to the robot's motion characteristics. Then, model predictive control or pure tracking algorithms are used to detect driving deviations in real time and calculate drive wheel adjustment parameters, forming a closed-loop trajectory tracking control. This continuously corrects the robot's movement state, ensuring that the robot moves smoothly and accurately along the optimal path, thereby improving the success rate and accuracy of homing and docking.
[0090] Furthermore, in some embodiments, the lawnmower homing control method provided in this embodiment further includes: S61. When establishing a secure communication link, the lawnmower robot and the base station synchronize their time using the NTP protocol or by exchanging timestamp messages; Specifically, in step S61, during the establishment of a secure communication link between the lawnmower robot and the base station, both parties simultaneously initiate a time calibration process. They choose one of two preset methods to achieve precise synchronization of the system clocks, establishing a unified time reference for timestamp verification in subsequent visual encoding pattern decoding. If the NTP (Network Time Protocol) is used, both the lawnmower robot and the base station access this protocol system. According to the protocol's clock calibration logic, both parties synchronize their system clocks to a unified time standard, achieving millisecond-level time accuracy matching. If the method of exchanging timestamp messages is used, both parties send their own high-precision timestamp messages to each other through the pre-established secure communication channel. These messages contain their current precise time information. Subsequently, each party calculates the communication delay and calibrates its local clock based on the exchanged timestamp data, ultimately achieving precise synchronization of their clocks. Regardless of the method used, the time references of the lawnmower robot and the base station remain consistent, eliminating decoding verification errors caused by time deviations.
[0091] For example, when establishing a secure communication link between a lawnmower robot and a base station, the NTP protocol is selected for time synchronization. Both robots simultaneously access the NTP protocol network and calibrate their respective system clocks through the protocol, controlling the clock error within 5 milliseconds to achieve a unified time base. Alternatively, the robot can choose to exchange timestamp messages. The base station sends the current Unix millisecond timestamp T1 to the robot, and the robot immediately sends its own timestamp T2 after receiving it. The base station receives T2 and then sends its own timestamp T3. Both parties calculate the round-trip time based on T1, T2, and T3, and calibrate their local clocks accordingly, ultimately achieving millisecond-level time synchronization.
[0092] S62. When the number of consecutive decoding verification failures exceeds a preset threshold, a resynchronization request is sent to the base station via the lawnmower robot; Specifically, in step S62, during the decoding and verification of the visually encoded pattern, the lawnmower robot records and counts the number of consecutive decoding and verification failures in real time. This number of failures is the cumulative value of consecutive failed verifications. A single successful verification resets the cumulative count to zero. The preset threshold is a value pre-set based on the actual homing scenario and is a key basis for determining whether synchronization loss has occurred between the two parties. When the cumulative number of consecutive decoding and verification failures counted by the lawnmower robot reaches or exceeds this preset threshold, it is determined that there is a synchronization loss problem between itself and the base station in terms of time, sequence number, or pattern transformation rules, and it cannot continue to complete the decoding and verification normally. At this time, the lawnmower robot will send an encrypted resynchronization request to the base station through the established secure communication link. This request contains identification information of the synchronization anomaly and can only be recognized and decrypted by the base station, preventing unauthorized devices from forging the request and ensuring the security and validity of the synchronization request.
[0093] For example, the lawnmower robot is pre-set to have a threshold of 5 consecutive decoding verification failures. During the return journey, the robot attempts to decode and verify the visually encoded patterns captured in 5 consecutive frames in sequence. If all of them fail, the cumulative number of failures reaches the preset threshold. The robot then determines that a synchronization loss has occurred with the base station and sends an encrypted resynchronization request message to the base station through a secure communication link to inform the base station that the current synchronization is abnormal and synchronization recovery is required.
[0094] S63. In response to a resynchronization request, the base station displays a special visually encoded pattern containing synchronization instructions, or sends synchronization information via a wireless link; Specifically, in step S63, after receiving the resynchronization request from the lawnmower robot via a secure communication link, the base station immediately identifies the validity of the request and initiates the synchronization recovery process. Resynchronization with the lawnmower robot can be achieved in one of two ways, restoring their synchronized state. The first method is visual synchronization, where the base station generates a special visual encoding pattern containing exclusive synchronization instructions. This pattern encapsulates core synchronization information such as time calibration parameters, the latest sequence number, and pattern transformation rules. The base station then displays this special visual encoding pattern on its own screen for the lawnmower robot to collect and decode. The second method is wireless link synchronization, where the base station directly sends encrypted synchronization information to the lawnmower robot via an established secure wireless communication link. This information contains millisecond-level time calibration values, the latest session sequence number, and the update and transformation rules of the visual encoding pattern, ensuring the robot can accurately calibrate its synchronization parameters. The lawnmower robot, by collecting and decoding the special visual encoding pattern or receiving and parsing the synchronization information sent via the wireless link, completes the calibration of its own clock, sequence number, pattern transformation rules, and other parameters, ultimately restoring its synchronized state with the base station and resuming normal decoding and verification operations.
[0095] For example, after receiving a resynchronization request, the base station selects visual synchronization and generates a special QR code containing the latest Unix millisecond timestamp and the reset starting sequence number "100", which is displayed on the screen. The lawnmower robot collects and decodes the QR code, calibrates its own system clock according to the parameters in the code, updates the sequence number to "100", and restores synchronization with the base station. Alternatively, the base station selects wireless link synchronization and sends encrypted synchronization information to the robot through a secure Wi-Fi communication link. This information includes a time calibration value of "+8ms", the current latest sequence number "100", and a pattern update rule that updates every 2 seconds. The robot receives and decrypts the information, completes the calibration of various parameters, and achieves resynchronization.
[0096] This embodiment achieves precise time synchronization between the robot and the base station when establishing a secure communication link, providing a unified benchmark for the timestamp verification of dynamic parameters and avoiding decoding failures caused by time deviations. When the decoding verification fails continuously beyond the threshold, the synchronization state of both parties is quickly restored by the robot sending a resynchronization request and the base station responding in multiple ways. This effectively solves the synchronization anomaly problem during the homing process, improves the fault tolerance and stability of the decoding verification process, and ensures the continuous and smooth operation of the entire homing control process.
[0097] To facilitate understanding of the lawnmower robot homing control method provided in this embodiment, it is mainly applied to a system including a lawnmower robot and a base station. The base station includes a communication module, a security authentication module, a dynamic encoding generation module, and a display screen; the lawnmower includes a communication module, a security authentication module, a vision acquisition module, an image processing and decoding verification module, a pose calculation module, and a path planning and drive control module. In a specific embodiment, this embodiment also includes a lawnmower base station for the above system, including a housing, charging contacts / cleaning device, a control unit, a communication module, and a display screen integrated on the housing and facing the direction of the lawnmower. The display screen is connected to the control unit and is used to dynamically display the encrypted visual encoding pattern.
[0098] The following will explain the specific implementation process, which is as follows: S101. Session initialization and security authentication phase.
[0099] When the lawnmower enters the wireless communication range of the base station (such as via Bluetooth or Wi-Fi), neither party immediately performs a homing operation. Instead, they initiate a secure communication session. The base station and the lawnmower perform two-way authentication based on pre-installed digital certificates (such as TLS / DTLS protocols) to verify each other's legitimacy. After successful authentication, both parties negotiate and generate a temporary session key specific to this session.
[0100] S102. Dynamic encoding generation and display stage.
[0101] The base station's control unit uses the temporary session key to encrypt a set of dynamic parameters, generating encrypted information. These dynamic parameters include at least: a timestamp, a random number, a session sequence number, and a predetermined pattern transformation rule (such as change frequency and next frame pattern index). The base station's encoding generation module converts the encrypted information into a machine-readable visual encoded pattern (such as an encrypted QR code, ArUco code, or a specifically arranged color block matrix). This pattern is sent to the display screen for dynamic display, with the displayed content updated periodically or non-periodically according to the transformation rule.
[0102] In a specific embodiment, the specific combination rules and encryption process for dynamic encoding generation are as follows: Plaintext data packet combination rules: The base station control unit generates a structured data packet as the plaintext payload to be encrypted. Its standard format can be defined as: Payload = { "timestamp": T, / / Current precise timestamp (e.g., Unix millisecond timestamp, UTC) "nonce": N, / / The generated cryptographic random number (16 bytes) "seq": S, / / Monotonically increasing session sequence number (32-bit integer) "pattern_params": P / / (Optional) Transformation parameters for the pattern in the next frame or subsequent frames, such as color index table, graphic element IDs, etc. } Combinatorial logic: timestamp ensures the timeliness of information; nonce guarantees the uniqueness of each generated payload and prevents replay; seq is used to detect packet loss or out-of-order delivery; pattern_params can pre-define the representation of subsequent visual patterns to achieve more complex dynamic effects.
[0103] The complete encryption and encoding process is as follows: The payload is encrypted using the temporary session key K_session negotiated in phase S1, employing an authentication encryption mode (such as AES-128-GCM) with associated data. The encryption process simultaneously generates ciphertext (Ciphertext) and an authentication tag (AuthTag).
[0104] (Ciphertext,AuthTag)=AES-GCM-Encrypt(K_session,Payload,Associated_Data) The Associated_Data may contain fixed information such as the base station ID, which is used to enhance authentication.
[0105] Convert the encrypted binary data (Ciphertext + AuthTag) into a format suitable for visual display.
[0106] QR code solution: Directly use binary data as input and call a QR code generation library (such as an encoder that conforms to the ISO / IEC 18004 standard) to generate the corresponding version of the QR code image.
[0107] Color block matrix scheme: Binary data is grouped by bit or byte, and each group is mapped to a predefined color block (e.g., 01->red, 10->green, 11->blue, 00->white), and arranged in a matrix layout (e.g., 4x4) to generate a color image.
[0108] The generated pattern image is sent to the display controller of the base station for refresh display.
[0109] In addition, to ensure that the lawnmower can reliably verify dynamic patterns, this embodiment maintains a soft synchronization mechanism between the base station and the lawnmower: Time reference synchronization: During the S101 two-way authentication phase, the base station and the lawnmower can synchronize their system clocks to millisecond-level accuracy via the NTP protocol or by exchanging timestamp messages, thus establishing a common reference for timestamp verification.
[0110] State synchronization: After each new pattern is generated and displayed, the base station can notify the lawnmower of the current sequence number S via a secure wireless link (as an out-of-band confirmation), or the lawnmower can actively predict the next expected sequence number based on the history of successful decoding.
[0111] Fault tolerance and resynchronization mechanism: If the lawnmower fails to decode for several consecutive frames (e.g., 5 frames), or if the decoded sequence number jumps significantly, it is assumed that synchronization may have been lost.
[0112] At this point, the lawnmower can send a secure "resynchronization request" to the base station. The base station responds to this request by temporarily displaying a pattern containing specific synchronization instructions (such as resetting the sequence number) or by transmitting synchronization information over the wireless channel, restoring both parties to a synchronized state.
[0113] It's important to note that dynamic patterns are not limited to QR codes; they can be combinations of dynamically changing color blocks. For example, the screen could be divided into four areas, each displaying one of three colors—red, green, or blue—based on encrypted information. The lawnmower identifies the color combination sequence and compares it to a predicted sequence generated based on the session key for verification. This method is more covert and less likely to be detected as a beacon by the naked eye.
[0114] S103. Visual recognition, decoding and verification stage.
[0115] The lawnmower's vision system continuously captures images of the base station display screen area and identifies visually encoded patterns within them. The specific steps for pattern capture and recognition are as follows: Image preprocessing and ROI extraction: The lawnmower's vision system preprocesses each frame of image captured by the camera, including distortion correction, noise reduction, and illumination compensation. Using the known approximate location of the base station display screen (obtained from rough positioning or the previous frame) or through color and contour features, the screen area is initially located, defining a Region of Interest (ROI) to narrow the processing scope and improve efficiency. Feature detection and pattern localization: For QR codes / ArUco codes: A fast contour search algorithm is used within the ROI to filter out candidate regions with similar FinderPattern features. Then, perspective transformation correction is performed to extract a regular encoded area image. For color block matrices: The ROI image is segmented in color space (e.g., HSV space) to identify connected regions of a preset color. Based on the center positions of these regions, the layout of the color block matrix and the position of each color block are determined using Hough transform or grid fitting algorithms. Information decoding involves calling the appropriate decoding library (such as ZBar or OpenCV's QR code decoder) to read the binary data carried by the located, well-defined encoded area image. For the color block matrix, the color of each cell is mapped back to the corresponding binary bit, and the data is sequentially concatenated to reconstruct the complete binary data stream.
[0116] The lawnmower's processing unit uses the same temporary session key to attempt real-time decoding of the identified pattern. The base station beacon is deemed a "legitimate, real-time" signal only if the decoded information (timestamp, random number, sequence number) matches the expected values for the current session and the pattern's update rhythm conforms to the agreed-upon transformation rules. Upon successful verification, step S104 is executed. If decoding fails, information does not match, or the pattern remains static (suspected replay), it is determined to be an illegal or forged beacon. The lawnmower immediately terminates the homing process and may log, issue a local alarm, or notify the user via an app.
[0117] Specifically, the update rhythm in this embodiment may include the following: The sequence number seq should typically be equal to the previous successful verification sequence number plus one, or within a small tolerance range (allowing for individual frames to be lost due to recognition failure).
[0118] The pattern refresh rate f should be roughly consistent with the update cycle agreed upon in pattern_params or negotiated at the beginning of the session. For example, if the agreement is to update every 2-5 seconds, the detected change interval should not be a fixed image.
[0119] S104. Return route planning and execution phase.
[0120] Upon successful verification, the lawnmower calculates its relative position and angular deviation from the base station display (i.e., the docking reference point) based on the geometric features of the visually encoded pattern in the image. The precise pose calculation steps are as follows: Input the pixel coordinates of the geometric feature points of the visually encoded pattern in the image. For rectangular patterns (such as QR codes), the four corner points are typically used. The known physical coordinates of these feature points in the pattern's own coordinate system (world coordinate system). For example, for a square QR code with side length L, the coordinates of its four corner points can be set as: (-L / 2,-L / 2,0), (L / 2,-L / 2,0), (L / 2,L / 2,0), (-L / 2,L / 2,0). The intrinsic parameter matrix K of the lawnmower camera (obtained through pre-calibration) and the distortion coefficients. For accurate pose calculation, which is a standard perspective-n-point (PnP) problem, robust PnP solution algorithms such as EfficientPnP or alternative methods (such as Levenberg-Marquardt) optimization are used.
[0121] The objective is to find a rotation matrix R and a translation vector t such that the world coordinates of the pattern are... P w The error is minimized when projecting onto the image plane: Output: The translation vector t directly gives the 3D offset (X, Y, Z) of the camera (usually with a fixed transformation relationship to the lawnmower's center of gravity) relative to the pattern center. Here, X is the lateral offset, and Z is the longitudinal distance. The rotation matrix R can be converted to Euler angles to obtain the lawnmower's yaw angle offset relative to the pattern, i.e., the angular offset. θ .
[0122] The lawnmower's path planning module, combining the relative pose, its own motion model, and known environmental map information (such as ground flatness and obstacles), plans an optimized docking path that is slip-resistant and bump-resistant. For example, it reduces the turning radius, avoids slippery puddles, and adjusts the approach angle to prevent tipping. Subsequently, the drive and control module executes this path to complete a smooth and precise return docking.
[0123] The specific steps for smooth path planning and optimization are as follows: Input and initialization: Initial state: The current pose of the lawnmower (which can be obtained by combining visual pose calculation with odometer reading).
[0124] Target state: The ideal pose of the lawnmower relative to the base station when docking is complete (X=0,Y=0,θ=0, distance is the contact distance).
[0125] Environmental constraints: Read information about the docking path from the environment map in memory, such as the coordinates of known obstacles, slopes, and slippery areas (moss, puddles).
[0126] Kinematic constraints: minimum turning radius, maximum speed, and maximum acceleration of the lawnmower.
[0127] Local path generation: Using spline curve interpolation (such as cubic splines) or state-space based sampling planning (such as HybridA*), several candidate paths are generated between the initial state and the target state.
[0128] Path optimization and selection: Establish a cost function to score each candidate path: text Total_Cost=w1*Path_Length+w2*Curvature_Penalty+w3*Proximity_to_Hazard+w4*Heading_Error_at_Goal Path_Length: The total length of the path; the shorter the better.
[0129] Curvature_Penalty: Path curvature penalty term, which penalizes sharp turns and makes the path smoother.
[0130] Proximity_to_Hazard: A penalty for paths that approach hazardous areas (slippery, uneven), encouraging detours.
[0131] Heading_Error_at_Goal: The deviation between the orientation of the path's endpoint and the orientation of the target.
[0132] Choose the path with the lowest total cost as the final execution path.
[0133] Trajectory generation and tracking: Convert the optimized path into a time-parameterized trajectory (i.e., speed planning) to ensure automatic deceleration when cornering and approaching the finish line.
[0134] The drive control module uses Model Predictive Control (MPC) or PurePursuit algorithms to calculate the left and right wheel speeds or rudder angles in real time, track the trajectory, and complete precise docking.
[0135] Taking a system comprising a lawnmower (equipped with a camera, main control board, and communication module) and a base station (equipped with a display screen, main control board, and communication module) as an example. The base station is pre-installed with digital certificate A issued by the manufacturer, and the lawnmower is pre-installed with digital certificate B. The specific control process is as follows: 1. The lawnmower has finished its task and is now within range of the base station's broadcast.
[0136] 2. The base station and the lawnmower establish a TLS connection via Wi-Fi, exchanging and verifying certificates A and B. After successful verification, a temporary session key K_session is generated using the ECDH key exchange algorithm.
[0137] 3. The base station master controller generates a data packet Payload={Timestamp, RandomNonce, Sequence_Num}, which is then encrypted using the key K_session using AES-GCM to obtain ciphertext C.
[0138] 4. Encode the ciphertext C into an 8x8 encrypted QR code, which is displayed on the 7-inch LCD screen of the base station in Xi'an. Every 2 seconds, update the Timestamp and Nonce, and generate and display a new QR code.
[0139] 5. The lawnmower camera captures images of the area in front at a frame rate of 10fps and identifies the QR code area.
[0140] 6. For each frame of the QR code detected, attempt to decrypt it using K_session. If decryption is successful for three consecutive frames, and the decrypted Timestamp is within the last 2 seconds, and the Nonce matches the expected sequence, then the verification is successful.
[0141] 7. After successful verification, the relative position (X,Y,θ) between the robot and the base station is calculated using the PnP algorithm based on the pixel coordinates of the four corner points of the QR code in the image.
[0142] 8. The path planner receives (X, Y, θ). Combining this with map information, it detects a small, slippery moss area 0.5 meters ahead. The planner generates an arc-shaped path to bypass this area and slowly approaches the base station docking rail at a small angle, ultimately achieving successful docking.
[0143] In summary, the lawnmower homing control method provided in this embodiment, through a triple mechanism of "dynamic encoding + session key encryption + real-time verification," ensures that only base stations holding legitimate keys and capable of generating real-time dynamic patterns can be identified. Static copies or replayed recordings cannot pass verification, fundamentally eliminating forgery and replay attacks. The entire authentication and triggering process is completed automatically by the device, requiring no user intervention (such as manual confirmation or password input). From the user's perspective, the lawnmower simply returns to the base station "naturally and safely." The visually encoded pattern simultaneously serves as a "security beacon" and a "visual positioning target," obtaining high-precision pose information while completing security verification, resulting in high efficiency and a simple system.
[0144] It should be understood that, although Figure 2The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0145] To facilitate better implementation of the lawnmower homing control method of this application, this application also provides a lawnmower homing control device based on the above-described lawnmower homing control method. The meanings of the terms used are the same as in the lawnmower homing control method described above, and specific implementation details can be found in the descriptions in the method embodiments.
[0146] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of the lawnmower robot homing control device provided in an embodiment of this application. The lawnmower robot homing control device may specifically include a key generation module 201, an encoding pattern module 202, a decoding verification module 203, a path planning module 204, and a control module 205, as follows: The key generation module 201 is used to establish a secure communication link between the lawnmower and the base station in response to the homing trigger command for the lawnmower, and to negotiate and generate a session key based on the secure communication link; The encoding pattern module 202 is used to generate a visual encoding pattern based on the session key and dynamic parameters by the base station, and to dynamically display the visual encoding pattern; The decoding and verification module 203 is used to collect visually encoded patterns through the lawnmower robot and decode and verify the visually encoded patterns based on the session key to determine whether the visually encoded patterns are preset beacons. The path planning module 204 is used to calculate the relative pose between the lawnmower robot and the base station based on the visually encoded pattern if the decoding verification is successful, and to plan the corresponding return path based on the relative pose. The control module 205 is used to control the lawnmower robot to move according to the return path until it completes docking with the base station.
[0147] Furthermore, in some embodiments, the key generation module 201 is specifically used for: The lawnmower robot and the base station perform two-way authentication based on a pre-installed digital certificate to obtain the authentication result; After confirming that the authentication result is successful, the lawnmower robot and the base station negotiate and generate a session key through a key exchange protocol.
[0148] Furthermore, in some embodiments, two-way authentication is performed based on the TLS or DTLS protocol; the key exchange protocol is the ECDH key exchange protocol.
[0149] Furthermore, in some embodiments, the encoding pattern module 202 is specifically used for: The base station uses a session key to encrypt dynamic parameters and generate encrypted information. Encrypted information is encoded into machine-readable visual patterns via base stations; The visually encoded pattern displayed on the base station's display screen is updated periodically or non-periodically according to preset transformation rules; wherein the transformation rules are formulated during session key negotiation or included in dynamic parameters.
[0150] Furthermore, in some embodiments, the dynamic parameters include at least one or more of timestamps, random numbers, and serial numbers; the encryption employs an authentication encryption mode with associated data.
[0151] Furthermore, in some embodiments, a visually encoded pattern is displayed on a display screen of the base station, which is oriented towards the direction from which the lawnmower robot approaches.
[0152] Furthermore, in some embodiments, the encoding pattern module 202 is specifically used for: The encrypted information is used as input to call the QR code encoder to generate a QR code image. Alternatively, the encrypted information can be grouped by bit or byte, and each group can be mapped to a preset color block, generating a color block matrix image according to the matrix layout.
[0153] Furthermore, in some embodiments, the decoding verification module 203 is specifically used for: The lawnmower robot continuously collects images containing base stations and identifies and extracts corresponding visually encoded patterns from the images; The lawnmower robot uses a session key to decode the extracted visually encoded pattern and obtain the decoded dynamic parameters. The lawnmower verifies whether the decoded dynamic parameters meet the preset legality conditions and whether the update rhythm of the visually encoded pattern conforms to the preset transformation rules, in order to determine whether the visually encoded pattern is a preset beacon.
[0154] Furthermore, in some embodiments, the legality conditions include at least one of the following: the timestamp obtained by decoding is within a preset valid time window, the random number obtained by decoding does not repeat the historical random number, and the sequence number obtained by decoding conforms to the expected monotonically increasing order.
[0155] Furthermore, in some embodiments, the decoding verification module 203 is specifically used for: The acquired images are preprocessed, and the region of interest is delineated based on the known orientation or color contour features of the base station's display screen. Feature patterns of visual coding patterns are detected within the region of interest, and perspective transformation correction is performed to extract a regular coding area image.
[0156] Furthermore, in some embodiments, the path planning module 204 is specifically used for: Obtain the pixel coordinates of multiple feature points in an image from a visually encoded pattern; Based on the known physical coordinates of the feature points in the world coordinate system of the visually encoded pattern, and the camera intrinsic parameters of the lawnmower robot, the rotation matrix and translation vector of the lawnmower robot relative to the visually encoded pattern are solved to obtain the relative pose. Acquire environmental constraint information and kinematic constraint information of the lawnmower robot; Based on the relative pose, target docking pose, environmental constraints, and kinematic constraints, several candidate paths are generated. The optimal path is selected from the candidate paths based on a preset cost function as the return path.
[0157] Furthermore, in some embodiments, the feature points are the corner points of the visually encoded pattern, and the known physical coordinates are pre-calibrated based on the geometric dimensions of the visually encoded pattern; the solution is obtained using a perspective n-point perspective algorithm.
[0158] Furthermore, in some embodiments, the environmental constraint information includes at least one of obstacle location, slope, and slippery area; the kinematic constraint information includes at least one of minimum turning radius, maximum speed, and maximum acceleration; and the cost function includes at least one of path length, curvature penalty, proximity to dangerous areas, and endpoint orientation deviation.
[0159] Furthermore, in some embodiments, the control module 205 is specifically used for: The homing path is converted into a time-parameterized trajectory, which includes the velocity planning along the path. Using model predictive control or pure tracking algorithms, the rotational speed or steering angle of the drive wheels is calculated in real time to control the lawnmower robot to follow the trajectory until it docks with the base station.
[0160] Furthermore, in some embodiments, the apparatus further includes a synchronization module, specifically used for: When establishing a secure communication link, the lawnmower robot and the base station synchronize their time using the NTP protocol or by exchanging timestamp messages. When the number of consecutive decoding and verification failures exceeds a preset threshold, a resynchronization request is sent to the base station via the lawnmower robot. In response to a resynchronization request, the base station displays a special visually encoded pattern containing synchronization instructions or sends synchronization information via a wireless link.
[0161] Specific limitations regarding the lawnmower robot's homing control device can be found in the above description of the lawnmower robot's homing control method, and will not be repeated here. Each module in the aforementioned lawnmower robot homing control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0162] The lawnmower homing control device provided in this embodiment effectively verifies the visually encoded pattern through a secure communication link and session key. Simultaneously, based on the verified visually encoded pattern, it accurately obtains the relative pose of the lawnmower and the base station and plans the homing path, effectively improving the security and accuracy of the lawnmower homing process and achieving secure, reliable, and accurate homing docking between the lawnmower and the base station. This solves the problems of poor security and insufficient docking accuracy in existing robot homing technologies.
[0163] In one embodiment, a lawnmower robot is provided, the internal structure of which can be shown in the following diagram: Figure 4 As shown, the lawnmower robot includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the lawnmower robot is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the methods described in any of the foregoing embodiments of this application.
[0164] This application also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the methods described in any of the foregoing embodiments of this application.
[0165] This application also provides a chip for executing instructions, which is used to perform the methods described in any of the foregoing embodiments executed by an electronic device as described in any of the foregoing embodiments of this application.
[0166] This application also provides a computer program product, which includes a computer program that, when executed by a processor, can implement the methods described in any of the foregoing embodiments executed by an electronic device as described in any of the foregoing embodiments of this application.
[0167] It should be noted that the functions or steps that the computer-readable storage medium or lawnmower robot can achieve are described in the relevant descriptions of the server side and client side in the aforementioned method embodiments. To avoid repetition, they will not be described one by one here.
[0168] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0169] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0170] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A homing control method for a lawnmower robot, characterized in that, include: In response to a homing trigger command for the lawnmower robot, a secure communication link is established between the lawnmower robot and the base station, and a session key is negotiated and generated based on the secure communication link; The base station generates a visually encoded pattern based on the session key and dynamic parameters, and dynamically displays the visually encoded pattern. The visually encoded pattern is collected by the lawnmower robot, and the visually encoded pattern is decoded and verified based on the session key to determine whether the visually encoded pattern is a preset beacon. If the decoding verification is successful, the relative pose between the lawnmower robot and the base station is calculated based on the visual encoding pattern, and the corresponding return path is planned based on the relative pose. The lawnmower robot is controlled to move according to the return path until it docks with the base station.
2. The lawnmower robot homing control method according to claim 1, characterized in that, The process of establishing a secure communication link between the lawnmower robot and the base station, and negotiating and generating a session key based on the secure communication link, includes: The lawnmower robot and the base station perform two-way identity authentication based on a pre-set digital certificate to obtain the authentication result; After confirming that the authentication result is successful, the lawnmower robot and the base station negotiate and generate a session key through a key exchange protocol.
3. The lawnmower robot homing control method according to claim 1, characterized in that, The step of generating a visually encoded pattern based on the session key and dynamic parameters through the base station, and dynamically displaying the visually encoded pattern, includes: The base station uses the session key to encrypt the dynamic parameters, generating encrypted information. The base station encodes the encrypted information into a machine-readable visual encoded pattern. The base station's display screen periodically or non-periodically updates the displayed visual encoding pattern according to preset transformation rules.
4. The lawnmower robot homing control method according to claim 3, characterized in that, The step of encoding the encrypted information into a machine-readable visual encoded pattern via the base station includes: The encrypted information is used as input to call the QR code encoder to generate a QR code image; Alternatively, the encrypted information can be grouped by bit or byte, and each group can be mapped to a preset color block color to generate a color block matrix image according to the matrix layout.
5. The lawnmower robot homing control method according to claim 1, characterized in that, The step of acquiring the visually encoded pattern through the lawnmower robot and decoding and verifying the visually encoded pattern based on the session key to determine whether the visually encoded pattern is a preset beacon includes: The lawnmower robot continuously collects images containing the base station and identifies and extracts corresponding visual coding patterns from the images; The lawnmower robot uses the session key to decode the extracted visually encoded pattern and obtain the decoded dynamic parameters. The lawnmower robot verifies whether the decoded dynamic parameters meet the preset legality conditions and whether the update rhythm of the visually encoded pattern conforms to the preset transformation rules, in order to determine whether the visually encoded pattern is a preset beacon.
6. The lawnmower robot homing control method according to claim 5, characterized in that, The step of identifying and extracting the corresponding visually encoded pattern from the image includes: The acquired images are preprocessed, and the region of interest is delineated based on the known orientation or color contour features of the base station's display screen. Feature patterns of the visual coding pattern are detected within the region of interest, and perspective transformation correction is performed to extract a regular coding area image.
7. The lawnmower robot homing control method according to claim 1, characterized in that, The step of calculating the relative pose between the lawnmower robot and the base station based on the visual encoded pattern, and planning the corresponding return path based on the relative pose, includes: Obtain the pixel coordinates of multiple feature points in the visually encoded pattern in the image; Based on the known physical coordinates of the feature points in the world coordinate system where the visual coding pattern is located, and the camera intrinsic parameters of the lawnmower robot, the rotation matrix and translation vector of the lawnmower robot relative to the visual coding pattern are solved to obtain the relative pose; Obtain environmental constraint information and the kinematic constraint information of the lawnmower robot; Based on the relative pose, the target docking pose, the environmental constraint information, and the kinematic constraint information, several candidate paths are generated. The optimal path is selected from the candidate paths based on a preset cost function as the return path.
8. The lawnmower robot homing control method according to claim 1, characterized in that, The control of the lawnmower robot to move according to the return path until it docks with the base station includes: The homing path is converted into a time-parameterized trajectory, which includes a velocity plan for movement along the path. Using model predictive control or pure tracking algorithms, the rotational speed or steering angle of the drive wheels is calculated in real time, and the lawnmower robot is controlled to follow the trajectory until it docks with the base station.
9. The lawnmower robot homing control method according to claim 1, characterized in that, The method further includes: When establishing a secure communication link, the lawnmower robot and the base station synchronize their time using the NTP protocol or by exchanging timestamp messages. When the number of consecutive decoding and verification failures exceeds a preset threshold, the lawnmower sends a resynchronization request to the base station. In response to the resynchronization request, the base station displays a special visually encoded pattern containing synchronization instructions, or sends synchronization information via a wireless link.
10. A homing control device for a lawnmower robot, characterized in that, include: The key generation module is used to establish a secure communication link between the lawnmower and the base station in response to the homing trigger command for the lawnmower, and to negotiate and generate a session key based on the secure communication link; The encoding pattern module is used to generate a visual encoding pattern based on the session key and dynamic parameters by the base station, and to dynamically display the visual encoding pattern; The decoding and verification module is used to collect the visually encoded pattern through the lawnmower robot and decode and verify the visually encoded pattern based on the session key to determine whether the visually encoded pattern is a preset beacon. The path planning module is used to calculate the relative pose between the lawnmower robot and the base station based on the visual encoding pattern if the decoding verification is successful, and to plan the corresponding return path based on the relative pose. The control module is used to control the lawnmower robot to move according to the return path until it docks with the base station.
11. A lawnmower robot, characterized in that, The lawnmower robot includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the lawnmower robot homing control method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the lawnmower robot homing control method as described in any one of claims 1 to 9.