Communication method, communication device, server and storage medium

Through the server, the communication connection between the base station and the mobile device is built, the dependence on the LoRa link is reduced, the problems of insufficient communication stability and efficiency are solved, and efficient data sharing and communication efficiency are achieved.

CN120076070APending Publication Date: 2025-05-30SHENZHEN MAMMOTION INNOVATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510254606.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the prior art, communication stability between the base station and the self-mobile device is poor, frequency band congestion and communication conflict are prone to occur, and traditional one-to-one communication methods are difficult to meet the requirements of high-efficiency communication.

Method used

The communication connection between the first communication device and the second communication device is constructed through the server, reducing dependence on the LoRa link, realizing data sharing, and data interaction is performed through the subscription relationship of the preset topic.

Benefits of technology

Improve communication stability and security, reduce communication conflicts and frequency band congestion, realize data sharing, and improve communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120076070A_ABST
    Figure CN120076070A_ABST
Patent Text Reader

Abstract

The invention provides a communication method, communication equipment, a server and a storage medium. The communication method applied to a first communication device in communication devices comprises the steps that communication connection with a server is established according to received authentication information, and the server establishes communication connection with a second communication device based on the authentication information; through the server, constructing a subscription relationship between the first communication device and the second communication device for a preset theme; and based on the subscription relationship, performing data interaction with the second communication device through the server. By using the method, the communication stability and the communication efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a communication method, a communication device, a server, and a storage medium. Background Art

[0002] In the related art, a long-range radio (LoRa) link is often used for communication connection between a base station and a self-mobile device (for example, a lawn mower). However, LoRa communication uses the Industrial, Scientific, and Medical Bands (ISM bands) which do not require permission for use. Therefore, the ISM band resources are becoming increasingly tense, and problems such as frequency band congestion and communication conflicts are likely to occur, resulting in interference in the communication between devices and reducing the communication stability.

[0003] In addition, a one-to-one communication method is often used between the base station and the mobile device, that is, one base station corresponds to one mobile device for data transmission. This communication method is difficult to meet the requirements of high-efficiency communication. If the base station needs to send data to multiple mobile devices, it often needs to send multiple times, reducing the communication efficiency. Summary of the Invention

[0004] In view of the above, it is necessary to provide a communication method, a communication device, a server, and a storage medium that can solve the technical problems of poor communication stability and communication efficiency.

[0005] In a first aspect, this application provides a communication method, which is applied to a first communication device. The method includes: constructing a communication connection with a server according to the received authentication information, where the server establishes a communication connection with a second communication device based on the authentication information, constructing, through the server, a subscription relationship of the first communication device and the second communication device to a preset topic, and performing data interaction with the second communication device through the server based on the subscription relationship.

[0006] In a second aspect, this application provides a communication device. The communication device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the communication device implements the communication method described in the first aspect.

[0007] In a third aspect, the present application provides a communication method, which is applied to a server. The method includes: receiving a connection request sent from an external device, and based on the connection request and a preset communication protocol, establishing a communication connection with the external device; receiving a subscription request sent from the external device, where the subscription request includes at least one topic, and establishing a subscription relationship of the external device to the at least one topic.

[0008] In a fourth aspect, the present application provides a server, which includes: a storage device, a processing device, and a computer program stored on the storage device and executable on the processing device. When the processing device executes the computer program, the server implements the communication method described in the third aspect.

[0009] In a fifth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor in a communication device, the communication method is implemented, or when the computer program is implemented by a processing device in a server, the communication method is implemented.

[0010] In the communication method provided in the embodiments of the present application, through the server, the communication connection between the first communication device and the second communication device is realized, which can reduce the dependence on the LoRa link, thereby reducing communication conflicts and frequency band congestion, and improving communication stability and security. Through the server, a subscription relationship of the first communication device and the second communication device to a preset topic is established, so that the server can send the received data to all communication devices that have subscribed to the relevant topic according to the topic and the subscription relationship, realizing data sharing, and thus improving communication efficiency. Description of the Drawings

[0011] Figure 1 is a schematic diagram of a communication system provided by an embodiment of the present application.

[0012] Figure 2 is an interaction flowchart of a communication method provided by an embodiment of the present application.

[0013] Figure 3 is a schematic diagram of the selection of a connection mode provided by an embodiment of the present application.

[0014] Figure 4 is a schematic diagram of a numbered list provided by an embodiment of the present application.

[0015] Figure 5 is a schematic diagram of status bit information provided by an embodiment of the present application.

[0016] Figure 6 is a flowchart of a communication method provided by an embodiment of the present application.

[0017] Figure 7 It is a flowchart of a communication method provided by another embodiment of the present application.

[0018] Figure 8 It is a schematic structural diagram of a communication device provided by an embodiment of the present application.

[0019] Figure 9 It is a schematic structural diagram of a server provided by an embodiment of the present application. Detailed implementation manners

[0020] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] It should be noted that, in the present application, "at least one" means one or more, and "a plurality" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0022] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific manner.

