Wireless communication method, terminal equipment, server and readable storage medium

By establishing multiple wireless communication links between the terminal device and the station-side server and using the precise time protocol for time synchronization, the problem of insufficient wireless communication stability in the battery swap site scenario is solved, and stable information resource sharing between the terminal device and the station-side server is realized and parking control is controlled in complex scenarios.

CN119629775AActive Publication Date: 2025-03-14安徽蔚来智驾科技有限公司
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510149167.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-03-14
Estimated Expiration
2045-02-11

AI Technical Summary

Technical Problem

In the battery swap site scenario, the stability of wireless communication between the terminal equipment and the station server is difficult to ensure, especially in urban environments with dense population and complex traffic, the parking plan for the vehicle-side parking in extreme scenarios is not enough to meet the needs.

Method used

By establishing at least two types of wireless communication links between the terminal device and the station-side server, subscription and publication of data topics are realized, and time synchronization is performed through the Precision Time Protocol (PTP), ensuring the stability and accuracy of data transmission.

Benefits of technology

The wireless communication stability and information resource sharing capabilities between the terminal device and the station server are improved, and the stable publication and subscription of service messages can be ensured through another link when one type of wireless communication link is unavailable, and the parking needs of battery swap vehicles in complex scenarios can be met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629775A_ABST
    Figure CN119629775A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to a wireless communication method, terminal equipment, a server and a readable storage medium, and aims to solve the technical problem of how to improve the stability of a wireless communication process between the terminal equipment and a station end server. In order to achieve the purpose, a terminal device and a station end server are in wireless communication connection through at least two types of wireless communication links, and the terminal device subscribes and publishes service messages of a first data theme and a second data theme through the at least two types of wireless communication links based on preset service requirements. Effective information resource sharing between the station end server and the terminal equipment can be realized. And under the condition that one type of wireless communication link is unavailable, stable release and subscription of the service messages of the first data theme and the second data theme can still be ensured, and stable information resource sharing between the station end server and the terminal equipment can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a wireless communication method, terminal equipment, server and readable storage medium. Background Art

[0002] At present, battery swap station manufacturers in the industry all perform battery swapping by manually parking at the battery swap station. The battery swap station has a small space and a slope, which brings challenges to each battery swap user. The vehicle-side parking solution not only liberates users but also reduces collision accidents and improves parking speed and success rate. However, since most battery swap stations are located in densely populated urban areas with complex traffic scenes, there are still some extreme scenarios that cannot be met by vehicle-side parking alone. In addition, the vehicle-side parking solution also has high requirements for vehicle-side sensors and computing power.

[0003] Based on these problems, it is proposed to control the vehicle by installing lidar and sensors at the station end of the battery swap station. The station end sensors have a better perspective to handle more complex scenarios, and can further improve the parking rate. There is no longer a high requirement for vehicle end sensors and computing power, which makes it possible to open the battery swap station to more external customers in the future. However, the station end and the vehicle end communicate through a wireless network. How to achieve stable data transmission between the station end and the vehicle end is the key to ensure the success of station end parking.

[0004] Accordingly, the art needs a new wireless communication solution to solve the above problems. Summary of the invention

[0005] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the technical problem of how to improve the stability of the wireless communication process between the terminal device and the station server.

[0006] In a first aspect, a wireless communication method is provided, the method being applied to a terminal device, wherein the terminal device is wirelessly connected to a station-side server via at least two types of wireless communication links; the method comprising: Based on preset business requirements, subscribing to a first data topic through at least two types of wireless communication links; and receiving business messages of the first data topic published by the station-side server through at least two types of wireless communication links; and Based on the business demand, a business message of a second data topic is published to the station-side server through at least two types of wireless communication links.

[0007] In a technical solution of the wireless communication method, the service message of the first data subject includes at least one service message; each of the service messages includes the precise time protocol time at which the service message is released; The receiving, through at least two types of wireless communication links, a service message of the first data topic published by the station-side server comprises: For each of the received service messages, retaining the precise time protocol time of the latest service message as the latest time of the first data subject; When the next service message of the first data subject is received, the service message is deduplicated according to the precise time protocol time of the next service message and the latest time to achieve reception of the service message of the first data subject.

[0008] In a technical solution of the wireless communication method, deduplication of the service message according to the precise time protocol time of the next service message and the latest time includes: Comparing the precise time agreement time of the next service message with the latest time; If the precise time agreement time of the next service message is less than or equal to the latest time, the service message is ignored; If the precise time protocol time of the next service message is greater than the latest time, the service message is retained, and the precise time protocol time of the service message is updated to the latest time.

