Management method, device and system of mower
By implementing client and topic definition rule verification on the lawnmower server, the problem of insufficient client authentication in lawnmower communication is solved, and secure communication and control of the lawnmower are achieved.
Patent Information
- Application Number
- CN202511035565.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-10-28
AI Technical Summary
In the existing technology, it is difficult to effectively authenticate the client of the lawnmower, which allows any client to establish a connection with the lawnmower, reducing the security of communication and control.
By implementing client and topic definition rules on the server side, the system verifies whether the lawnmower's account information and token meet the authentication requirements, establishes MQTT connections only with lawnmowers that have passed authentication and authorization, and provides authentication responses to message requests.
It improves the communication security of lawnmowers, ensuring that only lawnmowers that have passed authentication and authorization can interact, thus enhancing the security of communication and control.
Smart Images

Figure CN120856408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of computer applications, and in particular to a method, apparatus and system for managing lawnmowers. Background Technology
[0002] With the continuous development of communication technology, lawnmower control technology has become increasingly intelligent, enabling new intelligent control schemes for lawnmowers. Typically, lawnmowers use the MQTT (Message Queuing Telemetry Transport) protocol for lightweight communication. Furthermore, the MQTT protocol is designed to reliably transmit small data packets in low-bandwidth, unstable, or high-latency network environments. However, in these technologies, client authentication is difficult when controlling the lawnmower intelligently, allowing any client to establish a connection and reducing the security of lawnmower communication and control. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, apparatus and system for managing lawnmowers to alleviate the above-mentioned technical problems.
[0004] In a first aspect, embodiments of the present invention provide a method for managing a lawnmower, applied to a server. The method includes: responding to an MQTT connection request sent by the lawnmower and obtaining pre-configured client and topic definition rules; wherein the client and topic definition rules are used to record the account information of the lawnmower and the client of the lawnmower, the topic corresponding to the lawnmower, and the format rules satisfied when the lawnmower subscribes to or publishes the topic; verifying whether the lawnmower meets the authentication requirements based on the client and topic definition rules and the pre-configured token; if so, establishing an MQTT connection with the lawnmower; receiving a message request initiated by the lawnmower and authenticating the message request based on the client and topic definition rules; if authentication is successful, responding to the message request and sending feedback information to the lawnmower indicating that the message request was successful.
[0005] In conjunction with the first aspect, this embodiment of the invention provides a first possible implementation of the first aspect, wherein the account information recorded in the client and topic definition rules includes the client's identification information and the lawnmower's identification information; the step of verifying whether the lawnmower meets the authentication requirements based on the client and topic definition rules and a pre-configured token includes: extracting the account information and token carried in the MQTT connection request; determining whether the account information and token carried in the MQTT connection request meet the following conditions: the account information carried in the MQTT connection request is consistent with the account information recorded in the client and topic definition rules; and the token carried in the MQTT connection request is valid; if all conditions are met, the lawnmower is determined to meet the authentication requirements; if any condition is not met, the lawnmower is determined to not meet the authentication requirements.
[0006] In conjunction with the first possible implementation of the first aspect, this embodiment of the invention provides a second possible implementation of the first aspect, wherein the above method further includes: verifying whether the token carried in the MQTT connection request is consistent with a pre-stored token; if yes, determining that the token carried in the MQTT connection request is valid; if no, determining that the token carried in the MQTT connection request is invalid.
[0007] In conjunction with the second possible implementation of the first aspect, this embodiment of the invention provides a third possible implementation of the first aspect, wherein the above method further includes: generating a token for the lawnmower in response to a token initialization operation sent by a client corresponding to the lawnmower; sending the token to the client; and synchronizing the token to the lawnmower through the client.
[0008] In conjunction with the second possible implementation of the first aspect, this embodiment of the invention provides a fourth possible implementation of the first aspect, wherein the method further includes: generating a first token for the lawnmower in response to a token update operation applied to the lawnmower; sending the first token to the client; and synchronizing the first token to the lawnmower through the client to update the tokens of the client and the lawnmower to the first token.
[0009] In conjunction with the first aspect, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein the aforementioned message request includes a topic subscription message request or a topic publication message request; the step of authenticating the message request based on the client and topic definition rules includes: extracting the account information of the lawnmower and / or the lawnmower's client carried in the message request; determining whether the lawnmower is logged in based on the account information; if so, extracting the topic carried in the message request; determining whether the topic is consistent with the topic recorded in the client and topic definition rules; if so, determining that authentication is successful; if not, determining that authentication is unsuccessful.
[0010] In conjunction with the first possible implementation of the first aspect, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the method further includes: after extracting the account information carried in the MQTT connection request, determining whether the account information carried in the MQTT connection request is pre-configured target account information; wherein the user corresponding to the target account information is configured with permissions that do not require authentication for the message request; if so, establishing an MQTT connection with the lawnmower; receiving a message request initiated by the lawnmower, responding to the message request, and sending feedback to the lawnmower information indicating that the message request was successful.
[0011] Secondly, embodiments of the present invention also provide a lawnmower management device applied to a server. The device includes: a request module, used to respond to an MQTT connection request sent by the lawnmower and obtain pre-configured client and topic definition rules; wherein the client and topic definition rules are used to record the account information of the lawnmower and the client of the lawnmower, the topic corresponding to the lawnmower, and the format rules satisfied when the lawnmower subscribes to or publishes the topic; an authentication module, used to verify whether the lawnmower meets the authentication requirements based on the client and topic definition rules and a pre-configured token; a connection module, used to establish an MQTT connection with the lawnmower when the authentication result of the authentication module is yes; an authentication module, used to receive a message request initiated by the lawnmower and authenticate the message request based on the client and topic definition rules; and a response module, used to respond to the message request when the authentication module passes the authentication, and to send feedback information to the lawnmower that the message request was successful.
[0012] Thirdly, embodiments of the present invention also provide a lawnmower management system, the system including a lawnmower, a client, and a server; the lawnmower is used to communicate with the server and the client respectively, and the client is also used to communicate with the server; the server is configured with the lawnmower management device described in the second aspect.
[0013] Fourthly, embodiments of the present invention also provide an electronic device, including 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 method described in the first aspect above.
[0014] The embodiments of the present invention bring the following beneficial effects: The lawnmower management method, apparatus, and system provided in this invention can respond to MQTT connection requests sent by the lawnmower, obtain pre-configured client and topic definition rules; verify whether the lawnmower meets the authentication requirements based on the client and topic definition rules and the pre-configured token; if so, establish an MQTT connection with the lawnmower; receive message requests initiated by the lawnmower, and authenticate the message requests based on the client and topic definition rules; if authentication is successful, respond to the message requests, and send feedback to the lawnmower with message request success information. Through the process of token verification and message request authentication, it can ensure that only lawnmowers that have passed authentication and authorization can interact, greatly improving the communication security of the lawnmower.
[0015] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating a lawnmower management method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating another lawnmower management method provided in an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a lawnmower management device provided in an embodiment of the present invention; Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0020] Typically, when new smart lawnmowers use the MQTT protocol to communicate with clients and servers, they often face complex business scenarios. Therefore, it is necessary to manage the authentication and authorization of the lawnmower or the clients communicating with it to improve the security of the lawnmower's communication and control.
[0021] Based on this, the lawnmower management method, device and system provided in this embodiment of the invention can implement complex authentication and authorization logic to ensure that only lawnmowers that have passed authentication and authorization can achieve intelligent control and interaction, which greatly improves the security of communication and control.
[0022] To facilitate understanding of this embodiment, a method for managing a lawnmower disclosed in this embodiment of the invention will first be described in detail.
[0023] In one possible implementation, this invention provides a lawnmower management method applied to a server. Typically, this server enables intelligent communication with the lawnmower, providing configuration services, authentication, and authorization services for intelligent control. Furthermore, users can establish communication with the server and the lawnmower through a client. For example, a user can install an application (APP) corresponding to the lawnmower on a smart terminal, which can act as the lawnmower's client. After logging into the client, the user can control the lawnmower, such as sending task commands. Additionally, the lawnmower also needs to establish a connection with the server to achieve communication between the client, the lawnmower, and the server, thereby realizing intelligent control of the lawnmower.
[0024] In practical use, the lawnmower management method in this embodiment of the invention can manage the lawnmower when a connection is established between the lawnmower and the server. Specifically, for example... Figure 1 The flowchart shown illustrates a method for managing a lawnmower, which includes the following steps: Step S102: Respond to the MQTT connection request sent by the lawnmower and obtain the pre-configured client and topic definition rules; In this embodiment of the invention, the client and topic definition rules are used to record the account information of the lawnmower and its client, the topic corresponding to the lawnmower, and the format rules that the lawnmower follows when subscribing to or publishing a topic. Therefore, the client and topic definition rules in this embodiment of the invention actually include client definition rules and topic definition rules. The client definition rules include the account information of the lawnmower and its client, etc., and the topic definition rules typically include the topic corresponding to the lawnmower, and the format rules that the lawnmower follows when subscribing to or publishing a topic, etc.
[0025] Step S104: Verify whether the lawnmower meets the authentication requirements based on the client and topic definition rules and the pre-configured token; In practical use, from the server's perspective, both the user's smart terminal and the lawnmower are clients. For ease of distinction, in this embodiment of the invention, "client-APP" represents the client comprised of the user's smart terminal, and "client-mower" represents the lawnmower. Typically, to implement MQTT protocol communication, the clients and corresponding topic rules can be predefined; that is, clearly defined client and topic rules are used. The corresponding topic is identified by the client identifier and account. Different types of clients use a specified name format, for example: 1. client-APP ->ios_xxx or android_xxx; 2. client-mower -> {sn}; where {sn} is an exclusive subscription and $exclusive is a fixed prefix for exclusive subscriptions.
[0026] Based on the pre-configured client and topic definition rules mentioned above, the lawnmower can be authenticated to determine whether to establish a further MQTT connection with the lawnmower.
[0027] Step S106: If yes, establish an MQTT connection with the lawnmower; Step S108: Receive a message request initiated by the lawnmower and authenticate the message request based on the client and topic definition rules; In step S110, if authentication is successful, respond to the message request and send a message to the lawnmower indicating that the message request was successful.
[0028] Typically, after the server establishes an MQTT connection with the lawnmower, it can issue commands to the lawnmower. At the same time, the lawnmower can also initiate message requests to the server. The client and topic definition rules also record the topics that the lawnmower subscribes to or publishes. Therefore, the message requests can be authenticated based on the client and topic definition rules. After successful authentication, the server can respond to the message request, that is, determine that the lawnmower has the permission to initiate the message request, such as requesting the current task instructions, including the task location, task time, etc.
[0029] The lawnmower management method provided in this invention can respond to MQTT connection requests sent by the lawnmower, obtain pre-configured client and topic definition rules; verify whether the lawnmower meets the authentication requirements based on the client and topic definition rules and the pre-configured token; if so, establish an MQTT connection with the lawnmower; receive message requests initiated by the lawnmower, and authenticate the message requests based on the client and topic definition rules; if authentication is successful, respond to the message requests and send feedback to the lawnmower with message request success information. Through the process of token verification and message request authentication, it can ensure that only lawnmowers that have passed authentication and authorization can interact, greatly improving the communication security of the lawnmower.
[0030] In practical use, the account information recorded in the above client and theme definition rules typically includes the client's identification information and the lawnmower's identification information. For ease of understanding, Table 1 below shows one way to define client and theme rules, as shown in Table 1: Table 1:
[0031] Based on the client and topic definition rules shown in Table 1 above, the lawnmower can be authenticated when establishing an MQTT connection with the server to determine whether the lawnmower meets the authentication requirements.
[0032] For ease of understanding, Figure 1 On this basis, Figure 2 A flowchart illustrating another method for managing lawnmowers is provided, further explaining the authentication and authorization process for lawnmowers. Specifically, as... Figure 2 As shown, it includes the following steps: Step S202: Respond to the MQTT connection request sent by the lawnmower and obtain the pre-configured client and topic definition rules; In this embodiment of the invention, the client and topic definition rules are used to record the account information of the lawnmower and its client, the topic corresponding to the lawnmower, and the format rules that the lawnmower follows when subscribing to or publishing topics; for example, as shown in Table 1 above. After obtaining the client and topic definition rules, the following authentication process can be further performed.
[0033] Step S204: Extract the account information and token carried in the MQTT connection request; Step S206: Determine whether the account information and token carried in the MQTT connection request meet the authentication requirements; Specifically, this judgment process requires determining whether the account information and token meet the following conditions: The lawnmower is considered authenticating if the account information carried in the MQTT connection request matches the account information recorded in the client and topic definition rules, and if the token carried in the MQTT connection request is valid. If both conditions are met, the lawnmower is deemed authenticating. If any condition is not met, the lawnmower is deemed ineligible for authentication. Specifically, during lawnmower authentication, it is verified whether the lawnmower's ClientID is recorded in the client and topic definition rules. If so, the authentication of the lawnmower's ClientID is confirmed as compliant, and then the validity of the token carried in the MQTT connection request is further verified. Specifically, it can be verified whether the token carried in the MQTT connection request matches a pre-stored token. If yes, the token carried in the MQTT connection request is deemed valid; otherwise, the token carried in the MQTT connection request is deemed invalid. When the lawnmower's ClientID authentication is compliant and the token is valid, the lawnmower's authentication process is deemed compliant with authentication requirements.
[0034] In practical use, the aforementioned server can provide MQTT service and YAT cloud service. When the lawnmower sends an MQTT connection request, the MQTT service can call the pre-configured authentication interface to receive the connection request and then pass it to the YAT cloud service. The YAT cloud service further authenticates whether the account information is compliant and whether the token is valid, and then feeds back the authentication result to the MQTT service, which in turn feeds back to the lawnmower.
[0035] Furthermore, in step S206 above, if the authentication requirements are met, then step S208 is executed; otherwise, step S207 is executed. Step S207: Send an authentication failure message to the lawnmower; Step S208: Establish an MQTT connection with the lawnmower; In practical use, the aforementioned tokens are usually pre-configured. Specifically, a token can be configured on the lawnmower when it is first used, and then updated as needed during subsequent use. For ease of understanding, the token configuration process is shown below, including the following steps: (1) Respond to the token initialization operation sent by the client corresponding to the lawnmower and generate a token for the lawnmower; In practice, taking a user's first use of a lawnmower as an example, when a user uses the lawnmower for the first time, a token needs to be configured. Since this is the first time using the lawnmower, it cannot directly connect to the server. Therefore, a short-range wireless communication method, such as Bluetooth, can be used to establish communication between the client and the lawnmower. At this point, the client can send a token initialization request to the server, which can respond and generate a lawnmower token. Furthermore, this process can be implemented on the server-side YAT cloud service. That is, the YAT cloud service responds to the token initialization request, extracts the client's identification information and the lawnmower's identification information carried in the token initialization request, and then generates the lawnmower token.
[0036] (2) Send the token to the client, and synchronize the token to the lawnmower via the client.
[0037] Specifically, after the lawnmower receives the token, it can send feedback to the client that the token already exists. At this time, the client can synchronize the information that the lawnmower's token already exists to the server. That is, at this time, the client, the lawnmower, and the server have all synchronized the lawnmower's token. At this time, the process of step S202 above can be further executed, that is, the lawnmower can send an MQTT connection request to the server to establish an MQTT connection.
[0038] Furthermore, the aforementioned token can be updated according to actual usage needs. For example, when the client or lawnmower software version is updated, the token will also be updated. Alternatively, when the usage time reaches a preset duration, the token will also be updated. In this case, when the lawnmower is updated, both the lawnmower and the client can send a token update operation to the server. The server can then respond to the token update operation applied to the lawnmower, generate the first token for the lawnmower, send the first token to the client, and synchronize the first token to the lawnmower through the client, thereby updating the tokens of the client and the lawnmower to the first token.
[0039] In practice, the aforementioned first token is the updated token. The client can send a token update operation to the YAT cloud service, which will generate a new token, namely the aforementioned first token. Then, the client establishes communication with the lawnmower via short-range wireless communication, such as Bluetooth, and synchronizes the first token to the lawnmower. Simultaneously, it notifies the server that the token update was successful. At this point, the client, the lawnmower, and the server have all synchronously updated their tokens. Then, step S202 can be re-executed, meaning the lawnmower can send an MQTT connection request to the server to establish an MQTT connection. The updated token can continue to be used to authenticate MQTT connection requests.
[0040] Based on the authentication process of the aforementioned token, device isolation between lawnmowers can be achieved. That is, based on predefined client and topic definition rules, it can be ensured that each lawnmower only interacts with its own data and commands, reducing the risk of data exposure and data leakage. At the same time, users can easily manage which devices are allowed to communicate and revoke access, ensuring that only authorized devices can control and interact with the server.
[0041] Step S210: Receive a message request initiated by the lawnmower; Specifically, after the lawnmower establishes an MQTT connection with the server, the lawnmower can initiate message requests to the server, such as initiating a message request to subscribe to or publish a topic. That is, in this embodiment of the invention, the message request includes a message request to subscribe to a topic or a message request to publish a topic. After receiving the message request, the server can further authenticate the message request to determine whether the current lawnmower or client has the permission to execute the message request. For example, it can determine whether the lawnmower has the permission to publish to or subscribe to a topic. Specifically, the authentication process includes the following steps.
[0042] Step S212: Extract the account information of the lawnmower and / or the lawnmower's client carried in the message request; Step S214: Determine whether the lawnmower is logged in based on the account information; If yes, proceed to step S216 to extract the subject carried in the message request; if no, proceed to step S217 to determine that the lawnmower authentication failed.
[0043] Step S218: Determine whether the topic is consistent with the topic recorded in the client and topic definition rules; If yes, proceed to step S220 to confirm that the authentication has passed; if no, proceed to step S217 to confirm that the lawnmower authentication has failed.
[0044] Step S222: Respond to the message request and send a message to the lawnmower indicating that the message request was successful.
[0045] Through the above authentication process, only message requests that have passed authentication will be allowed to be responded to. That is, the lawnmower is only allowed to subscribe to or publish predefined topics, which effectively improves the security of lawnmower communication.
[0046] Furthermore, considering that while the aforementioned authentication process improves communication security, requiring authentication for every message request can slow down communication between the lawnmower and the client, this embodiment of the invention can also pre-configure superuser permissions for account information. This means that message requests for certain account information can be executed without authentication. Specifically, after extracting the account information carried in the MQTT connection request, it can be determined whether the account information carried in the MQTT connection request is the pre-configured target account information. The user corresponding to this target account information is configured with permissions that do not require authentication for message requests, i.e., authentication-free permissions. If so, an MQTT connection is established with the lawnmower; message requests initiated by the lawnmower are received, responses are made to the message requests, and a message request success message is sent back to the lawnmower. In other words, message requests issued by the target account information can be executed without authentication, further increasing the flexibility of lawnmower management.
[0047] Furthermore, based on the above embodiments, this invention also provides a lawnmower management device applied to a server, such as... Figure 3 The diagram shows a structural schematic of a lawnmower management device, which includes: The request module 30 is used to respond to the MQTT connection request sent by the lawnmower and obtain the pre-configured client and topic definition rules; wherein, the client and topic definition rules are used to record the account information of the lawnmower and the client of the lawnmower, the topic corresponding to the lawnmower, and the format rules that the lawnmower meets when subscribing to or publishing the topic; Authentication module 32 is used to verify whether the lawnmower meets the authentication requirements based on the client and topic definition rules and pre-configured tokens; The connection module 34 is used to establish an MQTT connection with the lawnmower when the authentication result of the authentication module is yes; The authentication module 36 is used to receive message requests initiated by the lawnmower and authenticate the message requests based on the client and topic definition rules. The response module 38 is used to respond to the message request when the authentication module passes the authentication, and to send a message request success message back to the lawnmower.
[0048] Specifically, the account information recorded in the aforementioned client and topic definition rules includes the client's identification information and the lawnmower's identification information; the steps for verifying whether the lawnmower meets the authentication requirements based on the client and topic definition rules and the pre-configured token include: extracting the account information and token carried in the MQTT connection request; determining whether the account information and token carried in the MQTT connection request meet the following conditions: the account information carried in the MQTT connection request is consistent with the account information recorded in the client and topic definition rules; and the token carried in the MQTT connection request is valid; if all conditions are met, the lawnmower is determined to meet the authentication requirements; if any condition is not met, the lawnmower is determined to not meet the authentication requirements.
[0049] Furthermore, the above-mentioned device is also used to: verify whether the token carried in the MQTT connection request is consistent with the pre-stored token; if yes, determine that the token carried in the MQTT connection request is valid; if no, determine that the token carried in the MQTT connection request is invalid.
[0050] Furthermore, the above-mentioned device is also used to: generate a token for the lawnmower in response to a token initialization operation sent by the client corresponding to the lawnmower; send the token to the client; and synchronize the token to the lawnmower through the client.
[0051] Furthermore, the above-mentioned device is also used to: generate a first token for the lawnmower in response to a token update operation performed on the lawnmower; send the first token to the client; and synchronize the first token to the lawnmower through the client, so as to update the tokens of the client and the lawnmower to the first token.
[0052] Furthermore, the aforementioned message requests include subscription message requests or publication message requests for a topic; the step of authenticating the message requests based on the client and topic definition rules includes: extracting the account information of the lawnmower and / or the lawnmower's client carried in the message request; determining whether the lawnmower is logged in based on the account information; if so, extracting the topic carried in the message request; determining whether the topic is consistent with the topic recorded in the client and topic definition rules; if so, determining that authentication is successful; if not, determining that authentication is unsuccessful.
[0053] Furthermore, the aforementioned device is also used to: extract the account information carried in the MQTT connection request, and then determine whether the account information carried in the MQTT connection request is pre-configured target account information; wherein the user corresponding to the target account information is configured with permissions that do not require authentication for the message request; if so, establish an MQTT connection with the lawnmower; receive the message request initiated by the lawnmower, respond to the message request, and send feedback to the lawnmower with a message request success message.
[0054] The lawnmower management device provided in this embodiment of the invention has the same technical features as the lawnmower management method provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.
[0055] Furthermore, this embodiment of the invention also provides a lawnmower management system, the system including a lawnmower, a client, and a server; the lawnmower is used to communicate with the server and the client respectively, and the client is also used to communicate with the server; the server is configured with the above-mentioned lawnmower management device.
[0056] Furthermore, embodiments of the present invention also provide an electronic device, including 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 above method.
[0057] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described method.
[0058] Furthermore, embodiments of the present invention also provide a schematic diagram of the structure of an electronic device, such as... Figure 4 The diagram shows the structure of the electronic device, which includes a processor 41 and a memory 40. The memory 40 stores computer-executable instructions that can be executed by the processor 41, and the processor 41 executes the computer-executable instructions to implement the above-described method.
[0059] exist Figure 4 In the illustrated embodiment, the electronic device further includes a bus 42 and a communication interface 43, wherein the processor 41, the communication interface 43, and the memory 40 are connected via the bus 42.
[0060] The memory 40 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 42 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 42 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0061] Processor 41 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 41 or by software instructions. Processor 41 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor 41 reads the information in the memory and uses its hardware to complete the aforementioned method.
[0062] The computer program product of the lawnmower management method, device and system provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0063] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0064] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0065] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0066] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0067] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, 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 the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for managing lawnmowers, characterized in that, Applied to the server side, the method includes: In response to an MQTT connection request sent by the lawnmower, the system retrieves pre-configured client and topic definition rules. The client and topic definition rules are used to record the account information of the lawnmower and its client, the topic corresponding to the lawnmower, and the format rules that the lawnmower follows when subscribing to or publishing the topic. The client and topic definition rules and pre-configured tokens are used to verify whether the lawnmower meets the authentication requirements; If so, establish an MQTT connection with the lawnmower; Receive a message request initiated by the lawnmower, and authenticate the message request based on the client and topic definition rules; If authentication is successful, the system responds to the message request and sends a message to the lawnmower indicating that the message request was successful.
2. The method according to claim 1, characterized in that, The account information recorded in the client and topic definition rules includes the client's identification information and the lawnmower's identification information; The steps for verifying whether the lawnmower meets the authentication requirements based on the client and topic definition rules and pre-configured tokens include: Extract the account information and token carried in the MQTT connection request; Determine whether the account information and token carried in the MQTT connection request meet the following conditions: The account information carried in the MQTT connection request is consistent with the account information recorded in the client and topic definition rules; and the token carried in the MQTT connection request is valid. If all conditions are met, then the lawnmower is deemed to meet the certification requirements; If any one of the conditions is not met, the lawnmower is determined to be non-compliant with certification requirements.
3. The method according to claim 2, characterized in that, The method further includes: Verify that the token carried in the MQTT connection request is consistent with the pre-stored token; If so, determine that the token carried in the MQTT connection request is valid; If not, the token carried in the MQTT connection request is invalid.
4. The method according to claim 3, characterized in that, The method further includes: In response to the token initialization operation sent by the client corresponding to the lawnmower, a token for the lawnmower is generated; The token is sent to the client, and the token is synchronized to the lawnmower via the client.
5. The method according to claim 3, characterized in that, The method further includes: In response to a token update operation applied to the lawnmower, a first token for the lawnmower is generated; The first token is sent to the client, and the first token is synchronized to the lawnmower through the client to update the tokens of the client and the lawnmower to the first token.
6. The method according to claim 1, characterized in that, The message request includes a topic subscription message request or a topic publication message request; The steps for authenticating the message request based on the client and topic definition rules include: Extract the account information of the lawnmower and / or the lawnmower's client carried in the message request; Based on the account information, determine whether the lawnmower is logged in; If so, extract the topic carried in the message request; Determine whether the topic matches the topic recorded in the client and topic definition rules; If so, confirm that authentication has passed; If not, authentication has failed.
7. The method according to claim 2, characterized in that, The method further includes: After extracting the account information carried in the MQTT connection request, it is determined whether the account information carried in the MQTT connection request is the pre-configured target account information; wherein, the user corresponding to the target account information is configured with permissions that do not require authentication for the message request; If so, establish an MQTT connection with the lawnmower; The system receives a message request initiated by the lawnmower, responds to the message request, and sends a message to the lawnmower indicating that the message request was successful.
8. A management device for a lawnmower, characterized in that, Applied to the server side, the device includes: The request module is used to respond to MQTT connection requests sent by the lawnmower and obtain pre-configured client and topic definition rules; wherein, the client and topic definition rules are used to record the account information of the lawnmower and the client of the lawnmower, the topic corresponding to the lawnmower, and the format rules that the lawnmower meets when subscribing to or publishing the topic; The authentication module is used to verify whether the lawnmower meets the authentication requirements based on the client and topic definition rules and pre-configured tokens; A connection module is used to establish an MQTT connection with the lawnmower when the authentication result of the authentication module is yes; The authentication module is used to receive message requests initiated by the lawnmower and authenticate the message requests based on the client and topic definition rules. The response module is used to respond to the message request when the authentication module passes the authentication, and to send a message request success message to the lawnmower.
9. A management system for a lawnmower, characterized in that, The system includes a lawnmower, a client, and a server. The lawnmower is used to communicate with both the server and the client, and the client is also used to communicate with the server. The server is equipped with the lawnmower management device as described in claim 8.
10. An electronic device, characterized in that, The method 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 method described in any one of claims 1-7.
Citation Information
Patent Citations
Access authentication method and access authentication equipment based on MQTT
CN106657130A
Lawn mower use data analysis system and method
CN119094512A
Validating association of client devices with authenticated clients
US8819803B1