[0023] As Figure 1 shown, it is a schematic diagram of a communication system provided by an embodiment of the present application. As Figure 1 shown, an embodiment of the present application provides a communication system 1, including a first communication device 10, a second communication device 20, a control device 50, a second server 40 and a first server 30. The first communication device 10 is communicatively connected to the control device 50, the control device 50 is communicatively connected to the first server 30, and the first communication device 10 and the second communication device 20 are respectively communicatively connected to the second server 40.

[0024] Figure 1 The first communication device 10 in [[ ]] is a self-mobile device, and the second communication device 20 is a base station. The self-mobile device includes but is not limited to: a lawn mowing robot and a cleaning robot. The base station may be a Real-time Kinematic (RTK) base station, etc.

[0025] Figure 1 The self - moving device shown is only an example of the first communication device 10, Figure 2 and the base station shown is only an example of the second communication device 20. In practical applications, it is not limited to this, and as the types of the first communication device 10 and the second communication device 20 change, the connection relationships among the various components in the communication system 1 can also change accordingly. Exemplarily, the first communication device 10 can be a base station, the second communication device 20 can be a self - moving device, the first communication device 10 and the second communication device 20 are respectively communicatively connected to the second server 40, the second communication device 20 is communicatively connected to the control device 50, and the control device 50 is communicatively connected to the first server 30. The structures of the first communication device 10 and the second communication device 20 can refer to the structure composition of the communication device 80 as Figure 8 shown.

[0026] The first server 30 can be used to manage the first communication device 10 and the second communication device 20 and provide authentication information for the first communication device 10 and the second communication device 20. Among them, the first server 30 can be a single network server, a server cluster composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on Cloud Computing.

[0027] The second server 40 has the functions of relaying and routing. It can receive data sent by one of the first communication device 10 and the second communication device 20, and send the received data to the other communication device. The second server 40 can be a single network server, a server cluster composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on Cloud Computing.

[0028] The structure of the first server 10 or the second server 20 can refer to the structure composition of the server 90 as Figure 9 shown.

[0029] The control device 50 can be used to control communication devices (such as the first communication device 10 or the second communication device 20), and can be devices such as mobile phones, tablet computers, and computers. The above examples of the first communication device 10, the second communication device 20, the first server 30, the second server 40, and the control device 50 are only examples, and are not limited to this in practical applications.

[0030] The present application does not limit the connection method between the mobile device and the control device 50, and the connection method between the control device 50 and the first server 30. For example, the control device 50 can communicate with the control device through a wired connection or a wireless connection, and communicate with the first server 30 through a wired connection or a wireless connection. Among them, the wired connection method can be communication through a universal serial bus (USB) and a controller area network bus (CAN), and the wireless connection can be wireless fidelity (Wi-Fi), Bluetooth (BT), mobile communication network, frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0031] The first communication device 10 and the second communication device 20 can be connected to the second server 40 through a protocol supporting a subscription mechanism, such as the Message Queuing Telemetry Transport (MQTT) protocol, the Advanced Message Queuing Protocol (AMQP) protocol, and the Constrained Application Protocol (CoAP) protocol.

[0032] The above examples of the structure of the communication system 1 are only examples. In actual applications, the communication system 1 may include Figure 1 More or fewer components. For example, in other embodiments, compared to Figure 1 , the communication system 1 may only include the first communication device 10, the second communication device 20, the second server 40 and the first server 30. Alternatively, the communication system 1 may only include the first communication device 10, the second communication device 20, the second server 40, the first communication device 10 and the second communication device 20 may store corresponding authentication information, and based on the corresponding authentication information, identity authentication is performed through the second server 40.

[0033] based on Figure 1 The communication system 1 shown in the embodiment of the present application provides a communication method that can improve communication stability and communication efficiency.

[0034] like Figure 2As shown, it is an interaction flowchart of a communication method provided by an embodiment of the present application. According to different requirements, the order of each step in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. To clearly illustrate the communication method provided by the embodiments of the present application, in the following, the first communication device is taken as a mobile device and the second communication device is taken as a base station for illustration.

[0035] S20, the control device responds to the user's selection and determines the second communication device.

[0036] In some embodiments of the present application, the control device can be devices such as mobile phones and computers, and the present application does not limit the type of the control device. The control device can provide a user interface (for example, a control interface for the mobile device) to facilitate human-computer interaction. In response to the user's selection of the RTK connection mode on the user interface, the control device can display a list of numbers of the second communication devices for the user to view and select.

[0037] Among them, the RTK connection mode can include RTK over Internet and LoRa. The number list includes at least one number, and each number in the number list can correspond to a second communication device (for example, a base station) and the status of the second communication device. The status of the second communication device can include online status and offline status, etc., which are used to indicate whether the second communication device is available or can be connected. The user can select the second communication device through the number (for example, click on the control corresponding to the number of the second communication device), and the control device can determine the corresponding second communication device according to the number selected by the user to facilitate the construction of a communication link.