[0009] In a technical solution of the above wireless communication method, the method further includes: In response to a preset operation, resetting the latest time of the first data subject; Among them, the preset operation is at least one of successfully receiving all business messages of the first data topic, canceling the subscription to the business messages of the first data topic, and invalidating the subscription to the business messages of the first data topic.

[0010] In a technical solution of the wireless communication method, the service message includes the precise time protocol time and the world standard time of the service message; the method further includes: Acquire the precision time protocol time difference between the station server and the terminal device according to the precision time protocol time published by the service message and the world standard time; According to the precision time protocol time difference, time synchronization of the precision time protocol between the terminal device and the station-side server is achieved.

[0011] In a technical solution of the wireless communication method, the obtaining of the precise time protocol time difference between the station server and the terminal device includes: Obtaining a world standard time difference between the world standard time of the terminal device and the station server; Acquire a first time deviation between the precise time protocol time and the time standard time of the terminal device; Obtaining a second time deviation between the precise time protocol time and the time standard time of the station-side server; The precision time protocol time difference is acquired according to the world standard time difference, the first time offset and the second time offset.

[0012] In a second aspect, a wireless communication method is provided, the method being applied to a station-side server, the station-side server being wirelessly connected to a terminal device via at least two types of wireless communication links; the method comprising: Based on preset business requirements, publishing business messages of the first data topic to the terminal device through at least two types of wireless communication links; and Based on the business needs, subscription to the second data topic is performed through at least two types of wireless communication links; and business messages of the second data topic published by the terminal device through at least two types of wireless communication links are received.

[0013] In a technical solution of the wireless communication method, the service message of the second data subject includes at least one service message; each of the service messages includes the precise time protocol time at which the service message is released; The receiving a service message of the second data topic published by the terminal device includes: For each of the received service messages, retaining the precise time protocol time of the latest service message as the latest time of the second data subject; When the next business message of the second data subject is received, the business message is deduplicated according to the precise time protocol time of the next business message and the latest time to achieve reception of the business message of the second data subject.

[0014] In a technical solution of the wireless communication method, deduplication of the service message according to the precise time protocol time of the next service message and the latest time includes: Comparing the precise time agreement time of the next service message with the latest time; If the precise time agreement time of the next service message is less than or equal to the latest time, the service message is ignored; If the precise time protocol time of the next service message is greater than the latest time, the service message is retained, and the precise time protocol time of the service message is updated to the latest time.

[0015] In a technical solution of the above wireless communication method, the method further includes: In response to a preset operation, resetting the latest time of the second data subject; Among them, the preset operation is at least one of successfully receiving all business messages of the second data topic, canceling the subscription to the business messages of the second data topic, and invalidating the subscription to the business messages of the second data topic.

[0016] In a technical solution of the wireless communication method, the service message includes the precise time protocol time and the world standard time of the service message; the method further includes: Acquire the precision time protocol time difference between the station server and the terminal device according to the precision time protocol time published by the service message and the world standard time; According to the precision time protocol time difference, time synchronization of the precision time protocol between the terminal device and the station-side server is achieved.

[0017] In a technical solution of the wireless communication method, the obtaining of the precise time protocol time difference between the station server and the terminal device includes: Obtaining a world standard time difference between the world standard time of the terminal device and the station server; Acquire a first time deviation between the precise time protocol time and the time standard time of the terminal device; Obtaining a second time deviation between the precise time protocol time and the time standard time of the station-side server; The precision time protocol time difference is acquired according to the world standard time difference, the first time offset and the second time offset.

[0018] In a third aspect, a terminal device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions of the above-mentioned wireless communication method is implemented.

[0019] In a fourth aspect, a station-side server is provided, which includes at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions of the above-mentioned wireless communication method is implemented.

[0020] In a fifth aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored therein, wherein the program codes are suitable for being loaded and run by a processor to execute the method described in any one of the technical solutions of the above-mentioned wireless communication method.

[0021] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects: In the implementation of the wireless communication method technical solution provided by the present application, the terminal device of the present application is wirelessly connected with the station-side server through at least two types of wireless communication links. The terminal device subscribes to the first data topic through at least two types of wireless communication links based on preset business needs, and receives the business message of the first data topic published by the station-side server; the terminal device can also publish the business message of the second data topic to the station-side server through at least two types of wireless communication links. Similarly, based on the preset business needs, the station-side server publishes the business message of the first data topic to the terminal device through at least two types of wireless communication links; the station-side server can also subscribe to the second data topic through at least two types of wireless communication links, and receive the business message of the second data topic published by the terminal device. Through the above configuration, the present application publishes and subscribes to the first data topic and the second data topic through at least two types of wireless communication links, which can realize effective information resource sharing between the station-side server and the terminal device. At the same time, the station-side server and the terminal device are wirelessly connected through at least two types of wireless communication links. When one type of wireless communication link is unavailable, the stable publishing and subscription of the business messages of the first data topic and the second data topic can still be ensured, which can realize stable information resource sharing between the station-side server and the terminal device.

