A wireless communication method, device and electronic equipment
Patent Information
- Application Number
- CN202611161316.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]然而,上述方案中,在中心节点出现断电、断网等异常时,无需设备之间的通信能力随即失效,导致无线设备之间的通信稳定性较差
[0020] As can be seen from the above, in the solution provided by the embodiments of this application, each wireless communication device maintains its own member status and sends service information through its own operating gateway node, without relying on the management and scheduling of the central node, thus avoiding the problem of communication failure caused by the abnormality of the central node and improving the communication stability and reliability between wireless devices.
Smart Images

Figure CN122934202A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a wireless communication method, apparatus and electronic device. Background Technology
[0002] In the context of Industrial Internet of Things (IIoT) and mobile device collaboration, wireless communication is a common transmission method between devices. Taking the communication between a mobile robot and an automated charging and swapping station as an example, the two need to conduct bidirectional data exchange, such as charging and swapping request interaction and operation status synchronization, within the same wireless local area network.
[0003] In related technologies, a centralized communication architecture is often used to eliminate the need for devices to communicate. Continuing with the example above, the cloud, host computer, or local scheduling server is used as the central node. All robots and automatic charging and swapping bays are connected to the central node, which uniformly maintains the device status and routing relationships, and is responsible for forwarding business information and coordinating tasks.
[0004] However, in the above scheme, when the central node experiences abnormalities such as power outages or network outages, the communication capability between non-functional devices immediately fails, resulting in poor communication stability between wireless devices. Summary of the Invention
[0005] The purpose of this application is to provide a wireless communication method, apparatus, and electronic device to improve the communication stability between wireless devices. The specific technical solution is as follows:
[0006] In a first aspect, embodiments of this application provide a wireless communication method applied to a gateway node, wherein the gateway node is deployed on a wireless communication device, and the wireless communication device and other wireless communication devices are connected to the same wireless local area network and join the same multicast group, the method comprising:
[0007] In response to receiving member status information sent by other wireless communication devices, the gateway node updates its locally maintained multicast member table based on the member status information.
[0008] The gateway node responds to receiving the first service information output by the local service bus and determines the information recipient based on the information type of the first service information;
[0009] If the information recipient is unique, the gateway node determines the communication address of the information recipient based on the multicast membership table and sends the first service information to the communication address using unicast; and / or,
[0010] When the information recipient is not unique, the gateway node sends the first service information to the multicast address of the multicast group using a multicast method.
[0011] Secondly, embodiments of this application provide a wireless communication device applied to a gateway node. The gateway node is deployed on a wireless communication device, which connects to the same wireless local area network and joins the same multicast group as other wireless communication devices. The device includes:
[0012] The multicast member table update module is used to update the locally maintained multicast member table based on the member status information received from other wireless communication devices in response to the member status information received.
[0013] The information receiver determination module is used to determine the information receiver based on the information type of the first service information in response to receiving the first service information output by the local service bus.
[0014] The information sending module is configured to, when the information recipient is unique, determine the communication address of the information recipient based on the multicast member table and send the first service information to the communication address using unicast; and / or, when the information recipient is not unique, send the first service information to the multicast address of the multicast group using multicast.
[0015] Thirdly, embodiments of this application provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0016] Memory, used to store computer programs;
[0017] When a processor executes a program stored in memory, it implements the steps of the method described in the first aspect.
[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0019] Fifthly, embodiments of this application also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps of the method described in the first aspect.
[0020] As can be seen from the above, in the solution provided by the embodiments of this application, each wireless communication device maintains its own member status and sends service information through its own operating gateway node, without relying on the management and scheduling of the central node, thus avoiding the problem of communication failure caused by the abnormality of the central node and improving the communication stability and reliability between wireless devices.
[0021] In addition, all wireless communication devices join the same multicast and communicate service information within the same multicast. The information receiver is determined autonomously by the gateway node, eliminating the need to configure fixed IPs and static routes for each wireless communication device, thus reducing the configuration complexity of wireless communication.
[0022] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0024] Figure 1 A flowchart illustrating the first wireless communication method provided in this application embodiment;
[0025] Figure 2 A flowchart illustrating the second wireless communication method provided in this application embodiment;
[0026] Figure 3 A flowchart illustrating the third wireless communication method provided in this application embodiment;
[0027] Figure 4 A schematic diagram illustrating a wireless communication scenario provided in an embodiment of this application;
[0028] Figure 5 A signaling diagram of a service scheduling information interaction process provided in an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of the structure of a wireless communication device provided in an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0032] First, the application scenarios of the solutions provided in the embodiments of this application will be introduced.
[0033] The application scenarios of the solutions provided in this application are various scenarios where devices communicate with each other via wireless communication. Examples include local area network wireless communication scenarios between multiple robots and multiple fixed devices in warehouses, factories, parks, parking lots, and indoor delivery systems.
[0034] The following section uses the scenario of robots autonomously charging and swapping batteries as an example for introduction.
[0035] To achieve autonomous charging and battery swapping, the robot needs to discover available charging bays, send docking or charging / swapping requests to the bays, obtain the bay's status, and receive responses from the bays. Conversely, the charging bays need to send information to the robot regarding occupancy, malfunctions, readiness, and task completion results. Therefore, high-frequency communication between the robot and the charging bays is necessary in this scenario.
[0036] In related technologies, a centralized communication architecture is often used to eliminate the need for devices to communicate. For example, the cloud, host computer, or local scheduling server is used as the central node. All robots and power storage units are connected to the central node, which uniformly maintains the device status and routing relationships, and is responsible for forwarding business information and coordinating tasks.
[0037] However, in the above scheme, when the central node experiences abnormalities such as power outages or network outages, the communication capability between non-functional devices immediately fails, resulting in poor communication stability between wireless devices.
[0038] In view of the above, embodiments of this application provide a wireless communication scheme to improve the communication stability between wireless devices.
[0039] The wireless communication scheme provided in this application does not limit the type of wireless communication device. The wireless communication device can be any device adapted to the communication scenario. For example, as mentioned earlier, in a robot autonomous charging and battery swapping scenario, the wireless communication device can include the robot and the battery compartment. In the wireless communication scheme provided in this application, the gateway node is a software module running in the wireless communication device, responsible for receiving and sending service information, as detailed later.
[0040] In addition, before the solution provided in this application is implemented, each wireless communication device needs to join the multicast group and discover other multicast members in advance. The specific process is as follows.
[0041] First, after the gateway node of the wireless communication device starts up, it reads the multicast configuration. The multicast configuration may include, but is not limited to: whether multicast is enabled, group identifier (ID), multicast base address, port, time to live (TTL), network interface, member timeout time, and security factor.
[0042] Next, the gateway node calculates the multicast address based on the multicast base address and the group ID. For example, the group ID can be mapped to a field of the IPv4 management domain multicast address to form the multicast address corresponding to the same service group.
[0043] Then, the gateway node adds the corresponding multicast address and port, and starts listening on the unicast port.
[0044] Finally, the gateway node sends a management message to the multicast group to obtain the status of other multicast members. See subsequent embodiments for details, which will not be elaborated here.
[0045] The wireless communication scheme provided in the embodiments of this application will be described in detail below with reference to the flowchart.
[0046] See Figure 1 This is a flowchart illustrating the first wireless communication method provided in this application embodiment. The method is applied to a gateway node deployed on a wireless communication device, where the wireless communication device and other wireless communication devices access the same wireless local area network and join the same multicast group. The method includes steps S101 to S104.
[0047] Step S101: In response to receiving member status information sent by other wireless communication devices, the gateway node updates the multicast member table maintained locally based on the member status information.
[0048] The aforementioned member status information may include, but is not limited to: HELLO messages, MEMBER_LIST messages, heartbeat messages, and GOODBYE messages, which will be introduced one by one below.
[0049] HELLO message:
[0050] After a wireless communication device joins a multicast group, it sends a HELLO message to the multicast address of the multicast group. Alternatively, after receiving a MEMBER_QUERY message from another wireless communication device, the device sends a HELLO message to the multicast address of the multicast group. The HELLO message carries information such as its own device ID, device type, protocol version, startup time, capability information, and unicast listening port, so that other wireless devices in the multicast group can know its membership status.
[0051] After receiving a HELLO message from another wireless communication device, the gateway node can record or update the membership status of the other wireless communication device in the local multicast member table.
[0052] MEMBER_LIST message:
[0053] In response to a member query message sent by another wireless communication device, the wireless communication device can send a MEMBER_LIST message to the querying party or multicast address. The MEMBER_LIST message can carry its own member status information similar to the HELLO message, or it can carry all member status information maintained locally by itself.
[0054] After receiving a MEMBER_LIST message from another wireless communication device, the gateway node can record or update the member status of the other wireless communication device in its local multicast member table.
[0055] Heartbeat message:
[0056] After a wireless communication device joins a multicast group, it can send heartbeat messages at high frequency to the multicast address of the multicast group. The heartbeat message can carry a short device identifier.
[0057] After receiving a heartbeat message from another wireless communication device, the gateway node can update the sender's last active time in the local multicast member table.
[0058] In one possible implementation, when a gateway node does not receive a heartbeat message from a wireless communication device within a suspected timeout threshold, it can set the member state of that wireless communication device to a suspected state; when a gateway node does not receive a heartbeat message from a wireless communication device within an offline timeout threshold, it can set the member state of that wireless communication device to an offline state.
[0059] GOODBYE message:
[0060] After a wireless communication device leaves a multicast group, it can send a GOODBYE message to the multicast address of the multicast group.
[0061] After receiving a GOODBYE message from another wireless communication device, the gateway node can set the member status of that wireless communication device in the local multicast member table to offline.
[0062] Step S102: Upon receiving the first service information output by the local service bus, the gateway node determines the information recipient based on the information type of the first service information.
[0063] The aforementioned local service bus refers to the software communication middleware running inside the wireless communication device, responsible for the unified transmission and reception of service information. The types of information mentioned may include, but are not limited to, service subscription information and service call information.
[0064] Specifically, the correspondence between various information types and information recipients can be pre-set, so that the information recipient corresponding to the information type can be determined based on the above correspondence.
[0065] Step S103: When the information recipient is unique, the gateway node determines the communication address of the information recipient based on the multicast member table and sends the first service information to the communication address using unicast.
[0066] Specifically, the gateway node can query the multicast member table to determine whether the IP address and unicast port of the information receiver are recorded. If so, the IP address and unicast port of the information receiver are determined as the communication address.
[0067] Step S104: When the information recipient is not unique, the gateway node sends the first service information to the multicast address of the multicast group using multicast.
[0068] It should be noted that the wireless communication process shown in the embodiments of this application may include only step S103 or only step S104, or may include both steps S103 and S104.
[0069] As can be seen from the above, in the solution provided by the embodiments of this application, each wireless communication device maintains its own member status and sends service information through its own operating gateway node, without relying on the management and scheduling of the central node, thus avoiding the problem of communication failure caused by the abnormality of the central node and improving the communication stability and reliability between wireless devices.
[0070] In addition, all wireless communication devices join the same multicast and communicate service information within the same multicast. The information receiver is determined autonomously by the gateway node, eliminating the need to configure fixed IPs and static routes for each wireless communication device, thus reducing the configuration complexity of wireless communication.
[0071] To improve the reliability of multicast communication and increase the success rate of information delivery, in one possible implementation, the gateway node can add an information sequence number and an information acknowledgment request to the first service information to obtain the fourth service information, and send the fourth service information to the multicast address of the multicast group using multicast. Then, in response to not receiving a reception acknowledgment within a set timeout period, it returns to the step of sending the fourth service information to the multicast address of the multicast group using multicast.
[0072] The aforementioned information confirmation request instructs the information recipient to send back a confirmation message after receiving the service information. Thus, if the gateway node does not receive a confirmation message within a set timeout period, it can determine that a network anomaly or packet loss has occurred, thereby triggering the service information retransmission process.
[0073] In this way, packet retransmission is achieved through the information confirmation mechanism, transforming unreliable multicast communication into reliable communication, improving the information delivery success rate, and thus improving the consistency of business status.
[0074] In order to further improve communication reliability while taking into account transmission overhead, in one possible implementation, if the first service information fails to be sent, the first service information is sent to the multicast address of the multicast group via multicast.
[0075] Sending failures include, but are not limited to: the multicast member table not recording the recipient's communication address, unicast sending failure, and message acknowledgment timeout.
[0076] In other words, when there is only one recipient of information, unicast is used first to send service information in order to reduce transmission overhead; if unicast transmission fails, it falls back to reliable multicast for communication, thus taking into account the reliability of communication between wireless devices.
[0077] To improve communication security and compatibility, in one possible implementation, the gateway node can derive session keys using group-level security factors to encrypt and authenticate the payloads of multicast and unicast transmitted service messages. Additionally, the messages are parsed using a tag-length-value (TLV) format, ignoring unknown tag fields in the message during the parsing process.
[0078] Additionally, when the unicast port field of the corresponding device in the multicast member table is empty, the gateway node can directly treat it as unicast unavailable and execute multicast transmission.
[0079] The following section provides a detailed explanation of how to determine the recipient of information based on its type.
[0080] In order to achieve automatic conversion and bridging between service subscription information and wireless communication channel information, and to improve the scalability and maintainability of wireless communication services, in one possible implementation, when the information type of the first service information is service subscription information, the information recipient can be determined in different ways depending on whether the first service information carries recipient information.
[0081] Specifically, if the first business information carries recipient information, the gateway node can determine the information recipient based on the recipient information; and / or, if the first business information does not carry recipient information, the gateway node can determine the information recipient corresponding to the information publishing topic from the business bridging rules.
[0082] The aforementioned business subscription information refers to business information generated using a publish-subscribe mechanism. Specifically, one party, as a subscriber, can subscribe to business information with a defined topic, while the other party, as a publisher, sends business messages with the defined topic to the network. If the subscriber recognizes that the business message belongs to the topic it has subscribed to, it can receive the aforementioned business information.
[0083] As can be seen, topic is the core identifier for information classification and routing. It is used to uniquely identify a type of information and ensure accurate matching and transmission of information between the publishing end and the subscription end.
[0084] In view of the above, this application provides a second wireless communication method.
[0085] See Figure 2 This is a flowchart illustrating a second wireless communication method provided in an embodiment of this application. The method includes the following steps S201 to S207:
[0086] Step S201: Determine the information publishing topic corresponding to the first business information from the set business bridging rules.
[0087] Specifically, for business subscription information, the business bridging rules can record the correspondence between local topics and multicast topics. In this way, the gateway node can determine the multicast topic corresponding to the first business information as the information publishing topic.
[0088] For example, the business bridging rule can record that the local topic="battery.status" is mapped to the multicast topic="battery_broadcast". In this case, if the local topic of the first business information is "battery.status", the gateway node can use "battery_broadcast" as the information publishing topic.
[0089] Step S202: Determine whether the first service information carries recipient information. If yes, proceed to step S203; otherwise, proceed to step S204.
[0090] Step S203: Determine the information recipient based on the recipient information.
[0091] The recipient information may include, but is not limited to, device identifier (device_id) or device type (device_type).
[0092] If the recipient information is specified in the payload of the first service information, the wireless communication device corresponding to the device identifier indicated in the recipient information can be directly identified as the information recipient, or the wireless communication device corresponding to the device type can be identified as the information recipient.
[0093] In cases where the first service information indicates both a device identifier and a device type, the wireless communication device corresponding to the device identifier shall be prioritized as the information recipient.
[0094] Step S204: Determine the information recipient corresponding to the information publishing topic from the business bridging rules.
[0095] The business bridging rules can also record the default recipient (device identifier or device type) corresponding to the information publishing topic. If the recipient information is not specified in the payload of the first business information, the default recipient indicated in the business bridging rules can be determined as the information recipient.
[0096] In cases where the service bridging rules simultaneously record the device identifier or device type of the default receiver, the wireless communication device corresponding to the device identifier will be prioritized as the information receiver.
[0097] Step S205: Determine whether the information recipient is unique. If yes, proceed to step S206; otherwise, proceed to step S207.
[0098] Step S206: Send the first service information carrying the information publishing topic to the communication address using unicast.
[0099] Step S207: Send the first service information carrying the information publishing topic to the multicast address of the multicast group using multicast method.
[0100] In this way, the first service information also carries the information publishing topic, so the wireless communication device that receives the first service information can publish the first service information to the corresponding topic of the local service bus, realizing the automatic conversion and bridging between service subscription information and wireless communication channel information.
[0101] In one possible implementation, the gateway node may, in response to receiving second service information of type service subscription information, determine the information receiving topic of the second service information from the service bridging rules and publish the second service information to the information receiving topic of the local service bus.
[0102] In this way, the gateway node can publish the received second service information to the corresponding topic on the local service bus, realizing the automatic conversion and bridging between service subscription information and wireless communication channel information.
[0103] In order to achieve automatic conversion and bridging between service call information and wireless communication channel information, and to improve the scalability and maintainability of wireless communication services, in one possible implementation, when the information type of the first service information is service call information, the information recipient can be determined from the first service information and a unique request identifier can be bound to the first service information based on the service bridging rules.
[0104] The aforementioned service call information may include, but is not limited to, remote procedure call (RPC) information.
[0105] The core logic of RPC technology is that a local machine can call a service on another device just like calling a local service. The underlying network transmission details are hidden. The main process includes: the client initiates the call, the message is transmitted, the server parses and processes the message, the response is sent back, and the client receives the returned result.
[0106] In view of the above, this application provides a third wireless communication method.
[0107] See Figure 3 This is a flowchart illustrating a third wireless communication method provided in an embodiment of this application. The method includes the following steps S301 to S304:
[0108] Step S301: Determine the information recipient based on the recipient information carried in the first business information, and generate the first request identifier of the first business information based on the set business bridging rules.
[0109] Specifically, for service call information, the business bridging rules can stipulate that routing must be enabled in the load of such information, and a unique receiver identifier must be specified in the load. In this way, the gateway node can identify the wireless communication device corresponding to the receiver identifier carried in the first service information as the information receiver.
[0110] The gateway node can generate a unique identifier for this service call based on the constraint parameters recorded in the business bridging rules. This identifier serves as the first request identifier and is used to associate the service call request with the service response.
[0111] The gateway node can also use flags to mark the first business information as rpc_request information according to the business bridging rules. Then, in response to the business information being marked, it can trigger the subsequent information sending process based on whether the information recipient is unique.
[0112] Step S302: Determine whether the information recipient is unique. If yes, proceed to step S303; otherwise, proceed to step S304.
[0113] Step S303: Send the first service information carrying the first request identifier to the communication address using unicast.
[0114] Step S304: Send the first service information carrying the first request identifier to the multicast address of the multicast group using multicast method.
[0115] In this way, for a wireless communication device that receives the first service information carrying the first request identifier, it can generate feedback information with the same first request identifier and send it back to the gateway node, thereby realizing the automatic conversion and bridging between service call information and wireless communication channel information.
[0116] In one possible implementation, the gateway node may also respond to receiving third service information of type service call information, determine the second request identifier carried in the third service information, generate feedback information carrying the second request identifier, and send the feedback information to the information sender of the third service information.
[0117] Thus, for a wireless communication device that receives third service information carrying a second request identifier, it can associate the feedback information with the service call request based on the second request identifier.
[0118] The following section will provide a detailed introduction to the bridging and conversion methods of gateway nodes for different types of information.
[0119] This device publishes service subscription information (topic information) to multicast: After receiving the topic information output by the local service bus, the gateway node of this device sends the topic information to the multicast group according to the default route indicated in the service bridging rules or the route indicated by the payload of the topic information.
[0120] This device receives multicast topic information: After receiving topic information, the gateway node of this device matches the business bridging rules according to the topic information and publishes the topic information to the corresponding local business topic.
[0121] When this device calls a remote multicast service: After receiving the service call information (RPC information) output by the local service bus, the gateway node of this device extracts the unique target device ID from the RPC information, generates a unique request identifier based on the service bridging rules and marks the request type (request), then sends the RPC request information to the target device, and returns the RPC response fed back by the target device to the local RPC server based on the unique request identifier.
[0122] This device provides services for multicast calls: After receiving an RPC request sent by the target device in the multicast, the gateway node of this device calls the local business RPC client based on the business bridging rules, marks the response type (response), and constructs an RPC response carrying the same request identifier to return to the target device.
[0123] Building upon the preceding explanation, the following section will use the scenario of autonomous charging and battery swapping for robots as an example to provide an intuitive introduction to the role of gateway services.
[0124] See Figure 4The robot and the power storage unit each run a local business module, a local business bus, and a gateway service. The local business bus acts as a software communication middleware, transmitting business information generated by the local business module to the gateway service. The gateway service, based on predefined bridging rules, converts the business information into information adapted for multicast / unicast communication domains, and then sends the converted information to the local area network (LAN). In this way, the robot's gateway service and the power storage unit's gateway service can exchange business data through LAN communication.
[0125] Next, we will take the scenario of autonomous charging and battery swapping of robots as an example to give an intuitive introduction to the RPC information interaction process between robots and battery compartments.
[0126] See Figure 5 The diagram shows the signaling flow of the RPC information exchange process, which includes:
[0127] The robot business module generates RPC information (step S501); the robot gateway service parses the business bridging rules and extracts the power storage device identifier from the RPC information (step S502); the robot gateway service initiates an RPC request carrying a unique ID to the power storage gateway service (step S503); the power storage gateway service determines the local RPC service based on the business bridging rules (step S504); the power storage gateway service calls the local RPC service to the power storage business module (step S505); the power storage business module sends a response result back to the power storage gateway service (step S506); the power storage gateway service sends an RPC response carrying a unique ID back to the robot gateway service (step S507); the robot gateway service forwards the RPC response to the robot business module (step S508).
[0128] When the robot gateway service initiates an RPC request carrying a unique ID to the power warehouse gateway service, it uses the unicast-first, failure-rollback-reliable multicast method described above to send the request.
[0129] As mentioned above, the embodiments of this application do not limit the wireless communication devices that apply this solution. For example, the wireless communication device may include at least one of a robot and a battery swapping device. When the wireless communication device includes a robot, the recipient of the robot's first service information includes one or more battery swapping devices. The robot's first service information includes at least one of the following information of the robot: battery status information, battery swapping request information, task execution status information, and location information. And / or, when the wireless communication device includes a battery swapping device, the recipient of the battery swapping device's first service information includes one or more robots. The wireless communication device's first service information includes at least one of the following information of the battery swapping device: battery compartment status information, request response information, and location information.
[0130] The following example illustrates a typical application scenario of the embodiments of this application.
[0131] In one possible implementation, in a robot battery swapping scenario, the wireless communication devices that need to perform wireless communication include the robot and the battery swapping device. The recipients of the robot's first business information include one or more battery swapping devices, and the recipients of the battery swapping device's first business information include one or more robots.
[0132] Specifically, for the robot, it can send business information for battery swapping to one or more designated battery swapping devices, or send the above business information to all battery swapping devices. Of course, the robot can also synchronize its other business information with other robots. For the battery swapping device, it can feed back business information for battery swapping to the robot that requests battery swapping. Of course, the battery swapping device can also synchronize business information describing its own battery compartment status to designated robots or all robots.
[0133] In one possible implementation, the robot's first business information includes at least one of the following: battery status information, battery swapping request information, task execution status information, and location information; the wireless communication device's first business information includes at least one of the following: battery compartment status information, request response information, and location information.
[0134] The following is a brief explanation of one communication process in the above scenario.
[0135] The gateway nodes of robots and battery swapping devices continuously update and maintain the multicast member table locally based on the member status information fed back by other robots or other battery swapping devices.
[0136] For robots, when a battery swapping requirement is detected, the robot's gateway node generates battery swapping information such as battery status, battery swapping request, and task execution status, and identifies one or more battery swapping devices as information recipients. Then, depending on whether the recipient is unique, it queries the multicast member table to determine the communication address of the battery swapping device or directly uses the multicast address as the communication address of the battery swapping device, and sends the battery swapping information to the battery swapping device based on the communication address.
[0137] For battery swapping equipment, after receiving the battery swapping information sent by the robot, the gateway node of the battery swapping equipment determines the target battery with sufficient power based on the robot's task execution requirements and the battery status in its own battery compartment. It then generates response information including its own battery compartment status, a request response to indicate the target battery, and its own location. After confirming that the recipient is a robot, it can directly query the multicast member table to determine the robot's communication address and send response information to the robot based on the communication address.
[0138] Once the robot's gateway node receives the response information from the battery swapping equipment's gateway node, it can transmit the response information to the local battery swapping service to trigger the robot to go to the battery swapping equipment to replace the battery. This will not be elaborated further here.
[0139] In the above scenario, both the robot and the battery swapping device maintain their own member status and send business information through their own operating gateway nodes, without relying on the management and scheduling of a central node. This avoids communication failures caused by central node malfunctions and improves the communication stability and reliability of the battery swapping service. Furthermore, the robot and the battery swapping device join the same multicast and communicate within the same multicast. The information recipient is determined autonomously by the gateway node, eliminating the need to configure fixed IPs and static routes for each robot and battery swapping device, thus reducing the complexity of communication configuration in the battery swapping scenario.
[0140] Corresponding to the above-described wireless communication method, this application also provides a wireless communication device.
[0141] See Figure 6 This is a schematic diagram of a wireless communication device provided in an embodiment of this application. The device is applied to a gateway node, which is deployed on a wireless communication device. The wireless communication device connects to the same wireless local area network and joins the same multicast group as other wireless communication devices. The device includes the following modules:
[0142] The multicast member table update module 601 is used to update the locally maintained multicast member table based on the member status information received from other wireless communication devices in response to the member status information received.
[0143] The information receiver determination module 602 is used to determine the information receiver based on the information type of the first service information in response to receiving the first service information output by the local service bus.
[0144] The information sending module 603 is used to determine the communication address of the information recipient based on the multicast member table when the information recipient is unique, and send the first service information to the communication address in a unicast manner; and / or, when the information recipient is not unique, send the first service information to the multicast address of the multicast group in a multicast manner.
[0145] As can be seen from the above, in the solution provided by the embodiments of this application, each wireless communication device maintains its own member status and sends service information through its own operating gateway node, without relying on the management and scheduling of the central node, thus avoiding the problem of communication failure caused by the abnormality of the central node and improving the communication stability and reliability between wireless devices.
[0146] In addition, all wireless communication devices join the same multicast and communicate service information within the same multicast. The information receiver is determined autonomously by the gateway node, eliminating the need to configure fixed IPs and static routes for each wireless communication device, thus reducing the configuration complexity of wireless communication.
[0147] In one possible implementation, where the information recipient is unique, the device further includes:
[0148] If the first service information fails to be sent, the first service information is sent to the multicast address of the multicast group via multicast.
[0149] This can improve the reliability of multicast communication and increase the success rate of message delivery.
[0150] In one possible implementation, when the information type of the first business information is business subscription information, determining the information recipient includes:
[0151] If the first service information carries recipient information, the information recipient is determined based on the recipient information; and / or, if the first service information does not carry recipient information, the information recipient corresponding to the first service information is determined from the set service bridging rules; the information publishing topic corresponding to the first service information is determined from the service bridging rules.
[0152] Sending the first service information to the communication address using unicast includes:
[0153] The first service information carrying the information publishing topic is sent to the communication address using a unicast method.
[0154] Sending the first service information to the multicast address of the multicast group using a multicast method includes:
[0155] The first service information carrying the information publishing topic is sent to the multicast address of the multicast group using a multicast method.
[0156] In one possible implementation, the device further includes:
[0157] In response to receiving second service information of type service subscription information, the gateway node determines the information receiving topic of the second service information from the service bridging rules;
[0158] The gateway node publishes the second service information to the information receiving topic of the local service bus.
[0159] This enables automatic conversion and bridging between service subscription information and wireless communication channel information, improving the scalability and maintainability of wireless communication services.
[0160] In one possible implementation, when the information type of the first business information is service call information, determining the information recipient includes:
[0161] The recipient is determined based on the recipient information carried in the first business information, and a first request identifier of the first business information is generated based on the set business bridging rules. The first request identifier is used to associate service call request and service response.
[0162] Sending the first service information to the communication address using unicast includes:
[0163] The first service information carrying the first request identifier is sent to the communication address using a unicast method;
[0164] Sending the first service information to the multicast address of the multicast group using a multicast method includes:
[0165] The first service information carrying the first request identifier is sent to the multicast address of the multicast group using a multicast method.
[0166] In one possible implementation, the device further includes:
[0167] Upon receiving third service information of type service call information, the gateway node determines the second request identifier carried in the third service information.
[0168] The gateway node generates feedback information carrying the second request identifier and sends the feedback information to the information sender of the third service information.
[0169] This enables automatic conversion and bridging between service call information and wireless communication channel information, improving the scalability and maintainability of wireless communication services.
[0170] In one possible implementation, sending the first service information to the multicast address of the multicast group using a multicast method includes:
[0171] Add an information sequence number and an information confirmation request to the first service information to obtain the fourth service information;
[0172] The fourth service information is sent to the multicast address of the multicast group using a multicast method.
[0173] If no confirmation of receipt is received within the set timeout period, the process returns to the step of sending the fourth service information to the multicast address of the multicast group using multicast.
[0174] This can improve the reliability of multicast communication and increase the success rate of message delivery.
[0175] Corresponding to the above-described robot depalletizing method, this application also provides an electronic device, a storage medium, and a program product.
[0176] This application also provides an electronic device, such as... Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.
[0177] Memory 703 is used to store computer programs;
[0178] The processor 701, when executing the program stored in the memory 703, implements the aforementioned wireless communication method.
[0179] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0180] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0181] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0182] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be 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, or discrete hardware components.
[0183] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described wireless communication methods.
[0184] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the wireless communication methods described above.
[0185] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0186] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0187] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0188] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A wireless communication method, characterized in that, Applied to a gateway node, the gateway node being deployed on a wireless communication device, the wireless communication device and other wireless communication devices accessing the same wireless local area network and joining the same multicast group, the method includes: In response to receiving member status information sent by other wireless communication devices, the gateway node updates its locally maintained multicast member table based on the member status information. The gateway node responds to receiving the first service information output by the local service bus and determines the information recipient based on the information type of the first service information; If the information recipient is unique, the gateway node determines the communication address of the information recipient based on the multicast membership table and sends the first service information to the communication address using unicast; and / or, When the information recipient is not unique, the gateway node sends the first service information to the multicast address of the multicast group using a multicast method.
2. The method according to claim 1, characterized in that, When the information recipient is unique, the method further includes: If the first service information fails to be sent, the gateway node sends the first service information to the multicast address of the multicast group using a multicast method.
3. The method according to claim 1 or 2, characterized in that, When the information type of the first business information is business subscription information, determining the information recipient includes: The information publishing topic corresponding to the first business information is determined from the set business bridging rules; if the first business information carries recipient information, the information recipient is determined based on the recipient information, and / or, if the first business information does not carry recipient information, the information recipient corresponding to the information publishing topic is determined from the business bridging rules. Sending the first service information to the communication address using unicast includes: The first service information carrying the information publishing topic is sent to the communication address using a unicast method. Sending the first service information to the multicast address of the multicast group using a multicast method includes: The first service information carrying the information publishing topic is sent to the multicast address of the multicast group using a multicast method.
4. The method according to claim 3, characterized in that, The method further includes: In response to receiving second service information of type service subscription information, the gateway node determines the information receiving topic of the second service information from the service bridging rules; The gateway node publishes the second service information to the information receiving topic of the local service bus.
5. The method according to claim 1 or 2, characterized in that, When the information type of the first business information is service call information, determining the information recipient includes: The recipient is determined based on the recipient information carried in the first business information, and a first request identifier of the first business information is generated based on the set business bridging rules. The first request identifier is used to associate service call request and service response. Sending the first service information to the communication address using unicast includes: The first service information carrying the first request identifier is sent to the communication address using a unicast method; Sending the first service information to the multicast address of the multicast group using a multicast method includes: The first service information carrying the first request identifier is sent to the multicast address of the multicast group using a multicast method.
6. The method according to claim 5, characterized in that, The method further includes: Upon receiving third service information of type service call information, the gateway node determines the second request identifier carried in the third service information. The gateway node generates feedback information carrying the second request identifier and sends the feedback information to the information sender of the third service information.
7. The method according to any one of claims 1 to 6, characterized in that, Sending the first service information to the multicast address of the multicast group using a multicast method includes: Add an information sequence number and an information confirmation request to the first service information to obtain the fourth service information; The fourth service information is sent to the multicast address of the multicast group using a multicast method. If no confirmation of receipt is received within the set timeout period, the process returns to the step of sending the fourth service information to the multicast address of the multicast group using multicast.
8. The method according to any one of claims 1 to 7, characterized in that, The wireless communication device includes at least one of a robot and a battery swapping device, and the method further includes: In the case where the wireless communication device includes the robot, the recipient of the robot's first service information includes one or more of the battery swapping devices, and the robot's first service information includes at least one of the following: battery status information, battery swapping request information, task execution status information, and location information. And / or, In the case where the wireless communication device includes the battery swapping device, the information recipient of the first service information of the battery swapping device includes one or more of the robots, and the first service information of the wireless communication device includes at least one of the following information of the battery swapping device: battery compartment status information, request response information, and location information.
9. A wireless communication device, characterized in that, An apparatus for use in a gateway node, wherein the gateway node is deployed on a wireless communication device, and the wireless communication device connects to the same wireless local area network and joins the same multicast group as other wireless communication devices, the apparatus comprising: The multicast member table update module is used to update the locally maintained multicast member table based on the member status information received from other wireless communication devices in response to the member status information received. The information receiver determination module is used to determine the information receiver based on the information type of the first service information in response to receiving the first service information output by the local service bus. The information sending module is configured to, when the information recipient is unique, determine the communication address of the information recipient based on the multicast member table and send the first service information to the communication address using unicast; and / or, when the information recipient is not unique, send the first service information to the multicast address of the multicast group using multicast.
10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method according to any one of claims 1 to 8.