[0038] For ease of understanding, the following is combined with Figure 3 and Figure 4 for illustration. As Figure 3 shown, it is a schematic diagram of the selection of the RTK connection mode provided by an embodiment of the present application. As Figure 4 shown, it is a schematic diagram of the number list provided by an embodiment of the present application. Figure 3 The RTK connection mode shown in Figure 3 is LoRa, the connection status of RTK over Internet (RTK Connetcion) is not connected, and the symbol "√" is used to indicate that the LoRa connection mode is in the selected state. In response to the user clicking on the RTKover Internet option in Figure 4 , the control device can display a list of base stations as shown in Figure 3 for the user to select. In response to the number selected by the user, the control can determine the corresponding base station as the second communication device, so as to be able to switch from the LoRa connection mode shown in Figure 4The numbers of two RTK base stations, RBSAOWF4Z8X and RTKBEU240520160, are shown, and each number corresponds to a base station and the status of the base station. Among them, the online status indicates that the corresponding base station is available or can be connected. In addition, in Figure 4 In the interface shown, prompt messages and LoRa numbers can also be displayed. Among them, the prompt messages are used to prompt the precautions for connection. For example, the prompt message can be "Please ensure that the network conditions of the Robot and the base station are good and under the same account name". The LoRa number can be the default or obtained by the user input, and is used to configure the LoRa connection mode. For example, Figure 4 LoRa868.7.1.31664 and LoRa 868.5.0.19141 in

[0039] In this embodiment, through the user interface, it is convenient for the user to intuitively view the status of each base station, so that the user can conveniently select the corresponding base station as the second communication device. By responding to the user's selection of the RTK connection mode, the RTK connection mode can be flexibly switched.

[0040] S21, the control device generates a data acquisition request according to the device information of the second communication device and the first communication device.

[0041] In some embodiments of the present application, the device information may be the unique identifier of the first communication device and the second communication device. For example, if the first communication device is a self-mobile device, such as a lawn mower, and the second communication device is a base station, the unique identifier of the first communication device may be the license plate number or serial number of the lawn mower, and the unique identifier of the second communication device may be a 24-bit character including the Mobile Country Code (MCC), Mobile Network Code (MNC), and Location Area Code (LAC).

[0042] The control device is communicatively connected to the first server. The first server can operate as a background device, be used to manage the first communication device and the second communication device, and provide authentication credentials for the first communication device and the second communication device to implement access control over the first communication device and the second communication device. The first server can also be called an authentication server. The control device can generate a data acquisition request in a corresponding format based on the device information of the first communication device and the second communication device and according to the communication protocol with the first server. For example, if the control device communicates with the first server through the HTTP protocol, the control device can generate an HTTP GET or POST format data acquisition request based on the device information of the first communication device and the second communication device.

[0043] In this embodiment, the first server manages the first communication device and the second communication device, which can reduce the complex operations of nodes such as the control device, the first communication device, and the second communication device, thereby simplifying the human-computer interaction process.

[0044] S22. The control device sends a data acquisition request to the first server.

[0045] In this embodiment, since the control device is communicatively connected to the first server, the control device can send the data acquisition request to the first server. The data acquisition request is used to instruct the first server to send authentication information to the first communication device and the second communication device.

[0046] S23. The first server sends authentication information to the first communication device based on the data acquisition request.

[0047] In some embodiments of the present application, the authentication information is used to authenticate the identity of the first communication device and may include information such as an account number and a key.

[0048] In this embodiment, by providing the first server with authentication information for the first communication device, the authentication information can be configured in a personalized manner, thereby ensuring the flexibility of the authentication information configuration.

[0049] S24. The first communication device generates a connection request according to the authentication information received from the first server and sends the connection request to the second server.

[0050] In some embodiments of the present application, since the authentication information includes an account number and a key, the first communication device can generate a connection request according to the account number and the key and send the connection request to the second server. Among them, the connection request can be sent in the form of a message or a data packet, and the present application does not limit this.

[0051] The present application does not limit the type of the second server. Exemplarily, the second server may be a server. For example, if the first communication device is communicatively connected to the second server through the MQTT protocol, the second server may be an MQTT server.

[0052] In this embodiment, by constructing the communication connection between the first communication device and the second server through a preset communication protocol, the custom configuration of communication rules can be achieved.

[0053] S25. The second server authenticates the identity of the first communication device according to the connection request received from the first communication device.

[0054] In some embodiments of the present application, according to information such as the account and key in the connection request, the second server can authenticate the first communication device to confirm whether the first communication device is legal. When it is confirmed that the first communication device is legal, the second server sends connection confirmation information to the first communication device and establishes a communication connection with the first communication device through a preset communication protocol.

[0055] Among them, the second server can determine whether the first communication device is legal in various ways. Exemplarily, the second server can store a preset account and the corresponding key. The second server can determine the preset account that matches the received account, compare the received key with the key of the matched preset account. When the received key matches the key corresponding to the matched preset account, it can be determined that the first communication device is legal. When the received key does not match the key corresponding to the matched preset account, it can be determined that the first communication device is illegal.

[0056] In this embodiment, if it is determined that the first communication device is legal, step S26 is executed. If it is determined that the first communication device is illegal, the second server can send a connection failure message to the first communication device to indicate that the identity authentication fails, etc.

[0057] S26. The second server sends connection confirmation information to the first communication device.

[0058] In some embodiments of the present application, the connection confirmation information may include authentication confirmation information and the Internet Protocol (IP) address of the second server, etc. Among them, the authentication confirmation information may be "authentication successful", "identity authentication passed", etc.

[0059] S27. The first communication device establishes a communication connection with the second server based on the preset communication protocol.

[0060] In some embodiments of the present application, the preset communication protocol includes but is not limited to: Message Queuing Telemetry Transport (MQTT) protocol, Advanced Message Queuing Protocol (AMQP), and Constrained Application Protocol (CoAP).

[0061] In other embodiments of the present application, the first communication device can store the corresponding authentication information, generate a connection request according to the authentication information, and make the second server authenticate the first communication device by sending the connection request to the second server.

[0062] In this embodiment, by generating a connection request using the authentication information stored in the first communication device and sending the connection request to the second server, the second server can quickly authenticate the first communication device.

[0063] S28. The first server sends authentication information to the second communication device based on the data acquisition request.

[0064] In some embodiments of the present application, the description of the authentication information can refer to the description in step S23.

[0065] S29. The second communication device generates a connection request according to the authentication information received from the first server and sends the connection request to the second server.

[0066] In some embodiments of the present application, the description of the connection request can refer to the description in step S24.

[0067] S30. The second server authenticates the second communication device according to the connection request received from the second communication device.

[0068] In some embodiments of the present application, the description of authenticating the second communication device can refer to the description of authenticating the first communication device in step S25.

[0069] In this embodiment, if it is determined that the second communication device is legal, step S31 is executed. If it is determined that the second communication device is illegal, the second server can send a connection failure message to the second communication device to indicate that the authentication fails, etc.

[0070] S31. The second server sends a connection confirmation message to the second communication device.

[0071] In some embodiments of the present application, the description of the connection confirmation message can refer to the description in step S26.

[0072] S32. The second communication device constructs a communication connection with the second server based on a preset communication protocol.

[0073] In some embodiments of the present application, the description of the preset communication protocol and constructing the communication connection with the second server can refer to the description in step S27.

[0074] In other embodiments of the present application, the second communication device may store corresponding authentication information, generate a connection request according to the authentication information, and send the connection request to the second server, so that the second server authenticates the second communication device.

[0075] In this embodiment, by generating a connection request using the authentication information stored in the second communication device and sending the connection request to the second server, the second server can quickly authenticate the second communication device.

[0076] In other embodiments of the present application, if the first communication device successfully connects to the second communication device through the second server, the first communication device may send status bit information to the control device to indicate that it has successfully connected to the second communication device through the second server, etc., so that the control device can display the status bit information on the user interface for the user to view.

[0077] The following combines Figure 5 the schematic diagram of the status bit information shown for illustration. As Figure 5 shown, the status bit information includes RTK positioning status, number of satellites, signal quality, RTK connection mode, connection status (RTK connection), and the number of the second communication device connected, etc. Among them, a color identifier can be used to indicate whether the first communication device is in the RTK positioning status. For example, a green circle can be used to indicate that the first communication device is in the RTK positioning status, and a red circle can be used to indicate that the first communication device is not in the RTK positioning status. The number of satellites represents the number of satellites corresponding to the satellite signals received during the positioning process. The signal quality can correspond to the first communication device and the second communication device, including "good", "poor", etc. The connection status can include "connected", "not connected", etc.

[0078] It should be noted that the elaboration order of the above steps S23 to S27 and steps S28 to S32 is only an exemplary introduction. In actual applications, there is no limitation on the order between the first communication device establishing a communication connection with the second server and the second communication device establishing a communication connection with the second server.

[0079] When implementing the communication connection and data interaction between the base station and the self - moving device, communication is mainly achieved through the LoRa link. However, since the ISM frequency band used by the LoRa link is prone to problems such as congestion and communication conflicts, if communication connection and data interaction are carried out through the LoRa link, problems such as unstable communication between the self - moving device and the base station, unreliable positioning data, and inability to use may occur. In some embodiments of the present application, by means of the second server, implementing the communication connection between the first communication device and the second communication device can reduce the dependence on the LoRa link, thereby reducing communication conflicts and frequency band congestion, and improving communication stability and security.

[0080] S33, the first communication device generates a first subscription request according to the first theme and sends the first subscription request to the second server.

[0081] In some embodiments of the present application, a topic can be used to identify a message or data and is a routing channel for the message or data. There can be one or more first topics, and the first topics can be customized. The embodiments of the present application do not limit the first topics. For example, the first topic can include the unique identifier of the second communication device. Alternatively, the first topic can include the unique identifier of the first communication device and the unique identifier of the second communication device.

[0082] In other embodiments, in addition to the unique identifier, the first topic can further include other information, such as attribute information like data category. For example, the format of the first topic can be / xxx / xxx / unique identifier / xxx. Here, xxx represents other information.

[0083] S34. The second server constructs a first subscription relationship of the first communication device to the first topic.

[0084] In some embodiments of the present application, the second server can construct a corresponding relationship between the first communication device and the first topic as the first subscription relationship.

[0085] In this embodiment, the second server constructs a first subscription relationship of the first communication device to the first topic, so that when receiving data carrying the first topic, the second server can send the data to the first communication device through the first subscription relationship.

[0086] S35. The second communication device generates a second subscription request according to the second topic and sends the second subscription request to the second server.