[0022] Furthermore, the present application obtains the precise time protocol time difference between the station-side server and the terminal device through the precise time protocol time and the world standard time published by the business message; the precise time protocol time difference between the station-side server and the terminal device can be accurately obtained. Moreover, according to the precise time protocol time difference, the precise time protocol time between the terminal device and the station-side server is synchronized, and the precise time synchronization between the terminal device and the station-side server can be achieved, which effectively eliminates the influence of link delay on business messages. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them: Figure 1 is a flowchart of main steps of a wireless communication method according to an embodiment of the present application; Figure 2 This is a flow chart of main steps for a terminal device to deduplicate a service message of a first data topic according to an implementation of an embodiment of the present application; Figure 3 It is a flowchart of the main steps of a process of performing a precision time protocol time synchronization on a terminal device and a station server according to an implementation of an embodiment of the present application; Figure 4 It is a schematic diagram of the connection relationship between a terminal device and a station-side server according to an implementation method of an embodiment of the present application. DETAILED DESCRIPTION

[0024] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.

[0025] In the description of this application, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, memories, and may also include software parts, such as program codes, or a combination of software and hardware. The term "A and / or B" means all possible combinations of A and B, such as just A, just B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and may include just A, just B, or A and B. The singular terms "a" and "the" may also include plural forms.

[0026] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.

[0027] The user personal information processed by this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.

[0028] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.

[0029] Here we first explain some terms involved in this application.

[0030] A data topic is a channel for data exchange between nodes. A data topic can include one or more business messages.

[0031] Publisher: responsible for publishing business messages to data topics.

[0032] Subscribers receive business messages by subscribing to data topics.

[0033] MQTT (Message Queuing Telemetry Transport) is a message protocol based on the publish-subscribe paradigm under the ISO standard.

[0034] MQTT Broker (Message Queuing Telemetry Transport Server) is an intermediary entity that helps MQTT clients communicate. As a central hub, MQTT Broker can efficiently manage the flow of information between devices and applications. Specifically, MQTT Broker receives messages published by clients, filters them according to topics, and distributes them to subscribers.

[0035] PTP (Precision Time Protocol) is a high-precision protocol used to synchronize the clocks of network devices. It is usually used in local area networks (LANs) and can achieve sub-microsecond clock synchronization accuracy. UTC (Universal Time Coordinated) is a time measurement system based on the length of atomic time seconds and is as close to universal time as possible.

[0036] TLS (Transport Layer Security) is used to provide confidentiality, data integrity, and authenticity between two communicating applications.

[0037] TCP / UDP protocol, TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are the two most important protocols in the transport layer, providing the highest level of communication reliability for upper-layer users.

[0038] 4G (fourth generation mobile communication technology) is developed on the basis of 3G (third generation mobile communication technology), mainly using LTE (long term evolution) technology, providing higher data transmission rate and lower latency. 5G (fifth generation mobile communication technology) is further developed on the basis of 4G, using new wireless communication technologies such as millimeter wave and massive MIMO (multiple input multiple output), which greatly improves the transmission rate, spectrum efficiency and network capacity.

[0039] Wi-Fi, also known as "mobile hotspot" in Chinese, is a trademark of the Wi-Fi Alliance manufacturers as a brand certification for products. It is a wireless local area network communication technology based on the IEEE 802.11 standard.

[0040] V2X (Vehicle to Everything) is a vehicle-to-vehicle wireless communication technology that aims to connect vehicles with other things to achieve information exchange.

[0041] ‌Clockdiff tool‌ is a tool used to measure clock offset and delay between two hosts. It calculates network delay by comparing the timestamps between two systems. The Clockdiff tool works by sending a UDP packet to the target system, which immediately returns a packet after receiving it, and contains the current timestamp of its system clock in the packet. The Clockdiff command records the timestamps of the sent and received packets, and calculates the difference between the two timestamps to derive the clock offset.

[0042] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart of the main steps of a wireless communication method according to an embodiment of the present application. Figure 1 As shown, the wireless communication method in the embodiment of the present application mainly includes the following steps S101 to S106.

[0043] Step S101: Based on preset business requirements, a terminal device subscribes to a first data topic through at least two types of wireless communication links, wherein the station server and the terminal device are wirelessly connected through at least two types of wireless communication links.

[0044] In this embodiment, based on preset business requirements, the terminal device can subscribe to the first data topic through the wireless communication link. The first data topic refers to a data topic related to the business requirements, published by the station server, and subscribed by the terminal device.

[0045] In one implementation, the type of the wireless communication link may be a wireless communication link based on Wi-Fi, a wireless communication link based on mobile communication technology (such as 4G, 5G), a wireless communication link based on V2X, etc.

[0046] In one implementation, the station-side server may be a server installed in a battery swap station, a parking lot, etc. The terminal device may be a vehicle, a smart phone, a tablet computer, etc. The business demand may be a battery swap demand, a parking demand, etc.

[0047] In one implementation, different data topics may be divided according to specific business requirements, and each data topic may include one or more business messages.

[0048] In one implementation, subscription to the first data topic may be implemented through a subscription message, and the subscription message may include a device identifier of the terminal device.

[0049] Step S102: The station-side server publishes a service message of the first data topic to the terminal device through at least two types of wireless communication links.

[0050] In this embodiment, the service message of the first data topic is published by the station-side server.

[0051] Step S103: The terminal device receives a service message of the first data topic published by the station-side server through at least two types of wireless communication links.

[0052] In this embodiment, the terminal device can receive the service message of the first data topic published by the station-side server through at least two types of wireless communication links.

[0053] Step S104: Based on preset business requirements, the station-side server subscribes to the second data topic through at least two types of wireless communication links.

[0054] In this embodiment, the station-side server can subscribe to the second data topic through at least two types of wireless communication links, wherein the second data topic refers to a data topic related to business needs, published by the terminal device, and subscribed by the station-side server.

[0055] Step S105: The terminal device publishes a service message of the second data topic to the station-side server through at least two types of wireless communication links.

[0056] In this embodiment, the terminal device can publish a service message of the second data topic to the station-side server through at least two types of wireless communication links.

[0057] Step S106: The station-side server receives a service message of the second data topic published by the terminal device through at least two types of wireless communication links.

[0058] In this embodiment, the station-side server can receive the service message of the second data topic published by the terminal device through at least two types of wireless communication links.

[0059] In one embodiment, the wireless communication link may include a first wireless link and a second wireless link; the first wireless link may establish a direct wireless communication connection between the terminal device and the station server; the second wireless link may establish a wireless communication connection between the terminal device and the station server based on the cloud server.

[0060] For the first wireless link, the subscription message of the terminal device subscribing to the first data topic through the first wireless link may include the device identification of the terminal device. The station server can match the first data topic according to the device identification to obtain the business message of the first data topic, and send the business message of the first data topic to the terminal device based on the first wireless link.

[0061] For the second wireless link, the station-side server can publish a service message of the first data topic to the cloud server, and the terminal device can subscribe to the service message of the first data topic from the cloud server. The terminal device can publish a service message of the second data topic to the cloud server, and the station-side server can subscribe to the service message of the second data topic from the cloud server.

[0062] The following takes the example of a terminal device subscribing to a service message of a first data topic from a cloud server to illustrate the process of publishing and subscribing to service messages based on the second wireless link: Since the second wireless link needs to perform one-to-one transfer of business messages through the cloud server, the station-side server can send the business message of the published first data topic to the cloud server. The business message sent to the cloud server can have the following encapsulation format: 1. string buzz_msg saves the serialized content of the business message 2. string source_id The device ID of the business message sender (publisher) 3. string target_id The device ID of the service message receiver (subscriber) When the cloud server receives a subscription message from a terminal device subscribing to the first data topic, it can obtain the device identifier of the terminal device according to the subscription message. When the cloud server receives a service message of the first data topic published by the inbound server, it can match the device identifier of the terminal device with the device identifier of the receiving end in the encapsulation format of the service message. If the match is successful, the service message can be sent to the terminal device.

[0063] It should be noted that the process of the station server subscribing to the business message of the second data topic from the cloud server is similar to the process of the terminal device subscribing to the business message of the first data topic from the cloud server. For the sake of simplicity, it will not be repeated here.

[0064] Based on the method described in the above steps S101 to S106, the terminal device of the embodiment of the present application is wirelessly connected to the station-side server through at least two types of wireless communication links. The terminal device subscribes to the first data topic through at least two types of wireless communication links based on preset business needs, and receives the business message of the first data topic published by the station-side server; the terminal device can also publish the business message of the second data topic to the station-side server through at least two types of wireless communication links. Similarly, based on the preset business needs, the station-side server publishes the business message of the first data topic to the terminal device through at least two types of wireless communication links; the station-side server can also subscribe to the second data topic through at least two types of wireless communication links, and receive the business message of the second data topic published by the terminal device. Through the above configuration, the embodiment of the present application publishes and subscribes to the first data topic and the second data topic through at least two types of wireless communication links, which can realize effective information resource sharing between the station-side server and the terminal device. At the same time, the station-side server and the terminal device are wirelessly connected through at least two types of wireless communication links. When one type of wireless communication link is unavailable, the stable publishing and subscription of the business messages of the first data topic and the second data topic can still be ensured, which can realize stable information resource sharing between the station-side server and the terminal device.

