[go: up one dir, main page]

CN113246117A - Robot control method and device and building management system - Google Patents

Robot control method and device and building management system Download PDF

Info

Publication number
CN113246117A
CN113246117A CN202010085761.7A CN202010085761A CN113246117A CN 113246117 A CN113246117 A CN 113246117A CN 202010085761 A CN202010085761 A CN 202010085761A CN 113246117 A CN113246117 A CN 113246117A
Authority
CN
China
Prior art keywords
connection
long
instruction
target
robot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010085761.7A
Other languages
Chinese (zh)
Other versions
CN113246117B (en
Inventor
车航宇
鲁时雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to CN202010085761.7A priority Critical patent/CN113246117B/en
Publication of CN113246117A publication Critical patent/CN113246117A/en
Application granted granted Critical
Publication of CN113246117B publication Critical patent/CN113246117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed
    • B25J9/1689Teleoperation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The embodiment of the invention provides a control method and equipment of a robot and a building management system, wherein the method comprises the following steps: establishing at least two wireless long connections with a target robot based on different communication protocols; under the condition that the interruption of a first long connection in the at least two wireless long connections is detected, sending a reconnection instruction through a second long connection which keeps a connection state in the at least two wireless long connections, wherein the reconnection instruction is used for instructing the target robot to reestablish the first long connection; and under the condition that the first long connection is failed to be reestablished, sending a moving instruction to the target robot through the second long connection, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to the target position. The invention can improve the communication reliability between the robot and the platform and improve the performance of the intelligent building management system.

Description

Robot control method and device and building management system
Technical Field
The invention relates to the technical field of intelligent buildings, in particular to a robot control method, equipment and a building management system.
Background
A building in which 5 functions such as Building Automation (BA), Communication Automation (CA), Office Automation (OA), security and Security Automation (SAS), and Fire Automation (FAS) are combined by coordinating power, air conditioning, lighting, disaster prevention, theft prevention, transportation equipment, and the like in the building by integrating advanced technologies in the fields of computers, information communication, and the like is also called a 5A building. The 5A building is added with a structured integrated wiring system (SCS), a structured integrated network system (SNS) and an intelligent building integrated information Management Automation System (MAS), so that the intelligent building in the current scene is formed.
The intelligent building is mainly used for monitoring and managing electromechanical equipment in the building. With the development of technology, the concept of intelligent building is extended, including not only the monitoring, control and management of traditional electromechanical devices, but also intelligent lighting, automation of floor rooms, energy management and the like. The requirements of the intelligent building mainly comprise complete control, management, maintenance and communication facilities, so that the intelligent building is convenient for environment control, safety management and monitoring alarm, is favorable for improving the working efficiency and stimulates the creativity of people. In short, the basic requirements for building intelligence are: the system has the advantages of automation and intellectualization of office equipment, high performance of a communication system, flexibility of buildings and automation of building management services.
Chinese patent application (publication No. CN108578134A) in the prior art discloses an intelligent distribution system for medical automatic guided vehicles (AGV carts), comprising: the system comprises an AGV trolley, an isolation cabinet with a plurality of isolation layers, a central controller, an authorization module and a first RFID reader-writer, wherein the AGV trolley drives the isolation cabinet to move; the authorization module is linked with the induction module and is used for opening the isolation layer under the set authority; the micro switch is used for sensing the closing of the isolation layer; the touch display screen is used for displaying the ward information corresponding to each isolation layer and confirming the workers. The second RFID reader-writer updates the floor information of the RFID electronic tag, and the elevator controller obtains the related information of the RFID electronic tag through the first RFID reader-writer and controls the elevator to run. The system combines the safety and diversity of hospital drug delivery, and reduces labor cost and operation cost while safely delivering to each ward through the layered design of the isolation cabinet and the independent control of the isolation layer. In addition, the system can further perform intelligent interaction with the elevator to complete the overall control of the whole medical logistics process.
The above prior art requires the robot to communicate directly with the elevator when controlling the motion of the robot (e.g., AGV cart), which increases the design requirements for the robot. In addition, the central planning platform is disposed in the AGV, which is not conducive to optimization of the cooperation between robots and related facilities, and the above-mentioned prior art does not provide any solution for increasing the reliability of communication.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is to provide a robot control method, equipment and a building management system, which can improve the communication reliability between a robot and a platform and improve the performance of the intelligent building management system.
In order to solve the above technical problem, an embodiment of the present invention provides a method for controlling a robot, including:
establishing at least two wireless long connections with a target robot based on different communication protocols;
under the condition that the interruption of a first long connection in the at least two wireless long connections is detected, sending a reconnection instruction through a second long connection which keeps a connection state in the at least two wireless long connections, wherein the reconnection instruction is used for instructing the target robot to reestablish the first long connection;
and under the condition that the first long connection is failed to be reestablished, sending a moving instruction to the target robot through the second long connection, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to the target position.
According to at least one embodiment of the invention, the step of sending a movement instruction to the target robot through the second long connection comprises:
determining a first position of the target robot that was last acquired;
calculating the moving cost from the first position to each preset position in the preset position list, and selecting at least one target position from the preset position list according to the moving cost, wherein the preset position list stores a plurality of positions with wireless signal coverage quality meeting preset conditions;
and sending a movement instruction carrying the at least one target position to the target robot through the second long connection.
According to at least one embodiment of the present invention, the move instruction further carries a move priority for each target location, wherein a target location with a higher move priority has a lower move cost.
According to at least one embodiment of the invention, after sending the move instruction, the method further comprises:
and receiving a reestablishment request for reestablishing the first long connection sent by the target robot, and responding to the reestablishment request to reestablish the first long connection.
According to at least one embodiment of the invention, after successfully re-establishing the first long connection, the method further comprises:
acquiring a task list of tasks to be executed of the target robot, which is stored by a cloud building management platform, wherein the task list comprises at least one task which arrives in sequence according to a time sequence;
calculating interruption time according to the earliest arrival time of the earliest arrival task in the task list and the reconstruction completion time of the reconstruction completion of the first long connection;
judging whether the interruption time is greater than a preset time threshold value or not;
sending the task which is arrived most recently in the task list to the target robot to execute under the condition that the interruption time is larger than the time threshold;
and sending all tasks in the task list to the target robot to execute under the condition that the interruption time is not greater than the time threshold.
According to at least one embodiment of the invention, the at least two wireless long connections comprise a Websocket connection and a message queue telemetry transport MQTT connection.
According to at least one embodiment of the present invention, in a case where the first long connection is a Websocket connection and the second long connection is an MQTT connection, the step of sending the reconnection command through the second long connection includes:
when the reconnection instruction needs to be sent to a plurality of robots, issuing the reconnection instruction to a first URL (uniform resource locator) of a preset MQTT message middleware server, wherein the first URL is a URL which is commonly subscribed by the robots, and the robots comprise the target robot;
when the target robot is only required to send the reconnection instruction, issuing the reconnection instruction to a second URL of a preset MQTT message middleware server, wherein the second URL is a URL to which the target robot subscribes independently.
According to at least one embodiment of the present invention, in a case where the first long connection is an MQTT connection and the second long connection is a Websocket connection, the step of sending the reconnection command includes:
and sending a reconnecting instruction in a JSON format to the target robot through Websocket connection.
The embodiment of the invention also provides a control method of the robot, which is applied to the target robot and comprises the following steps:
establishing at least two wireless long connections with a building management platform based on different communication protocols;
under the condition that a first long connection in the at least two wireless long connections is interrupted, receiving a reconnection instruction sent by the building management platform through a second long connection which keeps a connection state in the at least two wireless long connections, wherein the reconnection instruction is used for instructing the target robot to reestablish the first long connection;
under the condition that the first long connection is failed to be reestablished, receiving a moving instruction sent by the building management platform through the second long connection, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to a target position;
and moving to the target position according to the moving instruction, and rebuilding the first long connection at the target position.
According to at least one embodiment of the present invention, the move instruction carries at least one target location and a move priority of each target location;
the step of moving to the target position according to the moving instruction and reconstructing the first long connection at the target position comprises:
and sequentially moving to each target position according to the sequence of the moving priorities, trying to rebuild the first long connection after moving to one target position, stopping moving to the next target position if the rebuilding is successful, or continuing moving to the target position with the highest next priority and rebuilding the first long connection at the next target position until the rebuilding is successful or all the target positions are rebuilt unsuccessfully.
According to at least one embodiment of the invention, the at least two wireless long connections comprise a Websocket connection and a message queue telemetry transport MQTT connection.
According to at least one embodiment of the present invention, in a case where the first long connection is a Websocket connection and the second long connection is an MQTT connection, the step of receiving a reconnect instruction sent by the building management platform through the second long connection includes:
subscribing to a topic under a first URL and a second URL, the first URL being a URL to which a plurality of robots are commonly subscribed, the plurality of robots including the target robot, the second URL being a URL to which the target robot is individually subscribed;
and receiving information which is issued to the first URL and/or the second URL by the building management platform to obtain a reconnection instruction sent by the building management platform.
According to at least one embodiment of the present invention, in a case where the first long connection is an MQTT connection and the second long connection is a Websocket connection, the step of receiving a reconnect instruction sent by the building management platform through the second long connection includes:
and receiving a JSON format reconnection instruction sent by the building management platform through Websocket connection.
An embodiment of the present invention further provides a building management platform, including:
the connection establishing unit is used for establishing at least two long wireless connections with the target robot based on different communication protocols;
an instruction sending unit, configured to send a reconnection instruction through a second long connection that maintains a connection state in the at least two wireless long connections when it is detected that a first long connection in the at least two wireless long connections is interrupted, where the reconnection instruction is used to instruct the target robot to reestablish the first long connection;
and the reconnection control unit is used for sending a moving instruction to the target robot through the second long connection under the condition that the first long connection is failed to be reestablished, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to a target position.
The embodiment of the invention also provides a target robot, which comprises:
the connection establishing unit is used for establishing at least two wireless long connections based on different communication protocols between the building management platform and the building management platform;
the command receiving unit is used for receiving a reconnection command sent by the building management platform through a second long connection which keeps a connection state in the at least two wireless long connections under the condition that the first long connection in the at least two wireless long connections is interrupted, wherein the reconnection command is used for instructing the target robot to reestablish the first long connection;
a connection reestablishing unit, configured to receive, through the second long connection, a movement instruction sent by the building management platform when the first long connection reestablishment fails, where the movement instruction is used to instruct the target robot to reestablish the first long connection after moving to a target position; and moving to the target position according to the moving instruction, and rebuilding the first long connection at the target position.
The embodiment of the invention also provides a building management system which comprises the building management platform and at least one target robot.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the control method for the robot are implemented as described above.
Compared with the prior art, the robot control method, the robot control device and the building management system provided by the embodiment of the invention have the advantages that after the first long connection is interrupted and reconnected fails, the target robot is controlled to move to the area with better signal quality screened in advance through the second long connection, the success rate of reestablishing the first long connection by the target robot can be greatly improved, the communication reliability between the robot and the platform can be further improved, and the performance of the intelligent building management system is improved. In addition, the embodiment of the invention can adopt different task processing strategies according to different connection interruption time, thereby avoiding executing overdue tasks under the condition of overlong interruption time and improving the timeliness of executing the tasks of the robot.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without inventive labor.
Fig. 1 is a schematic control diagram of an intelligent building platform according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a control method of a robot according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a process for selecting a target location according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a connection reestablishment process according to an embodiment of the present invention;
fig. 5 is another schematic flow chart of a control method of a robot according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a control method for a robot according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a building management platform according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a building management platform according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a target robot according to an embodiment of the present invention;
fig. 10 is another schematic structural diagram of the target robot provided in the embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help the full understanding of the embodiments of the present invention. Thus, it will be apparent to those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
With the increasing aging of the population, the labor cost is higher and higher. Many property and building managers want to provide a high level of service, often at a high human cost. Therefore, in recent years, the service type robot market has been rapidly developed. In the near future, more and more service robots are used for replacing manual work to provide high-quality building services, and the intelligence, convenience and efficiency of buildings are improved.
As described in the background art, the control method for the robot in the intelligent building in the prior art generally has the problems that the design requirement for the robot is high, or the optimization of the robot and the related facilities for cooperative work is not facilitated, or the communication reliability between the robot and the cloud management platform is difficult to ensure. The embodiment of the invention provides a building management platform and system based on a service robot, which can connect various resources of the service robot, building infrastructure and building management personnel in a building, and issue decisions for all parties through data analysis, decision analysis and an artificial intelligence algorithm so as to achieve the maximum utilization of the resources and improve the operation efficiency through cooperative cooperation of all the parties.
As shown in fig. 1, the intelligent building platform can convert complex tasks into simple instructions by collecting multiple data, and finally transmit the simple instructions to each device. The devices do not need to have high intelligence, and the platform can convert the requirements input by the user into instructions for each device and then send the instructions to the corresponding devices. The various devices finish the complex building tasks finally by completing the instructions in sequence.
However, due to the moving characteristics of the mobile service type robot and network coverage problems within the building, the robot may have a network connection interrupted during the movement. Generally, the robot detects the connection status in real time by using heartbeat packets, and when the connection is found to be interrupted, the robot continuously tries to reconnect until the reconnection is successful. However, in actual operation, the inventor finds that the reconnection based on the heartbeat packet is not stable due to the network and the communication protocol. When the network is in poor condition, it is difficult to ensure connection even by repeated reconnection. The embodiment of the invention provides a method for assisting in strengthening stable connection between a robot and a cloud management platform by using cooperation of different communication protocols.
The embodiment of the invention provides a control method of a robot, which is applied to a building management platform in an intelligent building, and as shown in figure 2, the method comprises the following steps:
and step 21, establishing at least two wireless long connections based on different communication protocols with the target robot.
Here, in the embodiment of the present invention, at least two wireless long connections based on different communication protocols are established between the building management platform and the target robot, for example, the at least two wireless long connections may include a Websocket connection based on a web socket protocol (Websocket) and an MQTT connection based on a Message Queue Telemetry Transport (MQTT) protocol.
In particular, the at least two wireless long connections may comprise two connections, and the two connections are each based on a different communication protocol. For example, one of the connections may be a Websocket connection and the other a MQTT connection; or one of the connections is an MQTT connection, and the other connection is a Websocket connection. Of course, more wireless long connections between the building management platform and the target robot may be included, and these wireless long connections may be the same as or different from the above communication protocol. The embodiment of the present invention is not particularly limited to this.
And step 22, under the condition that the interruption of a first long connection in the at least two wireless long connections is detected, sending a reconnection instruction through a second long connection which keeps the connection state in the at least two wireless long connections, wherein the reconnection instruction is used for instructing the target robot to reestablish the first long connection.
Here, the embodiment of the present invention needs to detect whether each connection is interrupted, and a specific detection manner may be different detection and determination manners according to different connection manners (communication protocols), which is not specifically limited in this embodiment of the present invention.
After detecting an interruption of a connection (for ease of description, referred to as a first long connection), embodiments of the present invention send a reconnect instruction to the robot through the other connections (for ease of description, referred to as second long connections) that currently remain connected, instructing the target robot to reestablish the first long connection. Thus, the robot will attempt to reestablish the first long connection after receiving the reconnect command.
And 23, under the condition that the reconstruction of the first long connection fails, sending a moving instruction to the target robot through the second long connection, wherein the moving instruction is used for indicating the target robot to reconstruct the first long connection after moving to a target position.
Here, the first long connection between the building management platform and the intelligent robot may not be reestablished due to various factors (such as network coverage and hardware and software problems of the device), for example, the building management platform starts timing after sending the reconnect command in step 22, after the timing reaches a certain preset reconnect time threshold, if the first long connection is not reestablished successfully, it is determined that the reestablishment of the first long connection is failed, at this time, the building management platform sends a move command to the target robot through the second long connection, instructs the target robot to move to the target position, and continues to reestablish the first long connection after reaching the target position. Here, the target location is a location selected from a preset location list, at least one location is stored in the preset location list, and the locations are preset locations with a wireless signal quality better than a certain preset threshold in advance according to network coverage conditions in the intelligent building.
Through the steps, after the first long connection is interrupted and reconnection fails, the target robot is controlled to move to the area with better signal quality screened in advance through the second long connection, so that the success rate of the target robot in reestablishing the first long connection can be greatly improved, the communication reliability between the robot and the platform can be further improved, and the performance of the intelligent building management system is improved.
According to at least one embodiment of the present invention, in the step 23, sending a movement instruction to the target robot through the second long connection may specifically include, as shown in fig. 3:
in step 231, the first position of the target robot that was last acquired is determined.
Here, the building management platform acquires the last recorded position (referred to as the first position herein for convenience of description) of the target robot.
Step 232, calculating a moving cost from the first location to each preset location in the preset location list, and selecting at least one target location from the preset location list according to the moving cost, wherein the preset location list stores a plurality of locations with wireless signal coverage quality meeting preset conditions.
Here, the building management platform calculates a movement cost of the target robot from the first position to each preset position in the preset position list, specifically, the movement cost may be calculated according to a movement distance, specifically, the movement cost may be positively correlated with the movement distance, that is, the movement cost is larger when the movement distance is larger, and conversely, the movement cost is smaller when the movement distance is smaller.
For another example, the movement cost may also comprehensively consider the energy consumption required for moving to the preset position, for example, when the current remaining electric energy of the target robot is less than the preset threshold, the energy consumption for moving the target robot to the preset position is calculated, and according to the magnitude of the energy consumption, the position with smaller energy consumption is preferentially selected as the target position; and when the current residual electric energy of the target robot is larger than a preset threshold, calculating the moving distance of the target robot moving to a preset position, and preferentially selecting a position with a smaller moving distance as the target position according to the size of the moving distance.
In addition, the number of target positions selected here may be one, or two or more.
Step 233, sending a movement instruction carrying the at least one target position to the target robot through the second long connection.
Here, the movement instruction carries a target position, so that the target robot can move to the target position according to the movement instruction. In addition, the movement instruction also carries a movement priority of each target position, wherein the target position with higher movement priority has lower movement cost, such as lower movement distance or energy consumption.
As a specific implementation manner, the embodiment of the present invention selects multiple communication protocols according to different data transmission requirements. In practical applications, the robot generally needs to report real-time status information to the building management platform according to a certain frequency, and upload related sensor data (such as an environmental sensor) according to a certain frequency. Building equipment (such as elevators, access controls and the like) also needs to send real-time state information to the building management platform according to a certain frequency. Aiming at the data which is transmitted at high frequency and has lower requirement on the packet loss rate, the embodiment of the invention selects the MQTT protocol as the transmission protocol of the periodic data. In addition, after the building management platform makes a decision for each device through data analysis and a machine learning algorithm, the building management platform needs to send instruction information to the target device and receive a corresponding reply. For the data transmission related to the instruction information, the requirement on stability is high, and the data transmission is bidirectional, so that a WebSocket communication protocol can be selected for the data transmission to perform the data transmission.
In the actual use process, the inventor finds that the robot may move to an area with poor network signal coverage at any time to cause interruption of some communication protocols, and reconnection may fail all the time due to unstable network state of the current position, and finally the platform loses control over the reconnection. In order to improve the connection stability, the method provided by the embodiment of the invention utilizes the mutual cooperation of multiple transmission protocols, so that the network connection stability can be improved to a certain extent, and all communication protocol connections between the robot and the platform are ensured to be in a connection state. The method is suitable for WIFI, 4G and 5G networks and is not influenced by network forms.
Generally, there is a certain probability that at least one of the plurality of communication protocols remains connected when the network conditions are poor. Therefore, the disconnected communication protocol connection can be assisted by the communication protocol still in connection, and the stability of the device and the cloud connection is improved.
According to at least one embodiment of the present invention, when the first long connection is a Websocket connection and the second long connection is an MQTT connection, the sending the reconnection instruction through the second long connection in step 23 may specifically include:
A) when the reconnection instruction needs to be sent to a plurality of robots, issuing the reconnection instruction to a first URL (uniform resource locator) of a preset MQTT message middleware server, wherein the first URL is a URL which is commonly subscribed by the robots, and the robots comprise the target robot;
B) when the target robot is only required to send the reconnection instruction, issuing the reconnection instruction to a second URL of a preset MQTT message middleware server, wherein the second URL is a URL to which the target robot subscribes independently.
According to another embodiment of the present invention, in the case that the first long connection is an MQTT connection and the second long connection is a Websocket connection, the sending the reconnection command in step 23 may include: and sending a reconnecting instruction in a JSON format to the target robot through Websocket connection.
For example, when the Websocket connection is interrupted, but the MQTT connection is still maintained, a reconnect instruction may be broadcast over the MQTT connection to help the robot reconnect the Websocket. MQTT delivers information using publish/subscribe means. The subscriber needs to subscribe to a related topic (topic), and can obtain the corresponding data under the topic. The embodiment of the invention designs two URLs which are respectively as follows: and/device _ type/verb and/device _ type/id/verb. The/device _ type/verberb is used to represent the verb associated with the instruction when broadcast is required to the same type of device. When only a certain device needs to be notified, the/device _ type/id/verb is used. Thus, the related devices can acquire all information related to the related devices by only subscribing/device _ type/# and/device _ type/id/#.
For another example, when the MQTT connection is interrupted and the WebSocket connection is still maintained, the WebSocket may be used to send a reconnect instruction to the device. The data packet uses the JSON format.
Thus, after one of the connections is broken, the present invention uses the above procedure for reconnection. When a communication protocol connection interruption is detected, a retransmission is sent using another protocol still connectedAnd (4) connecting information. After waiting for a preset time, judging whether connection is carried out or not, if not, according to the previously defined interest point PoI with a signal comparison sign, P ═ P0,…,pmAnd finding the nearest PoI according to the sequence from near to far, and sending a moving instruction to the target robot to move the target robot to the specified position. And after the robot reaches the designated position, sending a reconnection instruction, and repeating the steps in sequence until the robot is connected to the server or all the target positions are tried and reconnected unsuccessfully.
According to at least one embodiment of the present invention, as shown in fig. 4, after the step 23, the method may further include:
and 24, the building management platform receives a reestablishment request for reestablishing the first long connection sent by the target robot, and responds to the reestablishment request to reestablish the first long connection.
Through the above step 24, the first establishment between the building management platform and the target robot is successfully reestablished, thereby improving the reliability of the connection and communication between the devices.
After the step 24 of successfully reestablishing the first long connection, as shown in fig. 5, the method may further include:
and 25, acquiring a task list of tasks to be executed of the target robot, which is stored by the cloud building management platform, wherein the task list comprises at least one task which arrives in sequence according to the time sequence.
And 26, calculating the interruption time according to the earliest arrival time of the earliest arrival task in the task list and the reconstruction completion time of the reconstruction completion of the first long connection.
Here, the interruption time may be obtained by calculating a difference between the reconstruction completion time and the earliest arrival time.
And 27, judging whether the interruption time is greater than a preset time threshold value.
And step 28, in the case that the interruption time is greater than the time threshold, sending the task which is arrived most recently in the task list to the target robot to execute.
And step 29, sending all the tasks in the task list to the target robot to execute under the condition that the interruption time is not greater than the time threshold.
Generally, the building management platform stores a message list of each device, and is used for storing tasks to be completed, which are sent to the devices by the platform according to the arrival sequence
Figure BDA0002381963660000121
When the robot is disconnected and is recovered for a period of time, judging the interruption time:
Figure BDA0002381963660000122
if Δ t ≦ Tx, indicating that the interrupt time is less than the time threshold Tx, then
Figure BDA0002381963660000123
To
Figure BDA0002381963660000124
And sequentially executing the tasks to be completed. If Δ tk>Tx, if the interruption time exceeds the time threshold, then directly executing
Figure BDA0002381963660000125
And deleting the tasks and other tasks. t is tnowIndicating the time at which the first long connection re-establishment is complete,
Figure BDA0002381963660000126
to represent
Figure BDA0002381963660000127
The arrival time of (c).
Therefore, the embodiment of the invention can adopt different task processing strategies according to different interrupt time, avoids executing overdue tasks under the condition of overlong interrupt time, and improves the timeliness of executing the tasks of the robot.
There is also provided, in accordance with at least one embodiment of the present invention, a method for controlling a robot as shown in fig. 5, the method being applied to a building management platform that has established at least two wireless connections with a target robot based on different communication protocols, the building management platform being capable of periodically executing a process shown in fig. 5, as shown in fig. 5, the process including:
step 31, detecting the connection state between the building management platform and the target robot;
step 32, when all the long connections are in the connection state, ending the process; when the connection state of a certain long connection (assumed as a first long connection) indicates that the long connection is interrupted, transmitting a reestablishment instruction for reestablishing the first long connection to the target robot through the long connection (assumed as a second long connection) that additionally maintains the connection state;
and step 33, after waiting for a preset length of time, detecting whether the first long connection is successful, if so, ending the process, otherwise, sending a moving instruction to the target robot, wherein the moving instruction is used for indicating the target robot to move to a preset target position with better wireless signal coverage quality.
And step 34, after the target robot moves to the target position, returning to step 33, and retransmitting the reconstruction instruction for reconstructing the first long connection to the target robot.
By executing the above steps circularly, the target robot can be controlled to move to each target position in turn according to the priority order of the target positions and reestablish the first connection until the connection establishment is successful or all the target positions fail to be tried. In addition, the priority of each target position may be set according to factors such as the quality of wireless signals of the target position and the cost of moving the target robot to the target position.
The above description of the embodiments of the present invention is made from the building management platform side. The following further explains the target robot.
Referring to fig. 6, a control method of a robot according to an embodiment of the present invention is applied to a target robot, and includes:
and step 51, establishing at least two wireless long connections based on different communication protocols with the building management platform.
And step 52, receiving a reconnect instruction sent by the building management platform through a second long connection which keeps a connection state in the at least two wireless long connections when a first long connection in the at least two wireless long connections is interrupted, wherein the reconnect instruction is used for instructing the target robot to reestablish the first long connection.
And 53, under the condition that the first long connection is failed to be reestablished, receiving a moving instruction sent by the building management platform through the second long connection, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to a target position.
And step 54, moving to the target position according to the moving instruction, and rebuilding the first long connection at the target position.
Through the steps, the embodiment of the invention can control the target robot to move to the preset target position through the second long connection under the condition that the first long connection is interrupted and the reconstruction fails, and then reestablish the first long connection, so that the reconstruction success rate of the first long connection can be greatly improved, the communication reliability between the robot and the platform can be improved, and the performance of the intelligent building management system is improved.
According to at least one embodiment of the present invention, the move instruction in step 53 carries at least one target location and a move priority of each target location. In the step 54, the target robot may move to each target position in sequence according to the order of the moving priorities, try to reestablish the first long connection after moving to each target position, stop moving to the next target position if the reestablishment is successful, or continue moving to the next target position with the highest priority and reestablish the first long connection at the next target position until the reestablishment is successful or all the target positions are reestablished unsuccessfully.
According to at least one embodiment of the invention, the at least two wireless long connections may comprise a Websocket connection and an MQTT connection.
For example, when the first long connection is a Websocket connection and the second long connection is an MQTT connection, the receiving, in step 53, the reconnecting instruction sent by the building management platform through the second long connection may specifically include:
A) subscribing to a topic under a first URL and a second URL, the first URL being a URL to which a plurality of robots are commonly subscribed, the plurality of robots including the target robot, the second URL being a URL to which the target robot is individually subscribed;
B) and receiving information which is issued to the first URL and/or the second URL by the building management platform to obtain a reconnection instruction sent by the building management platform.
For another example, when the first long connection is an MQTT connection and the second long connection is a Websocket connection, the receiving, in step 53, the reconnect instruction sent by the building management platform through the second long connection may specifically include: and receiving a JSON format reconnection instruction sent by the building management platform through Websocket connection.
Based on the control method of the robot, the embodiment of the invention also provides a device for implementing the method.
Referring to fig. 7, a building management platform 60 according to an embodiment of the present invention includes:
a connection establishing unit 61 for establishing at least two wireless long connections with the target robot based on different communication protocols;
an instruction sending unit 62, configured to send a reconnection instruction through a second long connection that maintains a connection state in the at least two wireless long connections when it is detected that a first long connection in the at least two wireless long connections is interrupted, where the reconnection instruction is used to instruct the target robot to reestablish the first long connection;
and a reconnection control unit 63, configured to send a movement instruction to the target robot through the second long connection when the first long connection is failed to be reestablished, where the movement instruction is used to instruct the target robot to reestablish the first long connection after moving to the target position.
According to at least one embodiment of the present invention, the instruction sending unit is further configured to:
determining a first position of the target robot that was last acquired;
calculating the moving cost from the first position to each preset position in the preset position list, and selecting at least one target position from the preset position list according to the moving cost, wherein the preset position list stores a plurality of positions with wireless signal coverage quality meeting preset conditions;
and sending a movement instruction carrying the at least one target position to the target robot through the second long connection.
According to at least one embodiment of the present invention, the move instruction further carries a move priority for each target location, wherein a target location with a higher move priority has a lower move cost.
According to at least one embodiment of the present invention, the reconnection control unit is further configured to receive a reestablishment request for reestablishing the first long connection sent by the target robot after sending the movement instruction, and reestablish the first long connection in response to the reestablishment request.
According to at least one embodiment of the invention, the building management platform further comprises:
the task issuing unit is used for acquiring a task list of tasks to be executed of the target robot, which is stored by the cloud building management platform, after the first long connection is successfully reestablished, wherein the task list comprises at least one task which arrives in sequence according to the time sequence; calculating interruption time according to the earliest arrival time of the earliest arrival task in the task list and the reconstruction completion time of the reconstruction completion of the first long connection;
judging whether the interruption time is greater than a preset time threshold value or not;
sending the task which is arrived most recently in the task list to the target robot to execute under the condition that the interruption time is larger than the time threshold;
and sending all tasks in the task list to the target robot to execute under the condition that the interruption time is not greater than the time threshold.
According to at least one embodiment of the invention, the at least two wireless long connections comprise a Websocket connection and a message queue telemetry transport MQTT connection.
According to at least one embodiment of the present invention, in a case where the first long connection is a Websocket connection and the second long connection is an MQTT connection, the instruction sending unit is further configured to:
when the reconnection instruction needs to be sent to a plurality of robots, issuing the reconnection instruction to a first URL (uniform resource locator) of a preset MQTT message middleware server, wherein the first URL is a URL which is commonly subscribed by the robots, and the robots comprise the target robot;
when the target robot is only required to send the reconnection instruction, issuing the reconnection instruction to a second URL of a preset MQTT message middleware server, wherein the second URL is a URL to which the target robot subscribes independently.
According to at least one embodiment of the present invention, in a case where the first long connection is an MQTT connection and the second long connection is a Websocket connection, the instruction sending unit is further configured to:
and sending a reconnecting instruction in a JSON format to the target robot through Websocket connection.
Through the building management platform, the embodiment of the invention can improve the communication reliability between the robot and the platform and improve the performance of the intelligent building management system.
As shown in fig. 8, an embodiment of the present invention also provides another building management platform 70, where the building management platform 70 specifically includes a processor 71, a memory 72, a bus system 73, a receiver 74, and a transmitter 75. Wherein, the processor 71, the memory 72, the receiver 74 and the transmitter 75 are connected by a bus system 73, the memory 72 is used for storing instructions, the processor 71 is used for executing the instructions stored in the memory 72 to control the receiver 74 to receive signals and control the transmitter 75 to transmit signals;
wherein, the processor 71 is configured to read a program in the memory, and execute the following processes:
establishing at least two wireless long connections with a target robot based on different communication protocols;
under the condition that the interruption of a first long connection in the at least two wireless long connections is detected, sending a reconnection instruction through a second long connection which keeps a connection state in the at least two wireless long connections, wherein the reconnection instruction is used for instructing the target robot to reestablish the first long connection;
and under the condition that the first long connection is failed to be reestablished, sending a moving instruction to the target robot through the second long connection, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to the target position.
It should be understood that, in the embodiment of the present invention, the processor 71 may be a Central Processing Unit (CPU), and the processor 71 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 72 may include both read-only memory and random access memory, and provides instructions and data to the processor 71. A portion of the memory 72 may also include non-volatile random access memory. For example, the memory 72 may also store device type information.
The bus system 73 may include a power bus, a control bus, a status signal bus, and the like, in addition to the data bus. But for clarity of illustration the various buses are labeled in the figure as bus system 73.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 71. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 72, and the processor 71 reads the information in the memory 72 and performs the steps of the above method in combination with hardware thereof. To avoid repetition, it is not described in detail here.
According to at least one embodiment of the invention, the program when executed by the processor 71 may further implement the steps of:
determining a first position of the target robot that was last acquired;
calculating the moving cost from the first position to each preset position in the preset position list, and selecting at least one target position from the preset position list according to the moving cost, wherein the preset position list stores a plurality of positions with wireless signal coverage quality meeting preset conditions;
and sending a movement instruction carrying the at least one target position to the target robot through the second long connection.
According to at least one embodiment of the present invention, the move instruction further carries a move priority for each target location, wherein a target location with a higher move priority has a lower move cost.
According to at least one embodiment of the invention, the program when executed by the processor 71 may further implement the steps of:
and receiving a reestablishment request for reestablishing the first long connection sent by the target robot, and responding to the reestablishment request to reestablish the first long connection.
According to at least one embodiment of the invention, the program when executed by the processor 71 may further implement the steps of:
acquiring a task list of tasks to be executed of the target robot, which is stored by a cloud building management platform, wherein the task list comprises at least one task which arrives in sequence according to a time sequence;
calculating interruption time according to the earliest arrival time of the earliest arrival task in the task list and the reconstruction completion time of the reconstruction completion of the first long connection;
judging whether the interruption time is greater than a preset time threshold value or not;
sending the task which is arrived most recently in the task list to the target robot to execute under the condition that the interruption time is larger than the time threshold;
and sending all tasks in the task list to the target robot to execute under the condition that the interruption time is not greater than the time threshold.
According to at least one embodiment of the invention, the at least two wireless long connections comprise a Websocket connection and a message queue telemetry transport MQTT connection.
According to at least one embodiment of the invention, the program when executed by the processor 71 may further implement the steps of:
when the first long connection is a Websocket connection and the second long connection is an MQTT connection, when the reconnection instruction needs to be sent to a plurality of robots, the reconnection instruction is issued to a first URL of a preset MQTT message middleware server, the first URL is a URL which is commonly subscribed by the plurality of robots, and the plurality of robots comprise the target robot;
when the target robot is only required to send the reconnection instruction, issuing the reconnection instruction to a second URL of a preset MQTT message middleware server, wherein the second URL is a URL to which the target robot subscribes independently.
According to at least one embodiment of the invention, the program when executed by the processor 71 may further implement the steps of:
and sending a JSON format reconnection instruction to the target robot through Websocket connection under the condition that the first long connection is MQTT connection and the second long connection is Websocket connection.
In some embodiments of the invention, there is also provided a computer readable storage medium having a program stored thereon, which when executed by a processor, performs the steps of:
establishing at least two wireless long connections with a target robot based on different communication protocols;
under the condition that the interruption of a first long connection in the at least two wireless long connections is detected, sending a reconnection instruction through a second long connection which keeps a connection state in the at least two wireless long connections, wherein the reconnection instruction is used for instructing the target robot to reestablish the first long connection;
and under the condition that the first long connection is failed to be reestablished, sending a moving instruction to the target robot through the second long connection, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to the target position.
When executed by the processor, the program can implement all implementation manners in the control method of the robot shown in fig. 2, and can achieve the same technical effect, and is not described herein again to avoid repetition.
Referring to fig. 9, an embodiment of the invention provides a target robot 80, including:
a connection establishing unit 81, configured to establish at least two wireless long connections with the building management platform based on different communication protocols;
an instruction receiving unit 82, configured to receive, through a second long connection that maintains a connection state in the at least two wireless long connections, a reconnect instruction sent by the building management platform when a first long connection in the at least two wireless long connections is interrupted, where the reconnect instruction is used to instruct the target robot to reestablish the first long connection;
a connection reestablishing unit 83, configured to receive, through the second long connection, a movement instruction sent by the building management platform when the first long connection reestablishment fails, where the movement instruction is used to instruct the target robot to reestablish the first long connection after moving to the target position; and moving to the target position according to the moving instruction, and rebuilding the first long connection at the target position.
Through the target robot, the embodiment of the invention can improve the communication reliability between the robot and the platform and improve the performance of the intelligent building management system.
According to at least one embodiment of the present invention, the move instruction carries at least one target location and a move priority of each target location;
the connection reestablishment unit is further configured to:
and sequentially moving to each target position according to the sequence of the moving priorities, trying to rebuild the first long connection after moving to one target position, stopping moving to the next target position if the rebuilding is successful, or continuing moving to the target position with the highest next priority and rebuilding the first long connection at the next target position until the rebuilding is successful or all the target positions are rebuilt unsuccessfully.
According to at least one embodiment of the invention, the at least two wireless long connections comprise a Websocket connection and a message queue telemetry transport MQTT connection.
According to at least one embodiment of the present invention, in a case where the first long connection is a Websocket connection and the second long connection is an MQTT connection, the instruction receiving unit is further configured to:
subscribing to a topic under a first URL and a second URL, the first URL being a URL to which a plurality of robots are commonly subscribed, the plurality of robots including the target robot, the second URL being a URL to which the target robot is individually subscribed;
and receiving information which is issued to the first URL and/or the second URL by the building management platform to obtain a reconnection instruction sent by the building management platform.
According to at least one embodiment of the present invention, in a case where the first long connection is an MQTT connection and the second long connection is a Websocket connection, the instruction receiving unit is further configured to:
and receiving a JSON format reconnection instruction sent by the building management platform through Websocket connection.
As shown in fig. 10, the embodiment of the present invention further provides another target robot 90, and the target robot 90 specifically includes a processor 91, a memory 92, a bus system 93, a receiver 94, and a transmitter 95. Wherein, the processor 91, the memory 92, the receiver 94 and the transmitter 95 are connected by a bus system 93, the memory 92 is used for storing instructions, the processor 91 is used for executing the instructions stored in the memory 92 to control the receiver 94 to receive signals and control the transmitter 95 to transmit signals;
the processor 91 is configured to read a program in the memory, and execute the following processes:
establishing at least two wireless long connections with a building management platform based on different communication protocols;
under the condition that a first long connection in the at least two wireless long connections is interrupted, receiving a reconnection instruction sent by the building management platform through a second long connection which keeps a connection state in the at least two wireless long connections, wherein the reconnection instruction is used for instructing the target robot to reestablish the first long connection;
under the condition that the first long connection is failed to be reestablished, receiving a moving instruction sent by the building management platform through the second long connection, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to a target position;
and moving to the target position according to the moving instruction, and rebuilding the first long connection at the target position.
It should be understood that, in the embodiment of the present invention, the processor 91 may be a Central Processing Unit (CPU), and the processor 91 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 92 may include a read-only memory and a random access memory, and provides instructions and data to the processor 91. A portion of memory 92 may also include non-volatile random access memory. For example, memory 92 may also store device type information.
The bus system 93 may include a power bus, a control bus, a status signal bus, and the like, in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 93 in the figures.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 91. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 92, and the processor 91 reads the information in the memory 92 and performs the steps of the above method in combination with the hardware thereof. To avoid repetition, it is not described in detail here.
The moving instruction carries at least one target position and the moving priority of each target position; according to at least one embodiment of the invention, the program when executed by the processor 91 may further implement the steps of: and sequentially moving to each target position according to the sequence of the moving priorities, trying to rebuild the first long connection after moving to one target position, stopping moving to the next target position if the rebuilding is successful, or continuing moving to the target position with the highest next priority and rebuilding the first long connection at the next target position until the rebuilding is successful or all the target positions are rebuilt unsuccessfully.
According to at least one embodiment of the invention, the at least two wireless long connections comprise a Websocket connection and a message queue telemetry transport MQTT connection.
According to at least one embodiment of the invention, the program when executed by the processor 91 may further implement the steps of:
subscribing topics under a first URL and a second URL under the condition that the first long connection is a Websocket connection and the second long connection is an MQTT connection, wherein the first URL is a URL which is commonly subscribed by a plurality of robots, the plurality of robots comprise the target robot, and the second URL is a URL which is individually subscribed by the target robot;
and receiving information which is issued to the first URL and/or the second URL by the building management platform to obtain a reconnection instruction sent by the building management platform.
According to at least one embodiment of the invention, the program when executed by the processor 91 may further implement the steps of:
and receiving a JSON format reconnection instruction sent by the building management platform through the Websocket connection under the condition that the first long connection is an MQTT connection and the second long connection is a Websocket connection.
In some embodiments of the invention, there is also provided a computer readable storage medium having a program stored thereon, which when executed by a processor, performs the steps of:
establishing at least two wireless long connections with a building management platform based on different communication protocols;
under the condition that a first long connection in the at least two wireless long connections is interrupted, receiving a reconnection instruction sent by the building management platform through a second long connection which keeps a connection state in the at least two wireless long connections, wherein the reconnection instruction is used for instructing the target robot to reestablish the first long connection;
under the condition that the first long connection is failed to be reestablished, receiving a moving instruction sent by the building management platform through the second long connection, wherein the moving instruction is used for indicating the target robot to reestablish the first long connection after moving to a target position;
and moving to the target position according to the moving instruction, and rebuilding the first long connection at the target position.
When executed by the processor, the program can implement all implementation manners in the control method of the robot shown in fig. 5, and can achieve the same technical effect, and is not described herein again to avoid repetition.
Finally, the embodiment of the invention also provides a building management system, which comprises the building management platform and at least one target robot.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (16)