[0087] In some embodiments of the present application, there can be one or more second topics, and the second topics can be customized. The embodiments of the present application do not limit the second topics. For example, the second topic can include the unique identifier of the second communication device. Alternatively, the second topic can include the unique identifier of the first communication device and the unique identifier of the second communication device.

[0088] The first topic and the second topic can be the same, different, or partially the same. For example, the first topic can only include the unique identifier of the second communication device, and the second topic can include the unique identifier of the first communication device and the unique identifier of the second communication device.

[0089] In other embodiments, in addition to the unique identifier, the second topic can further include other information, such as attribute information like data category. For example, the format of the second topic can be / xxx / xxx / unique identifier / xxx. Here, xxx represents other information.

[0090] S36. The second server constructs a second subscription relationship of the second communication device to the second topic.

[0091] In some embodiments of the present application, the second server may construct a correspondence between the second communication device and the second topic as the second subscription relationship.

[0092] In this embodiment, the second server constructs a second subscription relationship of the second communication device to the second topic, so that when receiving data carrying the second topic, the second server can send the data to the second communication device through the second subscription relationship.

[0093] S37, the first communication device sends a heartbeat packet to the second server according to the second topic.

[0094] In some embodiments of the present application, the heartbeat packet is a data packet sent according to a preset time period, which can be used to maintain the communication connection between the first communication device and the second communication device. The preset time period and the content in the data packet can be customized. For example, the heartbeat packet may include the unique identifier of the first communication device and some custom instructions, etc. The present application does not limit the triggering mechanism of the heartbeat packet. For example, when it is determined that the first communication device is not in the low-power mode, or when the positioning function is triggered, the first communication device may send a heartbeat packet to the second server according to the second topic.

[0095] S38, the second server determines the second communication device and sends the heartbeat packet to the second communication device according to the second topic and the second subscription relationship.

[0096] In this embodiment, since the second server constructs the second subscription relationship of the second communication device to the second topic, through the second topic, the second server can quickly determine the second communication device from all the devices connected to the second server and send the heartbeat packet to the second communication device.

[0097] In other embodiments of the present application, in addition to maintaining the communication connection, the heartbeat packet can also be used to instruct the second communication device to send positioning data. The positioning data may include differential messages, and the differential messages are data transmitted in RTK positioning, which may include signal observation data received by the base station from satellites and known data (for example, the coordinates of the base station, etc.).

[0098] It should be noted that the elaboration order of the above steps S33~S34 and steps S35~S36 is only an exemplary introduction. In actual applications, there is no restriction on the sequence between the second server constructing the first subscription relationship of the first communication device to the first topic and the second server constructing the second subscription relationship of the second communication device to the second topic.

[0099] S39, in response to the received heartbeat packet, the second communication device may send positioning data to the second server according to the first topic.

[0100] In some embodiments of the present application, when a heartbeat packet is not received within a preset time, the second communication device can enter a low-power mode to reduce the consumption of resources such as the power of the second communication device. Among them, the preset duration can be customized, and the present application does not limit this. For example, the preset time can be 0.5h.

[0101] S40. The second server determines the first communication device according to the first topic and the first subscription relationship, and sends the positioning data to the first communication device.

[0102] In this embodiment, since the second server constructs the first subscription relationship of the first communication device to the first topic, through the first topic, the second server can quickly determine the first communication device from all the devices connected to the second server, and send the positioning data to the first communication device.

[0103] S41. The first communication device determines the position of the first communication device according to the positioning data sent from the second server.

[0104] In some embodiments of the present application, the first communication device can perform joint calculation on the positioning data received from the second server and the signal observation data received by itself from the satellite, so as to obtain a high-precision positioning result.

[0105] In other embodiments of the present application, in the case where the communication system includes a first communication device, a second communication device, a first server, and a second server and does not include the above-mentioned control device, the above steps S20 to S22 can be executed by the first communication device. Exemplarily, the first communication device can respond to a user selection, determine the second communication device, generate a data acquisition request according to the device information of the first communication device and the second communication device, and send the data acquisition request to the first server, so that the first server sends authentication information to the first communication device and the second communication device based on the data acquisition request.

[0106] In other embodiments of the present application, the steps involving the separate execution of the first server and the second server in steps S20 to S41 can be executed by the same server. For example, steps S22, S24, S29 related to the first server and steps S23, S28 executed by the first server can be replaced by the second server. Exemplarily, the first communication device can respond to a user selection, determine the second communication device, generate a data acquisition request according to the device information of the first communication device and the second communication device, and send the data acquisition request to the second server. The second server sends authentication information to the first communication device and the second communication device respectively based on the data acquisition request. The first communication device and the second communication device generate a connection request based on the authentication information received from the second server, and send the connection request to the second server.

[0107] In the communication method provided by the embodiment of the present application, through the second server, the communication connection between the first communication device and the second communication device is realized, which can reduce the dependence on the LoRa link, thereby reducing communication conflicts and frequency band congestion, and improving communication stability and security. Through the second server, a subscription relationship between the first communication device and the second communication device for a preset topic is constructed, so that the second server can send the received data to all communication devices subscribed to the relevant topic according to the topic and the subscription relationship, realizing data sharing, thereby improving communication efficiency. In an application scenario where multiple self-mobile devices are located through a base station, through the second server, the positioning data received from the base station is sent to all self-mobile devices subscribed to the relevant topic, so that a data sharing mechanism for one base station and multiple self-mobile devices can be constructed, thereby improving communication efficiency.

[0108] As Figure 6 shown, it is a flowchart of the communication method provided by an embodiment of the present application. According to different requirements, the order of each step in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. Figure 6 The described communication method is applied to the first communication device, and the specific type of the first communication device is not limited in this application. For example, the first communication device can be a self-mobile device or a base station.

[0109] S61. According to the received authentication information, establish a communication connection with the server, and the server establishes a communication connection with the second communication device based on the authentication information.

[0110] In some embodiments, the server may include a first server and a second server. The first server is used to manage the first communication device and the second communication device and provide authentication information for the first server and the second server. The second server has the functions of relaying and routing data and can realize the data interaction between the first communication device and the second communication device. Exemplarily, the first communication device can obtain authentication information from the first server and establish a communication connection with the second server based on the authentication information obtained from the first server, where the second server can establish a communication connection with the second communication device based on the authentication information obtained from the first server.

[0111] In this embodiment, the method for establishing the communication connection can refer to the description of the method for establishing the communication connection in steps S27 and S32.

[0112] S62. Through the server, establish a subscription relationship between the first communication device and the second communication device for a preset topic.

[0113] In some embodiments, the preset topics may include a first topic corresponding to a first communication device and a second topic corresponding to a second communication device. Through the server after establishing a communication connection, such as the second server described above, the first communication device can construct a subscription relationship of the first communication device to the first topic. Since the second communication device, based on the second server, the second communication device can construct a subscription relationship of the second communication device to the second topic.

[0114] In this embodiment, the construction of the subscription relationship can refer to the description of the construction method of the subscription relationship in steps S33 and S36.

[0115] S63. Based on the subscription relationship, data interaction is performed with the second communication device through the server.

[0116] In some embodiments, based on the constructed subscription relationship, the first communication device can perform data interaction with the second communication device through a server (for example, the second server) communicatively connected to the first communication device.

[0117] In this embodiment, the description of the data interaction method can refer to the description in steps S37 to S41, and will not be repeated in this embodiment.

[0118] In other embodiments of the present application, the second communication device has a corresponding coverage area range, and all first communication devices within the coverage area range can perform data interaction with the same second communication device through a server (for example, the second server), realizing base station sharing, thereby reducing equipment costs.

[0119] In the communication method provided in the embodiments of the present application, through the server, the communication connection between the first communication device and the second communication device is realized, which can reduce the dependence on the LoRa link, thereby reducing communication conflicts and frequency band congestion, and improving communication stability and security. Through the server, a subscription relationship of the first communication device and the second communication device to the preset topics is constructed, so that the server can send the received data to the communication devices that have subscribed to the relevant topics according to the topics and the subscription relationship, thereby realizing data interaction between the first communication device and the second communication device. In an application scenario where multiple self-mobile devices are positioned through a base station, through the server, the positioning data received from the base station is sent to all self-mobile devices that have subscribed to the relevant topics, so that a data sharing mechanism of one base station to multiple self-mobile devices can be constructed, thereby improving communication efficiency.

[0120] As Figure 7 shown, it is a flowchart of a communication method provided in another embodiment of the present application. According to different requirements, the order of each step in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. Figure 7The communication method described above is applied to a server, such as Figure 1 the second server 40 described above.

[0121] S71. Receive a connection request sent from an external device.

[0122] In this embodiment, the external device includes but is not limited to: a self - moving device and a base station. The connection request may include information such as an account number and a key.

[0123] S72. Based on the connection request and a preset communication protocol, establish a communication connection with the external device.

[0124] In some embodiments of the present application, according to information such as the account number and the key in the connection request, the server can authenticate the external device to confirm whether the external device is legal. When it is confirmed that the external device is legal, send a connection confirmation message to the external device, and establish a communication connection with the external device through a preset communication protocol.

[0125] Among them, the server can determine whether the external device is legal in various ways. Exemplarily, the server may store a preset account number and the corresponding key. The server can determine the preset account number that matches the received account number, compare the received key with the key of the matching preset account number. When the received key matches the key of the matching preset account number, it can be determined that the external device is legal. When the received key does not match the key of the matching preset account number, it can be determined that the external device is illegal.

[0126] The connection confirmation message may include authentication confirmation information and the server's IP address, etc. Among them, the authentication confirmation information may be "authentication successful", "identity authentication passed", etc. The preset communication protocol includes but is not limited to: the Message Queuing Telemetry Transport Protocol, the Advanced Message Queuing Protocol, and the Constrained Application Protocol.

[0127] In this embodiment, a communication connection with the external device is established only when it is confirmed that the external device is legal, which can ensure the security of the communication connection.

[0128] S73. Receive a subscription request sent from the external device, where the subscription request includes at least one topic.

[0129] In this embodiment, after establishing a communication connection with the external device, the server can receive a subscription request sent from any external device connected to the server.

[0130] In other embodiments, the server can also receive an unsubscribe request sent from any external device connected to the server. The unsubscribe request includes at least one topic.

[0131] S74. Establish a subscription relationship for the external device to the at least one topic.

[0132] In this embodiment, the server may establish a correspondence between an external device and a corresponding topic as a subscription relationship. After establishing the subscription relationship, the server may send a subscription confirmation message to the external device.

[0133] In other embodiments, the server may cancel the subscription relationship of the external device to the topic in the unsubscribe request according to the unsubscribe request, and send an unsubscribe confirmation message to the external device.

[0134] S75, Receive data sent by any external device, where the data carries a topic.

[0135] This application does not limit the type of the data. Exemplarily, if any external device is a self-mobile device, the data may be a heartbeat packet, etc.; if any external device is a base station, the data may be positioning data, etc.

[0136] S76, Determine a target device from the external devices connected to the server according to the subscription relationship corresponding to the topic carried by the data.

[0137] Exemplarily, if any external device is a self-mobile device and the data is a heartbeat packet, the server may determine the corresponding base station as the target device according to the subscription relationship corresponding to the topic carried by the data. Or, if any external device is a base station and the data is positioning data, the server may determine the corresponding self-mobile device as the target device according to the subscription relationship corresponding to the topic carried by the data. The target device may be one or more.

[0138] In this embodiment, since the subscription relationship of the external device to the corresponding topic is established, the server can quickly and accurately determine the target device from the external devices connected to the server through the subscription relationship.

[0139] S77, Send the data to the target device.

[0140] In the application scenario where multiple self - moving devices are located via a base station, each self - moving device needs to receive positioning data from the base station to achieve path planning and position awareness. In related technologies, a one - to - one communication method is often adopted between the base station and the mobile device, that is, one base station corresponds to one mobile device for data transmission. This communication method is difficult to meet the requirements of high - efficiency communication. If the base station needs to send data to multiple mobile devices, it often needs to send multiple times, which not only reduces the communication efficiency but also may introduce additional communication delays and resource consumption. In this embodiment, through the server, the positioning data received from the base station is sent to all self - moving devices that have subscribed to the relevant topic, so that a data sharing mechanism of one base station for multiple self - moving devices can be constructed, thereby improving the communication efficiency.

[0141] As Figure 8 shown, it is a structural diagram of a communication device provided by an embodiment of the present application. As Figure 8 shown, the communication device 80 may include a communication module 801, a memory 802, a processor 803, an input / output (I / O) interface 804, and a bus 805. The processor 803 is coupled to the communication module 801, the memory 802, and the input / output interface 804 through the bus 805 respectively.

[0142] The communication module 801 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more of the solutions for wired communication such as universal serial bus (USB), Controller Area Network (CAN), etc. The wireless communication module may provide one or more of the solutions for wireless communication such as Wi - Fi, Bluetooth, mobile communication network, frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.

[0143] The memory 802 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 803, and can be used to store the executable programs (such as machine instructions) of other running programs, and can also be used to store user and application data, etc. The random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0144] The non-volatile memory can also store executable programs and store user and application data, etc., and can be pre-loaded into the random access memory for direct reading and writing by the processor 803. The non-volatile memory may include disk storage devices, flash memory.

[0145] The memory 802 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 803. The one or more computer programs include a plurality of instructions, and when the plurality of instructions are executed by the processor 803, a communication method executable on the communication device 80 can be implemented.

[0146] In other embodiments, as Figure 8 shown, the communication device 80 further includes an external memory interface for connecting to an external memory to implement the storage capacity expansion of the communication device 80.

[0147] The processor 803 may include one or more processing units. For example, the processor 803 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0148] The processor 803 provides computing and control capabilities. For example, the processor 803 is used to execute the computer program stored in the memory 802 to implement the above communication method.

[0149] The input / output interface 804 is used to provide channels for user input or output. For example, the input / output interface 804 can be used to connect various input and output devices, such as a mouse, a keyboard, a touch device, a display screen, etc., so that the user can input information or visualize information.

[0150] The bus 805 is at least used to provide a communication channel between the communication module 801, the memory 802, the processor 803, and the input / output interface 804 in the communication device 80.

[0151] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the communication device 80. In other embodiments of the present application, the communication device 80 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0152] As Figure 9 shown, it is a schematic structural diagram of a server provided by an embodiment of the present application. As Figure 9 shown, the server 90 may include a communication module 901, a storage device 902, a processing device 903, an input / output (I / O) interface 904, and a bus 905. The processing device 903 is respectively coupled to the communication module 901, the storage device 902, and the input / output interface 904 through the bus 905.

[0153] The communication module 901 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more of the solutions for wired communication such as universal serial bus (USB), Controller Area Network (CAN), etc. The wireless communication module may provide one or more of the solutions for wireless communication such as Wi-Fi, Bluetooth, mobile communication network, frequency modulation (FM), near field communication (NFC), infrared (IR), etc.

[0154] The storage device 902 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processing device 903, and can be used to store executable programs (such as machine instructions) of other running programs, and can also be used to store user and application data, etc. The random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0155] The non-volatile memory can also store executable programs and store user and application data, etc., and can be pre-loaded into the random access memory for direct reading and writing by the processing device 903. The non-volatile memory may include disk storage devices, flash memory.

[0156] The storage device 902 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processing device 903. The one or more computer programs include a plurality of instructions, and when the plurality of instructions are executed by the processing device 903, a communication method executable on the server 90 can be realized.

[0157] In other embodiments, such as Figure 9The server 90 shown also includes an external memory interface for connecting to an external memory to expand the storage capacity of the server 90.

[0158] The processing device 903 may include one or more processing units. For example, the processing device 903 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0159] The processing device 903 provides computing and control capabilities. For example, the processing device 903 is used to execute the computer program stored in the storage device 902 to implement the above communication method.

[0160] The input / output interface 904 is used to provide a channel for user input or output. For example, the input / output interface 904 can be used to connect various input / output devices, such as a mouse, a keyboard, a touch device, a display screen, etc., so that the user can enter information or visualize the information.

[0161] The bus 905 is at least used to provide a communication channel between the communication module 901, the storage device 902, the processing device 903, and the input / output interface 904 in the server 90.

[0162] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the server 90. In other embodiments of the present application, the server 90 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0163] The embodiments of the present application also provide a computer-readable storage medium with a computer program stored thereon. The computer program includes program instructions, and the method implemented when the program instructions are executed may refer to the methods in the above various embodiments of the present application.

[0164] Among them, the computer-readable storage medium can be the internal memory of the communication device or server described in the above embodiments. For example, the hard disk or memory of the communication device or server. The computer-readable storage medium can also be an external storage device of the communication device or server. For example, a plug-in hard disk equipped on the communication device or server, a SmartMedia Card (SMC), a Secure Digital (SD) card, a Flash Card, etc.

[0165] In some embodiments, the computer-readable storage medium may include a storage program area and a storage data area. Among them, the storage program area can store an operating system, application programs required for at least one function, etc.; the storage data area can store data created according to the use of the communication device or server.

[0166] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0167] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application. The above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included in the protection scope of this application.

Claims

1. A communication method, applied to a first communication device, characterized in that: The method comprises: Establishing a communication connection with a server according to the received authentication information, wherein the server establishes a communication connection with a second communication device based on the authentication information; Establishing, through the server, a subscription relationship between the first communication device and the second communication device for a preset topic; Based on the subscription relationship, data is exchanged with the second communication device through the server.

2. The communication method according to claim 1, characterized in that: If the first communication device is a mobile device and the second communication device is a base station, before establishing a communication connection with the server based on the received authentication information, the method further includes: A data acquisition request is generated according to the device information of the first communication device and the second communication device, and the data acquisition request is sent to the server, so that the server sends the authentication information to the first communication device and the second communication device based on the data acquisition request.

3. The communication method according to claim 1, characterized in that: The authentication information includes an account number and a key, and establishing a communication connection with the server based on the received authentication information includes: Generate a connection request according to the account number and the key, and send the connection request to the server, so that the server performs identity authentication on the first communication device; When connection confirmation information for the connection request is received, a communication connection with the server is established based on a preset communication protocol, wherein the preset communication protocol includes any one of a message queue telemetry transmission protocol, an advanced message queue protocol, and a restricted application protocol.

4. The communication method according to claim 1, wherein: If the first communication device is a mobile device and the second communication device is a base station, the subscription relationship includes a first subscription relationship of the first communication device to a first topic, wherein the server obtains positioning data through the base station based on the first topic and the first subscription relationship, and sends the positioning data to the second communication device, and the positioning data is sent by the second communication device using the first topic.

5. The communication method according to claim 4, characterized in that: The performing data interaction with the second communication device through the server based on the subscription relationship includes: The positioning data is received, and the position of the first communication device is determined based on the positioning data.

6. The communication method according to claim 1, wherein: If the first communication device is a mobile device and the second communication device is a base station, the subscription relationship includes a second subscription relationship of the second communication device to a second topic, and the data interaction with the second communication device through the server based on the subscription relationship includes: According to the second topic, a heartbeat packet is sent to the server, so that the server sends the heartbeat packet to the second communication device according to the second topic and the second subscription relationship, wherein the heartbeat packet is used to maintain the communication connection between the first communication device and the second communication device.

7. A communication method, applied to a server, characterized in that: The method comprises: receiving a connection request sent from an external device; According to the connection request, based on a preset communication protocol, establishing a communication connection with the external device; receiving a subscription request sent from the external device, wherein the subscription request includes at least one topic; A subscription relationship between the external device and the at least one topic is established.

8. The communication method according to claim 7, characterized in that: The preset communication protocol includes any one of a message queue telemetry transmission protocol, an advanced message queue protocol and a restricted application protocol, and the external device includes a mobile device and a base station.

9. The communication method according to claim 7, characterized in that: The method further comprises: Receiving data sent by any external device, wherein the data carries a subject; Determine a target device from external devices connected to the server according to a subscription relationship corresponding to the topic; The data is sent to the target device.

10. A communication device, characterized in that: The communication device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the communication device implements the communication method according to any one of claims 1 to 6.

11. A server, characterized in that: The server comprises: a storage device, a processing device, and a computer program stored on the storage device and executable on the processing device, wherein when the processing device executes the computer program, the server implements the communication method according to any one of claims 7 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor in a communication device, implements the communication method as claimed in any one of claims 1 to 6, or is implemented by a processing device in a server to implement the communication method as claimed in any one of claims 7 to 9.