[0065] In one implementation of the present application, each service message includes the precise time protocol time at which the service message is released. Figure 2 , Figure 2 FIG. 1 is a flow chart of the main steps of deduplicating the service message of the first data subject by a terminal device according to an implementation mode of an embodiment of the present application. Figure 2 As shown, the terminal device can deduplicate the service message of the first data topic according to the following steps S201 to S202: Step S201: For each received service message, the precise time protocol time of the latest service message is retained as the latest time of the first data subject.

[0066] In this embodiment, since the terminal device receives the service message of the first data topic through at least two types of wireless communication links, the service message sent on each wireless communication link is the same, but the time of arrival at the terminal device is different, then it is necessary to filter out the later arrived and repeated service messages, that is, to deduplicate the service messages, so as to avoid the service message of the first data topic received by the terminal device from generating state rollback and chaotic timing logic. For example, the station server publishes the service messages M1, M2, and M3 of the first data topic at three time points T1, T2, and T3, respectively. After the terminal device receives all the service messages through the wireless communication link based on Wi-Fi, it receives the service message M1 sent through the wireless communication link based on 4G / 5G. At this time, it is necessary to filter out M1 from the 4G / 5G wireless communication link to avoid the state rollback of the terminal device and the problem of chaotic timing logic. Therefore, for the first data topic, the terminal device can set the latest time of the first data topic, and use the precise time protocol time (publish_ptp_ts) when the latest service message received and retained by the terminal device is published as the latest time (latest_ts) of the first data topic.

[0067] Step S202: When the next business message of the first data subject is received, the business message is deduplicated according to the precise time protocol time and the latest time of the next business message to achieve reception of the business message of the first data subject.

[0068] In this embodiment, step S202 may further include the following steps S2021 to S2023: Step S2021: Compare the precise time agreement time of the next service message with the latest time.

[0069] Step S2022: If the precise time agreement time of the next service message is less than or equal to the latest time, the service message is ignored.

[0070] Step S2023: If the PTAP time of the next service message is greater than the latest time, the service message is retained and the PTAP time of the service message is updated to the latest time.

[0071] Specifically, when the terminal device receives the next service message of the first data topic, it can compare the precise time protocol time (publish_ptp_ts) when the next service message is published with the latest time (latest_ts). If publish_ptp_ts is less than or equal to latest_ts, it means that the next service message is a duplicate service message, and the service message can be ignored. If publish_ptp_ts is greater than latest_ts, the service message can be retained and the publish_ptp_ts of the service message can be updated to latest_ts. This can effectively avoid the situation where the terminal device receives duplicate service messages of the first data topic.

[0072] In one implementation, the terminal device may reset the latest time of the first data subject in response to a preset operation. The preset operation may be at least one of successfully receiving all service messages of the first data subject, canceling the subscription to the service message of the first data subject, and invalidating the subscription to the service message of the first data subject. Of course, those skilled in the art may also define the preset operation according to the needs of actual applications.

[0073] In one implementation of the embodiment of the present application, the station server may deduplicate the service message of the second data topic according to the following steps S301 to S302: Step S301: For each received service message, the precise time protocol time of the latest service message is retained as the latest time of the second data subject.

[0074] Step S302: When the next service message of the second data subject is received, the service message is deduplicated according to the precise time protocol time of the next service message and the latest time to achieve reception of the service message of the second data subject.

[0075] In this embodiment, step S302 may further include the following steps S3021 to S3023: Step S3021: Compare the precise time protocol time of the next service message with the latest time.

[0076] Step S3022: If the precise time protocol time of the next service message is less than or equal to the latest time, the service message is ignored.

[0077] Step S3023: If the PT Protocol time of the next service message is greater than the latest time, the service message is retained and the PT Protocol time of the service message is updated to the latest time.

[0078] In one implementation, the station-side server may reset the latest time of the second data subject in response to a preset operation. The preset operation may be at least one of successfully receiving all service messages of the second data subject, canceling the subscription to the service message of the second data subject, and invalidating the subscription to the service message of the second data subject. Of course, those skilled in the art may also define the preset operation according to the needs of actual applications.