1.一种机器人的控制方法,应用于楼宇管理平台,其特征在于,包括:1. a control method of a robot, applied to a building management platform, is characterized in that, comprising: 建立与目标机器人之间的基于不同通信协议的至少两条无线长连接;Establish at least two long wireless connections with the target robot based on different communication protocols; 在检测到所述至少两条无线长连接中的第一长连接发生中断的情况下,通过所述至少两条无线长连接中保持连接状态的第二长连接发送重连指令,所述重连指令用于指示所述目标机器人重建所述第一长连接;In the case where it is detected that the first long connection in the at least two long wireless connections is interrupted, a reconnection instruction is sent through the second long connection in the at least two long wireless connections in the connected state, and the reconnection The instruction is used to instruct the target robot to rebuild the first long connection; 在所述第一长连接重建失败的情况下,通过所述第二长连接向所述目标机器人发送移动指令,所述移动指令用于指示所述目标机器人移动至目标位置后重建所述第一长连接。In the case that the reconstruction of the first long connection fails, send a movement instruction to the target robot through the second long connection, where the movement instruction is used to instruct the target robot to move to a target position and then rebuild the first Long connection. 2.如权利要求1所述的方法,其特征在于,通过所述第二长连接向所述目标机器人发送移动指令的步骤,包括:2. The method of claim 1, wherein the step of sending a movement instruction to the target robot through the second long connection comprises: 确定最近一次获取的所述目标机器人的第一位置;determining the most recently acquired first position of the target robot; 计算从所述第一位置去往所述预设位置列表中各个预设位置的移动成本,根据所述移动成本,从所述预设位置列表中选择出至少一个目标位置,其中,所述预设位置列表中保存为无线信号覆盖质量满足预设条件的多个位置;Calculate the moving cost from the first position to each preset position in the preset position list, and select at least one target position from the preset position list according to the moving cost, wherein the preset position Set the location list to be saved as multiple locations where the wireless signal coverage quality meets the preset conditions; 通过所述第二长连接,向所述目标机器人发送携带有所述至少一个目标位置的移动指令。Through the second long connection, a movement instruction carrying the at least one target position is sent to the target robot. 3.如权利要求2所述的方法,其特征在于,所述移动指令还携带有每个目标位置的移动优先级,其中,移动优先级较高的目标位置具有较低的移动成本。3. The method of claim 2, wherein the moving instruction further carries a moving priority of each target position, wherein a target position with a higher moving priority has a lower moving cost. 4.如权利要求2所述的方法,其特征在于,在发送所述移动指令之后,所述方法还包括:4. The method of claim 2, wherein after sending the movement instruction, the method further comprises: 接收到所述目标机器人发送的重建第一长连接的重建请求,响应所述重建请求,重建所述第一长连接。Receive a re-establishment request for re-establishing the first persistent connection sent by the target robot, and re-establish the first persistent connection in response to the re-establishment request. 5.如权利要求4所述的方法,其特征在于,在成功重建所述第一长连接之后,所述方法还包括:5. The method of claim 4, wherein after successfully re-establishing the first long connection, the method further comprises: 获取云端楼宇管理平台保存的所述目标机器人的待执行任务的任务列表,所述任务列表包括有按照时间顺序先后到达的至少一个任务;Acquiring a task list of tasks to be performed of the target robot saved by the cloud building management platform, where the task list includes at least one task that arrives in chronological order; 根据所述任务列表中的最早到达任务的最早到达时间,以及,所述第一长连接重建完成的重建完成时间,计算中断时间;Calculate the interruption time according to the earliest arrival time of the earliest arriving task in the task list, and the reconstruction completion time after the first long connection reconstruction is completed; 判断所述中断时间是否大于预设的时间阈值;judging whether the interruption time is greater than a preset time threshold; 在所述中断时间大于所述时间阈值的情况下,将所述任务列表中的最近一个到达的任务发送给所述目标机器人去执行;In the case that the interruption time is greater than the time threshold, send the latest arriving task in the task list to the target robot for execution; 在所述中断时间不大于所述时间阈值的情况下,将所述任务列表中的全部任务发送给所述目标机器人去执行。Under the condition that the interruption time is not greater than the time threshold, all tasks in the task list are sent to the target robot for execution. 6.如权利要求1至5任一项所述的方法,其特征在于,所述至少两条无线长连接包括网络套接字Websocket连接和消息队列遥测传输MQTT连接。6. The method according to any one of claims 1 to 5, wherein the at least two long-term wireless connections include a network socket Websocket connection and a message queue telemetry transmission MQTT connection. 7.如权利要求6所述的方法,其特征在于,7. The method of claim 6, wherein 在所述第一长连接为Websocket连接,所述第二长连接为MQTT连接的情况下,通过所述第二长连接发送所述重连指令的步骤,包括:When the first persistent connection is a Websocket connection and the second persistent connection is an MQTT connection, the step of sending the reconnection instruction through the second persistent connection includes: 在需要向多个机器人发送所述重连指令时,通过发布所述重连指令到预设的MQTT消息中间件服务器的第一URL下,所述第一URL是所述多个机器人共同订阅的URL,所述多个机器人包括所述目标机器人;When the reconnection instruction needs to be sent to multiple robots, the reconnection instruction is published to a preset first URL of the MQTT message middleware server, where the first URL is jointly subscribed by the multiple robots URL, the plurality of robots includes the target robot; 在仅需要所述目标机器人发送所述重连指令时,通过发布所述重连指令到预设的MQTT消息中间件服务器的第二URL下,所述第二URL是所述目标机器人单独订阅的URL。When only the target robot is required to send the reconnection instruction, the reconnection instruction is published to the second URL of the preset MQTT message middleware server, and the second URL is subscribed by the target robot alone URL. 8.如权利要求6所述的方法,其特征在于,在所述第一长连接为MQTT连接,所述第二长连接为Websocket连接的情况下,发送所述重连指令的步骤,包括:8. The method according to claim 6, wherein, when the first persistent connection is an MQTT connection and the second persistent connection is a Websocket connection, the step of sending the reconnection instruction comprises: 通过Websocket连接,向所述目标机器人发送JSON格式的重连指令。Through the Websocket connection, a reconnection command in JSON format is sent to the target robot. 9.一种机器人的控制方法,应用于目标机器人,其特征在于,包括:9. A control method of a robot, applied to a target robot, is characterized in that, comprising: 建立与楼宇管理平台之间的基于不同通信协议的至少两条无线长连接;Establish at least two long wireless connections with the building management platform based on different communication protocols; 在所述至少两条无线长连接中的第一长连接发生中断的情况下,通过所述至少两条无线长连接中保持连接状态的第二长连接,接收所述楼宇管理平台发送的重连指令,所述重连指令用于指示所述目标机器人重建所述第一长连接;In the case where the first long connection in the at least two long wireless connections is interrupted, receive the reconnection sent by the building management platform through the second long connection in the at least two long wireless connections that remains connected an instruction, the reconnection instruction is used to instruct the target robot to rebuild the first long connection; 在所述第一长连接重建失败的情况下,通过所述第二长连接,接收所述楼宇管理平台发送的移动指令,所述移动指令用于指示所述目标机器人移动至目标位置后重建所述第一长连接;In the case that the reconstruction of the first long-term connection fails, a movement instruction sent by the building management platform is received through the second long-term connection, where the movement command is used to instruct the target robot to move to the target position and then rebuild all the first long connection; 根据所述移动指令,移动至所述目标位置,并在所述目标位置处重建所述第一长连接。According to the movement instruction, move to the target position, and rebuild the first long connection at the target position. 10.如权利要求9所述的方法,其特征在于,所述移动指令携带有至少一个目标位置以及每个目标位置的移动优先级;10. The method of claim 9, wherein the movement instruction carries at least one target position and a movement priority of each target position; 根据所述移动指令,移动至所述目标位置,并在所述目标位置处重建所述第一长连接的步骤,包括:The step of moving to the target position according to the movement instruction, and rebuilding the first long connection at the target position, includes: 按照所述移动优先级的高低顺序,依次移动到各个目标位置,并在每移动至一个目标位置后,尝试重建所述第一长连接,若重建成功,则停止移动至下一个目标位置,否则,继续移动至下一个优先级最高的目标位置并在下一个目标位置重建所述第一长连接,直至重建成功或者所有的目标位置均已重建失败。Move to each target position in sequence according to the order of the moving priority, and try to rebuild the first long connection after each move to a target position. If the reconstruction is successful, stop moving to the next target position, otherwise , continue to move to the next target position with the highest priority and rebuild the first long connection at the next target position, until the reconstruction succeeds or all target positions have failed to be reconstructed. 11.如权利要求9或10所述的方法,所述至少两条无线长连接包括网络套接字Websocket连接和消息队列遥测传输MQTT连接。11. The method of claim 9 or 10, wherein the at least two wireless persistent connections include a Websocket connection and a Message Queuing Telemetry Transport (MQTT) connection. 12.如权利要求11所述的方法,其特征在于,12. The method of claim 11, wherein 在所述第一长连接为Websocket连接,所述第二长连接为MQTT连接的情况下,通过所述第二长连接接收所述楼宇管理平台发送的重连指令的步骤,包括:When the first persistent connection is a Websocket connection and the second persistent connection is an MQTT connection, the step of receiving a reconnection instruction sent by the building management platform through the second persistent connection includes: 订阅第一URL和第二URL下的主题,所述第一URL是多个机器人共同订阅的URL,所述多个机器人包括所述目标机器人,所述第二URL是所述目标机器人单独订阅的URL;Subscribing to topics under a first URL and a second URL, where the first URL is a URL commonly subscribed by multiple robots, the multiple robots include the target robot, and the second URL is subscribed by the target robot alone URL; 接收所述楼宇管理平台发布到所述第一URL和/或第二URL的信息,得到所述楼宇管理平台发送的重连指令。Receive the information published by the building management platform to the first URL and/or the second URL, and obtain a reconnection instruction sent by the building management platform. 13.如权利要求11所述的方法,其特征在于,13. The method of claim 11, wherein 在所述第一长连接为MQTT连接,所述第二长连接为Websocket连接的情况下,通过所述第二长连接接收所述楼宇管理平台发送的重连指令的步骤,包括:When the first persistent connection is an MQTT connection and the second persistent connection is a Websocket connection, the step of receiving a reconnection instruction sent by the building management platform through the second persistent connection includes: 通过Websocket连接,接收所述楼宇管理平台发送的JSON格式的重连指令。Through the Websocket connection, the reconnection instruction in JSON format sent by the building management platform is received. 14.一种楼宇管理平台,其特征在于,包括:14. A building management platform, comprising: 连接建立单元,建立与目标机器人之间的基于不同通信协议的至少两条无线长连接;The connection establishment unit establishes at least two long wireless connections with the target robot based on different communication protocols; 指令发送单元,用于在检测到所述至少两条无线长连接中的第一长连接发生中断的情况下,通过所述至少两条无线长连接中保持连接状态的第二长连接发送重连指令,所述重连指令用于指示所述目标机器人重建所述第一长连接;an instruction sending unit, configured to send a reconnection through the second long connection in the at least two long wireless connections in the case of detecting that the first long connection in the at least two long wireless connections is interrupted an instruction, the reconnection instruction is used to instruct the target robot to rebuild the first long connection; 重连控制单元,用于在所述第一长连接重建失败的情况下,通过所述第二长连接向所述目标机器人发送移动指令,所述移动指令用于指示所述目标机器人移动至目标位置后重建所述第一长连接。A reconnection control unit, configured to send a movement instruction to the target robot through the second long connection in the case that the reconstruction of the first long connection fails, where the movement instruction is used to instruct the target robot to move to the target Rebuild the first long connection after the location. 15.一种目标机器人,其特征在于,包括:15. A target robot, comprising: 连接建立单元,用于建立与楼宇管理平台之间的基于不同通信协议的至少两条无线长连接;A connection establishment unit, used for establishing at least two long wireless connections with the building management platform based on different communication protocols; 指令接收单元,用于在所述至少两条无线长连接中的第一长连接发生中断的情况下,通过所述至少两条无线长连接中保持连接状态的第二长连接,接收所述楼宇管理平台发送的重连指令,所述重连指令用于指示所述目标机器人重建所述第一长连接;an instruction receiving unit, configured to receive the building through the second long connection in the at least two long wireless connections that maintains the connected state when the first long connection in the at least two long wireless connections is interrupted A reconnection instruction sent by the management platform, where the reconnection instruction is used to instruct the target robot to rebuild the first long connection; 连接重建单元,用于在所述第一长连接重建失败的情况下,通过所述第二长连接,接收所述楼宇管理平台发送的移动指令,所述移动指令用于指示所述目标机器人移动至目标位置后重建所述第一长连接;根据所述移动指令,移动至所述目标位置,并在所述目标位置处重建所述第一长连接。A connection reconstruction unit, configured to receive a movement instruction sent by the building management platform through the second long connection when the first long connection fails to be reestablished, where the movement instruction is used to instruct the target robot to move Rebuild the first long connection after reaching the target position; move to the target position according to the movement instruction, and rebuild the first long connection at the target position. 16.一种楼宇管理系统,其特征在于,包括如权利要求14所述的楼宇管理平台,以及,如权利要求15所述的至少一个目标机器人。16. A building management system, comprising the building management platform as claimed in claim 14, and at least one target robot as claimed in claim 15.
CN202010085761.7A 2020-02-11 2020-02-11 Robot control method, equipment and building management system Active CN113246117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010085761.7A CN113246117B (en) 2020-02-11 2020-02-11 Robot control method, equipment and building management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010085761.7A CN113246117B (en) 2020-02-11 2020-02-11 Robot control method, equipment and building management system