[0079] It should be noted that the method by which the station server deduplicates the business messages of the second data subject is similar to the method by which the terminal device deduplicates the business messages of the first data subject, and for the sake of simplicity, it will not be repeated here.

[0080] In one implementation of the embodiment of the present application, the service message can be transmitted based on the Message Queue Telemetry Transport (MQTT) protocol.

[0081] In other implementations of the embodiments of the present application, business messages may also be transmitted based on other customized application layer protocols based on TCP / UDP.

[0082] In one implementation of the present application, please refer to the attached Figure 3 , Figure 3 FIG. 1 is a flow chart of the main steps of a process of performing a precise time protocol time synchronization on a terminal device and a station server according to an implementation of an embodiment of the present application. Figure 3 As shown, the service message may include the precision time protocol time and the world standard time published by the service message, and the time synchronization process of the precision time protocol time of the terminal device and the station server may include the following steps S401 and S402: Step S401: Obtain the precision time protocol time difference between the station server and the terminal device according to the precision time protocol time published in the service message and the world standard time.

[0083] In this embodiment, step S401 may further include the following steps S4011 to S4014: Step S4011: Obtain the world standard time difference between the world standard time of the terminal device and the station server.

[0084] Step S4012: Obtain a first time deviation between the precise time protocol time of the terminal device and the time standard time.

[0085] Step S4013: Obtain a second time deviation between the precise time protocol time of the station server and the time standard time.

[0086] Step S4014: Obtaining the precise time protocol time difference according to the world standard time difference, the first time deviation and the second time deviation In this implementation, time synchronization between the terminal device and the station server may be achieved by calculating a precise time protocol time difference between the terminal device and the station server.

[0087] Specifically, taking the calculation of the precise time protocol time difference on the station-side server side as an example, after a wireless communication connection is established between the terminal device and the station-side server (e.g., a wireless communication connection is established through a wireless communication link based on Wi-Fi), the terminal device can use the clockdiff tool to obtain the world standard time difference between the world standard time of the terminal device and the station-side server. The world standard time difference can be obtained according to the following formula (1): (1) in, is the universal time difference, is the world standard time of the station server, The UTC time of the terminal device.

[0088] The terminal device may calculate the first time deviation between the precise time protocol time of the terminal device and the time standard time according to the following formula (2).

[0089] (2) in, is the first time deviation, It is the precision time protocol time of the terminal device.

[0090] Terminal equipment can adjust the world standard time difference and first time deviation , sent to the station server through a time synchronization message. The station server can calculate the second time deviation between the precise time protocol time of the station server and the time standard time according to the following formula (3).

[0091] (3) in, is the second time deviation, It is the precise time protocol time of the station server.

[0092] The precise time protocol time difference can be obtained according to the world standard time difference, the first time deviation and the second time deviation according to the following formula (4): (4) in, The time difference for the Precision Time Protocol.

[0093] Step S402: Implementing time synchronization of the precision time protocol between the terminal device and the station server according to the precision time protocol time difference.

[0094] In this embodiment, the precise time protocol time of the local end when the opposite end sends the current service message can be calculated based on the calculated precise time protocol time difference; the current precise time protocol time of the opposite end can also be calculated based on the calculated precise time protocol time difference and the precise time protocol time of the local end. The terminal device and the station server are each other's opposite ends.

[0095] In the following, the station-side server is a server of a battery swap station, the terminal devices are the vehicle-side and the mobile phone-side, the first wireless link is a wireless communication link based on Wi-Fi, and the second wireless link is a wireless communication link based on 4G / 5G. As an example, the wireless communication method of the embodiment of the present application is applied to control the battery swap vehicle based on the battery swap station to realize the parking in and out of the battery swap vehicle. Figure 4 , the wireless communication method of an embodiment of the present application is described.

[0096] See attached Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a connection relationship between a terminal device and a station server according to an implementation of an embodiment of the present application. Figure 4 As shown, MQTT Client is deployed on the mobile phone and vehicle side respectively, and MQTT Broker is deployed on the cloud server and station server respectively. The vehicle side is connected to the station server through a wireless communication link based on Wi-Fi, and the vehicle side is connected to the cloud server through a wireless communication link based on 4G / 5G. The mobile phone is connected to the station server through a wireless communication link based on Wi-Fi, and the station server is connected to the cloud server through a wireless communication link based on 4G / 5G.

[0097] To avoid increasing the load burden on cloud servers and causing traffic waste, for the vehicle and mobile phone, 4G / 5G-based wireless communication links can be established when needed. The premise for establishing a Wi-Fi-based wireless communication link is that the vehicle or mobile phone enters the Wi-Fi coverage area of ​​the battery swap station. The connection of the two types of wireless communication links can be triggered when the battery swap order is called, and the connection of the two types of wireless communication links can be disconnected when the battery swap order is canceled, passed, and during the battery swap process.

[0098] For the station side, the Wi-Fi-based wireless communication link and the 4G / 5G-based wireless communication link need to maintain a long connection so that the service side can always be active and seamlessly serve different battery-swap vehicles.

[0099] After the vehicle or mobile phone cancels a battery swap order, the battery swap order is expired, or the vehicle is parked at a battery swap station, it is necessary to notify the station server so that it no longer sends business messages to the vehicle or mobile phone to avoid wasting traffic on the station server and to avoid the vehicle going to other battery swap stations to place orders after parking fails, causing the business messages of the two battery swap stations to interfere with each other.

[0100] Data topics can be divided according to the specific business needs of the battery swap parking service, so that business message publishing and subscription can be realized according to different data topics.

[0101] After the vehicle or mobile phone establishes a wireless communication connection with the station server and the cloud server, the MQTT Client on the vehicle and mobile phone, carrying the TLS communication security certificate, publishes and subscribes to business messages of different data topics with the MQTT Broker on the station, so as to transmit the positioning data and planning control data obtained by the station to the vehicle or mobile phone, and transmit the vehicle status information (such as vehicle speed, vehicle operating status, etc.) to the station, thereby realizing low-latency information resource sharing between the vehicle and the station, and further realizing a stable and efficient data transmission link between the vehicle and the station, thereby realizing the parking in and out of battery-swap vehicles based on station-side control, and can effectively utilize the characteristics of station-side sensors with better viewing angles to realize battery-swap vehicle parking in complex scenarios. At the same time, it can also meet the parking needs of battery-swap vehicles without radars and cameras or insufficient computing power.

[0102] For cloud servers, when the scale of the vehicle and station ends continues to grow and the volume of business messages processed is large, the frequency of sending business messages can be reduced.

[0103] For the mobile phone, due to its limited computing and storage resources, a lower sending frequency can be set during wireless communication with the station, and the data volume of the business message should not be too large.

[0104] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order, and they can be executed simultaneously (in parallel) or in other orders. These adjusted schemes are equivalent to the technical schemes described in this application, and therefore will also fall within the scope of protection of this application.

[0105] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0106] Another aspect of the present application also provides a computer-readable storage medium.

[0107] In an embodiment of a computer-readable storage medium according to the present application, the computer-readable storage medium may be configured to store a program for executing a wireless communication method of the above-mentioned method embodiment, and the program may be loaded and run by a processor to implement the above-mentioned wireless communication method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium may be a storage device formed by various electronic devices, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.

[0108] Another aspect of the present application also provides a terminal device.

[0109] In an embodiment of a terminal device according to the present application, the terminal device may include at least one processor; and a memory connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any of the above embodiments is implemented. The terminal device described in the present application may include a driving device, a smart car, a robot, a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an augmented reality (AR)\virtual reality (VR) device, etc.

[0110] In some embodiments of the present application, the terminal device may further include at least one sensor, which is used to sense information. The sensor is connected to any type of processor mentioned in the present application. Optionally, the terminal device may also include an automatic driving system, which is used to guide the terminal device to drive itself or assist driving. The processor communicates with the sensor and / or the automatic driving system to complete the method described in any of the above embodiments. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor can be implemented in software, hardware, or a combination of the two.

[0111] Another aspect of the present application also provides a station-side server.

[0112] In an embodiment of a station-side server according to the present application, the station-side server may include at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any of the above embodiments is implemented.

[0113] So far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.

Claims

1. A wireless communication method, characterized in that: The method is applied to a terminal device, wherein the terminal device is wirelessly connected to a station-side server via at least two types of wireless communication links; the method comprises: Based on preset business requirements, subscribing to a first data topic through at least two types of wireless communication links; and receiving business messages of the first data topic published by the station-side server through at least two types of wireless communication links; and Based on the business demand, a business message of a second data topic is published to the station-side server through at least two types of wireless communication links.

2. The wireless communication method according to claim 1, characterized in that: The service message of the first data subject includes at least one service message; each of the service messages includes the precise time protocol time at which the service message is published; The receiving, through at least two types of wireless communication links, a service message of the first data topic published by the station-side server comprises: For each of the received service messages, retaining the precise time protocol time of the latest service message as the latest time of the first data subject; When the next service message of the first data subject is received, the service message is deduplicated according to the precise time protocol time of the next service message and the latest time to achieve reception of the service message of the first data subject.

3. The wireless communication method according to claim 2, characterized in that: Deduplication of the service message according to the precise time protocol time of the next service message and the latest time includes: Comparing the precise time agreement time of the next service message with the latest time; If the precise time agreement time of the next service message is less than or equal to the latest time, the service message is ignored; If the precise time protocol time of the next service message is greater than the latest time, the service message is retained, and the precise time protocol time of the service message is updated to the latest time.

4. The wireless communication method according to claim 2, characterized in that: The method further comprises: In response to a preset operation, resetting the latest time of the first data subject; Among them, the preset operation is at least one of successfully receiving all business messages of the first data topic, canceling the subscription to the business messages of the first data topic, and invalidating the subscription to the business messages of the first data topic.

5. The wireless communication method according to claim 1, characterized in that: The service message includes the precise time protocol time and the world standard time of the service message release; The method further comprises: Acquire the precision time protocol time difference between the station server and the terminal device according to the precision time protocol time published by the service message and the world standard time; According to the precision time protocol time difference, time synchronization of the precision time protocol between the terminal device and the station-side server is achieved.

6. The wireless communication method according to claim 5, characterized in that: The obtaining of the precise time protocol time difference between the station-side server and the terminal device includes: Obtaining a world standard time difference between the world standard time of the terminal device and the station server; Acquire a first time deviation between the precise time protocol time and the time standard time of the terminal device; Obtaining a second time deviation between the precise time protocol time and the time standard time of the station-side server; The precision time protocol time difference is acquired according to the world standard time difference, the first time offset and the second time offset.

7. A wireless communication method, characterized in that: The method is applied to a station-side server, wherein the station-side server is wirelessly connected to a terminal device via at least two types of wireless communication links; the method comprises: Based on preset business requirements, publishing business messages of the first data topic to the terminal device through at least two types of wireless communication links; and Based on the business needs, subscribing to the second data topic is performed through at least two types of wireless communication links; and receiving the business message of the second data topic published by the terminal device through at least two types of wireless communication links.

8. The wireless communication method according to claim 7, characterized in that: The service message of the second data subject includes at least one service message; each of the service messages includes the precise time protocol time when the service message is released; The receiving a service message of the second data topic published by the terminal device includes: For each of the received service messages, retaining the precise time protocol time of the latest service message as the latest time of the second data subject; When the next business message of the second data subject is received, the business message is deduplicated according to the precise time protocol time of the next business message and the latest time to achieve reception of the business message of the second data subject.

9. The wireless communication method according to claim 8, characterized in that: Deduplication of the service message according to the precise time protocol time of the next service message and the latest time includes: Comparing the precise time agreement time of the next service message with the latest time; If the precise time agreement time of the next service message is less than or equal to the latest time, the service message is ignored; If the precise time protocol time of the next service message is greater than the latest time, the service message is retained, and the precise time protocol time of the service message is updated to the latest time.

10. The wireless communication method according to claim 8, characterized in that: The method further comprises: In response to a preset operation, resetting the latest time of the second data subject; Among them, the preset operation is at least one of successfully receiving all business messages of the second data topic, canceling the subscription to the business messages of the second data topic, and invalidating the subscription to the business messages of the second data topic.

11. The wireless communication method according to claim 7, characterized in that: The service message includes the precise time protocol time and the world standard time of the service message release; The method further comprises: Acquire the precision time protocol time difference between the station server and the terminal device according to the precision time protocol time published by the service message and the world standard time; According to the precision time protocol time difference, time synchronization of the precision time protocol between the terminal device and the station-side server is achieved.

12. The wireless communication method according to claim 11, characterized in that: The obtaining of the precise time protocol time difference between the station-side server and the terminal device includes: Obtaining a world standard time difference between the world standard time of the terminal device and the station server; Acquire a first time deviation between the precise time protocol time and the time standard time of the terminal device; Obtaining a second time deviation between the precise time protocol time and the time standard time of the station-side server; The precision time protocol time difference is acquired according to the world standard time difference, the first time offset and the second time offset.

13. A terminal device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores a computer program, and when the computer program is executed by the at least one processor, the wireless communication method according to any one of claims 1 to 6 is implemented.

14. A station-side server, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores a computer program, and when the computer program is executed by the at least one processor, the wireless communication method according to any one of claims 7 to 12 is implemented.

15. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the wireless communication method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Proxy subscription method and system based on MQTT server

    CN110266794A

  • Information acquisition method, device and system, readable storage medium and electronic equipment

    CN111131358A

  • Alarm information processing method and device and electronic equipment

    CN113077615A

  • Charging pile communication method and system based on Internet of Things cloud platform

    CN114301962A

  • Vehicle state monitoring system, monitoring method, equipment and storage medium

    CN116233793A