Publications (2)

Publication Number Publication Date
CN113246117A true CN113246117A (en) 2021-08-13
CN113246117B CN113246117B (en) 2023-08-22

Family

ID=77219635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010085761.7A Active CN113246117B (en) 2020-02-11 2020-02-11 Robot control method, equipment and building management system

Country Status (1)

Country Link
CN (1) CN113246117B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113741297A (en) * 2021-09-10 2021-12-03 北京京东乾石科技有限公司 Task processing method, device and system for multiple robots and robot
CN114339469A (en) * 2021-12-23 2022-04-12 锐迪科创微电子(北京)有限公司 MQTT communication method, device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1331759A1 (en) * 2002-01-24 2003-07-30 Alcatel Canada Inc. System and method for providing management of communication links connecting components in a network element
JP2008242968A (en) * 2007-03-28 2008-10-09 Secom Co Ltd Remote monitoring system
CN101605108A (en) * 2009-07-15 2009-12-16 阿里巴巴集团控股有限公司 A kind of method, system and device of instant messaging
CN102763087A (en) * 2011-06-28 2012-10-31 华为技术有限公司 Method and system for realizing interconnection fault-tolerance between cpus
CN103416085A (en) * 2012-11-26 2013-11-27 华为技术有限公司 Communication recovery method, apparatus and system
CN106534260A (en) * 2016-10-09 2017-03-22 电子科技大学 Three-layer state machine-based internet-of-things equipment communication method
CN108664349A (en) * 2018-05-18 2018-10-16 上海商米科技有限公司 Reconnection method and device, storage medium, the processor of double screen terminal
CN108702694A (en) * 2016-01-22 2018-10-23 三星电子株式会社 Method and electronic device for network connection
CN110301143A (en) * 2016-12-30 2019-10-01 英特尔公司 Method and apparatus for radio communication

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1331759A1 (en) * 2002-01-24 2003-07-30 Alcatel Canada Inc. System and method for providing management of communication links connecting components in a network element
JP2008242968A (en) * 2007-03-28 2008-10-09 Secom Co Ltd Remote monitoring system
CN101605108A (en) * 2009-07-15 2009-12-16 阿里巴巴集团控股有限公司 A kind of method, system and device of instant messaging
CN102763087A (en) * 2011-06-28 2012-10-31 华为技术有限公司 Method and system for realizing interconnection fault-tolerance between cpus
CN103416085A (en) * 2012-11-26 2013-11-27 华为技术有限公司 Communication recovery method, apparatus and system
CN108702694A (en) * 2016-01-22 2018-10-23 三星电子株式会社 Method and electronic device for network connection
CN106534260A (en) * 2016-10-09 2017-03-22 电子科技大学 Three-layer state machine-based internet-of-things equipment communication method
CN110301143A (en) * 2016-12-30 2019-10-01 英特尔公司 Method and apparatus for radio communication
CN108664349A (en) * 2018-05-18 2018-10-16 上海商米科技有限公司 Reconnection method and device, storage medium, the processor of double screen terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113741297A (en) * 2021-09-10 2021-12-03 北京京东乾石科技有限公司 Task processing method, device and system for multiple robots and robot
CN114339469A (en) * 2021-12-23 2022-04-12 锐迪科创微电子(北京)有限公司 MQTT communication method, device, electronic equipment and storage medium
WO2023116564A1 (en) * 2021-12-23 2023-06-29 锐迪科创微电子(北京)有限公司 Mqtt communication method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
CN113246117B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
KR102170344B1 (en) Ground stations, unmanned aerial vehicles, and communication systems and methods between ground stations and unmanned aerial vehicles
JP5285066B2 (en) Method for cooperating multiple sensors
EP3216736B1 (en) An interaction terminal and system for elevator
KR20170087385A (en) Remote control apparatus and system for a mobile robot, and method thereof
CN108429576B (en) Unmanned aerial vehicle communication method, control terminal and unmanned aerial vehicle control system
US11503516B2 (en) Method and apparatus for providing beam related information for connection failure detection in wireless communication system
CN110255306B (en) Call calling method, system, device, server and storage medium
CN111064552B (en) Intelligent device control method and device, electronic device and storage medium
CN111093220B (en) Autonomous unmanned cluster dynamic management method and management platform
CN113246117A (en) Robot control method and device and building management system
CN108810129A (en) Internet of Things network control system and method, terminal device and local network services equipment
CN107508916B (en) Server link management method for intelligent robot
US10097969B2 (en) Communication method in terminal and terminal suitable for the same
CN116506434A (en) Multi-terminal offline-operation intelligent warehouse management method
CN104539722A (en) Collection method of long-distance and short-distance communication control data
CN111950818A (en) Unmanned vehicle dispatching method and device
CN110913371B (en) Vehicle remote monitoring method and device, intelligent vehicle, electronic equipment and storage medium
US9191237B1 (en) Wireless communication systems and methods
WO2014122730A1 (en) Information providing service program, information providing service method, information providing service device, and information providing service system
CN112518778B (en) Control method of intelligent man-machine fusion scene based on service robot
US10337877B1 (en) Communication with mobile devices utilizing light emitting diodes
CN204790348U (en) Distributing type wireless Intelligence home systems
CN110430197A (en) A kind of transaction data synchronization method of block chain network
JP5103284B2 (en) IP exchange, IP terminal, and IP telephone system
JP6069474B2 (en) Network system, constant connection method, electronic equipment, server, program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant